Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Problem: ESelectionService for master-detail-parts(I intend to pass selection information from a master-part (e.g. by a ListViewer) to a detail-part (tab, realized on a PartStack using a PartDescriptor). This does not work as expected.)
Problem: ESelectionService for master-detail-parts [message #1076378] Wed, 31 July 2013 09:26 Go to next message
Stephan Lück is currently offline Stephan LückFriend
Messages: 2
Registered: July 2013
Junior Member
Hi all,

I stumbled into the following problem:

Trying to realize a master-detail view, I put a Part with a ListViewer on it (the master) and a PartStack (the detail) into a PartSashContainer.
To display multiple instances of one part as detail, I use a PartDescriptor.

Each double click on the list on the master should open a detail-tab (if not opened yet( or bring it to top (if already opened).
Each simple selection should just bring the tab to top if it exists.

This all works fine.

To display some selection information in the detail tab, I use an IDoubleClickListener to open a part or bring it to top. In this listener, I call


on the injected service.

The detail part consumes this selection to display the information in the part:


This works as expected for the first double-click only.

What goes wrong:
When I click on further list entries, the old information of the first click is displayed. I would expect the service injected into the part displaying the information of the new selection.

I would like to provide some monitored bahaviour:

- Each detail part that is created from the PartDescriptor gets a new ESelectionService instance injected. Is this correct? I would expect that this service is singleton within at least a particular context (e.g. window)
- I debugged to check whether setting and consuming the selection is done in a correct order. I found out that it is and - surprise - when launching the application in debug mode, everything works as expected!!!

Strange, isn't it?

Does anybody of you know what my problem is?

Please let me know if you need some further information (code, screenshots etc.).

Thanks a lot in advance,



Re: Problem: ESelectionService for master-detail-parts [message #1086421 is a reply to message #1076378] Wed, 14 August 2013 07:25 Go to previous message
Stephan Lück is currently offline Stephan LückFriend
Messages: 2
Registered: July 2013
Junior Member
I found the solution to this problem:

The focus has to be set on one UI-component on the part (I think that this a known problem):

public void onFocus() {
//set the focus

If the component that is intended to be focused is a Label, the focus has to be set on the parent of the Label.
Previous Topic:User assistance neglect
Next Topic:Missing SetChanged notification
Goto Forum:

Current Time: Wed May 23 17:04:42 GMT 2018

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

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

Back to the top