Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Dual Display - Global SelectionService
Dual Display - Global SelectionService [message #336051] Fri, 15 May 2009 10:45 Go to next message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
Hi there!

In order to provide dual display support for our RCP application, we are considering to use
two WorkbenchWindows that can be used arbitrarily by the user to place views in them (drag&drop
of views is not neccessary).

In order to pass selection events between the two windows, we plan to create a global selection
service that connects the WorkbenchWindow local selection services.

Are there any issues with this approach e.g. with regard to the command framework or any other parts
parts of the platform that are not apparent at a first glance?

Are there any alternatives to dual-display support with RCP that do not involve two workbenches?

Following possible solutions have been ruled out already:
* detached views are not powerful enough
* patches found at http://wiki.eclipse.org/index.php/Improve_multi-monitor_supp ort are not
obviously not maintained anymore
* we cannot wait for e4 ;)

Thnx for the help,

Marcel
Re: Dual Display - Global SelectionService [message #336084 is a reply to message #336051] Wed, 20 May 2009 17:32 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Well, where do you expect the global SelectionService to be used?

The workbench window level SelectionServices continually update on part
activation (within their respective windows), and that includes one of
the two workbench windows taking focus (it will reset that workbench
window selection without changing the other workbench window current
selection, but it will update the IEvaluationService currentState to be
tracking the selection of the new window that just took focus).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Dual Display - Global SelectionService [message #336207 is a reply to message #336084] Fri, 29 May 2009 08:31 Go to previous messageGo to next message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
Hi Paul,

thank you for your post! Answers and more questions below:

Paul Webster schrieb:
> Well, where do you expect the global SelectionService to be used?

The idea is that selections done in one of the WorbenchWindows are propagated
to the other WorkbenchWindows as well.

Example: If i have two WorkbenchWindows open and i select an object in a view displayed in one of
the WorkbenchWindows, i want:

* That selection listeners are informed about this selection change in both WorkbenchWindows.
* Command handlers to update their enabled state accordingly (thus enabling/disabling menu
contributions, buttons, etc.)

As said before, our current idea for a solution would be to connect the SelectionServices of all
open WorkbenchWindows, possibly by implementing a SelectionService with an application-global scope.

> The workbench window level SelectionServices continually update on part
> activation (within their respective windows), and that includes one of
> the two workbench windows taking focus (it will reset that workbench
> window selection without changing the other workbench window current
> selection, but it will update the IEvaluationService currentState to be
> tracking the selection of the new window that just took focus).
>
> PW

As far as i understand, propagating selection events between all open WorkbenchWindows would not
interfere with the Command FW?

Are there any other services or is there anything else in an RCP application that might be affected
unfavorably by this?

Greetings,

Marcel
Re: Dual Display - Global SelectionService [message #336224 is a reply to message #336207] Mon, 01 June 2009 13:27 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Marcel Hoetter wrote:
>
> The idea is that selections done in one of the WorbenchWindows are
> propagated
> to the other WorkbenchWindows as well.
>
> Example: If i have two WorkbenchWindows open and i select an object in a
> view displayed in one of
> the WorkbenchWindows, i want:
>
> * That selection listeners are informed about this selection change in
> both WorkbenchWindows.
> * Command handlers to update their enabled state accordingly (thus
> enabling/disabling menu
> contributions, buttons, etc.)

I think you might see unpredictable results. The current selection
service, org.eclipse.ui.ISelectionService, is specifically designed to
work only within one IWorkbenchWindow. For example, the listeners
include the IWorkbenchPart, which is only valid within the window. The
other windows can't really see that part.


> As far as i understand, propagating selection events between all open
> WorkbenchWindows would not
> interfere with the Command FW?


The command framework has a global application context that provides
"selection", so it already sees a global selection. But to provide
compatibility with the current Workbench Window behaviour, contributions
from org.eclipse.ui.menus are restricted from changing unless their
WorkbenchWindow is the active one.

But anything accessing the IEvaluationService directly will see the
global selection (unrestricted).

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Re: Dual Display - Global SelectionService [message #336264 is a reply to message #336224] Thu, 04 June 2009 12:25 Go to previous message
Marcel Hoetter is currently offline Marcel HoetterFriend
Messages: 28
Registered: July 2009
Junior Member
Paul Webster schrieb:
>
> I think you might see unpredictable results. The current selection
> service, org.eclipse.ui.ISelectionService, is specifically designed to
> work only within one IWorkbenchWindow. For example, the listeners
> include the IWorkbenchPart, which is only valid within the window. The
> other windows can't really see that part.

I suspected that this might be problematic. Hence this post to the newsgroup to get
more information about the principle feasibility. Looks like as if I have to test it, though.

Since we are a little short on time in our project, i would gladly abandon it if there was some
other way to implement dual/multi screen support. Does anything else come to your mind?

I have already seen other mulit-screen capable RCP applications. I wonder how these are handling
selections and the synchronization of the different windows.

Nontheless, thanks a lot for your answers.

Greetings,

Marcel
Previous Topic:Dynamic changes to a wizard page
Next Topic:ShowViewMenu and activities
Goto Forum:
  


Current Time: Wed Apr 24 14:56:57 GMT 2024

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

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

Back to the top