Home » Modeling » GMF (Graphical Modeling Framework) » Generating diagram code in build process
Generating diagram code in build process [message #230926] |
Thu, 21 May 2009 05:16  |
Eclipse User |
|
|
|
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
|
|
|
Re: Generating diagram code in build process [message #231031 is a reply to message #230926] |
Thu, 21 May 2009 22:35   |
Eclipse User |
|
|
|
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
|
|
|
Re: Generating diagram code in build process [message #235692 is a reply to message #231031] |
Thu, 09 July 2009 02:54   |
Eclipse User |
|
|
|
Originally posted by: aurelien.pupier.esial.net
Hi Peter,
I tried your plug-in with
<gmf:GenerateDiagramCode gmfgenPath=" ${buildDirectory}/plugins/org.ow2.jasmine.design.diagram/mod el/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.desi gn.diagram/model/jasmine.gmfgen
at ca.ecliptical.gmf.ant.GenerateDiagramCodeOperation.run(Gener ateDiagramCodeOperation.java:60)
at ca.ecliptical.gmf.ant.tasks.GenerateDiagramCode.execute(Gene rateDiagramCode.java:53)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.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.ja va:1329)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTarge ts(SingleCheckExecutor.java:38)
at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor .executeTargets(EclipseSingleCheckExecutor.java:30)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.j ava:288)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.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.ja va:1329)
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTarge ts(SingleCheckExecutor.java:38)
at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor .executeTargets(EclipseSingleCheckExecutor.java:30)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
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.j ava:288)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(Dispatch Utils.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.ja va:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298 )
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(D efaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.exe cuteTargets(EclipseDefaultExecutor.java:32)
at org.apache.tools.ant.Project.executeTargets(Project.java:118 1)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:623)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(Inte rnalAntRunner.java:495)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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(Eclips eAppHandle.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(EclipseS tarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.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(Res ource.java:317)
at org.eclipse.core.internal.resources.Resource.checkAccessible (Resource.java:194)
at org.eclipse.core.internal.resources.File.getContents(File.ja va:296)
at org.eclipse.core.internal.resources.File.getContents(File.ja va:287)
at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl$WorkbenchHelper.createPlatformResourceInputStream(Pla tformResourceURIHandlerImpl.java:204)
at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandl erImpl.createInputStream(PlatformResourceURIHandlerImpl.java :448)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterIm pl.createInputStream(ExtensibleURIConverterImpl.java:301)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1212)
at org.eclipse.gmf.internal.common.migrate.ModelLoadHelper.inte rnalLoad(ModelLoadHelper.java:139)
at org.eclipse.gmf.internal.common.migrate.ModelLoadHelper.<init >(ModelLoadHelper.java:130)
at ca.ecliptical.gmf.ant.GenerateDiagramCodeOperation.loadGenMo del(GenerateDiagramCodeOperation.java:110)
at ca.ecliptical.gmf.ant.GenerateDiagramCodeOperation.run(Gener ateDiagramCodeOperation.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
|
|
|
Re: Generating diagram code in build process [message #236196 is a reply to message #231031] |
Wed, 15 July 2009 06:33   |
Eclipse User |
|
|
|
Hi Peter,
I want to use your plugin but, in the nwe Eclipse release 'Galileo' when
I try to get it using Update Site Manager I obtain the next error message:
"Cannot complete the install because one or more required items could
not be found.
Software being installed: Ant Support for GMF 1.0.0.20090407141548
(ca.ecliptical.gmf.ant.feature.group 1.0.0.20090407141548)
Missing requirement: Ant Support for GMF 1.0.0.20090407141548
(ca.ecliptical.gmf.ant.feature.group 1.0.0.20090407141548) requires
'org.eclipse.gmf.codegen [2.1.1,2.2.0)' but it could not be found"
But I have already intalled the "org.eclipse.gmf.codegen
2.2.0.v20090529-1238" sice it is de defualt version when you download
Galileo.
Is there any incompatibility between your plugin and Galileo? Why
Galileo cannot resolve the dependency correctly?
I am very concerned about using your plging because I think that it is a
really useful plugin.
On the other hand, your plugin takes a .gmfgen file and generates the
diagram code and, as I said before, that's a very interesting job but
also, do you now if there is an Ant task to cover the step of having
..ecore, .gmfgrah, .gmftool, .gmfmap models, generate the .gmfgen file in
order to use it like the input of your plugin?
Thanks!
Peter Nehrer wrote:
> 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
|
|
| |
Re: Generating diagram code in build process [message #236320 is a reply to message #236196] |
Thu, 16 July 2009 23:50   |
Eclipse User |
|
|
|
Miguel,
I uploaded an updated version of the plugin that will work with Galileo.
You'll find it at the same update site url as before.
--Peter
Miguel Angel Garcia de Dios wrote:
> Hi Peter,
> I want to use your plugin but, in the nwe Eclipse release 'Galileo' when
> I try to get it using Update Site Manager I obtain the next error message:
>
> "Cannot complete the install because one or more required items could
> not be found.
> Software being installed: Ant Support for GMF 1.0.0.20090407141548
> (ca.ecliptical.gmf.ant.feature.group 1.0.0.20090407141548)
> Missing requirement: Ant Support for GMF 1.0.0.20090407141548
> (ca.ecliptical.gmf.ant.feature.group 1.0.0.20090407141548) requires
> 'org.eclipse.gmf.codegen [2.1.1,2.2.0)' but it could not be found"
>
> But I have already intalled the "org.eclipse.gmf.codegen
> 2.2.0.v20090529-1238" sice it is de defualt version when you download
> Galileo.
>
> Is there any incompatibility between your plugin and Galileo? Why
> Galileo cannot resolve the dependency correctly?
> I am very concerned about using your plging because I think that it is a
> really useful plugin.
>
> On the other hand, your plugin takes a .gmfgen file and generates the
> diagram code and, as I said before, that's a very interesting job but
> also, do you now if there is an Ant task to cover the step of having
> .ecore, .gmfgrah, .gmftool, .gmfmap models, generate the .gmfgen file in
> order to use it like the input of your plugin?
>
> Thanks!
>
> Peter Nehrer wrote:
>> 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
|
|
| | | | | | |
Re: Generating diagram code in build process [message #237020 is a reply to message #236960] |
Tue, 21 July 2009 02:49  |
Eclipse User |
|
|
|
Originally posted by: aurelien.pupier.esial.net
Peter Nehrer a écrit :
>> and I also tried to set <arg value="--launcher.XXMaxPermSize 512m" />
>> in my build.xml in <java classname="org.eclipse.equinox.launcher.Main"
>> fork="true"
>> failonerror="true" errorproperty="build.stderr">
>
>
> This has to be a jvmarg, not an arg.
Oh gosh!! thanks
I was thinking that it will used the values set in eclipse.ini but it seems not...
Thanks again a lot
|
|
|
Goto Forum:
Current Time: Wed Jul 23 11:04:07 EDT 2025
Powered by FUDForum. Page generated in 0.07976 seconds
|