Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » ECommandService in Workbench.init() is null
ECommandService in Workbench.init() is null [message #565501] Tue, 08 December 2009 10:24 Go to next message
Jens Keller is currently offline Jens KellerFriend
Messages: 50
Registered: December 2009
Location: Leipzig, Germany
Member
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 10:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5470
Registered: July 2009
Senior Member
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 05:45 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

>> 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 08:08 Go to previous messageGo to next message
Jens Keller is currently offline Jens KellerFriend
Messages: 50
Registered: December 2009
Location: Leipzig, Germany
Member
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 19:58 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

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: Sat Nov 29 06:36:42 GMT 2014

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

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