The second sample project adds an action to existing pop-up menus in the CICS Explorer™.
The sample project is included with the CICS Explorer SDK. See the topic Introduction for more information.
This task describes how to add an action to an existing pop-up menu in the CICS Explorer
When the plug-in is created the plug-in editor opens, however an error is displayed in the Problems view. The reason for the error is that the wizard has created a plug-in that is not aware of the plug-ins contributed by the CICS Explorer SDK. To resolve this problem you must add a dependency to the plug-in com.ibm.cics.model in the dependencies tab, then save, but do not close, the plug-in.
public void selectionChanged(IAction action, ISelection selection)and then display some information about that object in a dialog in the method
public void run(IAction action)See the sample code for more information.
To add a variation of the action, add another object contribution, this time on ICICSobject, which is the supertype interface for all CICS objects in the CICS Explorer API.
<extension point="org.eclipse.ui.popupMenus"> <objectContribution objectClass="com.ibm.cics.model.ICICSObject" id="com.ibm.cics.explorer.sdk.demo2.contribution2"> <menu
The popup menu contribution for IRegion is shown only when a CICS region is selected (in the region view), the one for ICICSObject appears in every CICS Explorer view.