|
Re: Select added editpart [message #194277 is a reply to message #194085] |
Wed, 31 August 2005 22:19 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
IWorkbenchParts are IAdaptable. Use the getAdapter() method.
"Hao Zhang" <bjzhanghao@21cn.com> wrote in message
news:df20mb$9fa$1@news.eclipse.org...
> Hi,
> I have a CreateSiblingNodeAction(extends SelectionAction) for a tree,
which
> executes my CreateNodeCommand to create a sibling node. Now I want to make
> the just created node selected automatically, so I need to add some code
> after executing the command, but where can I get a viewer instance?
>
> I can get the workbenchpart instance, but its getGraphicalViewer() is
> protected(not visible for CreateSiblingNodeAction).
>
> I also tried to pass it through constructor in my editor's createActions()
> method, but getGraphicalViewer() returns null at that moment.
>
> Any suggestion?
>
> Regards,
> Hao
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03271 seconds