Home » Modeling » Epsilon » [EugEnia] using phantom nodes and custom figures
[EugEnia] using phantom nodes and custom figures [message #645177] |
Wed, 15 December 2010 19:20 |
|
Hi,
I've read the articles http:// www.eclipse.org/gmt/epsilon/doc/articles/eugenia-phantom-nod es/ and http:// www.eclipse.org/gmt/epsilon/doc/articles/eugenia-nodes-with- images/.
Both phantom Nodes and images on the diagram are working fine individually, but if i try to combine both techniques I get some errors in my diagram-code:
Description Resource Path Location Type
Can only iterate over an array or an instance of java.lang.Iterable FeatureModelDiagramUpdater.java /de.tgt.featureModel.represantation.diagram/src/featureModel/diagram/part line 66 Java Problem
Description Resource Path Location Type
The method getNode_2003SemanticChildren(View) is undefined for the type FeatureModelDiagramUpdater NodeCanonicalEditPolicy.java /de.tgt.featureModel.represantation.diagram/src/featureModel/diagram/edit/policies line 64 Java Problem
Description Resource Path Location Type
The method getRootAsset_2001SemanticChildren(View) is undefined for the type FeatureModelDiagramUpdater RootAssetCanonicalEditPolicy.java /de.tgt.featureModel.represantation.diagram/src/featureModel/diagram/edit/policies line 64 Java Problem
Here is my .emf I create my GMF-diagram from:
@namespace(uri="http://featureModel/1.0", prefix="featureModel")
@gmf(foo="bar")
package featureModel;
@gmf.diagram(foo="bar")
class FeatureModel {
val RootAsset[1] root;
}
@gmf.node(figure="figures.RootAssetImage", label.icon="false", label="name")
class RootAsset {
attr String[1] name;
@gmf.link(target.decoration="arrow", style="dash", tool.name="Connection")
val Node[*] node;
}
@gmf.node(figure="figures.NodeImage",label.icon="false",label="name",phantom="true")
class Node {
attr String[1] name;
}
So my questions are:
-Is there anything I do wrong in it?
-Has anyone ever combined phantom nodes and images and/or could give me a sample .emf?
Thanks in advance
With best regards
David
|
|
|
Re: [EugEnia] using phantom nodes and custom figures [message #645212 is a reply to message #645177] |
Wed, 15 December 2010 22:53 |
Dimitrios Kolovos Messages: 1776 Registered: July 2009 |
Senior Member |
|
|
Hi David,
Interestingly enough, this appears to be working fine with the version
of GMF that ships with Eclipse 3.5.1 but not with the version that ships
with 3.6... I suspect it's a regression in GMF. Could you please attach
the .ecore, .genmodel and .gmf* files generated by EuGENia to a bug
report for GMF in the bugzilla and also post the link to the GMF
newsgroup so that the developers there can investigate?
Cheers,
Dimitris
On 15/12/2010 19:20, David wrote:
> Here is my .emf I create my GMF-diagram from:
> @namespace(uri="http://featureModel/1.0", prefix="featureModel")
> @gmf(foo="bar")
> package featureModel;
>
> @gmf.diagram(foo="bar")
> class FeatureModel {
> val RootAsset[1] root;
> }
>
>
> @gmf.node(figure="figures.RootAssetImage", label.icon="false",
> label="name")
> class RootAsset {
> attr String[1] name;
> @gmf.link(target.decoration="arrow", style="dash",
> tool.name="Connection")
> val Node[*] node;
> }
>
> @gmf.node(figure="figures.NodeImage",label.icon="false",label= "name",phantom="true")
>
> class Node {
> attr String[1] name;
> }
>
|
|
|
Re: [EugEnia] using phantom nodes and custom figures [message #645247 is a reply to message #645177] |
Thu, 16 December 2010 09:06 |
|
Hi Dimitris,
thanks a lot for that hint, now it runs perfectly (under eclipse 3.5.1). It is in no way caused by the use of costume ImageFigures, as I thought at first.
Bug 332705 is reported, never done that before, so if there is any further information I should mention, don't hesitate to tell me . I have only attached my .emf file as the rest is created automatically anyway.
Cheers,
David
[Updated on: Thu, 16 December 2010 09:10] Report message to a moderator
|
|
|
Re: [EugEnia] using phantom nodes and custom figures [message #645676 is a reply to message #645177] |
Sun, 19 December 2010 19:00 |
Mark Tippetts Messages: 25 Registered: July 2009 |
Junior Member |
|
|
Hey David,
This is definitely a problem with the new GMF templates. I've had a similar problem, which I was able to fix by following the advice in this thread from the GMF forum: http://www.google.com/url?sa=t&source=web&cd=3&v ed=0CCoQFjAC&url=http%3A%2F%2Fwww.eclipse.org%2Fforums%2 Findex.php%3Ft%3Dmsg%26goto%3D559031%26S%3De1d2fd695324b1516 5c218166ddf15e5&ei=Y0MOTeKcMcL-8AbW39TYDQ&usg=AFQjCN EYlZQ3aNtCMDm1Vmqn9xC4lx984A&sig2=nvrzr-hSi51JvJiZK2CwFA
The latest (Helios) GMF release seems to have introduced a number of issues. Shortcuts are badly broken as well. I'm currently trying to figure out how to work around that, but so far with very mixed results. On the bright side, the troubles seem to be with the templates, rather than the runtime. I think these problems haven't been more widely reported because most GMF power-users seem to have highly customized templates, presumably based on earlier versions.
As a work-around, I'm going to try using the old templates with the new runtime, by setting gmfgen to use dynamic templates. In Helios, there's a plugin named org.eclipse.gmf.templates.legacy. Hopefully, that's the place to start. I'll report back here if I have any luck.
GMF is so complex, it makes me feel like a member of a cargo cult. Have you tried swinging a dead chicken over it?
Regards,
Mark
|
|
|
Goto Forum:
Current Time: Fri Mar 29 13:46:32 GMT 2024
Powered by FUDForum. Page generated in 0.02599 seconds
|