Action set in a perspective extension [message #36415] |
Tue, 03 July 2007 09:37  |
Eclipse User |
|
|
|
Originally posted by: benedikt.arnold.beyondsoft.de
Hi!
I have the following problem:
I want to add an action to the toolbar but the action should only appear in
a specific perspective. So I created an action set and set the visibility to
false. After that I created an perspective extension for the perspective in
which the action should appear. Have a look at the following plugin.xml
snipplet:
<extension point="org.eclipse.ui.actionSets">
<actionSet id="de.beyondsoft.voipconf.web.ui.actionSet"
label="Sample Action Set" visible="false">
<action
class="de.beyondsoft.voipconf.web.ui.actions.SampleAction"
icon="icons/sample.gif"
id="de.beyondsoft.voipconf.web.ui.actions.SampleAction"
label="&Sample Action" menubarPath="sampleMenu/sampleGroup"
toolbarPath="sampleGroup" tooltip="Hello, Eclipse world">
</action>
</actionSet>
</extension>
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="de.beyondsoft.voipconf.web.ui.AdminPerspective">
<actionSet id="de.beyondsoft.voipconf.web.ui.actionSet" />
</perspectiveExtension>
</extension>
At this point everythings seems to be ok. The action did not appear in my
default perspective and after switching to the AdminPerspective like this
IWorkbench workbench = PlatformUI.getWorkbench();
workbench.showPerspective(AdminPerspective.ID,workbench.getA ctiveWorkbenchWindow());
the action appears as expected.
If I switch back to my default perspective I would expect that the toolbar
action disappears. But it doesn't!
Is it a bug? Should I file a report?
Thanks a lot!
Benedikt
|
|
|
Re: Action set in a perspective extension [message #36468 is a reply to message #36415] |
Tue, 03 July 2007 09:55   |
Eclipse User |
|
|
|
Originally posted by: b.muskalla.gmx.net
As we have the same use case in our demo application: there it works.
Could you test it by using the perspective switcher instead of switching
the perspective manually? If the bug only occurs when switching the
perspective programmatically, please file a bug against the workbench
component.
Greets
Benny
Benedikt Arnold wrote:
> Hi!
>
> I have the following problem:
> I want to add an action to the toolbar but the action should only appear in
> a specific perspective. So I created an action set and set the visibility to
> false. After that I created an perspective extension for the perspective in
> which the action should appear. Have a look at the following plugin.xml
> snipplet:
>
> <extension point="org.eclipse.ui.actionSets">
>
> <actionSet id="de.beyondsoft.voipconf.web.ui.actionSet"
>
> label="Sample Action Set" visible="false">
>
> <action
>
> class="de.beyondsoft.voipconf.web.ui.actions.SampleAction"
>
> icon="icons/sample.gif"
>
> id="de.beyondsoft.voipconf.web.ui.actions.SampleAction"
>
> label="&Sample Action" menubarPath="sampleMenu/sampleGroup"
>
> toolbarPath="sampleGroup" tooltip="Hello, Eclipse world">
>
> </action>
>
> </actionSet>
>
> </extension>
>
> <extension point="org.eclipse.ui.perspectiveExtensions">
>
> <perspectiveExtension
>
> targetID="de.beyondsoft.voipconf.web.ui.AdminPerspective">
>
> <actionSet id="de.beyondsoft.voipconf.web.ui.actionSet" />
>
> </perspectiveExtension>
>
> </extension>
>
> At this point everythings seems to be ok. The action did not appear in my
> default perspective and after switching to the AdminPerspective like this
>
> IWorkbench workbench = PlatformUI.getWorkbench();
>
> workbench.showPerspective(AdminPerspective.ID,workbench.getA ctiveWorkbenchWindow());
>
> the action appears as expected.
>
> If I switch back to my default perspective I would expect that the toolbar
> action disappears. But it doesn't!
>
> Is it a bug? Should I file a report?
>
>
>
> Thanks a lot!
>
> Benedikt
>
>
|
|
|
Re: Action set in a perspective extension [message #36548 is a reply to message #36468] |
Tue, 03 July 2007 11:06  |
Eclipse User |
|
|
|
Originally posted by: benedikt.arnold.beyondsoft.de
You are right. The bug only occurs if I switch the perspective manually.
I filed a bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=195243
Greets
Ben
"Benjamin Muskalla" <b.muskalla@gmx.net> schrieb im Newsbeitrag
news:f6d6eo$lao$1@build.eclipse.org...
> As we have the same use case in our demo application: there it works.
>
> Could you test it by using the perspective switcher instead of switching
> the perspective manually? If the bug only occurs when switching the
> perspective programmatically, please file a bug against the workbench
> component.
>
> Greets
> Benny
>
> Benedikt Arnold wrote:
>> Hi!
>>
>> I have the following problem:
>> I want to add an action to the toolbar but the action should only appear
>> in a specific perspective. So I created an action set and set the
>> visibility to false. After that I created an perspective extension for
>> the perspective in which the action should appear. Have a look at the
>> following plugin.xml snipplet:
>>
>> <extension point="org.eclipse.ui.actionSets">
>>
>> <actionSet id="de.beyondsoft.voipconf.web.ui.actionSet"
>>
>> label="Sample Action Set" visible="false">
>>
>> <action
>>
>> class="de.beyondsoft.voipconf.web.ui.actions.SampleAction"
>>
>> icon="icons/sample.gif"
>>
>> id="de.beyondsoft.voipconf.web.ui.actions.SampleAction"
>>
>> label="&Sample Action" menubarPath="sampleMenu/sampleGroup"
>>
>> toolbarPath="sampleGroup" tooltip="Hello, Eclipse world">
>>
>> </action>
>>
>> </actionSet>
>>
>> </extension>
>>
>> <extension point="org.eclipse.ui.perspectiveExtensions">
>>
>> <perspectiveExtension
>>
>> targetID="de.beyondsoft.voipconf.web.ui.AdminPerspective">
>>
>> <actionSet id="de.beyondsoft.voipconf.web.ui.actionSet" />
>>
>> </perspectiveExtension>
>>
>> </extension>
>>
>> At this point everythings seems to be ok. The action did not appear in my
>> default perspective and after switching to the AdminPerspective like this
>>
>> IWorkbench workbench = PlatformUI.getWorkbench();
>>
>> workbench.showPerspective(AdminPerspective.ID,workbench.getA ctiveWorkbenchWindow());
>>
>> the action appears as expected.
>>
>> If I switch back to my default perspective I would expect that the
>> toolbar action disappears. But it doesn't!
>>
>> Is it a bug? Should I file a report?
>>
>>
>>
>> Thanks a lot!
>>
>> Benedikt
>>
|
|
|
Powered by
FUDForum. Page generated in 0.01571 seconds