Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Command not defined
Command not defined [message #870723] Wed, 09 May 2012 12:54 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
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 13:41 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
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 14:37 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
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 17:51 Go to previous messageGo to next message
Thorsten Schlathölter is currently offline Thorsten SchlathölterFriend
Messages: 312
Registered: February 2012
Location: Düsseldorf
Senior Member
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 14:13 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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 08:51 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
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 11:31 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

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: Fri Mar 29 10:08:53 GMT 2024

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

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

Back to the top