Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » View instance
View instance [message #464053] Fri, 23 February 2007 01:55 Go to next message
Eclipse UserFriend
Originally posted by: harshi_rishi.yahoo.co.in

Hi,

I have defined one perspective which includes three views(each is
displaying a tree viewer displaying some data).

And I have one more class which stores all the global variables....I
have defined one global variables which is used to store the view instance
depends upon which view is active.....

Suppose if the focus is one first view , the variable stores the first
view instance. If I select second view, this variable should be updated
with the second view instance....

Like this depends on selection of view, this variable is to be
updated... where can I trigger this code....based on this variable I need
to do some processing....

Thanks,
Harshitha
Re: View instance [message #464055 is a reply to message #464053] Fri, 23 February 2007 02:06 Go to previous messageGo to next message
Eclipse UserFriend
Harshi wrote:

> Hi,
>
> I have defined one perspective which includes three views(each is
> displaying a tree viewer displaying some data).
>
> And I have one more class which stores all the global variables....I
> have defined one global variables which is used to store the view instance
> depends upon which view is active.....
>
> Suppose if the focus is one first view , the variable stores the first
> view instance. If I select second view, this variable should be updated
> with the second view instance....
>
> Like this depends on selection of view, this variable is to be
> updated... where can I trigger this code....based on this variable I need
> to do some processing....
>


Why not poll PlatformUI.getWorkbench().getActiveWorkbenchWindow() upon need,
and check whether the result "instanceof" one of your views?

--
Michael
Re: View instance [message #464056 is a reply to message #464055] Fri, 23 February 2007 02:19 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: harshi_rishi.yahoo.co.in

Hi,

Its not working... its not returning the view instance....Basically
selected view instance....

Thanks,
Harshi
Re: View instance [message #464057 is a reply to message #464056] Fri, 23 February 2007 02:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: harshi_rishi.yahoo.co.in

Hi,

Its not working... its not returning the view instance....Basically I
need selected view(Active View) instance....

Thanks,
Harshi
Re: View instance [message #464069 is a reply to message #464057] Fri, 23 February 2007 08:57 Go to previous messageGo to next message
Eclipse UserFriend
Harshi wrote:

> Hi,
>
> Its not working... its not returning the view instance....Basically I
> need selected view(Active View) instance....
>

And what about
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActivePart() ?

--
Michael
Re: View instance [message #464076 is a reply to message #464053] Fri, 23 February 2007 11:34 Go to previous message
Eclipse UserFriend
Get the part service from the IWorkbenchWindow, and register an
IPartListener2 ... that will fire activated events.

PW
Previous Topic:MessageConsole: Good watermarks values
Next Topic:View listener
Goto Forum:
  


Current Time: Sat Mar 15 19:36:15 EDT 2025

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

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

Back to the top