Use the Slick-C® command _eclipse_execute_command to execute Eclipse commands from the Slick-C environment. You must provide the identifier of the Eclipse command, as well as any parameters you wish to pass as arguments. Note that some commands in Eclipse are specific to a certain editor, and thus, will not work when launched from the SlickEdit environment.
The argument information for _eclipse_execute_command(_str id, _str paramNames, _str paramValues) is as follows (from Javadoc):
id - identifier of the Eclipse command.
paramNames - comma delimited String of the parameter names for 'id'. Can be null or empty.
paramValues - comma delimited String of the parameter values for 'id'. Can be null or empty.
One of the best ways to use this command is to write a wrapper function to bind a key to the Eclipse command of your choice. Here is an example that shows how to execute the Open Resource command, with no arguments:
_command void open_resource() name_info(',') {
_eclipse_execute_command("org.eclipse.ui.navigate.openResource","","");
}open_resource can then be bound to Ctrl.+Shift+R, as it is by default in Eclipse.
Here is an example of a command that takes some arguments:
_command void show_problems() name_info(',') {
_str id = "org.eclipse.ui.views.showViewMenu";
_str params = "org.eclipse.ui.views.showView.viewId,org.eclipse.ui.views.showView.makeFast";
_str values = "org.eclipse.ui.views.ProblemView,false";
_eclipse_execute_command(id, params, values);
}This command will activate the Eclipse Problems view, showing it in the default location (not in the fast view bar).
Finding Eclipse command identifiers and parameter information for programmatic execution can sometimes be a challenging task. This section provides some tips on gathering all the information you need.
Use the Eclipse Keys preference screen to find the name of a command.
Search a Cheat Sheet for the command name.
On the Eclipse Keys preference screen, found at Window → Preferences → General → Keys, you can find the names of all the Eclipse commands you may want to execute from the SlickEdit® editor. You will need this information to track down the command identifier. The following example tracks down the identifier for the Open Search Dialog command, which opens the Eclipse Search dialog.

Other useful information on this screen includes the Category and When fields. As previously stated, some commands require certain active editors to function, and thus, will not launch from SlickEdit. If the Category for a command is "C/C++ Source", that command is specific to the CDT editor. Similarly, if the When for a command is something like "PDE Editor", then that command is specific to one of the PDE editors. If you have found that a certain command won't execute as expected, use the Keys screen to first make sure that it is not specific to a different editor.
Now that you have the name of the command, you can search an Eclipse Cheat Sheet in order to discover the command identifier.
Go to File → New → Other, then expand User Assistance and select Cheat Sheet.
Enter any name you wish for the Cheat Sheet and use the Simple Cheat Sheet template. Click Finish.
Open the Cheat Sheet and select Title → Item in the Content pane. The Command pane will appear. Now click the Browse button.

Type the command name in the text box to locate the command in the tree. Select the appropriate item in the tree to display the identifier for the command.
