[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Generating diagram code in build process

Hi Peter,

I tried your plug-in with

<gmf:GenerateDiagramCode gmfgenPath="${buildDirectory}/plugins/org.ow2.jasmine.design.diagram/model/jasmine.gmfgen"/>

but it can found the gmfgen file :

org.eclipse.core.runtime.CoreException: Model loaded with errors. uri=platform:/resource/D:/build/plugins/org.ow2.jasmine.design.diagram/model/jasmine.gmfgen
	at ca.ecliptical.gmf.ant.GenerateDiagramCodeOperation.run(GenerateDiagramCodeOperation.java:60)
	at ca.ecliptical.gmf.ant.tasks.GenerateDiagramCode.execute(GenerateDiagramCode.java:53)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623)
	at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:495)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.ant.core.AntRunner.run(AntRunner.java:513)
	at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/build/plugins/org.ow2.jasmine.design.diagram/model/jasmine.gmfgen' does not exist.
	at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:317)
	at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:194)
	at org.eclipse.core.internal.resources.File.getContents(File.java:296)
	at org.eclipse.core.internal.resources.File.getContents(File.java:287)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:204)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:448)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:301)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1212)
	at org.eclipse.gmf.internal.common.migrate.ModelLoadHelper.internalLoad(ModelLoadHelper.java:139)
	at org.eclipse.gmf.internal.common.migrate.ModelLoadHelper.<init>(ModelLoadHelper.java:130)
	at ca.ecliptical.gmf.ant.GenerateDiagramCodeOperation.loadGenModel(GenerateDiagramCodeOperation.java:110)
	at ca.ecliptical.gmf.ant.GenerateDiagramCodeOperation.run(GenerateDiagramCodeOperation.java:58)
	... 62 more
Contains: Resource '/build/plugins/org.ow2.jasmine.design.diagram/model/jasmine.gmfgen' does not exist.


The file exists I'm sure. I'm on Win XP.

Any idea?


Peter Nehrer a écrit :
Hi Chris,

I actually put together a small plugin with an Ant task that run GMF's codegen. E.g.,

<project name="Generate Diagram Code" default="run" xmlns:gmf="http://ecliptical.ca/gmf/ant";>
<target name="run">
<gmf:GenerateDiagramCode gmfgenPath="org.eclipse.emf.edit/model/Tree.gmfgen"/>
</target>
</project>


Other supported attributes are ignoreLoadErrors and ignoreValidationErrors (both boolean).

I haven't had the time to publicize it in any way but you can get it from my update site at http://www.eclipticalsoftware.com/updates/site.xml (under the GMF category). Version 0.9.0 is for Europa and version 1.0.0 is for Ganymede and later. Hope it works for ya.

--Peter

chris wrote:
Hi,

right now, I'm working on setting up a build process for my (partly
GMF-based) tooling. One step of that process should be to generate the
according diagram plug-ins (which I can do since all customizations are
either in a separate plug-in, implemented through dynamic templates, or
done using the GMFTools stuff (see http://code.google.com/p/gmftools/).

I've found two related threads in this newsgroup ("generating diagram
code from a headless build", "Generating Diagram Code from an Ant
Script") which seem to imply that this is not possible. But it's hard to
believe that nobody out there is doing this :-)

So, if my assumption is correct, can anybody share his/her experiences
with that problem? Preferably incorporating the GMFTools process...

Thanks in advance,
Chris