actions enabled on a specific perspective ... [message #463091] |
Tue, 06 February 2007 11:18  |
Eclipse User |
|
|
|
Hi all
Hope this is the right forum.
I have got an action which implements IWorkbenchWindowActionDelegate defined
in the plugin.xml.
It works fine if I set the action as visible (I can correctly see the button
on the rcp toolbar).
What I would like is to show this action, still in the toolbar, only when a
specific perspective is enabled.
I have tried to put in the perspective code (implements IPerspectiveFactory)
the layout.addActionSet (action id) switching the visibility action flag in
the plugin.xml either false or not specified.
No way to see the action .
I have tried to use the perspective extension and there I have added the
action set id . still I cannot see the button appear on the toolbar.
What am I doing wrong?
Thanks for you help
Kar
|
|
|
|
Re: actions enabled on a specific perspective ... [message #463239 is a reply to message #463137] |
Wed, 07 February 2007 05:41  |
Eclipse User |
|
|
|
Hi Jacek,
Ok I managed to attach le listener to the workbeanchWindow ... the problem
is how to show the button now :-(
I have got an action implements the IWorkbenchWindowActionDelegate. This
action has been defined in the plugin.xml as extension
(org.eclipse.ui.actionSerts).
how do I find the action and set the visibility to true ... bear in mind
that I want this to appear either in the menu and in the main toolbar (as if
I had selected the visibility to true in the actionset fields).
I can even create an action but still I have no idea how to attach the
action in the main toolbar.
just to be clear ... this is the second plug-in which has got its own
perspective. this is not the main perspective loaded by the rcp application
where I could have played in the bar advisor.
Kar
what i have got is an
"Jacek Pospychala" <jacekp@siat.pl> wrote in message
news:eqaslp$aqd$1@utils.eclipse.org...
> hi, add your IPerspectiveListener3 to WorkbenchWindow, so it will change
> your toolbars accordingly.
>
> workbenchWindow.addPerspectiveListener(new IPerspectiveListener3() {
> public void perspectiveOpened(IWorkbenchPage page,
> IPerspectiveDescriptor perspective) {
> // show good buttons
> }
> public void perspectiveClosed(IWorkbenchPage page,
> IPerspectiveDescriptor perspective) {
> // hide bad ones ;)
> }
> });
>
> KarSc napisal(a):
>> Hi all
>>
>> Hope this is the right forum.
>>
>>
>>
>> I have got an action which implements IWorkbenchWindowActionDelegate
>> defined in the plugin.xml.
>>
>>
>>
>> It works fine if I set the action as visible (I can correctly see the
>> button on the rcp toolbar).
>>
>> What I would like is to show this action, still in the toolbar, only when
>> a specific perspective is enabled.
>>
>>
>>
>> I have tried to put in the perspective code (implements
>> IPerspectiveFactory) the layout.addActionSet (action id) switching the
>> visibility action flag in the plugin.xml either false or not specified.
>>
>> No way to see the action .
>>
>>
>>
>> I have tried to use the perspective extension and there I have added the
>> action set id . still I cannot see the button appear on the toolbar.
>>
>>
>>
>> What am I doing wrong?
>>
>>
>>
>> Thanks for you help
>>
>> Kar
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.04514 seconds