How to edit a working set or maybe there are other tools for fast filtering? - eclipse

I have a lot of projects in my package view with a lot of resources(.java, .xml, .vm, .js, and so on) but I work only with several of them and the list could change with the time. I need a tool that allow me to filter quickly only selected files("my files") and back to a full projects list. I thought I can do that using working sets but I can't find a way to add and delete files from an existing working set.

Go to Window->Customize Perspective. In Command And Groups Availability tab enable Window Working Set option if not enabled. Click OK
Go to Window->Working Sets->Edit. A dialog will pop up. Click Edit button after selecting any working set.

Related

show code modification overview in ecplise IDE

i am using an eclipse based IDE and have a library with some files that i need to make additions/changes to. what is the best way to quickly see the all the modifications of all files in a list/tab in eclipse IDE?
i know there is the useful "#TODO" tag that shows all tasks in a nice view/tab. as im using this quite heavily, i would like to have a special view/tab that just shows the modifications and separates them from the todos.
EDIT:
thx for the suggestions and the local history tipp.
sorry for not making myself clearer. ive added a screenshot.
when i add "TODO" the tasks show up in the tab marked in red - i dont mind setting manually something (like a bookmark) as im not going to make a lot of changes, but ideally they show up like the tasks or another simple overview.
It's could depend of your version control system.
For each, eclipse purpose an associated plugin with a specific view.
Instead that, you could use the History view (Team/ Show local History after a right clic on a file).
Eclipse keeps a history of your changes for a limited number of days (configured in 'Preferences > General > Workspace > Local History'). You can right click on a file and choose 'Compare With > Local History' to see the changes between revisions.
To track all your changes you need to use one of the source control systems (such as SVN, GIT, ...). Eclipse has plugins to support these systems. Once you have installed one of these you can use the 'Team' menu to commit changes and look at the history.
found it!
by clicking "window" - "Show view" - "other" one needs to select the "bookmarks". the bookmarks then show up as a tab next to tasks.
by clicking the right small arrow the bookmark view menu pops up (similiar to the screenshot above with the task menu). the bookmark view can then be configured/filtered by clicking the "Configure contents..." menu link.

how to remove google sign in button in eclipse

I'm facing a wierd problem. My eclipse, has a google signin button which is occupying some of the space which I do not want to happen. Initially it had "Sign-in to Google" text along with it. I've followed some blog post and set accordingly to show just the icon (I don't remember that blog post link).
But now, the icon is getting replicating .. it is being shown 12 times. It is actually creating childs :P
I've gone through all the options present in Customize Perspective menu, none of them had this button listed. Can someone help me in removing that google sign button from my perspective? One possible suspect is- my eclipse crashes when I suspend and wakeup my machine.
You can use the Window > Reset Perspective... menu command to reset the perspective to its default state, which might eliminate that toolbar and buttons. If that fails, I would create a new workspace and import the projects into it using File > Import > Existing Projects into Workspace.
If you want to try to salvage your existing workspace, it's possible to do so my manually editing Eclipse's internal file that stores your Workbench layout, but it's a bit tricky. Here are the steps I've followed to eliminate a similar repeated toolbar item:
Exit Eclipse.
Find the Workbench layout file, it's path is <workbench>\.metadata\.plugins\org.eclipse.e4.workbench\workbench.xmi. Make a backup of this file before you touch it - this is essential because it's easy to corrupt the file if you change the wrong things.
Open the file in your favorite XML-aware editor - most packages of Eclipse include the XML editor that works just fine1, but be aware that if you use Eclipse to edit the file you can't have Eclipse open on the workspace that contains the workbench.xmi you want to edit.
Find the section of <trimBars> nodes in the XML; from there you have to determine which <trimBars> node you need to edit. In your case it looks like a vertical one, probably with a side="Right" attribute.
Under the correct <trimBars> node you'll find multiple <chlidren> nodes, each with an elementId attribute that should help you identify it; you're looking for <children> nodes that are identified as something related to the Google plugin.
Delete the <children> nodes that seem related to the unwanted toolbar buttons. In your case, it appears that there is an entire toolbar that you might want to eliminate, so you might want to delete the entire containing <trimBars> node.
Save the file and start Eclipse on that workspace.
1Some packages of Eclipse include EMF tools that will open it in a special XMI editor that does not provide a view of the source, only a structural tree view. Depending on how you like to work with XML, this might be easier than editing raw XML.
This is not a perspective but a view. You can hover over that bar with the buttons and click Alt+Shift+F1 to check where this View comes from. Then you can either disable/uninstall the contributing feature (Help -> Installation Details) or check where the feature came from.
If it comes from the IDE, you can open a bug for it. If it is contributed from a third party plugin, contact the developers of that plugin.
There is an eclipse bug concerning duplicate view toolbar buttons in Luna that has recently closed as well. Maybe this solves your problem as well.
Edit: Taken from this bug:
root cause is that in Luna 4.4M5 WorkbenchWindowControlContribution.createControl is called twice, the
first time with a null value for
WorkbenchWindowControlContribution.getWorkbenchWindow() while it is
still being created. This is related to what has been reported here
https://bugs.eclipse.org/bugs/show_bug.cgi?id=427452
second cause is that my createControl(Composite parent) method was calling PlatformUI.getWorkbench().getActiveWorkbenchWindow() instead
of WorkbenchWindowControlContribution.getWorkbenchWindow(). This
resulted in an attempt to create a new Workbench Window, which
recursively calls createControl() again. This has already been
reported here https://bugs.eclipse.org/bugs/show_bug.cgi?id=366708

Eclipse - how to simultaneously switch working set for project explorer, call hierarchy, and search?

Whenever I switch working sets in the project explorer, the working set does not switch for the search and call hierarchy views, so I end up with search results from the wrong working set if I forget to switch those over manually.
Is there a shortcut for switching working sets in all those tools simultaneously?
Thanks!
There is a special working set concept in Eclipse called Window working set which is basically a 'centralized' way of managing your working sets.
You can set up your working sets in Window / Working Sets. Most views which have support for working sets have an option to select this special working set (as you can see here). After finishing the setup you can turn on/off your active working set in Window / Working Sets and all views are automatically use the changed values.
Project explorer, call hierarchy and search support this feature.
To obtain some automation with Working Sets I suggest the following...
First of all a premise. All the views that support Working Sets ask you to select which one they are going to refer to. In the selection dialog, usually, you will find the name of the currently defined Working Sets AND the label Window Working Sets. The latter is, as Csaba_H was saying, some sort of centralized Working Set manager.
Therefore, make sure that every time you need to select a Working Set, your Window Working Set label is selected instead (in the search it's the last input field, press the Choose button...in the Package Explorer, it's the first entry above your WSs).
This is important because when you now change the WS selection within the Window Working Sets (sorry, a lot of WS here), you will automatically change all of them! You will see the Package Explorer change, for example.
As said here already, you can change it through Window -> Working Sets (if the entry is not there, just Window -> Customize Perspective... -> Command Groups Availability tab -> tick on Window Working Set). Not only that, now you can assign a shortcut under Window -> Preferences -> General -> Key -> Select Working Sets (category Window) and use the shortcut to open the selection dialog and change WS from there!
Hope it helps.
Not sure there is a direct way, but what you can try is (just for testing) to associate one perspective to one working set.
I.e. define a package explorer, a search view and a call hierarchy view:
all set to working set WS1 in perspective P1.
all set to working set WS2 in perspective P2.
That way, you should be able to switch perspective, effectively switching working set at the same time.

How do I limit task tags to current project in Eclipse?

Eclipse currently shows the task tags (// TODO) from all open projects. I would be grateful if anyone could point out the preference, where I could restrict the scope of tasks displayed (e.g. only tasks from current project).
In Eclipse Helios (3.6) you can configure the scope.
Down arrow at the top right -> Configure Contents:
Select a configuration on the left (or create a new one) and on the right in the Scope section select "On any element in same project".
There should be a down arrow in the top-right with several options in it. For the old Eclipse the option you want is Filters... And for the newer Eclipse the option is now Configure Contents. At the top of the Configure Contents dialog is a scope selection with options you want, I think.. If not check preferences and search for tasks, or scope. It should be in there somewhere.
Close projects that you aren't working on. Tasks show for any part of the workspace, so remove projects that you arent working on by doing a close operation. (right click on the project in the project explorer and then "close project")
Configure Contents... can be used to filter to things like working sets (if you're not already using working sets, you should), but yet another way is to use Mylyn to filter out any UI elements not relevant for what you're currently working on.
In Eclipse 2019-06:
1- Open the Tasks window.
2- Click on the arrow pointing down ▽.
3- Click on Filters...
4- In the Configurations panel on the left select TODOs (or any configuration that you have saved).
5- Under Scope select On elements in selected projects
6- Click on Apply and Close
Now the task view will only show the tasks of the project where you are at the moment.
Simply close the projects you are not working on.
You can leave them in the workspace, too.
In Eclipse Juno 4.2.1, I found that it's possible to disable specific projects TODO tasks.
In the projects properties open:
Java Compiler > Task Tags
From that page check the option "Enable project specific settings" and remove the TODO entry from the list below, after that the TODO comments from that project won't be shown in Tasks.
You could also remove other tags from the list.
Filtering by working sets works fine, but I had to put the packages into a working set, rather than the whole project.
AFAIK the Eclipse task list is workspace-based and cannot really be filtered by default.

Eclipse: Nested Editor Tabs?

Is anyone aware of any method (or external plugin) that would allow for nested editor tabs? It would be nice to be able to group related open files into their own "master" tabs, but I'm not sure if this is even possible. Any ideas?
This is totally non-obvious, and I discovered it by accident, but...
If you click on a tab and start dragging it downwards, once you get more than half-way down the editor pane, a horizontal line will appear. Let go, and now you'll have two different editor panes, each with tabs of documents. Now you can drag tabs up and down between the two panes to see different documents at the same time.
I think that's as close as you can get.
I think the best you can currently do is "Window->New Window" and then use each new window as a separate "tab" of related editors. Not exactly ideal, I admit.
It's a cool idea though, especially if you could have shortcuts or something that open groups of editors with a single command.
This definitely isn't possible in the current RCP. You might be able to construct an editor component which created a CTabFolder and delegated to other editor components, but I'm not sure how well that would work.
There are Perspectives in Eclipse that you might use to achieve something close, they are more global things though...
But I agree with you, I would like this feature as well! This would be also very useful when editing many files that have the same name but come from different packages, because now it's a mess >_<
For me the utility of such a feature is to reduce context switching time. I'm working on project A, have lots of editors open, now I need to drop that and work on project B. I want to keep all the editors open associated with project A but hide them while I work on B. When I'm done with B, I can pick up right where I left off in A without having to find and open all those A files again; I can even leave them unsaved indefinitely, since Juno never crashes!! :)
I have used the New Window feature, and it's great, but the new window needs a bunch of configuration (closing Views I don't need, moving stuff around to where I want it, opening Views I had open in the old window, and so on) before I can get to work. It also uses a lot more memory than a simple tab group would since it seems to be a complete new copy of Eclipse.
The split-window feature is great and I use it all the time. It is indeed tab groups, and if there were a way to hide a tab group, and for each tab group to have its own tab list (the thing you get when you click ">>5" so you can see editors you have open that don't fit in the tab header), it would totally fill the bill.