Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "MoDisco/JavaDiscoverer"

(Description)
(Description)
Line 10: Line 10:
  
  
The J2SE5 model is built from the source code by a Java component using the [[JDT|JDT]], while the [[MoDisco/KDM|KDM model]] is built by a model transformation (powered by [[ATL|ATL]]) applied on the [[MoDisco/J2SE5|J2SE5 model]].
+
The [[MoDisco/J2SE5|J2SE5 model]] is built from the source code by a Java component using the [[JDT|JDT]], while the [[MoDisco/KDM|KDM model]] is built by a model transformation (powered by [[ATL|ATL]]) applied on the [[MoDisco/J2SE5|J2SE5 model]].
  
 
The [[MoDisco/J2SE5|J2SE5 model]] contains the full abstract syntax tree of the Java program : each statement such as attribute definition, method invocation or loop is described. In addition, links between elements are resolved (by resolved link we mean for instance a link between a method invocation and the declaration of this method, or the usage of a variable and its declaration). The model can thus be seen as an abstract syntax graph (ASG).
 
The [[MoDisco/J2SE5|J2SE5 model]] contains the full abstract syntax tree of the Java program : each statement such as attribute definition, method invocation or loop is described. In addition, links between elements are resolved (by resolved link we mean for instance a link between a method invocation and the declaration of this method, or the usage of a variable and its declaration). The model can thus be seen as an abstract syntax graph (ASG).
Line 24: Line 24:
  
 
The mapping to [[MoDisco/KDM|KDM]] can be changed or completed easily by updating the [[ATL|ATL]] rules.
 
The mapping to [[MoDisco/KDM|KDM]] can be changed or completed easily by updating the [[ATL|ATL]] rules.
 +
 +
 +
== Requirements ==
 +
 +
To use the plugin you need:
 +
• JDK 1.5 or above
 +
• a version of Eclipse 3.3 or above with the following set of plugins installed
 +
o [[EMF|EMF]] 2.3.0 or higher
 +
o [[ATL|ATL]] 2.0.0 or higher
 +
o [[MoDisco/KDM|KDM metamodel]]

Revision as of 06:37, 13 February 2009

The goal of Java Discoverer plugin is to allow practical extractions of J2SE5 models from a Java project. The J2SE5 models could also be converted in KDM models (specifications).


Description

This plugin aims at analysing Java source code compliant with J2SE 5.0 standard and providing a model describing the information found. As shown in next figure, this model can conform either to the J2SE5 metamodel or to the KDM metamodel.

Overall approach of the J2SE5 discoverer


The J2SE5 model is built from the source code by a Java component using the JDT, while the KDM model is built by a model transformation (powered by ATL) applied on the J2SE5 model.

The J2SE5 model contains the full abstract syntax tree of the Java program : each statement such as attribute definition, method invocation or loop is described. In addition, links between elements are resolved (by resolved link we mean for instance a link between a method invocation and the declaration of this method, or the usage of a variable and its declaration). The model can thus be seen as an abstract syntax graph (ASG).

The KDM model represents only the structure of the Java application. The mapping between Java concepts and elements of J2SE5 and KDM metamodels is described in the following table.

J2SE5 to KDM mapping

In this version, the only data flow elements (below the method declaration) described in the KDM model are : • The creation of instances (Creates) • The method invocations (Calls) • The return statements returning a variable (UsesType)

The mapping to KDM can be changed or completed easily by updating the ATL rules.


Requirements

To use the plugin you need: • JDK 1.5 or above • a version of Eclipse 3.3 or above with the following set of plugins installed o EMF 2.3.0 or higher o ATL 2.0.0 or higher o KDM metamodel

Back to the top