Difference between revisions of "Java reverse engineering"
(→Installation Instructions) |
|||
Line 2: | Line 2: | ||
== Installation Instructions== | == Installation Instructions== | ||
− | The Java Reverse Engineering | + | The Java Reverse Engineering is available as a Papyrus extra plugin. |
− | + | You can install it by using the Papyrus update site correspnding to your Papyrus version: | |
− | + | *https://www.eclipse.org/papyrus/updates/ | |
+ | Or you can use the nightly build update site (paste following url in eclipse update site): | ||
*http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/luna/extra/ | *http://download.eclipse.org/modeling/mdt/papyrus/updates/nightly/luna/extra/ | ||
Then : | Then : |
Revision as of 06:47, 12 September 2014
The Java Reverse Engineering is available in the extra plugins of Papyrus. It allows to reverse java filles or packages to a Papyrus class diagram.
Contents
Installation Instructions
The Java Reverse Engineering is available as a Papyrus extra plugin.
You can install it by using the Papyrus update site correspnding to your Papyrus version:
Or you can use the nightly build update site (paste following url in eclipse update site):
Then :
- Unsellect 'Group item by category'
- Select ' Papyrus Java Reverse (Incubation)'
- Finish
How to use Reverse
Using Command
Reverse a Java class
A java class can be reversed into a Papyrus class diagram:
A UML class has been created into the Model Explorer. Your can now add it into your diagram. Note that all associated classes are also been added into the model.
Reverse a package
A java package (and all classes included) can be reversed into a Papyrus class diagram:
Package and classes have been created into the Model Explorer. Your can now add them into your diagram. Note that all associated classes are also been added into the model.
Reverse settings
By default, a package named "generated" is created for the reverse engineering. You can choose another package name on the options menu.
This options menu allows to:
- change the default package of the reverse engineering,
- add or remove search path. The reverse generator search existing uml classes and regenerate them.
- add or remove creation path. The reverse generator search on existing java classes to generate a uml class. Useful for creating java imports (ex: String, Integer).
Using Drag & Drop
You can reverse a class or a package by just drag & drop it into a papyrus diagram:
- Drag one or more classes/packages,
- Drop the selection into an opened diagram.
A settings dialog is opened. You can modify settings (please see Reverse settings). In case when you're reversing by using drag & drop way, you can also choose to display model, packages, and classes / interfaces / enumerations into the papyrus diagram. To enable displaying, just click into the check-boxes:
When you clicked on Ok button, your components are displayed into papyrus diagram. Note while, all selected components are reversed, only components which are in selection, but not into papyrus diagram are displayed.
Change default reverse settings
The java code reverse plugin allows you to change default settings on eclipse preferences:
- Open Eclipse Preferences,
- Search for Papyrus section,
- Choose Java Code Reverse sub-section
In this preferences page, you can change:
- default search path values,
- default creation path values.
Note that there are default values; if you have changed these values for a project, your changes are saved, and default values are not used.