What is a debug working set (Eclipse)? - eclipse

I'm using Eclipse IDE and notice an option in the Debug perspective in the Breakpoints view that allows me to chose/create a working set. I've found all kinds of help online that tells me how to make a working set or choose a working set, but nothing that explains what a working set is or why I'd want to use one.

A working set is a subset of other objects. You can create a breakpoint working set that contains only some of your breakpoints, or a project working set that contains only part of your project, and so on. You would use working sets to let you easily switch back and forth between different parts of a project or workspace.

Related

Breakpoints grouping and naming in eclipse and Visual Studio

I work with large project having different modules, subprojects. When I am working with one module I need to create set of debugpoints/breakpoints to debug that module.
When I have to work with other one, to debug it, I have to create another set of breakpoints and disable the ones created to debug the earlier module.
When I want to debug (dont conclude that I write buggy code...its just that....it just happens :p) third module, I have to create thrid set of debug points, disable the earlier two sets corresponding to earlier two modules.
Same with debugging fourth module.
Same with debugging fifth module.
Now I want to come back to debugging first module. I have breakpoints related to all modules in my breakpoint window. Say 5 breakpoints corresponding to each module. Total 5*5 = 25. Now I have to go through reading each breakpoint checking which belongs to the first one, enabling them and disabling others.
Am I missing something. Is some simpler/standard way to ease this already there in eclipse.
I feel there should be say "Save set of breakpoints" option which note all the breakpoints currently in the breakpoint window as belonging to same set and will then ask us to give name to that set, say in my case "Module 1".
Then another option "Create new breakpoint set", which will clear up breakpoint window without deleting already created named breakpoint sets
Then, ofcourse the option to "Load breakpoint set" which will simply show up the set we saved as, say in dropdownlist. We select the named breakpoint set and it will end up loading those set of breakpoints.
Q. Am I overthinking? Is similar stuff already there? Also willing to know if similar stuff is there in Visual Studio too
Use 'Breakpoint Working Sets' for this.
In the Breakpoints view (in the Debug perspective) click the small triangle at the top right of the view and select the 'Working Sets...' menu item. This will let you manage the breakpoint working sets.
More details in the Eclipse help

Eclipse working sets -- how to rename them? Also, can the error-icon be disabled?

After mild frustration with the difficulty to make top-level "plain old folders" within Eclipse for visual-organization purposes, I discovered that the thing I'm after is called a "working set". Hooray! But they don't seem to be rename-able, by any of the apparent avenues (right-clicking on it or using the Configure Working Sets window).
Is that just the way things are, since no one should be so lazy as to refuse making a new working set with the right name and transferring everything over? Or am I missing something obvious?
I also have a more minor question whose answer I already think I know. Can I tell a specific working set not to change its icon to have the "red X" when one of its children has an error? Nothing in the preferences under Debugging suggests to me the ability to turn off the automatic icon-changing. It's a useful feature, but I have a few simple practice projects with very basic errors, and I don't need the visual reminder to "fix" them, especially if they're in my "Practice" working set, whose icon I'd prefer not to change.
To rename a Working Set, you need to get to the dialogue of selecting a Working Set (click on the white down arrow at the top right of the package explorer > Configure Working Sets..), focus on your Working Set and click the "Edit" button. There, you can change the Working Set's name, as well as what's actually included in the Working Set.
There is no way (that I know of) to change the icon display to avoid showing the errors marker.

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

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.

How to delete a read only working set in Eclipse

I can't delete some working set, when I cleared up my projects working sets. The properties of this working set is as following. How can I delete it?
My eclipse version: Juno SR1 20120920-0800
You cannot delete it.
The "Other Projects" working set is a special working set. It exists to show you projects that are not explicitly inside a working set.
Why are you trying to delete it?
The only time you should care about it is if you have multiple working sets in your workspace. The "Other Projects" working set is very useful if you have Top-Level Elements->Working Sets selected in your package explorer (it's under that little triangle menu):
In this example, I've defined two working sets, Android and Collage to organize code in my workspace. Any projects not assigned to either of these working sets will appear under Other Projects so I can still see them (and possibly drag them to other working sets).
Working set can not be deleted, but you can hide it. Select the Other Projects and click right button and you will see the delete button.

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.