Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Custom Figures & Two Figures for one EditPart
Custom Figures & Two Figures for one EditPart [message #381809] Sun, 03 February 2008 18:10 Go to next message
Eclipse User
Originally posted by: ogucuk.gmail.com

Hello all,

we have an EMF Model element "state" which is shown in our generated GMF
editor as a "node"

Now we want to implement a collapse/expand feature for this editor. So
we let the user select some nodes (stated), right-click on a button
'Collapse Selected Items' and we delete the selected figures.

After that we want to show a custom figure representing all deleted
nodes. So this custom figure is just another view for our model element
"state"

The user then should be able to click on that custom figure and
right-click on 'Expand' and the deleted nodes should come back again.
But we have not come so far because we even cannot assign this custom
figure to our StateEditPart. It seem there must be exactly one Figure
for one EditPart.

Is that true? How can we implement this "temporary custom figures" to
represent the collapsed element on our editor?


Every help will be greatly appreciated

Thanks in advance

Meryem
Re: Custom Figures & Two Figures for one EditPart [message #381821 is a reply to message #381809] Thu, 21 February 2008 08:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 25950
Registered: July 2009
Senior Member
Meryem,

It's best to ask about GMF on the GMF newsgroup which I've added to the
"to" list of the reply.


myName wrote:
> Hello all,
>
> we have an EMF Model element "state" which is shown in our generated
> GMF editor as a "node"
>
> Now we want to implement a collapse/expand feature for this editor. So
> we let the user select some nodes (stated), right-click on a button
> 'Collapse Selected Items' and we delete the selected figures.
>
> After that we want to show a custom figure representing all deleted
> nodes. So this custom figure is just another view for our model
> element "state"
>
> The user then should be able to click on that custom figure and
> right-click on 'Expand' and the deleted nodes should come back again.
> But we have not come so far because we even cannot assign this custom
> figure to our StateEditPart. It seem there must be exactly one Figure
> for one EditPart.
>
> Is that true? How can we implement this "temporary custom figures" to
> represent the collapsed element on our editor?
>
>
> Every help will be greatly appreciated
>
> Thanks in advance
>
> Meryem
Re: Custom Figures & Two Figures for one EditPart [message #381824 is a reply to message #381821] Thu, 21 February 2008 09:49 Go to previous message
Alexander Shatalin is currently offline Alexander Shatalin
Messages: 2928
Registered: July 2009
Senior Member
Hello Ed,

>> figure to our StateEditPart. It seem there must be exactly one Figure
>> for one EditPart.
>>
>> Is that true? How can we implement this "temporary custom figures" to
>> represent the collapsed element on our editor?
It's true. I suggest you to create two NodeMappings one for "expanded" element,
another one for "collapsed" and assign corresponding constraints to select
correct representation of your model element based on the information stored
in model.

-----------------
Alex Shatalin
Re: Custom Figures & Two Figures for one EditPart [message #606540 is a reply to message #381809] Thu, 21 February 2008 08:00 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25950
Registered: July 2009
Senior Member
Meryem,

It's best to ask about GMF on the GMF newsgroup which I've added to the
"to" list of the reply.


myName wrote:
> Hello all,
>
> we have an EMF Model element "state" which is shown in our generated
> GMF editor as a "node"
>
> Now we want to implement a collapse/expand feature for this editor. So
> we let the user select some nodes (stated), right-click on a button
> 'Collapse Selected Items' and we delete the selected figures.
>
> After that we want to show a custom figure representing all deleted
> nodes. So this custom figure is just another view for our model
> element "state"
>
> The user then should be able to click on that custom figure and
> right-click on 'Expand' and the deleted nodes should come back again.
> But we have not come so far because we even cannot assign this custom
> figure to our StateEditPart. It seem there must be exactly one Figure
> for one EditPart.
>
> Is that true? How can we implement this "temporary custom figures" to
> represent the collapsed element on our editor?
>
>
> Every help will be greatly appreciated
>
> Thanks in advance
>
> Meryem
Re: Custom Figures & Two Figures for one EditPart [message #606543 is a reply to message #381821] Thu, 21 February 2008 09:49 Go to previous message
Alexander Shatalin is currently offline Alexander Shatalin
Messages: 2928
Registered: July 2009
Senior Member
Hello Ed,

>> figure to our StateEditPart. It seem there must be exactly one Figure
>> for one EditPart.
>>
>> Is that true? How can we implement this "temporary custom figures" to
>> represent the collapsed element on our editor?
It's true. I suggest you to create two NodeMappings one for "expanded" element,
another one for "collapsed" and assign corresponding constraints to select
correct representation of your model element based on the information stored
in model.

-----------------
Alex Shatalin
Previous Topic:[Announcement] Release of XMF 2.0 under EPL
Next Topic:[GMF|OAW] imcomplete gmfmap metamodel
Goto Forum:
  


Current Time: Fri Aug 01 20:38:21 EDT 2014

Powered by FUDForum. Page generated in 0.01576 seconds