Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Enabling Selection
Enabling Selection [message #171395] Tue, 05 February 2008 09:24 Go to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 177
Registered: July 2009
Location: Canada
Senior Member
Hi all,
In order to understand Compartments, I have been following this tutorial -
http://www.eclipse.org/gmf/tutorial/viewlets/tutorial2.html. Now I have an
editor that enables me to add objects in a compartment, but I cannot
select those objects/EditParts and move them.

Here are some questions as a GMF newbie:
1. Do I need to add some code in the generated code?
2. Is there a need to make some extra configurations (not mentioned in the
tutorial), in the .gmfgraph model, in order to enable selection?
3. Any threads where similar query is raised and solved?

Looking forward for pointers.
Thanks in Advance.

Neeraj.


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Enabling Selection [message #171414 is a reply to message #171395] Tue, 05 February 2008 09:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Neeraj schrieb:
> Here are some questions as a GMF newbie:
> 1. Do I need to add some code in the generated code?
> 2. Is there a need to make some extra configurations (not mentioned in the
> tutorial), in the .gmfgraph model, in order to enable selection?
> 3. Any threads where similar query is raised and solved?
>
> Looking forward for pointers.
> Thanks in Advance.

1. no
2. You have to edit the "ListLayout" property of your "Gen Compartment
<NameOfCompartment>" in the generated XXX.gmfgen file. It's default true
if the element that could be inserted into your compartment doesn't
contain references with containment set to true. So simply set the
ListLayout to false, regenerate your diagram code and you can move and
select the items.

hth
Jens
Re: Enabling Selection [message #171418 is a reply to message #171414] Tue, 05 February 2008 10:21 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 177
Registered: July 2009
Location: Canada
Senior Member
Thanks Jens,
Things are working fine now. Is the solution you provided documented
somewhere?


Jens Krause wrote:

> Neeraj schrieb:
>> Here are some questions as a GMF newbie:
>> 1. Do I need to add some code in the generated code?
>> 2. Is there a need to make some extra configurations (not mentioned in the
>> tutorial), in the .gmfgraph model, in order to enable selection?
>> 3. Any threads where similar query is raised and solved?
>>
>> Looking forward for pointers.
>> Thanks in Advance.

> 1. no
> 2. You have to edit the "ListLayout" property of your "Gen Compartment
> <NameOfCompartment>" in the generated XXX.gmfgen file. It's default true
> if the element that could be inserted into your compartment doesn't
> contain references with containment set to true. So simply set the
> ListLayout to false, regenerate your diagram code and you can move and
> select the items.

> hth
> Jens


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Enabling Selection [message #171422 is a reply to message #171418] Tue, 05 February 2008 11:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: snej_NO-SPAM_.esuark.de

Neeraj schrieb:
> Thanks Jens,
> Things are working fine now. Is the solution you provided documented
> somewhere?

Well, i don't know if it is documented, but if you read a little bit in
this newsgroup you get it very fast. Every third question is about
compartments and why the items couldn't be moved :).

Helpfull is also the eclipse wiki about gmf:
<http://wiki.eclipse.org/GMF_Documentation>

also the questions and answers from this newsgroup are helpfull:
<http://wiki.eclipse.org/GMF_Newsgroup_Q_and_A>

Jens
Re: Enabling Selection [message #171425 is a reply to message #171422] Tue, 05 February 2008 11:35 Go to previous messageGo to next message
Richard Gronback is currently offline Richard GronbackFriend
Messages: 605
Registered: July 2009
Senior Member
Note as well that the viewlets for the tutorial are a bit outdated.
Following the text of the tutorial should yield the best results.

- Rich


On 2/5/08 6:21 AM, in article fo9gr0$ll5$1@build.eclipse.org, "Jens Krause"
<snej_NO-SPAM_@esuark.de> wrote:

> Neeraj schrieb:
>> Thanks Jens,
>> Things are working fine now. Is the solution you provided documented
>> somewhere?
>
> Well, i don't know if it is documented, but if you read a little bit in
> this newsgroup you get it very fast. Every third question is about
> compartments and why the items couldn't be moved :).
>
> Helpfull is also the eclipse wiki about gmf:
> <http://wiki.eclipse.org/GMF_Documentation>
>
> also the questions and answers from this newsgroup are helpfull:
> <http://wiki.eclipse.org/GMF_Newsgroup_Q_and_A>
>
> Jens
Re: Enabling Selection [message #171428 is a reply to message #171422] Tue, 05 February 2008 11:47 Go to previous messageGo to next message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 177
Registered: July 2009
Location: Canada
Senior Member
Thanks again. :)

Jens Krause wrote:

> Neeraj schrieb:
>> Thanks Jens,
>> Things are working fine now. Is the solution you provided documented
>> somewhere?

> Well, i don't know if it is documented, but if you read a little bit in
> this newsgroup you get it very fast. Every third question is about
> compartments and why the items couldn't be moved :).

> Helpfull is also the eclipse wiki about gmf:
> <http://wiki.eclipse.org/GMF_Documentation>

> also the questions and answers from this newsgroup are helpfull:
> <http://wiki.eclipse.org/GMF_Newsgroup_Q_and_A>

> Jens


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Re: Enabling Selection [message #171430 is a reply to message #171425] Tue, 05 February 2008 11:51 Go to previous message
Neeraj Bhusare is currently offline Neeraj BhusareFriend
Messages: 177
Registered: July 2009
Location: Canada
Senior Member
Thanks Rich. :)

Richard Gronback wrote:

> Note as well that the viewlets for the tutorial are a bit outdated.
> Following the text of the tutorial should yield the best results.

> - Rich


> On 2/5/08 6:21 AM, in article fo9gr0$ll5$1@build.eclipse.org, "Jens Krause"
> <snej_NO-SPAM_@esuark.de> wrote:

>> Neeraj schrieb:
>>> Thanks Jens,
>>> Things are working fine now. Is the solution you provided documented
>>> somewhere?
>>
>> Well, i don't know if it is documented, but if you read a little bit in
>> this newsgroup you get it very fast. Every third question is about
>> compartments and why the items couldn't be moved :).
>>
>> Helpfull is also the eclipse wiki about gmf:
>> <http://wiki.eclipse.org/GMF_Documentation>
>>
>> also the questions and answers from this newsgroup are helpfull:
>> <http://wiki.eclipse.org/GMF_Newsgroup_Q_and_A>
>>
>> Jens


Twitter : @NeerajBhusare
Blog : https://nbhusare.github.io/
Best regards, Neeraj
Previous Topic:NonResizableEditPolicy how to change Color
Next Topic:How to avoid connecting two or more links to the same point...
Goto Forum:
  


Current Time: Thu Apr 25 23:23:54 GMT 2024

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

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

Back to the top