|
|
|
Re: Selection order in tree-based EMF editors [message #417666 is a reply to message #417661] |
Thu, 20 March 2008 18:46 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Tom,
I can imagine that tracking selection history might be a way... But what
if some code sets the selection explicitly? You wouldn't know the order
in that case perhaps?
Tom Schindl wrote:
> I know this limitation and I once had code for JFace which took track
> of the selection order for StructuredSelection but it never made it
> into the code base. What I'm trying to say is that it is possible
> (although it is a bit of work) to track the selections yourself and
> order it in the way they occur.
>
> Tom
>
> Ed Merks schrieb:
>> Dimitrios,
>>
>> Since the underlying controls have no mechanism for determining this
>> order it seems to me that the selection can only be used to prime the
>> information used to start the process and at the start, you'll need
>> to allow the user to reorder the selection so that each object is in
>> the proper role for the operation.
>>
>>
>> Dimitrios Kolovos wrote:
>>> Hi,
>>>
>>> I’ve come across the following issue. If I select two elements in
>>> the ECore reflective editor (e.g. EClass A and EClass B) the
>>> StructuredSelection returned by the tree viewer is {A, B}. Now, if I
>>> select the same elements but in a reverse order (i.e. first EClass B
>>> and then EClass A) the StructuredSelection is still {A,B}.
>>>
>>> I’ve found
>>> ( http://dev.eclipse.org/newslists/news.eclipse.tools/msg03503 .html)
>>> that this is not an EMF problem but a known SWT limitation. However,
>>> there are cases where the selection order is important in EMF
>>> editors (e.g.
>>> http://epsilonblog.wordpress.com/2008/03/16/model-refactorin g-in-emf-editors/#comment-24).
>>> Any thoughts on a workaround for this?
>>>
>>> Cheers,
>>> Dimitrios
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04204 seconds