Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Action set in a perspective extension
Action set in a perspective extension [message #36415] Tue, 03 July 2007 09:37 Go to next message
Eclipse UserFriend
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="&amp;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 Go to previous messageGo to next message
Eclipse UserFriend
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="&amp;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 Go to previous message
Eclipse UserFriend
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="&amp;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
>>
Previous Topic:Theming like yoxos eclipse discovery application
Next Topic:strange behavior of controlMoved(ControlListener)
Goto Forum:
  


Current Time: Thu Apr 25 13:07:05 GMT 2024

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

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

Back to the top