Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » WorkbenchWindow#getWorkbench uses the PlatformUI singleton (feature request)
WorkbenchWindow#getWorkbench uses the PlatformUI singleton (feature request) [message #84669] Fri, 25 April 2008 06:25 Go to next message
Eclipse UserFriend
Originally posted by: dpryadkin.rocketsoftware.com

Hi,

I would like to ask the developer team whether is it possible to alter
WorkbenchWindow#getWorkbench in the next release of RAP.

I'm using "window.getWorkbench().getDisplay()" to resolve the display
from non-ui threads.

Dmitry
Re: WorkbenchWindow#getWorkbench uses the PlatformUI singleton (feature request) [message #84684 is a reply to message #84669] Fri, 25 April 2008 06:41 Go to previous messageGo to next message
Stefan   is currently offline Stefan Friend
Messages: 316
Registered: July 2009
Senior Member
Hi Dimitry,

I'm pretty sure they won't do this because IWorkbench is RCP-API and one
of the main concepts of RAP is to be close to the RCP-API (SWT, JFace,
Workbench) as possible.

And even if so, what should be the semantic of this method? There exist
as many displays and workbench instances as sessions in your
application. The easiest way to access a display object from a non-ui
thread is to pass it to the thread when creating it and than call it
when needed.

Hope this helps,
Stefan.

Dmitry schrieb:
> Hi,
>
> I would like to ask the developer team whether is it possible to alter
> WorkbenchWindow#getWorkbench in the next release of RAP.
>
> I'm using "window.getWorkbench().getDisplay()" to resolve the display
> from non-ui threads.
>
> Dmitry
Re: WorkbenchWindow#getWorkbench uses the PlatformUI singleton (feature request) [message #84699 is a reply to message #84684] Fri, 25 April 2008 06:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dpryadkin.rocketsoftware.com

Stefan,

To put it simple, I wish the WorkbenchWindow object to store the
reference to IWorkbench at the construction stage:

public WorkbenchWindow(int number) {
super(null);
this.number = number;

// Make sure there is a workbench. This call will throw
// an exception if workbench not created yet.
final IWorkbench workbench = PlatformUI.getWorkbench();

---> lets say: m_workbench = PlatformUI.getWorkbench();

and then getWorkbench() will be able to return this reference instead of
calling PlatformUI singleton.

I think that would be more correct with respect to RAP concepts. Right?

Dmitry
Re: WorkbenchWindow#getWorkbench uses the PlatformUI singleton (feature request) [message #84731 is a reply to message #84699] Fri, 25 April 2008 08:51 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: fappel.innoopract.com

Hm,

why don't you use window.getShell().getDisplay()?

Ciao
Frank

-----Ursprüngliche Nachricht-----
Von: Dmitry [mailto:dpryadkin@rocketsoftware.com]
Bereitgestellt: Freitag, 25. April 2008 08:56
Bereitgestellt in: eclipse.technology.rap
Unterhaltung: WorkbenchWindow#getWorkbench uses the PlatformUI singleton
(feature request)
Betreff: Re: WorkbenchWindow#getWorkbench uses the PlatformUI singleton
(feature request)


Stefan,

To put it simple, I wish the WorkbenchWindow object to store the
reference to IWorkbench at the construction stage:

public WorkbenchWindow(int number) {
super(null);
this.number = number;

// Make sure there is a workbench. This call will throw
// an exception if workbench not created yet.
final IWorkbench workbench = PlatformUI.getWorkbench();

---> lets say: m_workbench = PlatformUI.getWorkbench();

and then getWorkbench() will be able to return this reference instead of
calling PlatformUI singleton.

I think that would be more correct with respect to RAP concepts. Right?

Dmitry
Re: WorkbenchWindow#getWorkbench uses the PlatformUI singleton (feature request) [message #84759 is a reply to message #84731] Fri, 25 April 2008 09:05 Go to previous message
Eclipse UserFriend
Originally posted by: dpryadkin.rocketsoftware.com

viola! Thanks. Just stuck to getWorkbench() as I am not really
proficient in RCP either.


Frank Appel wrote:
> why don't you use window.getShell().getDisplay()?
Previous Topic:CoolBar item with image and bottom text
Next Topic:Refresh in Browser removes branding
Goto Forum:
  


Current Time: Fri Apr 26 21:14:06 GMT 2024

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

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

Back to the top