Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » MoDisco » Can I create KDM model from only part of Java project?
Can I create KDM model from only part of Java project? [message #1090559] Tue, 20 August 2013 10:09 Go to next message
Matti Nauha is currently offline Matti NauhaFriend
Messages: 1
Registered: August 2013
Junior Member
I'm trying to reverse engineer a big legacy project with MoDisco eclipse plugin. Tried doing a Java to KDM model discovery, but it failed because Java heap space got filled. So i increased the amount of memory, but now discovery process seems to be getting stuck at "Saving discovered model".

If i go and select single Java package from my project, only option i get for discovery is "KDM source" and that one doesn't contain any information about class relations etc.

Is there a way to create a KDM model from only some small part of Java project? Or is there some way to improve KDM discovery performance, when dealing with huge project?
Re: Can I create KDM model from only part of Java project? [message #1091515 is a reply to message #1090559] Wed, 21 August 2013 16:08 Go to previous messageGo to next message
Hugo Bruneliere is currently offline Hugo BruneliereFriend
Messages: 650
Registered: July 2009
Senior Member
Hello,

A solution is to work in two steps:

  1. Discover the Java model by selecting only the packages you need (cf. the corresponding parameters in the launch configuration of the Java discoverer);
  2. Transform this reduced Java model into the KDM model.

I hope this helps.

Best regards,


------------------------------------------
Hugo Bruneliere - R&D Engineer
AtlanMod research team (Inria, EMN & LINA)
Ecole des Mines de Nantes
Nantes - France
------------------------------------------
Re: Can I create KDM model from only part of Java project? [message #1713311 is a reply to message #1091515] Tue, 03 November 2015 09:58 Go to previous messageGo to next message
Salwa Alzahmi is currently offline Salwa AlzahmiFriend
Messages: 37
Registered: June 2013
Member
Hi,

I always run in java heap problem.
Would you please explain further how I can specified the packages that I want to consider in the discovery when I run the discovery task pragmatically .


thankx
Re: Can I create KDM model from only part of Java project? [message #1713378 is a reply to message #1713311] Tue, 03 November 2015 16:25 Go to previous message
Fabien Giquel is currently offline Fabien GiquelFriend
Messages: 139
Registered: July 2009
Senior Member
Hello,

you should try to proceed in two steps as Hugo suggests : java source -> java reduced model -> kdm model.

The parameter to set for Java discoverery step is the one named "INCLUDED_ELEMENTS_REGEX" in ui. In the Java discoverer api, it can be set with the .setIncludedElementsRegEx(String regex) method.

The regex parameter allows to indicate a regular expression on qualified names for elements (types & packages) to be included during analysis.

For instance, if you want to select only types from pkga.pkgb.pkgc, you sets the value to pkga\.pkgb\.pkgc\..*

(there is also one opposite parameter EXCLUDED_ELEMENTS_REGEX)

I hope it will be helpful.
regards,
Fabien.


----------------------------------------------------
Fabien GIQUEL
R&D Engineer
Mia-Software
4, rue du Ch√Ęteau de l'Eraudiere
44324 NANTES CEDEX 03
----------------------------------------------------
Previous Topic:Querying an Ecore Instance
Next Topic:Support for Cobol (Copybook) ?
Goto Forum:
  


Current Time: Fri May 27 00:31:18 GMT 2016

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

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