Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » PlatformUI
PlatformUI [message #464244] Wed, 28 February 2007 12:40 Go to next message
Eclipse UserFriend
Hi;

I created normally class. And I want to get a ViewPart that in my
application this like

public class DisplayCycle {

public DisplayCycle(){

}




public void toDo(){

ReadDataView readDataView =
(ReadDataView)PlatformUI.getWorkbench().getActiveWorkbenchWi ndow().getActivePage().findView(ConstID.READ_VIEW_ID);

}

}



But I cant get it. The application throws a NullPointer exeception

What is the problem?
Re: PlatformUI [message #464248 is a reply to message #464244] Wed, 28 February 2007 13:33 Go to previous messageGo to next message
Eclipse UserFriend
Hi Cenk,

You might separate the statement between each of the ".", and
assign to separate variables. Then you can determine which function
is returning null.

Charlie

Cenk Dundar wrote:
> Hi;
>
> I created normally class. And I want to get a ViewPart that in my
> application this like
>
> public class DisplayCycle {
>
> public DisplayCycle(){
>
> }
>
>
>
>
> public void toDo(){
>
> ReadDataView readDataView =
> (ReadDataView)PlatformUI.getWorkbench().getActiveWorkbenchWi ndow().getActivePage().findView(ConstID.READ_VIEW_ID);
>
> }
>
> }
>
>
>
> But I cant get it. The application throws a NullPointer exeception
>
> What is the problem?
>
>
Re: PlatformUI [message #464262 is a reply to message #464248] Thu, 01 March 2007 04:47 Go to previous message
Eclipse UserFriend
Originally posted by: nugaee.SPAMtlen.pl

Charlie Kelly wrote:
> Hi Cenk,
>
> You might separate the statement between each of the ".", and
> assign to separate variables. Then you can determine which function
> is returning null.

>> But I cant get it. The application throws a NullPointer exeception
>>
>> What is the problem?

you can also try to brows throw stack trace to find out where the
problem has occurred. the reason of NPE should be in javadoc of method
which raised it ;)

hope this helps
bartek michalik
Previous Topic:Workbench state restoration and intro
Next Topic:Detect hidding perspective
Goto Forum:
  


Current Time: Wed Mar 26 11:53:41 EDT 2025

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

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

Back to the top