Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » can't generate file in another project
can't generate file in another project [message #570717] Tue, 14 July 2009 11:35
St is currently offline StFriend
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="#&#10;#Sun Jul 12 09:48:20 CEST
2009&#10;isMetamodelFileBased=false&#10;name=model&a mp;#10;readOnLoad=true&#10;storeOnDisposal=true&#10; aliases=model&#10;metamodelUri=http\://www.eclipse.org/emf/2002/Ecore&#10 ;type=EMF&#10;modelFile=/sfDoctrine-1.1.2/model/sfDoctri ne.ecore&#10;expand=true&#10;metamodelFile=&#10; "/>
</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 :-)
Previous Topic:Euginia: Synchronize GMF Gen Model produce an Error
Next Topic:can't generate file in another project
Goto Forum:
  


Current Time: Thu Apr 25 20:38:04 GMT 2024

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

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

Back to the top