Rational Developer for Power Systems Software
V7.6

com.ibm.etools.systems.application.visual.editor.actions
Class SearchMainEntryPointActionDelegate

java.lang.Object
  extended by AbstractActionDelegate
      extended by com.ibm.etools.systems.application.visual.editor.actions.SearchMainEntryPointActionDelegate

public class SearchMainEntryPointActionDelegate
extends AbstractActionDelegate

The action searchs the visible main entry points in current Application Diagram. This action works for diagram which has source model elments. If there is only one main entry point in diagram, the main entry point will be selected. If there is multiple main entry points in diagram ( when diagram includs multiple source file memeber), a dialog pops up for users to select one. If there is no main entry point, an error message displays.


Field Summary
static String copyright
           
 
Constructor Summary
SearchMainEntryPointActionDelegate()
           
 
Method Summary
protected  List<SourceContainer> addAllVisibleSourceContainers()
          Add all visible source containers from Application Model.
protected  void doRun(IProgressMonitor progressMonitor)
           
protected  ApplicationModelEditPart getApplicationModelEditPart()
          Helper to return diagram editpart.
protected  EditPart getEditPartFor(View view)
          Find editpart from semantic model element.
protected  List<MainEntryPoint> getMainEntryPoints(SourceContainer srcContainer)
          Get a list of MainEntryPoints from a given source container.
protected  List<SourceContainer> getOperationSet()
          Get a set of source containers for finding main entry point.
protected  List getSelectedObjects()
          Helper to return a list of objects in the current structured selection.
protected  boolean isValidSelection()
          Return true if current selection is valid input to the action, false otherwise.
 void selectionChanged(IAction act, ISelection selection)
          Notifies this action delegate that the selection in the workbench has changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final String copyright
See Also:
Constant Field Values
Constructor Detail

SearchMainEntryPointActionDelegate

public SearchMainEntryPointActionDelegate()
Method Detail

selectionChanged

public void selectionChanged(IAction act,
                             ISelection selection)
Notifies this action delegate that the selection in the workbench has changed.

Parameters:
act - The action proxy that handles presentation portion of the action.
selection - The current selection, or null if there is no selection.

isValidSelection

protected boolean isValidSelection()
Return true if current selection is valid input to the action, false otherwise.

Returns:

doRun

protected void doRun(IProgressMonitor progressMonitor)

getEditPartFor

protected EditPart getEditPartFor(View view)
Find editpart from semantic model element.


getMainEntryPoints

protected List<MainEntryPoint> getMainEntryPoints(SourceContainer srcContainer)
Get a list of MainEntryPoints from a given source container.

Parameters:
srcContainer - the source container where the main entry points to be searched from
Returns:
a list of main entry points found

getOperationSet

protected List<SourceContainer> getOperationSet()
Get a set of source containers for finding main entry point. Subclass must override this method to provide meaningful objects for the action.

Returns:
A list of source containers where the main entry point will be searched from.

addAllVisibleSourceContainers

protected List<SourceContainer> addAllVisibleSourceContainers()
Add all visible source containers from Application Model.

Returns:

getSelectedObjects

protected List getSelectedObjects()
Helper to return a list of objects in the current structured selection.

Returns:
A list of objects in the current structure selection

getApplicationModelEditPart

protected ApplicationModelEditPart getApplicationModelEditPart()
Helper to return diagram editpart.


Rational Developer for Power Systems Software
V7.6

Copyright © 2011 IBM Corp. All Rights Reserved.

Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.