Hi Alberto,
For the moment, verveineJ does not export this information.
The main reason being that the meta-model does not represent "import" as an
association.
And it would not be that easy to add, because imports are made from a file (actually, a
CompilationUnit) which may contain more than one class.
After that, another difficulty from verveine point of view this time is that you can
import all the classes from a package (import java.io.*) or import a single method (import
static org.junit.Assert.assertEquals).
What you could do, is look at the classes that one class depends on, and then look at
their packages, and if their packages is different from the initial class' package,
you may assume they are imported, ...
nicolas
----- Mail original -----
De: "Alberto Bacchelli"
<alberto.bacchelli(a)usi.ch>
À: moose-dev(a)iam.unibe.ch
Envoyé: Mercredi 9 Novembre 2011 18:53:40
Objet: [Moose-dev] Classes and Namespaces imported by a Java class
Hi,
Given a FAMIXClass, generated from a Java project parsed with
Verveine-J,
is it possible to know the classes that it imports? I am referring to
this
kind of information:
import org.argouml.application.events.ArgoDiagramAppearanceEvent;
import org.argouml.application.events.ArgoEventPump;
It should be easy to write a parser that gets these "imports" from the
completeText of the FAMIXFileAnchor, but I don't want to write it if I
can
have this information more easily.
Thanks again.
Cheers,
Alberto
--
View this message in context:
http://moose-dev.97923.n3.nabble.com/Classes-and-Namespaces-imported-by-a-J…
Sent from the moose-dev mailing list archive at
Nabble.com.
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev