Community
Participate
Working Groups
Created attachment 179723 [details] contains: DiscoverKdmModelFromJavaModel: added a few lines see line 43 and line 73++. And TranslateJavaModelToKdm added attributes lines 55 and 56 and changed method line 103++ Hi, in my project I am using from the org.eclipse.gmt.modisco.java.actions package the class "DiscoverKdmModelFromJavaModel" directly and with it indirectly the class "TranslateJavaModelToKdm". Since I want to extend the transformation being used in kdmTranslater I needed a way to define the path to transformation. To do this I have extended the "DiscoverKdmModelFromJavaModel" class with a new parameter called: "PARAMETER_PATH_TO_TRANSFORMATION" which is passed to the kdmTranslater if it was set. To pass that path to transformation to the kdmTranslater I added to variables: private String pathToTransformation = ""; private String pathToTransformationDefault = "resources/transformations/javaToKdm.asm"; to the TranslateJavaModelToKdm class with their getters and setters. In addition I changed the method: "public Resource getKDMModelFromJavaModelWithCustomTransformation(final URI javaSourceModelUri, final URI kdmTargetModelUri) throws ATLCoreException" checking whether the pathToTransformation is not-null and not-empty and if resource can be found, otherwise using the pathToTransformationDefault set to the value it was before changing anything: "resources/transformations/javaToKdm.asm". Since this was done anyway I wanted to contribute this as a way to be able to extend the transformation mechanism. Since these are only minor changes I have done them directly in the code from svn and marked them with comments containing my name. Thank you for considering these extensions. Cheers Björn Tietjens
Hi Bjorn, thank you for proposing this new parameter for java to kdm discovery process. I will have a look and integrate this contribution as soon as possible. Fabien.
From a legal point of view, can you make the following confirmations on this bug : "(a) I, XXX, wrote 100% of the code of the conribution, and (b) I have the right to contribute the code to Eclipse ? (--> Typically, this means that your employer, if you have one, agrees to this contribution.) (c) I want to contribute this code under EPL"
(a) I, Björn Tietjens, wrote 100% of the code of the conribution, and (b) I have the right to contribute the code to Eclipse, since I created the code while working on my thesis for University. (c) I want to contribute this code under EPL
The contribution (less than 250 lines) has been commited into SVN. I complete the parameter management to accept URL kind of parameter (ex : "file//C:/MyPath/MyTransformation.asm"), additionaly to the relative kind (/resources/MyTransformation.asm"). Thank you again. Fabien.
Contribution integrated.