Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.eclipse.ui.actions
Class ActionFactory

    java.lang.Object
      org.eclipse.ui.actions.ActionFactory

public abstract class ActionFactory
extends Object

Access to standard actions provided by the workbench.

Most of the functionality of this class is provided by static methods and fields. Example usage:

     MenuManager menu = ...;
     ActionFactory.IWorkbenchAction closeEditorAction
        = ActionFactory.CLOSE.create(window);
     menu.add(closeEditorAction);

Clients may declare other classes that provide additional application-specific action factories.

Since:
  3.0

Nested Class Summary
`static interface` | `ActionFactory.IWorkbenchAction` Interface for a workbench action.

Field Summary
`static ActionFactory` | `ABOUT` Workbench action: Displays the About dialog.
`static ActionFactory` | `ACTIVATE_EDITOR` Workbench action (id "activateEditor"): Activate the most recently used editor.
`static ActionFactory` | `BACK` Workbench action (id "back"): Back.
`static ActionFactory` | `BACKWARD_HISTORY` Workbench action (id "backardHistory"): Backward in the navigation history.
`static ActionFactory` | `CLOSE` Workbench action (id "close"): Close the active editor.
`static ActionFactory` | `CLOSE_ALL` Workbench action (id "closeAll"): Close all open editors.
`static ActionFactory` | `CLOSE_ALL_PERSPECTIVES` Workbench action (id "closeAllPerspectives"): Closes all perspectives.
`static ActionFactory` | `CLOSE_ALL_SAVED` Workbench action (id "closeAllSaved"): Close all open editors except those with unsaved changes.
`static ActionFactory` | `CLOSE_PERSPECTIVE` Workbench action (id "closePerspective"): Closes the current perspective.
`static ActionFactory` | `COPY` Workbench action (id "copy"): Copy.
`static ActionFactory` | `CUT` Workbench action (id "cut"): Cut.
`static ActionFactory` | `DELETE` Workbench action (id "delete"): Delete.
`static ActionFactory` | `EDIT_ACTION_SETS` Workbench action (id "editActionSets"): Edit the action sets.
`static ActionFactory` | `EXPORT` Workbench action (id "export"): Opens the export wizard.
`static ActionFactory` | `FIND` Workbench action (id "find"): Find.
`static ActionFactory` | `FORWARD` Workbench action (id "forward"): Forward.
`static ActionFactory` | `FORWARD_HISTORY` Workbench action (id "forwardHistory"): Forward in the navigation history.
`static ActionFactory` | `GO_INTO` Workbench action (id "goInto"): Go Into.
`static ActionFactory` | `HELP_CONTENTS` Workbench action (id "helpContents"): Open the help contents.
`static ActionFactory` | `IMPORT` Workbench action (id "import"): Opens the import wizard.
`static ActionFactory` | `INTRO` Workbench action (id "intro"): Activate the introduction extension.
`static ActionFactory` | `LOCK_TOOL_BAR` Workbench action (id "lockToolBar"): Lock/unlock the workbench window tool bar.
`static ActionFactory` | `MAXIMIZE` Workbench action (id "maximize"): Maximize/restore the active part.
`static ActionFactory` | `MOVE` Workbench action (id "move"): Move.
`static ActionFactory` | `NEW` Workbench action (id "new"): Opens the new wizard.
`static ActionFactory` | `NEXT` Workbench action (id "next"): Next.
`static ActionFactory` | `NEXT_EDITOR` Workbench action (id "nextEditor"): Next editor.
`static ActionFactory` | `NEXT_PART` Workbench action (id "nextPart"): Next part.
`static ActionFactory` | `NEXT_PERSPECTIVE` Workbench action (id "nextPerspective"): Next perspective.
`static ActionFactory` | `OPEN_NEW_WINDOW` Workbench action (id "openNewWindow"): Open a new workbench window.
`static ActionFactory` | `PASTE` Workbench action (id "paste"): Paste.
`static ActionFactory` | `PREFERENCES` Workbench action (id "preferences"): Displays the Preferences dialog.
`static ActionFactory` | `PREVIOUS` Workbench action (id "previous"): Previous.
`static ActionFactory` | `PREVIOUS_EDITOR` Workbench action (id "previousEditor"): Previous editor.
`static ActionFactory` | `PREVIOUS_PART` Workbench action (id "previousPart"): Previous part.
`static ActionFactory` | `PREVIOUS_PERSPECTIVE` Workbench action (id "previousPerspective"): Previous perspective.
`static ActionFactory` | `PRINT` Workbench action (id "print"): Print.
`static ActionFactory` | `PROPERTIES` Workbench action (id "properties"): Properties.
`static ActionFactory` | `QUIT` Workbench action (id "quit"): Quit (close the workbench).
`static ActionFactory` | `REDO` Workbench action (id "redo"): Redo.
`static ActionFactory` | `REFRESH` Workbench action (id "refresh"): Refresh.
`static ActionFactory` | `RENAME` Workbench action (id "rename"): Rename.
`static ActionFactory` | `RESET_PERSPECTIVE` Workbench action (id "resetPerspective"): Resets the current perspective.
`static ActionFactory` | `REVERT` Workbench action (id "revert"): Revert.
`static ActionFactory` | `SAVE` Workbench action (id "save"): Save the active editor.
`static ActionFactory` | `SAVE_ALL` Workbench action (id "saveAll"): Save all open editors with unsaved changes.
`static ActionFactory` | `SAVE_AS` Workbench action (id "saveAs"): Save As for the active editor.
`static ActionFactory` | `SAVE_PERSPECTIVE` Workbench action (id "savePerspective"): Save the current perspective.
`static ActionFactory` | `SELECT_ALL` Workbench action (id "selectAll"): Select All.
`static ActionFactory` | `SHOW_EDITOR` Workbench action (id "showEditor"): Show/hide the editor area.
`static ActionFactory` | `SHOW_OPEN_EDITORS` Workbench action (id "showOpenEditors"): Show a list of open (and recently closed) editors.
`static ActionFactory` | `SHOW_PART_PANE_MENU` Workbench action (id "showPartPaneMenu"): Show the part pane menu.
`static ActionFactory` | `SHOW_VIEW_MENU` Workbench action (id "showViewMenu"): Show the view menu.
`static ActionFactory` | `SHOW_WORKBOOK_EDITORS` Workbench action (id "showWorkbookEditors"): Shows a list of open editors in the current or last active workbook.
`static ActionFactory` | `UNDO` Workbench action (id "undo"): Undo.
`static ActionFactory` | `UP` Workbench action (id "up"): Up.

Constructor Summary
`protected` | `ActionFactory(String actionId)` Creates a new workbench action factory with the given id.

Method Summary
`abstract ActionFactory.IWorkbenchAction` | `create(IWorkbenchWindow window)` Creates a new standard action for the given workbench window.
`String` | `getId()` Returns the id of this action factory.
`static void` | `linkCycleActionPair(ActionFactory.IWorkbenchAction next, ActionFactory.IWorkbenchAction previous)` Establishes bi-direction connections between the forward and backward actions of a cycle pair.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### ABOUT

    public static final ActionFactory ABOUT

  Workbench action: Displays the About dialog. This action maintains its enablement state.

  Since:
    3.0

### ACTIVATE_EDITOR

    public static final ActionFactory ACTIVATE_EDITOR

  Workbench action (id "activateEditor"): Activate the most recently used editor. This action maintains its enablement state.

### BACK

    public static final ActionFactory BACK

  Workbench action (id "back"): Back. This action is a `RetargetAction` with id "back". This action maintains its enablement state.

### BACKWARD_HISTORY

    public static final ActionFactory BACKWARD_HISTORY

  Workbench action (id "backardHistory"): Backward in the navigation history. This action maintains its enablement state.

### CLOSE

    public static final ActionFactory CLOSE

  Workbench action (id "close"): Close the active editor. This action maintains its enablement state.

### CLOSE_ALL

    public static final ActionFactory CLOSE_ALL

  Workbench action (id "closeAll"): Close all open editors. This action maintains its enablement state.

### CLOSE_ALL_PERSPECTIVES

    public static final ActionFactory CLOSE_ALL_PERSPECTIVES

  Workbench action (id "closeAllPerspectives"): Closes all perspectives. This action maintains its enablement state.

### CLOSE_ALL_SAVED

    public static final ActionFactory CLOSE_ALL_SAVED

  Workbench action (id "closeAllSaved"): Close all open editors except those with unsaved changes. This action maintains its enablement state.

### CLOSE_PERSPECTIVE

    public static final ActionFactory CLOSE_PERSPECTIVE

  Workbench action (id "closePerspective"): Closes the current perspective. This action maintains its enablement state.

### INTRO

    public static final ActionFactory INTRO

  Workbench action (id "intro"): Activate the introduction extension.

### COPY

    public static final ActionFactory COPY

  Workbench action (id "copy"): Copy. This action is a `RetargetAction` with id "copy". This action maintains its enablement state.

### CUT

    public static final ActionFactory CUT

  Workbench action (id "cut"): Cut. This action is a `RetargetAction` with id "cut". This action maintains its enablement state.

### DELETE

    public static final ActionFactory DELETE

  Workbench action (id "delete"): Delete. This action is a `RetargetAction` with id "delete". This action maintains its enablement state.

### EDIT_ACTION_SETS

    public static final ActionFactory EDIT_ACTION_SETS

  Workbench action (id "editActionSets"): Edit the action sets. This action maintains its enablement state.

### EXPORT

    public static final ActionFactory EXPORT

  Workbench action (id "export"): Opens the export wizard. This action maintains its enablement state.

### FIND

    public static final ActionFactory FIND

  Workbench action (id "find"): Find. This action is a `RetargetAction` with id "find". This action maintains its enablement state.

### FORWARD

    public static final ActionFactory FORWARD

  Workbench action (id "forward"): Forward. This action is a `RetargetAction` with id "forward". This action maintains its enablement state.

### FORWARD_HISTORY

    public static final ActionFactory FORWARD_HISTORY

  Workbench action (id "forwardHistory"): Forward in the navigation history. This action maintains its enablement state.

### GO_INTO

    public static final ActionFactory GO_INTO

  Workbench action (id "goInto"): Go Into. This action is a `RetargetAction` with id "goInto". This action maintains its enablement state.

### IMPORT

    public static final ActionFactory IMPORT

  Workbench action (id "import"): Opens the import wizard. This action maintains its enablement state.

### LOCK_TOOL_BAR

    public static final ActionFactory LOCK_TOOL_BAR

  Workbench action (id "lockToolBar"): Lock/unlock the workbench window tool bar. This action maintains its enablement state.

### MAXIMIZE

    public static final ActionFactory MAXIMIZE

  Workbench action (id "maximize"): Maximize/restore the active part. This action maintains its enablement state.

### MOVE

    public static final ActionFactory MOVE

  Workbench action (id "move"): Move. This action is a `RetargetAction` with id "move". This action maintains its enablement state.

### NEW

    public static final ActionFactory NEW

  Workbench action (id "new"): Opens the new wizard. This action maintains its enablement state.

### NEXT

    public static final ActionFactory NEXT

  Workbench action (id "next"): Next. This action is a `RetargetAction` with id "next". This action maintains its enablement state.

### NEXT_EDITOR

    public static final ActionFactory NEXT_EDITOR

  Workbench action (id "nextEditor"): Next editor. This action maintains its enablement state.

  `NEXT_EDITOR` and `PREVIOUS_EDITOR` form a cycle action pair. For a given window, use `ActionFactory.linkCycleActionPair` to connect the two.

### NEXT_PART

    public static final ActionFactory NEXT_PART

  Workbench action (id "nextPart"): Next part. This action maintains its enablement state.

  `NEXT_PART` and `PREVIOUS_PART` form a cycle action pair. For a given window, use `ActionFactory.linkCycleActionPair` to connect the two.

### NEXT_PERSPECTIVE

    public static final ActionFactory NEXT_PERSPECTIVE

  Workbench action (id "nextPerspective"): Next perspective. This action maintains its enablement state.

  `NEXT_PERSPECTIVE` and `PREVIOUS_PERSPECTIVE` form a cycle action pair. For a given window, use `ActionFactory.linkCycleActionPair` to connect the two.

### OPEN_NEW_WINDOW

    public static final ActionFactory OPEN_NEW_WINDOW

  Workbench action (id "openNewWindow"): Open a new workbench window. This action maintains its enablement state.

### PASTE

    public static final ActionFactory PASTE

  Workbench action (id "paste"): Paste. This action is a `RetargetAction` with id "paste". This action maintains its enablement state.

### PREFERENCES

    public static final ActionFactory PREFERENCES

  Workbench action (id "preferences"): Displays the Preferences dialog. This action maintains its enablement state.

### PREVIOUS

    public static final ActionFactory PREVIOUS

  Workbench action (id "previous"): Previous. This action is a `RetargetAction` with id "previous". This action maintains its enablement state.

### PREVIOUS_EDITOR

    public static final ActionFactory PREVIOUS_EDITOR

  Workbench action (id "previousEditor"): Previous editor. This action maintains its enablement state.

  `NEXT_EDITOR` and `PREVIOUS_EDITOR` form a cycle action pair. For a given window, use `ActionFactory.linkCycleActionPair` to connect the two.

### PREVIOUS_PART

    public static final ActionFactory PREVIOUS_PART

  Workbench action (id "previousPart"): Previous part. This action maintains its enablement state.

  `NEXT_PART` and `PREVIOUS_PART` form a cycle action pair. For a given window, use `ActionFactory.linkCycleActionPair` to connect the two.

### PREVIOUS_PERSPECTIVE

    public static final ActionFactory PREVIOUS_PERSPECTIVE

  Workbench action (id "previousPerspective"): Previous perspective. This action maintains its enablement state.

  `NEXT_PERSPECTIVE` and `PREVIOUS_PERSPECTIVE` form a cycle action pair. For a given window, use `ActionFactory.linkCycleActionPair` to connect the two.

### PRINT

    public static final ActionFactory PRINT

  Workbench action (id "print"): Print. This action is a `RetargetAction` with id "print". This action maintains its enablement state.

### PROPERTIES

    public static final ActionFactory PROPERTIES

  Workbench action (id "properties"): Properties. This action is a `RetargetAction` with id "properties". This action maintains its enablement state.

### QUIT

    public static final ActionFactory QUIT

  Workbench action (id "quit"): Quit (close the workbench). This action maintains its enablement state.

### REDO

    public static final ActionFactory REDO

  Workbench action (id "redo"): Redo. This action is a `RetargetAction` with id "redo". This action maintains its enablement state.

### REFRESH

    public static final ActionFactory REFRESH

  Workbench action (id "refresh"): Refresh. This action is a `RetargetAction` with id "refresh". This action maintains its enablement state.

### RENAME

    public static final ActionFactory RENAME

  Workbench action (id "rename"): Rename. This action is a `RetargetAction` with id "rename". This action maintains its enablement state.

### RESET_PERSPECTIVE

    public static final ActionFactory RESET_PERSPECTIVE

  Workbench action (id "resetPerspective"): Resets the current perspective. This action maintains its enablement state.

### REVERT

    public static final ActionFactory REVERT

  Workbench action (id "revert"): Revert. This action is a `RetargetAction` with id "revert". This action maintains its enablement state.

### SAVE

    public static final ActionFactory SAVE

  Workbench action (id "save"): Save the active editor. This action maintains its enablement state.

### SAVE_ALL

    public static final ActionFactory SAVE_ALL

  Workbench action (id "saveAll"): Save all open editors with unsaved changes. This action maintains its enablement state.

### SAVE_AS

    public static final ActionFactory SAVE_AS

  Workbench action (id "saveAs"): Save As for the active editor. This action maintains its enablement state.

### SAVE_PERSPECTIVE

    public static final ActionFactory SAVE_PERSPECTIVE

  Workbench action (id "savePerspective"): Save the current perspective. This action maintains its enablement state.

### SELECT_ALL

    public static final ActionFactory SELECT_ALL

  Workbench action (id "selectAll"): Select All. This action is a `RetargetAction` with id "selectAll". This action maintains its enablement state.

### SHOW_EDITOR

    public static final ActionFactory SHOW_EDITOR

  Workbench action (id "showEditor"): Show/hide the editor area. This action maintains its enablement state.

### SHOW_OPEN_EDITORS

    public static final ActionFactory SHOW_OPEN_EDITORS

  Workbench action (id "showOpenEditors"): Show a list of open (and recently closed) editors. This action maintains its enablement state.

### SHOW_WORKBOOK_EDITORS

    public static final ActionFactory SHOW_WORKBOOK_EDITORS

  Workbench action (id "showWorkbookEditors"): Shows a list of open editors in the current or last active workbook.

### SHOW_PART_PANE_MENU

    public static final ActionFactory SHOW_PART_PANE_MENU

  Workbench action (id "showPartPaneMenu"): Show the part pane menu. This action maintains its enablement state.

### SHOW_VIEW_MENU

    public static final ActionFactory SHOW_VIEW_MENU

  Workbench action (id "showViewMenu"): Show the view menu. This action maintains its enablement state.

### UNDO

    public static final ActionFactory UNDO

  Workbench action (id "undo"): Undo. This action is a `RetargetAction` with id "undo". This action maintains its enablement state.

### UP

    public static final ActionFactory UP

  Workbench action (id "up"): Up. This action is a `RetargetAction` with id "up". This action maintains its enablement state.

### HELP_CONTENTS

    public static final ActionFactory HELP_CONTENTS

  Workbench action (id "helpContents"): Open the help contents. This action is always enabled.

Constructor Detail

### ActionFactory

    protected ActionFactory(String actionId)

  Creates a new workbench action factory with the given id.

Parameters:
  `actionId` - the id of actions created by this action factory

Method Detail

### linkCycleActionPair

    public static void linkCycleActionPair(ActionFactory.IWorkbenchAction next,
                                           ActionFactory.IWorkbenchAction previous)

  Establishes bi-direction connections between the forward and backward actions of a cycle pair.

  Example usage:

        ActionFactory.IWorkbenchAction nextEditorAction = ActionFactory.NEXT_EDITOR.create(window); ActionFactory.IWorkbenchAction previousEditorAction = ActionFactory.PREVIOUS_EDITOR.create(window); ActionFactory.linkCycleActionPair(nextEditorAction, previousEditorAction);

  Parameters:
    `next` - the action that moves forward
    `previous` - the action that moves backward

### create

    public abstract ActionFactory.IWorkbenchAction create(IWorkbenchWindow window)

  Creates a new standard action for the given workbench window. The action has an id as specified by the particular factory.

  Actions automatically register listeners against the workbench window so that they can keep their enablement state up to date. Ordinarily, the window's references to these listeners will be dropped automatically when the window closes. However, if the client needs to get rid of an action while the window is still open, the client must call `dispose`to give the action an opportunity to deregister its listeners and to perform any other cleanup.

  Parameters:
    `window` - the workbench window
  Returns:
    the workbench action

### getId

    public String getId()

  Returns the id of this action factory.

  Returns:
    the id of actions created by this action factory

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Eclipse Platform Release 3.0
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2004. All rights reserved.