Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » AbstractContributionFactory doesn't work anymore
AbstractContributionFactory doesn't work anymore [message #1065552] Wed, 26 June 2013 13:28 Go to next message
Ralph P is currently offline Ralph P
Messages: 30
Registered: September 2010
Location: Frankfurt, Germany
Member
Hi,

I've implemented a plug-in in Eclipse 3.7 which can dynamically populate the Eclipse menu bar.
To achieve this I had to extend the AbstractContributionFactory, implemented its createContributionItems(...) method and register the factory to the IMenuService of the WorkbenchWindow.

The code works fine in Eclipse 3.7, even in Eclipse 3.8.

The only problem in Eclipse 4.2.2 is now that the AbstractContributionFactory#createContributionItems() method is never called.
The javadoc says:
This method is not meant to be called by clients. It will be called by the menu service at the appropriate time.

That doesn't seem to be true in Eclipse 4.2.2.

The only caller of that method seems to be ContributionFactoryGenerator#compute(...). I found out that the ContributionFactoryGenerator is created from my AbstractContributionFactory but I can't find how the compute(...) method can be triggered.

Thanks in advance for any help.

Best regards,
Ralph
Re: AbstractContributionFactory doesn't work anymore [message #1065564 is a reply to message #1065552] Wed, 26 June 2013 14:06 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5321
Registered: July 2009
Senior Member
Please try 4.3 - I think we implemented this missing thing in Kepler.

Tom

On 26.06.13 15:28, Ralph P wrote:
> Hi,
>
> I've implemented a plug-in in Eclipse 3.7 which can dynamically populate
> the Eclipse menu bar.
> To achieve this I had to extend the AbstractContributionFactory,
> implemented its createContributionItems(...) method and register the
> factory to the IMenuService of the WorkbenchWindow.
>
> The code works fine in Eclipse 3.7, even in Eclipse 3.8.
>
> The only problem in Eclipse 4.2.2 is now that the
> AbstractContributionFactory#createContributionItems() method is never
> called.
> The javadoc says:
> This method is not meant to be called by clients. It will be called by
> the menu service at the appropriate time.
> That doesn't seem to be true in Eclipse 4.2.2.
>
> The only caller of that method seems to be
> ContributionFactoryGenerator#compute(...). I found out that the
> ContributionFactoryGenerator is created from my
> AbstractContributionFactory but I can't find how the compute(...) method
> can be triggered.
>
> Thanks in advance for any help.
>
> Best regards,
> Ralph
Re: AbstractContributionFactory doesn't work anymore [message #1065683 is a reply to message #1065564] Thu, 27 June 2013 06:59 Go to previous messageGo to next message
Ralph P is currently offline Ralph P
Messages: 30
Registered: September 2010
Location: Frankfurt, Germany
Member
Hi Tom,

thanks for the response!

Unfortunately, MyAbstractContributionFactory#createContributionItems(...) still won't be called by the menu service.
There are some additions in the code of the WorkbenchMenuService in Kepler, but they are commented out (Line 183).

Should I open a bug for it?

Ralph
Re: AbstractContributionFactory doesn't work anymore [message #1065715 is a reply to message #1065683] Thu, 27 June 2013 08:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5321
Registered: July 2009
Senior Member
Yes
On 27.06.13 08:59, Ralph P wrote:
> Hi Tom,
>
> thanks for the response!
>
> Unfortunately,
> MyAbstractContributionFactory#createContributionItems(...) still won't
> be called by the menu service.
> There are some additions in the code of the WorkbenchMenuService in
> Kepler, but they are commented out (Line 183).
>
> Should I open a bug for it?
>
> Ralph
Re: AbstractContributionFactory doesn't work anymore [message #1065760 is a reply to message #1065715] Thu, 27 June 2013 12:18 Go to previous message
Ralph P is currently offline Ralph P
Messages: 30
Registered: September 2010
Location: Frankfurt, Germany
Member
Bugzilla link:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=411765
Previous Topic:Overwrite default keybindings
Next Topic:[Kepler] window focus on new editor
Goto Forum:
  


Current Time: Wed Sep 17 15:46:12 GMT 2014

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

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