Class OpenSourceCodeAction

java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.action.AbstractAction
org.eclipse.jface.action.Action
org.eclipse.tracecompass.tmf.ui.actions.OpenSourceCodeAction
All Implemented Interfaces:
org.eclipse.jface.action.IAction

public class OpenSourceCodeAction extends org.eclipse.jface.action.Action
Open source code action. Original version was in events table, but it is more decoupled now to be able to be used in other views.
Since:
5.1
Author:
Matthew Khouzam
  • Field Summary

    Fields inherited from interface org.eclipse.jface.action.IAction

    AS_CHECK_BOX, AS_DROP_DOWN_MENU, AS_PUSH_BUTTON, AS_RADIO_BUTTON, AS_UNSPECIFIED, CHECKED, DESCRIPTION, ENABLED, HANDLED, IMAGE, RESULT, TEXT, TOOL_TIP_TEXT
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenSourceCodeAction(String text, ITmfCallsite callsite, org.eclipse.swt.widgets.Shell shell)
    Open Source Code Action Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.jface.action.IContributionItem
    create(String actionText, ITmfSourceLookup sourceLookup, org.eclipse.swt.widgets.Shell shell)
    Builder
    void
    run()
     

    Methods inherited from class org.eclipse.jface.action.Action

    convertAccelerator, convertAccelerator, findKeyCode, findKeyString, findModifier, findModifierString, getAccelerator, getActionDefinitionId, getDescription, getDisabledImageDescriptor, getHelpListener, getHoverImageDescriptor, getId, getImageDescriptor, getMenuCreator, getStyle, getText, getToolTipText, isChecked, isEnabled, isHandled, notifyResult, removeAcceleratorText, removeMnemonics, runWithEvent, setAccelerator, setActionDefinitionId, setChecked, setDescription, setDisabledImageDescriptor, setEnabled, setHelpListener, setHoverImageDescriptor, setId, setImageDescriptor, setMenuCreator, setText, setToolTipText

    Methods inherited from class org.eclipse.jface.action.AbstractAction

    addPropertyChangeListener, removePropertyChangeListener

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OpenSourceCodeAction

      public OpenSourceCodeAction(String text, ITmfCallsite callsite, org.eclipse.swt.widgets.Shell shell)
      Open Source Code Action Constructor
      Parameters:
      text - text to display
      callsite - the callsite
      shell - the shell
      Since:
      5.2
  • Method Details

    • create

      public static org.eclipse.jface.action.IContributionItem create(String actionText, ITmfSourceLookup sourceLookup, org.eclipse.swt.widgets.Shell shell)
      Builder
      Parameters:
      actionText - "open" message recommended to be "lookup" if the location can be erroneous and open if it's accurate.
      sourceLookup - the source code to lookup
      shell - the parent shell for source file dialog
      Returns:
      an contribution item to open a callsite or null if invalid
    • run

      public void run()
      Specified by:
      run in interface org.eclipse.jface.action.IAction
      Overrides:
      run in class org.eclipse.jface.action.Action