Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » Find commands that are not in the Command Composer(I need to hand code some commands that do not appear in the Command Composer)
Find commands that are not in the Command Composer [message #691544] Fri, 01 July 2011 17:26 Go to next message
Rich Payton is currently offline Rich PaytonFriend
Messages: 21
Registered: June 2011
Junior Member
How do I find correct syntax for commands that do not appear in the Command Composer. For example, the developers wrote a tool that appears in the File Menu, but not in the Command Composer. How do I find and then write the command to open the tool within a Cheat Sheet?

There are also buttons that open new sub-tools from within the main tool. How do I find the command that the sub-tool is invoking when the button is clicked so that I can invoke the command from a Cheat Sheet?

Thanks.
Re: Find commands that are not in the Command Composer [message #693144 is a reply to message #691544] Tue, 05 July 2011 22:10 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Eclipse has two mechanisms for associating java code with a menu item. The older mechanism is called actions, the newer mechanism is called commands. Commands are discoverable and I believe the command composer can discover any registered command although I'm not familiar with exactly how it works. Actions are not discoverable so my initial guess is that these menu items are associated with actions rather than commands.
Re: Find commands that are not in the Command Composer [message #693980 is a reply to message #693144] Thu, 07 July 2011 15:15 Go to previous messageGo to next message
Rich Payton is currently offline Rich PaytonFriend
Messages: 21
Registered: June 2011
Junior Member
This tutorial that says: "Tip: To find out which actions exist, simply open the Java™ Type Hierarchy for the IAction interface and browse."

How do I "simply open the Java™ Type Hierarchy for the IAction"?
Re: Find commands that are not in the Command Composer [message #698167 is a reply to message #693980] Mon, 18 July 2011 23:18 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
First press the open type button ( or Ctrl + Shift + T ) and enter IAction ( from org.eclipse.jface.action ). Then from the Outline view right click on IAction and select the menu item "Open Type Hierarchy"
Re: Find commands that are not in the Command Composer [message #698455 is a reply to message #698167] Tue, 19 July 2011 14:05 Go to previous messageGo to next message
Rich Payton is currently offline Rich PaytonFriend
Messages: 21
Registered: June 2011
Junior Member
I tried to do as you said and this is as far as I got.

index.php/fa/3394/0/

There must be something from my Eclipse configuration that is missing.
Re: Find commands that are not in the Command Composer [message #698578 is a reply to message #698455] Tue, 19 July 2011 18:19 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris GoldthorpeFriend
Messages: 815
Registered: July 2009
Senior Member
Sometimes the JDK does not find classes that are not referenced from any project in your workspace. Try creating a plug-in project using the Hello World template and then see if you can open the type IAction. This should work because IAction is used in the run method of the SampleAction class in this template.
Re: Find commands that are not in the Command Composer [message #699605 is a reply to message #698578] Thu, 21 July 2011 22:06 Go to previous message
Rich Payton is currently offline Rich PaytonFriend
Messages: 21
Registered: June 2011
Junior Member
I tried what you said and it did not work...The Open Type dialog is still not populated.

I managed to get the IAction Type Hierarchy by doing the following:

1. I went through the steps in the Creating an Eclipse plug-in Cheat Sheet
2. I got to the step where the SampleAction.java file was opened
3. I noticed the line:
import org.eclipse.jface.action.IAction;

4. I clicked on it and I noticed that the same line was highlighted in the Outline
5 I right-clicked on the entry in the outline and selected Open Type Hierarchy or could have pressed F4.

From this I realized that I could have done the same thing by just opening a java file and typing the import line, then do step 5 above.

I'd still like to know why the Open Type dialog is not populated, but my other problem is solved.

Thanks for you help, Chris.
Previous Topic:Can't cut (Ctrl+x) or undo (Ctrl+z) within Cheat Sheet Editor
Next Topic:conditional-subitem use in Cheat Sheets
Goto Forum:
  


Current Time: Mon Oct 14 20:15:18 GMT 2024

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

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

Back to the top