Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » cannot find view
cannot find view [message #460789] Wed, 07 September 2005 07:41 Go to next message
Pete is currently offline PeteFriend
Messages: 26
Registered: July 2009
Junior Member
guys, how do I overcome the following difficulty. I cannot programmaticaly find a view.
I do this
IViewPart view_part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().findView(ProjectExplorerView.ID_VIEW);
where ProjectExplorerView is my ViewPart.
So, when ProjectExplorerView is shown view_part != null otherwise it is null.So, I hide it, the result is null.
What is the problem?
Re: cannot find view [message #460802 is a reply to message #460789] Wed, 07 September 2005 10:58 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
That finds a view on the current page, and if it's not showing, returns null. What were you expecting it to be?
Re: cannot find view [message #460815 is a reply to message #460789] Thu, 08 September 2005 03:37 Go to previous messageGo to next message
Pete is currently offline PeteFriend
Messages: 26
Registered: July 2009
Junior Member
thanks a lot for your reply.
I was expecting it to return not null anyway, so is there any way to do it?
Re: cannot find view [message #460827 is a reply to message #460815] Thu, 08 September 2005 10:26 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
What is 'it'? What are you trying to do? Show a view? You've shown code that if a view is visible, obtains its reference so that you can hide it. I don't understand from your question what else you are trying to achieve.
Re: cannot find view [message #460863 is a reply to message #460827] Fri, 09 September 2005 03:56 Go to previous message
Pete is currently offline PeteFriend
Messages: 26
Registered: July 2009
Junior Member
anyway, there is something sensible stored in that view, I just made some methods static and that's all. :-|I wonder if there is a better solution.
Previous Topic:Thread safety of Display.syncExec()
Next Topic:DnD Drag behavour on Table control
Goto Forum:
  


Current Time: Thu Apr 25 14:57:27 GMT 2024

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

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

Back to the top