can't generate file in another project [message #570717] |
Tue, 14 July 2009 11:35 |
St Messages: 77 Registered: July 2009 |
Member |
|
|
Hi,
I'm trying to generate files in another eclipse project.
I have two projects, one named "meta-modeling-tools"(1), the other named
"sfDoctrine-1.1.2"(2).
In the first there is an egl program, in the second, there is an ecore
model.
I have coded an egl program that create a basic directory structure for
all epackages and eclasses inside the ecore model to create "places" where
to put "epsilon" programs (wizards, etc) and such.
At this point I can't make my egl program generating files in another
project, from project 1 to project 2.
Here is the egl program :
-----------------------------
[%
TemplateFactory.setOutputRoot('/sfDoctrine-1.1.2/');
for( p in EPackage.allInstances() )
{
p.createEpsilonToolsDirectoryStructure();
}
operation EPackage createEpsilonToolsDirectoryStructure() : null
{
var t : Template; t =
TemplateFactory.load('./createEpsilonTools/createEpsilonBasi cDirectory.egl');
t.populate('p', self);
t.process();
t.store(self.getFile());
}
operation EPackage getDirectory() : String
{
var ret: String;
if(self.eSuperPackage.isDefined()){
ret = self.eSuperPackage.getDirectory() + '/';
}
ret = ret + self.name + '/';
return ret;
}
operation EPackage getFile() : String
{
return self.getDirectory() + '.' + self.name;
}
%]
----------------------------
the loaded template contains simply a [%=p.name%]
the launch file :
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration
type=" org.epsilon.egl.eclipse.dt.launching.EglLaunchConfigurationD elegate ">
<booleanAttribute key="appendToFile" value="false"/>
<intAttribute key="generateTo" value="1"/>
<listAttribute key="models">
<listEntry value="# #Sun Jul 12 09:48:20 CEST
2009 isMetamodelFileBased=false name=model&a mp;#10;readOnLoad=true storeOnDisposal=true aliases=model metamodelUri=http\://www.eclipse.org/emf/2002/Ecore
 ;type=EMF modelFile=/sfDoctrine-1.1.2/model/sfDoctri ne.ecore expand=true metamodelFile= "/>
</listAttribute>
<stringAttribute key="outputFilePath" value=""/>
<stringAttribute key="source"
value=" /meta-modeling-tools/src/tools/EPackage/createEpsilonTools.e gl "/>
</launchConfiguration>
Then I tried to copy/paste the launcher in the project 2 but still not
working.
I have tried with "setOuputRoot('./src-gen/tools') but generate things in
the project 1 (where the egl file resides).
So how can I do to generate files from one project to another ?
Is this possible ? If not, why ?
Thanks :-)
|
|
|
Powered by
FUDForum. Page generated in 0.03545 seconds