Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Problems creating a Part Toolbar
Problems creating a Part Toolbar [message #798221] Tue, 14 February 2012 11:50 Go to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 371
Registered: December 2010
Location: Germany
Senior Member
Hello,

I am trying to create a toolbar and a menu for a specific MPart. To do this I enabled "ToolBar" on the Part in the e4xmi of the contibuting plug-in.

<children xsi:type="basic:Part" xmi:id="_fJcM4K7mEeCWdr0cltTDYg" elementId="part.umlauf" contributionURI="bundleclass://de.emsw.gosa.contrib.umlauf/de.emsw.gosa.contrib.umlauf.live.UmlaufLivePart" label="Uml&#xe4;ufe" iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif">
	<toolbar xmi:id="_A3Z2kFb_EeGO18KNCa9uXQ">
	  <children xsi:type="menu:HandledToolItem" xmi:id="_Bjs74Fb_EeGO18KNCa9uXQ" label="ZK" iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif" tooltip="test" command="_STUIYN3gEeCL86FkGFti1Q"/>
	</toolbar>
</children>


When I start the application I get a NPE.

12:29:52.826 ERROR org.eclipse.equinox.logger - Exception occurred while rendering: org.eclipse.e4.ui.model.application.ui.menu.impl.ToolBarImpl@966905 (elementId: null, tags: null, contributorURI: platform:/plugin/de.emsw.gosa.contrib.umlauf) (widget: null, renderer: org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer@21a86a, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null)
java.lang.NullPointerException: null
	at org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.createToolbar(ToolBarManagerRenderer.java:378) ~[na:na]


Am I missing something or is this a bug?

Greetings
Christoph
Re: Problems creating a Part Toolbar [message #798247 is a reply to message #798221] Tue, 14 February 2012 12:25 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
What version of Eclipse 4.2?

Tom

Am 14.02.12 12:50, schrieb Christoph Keimel:
> Hello,
>
> I am trying to create a toolbar and a menu for a specific MPart. To do
> this I enabled "ToolBar" on the Part in the e4xmi of the contibuting
> plug-in.
>
>
> <children xsi:type="basic:Part" xmi:id="_fJcM4K7mEeCWdr0cltTDYg"
> elementId="part.umlauf"
> contributionURI="bundleclass://de.emsw.gosa.contrib.umlauf/de.emsw.gosa.contrib.umlauf.live.UmlaufLivePart"
> label="Uml�ufe"
> iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif">
>
> <toolbar xmi:id="_A3Z2kFb_EeGO18KNCa9uXQ">
> <children xsi:type="menu:HandledToolItem"
> xmi:id="_Bjs74Fb_EeGO18KNCa9uXQ" label="ZK"
> iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif"
> tooltip="test" command="_STUIYN3gEeCL86FkGFti1Q"/>
> </toolbar>
> </children>
>
>
> When I start the application I get a NPE.
>
>
> 12:29:52.826 ERROR org.eclipse.equinox.logger - Exception occurred while
> rendering:
> org.eclipse.e4.ui.model.application.ui.menu.impl.ToolBarImpl@966905
> (elementId: null, tags: null, contributorURI:
> platform:/plugin/de.emsw.gosa.contrib.umlauf) (widget: null, renderer:
> org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer@21a86a,
> toBeRendered: true, onTop: false, visible: true, containerData: null,
> accessibilityPhrase: null)
> java.lang.NullPointerException: null
> at
> org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.createToolbar(ToolBarManagerRenderer.java:378)
> ~[na:na]
>
>
> Am I missing something or is this a bug?
>
> Greetings
> Christoph
Re: Problems creating a Part Toolbar [message #798253 is a reply to message #798247] Tue, 14 February 2012 12:38 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
In git i see a potential NPE introduced 6 days ago but fixed 5 days ago.

Tom

Am 14.02.12 13:25, schrieb Tom Schindl:
> What version of Eclipse 4.2?
>
> Tom
>
> Am 14.02.12 12:50, schrieb Christoph Keimel:
>> Hello,
>>
>> I am trying to create a toolbar and a menu for a specific MPart. To do
>> this I enabled "ToolBar" on the Part in the e4xmi of the contibuting
>> plug-in.
>>
>>
>> <children xsi:type="basic:Part" xmi:id="_fJcM4K7mEeCWdr0cltTDYg"
>> elementId="part.umlauf"
>> contributionURI="bundleclass://de.emsw.gosa.contrib.umlauf/de.emsw.gosa.contrib.umlauf.live.UmlaufLivePart"
>> label="Uml�ufe"
>> iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif">
>>
>> <toolbar xmi:id="_A3Z2kFb_EeGO18KNCa9uXQ">
>> <children xsi:type="menu:HandledToolItem"
>> xmi:id="_Bjs74Fb_EeGO18KNCa9uXQ" label="ZK"
>> iconURI="platform:/plugin/de.emsw.gosa.contrib.umlauf/icons/umlauf_live.gif"
>> tooltip="test" command="_STUIYN3gEeCL86FkGFti1Q"/>
>> </toolbar>
>> </children>
>>
>>
>> When I start the application I get a NPE.
>>
>>
>> 12:29:52.826 ERROR org.eclipse.equinox.logger - Exception occurred while
>> rendering:
>> org.eclipse.e4.ui.model.application.ui.menu.impl.ToolBarImpl@966905
>> (elementId: null, tags: null, contributorURI:
>> platform:/plugin/de.emsw.gosa.contrib.umlauf) (widget: null, renderer:
>> org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer@21a86a,
>> toBeRendered: true, onTop: false, visible: true, containerData: null,
>> accessibilityPhrase: null)
>> java.lang.NullPointerException: null
>> at
>> org.eclipse.e4.ui.workbench.renderers.swt.ToolBarManagerRenderer.createToolbar(ToolBarManagerRenderer.java:378)
>> ~[na:na]
>>
>>
>> Am I missing something or is this a bug?
>>
>> Greetings
>> Christoph
>
Re: Problems creating a Part Toolbar [message #798368 is a reply to message #798247] Tue, 14 February 2012 15:45 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph Keimel
Messages: 371
Registered: December 2010
Location: Germany
Senior Member
Version: 4.2.0
Build id: I20120208-2200
Re: Problems creating a Part Toolbar [message #798372 is a reply to message #798368] Tue, 14 February 2012 15:50 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5419
Registered: July 2009
Senior Member
If you update to a later one your code should work. It's only this
version that has the regression.

Tom

Am 14.02.12 16:45, schrieb Christoph Keimel:
> Version: 4.2.0
> Build id: I20120208-2200
Previous Topic:Problem using StartupMonitor to show a login dialog
Next Topic:Create a modal window
Goto Forum:
  


Current Time: Thu Oct 23 15:28:35 GMT 2014

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

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