Home » Eclipse Projects » Eclipse Platform » Menu only appears in debug perspective
Menu only appears in debug perspective [message #108629] |
Fri, 08 August 2003 04:12  |
Eclipse User |
|
|
|
Originally posted by: m.bauer.signsoft.com
Hi,
im trying to integrate a new menu on the menu bar, but it only appears in
the dbug perspectiv. Is there somethin i am missing in my plugin.xml?
Relevant sorce code snippet as following:
extension point="org.eclipse.ui.actionSets">
<actionSet label="Sample Action Set"
id="eclipse.actionSet"
visible="true">
<menu label="My menu"
id="myMenu">
<separator
name="group1">
</separator>
</menu>
<action label="Preferences" icon="icons/sample.gif"
class="foo.bar.JDOAction"
menubarPath="myMenu/group1" toolbarPath="intelliBO"
id="actions.JDOAction"/>
</actionSet>
Thanks for your help.
Michael Bauer
|
|
| | |
Re: Menu only appears in debug perspective [message #108697 is a reply to message #108671] |
Fri, 08 August 2003 04:40   |
Eclipse User |
|
|
|
Originally posted by: mh.nixspam.com
Don't know, here is my coding:
package com.xxx.actions;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
/**
* Our sample action implements workbench action delegate.
* The action proxy will be created by the workbench and
* shown in the UI. When the user tries to use the action,
* this delegate will be created and execution will be
* delegated to it.
* @see IWorkbenchWindowActionDelegate
*/
public class CheckBOAction implements IWorkbenchWindowActionDelegate {
private IWorkbenchWindow window;
/**
* The constructor.
*/
public CheckBOAction() {
}
/**
* The action has been activated. The argument of the
* method represents the 'real' action sitting
* in the workbench UI.
* @see IWorkbenchWindowActionDelegate#run
*/
public void run(IAction action) {
MessageDialog.openInformation(
window.getShell(),
"Whatever Action",
"Checking object...!");
}
/**
* Selection in the workbench has been changed. We
* can change the state of the 'real' action here
* if we want, but this can only happen after
* the delegate has been created.
* @see IWorkbenchWindowActionDelegate#selectionChanged
*/
public void selectionChanged(IAction action, ISelection selection) {
}
/**
* We can use this method to dispose of any system
* resources we previously allocated.
* @see IWorkbenchWindowActionDelegate#dispose
*/
public void dispose() {
}
/**
* We will cache window object in order to
* be able to provide parent shell for the message dialog.
* @see IWorkbenchWindowActionDelegate#init
*/
public void init(IWorkbenchWindow window) {
this.window = window;
}
}
"Michael Bauer" <m.bauer@signsoft.com> wrote in message
news:bgvn8i$umb$1@eclipse.org...
> Hi, seems to be similar. But what is the problem then? Do I have to
subclass
> i different class? I used IWorkbenchWindowActionDelegate. Code of the
class
> looks like this:
>
> public class MyAction implements IWorkbenchWindowActionDelegate {
> private IWorkbenchWindow window;
> /**
> * The constructor.
> */
> public MyAction() {
> }
> public void run(IAction action) {
> MessageDialog.openInformation(null,null,"It works");
> }
> public void selectionChanged(IAction action, ISelection selection) {
> }
> public void dispose() {
> }
> public void init(IWorkbenchWindow window) {
> this.window = window;
> }
> }
>
> But I dont think that this problem is correlated to the class due of that
> the menu entry is only defined in the plugin.xml.
>
> Michael
>
> "Mario Herger" <mh@nixspam.com> schrieb im Newsbeitrag
> news:bgvmja$tvt$1@eclipse.org...
> > Looks good for me at the first glance, my code looks similar and works;
> here
> > it is, compare it:
> >
> > <extension
> > point="org.eclipse.ui.actionSets">
> > <actionSet
> > label="Business Objects"
> > visible="true"
> > id="com.xxx.actionSet">
> > <menu
> > label="&Check Consistency"
> > id="checkBOMenu">
> > <separator
> > name="checkBOGroup">
> > </separator>
> > </menu>
> > <action
> > label="&Check Consistency"
> > icon="icons/ok.gif"
> > tooltip="Check Consistency"
> > class="com.xxx.actions.CheckBOAction"
> > menubarPath="checkBOMenu/checkBOGroup"
> > toolbarPath="checkBOGroup"
> > id="com.xxx.actions.CheckBOAction">
> > </action>
> > </actionSet>
> > </extension>
> >
> > Mario
> >
> > "Michael Bauer" <m.bauer@signsoft.com> wrote in message
> > news:bgvldb$s5n$1@eclipse.org...
> > > Hi,
> > >
> > > im trying to integrate a new menu on the menu bar, but it only appears
> in
> > > the dbug perspectiv. Is there somethin i am missing in my plugin.xml?
> > > Relevant sorce code snippet as following:
> > >
> > > extension point="org.eclipse.ui.actionSets">
> > > <actionSet label="Sample Action Set"
> > > id="eclipse.actionSet"
> > > visible="true">
> > > <menu label="My menu"
> > > id="myMenu">
> > > <separator
> > > name="group1">
> > > </separator>
> > > </menu>
> > > <action label="Preferences" icon="icons/sample.gif"
> > > class="foo.bar.JDOAction"
> > > menubarPath="myMenu/group1"
toolbarPath="intelliBO"
> > > id="actions.JDOAction"/>
> > > </actionSet>
> > >
> > > Thanks for your help.
> > >
> > > Michael Bauer
> > >
> > >
> >
> >
>
>
|
|
|
Re: Menu only appears in debug perspective [message #108840 is a reply to message #108697] |
Fri, 08 August 2003 09:11   |
Eclipse User |
|
|
|
Originally posted by: s-correia.chronopost.fr
Maybe you should use a perspective extension to tell in which perspective
your action set should appear:
<extension
point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension
targetID="org.eclipse.ui.resourcePerspective">
<actionSet
id="your.actionSet.id">
</actionSet>
</perspectiveExtension>
</extension>
Seb.
Mario Herger wrote:
> Don't know, here is my coding:
> package com.xxx.actions;
> import org.eclipse.jface.action.IAction;
> import org.eclipse.jface.dialogs.MessageDialog;
> import org.eclipse.jface.viewers.ISelection;
> import org.eclipse.ui.IWorkbenchWindow;
> import org.eclipse.ui.IWorkbenchWindowActionDelegate;
> /**
> * Our sample action implements workbench action delegate.
> * The action proxy will be created by the workbench and
> * shown in the UI. When the user tries to use the action,
> * this delegate will be created and execution will be
> * delegated to it.
> * @see IWorkbenchWindowActionDelegate
> */
> public class CheckBOAction implements IWorkbenchWindowActionDelegate {
> private IWorkbenchWindow window;
> /**
> * The constructor.
> */
> public CheckBOAction() {
> }
> /**
> * The action has been activated. The argument of the
> * method represents the 'real' action sitting
> * in the workbench UI.
> * @see IWorkbenchWindowActionDelegate#run
> */
> public void run(IAction action) {
> MessageDialog.openInformation(
> window.getShell(),
> "Whatever Action",
> "Checking object...!");
> }
> /**
> * Selection in the workbench has been changed. We
> * can change the state of the 'real' action here
> * if we want, but this can only happen after
> * the delegate has been created.
> * @see IWorkbenchWindowActionDelegate#selectionChanged
> */
> public void selectionChanged(IAction action, ISelection selection) {
> }
> /**
> * We can use this method to dispose of any system
> * resources we previously allocated.
> * @see IWorkbenchWindowActionDelegate#dispose
> */
> public void dispose() {
> }
> /**
> * We will cache window object in order to
> * be able to provide parent shell for the message dialog.
> * @see IWorkbenchWindowActionDelegate#init
> */
> public void init(IWorkbenchWindow window) {
> this.window = window;
> }
> }
> "Michael Bauer" <m.bauer@signsoft.com> wrote in message
> news:bgvn8i$umb$1@eclipse.org...
> > Hi, seems to be similar. But what is the problem then? Do I have to
> subclass
> > i different class? I used IWorkbenchWindowActionDelegate. Code of the
> class
> > looks like this:
> >
> > public class MyAction implements IWorkbenchWindowActionDelegate {
> > private IWorkbenchWindow window;
> > /**
> > * The constructor.
> > */
> > public MyAction() {
> > }
> > public void run(IAction action) {
> > MessageDialog.openInformation(null,null,"It works");
> > }
> > public void selectionChanged(IAction action, ISelection selection) {
> > }
> > public void dispose() {
> > }
> > public void init(IWorkbenchWindow window) {
> > this.window = window;
> > }
> > }
> >
> > But I dont think that this problem is correlated to the class due of that
> > the menu entry is only defined in the plugin.xml.
> >
> > Michael
> >
> > "Mario Herger" <mh@nixspam.com> schrieb im Newsbeitrag
> > news:bgvmja$tvt$1@eclipse.org...
> > > Looks good for me at the first glance, my code looks similar and works;
> > here
> > > it is, compare it:
> > >
> > > <extension
> > > point="org.eclipse.ui.actionSets">
> > > <actionSet
> > > label="Business Objects"
> > > visible="true"
> > > id="com.xxx.actionSet">
> > > <menu
> > > label="&Check Consistency"
> > > id="checkBOMenu">
> > > <separator
> > > name="checkBOGroup">
> > > </separator>
> > > </menu>
> > > <action
> > > label="&Check Consistency"
> > > icon="icons/ok.gif"
> > > tooltip="Check Consistency"
> > > class="com.xxx.actions.CheckBOAction"
> > > menubarPath="checkBOMenu/checkBOGroup"
> > > toolbarPath="checkBOGroup"
> > > id="com.xxx.actions.CheckBOAction">
> > > </action>
> > > </actionSet>
> > > </extension>
> > >
> > > Mario
> > >
> > > "Michael Bauer" <m.bauer@signsoft.com> wrote in message
> > > news:bgvldb$s5n$1@eclipse.org...
> > > > Hi,
> > > >
> > > > im trying to integrate a new menu on the menu bar, but it only appears
> > in
> > > > the dbug perspectiv. Is there somethin i am missing in my plugin.xml?
> > > > Relevant sorce code snippet as following:
> > > >
> > > > extension point="org.eclipse.ui.actionSets">
> > > > <actionSet label="Sample Action Set"
> > > > id="eclipse.actionSet"
> > > > visible="true">
> > > > <menu label="My menu"
> > > > id="myMenu">
> > > > <separator
> > > > name="group1">
> > > > </separator>
> > > > </menu>
> > > > <action label="Preferences" icon="icons/sample.gif"
> > > > class="foo.bar.JDOAction"
> > > > menubarPath="myMenu/group1"
> toolbarPath="intelliBO"
> > > > id="actions.JDOAction"/>
> > > > </actionSet>
> > > >
> > > > Thanks for your help.
> > > >
> > > > Michael Bauer
> > > >
> > > >
> > >
> > >
> >
> >
|
|
|
Re: Menu only appears in debug perspective [message #108880 is a reply to message #108840] |
Fri, 08 August 2003 09:42   |
Eclipse User |
|
|
|
Originally posted by: m.bauer.signsoft.com
Hi,
thanks fore your reply. It is real strange. I added the extension, but
nothing happened. The only thing is, that my action set now isn't displayed
in any perspective.
If anyone got another hitn i would be thankful.
Michael Bauer
"Sebastiao" <s-correia@chronopost.fr> schrieb im Newsbeitrag
news:bh07hr$g2d$1@eclipse.org...
> Maybe you should use a perspective extension to tell in which perspective
> your action set should appear:
>
> <extension
> point="org.eclipse.ui.perspectiveExtensions">
> <perspectiveExtension
> targetID="org.eclipse.ui.resourcePerspective">
> <actionSet
> id="your.actionSet.id">
> </actionSet>
> </perspectiveExtension>
> </extension>
>
> Seb.
>
>
> Mario Herger wrote:
>
> > Don't know, here is my coding:
>
> > package com.xxx.actions;
>
> > import org.eclipse.jface.action.IAction;
> > import org.eclipse.jface.dialogs.MessageDialog;
> > import org.eclipse.jface.viewers.ISelection;
> > import org.eclipse.ui.IWorkbenchWindow;
> > import org.eclipse.ui.IWorkbenchWindowActionDelegate;
>
> > /**
> > * Our sample action implements workbench action delegate.
> > * The action proxy will be created by the workbench and
> > * shown in the UI. When the user tries to use the action,
> > * this delegate will be created and execution will be
> > * delegated to it.
> > * @see IWorkbenchWindowActionDelegate
> > */
> > public class CheckBOAction implements IWorkbenchWindowActionDelegate {
> > private IWorkbenchWindow window;
> > /**
> > * The constructor.
> > */
> > public CheckBOAction() {
> > }
>
> > /**
> > * The action has been activated. The argument of the
> > * method represents the 'real' action sitting
> > * in the workbench UI.
> > * @see IWorkbenchWindowActionDelegate#run
> > */
> > public void run(IAction action) {
> > MessageDialog.openInformation(
> > window.getShell(),
> > "Whatever Action",
> > "Checking object...!");
> > }
>
> > /**
> > * Selection in the workbench has been changed. We
> > * can change the state of the 'real' action here
> > * if we want, but this can only happen after
> > * the delegate has been created.
> > * @see IWorkbenchWindowActionDelegate#selectionChanged
> > */
> > public void selectionChanged(IAction action, ISelection selection) {
> > }
>
> > /**
> > * We can use this method to dispose of any system
> > * resources we previously allocated.
> > * @see IWorkbenchWindowActionDelegate#dispose
> > */
> > public void dispose() {
> > }
>
> > /**
> > * We will cache window object in order to
> > * be able to provide parent shell for the message dialog.
> > * @see IWorkbenchWindowActionDelegate#init
> > */
> > public void init(IWorkbenchWindow window) {
> > this.window = window;
> > }
> > }
>
>
> > "Michael Bauer" <m.bauer@signsoft.com> wrote in message
> > news:bgvn8i$umb$1@eclipse.org...
> > > Hi, seems to be similar. But what is the problem then? Do I have to
> > subclass
> > > i different class? I used IWorkbenchWindowActionDelegate. Code of the
> > class
> > > looks like this:
> > >
> > > public class MyAction implements IWorkbenchWindowActionDelegate {
> > > private IWorkbenchWindow window;
> > > /**
> > > * The constructor.
> > > */
> > > public MyAction() {
> > > }
> > > public void run(IAction action) {
> > > MessageDialog.openInformation(null,null,"It works");
> > > }
> > > public void selectionChanged(IAction action, ISelection selection) {
> > > }
> > > public void dispose() {
> > > }
> > > public void init(IWorkbenchWindow window) {
> > > this.window = window;
> > > }
> > > }
> > >
> > > But I dont think that this problem is correlated to the class due of
that
> > > the menu entry is only defined in the plugin.xml.
> > >
> > > Michael
> > >
> > > "Mario Herger" <mh@nixspam.com> schrieb im Newsbeitrag
> > > news:bgvmja$tvt$1@eclipse.org...
> > > > Looks good for me at the first glance, my code looks similar and
works;
> > > here
> > > > it is, compare it:
> > > >
> > > > <extension
> > > > point="org.eclipse.ui.actionSets">
> > > > <actionSet
> > > > label="Business Objects"
> > > > visible="true"
> > > > id="com.xxx.actionSet">
> > > > <menu
> > > > label="&Check Consistency"
> > > > id="checkBOMenu">
> > > > <separator
> > > > name="checkBOGroup">
> > > > </separator>
> > > > </menu>
> > > > <action
> > > > label="&Check Consistency"
> > > > icon="icons/ok.gif"
> > > > tooltip="Check Consistency"
> > > > class="com.xxx.actions.CheckBOAction"
> > > > menubarPath="checkBOMenu/checkBOGroup"
> > > > toolbarPath="checkBOGroup"
> > > > id="com.xxx.actions.CheckBOAction">
> > > > </action>
> > > > </actionSet>
> > > > </extension>
> > > >
> > > > Mario
> > > >
> > > > "Michael Bauer" <m.bauer@signsoft.com> wrote in message
> > > > news:bgvldb$s5n$1@eclipse.org...
> > > > > Hi,
> > > > >
> > > > > im trying to integrate a new menu on the menu bar, but it only
appears
> > > in
> > > > > the dbug perspectiv. Is there somethin i am missing in my
plugin.xml?
> > > > > Relevant sorce code snippet as following:
> > > > >
> > > > > extension point="org.eclipse.ui.actionSets">
> > > > > <actionSet label="Sample Action Set"
> > > > > id="eclipse.actionSet"
> > > > > visible="true">
> > > > > <menu label="My menu"
> > > > > id="myMenu">
> > > > > <separator
> > > > > name="group1">
> > > > > </separator>
> > > > > </menu>
> > > > > <action label="Preferences" icon="icons/sample.gif"
> > > > > class="foo.bar.JDOAction"
> > > > > menubarPath="myMenu/group1"
> > toolbarPath="intelliBO"
> > > > > id="actions.JDOAction"/>
> > > > > </actionSet>
> > > > >
> > > > > Thanks for your help.
> > > > >
> > > > > Michael Bauer
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
>
>
|
|
| |
Re: Menu only appears in debug perspective [message #108906 is a reply to message #108893] |
Fri, 08 August 2003 09:45  |
Eclipse User |
|
|
|
Originally posted by: m.bauer.signsoft.com
Hi,
well. Thanks. This was the solution. I didnt even expect, that eclipse also
hides the information about new items over sessions.
Thanks very much.
Michael Bauer
"Dave Wegener" <wegener@cboenospam.com> schrieb im Newsbeitrag
news:bh09d5$i2r$1@eclipse.org...
> Michael Bauer wrote:
>
> > Hi,
>
> > im trying to integrate a new menu on the menu bar, but it only appears
in
> > the dbug perspectiv. Is there somethin i am missing in my plugin.xml?
> > Relevant sorce code snippet as following:
>
> > extension point="org.eclipse.ui.actionSets">
> > <actionSet label="Sample Action Set"
> > id="eclipse.actionSet"
> > visible="true">
> > <menu label="My menu"
> > id="myMenu">
> > <separator
> > name="group1">
> > </separator>
> > </menu>
> > <action label="Preferences" icon="icons/sample.gif"
> > class="foo.bar.JDOAction"
> > menubarPath="myMenu/group1" toolbarPath="intelliBO"
> > id="actions.JDOAction"/>
> > </actionSet>
>
> > Thanks for your help.
>
> > Michael Bauer
> Have you tried closing and opening your view? Eclipse doesn't
> automatically add new items to views once they have been customized.
>
> Dave
>
|
|
|
Goto Forum:
Current Time: Mon Jun 23 16:15:48 EDT 2025
Powered by FUDForum. Page generated in 0.05386 seconds
|