Once upon a time I used Eclipse and I discovered this wonderful thing called working sets.
Now I am using Eclipse Luna and it looks like I have to relearn all about Working Sets again. Because nothing works like before.
On my journey to relearn all about working sets, some folks said that I should go to Customize Perspective.. and add the window working command group. I did that.
Then I created three working sets which each contained different projects. It kind of looks like this :
Now, I thought, this is where the fun begins.
Excitedly, I navigated to the Window menu and selected all three working sets.
Astonishingly nothing happened. I used to be able to see multiple working sets at the same time. What happened?
If you want to see the projects split in to Working Sets in the Project Explorer view you need to open the Project Explorer view menu (the small down arrow at the top right of the view) and select 'Top Level Elements > Working Sets'
Related
Is there a solution for automatic creation of a complete class diagram from a Java project?
I've spent significant time looking online, trying Papyrus, Jar2UML, UML2Tools, DiaGen, jGraps, Class-visualizer, but have not found any currently working solution. Although most of the mentioned tools work (some do not currently work), they do not automatically generate a diagram of the full class hierarchy. I realise this might be the holy grail, and may require parameterisation, but thought it should be possible this day.
Requirements for wider use would be:
Currently working
Easy to use, or up-to-date tutorial on exactly how to do this
Does not require manual coding
Stand alone or Eclipse/NetBeans/IntelliJ plugin
Free
If there is nothing like this available, I'm considering creating something like this.
Out of the fact I am not sure to have all the classes of a project into one class diagram is a good idea because the result is unreadable with lot of classes, you can do that for instance with my tool BoUML. After you download/install/run it :
create a new project
select Java in the global menu Languages
for the first directory dialog appearing press the button cancel (you do not have a java catalog) then for the second directory dialog select the root directory containing all the sources of Java you want to model, then wait for end
in the browser on the left in any of the created class view or in a new one you create yourself do a right mouse click and choose New class diagram and double click on it to open it
probably you need to hide details of classes in the diagram to limit its size (you can do that later but better to do that right now in case you have lot of classes), in that case do a right mouse click into the diagram or on it into the browser to edit the drawing settings and set to yes the settings hide classes attributes and hide classes operations then confirm (button ok)
use the button binocular on the top (near print button), change kind to class then use buttons search then mark them then close
into the open diagram (shown into the right part of the window) do a right mouse click and choose add marked elements placing classes in random position then redo a right mouse click and choose automatic layout (you can also move the classes by yourself of course)
As you can see all the relations between classes are drawn, not only the generalization/realization. If you want only them without having for instance to hide all other relations one by one by hand you can develop a plug-out marking all the classes and generalization/realization of the model, then changing the procedure I given :
when you edit the drawing settings also go into the second tab and set to no the setting draw all relations
rather than to use the browser search (binocular button) to select all he classes use your plug-out
Anyway, again, to show all the classes into one diagram is a bad idea except if you have few.
In the page documentation you have the reference manual and (old) video tutorials including the two ones dedicated to Java and an other one about to write a plug-out
Note you can also use Doxygen to make your diagram without using an UML modeler
Although BoUML does an ok job on this, for a large project it's not pretty.
For a better solution to fully automatically create a basic but complete class diagram from source code, try the simple extractor I put together in Java:
https://github.com/folterj/ClassDiagramExtractor
The project uses reflection, and produces a diagram from all the packages in a folder (and sub-folders).
Notes:
No command line options - clone & run setting source folder in code
This produces a gv file for use with GraphViz (dot), available here: https://www.graphviz.org/
The result looks quite good, as it groups packages together and even uses coloring.
Most of time I work with more opened projects at once which results in the overcrowded and fuzzy set of opened cross-projects tabs at once. Suddenly I realize I have found what I need and I want to close all the tabs belonging to a project. Is there a way to comfortably close all the project related opened tabs without closing a project itself?
Example
I have opened two projects A and B. I would like to close all the clases under the B project only, i.e. (B1.java, B2.java ... B5.java).
Why don't you want to close the whole project and open to get rid of these tabs?
I want to keep the project opened to see its structure and opened packages with their content. Although my example above is simple, let's assume I don't want to close the project and walk through a broadly branched tree to find a relevant package agian. The only I need is to close the currently opened tabs of the other project to be used soon or later.
Close them manually, huh?
Eclipse has an amazing feature that the each tab size is different based on the length of the class/file name - the closing of more of tabs at row is still about wasting time of finding the x button. The even more stupid is the expandable list on the right side of tabs which items have no x button at all so I can't close the tabs directly from it.
So, does exist a way?
The simple answer is no, this is not possiable. To close all the tabs you can:
In the file menu(File>>Close All), click the close All item. Eclipse will close all the existing tabs.
This is quite a niche requirement, this could be quite a nice opportunity to build a Ecplise Java Plug-in.
I would suggest using "Tasks" or "Mylyn". When you move from task "A" to task "B", it will replace all the editor tabs for project "A" with the last editor tabs you had open for project "B".
I am using Eclipse Juno for RCP RAP developer. I have created a Plug-in Project with a single view and it runs normally. But whenever I tried to add a new view into that workbench, the window dosent update. Also if I change the id of the current view, it also not working. And if I delete the current view, it also showing it. As a whole, the view part is not updating of the application. Anybody knows any answer ?
Your changes doesn't get applied correctly.
Eclipse 4 persists certain user changes in your application. During
development this might lead to situations where changes are not
correctly applied and displayed, e.g. you define a new menu entry and
this entry is not displayed in your application.
You have to add -clearPersistedState as a program argument for your application or set the Clear flag in the Main tab of your Run configuration.
Take a look here for further information and a more detailed description.
I have created two views for eclipse. Each of this views is launched using a different run configuration (meaning a different one for each view).
What I want to do:
In the first view I have a list of elements. When I double click one element I want to start the other view (maybe from its run configuration) and only then to start all the bundles.
Any clue of how to do this?
Besides, I would like to send some parameters from the first view to the second one when launching.
I hope anyone can help.
The Eclipse run configuration is list of complex settings including Main class, VM arguments, JRE paths, and Classpath. The Eclipse view, in your words, is the perspective which contains various window panes; I think that's what you mean. The 2 concepts of run configuration and perspective/view are separate implementations of Eclipse, and not related.
So…what you’re asking seems impossible for Eclipse to do and not fitting to its design.
I propose you include your source folders into the Package Explorer workspace, which is basically just a file system. Afterwards, open/close the project folder when you want to change the views, using your words. I myself switch between 2 rather different projects between pure Java and Swing, and both contain their own Main function, for testing code in StackOverflow. I think this is similar to your goal.
I am not sure what you meant by “list of elements” in Eclipse. And I may not understand your exact problem.
I'm brushing up my Eclipse RCP skill by trying to enhance my one-year-old side RCP application. This application has one perspective, and this perspective has 3 views, and I'm adding another view into the same perspective. To add this new view, I added it in the MANIFEST.MF file under Extensions tab and created the Java file for it.
When I run it as an Application, it works. I see all 4 views in the application. But, when I run it as a Product, that new view is missing. It almost seems like the new view is not registered in the Product. There's no error in the console log either. I think I must be missing a step here, but I can't seem figure out here... pretty frustrating!
Note: The views are added into the perspective programmatically (in Java code), not through MANIFEST.MF file. I just realized that even when I change the existing view's layout (ex: size, or location), it doesn't get reflected when running as a Product either, but it works when running as an Application... sigh!
Note: I commented out all the code in my perspective class, in another word, all the views are removed from the perspective. When I launch the Product, I'm still seeing 3 views in the application. I'm thinking there's something to do with caching, but I'm just bummed now.
Any helps are greatly appreciated here! Thanks much,
Okay, after aimlessly clicking around, I figured out the solution. The workspace data needs to be cleared to pick up changes from the perspective.
To do so...
Right click the product file
Choose "Run Configurations..."
Under "Main" tab, check "Clear" checkbox and "workspace" radio button.
Run it.
Hope this will save some of you from troubles.
I've been bitten by this a couple of times until I figured out the easiest workaround: it's sufficient to reset the perspective. There are two ways to achieve this:
Right-click on your perspective in the perspective selector bar at the top right and click on Reset.
Switch to your perspective and then go to Window | Reset perspective....
After that, the changes to your perspective should be picked up.