Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4
WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #885307] Tue, 12 June 2012 19:29 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
I am porting my Rich Client to e4 and have notice that
WorkbenchWindowAdvisor.postWindowCreate no longer is getting called. In
prior version we used this method to init various perspectives on the
perspective bar , how is this supposed to be done in E4?
Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #885653 is a reply to message #885307] Wed, 13 June 2012 12:01 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
It's a bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=363807) that we'll aim to fix for SR1.

The best workaround I can think of (though completely untested) is to listen to the Eclipse 4 UIEvents, such as the UILifeCycle.PERSPECTIVE_OPENED. Your handler would check if the MWindow had your "processed" marker (to prevent re-entrancy), and if not found then add the marker and then open the perspectives. You can obtain the IWorkbenchWindow corresponding to an MWindow through the MWindow's context with something like:

MWindow win = ...;
IWorkbenchWndow web win = (IWorkbenchWndow) win.getContext().get(IWorkbenchWindow.class);

Brian.
Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #885673 is a reply to message #885653] Wed, 13 June 2012 12:23 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

If you mean you want a couple of perspectives listed in the perspective bar right when you start up your RCP app, normally you use a plugin_customization.ini file in your product plugin to simply list the extra perspective IDs.

See the beginning of http://stackoverflow.com/a/708547/713646 for an example.

PW


Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #885716 is a reply to message #885673] Wed, 13 June 2012 13:22 Go to previous messageGo to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
I tried adding the line to the plugin_customization.ini and rerunning the
app with a clean workspace and that did not work.
org.eclipse.ui/PERSPECTIVE_BAR_EXTRAS=myPerspectiveId1,myPerspectiveId2

Was there something in addition to tweak in order for the
plugin_customization.ini to get called?


"Paul Webster" <forums-noreply@xxxxxxxx> wrote in message
news:jra0na$86f$1@xxxxxxxxe.org...
> If you mean you want a couple of perspectives listed in the perspective
> bar right when you start up your RCP app, normally you use a
> plugin_customization.ini file in your product plugin to simply list the
> extra perspective IDs.
>
> See the beginning of http://stackoverflow.com/a/708547/713646 for an
> example.
>
> PW
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> http://wiki.eclipse.org/Menu_Contributions
Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #885881 is a reply to message #885716] Wed, 13 June 2012 19:37 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 242
Registered: July 2009
Senior Member
You have to add a preferenceCustomization product property to reference the .ini file:

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fproduct_configproduct.htm

Brian.
Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #885890 is a reply to message #885881] Wed, 13 June 2012 20:06 Go to previous messageGo to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
Yes I already have that. Note: The above setup works in Indigo (3.7.1) but
not in Juno (4.2 RC3).


"Brian de Alwis" <forums-noreply@xxxxxxxx> wrote in message
news:jraq54$qm8$1@xxxxxxxxe.org...
> You have to add a preferenceCustomization product property to reference
> the .ini file:
>
>
> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fproduct_configproduct.htm
>
> Brian.
Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #886197 is a reply to message #885890] Thu, 14 June 2012 12:24 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

drew frantz wrote on Wed, 13 June 2012 16:06
Yes I already have that. Note: The above setup works in Indigo (3.7.1) but
not in Juno (4.2 RC3).


We want that to still work. Please open a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI

PW


Re: WorkbenchWindowAdvisor.postWindowCreate no longer is called in E4 [message #1019382 is a reply to message #886197] Fri, 15 March 2013 15:18 Go to previous message
B RichardFriend
Messages: 6
Registered: March 2013
Junior Member
Paul Webster wrote on Thu, 14 June 2012 08:24
We want that to still work.


I'm sorry to bring back this thread, but any news on that? I'm currently facing the same issue as Drew, and I was wondering if there was any ETA on that fix, or if changes where made regarding the preferenceCustomization.

Thanks.
Previous Topic:Send Events directly after application construction
Next Topic:Running an e4 RCP application multiple times
Goto Forum:
  


Current Time: Fri Apr 26 12:04:02 GMT 2024

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

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

Back to the top