Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [EEF] Selecting wrapped item providers in the tree
[EEF] Selecting wrapped item providers in the tree [message #822547] Fri, 16 March 2012 23:01 Go to next message
Olivier Labrosse is currently offline Olivier LabrosseFriend
Messages: 49
Registered: November 2011
Member
Hi,

Our EEF editor makes use of wrapping in order to display the same EObjects under different branches of the tree.

Our first implementation had the problem of never displaying anything in the Details pane when selecting wrapped item providers. To resolve this, we made use of a custom TreeViewer where getSelection() is overridden and unwraps the selection unless we're in the middle of a preservingSelection() execution (using a custom flag to determine this).

This has been working great... until now, as we're noticing side-effects: drag and drop of wrapped items is buggy due to the unwrapped selection found in the event, which makes it impossible to match the selection (or "collection" as it is called in the command) to the wrapped children of our transient item providers. Impossible unless we extend DragAndDropCommand and override getChildren() to make sure it unwraps the children accordingly.

Is this the right way to go? I have a feeling I'm missing something, and I'm hoping someone can give me pointers in the case I'm off-track.

Thanks in advance for your support!

-Olivier

[Updated on: Mon, 19 March 2012 16:18]

Report message to a moderator

Re: [EEF] Selecting wrapped item providers in the tree [message #830314 is a reply to message #822547] Tue, 27 March 2012 13:18 Go to previous messageGo to next message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
hi olivier,

The EEF editor is re-using a lot from the basic EMF editor, we just
enhance the property display of the selected objetcs.

what you are facing seems more related to EMF generally, i let other
people on this forums to help you.

You can try to do the same ( displaying same eobjects on different
branches ) just with the default EMF editor, and see what happens.

then we can try to help to integrate smoothly your developments in the
EEF editor.


Le 17/03/2012 00:01, Olivier Labrosse a écrit :
> Hi,
>
> Our EEF editor makes use of wrapping in order to display the same
> EObjects under different branches of the tree.
>
> Our first implementation had the problem of never displaying anything in
> the Details pane when selecting wrapped item providers. To resolve this,
> we made use of a custom TreeViewer where getSelection() is overridden
> and unwraps the selection unless we're in the middle of a
> preservingSelection() execution (using a custom flag to determine this).
>
> This has been working great until now, as we're noticing side-effects:
> drag and drop of wrapped items is buggy due to the unwrapped selection
> found in the event, which makes it impossible to match the selection (or
> "collection" as it is called in the command) to the wrapped children of
> our transient item providers. Impossible unless we extend
> DragAndDropCommand and override getChildren() to make sure it unwraps
> the children accordingly.
>
> Is this the right way to go? I have a feeling I'm missing something, and
> I'm hoping someone can give me pointers in the case I'm off-track.
>
> Thanks in advance for your support!
>
> -Olivier


--
Cheers,

Stéphane Bouchet, OBEO
Re: [EEF] Selecting wrapped item providers in the tree [message #830419 is a reply to message #830314] Tue, 27 March 2012 15:47 Go to previous messageGo to next message
Olivier Labrosse is currently offline Olivier LabrosseFriend
Messages: 49
Registered: November 2011
Member
Thank you Stephane for your feedback.

You just reminded me of something I should have mentioned before: I don't believe it is normal to have to customize the TreeViewer to unwrap items for the EEFDetailsPage.

Having said that, I just now tried removing my TreeViewer customization and instead overriding some of the EEFDetailsPage code, and it fixed the problem I had with drag & drop. No more pre-unwrapping by the TreeViewer, which means I'm correctly dragging DelegatingWrapperItemProvider instances.

I will now post a bug report in Bugzilla with notes on how I fixed it.

Thanks again!

-Olivier

Stephane Bouchet wrote on Tue, 27 March 2012 09:18
hi olivier,

The EEF editor is re-using a lot from the basic EMF editor, we just
enhance the property display of the selected objetcs.

what you are facing seems more related to EMF generally, i let other
people on this forums to help you.

You can try to do the same ( displaying same eobjects on different
branches ) just with the default EMF editor, and see what happens.

then we can try to help to integrate smoothly your developments in the
EEF editor.


Le 17/03/2012 00:01, Olivier Labrosse a écrit :
> Hi,
>
> Our EEF editor makes use of wrapping in order to display the same
> EObjects under different branches of the tree.
>
> Our first implementation had the problem of never displaying anything in
> the Details pane when selecting wrapped item providers. To resolve this,
> we made use of a custom TreeViewer where getSelection() is overridden
> and unwraps the selection unless we're in the middle of a
> preservingSelection() execution (using a custom flag to determine this).
>
> This has been working great until now, as we're noticing side-effects:
> drag and drop of wrapped items is buggy due to the unwrapped selection
> found in the event, which makes it impossible to match the selection (or
> "collection" as it is called in the command) to the wrapped children of
> our transient item providers. Impossible unless we extend
> DragAndDropCommand and override getChildren() to make sure it unwraps
> the children accordingly.
>
> Is this the right way to go? I have a feeling I'm missing something, and
> I'm hoping someone can give me pointers in the case I'm off-track.
>
> Thanks in advance for your support!
>
> -Olivier


--
Cheers,

Stéphane Bouchet, OBEO

Re: [EEF] Selecting wrapped item providers in the tree [message #830429 is a reply to message #830419] Tue, 27 March 2012 16:05 Go to previous messageGo to next message
Olivier Labrosse is currently offline Olivier LabrosseFriend
Messages: 49
Registered: November 2011
Member
For future reference, the bug report ID is 375440.

Sorry I can't post a direct link, there's a requirement of 25 messages posted before we can post links.
Re: [EEF] Selecting wrapped item providers in the tree [message #830948 is a reply to message #830429] Wed, 28 March 2012 08:56 Go to previous message
Stephane Bouchet is currently offline Stephane BouchetFriend
Messages: 280
Registered: July 2009
Senior Member
Le 27/03/2012 18:05, Olivier Labrosse a écrit :
> Sorry I can't post a direct link, there's a requirement of 25 messages
> posted before we can post links.

no problem for that, i also follow the bugzilla's new bugs for EEF :)

--
Cheers,

Stéphane Bouchet, OBEO
Previous Topic:[EEF] Multiple Views for a Property Edition Element
Next Topic:[EEF] Master-Detail with subtypes
Goto Forum:
  


Current Time: Thu Apr 25 11:29:30 GMT 2024

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

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

Back to the top