Home » Modeling » GMF (Graphical Modeling Framework) » Missing files after generating the diagram code
Missing files after generating the diagram code [message #62868] |
Mon, 16 October 2006 04:08  |
Eclipse User |
|
|
|
I am tring to define a simple app using GMF. I defined the .ecore,
..mgfgraph, .gmftool and .gmfmap file and generated the .gmfgen.
When I then have GMF generate the diagram code, it puts the result into
a new project (which I guess is working as designed) but the generated
source contains imports and references to classes that are apparently
supposed to be generated but are not (and hence yield compile errors).
(to make things more explicit I renamed the actual name of my project
here to be "foo" and its path "bar")
in class bar.part.FooDiagramEditorUtil:
import bar.DocumentRoot;
import bar.FooFactory;
import bar.<OneOfThe TypesIDefinedInEcore>
in class bar.partDiagramEditorPlugin and class
bar.providers.FooElementTypes:
import bar.providers.FooItemProvidersAdapterFactory;
.... and some more.
What am I missing here?
Just to see what's happening I also tried the "Generate Figures-Plugin"
operation on .gmfgraph (I have no idea whether that's required or not. I
just tried hoping that this might generate the missing files) and got
this interesting error:
------------------------
....
!ENTRY org.eclipse.gmf.common 4 0 2006-10-16 10:01:58.702
!MESSAGE Unexpected state came across, have no idea how to deal with
that
!STACK 0
org.eclipse.gmf.common.UnexpectedBehaviourException:
java.lang.IllegalStateException: Don't support accessors for
compartments yet
at
org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:162)
at
org.eclipse.gmf.internal.common.codegen.GeneratorBase.doRun( GeneratorBase.java:408)
at
org.eclipse.gmf.internal.common.codegen.GeneratorBase.run(Ge neratorBase.java:69)
at
org.eclipse.gmf.internal.graphdef.codegen.ui.GeneratePluginA ction$2.run(GeneratePluginAction.java:83)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Caused by: java.lang.IllegalStateException: Don't support accessors for
compartments yet
at
org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.ha ndleCompartments(CanvasProcessor.java:113)
at
org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.go (CanvasProcessor.java:64)
at
org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.generat eTopLevelFigures(StandaloneGenerator.java:178)
at
org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:160)
... 4 more
------------------------
So I guess, I'm doing something wrong here, but I have no clue what. Any
hints?
Michael
|
|
| |
Re: Missing files after generating the diagram code [message #63325 is a reply to message #62868] |
Mon, 16 October 2006 08:33   |
Eclipse User |
|
|
|
Hi,
Please check your gmfgraph model. It is not obvious, but it seems that you
have compartment that does not reference any figures.
I am going to correct the error message to explicitly state the problem in
this case.
Regards,
Michael
"Michael Moser" <mmo@zurich.ibm.com> wrote in message
news:egvel5$amc$1@utils.eclipse.org...
>I am tring to define a simple app using GMF. I defined the .ecore,
>.mgfgraph, .gmftool and .gmfmap file and generated the .gmfgen.
> When I then have GMF generate the diagram code, it puts the result into a
> new project (which I guess is working as designed) but the generated
> source contains imports and references to classes that are apparently
> supposed to be generated but are not (and hence yield compile errors).
>
> (to make things more explicit I renamed the actual name of my project here
> to be "foo" and its path "bar")
>
> in class bar.part.FooDiagramEditorUtil:
> import bar.DocumentRoot;
> import bar.FooFactory;
> import bar.<OneOfThe TypesIDefinedInEcore>
>
> in class bar.partDiagramEditorPlugin and class
> bar.providers.FooElementTypes:
> import bar.providers.FooItemProvidersAdapterFactory;
>
> ... and some more.
>
> What am I missing here?
>
>
> Just to see what's happening I also tried the "Generate Figures-Plugin"
> operation on .gmfgraph (I have no idea whether that's required or not. I
> just tried hoping that this might generate the missing files) and got this
> interesting error:
> ------------------------
> ...
> !ENTRY org.eclipse.gmf.common 4 0 2006-10-16 10:01:58.702
> !MESSAGE Unexpected state came across, have no idea how to deal with that
> !STACK 0
> org.eclipse.gmf.common.UnexpectedBehaviourException:
> java.lang.IllegalStateException: Don't support accessors for compartments
> yet
> at
> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:162)
> at
> org.eclipse.gmf.internal.common.codegen.GeneratorBase.doRun( GeneratorBase.java:408)
> at
> org.eclipse.gmf.internal.common.codegen.GeneratorBase.run(Ge neratorBase.java:69)
> at
> org.eclipse.gmf.internal.graphdef.codegen.ui.GeneratePluginA ction$2.run(GeneratePluginAction.java:83)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
> Caused by: java.lang.IllegalStateException: Don't support accessors for
> compartments yet
> at
> org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.ha ndleCompartments(CanvasProcessor.java:113)
> at
> org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.go (CanvasProcessor.java:64)
> at
> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.generat eTopLevelFigures(StandaloneGenerator.java:178)
> at
> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:160)
> ... 4 more
>
> ------------------------
>
> So I guess, I'm doing something wrong here, but I have no clue what. Any
> hints?
>
> Michael
>
|
|
| |
Re: Missing files after generating the diagram code [message #63416 is a reply to message #63325] |
Mon, 16 October 2006 08:50   |
Eclipse User |
|
|
|
Hi,
I've submitted https://bugs.eclipse.org/bugs/show_bug.cgi?id=161042.
Regards,
Michael
"Michael Golubev" <michael.golubev@borland.com> wrote in message
news:egvu71$45a$1@utils.eclipse.org...
> Hi,
>
> Please check your gmfgraph model. It is not obvious, but it seems that you
> have compartment that does not reference any figures.
>
> I am going to correct the error message to explicitly state the problem in
> this case.
>
> Regards,
> Michael
>
>
> "Michael Moser" <mmo@zurich.ibm.com> wrote in message
> news:egvel5$amc$1@utils.eclipse.org...
>>I am tring to define a simple app using GMF. I defined the .ecore,
>>.mgfgraph, .gmftool and .gmfmap file and generated the .gmfgen.
>> When I then have GMF generate the diagram code, it puts the result into a
>> new project (which I guess is working as designed) but the generated
>> source contains imports and references to classes that are apparently
>> supposed to be generated but are not (and hence yield compile errors).
>>
>> (to make things more explicit I renamed the actual name of my project
>> here to be "foo" and its path "bar")
>>
>> in class bar.part.FooDiagramEditorUtil:
>> import bar.DocumentRoot;
>> import bar.FooFactory;
>> import bar.<OneOfThe TypesIDefinedInEcore>
>>
>> in class bar.partDiagramEditorPlugin and class
>> bar.providers.FooElementTypes:
>> import bar.providers.FooItemProvidersAdapterFactory;
>>
>> ... and some more.
>>
>> What am I missing here?
>>
>>
>> Just to see what's happening I also tried the "Generate Figures-Plugin"
>> operation on .gmfgraph (I have no idea whether that's required or not. I
>> just tried hoping that this might generate the missing files) and got
>> this interesting error:
>> ------------------------
>> ...
>> !ENTRY org.eclipse.gmf.common 4 0 2006-10-16 10:01:58.702
>> !MESSAGE Unexpected state came across, have no idea how to deal with that
>> !STACK 0
>> org.eclipse.gmf.common.UnexpectedBehaviourException:
>> java.lang.IllegalStateException: Don't support accessors for compartments
>> yet
>> at
>> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:162)
>> at
>> org.eclipse.gmf.internal.common.codegen.GeneratorBase.doRun( GeneratorBase.java:408)
>> at
>> org.eclipse.gmf.internal.common.codegen.GeneratorBase.run(Ge neratorBase.java:69)
>> at
>> org.eclipse.gmf.internal.graphdef.codegen.ui.GeneratePluginA ction$2.run(GeneratePluginAction.java:83)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
>> Caused by: java.lang.IllegalStateException: Don't support accessors for
>> compartments yet
>> at
>> org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.ha ndleCompartments(CanvasProcessor.java:113)
>> at
>> org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.go (CanvasProcessor.java:64)
>> at
>> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.generat eTopLevelFigures(StandaloneGenerator.java:178)
>> at
>> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:160)
>> ... 4 more
>>
>> ------------------------
>>
>> So I guess, I'm doing something wrong here, but I have no clue what. Any
>> hints?
>>
>> Michael
>>
>
>
|
|
|
Re: Missing files after generating the diagram code [message #63439 is a reply to message #63348] |
Mon, 16 October 2006 10:19   |
Eclipse User |
|
|
|
Michael Moser a écrit :
> Hi Guillaume, thanks for responding!
>
> "Guillaume Gauffre" <gauffre@irit.fr> wrote in message
> news:egvjlo$c12$1@utils.eclipse.org...
>> It seems you forget to generate "Edit code" by right clicking on the
>> .genmodel file.
>
> How do I do this? According to my EMF documentation one should be able
> to select the .ecore file and then issue Generator => "Generate Edit
> Code". However, in my case, ALL entries in the Generator menu are grayed
> out. What could be the reason for this??? Probably that's why these
> files are not generated and are then missing in the end...
The options "Generate ..." are also in grayed out for me if I'm in the
Package Explorer but if I open the .genmodel file, by right-cliking on
the first entrie in the editor, I have all command.
Maybe there is a difference between our plugins, I'm using the Callisto
edition, but I don't think so !
I hope it will help you, and I'm sorry for my poor english expression.
Guillaume
>
> I originally generated the .ecore file from an .xsd file, but to my
> understanding that shouldn't be a problem. In the contrary, converting
> between these different model representations is what all this EMF stuff
> is about (or at least so I thought...).
>
> Any idea, why all these Generator options are "dead"?
>
>> And about your second problem, I have no idea but maybe you can check
>> your models before the genereation with the "validate" option
>
> Pardon my ignorance - but where can *that* to be found? I could not find
> *any* menu or context menu option with that or even some vaguely similar
> name? On none of the .ecore or .gmf* files... Getting doubts re. my
> eclipse configuration I then checked but all plugins report "The feature
> is configured properly". No error or warning whatsoever...
>
> Where/how does one do these validations?
>
> Michael
>
|
|
|
Re: Missing files after generating the diagram code [message #63460 is a reply to message #63325] |
Mon, 16 October 2006 10:53  |
Eclipse User |
|
|
|
Actually, the initial reason for all that frenzy was, that the
XSD-to-EMF wizard creates a wrongly named project (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=161053). It thus can't
find its files and so I couldn't create the model's .edit and .editor
code (and me - being new to all this GMF stuff - hadn't realized that
this was absolutely required for the editor to later compile and work).
That wrongly named project probably was also the reason, why all the
options in menu "Generator" were grayed out.
Playing some tricks on the editor I was finally able to place all files
into properly named directories and then generate all required files.
And now I don't get any errors during generation and compilation any
more (not that my graphical editor works as expected, yet, but that's a
different story...).
Thanks again to Guillaume, who's remark about .genmmodel and the .edit
files brought me onto the right track!
Michael
"Michael Golubev" <michael.golubev@borland.com> wrote in message
news:egvu71$45a$1@utils.eclipse.org...
> Hi,
>
> Please check your gmfgraph model. It is not obvious, but it seems that
> you have compartment that does not reference any figures.
>
> I am going to correct the error message to explicitly state the
> problem in this case.
>
> Regards,
> Michael
>
>
> "Michael Moser" <mmo@zurich.ibm.com> wrote in message
> news:egvel5$amc$1@utils.eclipse.org...
>>I am tring to define a simple app using GMF. I defined the .ecore,
>>.mgfgraph, .gmftool and .gmfmap file and generated the .gmfgen.
>> When I then have GMF generate the diagram code, it puts the result
>> into a new project (which I guess is working as designed) but the
>> generated source contains imports and references to classes that are
>> apparently supposed to be generated but are not (and hence yield
>> compile errors).
>>
>> (to make things more explicit I renamed the actual name of my project
>> here to be "foo" and its path "bar")
>>
>> in class bar.part.FooDiagramEditorUtil:
>> import bar.DocumentRoot;
>> import bar.FooFactory;
>> import bar.<OneOfThe TypesIDefinedInEcore>
>>
>> in class bar.partDiagramEditorPlugin and class
>> bar.providers.FooElementTypes:
>> import bar.providers.FooItemProvidersAdapterFactory;
>>
>> ... and some more.
>>
>> What am I missing here?
>>
>>
>> Just to see what's happening I also tried the "Generate
>> Figures-Plugin" operation on .gmfgraph (I have no idea whether that's
>> required or not. I just tried hoping that this might generate the
>> missing files) and got this interesting error:
>> ------------------------
>> ...
>> !ENTRY org.eclipse.gmf.common 4 0 2006-10-16 10:01:58.702
>> !MESSAGE Unexpected state came across, have no idea how to deal with
>> that
>> !STACK 0
>> org.eclipse.gmf.common.UnexpectedBehaviourException:
>> java.lang.IllegalStateException: Don't support accessors for
>> compartments yet
>> at
>> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:162)
>> at
>> org.eclipse.gmf.internal.common.codegen.GeneratorBase.doRun( GeneratorBase.java:408)
>> at
>> org.eclipse.gmf.internal.common.codegen.GeneratorBase.run(Ge neratorBase.java:69)
>> at
>> org.eclipse.gmf.internal.graphdef.codegen.ui.GeneratePluginA ction$2.run(GeneratePluginAction.java:83)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
>> Caused by: java.lang.IllegalStateException: Don't support accessors
>> for compartments yet
>> at
>> org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.ha ndleCompartments(CanvasProcessor.java:113)
>> at
>> org.eclipse.gmf.internal.graphdef.codegen.CanvasProcessor.go (CanvasProcessor.java:64)
>> at
>> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.generat eTopLevelFigures(StandaloneGenerator.java:178)
>> at
>> org.eclipse.gmf.graphdef.codegen.StandaloneGenerator.customR un(StandaloneGenerator.java:160)
>> ... 4 more
>>
>> ------------------------
>>
>> So I guess, I'm doing something wrong here, but I have no clue what.
>> Any hints?
>>
>> Michael
>>
>
>
|
|
|
Goto Forum:
Current Time: Tue May 06 19:42:17 EDT 2025
Powered by FUDForum. Page generated in 0.02855 seconds
|