Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » AbstractContributionFactory doesn't work anymore
AbstractContributionFactory doesn't work anymore [message #1065552] Wed, 26 June 2013 09:28 Go to next message
Eclipse UserFriend
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 10:06 Go to previous messageGo to next message
Eclipse UserFriend
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 02:59 Go to previous messageGo to next message
Eclipse UserFriend
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 04:50 Go to previous messageGo to next message
Eclipse UserFriend
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 08:18 Go to previous message
Eclipse UserFriend
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: Sat Jul 05 11:35:46 EDT 2025

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

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

Back to the top