Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » get the main thread from java model( generate call graph from java model)
get the main thread from java model [message #1731908] Tue, 10 May 2016 19:56 Go to next message
ahmed albashir is currently offline ahmed albashirFriend
Messages: 7
Registered: May 2016
Junior Member
hi .
My project, contain Desktop application developed by Java is talking about the discovery of performance bugs in Android applications via static analysis, and I need to extract lengthy operations in the main thread and more bug.

i using Modisco to do like that , i try to download Modisco as plugin and Discovery java model from java project and generate xmi file "java model file ".

- how can i get the main thread from the xml file and search from some method inside main thread , can helpe me

[Updated on: Wed, 11 May 2016 08:02]

Report message to a moderator

Re: get the main thread from java model [message #1731949 is a reply to message #1731908] Wed, 11 May 2016 08:53 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member
Hi,

The Java model you obtained (that conforms to the Java metamodel provided by MoDisco and defined in Ecore) can be loaded in memory as any EMF model.
You should check some EMF tutorials to see how to perform this programmatically.

As far as the structure of the produced Java model is concerned, you should take a look to the MoDisco documentation related to the Java metamodel and its available API.
Cf. the MoDisco Documentation -> MoDisco User Guide -> Technologies -> Java -> Java metamodel.
In you case, I guess you first need to access to the main MethodDeclaration from the corresponding ClassDeclaration.

Kind regards,


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: get the main thread from java model [message #1731966 is a reply to message #1731949] Wed, 11 May 2016 10:17 Go to previous messageGo to next message
ahmed albashir is currently offline ahmed albashirFriend
Messages: 7
Registered: May 2016
Junior Member
soo i want to get call graph from java project "android project develop by java" using modisco , what is step to do that
Re: get the main thread from java model [message #1731977 is a reply to message #1731949] Wed, 11 May 2016 11:53 Go to previous messageGo to next message
ahmed albashir is currently offline ahmed albashirFriend
Messages: 7
Registered: May 2016
Junior Member
thank's a lot men , but i need the get just specific method and operation in main thread
Re: get the main thread from java model [message #1731980 is a reply to message #1731977] Wed, 11 May 2016 12:21 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member
The Java model discoverer will return you a full Java model from your selected Java project.
You then have to navigate this model in order to get the specific method you want to study and/or transform further.
You can use the provided/generated Java API (corresponding to the Java metamodel) in order to realize such a navigation.


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: get the main thread from java model [message #1732212 is a reply to message #1731980] Fri, 13 May 2016 13:21 Go to previous messageGo to next message
ahmed albashir is currently offline ahmed albashirFriend
Messages: 7
Registered: May 2016
Junior Member
I have question when I install modisco as eclipse plugin Can you develop a desktop application to generate Java model .
i see in Java Discoverer API http://download.eclipse.org/modeling/mdt/modisco/nightly/doc/org.eclipse.modisco.doc/ that say must add the following plug-in dependencies to your project ( Require-Bundle in your Manifest.MF):

org.eclipse.gmt.modisco.java
org.eclipse.modisco.java.discoverer
org.eclipse.modisco.infra.discovery.core

or just develop plugin

and another question in :
javaDiscoverer.discoverElement(javaProject, monitor);
is the javaProject parameter is file path

Re: get the main thread from java model [message #1732216 is a reply to message #1732212] Fri, 13 May 2016 13:30 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 667
Registered: July 2009
Senior Member
The MoDisco components (including the Java model discoverer and corresponding Java metamodel) are implemented as plain Eclipse plugins.
As any plugins, they can be integrated in Eclipse RCP applications you can build.
However, we do not currently provide standalone versions of these MoDisco components.


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Previous Topic:KDM to UML does not work
Next Topic:From PowerBuilder to KDM
Goto Forum:
  


Current Time: Wed Sep 26 13:21:10 GMT 2018

Powered by FUDForum. Page generated in 0.02196 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top