Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Referencing a view while it is being created
Referencing a view while it is being created [message #283621] Thu, 07 April 2005 11:11
Eclipse UserFriend
Hi,
I have started having problems with accessing a view since switching to
3.1M6.
In the createPartControl method of a view called DataView I create some
actions.
One of these actions gets a reference to the original view with:

DataView view =
(DataView)window.getActivePage().findView(DataView.ID_VIEW);

This used to work, but now it returns null.

What appears to happen is that in the busyRestoreView method of
org.eclipse.ui.internal.ViewFactory, it tests if the view reference has
creationInProgress, which is true and aborts with an IStatus error.

I am not sure why it needs to abort like this. The message says
"Warning: Detected attempt by view {0} to create itself recursively (this
is probably, but not necessarily, a bug)". This isn't really true as the
action doesn't want to create the view, it just wants to keep a reference
in a field for later use.

Is there a better way of going about this? Either a better way of getting
the reference to the view, or a better place to put it in the view's
lifecycle, or a way of bypassing the IStatus error?

For now, I have deferred getting the view reference until the action's
execute method, which works, but I would like to understand better what is
going on with the ViewFactory.

Thanks
Roger
Previous Topic:how to turn off cvs project recognition
Next Topic:CVS Branching with eclipse.
Goto Forum:
  


Current Time: Wed Nov 05 15:19:03 EST 2025

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

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

Back to the top