org.eclipse.net4j.util.ui.actions

## Class SelectionListenerAction<T>

- java.lang.Object
- - org.eclipse.core.commands.common.EventManager
  - - org.eclipse.jface.action.AbstractAction
    - - org.eclipse.jface.action.Action
      - - org.eclipse.ui.actions.BaseSelectionListenerAction
        - - org.eclipse.net4j.util.ui.actions.SelectionListenerAction<T>

- All Implemented Interfaces:
    IAction, ISelectionChangedListener

      public abstract class SelectionListenerAction<T>
      extends BaseSelectionListenerAction

  Since:
    3.4
  Author:
    Christian W. Damus (CEA LIST)

- - ### 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 and Description
    `SelectionListenerAction(java.lang.String text)`
    `SelectionListenerAction(java.lang.String text, ImageDescriptor imageDescriptor)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected T` | `getSelectedObject()`
    `protected abstract java.lang.Class<T>` | `getType()`
    `protected boolean` | `updateSelection(IStructuredSelection selection)`

    - ### Methods inherited from class org.eclipse.ui.actions.BaseSelectionListenerAction

      `clearCache, getStructuredSelection, runWithEvent, selectionChanged, selectionChanged`

    - ### 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, run, 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`

- - ### Constructor Detail

    - #### SelectionListenerAction

          public SelectionListenerAction(java.lang.String text)

    - #### SelectionListenerAction

          public SelectionListenerAction(java.lang.String text,
                                         ImageDescriptor imageDescriptor)

  - ### Method Detail

    - #### updateSelection

          protected boolean updateSelection(IStructuredSelection selection)

      Overrides:
        `updateSelection` in class `BaseSelectionListenerAction`

    - #### getSelectedObject

          protected T getSelectedObject()

    - #### getType

          protected abstract java.lang.Class<T> getType()

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