Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] [platform-up-dev] cannot create dynamic Status bar controls in eclipse 4.2

Thanks! I have opened a bug for it.  In my case, I need to use the <dynamic> tag because I need to update the toolbar with different controls depending on the state of certain features in our application.

 

 

Best regards,
Alain Lee
Texas Instruments Canada Ltd

801 - 150 John Street, Toronto ON Canada  M5V 3E3
Phone: 416-340-2136   Fax: 416-599-7171
mailto:a-lee@xxxxxx

 

From: platform-ui-dev-bounces@xxxxxxxxxxx [mailto:platform-ui-dev-bounces@xxxxxxxxxxx] On Behalf Of Paul Webster
Sent: Friday, October 19, 2012 11:04 AM
To: Eclipse Platform UI component developers list.
Subject: Re: [platform-ui-dev] cannot create dynamic Status bar controls in eclipse 4.2

 

On Fri, Oct 19, 2012 at 10:42 AM, Lee, Alain <a-lee@xxxxxx> wrote:

I need to dynamically create some Status Bar controls. It works fine in Eclipse 3.8 but the dynamic controls do not appear  in Eclipse 4.2. Is this still supported in 4.2?

 

This is how I defined my tool bar in plugin.xml:

 

<extension point="org.eclipse.ui.menus">

    <menuContribution

       locationURI="toolbar:org.eclipse.ui.trim.status">

              <toolbar id="my.toolbar.test">

              <dynamic

              class="my.status.myStatusBar"

                id=" my.toolbar.test.items">

              </dynamic>

              </toolbar>

   </menuContribution>

</extension>

 

Where my.status.myStatusBar extends from WorkbenchWindowControlContribution.

 

This works in 4.2 only if I define the toolbar using the <control> tag.



It is a bug, as dynamic should be able to insert any org.eclipse.jface.action.ContributionItem subclass into a menu or toolbar (it won't actually be dynamic in a toolbar).  Please open a bug at:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI

In your case you should probably be using a control element, since you're subclassing the control contribution.  The control element will make sure the control contribution fields are filled in correctly.

PW



--
Paul Webster
Hi floor.  Make me a sammich! - GIR


Back to the top