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 #502449] 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 #502452 is a reply to message #502449] Tue, 08 December 2009 10:36 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5487
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 #502456 is a reply to message #502452] Tue, 08 December 2009 11:12 Go to previous messageGo to next message
Jens Keller is currently offline Jens KellerFriend
Messages: 50
Registered: December 2009
Location: Leipzig, Germany
Member
That solved the problem Surprised Thanks for your fast reply.


Jens Keller
Re: ECommandService in Workbench.init() is null [message #507619 is a reply to message #502449] Thu, 14 January 2010 00:52 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 #507631 is a reply to message #507619] 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 #507829 is a reply to message #507631] 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. Smile Cheers, Lars
Re: ECommandService in Workbench.init() is null [message #565563 is a reply to message #502452] Tue, 08 December 2009 11:12 Go to previous message
Jens Keller is currently offline Jens KellerFriend
Messages: 50
Registered: December 2009
Location: Leipzig, Germany
Member
That solved the problem :o Thanks for your fast reply.


Jens Keller
Previous Topic:RCP ERROR
Next Topic:ECommandService in Workbench.init() is null
Goto Forum:
  


Current Time: Mon Dec 22 18:45:54 GMT 2014

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

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