Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » How to extract the complete source code, not only the signatures(Is there a way, or a discover, that extracts the complete code, not only the signatures?)
How to extract the complete source code, not only the signatures [message #1059732] Tue, 21 May 2013 12:52 Go to next message
Edson Filho is currently offline Edson FilhoFriend
Messages: 6
Registered: April 2013
Junior Member

Hi all,

I extracted a model from jar file, but I got only the signatures.

Is there a way, or a discover, that extracts the complete code, not only the signatures?

Thanks in advance,
Re: How to extract the complete source code, not only the signatures [message #1059745 is a reply to message #1059732] Tue, 21 May 2013 13:47 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

When running a discovery, you have to set the "Deep Analysis" parameter to true and you will then get the full model (including method bodies) from your code.


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: How to extract the complete source code, not only the signatures [message #1059763 is a reply to message #1059745] Tue, 21 May 2013 14:31 Go to previous messageGo to next message
Edson Filho is currently offline Edson FilhoFriend
Messages: 6
Registered: April 2013
Junior Member
Hi Hugo,

I already have the bodyDeclarations field in my model, but I have only the signatures there and not the source code. I am getting the model programmatically and maybe the "deep analysis" is enabled by default.

how do I set the discovery options programmatically, such as deep analysis?

Thank you very much,


Re: How to extract the complete source code, not only the signatures [message #1059781 is a reply to message #1059763] Tue, 21 May 2013 14:54 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
The actual name of the parameter is DEEP_ANALYSIS.
For passing such as parameter, you should take a look to the API from the org.eclipse.modisco.infra.discovery.core/org.eclipse.modisco.infra.discovery.core plugins (and also the org.eclipse.modisco.java.discoverer plugin for the Java model discoverer implementation).


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Re: How to extract the complete source code, not only the signatures [message #1059828 is a reply to message #1059781] Tue, 21 May 2013 18:54 Go to previous messageGo to next message
Edson Filho is currently offline Edson FilhoFriend
Messages: 6
Registered: April 2013
Junior Member
Hugo,

When I create the discoverer from a Java Project, it has the setDeepAnalysis method, but I need to set it for DiscoverJavaModelFromLibrary, which doesn't have this method. Is possible to retrieve the source code of a discoverer from a library (DiscoverJavaModelFromLibrary)?

DiscoverJavaModelFromJavaProject discoverer = new DiscoverJavaModelFromJavaProject();
discoverer.setDeepAnalysis(true);


Re: How to extract the complete source code, not only the signatures [message #1059888 is a reply to message #1059828] Wed, 22 May 2013 06:41 Go to previous message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 674
Registered: July 2009
Senior Member
Hello,

Unfortunately, deep analysis is not currently supported from .class files (only from sources).
The LibraryReader class used by the DiscoverJavaModelFromLibrary class stays at the type and member level.
However, for possible future enhancements, you can propose a feature request by submitting a MoDisco bug onto the Eclipse Bugzilla (and you may even attach a corresponding patch).


--------------------------------------------------------
Hugo Bruneliere, PhD
NaoMod team (IMT Atlantique & LS2N-CNRS)
Nantes - France
--------------------------------------------------------
Previous Topic:From .jar to any model
Next Topic:MoDisco Tool - Relational Database Information Discovery Tool
Goto Forum:
  


Current Time: Thu Apr 18 01:02:18 GMT 2024

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

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

Back to the top