[CDO] generating dawn genmodel [message #638791] |
Fri, 12 November 2010 10:28  |
Eclipse User |
|
|
|
Hi,
I try to generate a .dawngenmodel from an ecore genmodel. But the action leads to a FileNotFoundException. The file not found is the file the action is supposed to generate.
If I look at the dawn code in
GenerateDawnGenModelAction.java:205 it tries to load the resource the following way:
resourceSet.getResource(uri, true);
which looks ok (as far as I understand the code).
ideas?
- Ronald
|
|
|
|
|
Re: [CDO] generating dawn genmodel [message #638988 is a reply to message #638869] |
Sun, 14 November 2010 08:11   |
Eclipse User |
|
|
|
Hi Ronald,
comments below.
Am 12.11.2010 21:20, schrieb Ronald Krijgsheld:
> Hi Martin,
>
> below the stacktrace.
>
> I'm not really sure if I understand your question on what I'm trying to
> generate. I simply right click on a genmodel to generate the
> corresponding dawngemodel. So, I suppose that can only generate a dawn
> genmodel for editor support. Later, we'll need a CDO enabled GMF editor
> or a CDO enabled Graphiti editor.
Not exactly. Dawn currently supports generating extensions for GMF
editors and EMF (tree-based) editors, although the latter is still work
in progress.
To gain the required information the Dawn GenModel decorates the other
generator models. So the Dawn GenModel can hold a reference to the EMF
genmodel (*.genmodel) and/or the GMF genmodel (*.gengmf).
To add the GMF related information the context menu on the *.gmfgen must
be used invoked whereas you must use the context menu entry in the
*genmodel to add the information for the tree-based editor. That's why I
asked what kind of editor extension you tried to generated.
I admit that this handling is not perfect yet. Soon, I am going to
create a wizard which will make the workflow a bit more understandable.
But however. There was indeed a bug in the creation procedure which is
now fixed. It should work with the next build. If not, please let me know.
Cheers,
Martin
> But first I just wanted to see what code is generated and how I need to
> change my existing code to make use of the generated dawn code. First
> things first :)
>
> Thanks,
>
> Ronald
>
>
>
>
>
> Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos
> ticWrappedException: java.io.FileNotFoundException:
> C:\projects\systemize\newsvn\pmw\trunk\com.cmic.pmw.foundati
> on\model\Foundation.dawngenmodel
> pecified)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe
> mandLoadException(ResourceSetImpl.java:315)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
> adHelper(ResourceSetImpl.java:274)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou
> rce(ResourceSetImpl.java:397)
> at org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenMode
> lAction.getDawnGenModelResource(GenerateDawnGenModelAction.j ava:205)
> at org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenMode
> lAction.access$3(GenerateDawnGenModelAction.java:201)
> at org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenMode
> lAction$1.run(GenerateDawnGenModelAction.java:80)
> at org.eclipse.jface.operation.ModalContext$ModalContextThread.
> run(ModalContext.java:121)
> Caused by: java.io.FileNotFoundException:
> C:\projects\systemize\newsvn\pmw\trunk\com.cmic.pmw.foundati
> on\model\Foundation.dawngenmodel (The system cannot find the file
> specified)
> at java.io.FileInputStream.open(Native Method)
> at java.io.FileInputStream.<init>(Unknown Source)
> at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.creat
> eInputStream(FileURIHandlerImpl.java:105)
> 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:1254)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
> ad(ResourceSetImpl.java:255)
> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
> adHelper(ResourceSetImpl.java:270)
> ... 5 more
>
|
|
|
|
Re: [CDO] generating dawn genmodel [message #639049 is a reply to message #638988] |
Mon, 15 November 2010 01:05   |
Eclipse User |
|
|
|
Am 14.11.2010 14:11, schrieb Martin Flügge:
> Hi Ronald,
>
> comments below.
>
> Am 12.11.2010 21:20, schrieb Ronald Krijgsheld:
>> Hi Martin,
>>
>> below the stacktrace.
>>
>> I'm not really sure if I understand your question on what I'm trying to
>> generate. I simply right click on a genmodel to generate the
>> corresponding dawngemodel. So, I suppose that can only generate a dawn
>> genmodel for editor support. Later, we'll need a CDO enabled GMF editor
>> or a CDO enabled Graphiti editor.
> Not exactly. Dawn currently supports generating extensions for GMF
> editors and EMF (tree-based) editors, although the latter is still work
> in progress.
>
> To gain the required information the Dawn GenModel decorates the other
> generator models. So the Dawn GenModel can hold a reference to the EMF
> genmodel (*.genmodel) and/or the GMF genmodel (*.gengmf).
I wonder if it's a good design to add dependencies on various third party technologies (GMF, Grafiti, ...) to a single Dawn plugin. Does that mean that a user who only wants to generate a CDO'ified EMF tree editor has to install GMF?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
> To add the GMF related information the context menu on the *.gmfgen must
> be used invoked whereas you must use the context menu entry in the
> *genmodel to add the information for the tree-based editor. That's why I
> asked what kind of editor extension you tried to generated.
>
> I admit that this handling is not perfect yet. Soon, I am going to
> create a wizard which will make the workflow a bit more understandable.
>
> But however. There was indeed a bug in the creation procedure which is
> now fixed. It should work with the next build. If not, please let me know.
>
> Cheers,
>
> Martin
>
>> But first I just wanted to see what code is generated and how I need to
>> change my existing code to make use of the generated dawn code. First
>> things first :)
>>
>> Thanks,
>>
>> Ronald
>>
>>
>>
>>
>>
>> Caused by: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos
>> ticWrappedException: java.io.FileNotFoundException:
>> C:\projects\systemize\newsvn\pmw\trunk\com.cmic.pmw.foundati
>> on\model\Foundation.dawngenmodel
>> pecified)
>> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDe
>> mandLoadException(ResourceSetImpl.java:315)
>> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
>> adHelper(ResourceSetImpl.java:274)
>> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou
>> rce(ResourceSetImpl.java:397)
>> at org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenMode
>> lAction.getDawnGenModelResource(GenerateDawnGenModelAction.j ava:205)
>> at org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenMode
>> lAction.access$3(GenerateDawnGenModelAction.java:201)
>> at org.eclipse.emf.cdo.dawn.codegen.actions.GenerateDawnGenMode
>> lAction$1.run(GenerateDawnGenModelAction.java:80)
>> at org.eclipse.jface.operation.ModalContext$ModalContextThread.
>> run(ModalContext.java:121)
>> Caused by: java.io.FileNotFoundException:
>> C:\projects\systemize\newsvn\pmw\trunk\com.cmic.pmw.foundati
>> on\model\Foundation.dawngenmodel (The system cannot find the file
>> specified)
>> at java.io.FileInputStream.open(Native Method)
>> at java.io.FileInputStream.<init>(Unknown Source)
>> at org.eclipse.emf.ecore.resource.impl.FileURIHandlerImpl.creat
>> eInputStream(FileURIHandlerImpl.java:105)
>> 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:1254)
>> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
>> ad(ResourceSetImpl.java:255)
>> at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo
>> adHelper(ResourceSetImpl.java:270)
>> ... 5 more
>>
|
|
|
Re: [CDO] generating dawn genmodel [message #639097 is a reply to message #639049] |
Mon, 15 November 2010 04:56  |
Eclipse User |
|
|
|
>I wonder if it's a good design to add dependencies on various third party technologies (GMF, Grafiti, ...) to a single Dawn plugin. Does that mean that a user who only wants to generate a CDO'ified EMF tree editor has to install GMF?
Currently, yes. But the integration of EMF is still in progress and I will use this integration to create a cleaner separation between the runtime/godegen core facilities and the other frameworks.
Cheers,
Martin
|
|
|
Powered by
FUDForum. Page generated in 0.05208 seconds