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
ConstructorsConstructorDescriptionOpenSourceCodeAction(String text, ITmfCallsite callsite, org.eclipse.swt.widgets.Shell shell) Open Source Code Action Constructor -
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.jface.action.IContributionItemcreate(String actionText, ITmfSourceLookup sourceLookup, org.eclipse.swt.widgets.Shell shell) Buildervoidrun()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, setToolTipTextMethods inherited from class org.eclipse.jface.action.AbstractAction
addPropertyChangeListener, removePropertyChangeListener
-
Constructor Details
-
OpenSourceCodeAction
public OpenSourceCodeAction(String text, ITmfCallsite callsite, org.eclipse.swt.widgets.Shell shell) Open Source Code Action Constructor- Parameters:
text- text to displaycallsite- the callsiteshell- 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 lookupshell- 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:
runin interfaceorg.eclipse.jface.action.IAction- Overrides:
runin classorg.eclipse.jface.action.Action
-