Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » ECommandService in Workbench.init() is null
ECommandService in Workbench.init() is null [message #565501] Tue, 08 December 2009 05:24 Go to next message
Eclipse UserFriend
Hello,

i made an application oriented on the contacts demo. Just a window with a part containing a TableViewer and an exit command. But when i try to start the application i get a NullPointerException at line 313 in the Workbench.init(). This means that the ECommandService is null when trying to define a category:

ECommandService cs = (ECommandService) workbenchContext.get(ECommandService.class.getName());
Category cat = cs.defineCategory(MApplication.class.getName(), "Application Category", null);

I also tried the e4 tuorial from Lars Vogel and get the same error but the contacts demo works great. Maybe somebody can help me on that. Thanks in advance.

I'm using Eclipse 3.6M3 with e4M2 as target platform.

jens
Re: ECommandService in Workbench.init() is null [message #565532 is a reply to message #565501] Tue, 08 December 2009 05:36 Go to previous messageGo to next message
Eclipse UserFriend
Are you sure the equinox.ds stuff is part of your launch config? The
problem with ds is that no plugin has a dependency on it and so you need
to add it manually to the launch.

We discussed in our last e4 call a better error handling to help users
find the problem.

Tom

jens schrieb:
> Hello,
>
> i made an application oriented on the contacts demo. Just a window with
> a part containing a TableViewer and an exit command. But when i try to
> start the application i get a NullPointerException at line 313 in the
> Workbench.init(). This means that the ECommandService is null when
> trying to define a category:
>
> ECommandService cs = (ECommandService)
> workbenchContext.get(ECommandService.class.getName());
> Category cat = cs.defineCategory(MApplication.class.getName(),
> "Application Category", null);
>
> I also tried the e4 tuorial from Lars Vogel and get the same error but
> the contacts demo works great. Maybe somebody can help me on that.
> Thanks in advance.
>
> I'm using Eclipse 3.6M3 with e4M2 as target platform.
>
> jens
Re: ECommandService in Workbench.init() is null [message #567489 is a reply to message #565501] Thu, 14 January 2010 00:45 Go to previous messageGo to next message
Eclipse UserFriend
>> I also tried the e4 tuorial from Lars Vogel and get the same error but
>> the contacts demo works great. Maybe somebody can help me on that.
>> Thanks in advance.
>>
>> I'm using Eclipse 3.6M3 with e4M2 as target platform.
>>
>> jens

Hi Jens,

my blog entry / tutorial was a little outdated. I updated the tutorial
to the Eclipse e4 milestone from 15.01.2010 (coming Friday):
http://www.vogella.de/articles/EclipseE4/article.html

Cheers, Lars


--
http://www.vogella.de/ - Eclipse plugin and Eclipse RCP Tutorials
http://www.twitter.com/vogella - vogella on Twitter
Re: ECommandService in Workbench.init() is null [message #567533 is a reply to message #567489] Thu, 14 January 2010 03:08 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for this update and also your other excellent tutorials. They helped me a lot working with Eclipse RCP.

Jens Keller
Re: ECommandService in Workbench.init() is null [message #567559 is a reply to message #567533] Thu, 14 January 2010 14:58 Go to previous message
Eclipse UserFriend
Hello Jens,

I'm happy to hear this. :) Cheers, Lars
Previous Topic:ECommandService in Workbench.init() is null
Next Topic:Using the e4 dependency injection implementation outside e4
Goto Forum:
  


Current Time: Wed Jul 23 06:15:13 EDT 2025

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

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

Back to the top