Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Reorder elements on diagram, tree or table
Reorder elements on diagram, tree or table [message #1722181] Wed, 03 February 2016 09:28 Go to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 268
Registered: August 2013
Senior Member
Hi

Is it possible to reorder elements on diagram, tree or table editors?
Re: Reorder elements on diagram, tree or table [message #1722255 is a reply to message #1722181] Wed, 03 February 2016 15:37 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Denis,

Le 03/02/2016 10:29, Denis Nikiforov a écrit :
> Hi
>
> Is it possible to reorder elements on diagram, tree or table editors?

Sirius displays graphical elements from the order of their computation:
they are sorted by mapping and by the result of the semantic candidates
expression of their mapping.

So if you want to reorder some elements you will have to reorder the
corresponding semantic elements (from semantic tab of the properties
view, or tools or actions/menu).

Regards


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reorder elements on diagram, tree or table [message #1722308 is a reply to message #1722255] Thu, 04 February 2016 05:34 Go to previous messageGo to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 268
Registered: August 2013
Senior Member
In "Sample Ecore Model Editor" or "Sample Reflective Ecore Model Editor" one can reorder EClasses or EFeatures by drag'n'drop.

Is it possible to implement a similar functionality in tree or table view? I can't find a drag'n'drop tool for these views.
Re: Reorder elements on diagram, tree or table [message #1722482 is a reply to message #1722308] Fri, 05 February 2016 08:58 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Denis,

Le 04/02/2016 06:34, Denis Nikiforov a écrit :
> In "Sample Ecore Model Editor" or "Sample Reflective Ecore Model Editor"
> one can reorder EClasses or EFeatures by drag'n'drop.
>
> Is it possible to implement a similar functionality in tree or table
> view? I can't find a drag'n'drop tool for these views.

In the TreeDescription you have the possibility to use a drop tool, you
will not have the insertion feedback (line) between element, but you
could use this to place the dropped element before/after the target of
the drop.

There is no current way to this reorder from the Viewpoint Specification
Model but this could be an interesting idea.

Regards


--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reorder elements on diagram, tree or table [message #1722499 is a reply to message #1722482] Fri, 05 February 2016 09:56 Go to previous messageGo to next message
Denis Nikiforov is currently offline Denis NikiforovFriend
Messages: 268
Registered: August 2013
Senior Member
I've got it. Thanks! It seems that it will work for tree views! I can reorder by external java action.

Is it possible to handle drag'n'drop in table views? Maybe I can extend sirius programmatically?
Re: Reorder elements on diagram, tree or table [message #1725099 is a reply to message #1722499] Mon, 29 February 2016 18:18 Go to previous messageGo to next message
Axel Guckelsberger is currently offline Axel GuckelsbergerFriend
Messages: 347
Registered: July 2009
Senior Member
I am interested in reordering list elements in a diagram view.
Any way to implement this from outside, maybe by an additional edit part
policy?

Cheers,
Axel


Am 05.02.2016 um 10:56 schrieb Denis Nikiforov:
> I've got it. Thanks! It seems that it will work for tree views! I can
> reorder by external java action.
>
> Is it possible to handle drag'n'drop in table views? Maybe I can extend
> sirius programmatically?
Re: Reorder elements on diagram, tree or table [message #1725785 is a reply to message #1725099] Mon, 07 March 2016 15:50 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 554
Registered: July 2009
Senior Member
Le 29/02/2016 19:18, Axel Guckelsberger a écrit :
> I am interested in reordering list elements in a diagram view.
> Any way to implement this from outside, maybe by an additional edit part
> policy?

It's not possible directly (through the VSM) to react to graphical
reordering of list elements on diagrams, but you could probably define
"Popup Menus" (context menu items) on the list elements corresponding to
the "Move Up" and "Move Down" operations. Not as convenient as a
Drag'n'drop from user's point of view, but depending on the use case it
could be sufficient.

Otherwise you can override the edit part implementation and/or edit
policies used by Sirius for selected items with the standard GMF
extension point. See for example at [1] how UML Designer does it. If
you're familiar enough with GEF/GMF you may be able to provide a custom
"DragDropPolicy" doing what you need (not tested though).

Regards,
Pierre-Charles

[1]
https://github.com/ObeoNetwork/UML-Designer/blob/master/plugins%2Forg.obeonetwork.dsl.uml2.design%2Fplugin.xml#L93

--
Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Reorder elements on diagram, tree or table [message #1726676 is a reply to message #1725099] Tue, 15 March 2016 15:30 Go to previous message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi,

For diagram there is already a feature request [1].
For table we can do sorting by clicking on column header or line, see
SortColumnsByLineAction & SortLinesByColumnAction. But we don't have
drag'n drop feature in table, you can raise a feature request through
the Sirius bugzilla if you want.

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=478039

Best Regards.

Le 29/02/2016 19:18, Axel Guckelsberger a écrit :
> I am interested in reordering list elements in a diagram view.
> Any way to implement this from outside, maybe by an additional edit part
> policy?
>
> Cheers,
> Axel
>
>
> Am 05.02.2016 um 10:56 schrieb Denis Nikiforov:
>> I've got it. Thanks! It seems that it will work for tree views! I can
>> reorder by external java action.
>>
>> Is it possible to handle drag'n'drop in table views? Maybe I can extend
>> sirius programmatically?
>



--
Esteban Dugueperoux - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Edge on another Edge
Next Topic:Listen for changes on a diagram element
Goto Forum:
  


Current Time: Thu Jan 21 19:29:25 GMT 2021

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

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

Back to the top