EclipseCon 2007 GMF Best Practices [message #191441] |
Fri, 06 June 2008 15:40 |
Eclipse User |
|
|
|
Originally posted by: zippo29.hotmail.fr
Hi !
The use cas i am trying to implement is the loading of an image into a
node. An employee has an image and i want to allow the user to change the
image of the employee.
I read a solution proposed in the newsgroup but i am searching for another
way to do it. I found a similar comportmentin the prensentation at
EclipseCon 07 by Alex Shatalin and Artem Tikhomirov adapting. According
to the presentation we can create an editpolicy to display an InputDialog
to enter the attribute text when clicking on an attribute.
I am trying hard with the source code available in the slides (i know it
is incomplete) but i am missing something.
If someone can help me with this i will be thankfull.
|
|
|
|
Re: EclipseCon 2007 GMF Best Practices [message #191718 is a reply to message #191655] |
Mon, 09 June 2008 13:05 |
Eclipse User |
|
|
|
Originally posted by: zippo29.hotmail.fr
hi Alex!
I think my problem is that I do not understand the command mechanism well
enough. but, in this case precisely I wrote the doExecuteWithResult()
method but i am bugging when writing the constructor of my xxxCommand
class.
In your example (EclipseCon) you don't precise the EditingDomain as a
parameter of the class constructor. I suppose you get it from some object.
For me, when invoking the super constructor, from where can I get it ?
There is also an interogation about the label ? Is it some kind of message
the user can read ? Do I have to define it in the Messages class ?
Thanks for your interest and hope this is clearer.
|
|
|
|
Re: EclipseCon 2007 GMF Best Practices [message #192017 is a reply to message #191744] |
Wed, 11 June 2008 07:32 |
Eclipse User |
|
|
|
Originally posted by: zippo29.hotmail.fr
Thx Alex,
I managed to write and add the EditPolicy. The problem is that I can not
double-clik on an item in the diagram if it does not have a semantic
meaning.
In my example, my employee does not have any attribute representing his
photo. I only add it as a figure. So it doe not appear in the genmodel and
then I can not add the custom behavior to the specific zone where the
photo appears.
I think I have to use the way described by Thomas Beyer in the newsgroup.
|
|
|
Powered by
FUDForum. Page generated in 0.03873 seconds