Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] generating dawn genmodel([CDO] generating dawn genmodel)
[CDO] generating dawn genmodel [message #638791] Fri, 12 November 2010 15:28 Go to next message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
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 #638867 is a reply to message #638791] Fri, 12 November 2010 19:35 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
Hi Ronald,

could you provide the complete stack trace? This could make it easier to
judge what happens. ;)

But one question in advance:

Are you trying the generate the extension for a tree-based EMF editor or
for a GMF editor?

Cheers,

Martin

Am 12.11.2010 16:28, schrieb Ronald Krijgsheld:
> 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 #638869 is a reply to message #638867] Fri, 12 November 2010 20:20 Go to previous messageGo to next message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
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.

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 Smile

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 #638988 is a reply to message #638869] Sun, 14 November 2010 13:11 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
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 #639023 is a reply to message #638988] Sun, 14 November 2010 20:33 Go to previous messageGo to next message
Ronald Krijgsheld is currently offline Ronald KrijgsheldFriend
Messages: 41
Registered: November 2010
Member
Martin,

Thanks, I wil try it this week (probably monday/tuesday)

Ronald
Re: [CDO] generating dawn genmodel [message #639049 is a reply to message #638988] Mon, 15 November 2010 06:05 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6447
Registered: July 2009
Senior Member
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 09:56 Go to previous message
Martin Fluegge is currently offline Martin FlueggeFriend
Messages: 141
Registered: July 2009
Senior Member
>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
Previous Topic:Re: [Teneo/Hibernate] "javax.persistence" and bundles from elver.org update site
Next Topic:Is there a reason that there isn't an EMFObservableValueEditingSupport class?
Goto Forum:
  


Current Time: Tue Oct 22 18:53:00 GMT 2019

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

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

Back to the top