views:

221

answers:

1

I have a plugin which contains class A that brings up a view defined in class B via the following line of code:

(VideoLogView) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("Videolog.VideoLogView");

What I need to do in the createPartControl() method of the view (class B object) is access a method in the class A object.

How can this be done?

Thanks.

+1  A: 
VonC
Thanks. Passing parameters to my view is exactly the issue. I will start reading the article immediately.
Dr. Faust
VonC - I have read the article, "Using the Selection Service." This doesn't seem to be what I am looking for. I need to access a method of class A when my view (class B) gets created and the createPartControl method is called. It seems the Selection Service comes into play once your view is created and displayed. Any other ideas?
Dr. Faust
Please disregard above comment. I got it to work after reading:<a href="http://stackoverflow.com/questions/585802/how-to-get-the-selected-node-in-the-package-explorer-from-an-eclipse-plugin" title="">this</a>
Dr. Faust
Please disregard the above comment. I got it to work. I found the answer to [this][1] question very helpful.[1]: http://stackoverflow.com/questions/585802/how-to-get-the-selected-node-in-the-package-explorer-from-an-eclipse-plugin
Dr. Faust