Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Command not defined
Command not defined [message #870723] Wed, 09 May 2012 08:54 Go to next message
Eclipse UserFriend
Hi,

I want to create open project command and show the icon for command on toolbar.
I am geting following message on console
Unable to create menu item "org.eclipse.ui.project.openProject", command "org.eclipse.ui.project.openProject" not defined

<extension
point="org.eclipse.ui.menus">
<menuContribution
allPopups="false"
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
id="abc.test.main.toolbar1"
label="MainToolBar">
<command
commandId="org.eclipse.ui.project.openProject"
label="Open"
style="push"
tooltip="Open">
</command>
<command
commandId="org.eclipse.ui.file.saveAll"
label="Save All"
style="push"
tooltip="Save All">
</command>
<command
commandId="org.eclipse.ui.edit.undo"
label="Undo"
style="push"
tooltip="Undo">
</command>
<command
commandId="org.eclipse.ui.edit.redo"
label="Redo"
style="push"
tooltip="Redo">
</command>
<command
commandId="org.eclipse.ui.edit.delete"
label="Delete"
style="push"
tooltip="Delete">
</command>
</toolbar>
</menuContribution>
</extension>

all other command icons are showing on tool bar but not open project command. Is there any i need to alter?

Regards,
Re: Command not defined [message #870735 is a reply to message #870723] Wed, 09 May 2012 09:41 Go to previous messageGo to next message
Eclipse UserFriend
I'd say this simply indicates, that there is no such command (org.eclipse.ui.project.openProject) within your launch configuration. The command is defined in bundle "org.eclipse.ui.ide". So make sure that bundle is part of your launch configuration.

Regards
Thorsten
Re: Command not defined [message #870756 is a reply to message #870735] Wed, 09 May 2012 10:37 Go to previous messageGo to next message
Eclipse UserFriend
Thanks!

It does appear. But now it does not show the icon related to command(as saveall command shows the default icon) and it remain disable. Do you have any idea why it is so?

Regards,
Re: Command not defined [message #870798 is a reply to message #870756] Wed, 09 May 2012 13:51 Go to previous messageGo to next message
Eclipse UserFriend
Sorry but I don't know where the commands might get their default icons from. And - is there a default icon for openProject anyway? I'd guess the command will be disabled unless you select a closed project. Have you done so?

Regards
Thorsten
Re: Command not defined [message #871007 is a reply to message #870798] Thu, 10 May 2012 10:13 Go to previous messageGo to next message
Eclipse UserFriend
You also have to have registered the open_project action in your action builder (or provide a handler for it)

PW
Re: Command not defined [message #871167 is a reply to message #871007] Fri, 11 May 2012 04:51 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I am registering using register(IDEActionFactory.OPEN_PROJECT.create(window)); in makeActions method of my ApplicationActionBarAdvisor class but still it is disabled.

any idea about that?

thanks

Regards,
Re: Command not defined [message #871191 is a reply to message #871167] Fri, 11 May 2012 07:31 Go to previous message
Eclipse UserFriend
Have you selected a closed project?

PW
Previous Topic:Product Export Wizard based on Features
Next Topic:How do I get the Bundle-Version for my app?
Goto Forum:
  


Current Time: Wed Jul 23 09:42:48 EDT 2025

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

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

Back to the top