[GMF] Create Undefined ?? [message #764560] |
Mon, 12 December 2011 12:35 |
Snakebyte Missing name Messages: 130 Registered: November 2011 |
Senior Member |
|
|
Hello everybody.
I already asked it in the forums of Epsilon, but i got the answer that it is more a GMF related question.
I created a Modell like that :
I have one object goal. This goal can reference more goals, but with 2 different relations.
When i now draw a link in canvas with the small rectangles at everynode (drag and drop)
i get 2 proposals.
I can "Create Undefined" and "Create Undefined".
This names appear in the title of the porperty view as well.
How i can change these names ?
The Epsilon Forum proposes to change this in plugin.properties file of xyz.diagram projekt.
I did that. But nothing changes. What im doing wrong ?
And can anybody tell me where i can change the picture as well ?
Here is the link of the other thread in epsilon forum:
http://www.eclipse.org/forums/index.php/t/265016/
Greetings
Snakebyte
[Updated on: Mon, 12 December 2011 12:37] Report message to a moderator
|
|
|
|
|
|
Re: [GMF] Create Undefined ?? [message #765152 is a reply to message #765122] |
Tue, 13 December 2011 14:17 |
Ralph Gerbig Messages: 702 Registered: November 2009 |
Senior Member |
|
|
Hi,
I did the following to fix this for my case.
In your plugin where you define the genmodel:
1) Create a folder called transformations
2) create a file called postRec.qvto
3) Place this content in the file
modeltype GMFGEN uses gmfgen('http://www.eclipse.org/gmf/2009/GenModel');
transformation postRec(inout gmfgenModel : GMFGEN);
main() {
--Fix the Create Undefined Bug 354467
gmfgenModel.objectsOfType(GenLink)->asOrderedSet()
->select(l | l.elementType.oclIsTypeOf(SpecializationType) and l.elementType.displayName = 'Undefined')->forEach(link)
{
link.elementType.displayName := link.modelFacet.oclAsTyp(FeatureLinkModelFacet).metaFeature.ecoreFeature.name.firstToUpper();
};
}
4) Delete your genmodel
5) Generate your genmodel but check on the last page of the wizzard "Extra in-place gmfgen transformation after a reconcile step"
6) Put the text box below: platform:/resource/plugin-id/transformations/postRec.qvto
7) Delete .properties file in generated plugin (Otherwise changes do not take effect)
8) Generate code from genmodel
This should fix your problem.
Ralph
[Updated on: Tue, 13 December 2011 14:17] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03964 seconds