Difference between revisions of "MoDisco/ModelFilter"
|Line 19:||Line 19:|
==Real type of properties==
==Real type of properties==
Revision as of 09:45, 6 August 2009
The goal of ModelFilter plugin is to extract specific informations from java projects, and to show them as UML models.
First application is to initialize a dependencies graph from one selected element, the level of recursion has been provided as a parameter.
Second application is to show method calls as a pseudo sequence diagram, using dependencies between methods, numbered from one to n to indicate the order.
Third application is to represent real type of properties when an interface has been used in java code.
To discover an application, you may use SimpleTransformationsChain to obtain a UML model which represents the whole application structure. Or you may use ModelFilter plugin to focus on different aspects. It could be represented by little models dedicated to one element, or a complete model but with added informations. Depending on the complexity of the application and resulted UML model, you will have to select one or other kind of model. The dependencies graph is clearly well fitted to show how several little models could be useful. Representation of method calls as pseudo sequence could be done by little models or by one complete model, it has been implemented as one model to show how different diagrams have to be used to mask complexity of model elements. And representation of real type for properties show how a complete model could be improved with few details.
From a selected class in a java application, you choose the recursion level of dependencies search and you will get a UML model which represents a dependencies graph from selected class. Structural links, like association, inheritance, etc. are of course available, but we have added UML dependencies to show local use of a type, or method parameters. It is very useful to detect qualified type usage or type in same package usage.
To represent method calls as pseudo sequence, we will use UML dependencies from one method (caller) to other methods (called), each dependency has been named with name of called method suffixed by a number which represent its order in sequence of method calls.
Real type of properties
Eclipse Galileo with modeling plugins:
- EMF UML2
- UML2 Tools
- ATL 3.0.0
A complete bundle of Modeling components could be found at this url : Eclipse Modeling Galileo Bundle
Warning : after installation, you will have to change your eclipse settings (file eclipse.ini) to increase memory size allowed to 1Go at least, parameter « -Xmx1024m ».
-startup plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519 -product org.eclipse.epp.package.modeling.product --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1024m -XX:ThreadStackSize=4096
Gabriel Barbier (Mia-Software)
To install this plugin, you will have to retrieve it and its dependencies from MoDisco SVN. All following bundles are available in folder "plugins/trunk":
To illustrate ModelFilter plugin and its features, we will use a sample inspired from the Pet Store Application.
Get and install use case
The models are available from MoDisco SVN (how to...) in subdirectory "examples/trunk/org.eclipse.gmt.modisco.usecase.modelfilter.sample" or from downloadable archive. If you use a SVN client in eclipse (Subversive or Subclipse), the project will be immediately available in your Eclipse workspace.
Sources of Pet Store application are available from Sun downloads. You may have to download several libraries to obtain an eclipse project without errors (JPA, JTA, JSF-apis and Servlets-jsp-apis). A complete bundle is also available from Mia-Software... To view this application in your Eclipse workspace, you will have to extract content of this archive, and use the "import" wizard (import project in workspace).