Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » getViewByID(String id) or so?
getViewByID(String id) or so? [message #436006] Mon, 29 August 2005 15:55 Go to next message
arne anka is currently offline arne ankaFriend
Messages: 133
Registered: July 2009
Senior Member
hi,
how do i get a ViewPart-instance from another ViewPart-instance?
exists something like getViewByID(String id)?
i have a view with buttons and would (just for fun) hide/show a second
view by pressing the buttons, atm i could use

for(IViewReference x : getSite().getPage().getViewReferences()){
if(x.getId().equals("MyPlugin.secondview")){
getSite().getPage().hideView(x);
}
}

but that's rather ugly ...
Re: getViewByID(String id) or so? [message #436010 is a reply to message #436006] Mon, 29 August 2005 16:53 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

arne anka wrote:
> hi,
> how do i get a ViewPart-instance from another ViewPart-instance?
> exists something like getViewByID(String id)?
> i have a view with buttons and would (just for fun) hide/show a second
> view by pressing the buttons, atm i could use
>
> for(IViewReference x : getSite().getPage().getViewReferences()){
> if(x.getId().equals("MyPlugin.secondview")){
> getSite().getPage().hideView(x);
> }
> }
>
> but that's rather ugly ...

? What's wrong with IWorkbenchPage#findView(String id) or
IWorkbenchPage#findViewReference(String id)?

Later,
PW


Re: getViewByID(String id) or so? [message #436045 is a reply to message #436010] Tue, 30 August 2005 08:39 Go to previous message
arne anka is currently offline arne ankaFriend
Messages: 133
Registered: July 2009
Senior Member
> ? What's wrong with IWorkbenchPage#findView(String id) or
> IWorkbenchPage#findViewReference(String id)?

it begins with "find" :-) i'm still used to have such methods starting
with "get" ...

thanks
Previous Topic:viewpart data initialization in an mvc
Next Topic:Reloading the SelectionProvider
Goto Forum:
  


Current Time: Thu Dec 26 11:50:44 GMT 2024

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

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

Back to the top