Skip to main content



      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 08:52 Go to next message
Eclipse UserFriend

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 09:47 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: How to extract the complete source code, not only the signatures [message #1059763 is a reply to message #1059745] Tue, 21 May 2013 10:31 Go to previous messageGo to next message
Eclipse UserFriend
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 10:54 Go to previous messageGo to next message
Eclipse UserFriend
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).
Re: How to extract the complete source code, not only the signatures [message #1059828 is a reply to message #1059781] Tue, 21 May 2013 14:54 Go to previous messageGo to next message
Eclipse UserFriend
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 02:41 Go to previous message
Eclipse UserFriend
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).
Previous Topic:From .jar to any model
Next Topic:MoDisco Tool - Relational Database Information Discovery Tool
Goto Forum:
  


Current Time: Tue May 20 22:40:09 EDT 2025

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

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

Back to the top