Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » getActivePage throws NullPointerException
getActivePage throws NullPointerException [message #327649] Mon, 28 April 2008 03:52 Go to next message
Eclipse UserFriend
Hi,

I have a view and in the constructor of my view, I have this line

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().addSelectionListener(listener);

When my view is open when you lunch eclipse, sometimes it will return
NullPointerException and I found out that it's because getActivePage() is
null.

It randomly happens. Sometimes it's null sometimes not.

What should I do?
Re: getActivePage throws NullPointerException [message #327653 is a reply to message #327649] Mon, 28 April 2008 04:09 Go to previous message
Eclipse UserFriend
Sorry for the multiple posts. I thought my previous post wasn't successful
that's why I posted another.
Previous Topic:Do something after the view was opened.
Next Topic:EFS question ...
Goto Forum:
  


Current Time: Sat May 03 00:28:35 EDT 2025

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

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

Back to the top