Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » 'Workbench has not yet been created' issue
'Workbench has not yet been created' issue [message #559091] Wed, 15 September 2010 15:17 Go to next message
Sebastian  is currently offline Sebastian Friend
Messages: 22
Registered: September 2010
Junior Member
Hey,

I am quite new to RCP, so please excuse if some questions are rather low-level like Smile.

I have had a running RCP application and within an instance it would refuse service.

It opened the window, but didn't show the initial perspective and threw exceptions with the message 'workbench has not been created yet'

The exception was thrown from a plugin other than the application plug in that was in it's start method of the Activator.

That means that the Activator of this plug-in ran earlier than the start method of the Application class which would have initialized the workbench.

As far as I know, the Application class is the main entry point into the RCP application and get's invoked right at the beginning of the program launch?


Please advise, thanks Smile
Re: 'Workbench has not yet been created' issue [message #559156 is a reply to message #559091] Wed, 15 September 2010 19:25 Go to previous messageGo to next message
eshvar60  is currently offline eshvar60 Friend
Messages: 51
Registered: March 2010
Member
Hey Sebastian,

The Activator actually starts your eclipse plug-in in OSGI(correct me if I am wrong please) which then launches your Application code.

Have you tried creating a plugin project based on the Mail template(available with eclipse)?
Re: 'Workbench has not yet been created' issue [message #720622 is a reply to message #559156] Wed, 31 August 2011 00:09 Go to previous messageGo to next message
Marco Lopes is currently offline Marco LopesFriend
Messages: 61
Registered: September 2010
Member
In my design, i have 2 RCP plugins, one REQUIRES the other.

The run order is:
Main plugin ACTIVATOR
Main plugin APPLICATION

The activator of the REQUIRED plugin is only executed in the moment the MAIN plugin accesses it.

Special care must be taken when accessing other plugins, and these plugins, of course, should not have any "display" or "workbench" code on their Activators!
Re: 'Workbench has not yet been created' issue [message #723427 is a reply to message #720622] Thu, 08 September 2011 14:22 Go to previous message
christian is currently offline christianFriend
Messages: 3
Registered: September 2011
Junior Member
The Activator will be called when the plugin is activated. This is basically an OSGI function and is not directly related to the Workbench state!
If your plugin wants to invoked any GUI functions you need to wait until the Workbench is fully loaded!
You can monitor the state of the application via a WorkbenchWindowAdvisor. This class defines multiple callback methods.
The relevant methods in this case are:


    postWindowCreate - called after the window has been created, either from an initial state or from a restored state; used to adjust the window
    openIntro - called immediately before the window is opened in order to create the introduction component, if any.
    postWindowOpen - called after the window has been opened; use to hook window listeners, etc.

Previous Topic:How to use created RCP application from different workspace
Next Topic:Adding programmatically a MenuItem to a pop-up ContextMenu
Goto Forum:
  


Current Time: Fri Mar 29 07:52:27 GMT 2024

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

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

Back to the top