Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » [GMF] Create Undefined ??
[GMF] Create Undefined ?? [message #764560] Mon, 12 December 2011 12:35 Go to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
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 #765114 is a reply to message #764560] Tue, 13 December 2011 12:56 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
no ideas ?
Re: [GMF] Create Undefined ?? [message #765121 is a reply to message #765114] Tue, 13 December 2011 13:07 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael IstriaFriend
Messages: 865
Registered: July 2009
Location: Grenoble, France
Senior Member

Could it be that bug? https://bugs.eclipse.org/bugs/show_bug.cgi?id=354467

--
http://mickaelistria.wordpress.com
http://twitter.com/#!/mickaelistria
http://www.petalslink.com
Re: [GMF] Create Undefined ?? [message #765122 is a reply to message #765114] Tue, 13 December 2011 13:10 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
Yes maybe it is.

It doesnt matter what i set in plugin.properties.
The value changes sometimes, and sometimes not Sad

Can you plz give me a short explanation on how to fix this ?

[Updated on: Tue, 13 December 2011 13:34]

Report message to a moderator

Re: [GMF] Create Undefined ?? [message #765152 is a reply to message #765122] Tue, 13 December 2011 14:17 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
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

Re: [GMF] Create Undefined ?? [message #765190 is a reply to message #765152] Tue, 13 December 2011 15:30 Go to previous messageGo to next message
Snakebyte Missing name is currently offline Snakebyte Missing nameFriend
Messages: 130
Registered: November 2011
Senior Member
Works. Great. Thank you.
But if i do that, i lose my validate option under Edit ? Why ?

Do you know where i can set these pictures as well ?

[Updated on: Tue, 13 December 2011 15:33]

Report message to a moderator

Re: [GMF] Create Undefined ?? [message #766230 is a reply to message #765190] Thu, 15 December 2011 12:20 Go to previous messageGo to next message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

did you try to exchange the files for creation in your .edit plugin generated by EMF. It should be named something like xxx.edit/icons/full/ctool16. It is possible that you might not have validation enabled set to true. Use this line in your transformation

genDiagram := gmfgenModel.objectsOfType(GenDiagram)->asOrderedSet()->first();
genDiagram.validationEnabled := true;


Outside of main you should of course define gendiagram as follows:

property genDiagram : GenDiagram = null;


Ralph
Re: [GMF] Create Undefined ?? [message #766233 is a reply to message #766230] Thu, 15 December 2011 12:22 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
An example for my whole transformation can be found here:

http://code.google.com/a/eclipselabs.org/p/melanie/source/browse/de.uni_mannheim.informatik.swt.gmf.plm/transformations/postRec.qvto

[Updated on: Thu, 15 December 2011 15:27]

Report message to a moderator

Previous Topic:How to set properties of an object automatically when it is created in the diagram?
Next Topic:OCL Validation Error not correctly raised!!! (Update: Please delete this post!)
Goto Forum:
  


Current Time: Fri Apr 26 13:54:40 GMT 2024

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

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

Back to the top