org.eclipse.net4j.util.ui.actions

## Class SafeAction

- java.lang.Object
- - org.eclipse.core.commands.common.EventManager
  - - org.eclipse.jface.action.AbstractAction
    - - org.eclipse.jface.action.Action
      - - org.eclipse.net4j.util.ui.actions.SafeAction

- All Implemented Interfaces:
    IAction
  Direct Known Subclasses:
    LongRunningAction, MasterDetailsView.RefreshAction, SashLayoutAction

      public abstract class SafeAction
      extends Action

  Author:
    Eike Stepper

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `INTERACTIVE`

    - ### 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 and Description
    `SafeAction()`
    `SafeAction(java.lang.String text)`
    `SafeAction(java.lang.String text, ImageDescriptor image)`
    `SafeAction(java.lang.String text, int style)`
    `SafeAction(java.lang.String text, java.lang.String toolTipText)`
    `SafeAction(java.lang.String text, java.lang.String toolTipText, ImageDescriptor image)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Shell` | `getShell()`
    `void` | `run()`
    `protected abstract void` | `safeRun()`

    - ### 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, firePropertyChange, firePropertyChange, removePropertyChangeListener`

    - ### Methods inherited from class org.eclipse.core.commands.common.EventManager

      `addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INTERACTIVE

          public static final java.lang.String INTERACTIVE

  - ### Constructor Detail

    - #### SafeAction

          public SafeAction()

    - #### SafeAction

          public SafeAction(java.lang.String text,
                            java.lang.String toolTipText,
                            ImageDescriptor image)

    - #### SafeAction

          public SafeAction(java.lang.String text,
                            java.lang.String toolTipText)

    - #### SafeAction

          public SafeAction(java.lang.String text,
                            ImageDescriptor image)

    - #### SafeAction

          public SafeAction(java.lang.String text,
                            int style)

    - #### SafeAction

          public SafeAction(java.lang.String text)

  - ### Method Detail

    - #### getShell

          public Shell getShell()

      Since:
        3.5

    - #### run

          public final void run()

      Specified by:
        `run` in interface `IAction`
      Overrides:
        `run` in class `Action`

    - #### safeRun

          protected abstract void safeRun()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html