Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » GMF generate diagram code through ant scripts from gmfgen
GMF generate diagram code through ant scripts from gmfgen [message #1061347] Fri, 31 May 2013 10:03 Go to next message
Dan Tololoi is currently offline Dan TololoiFriend
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

Hi all,
Following to do the same as presented here
https://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.sphinx/tags/0.7.0M1/tools/org.eclipse.sphinx.gmfgen/ant/build.xml

I have the error
build.xml:136: java.lang.NoClassDefFoundError: org/eclipse/gmf/internal/common/migrate/ModelLoadHelper

this is the ant target
<target name="adjustGenModel">
<gmf.adjustgenmodel gmfgenPath="${gmfgen_trgt}" copyrightTextFile="${copyrightTextFile}" dynamicTemplates="${dynamicTemplates}" templateDirectory="${templateDirectory}"/>
</target>


The problem that I face is that the gmfgen passed through the URI will crash the new ModelLoadHelper


private Diagnostic loadGenModel(URI genModelURI) {
ResourceSet srcResSet = new ResourceSetImpl();
if (genModelURI != null && genModelURI.hasFragment()) {
srcResSet.getEObject(genModelURI, true);
}
// srcResSet.getPackageRegistry().put(GMFGenPackage.eNS_URI, GMFGenPackage.eINSTANCE);
srcResSet.getURIConverter().getURIMap().putAll(EcorePlugin.computePlatformURIMap());
ModelLoadHelper loadHelper = new ModelLoadHelper(srcResSet, genModelURI);
Object root = loadHelper.getContentsRoot();
System.out.println("Loaded root : " + root); //$NON-NLS-1$
if (root instanceof GenDiagram) {
genModel = ((GenDiagram) root).getEditorGen();
} else if (root instanceof GenEditorGenerator) {
genModel = (GenEditorGenerator) root;
}

if (genModel != null && genModel.getDomainGenModel() != null) {
genModel.getDomainGenModel().reconcile();
}
return loadHelper.getDiagnostics();
}


Maybe somebody has any clue why this is wrong
Re: GMF generate diagram code through ant scripts from gmfgen [message #1061363 is a reply to message #1061347] Fri, 31 May 2013 10:39 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 697
Registered: November 2009
Senior Member
Hi,

can you please upload your gmfgen model?

Ralph
Re: GMF generate diagram code through ant scripts from gmfgen [message #1061377 is a reply to message #1061363] Fri, 31 May 2013 11:38 Go to previous message
Dan Tololoi is currently offline Dan TololoiFriend
Messages: 33
Registered: September 2012
Location: Iasi, Romania
Member

Hi Ralph,
Could I send it to email?
Previous Topic:Example GeoShape Diagram Pallette
Next Topic:Connector Labels (Polyline Connection)
Goto Forum:
  


Current Time: Sat Nov 22 09:17:27 GMT 2014

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

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