Skip to main content



      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 15:56 Go to next message
Eclipse UserFriend
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 04:02] by Moderator

Re: get the main thread from java model [message #1731949 is a reply to message #1731908] Wed, 11 May 2016 04:53 Go to previous messageGo to next message
Eclipse UserFriend
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,
Re: get the main thread from java model [message #1731966 is a reply to message #1731949] Wed, 11 May 2016 06:17 Go to previous messageGo to next message
Eclipse UserFriend
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 07:53 Go to previous messageGo to next message
Eclipse UserFriend
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 08:21 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: get the main thread from java model [message #1732212 is a reply to message #1731980] Fri, 13 May 2016 09:21 Go to previous messageGo to next message
Eclipse UserFriend
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 09:30 Go to previous message
Eclipse UserFriend
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.
Previous Topic:KDM to UML does not work
Next Topic:From PowerBuilder to KDM
Goto Forum:
  


Current Time: Mon May 19 11:57:22 EDT 2025

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

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

Back to the top