Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Runtime

org.eclipse.gmf.runtime.common.ui.action.global
Class GlobalAction

java.lang.Object
  extended by AbstractActionHandler
      extended by 
org.eclipse.gmf.runtime.common.ui.action.global.GlobalAction
Direct Known Subclasses:
GlobalBookmarkAction, GlobalCloseProjectAction, GlobalOpenProjectAction, GlobalPrintAction, GlobalRedoAction, GlobalUndoAction

public abstract class GlobalAction
extends AbstractActionHandler

The abstract parent of all concrete global actions. A concrete global action needs to override the getActionId() method. The concrete global action could override the createContext() and createCompoundCommand() methods.


Constructor Summary
GlobalAction ( IWorkbenchPage workbenchPage)
          Creates a GlobalAction.
GlobalAction ( IWorkbenchPart workbenchPart)
          Creates a GlobalAction.
 
Method Summary
protected   CompositeCommand createCompositeCommand (java.util.List commands)
          Returns a CompositeCommand whose undo context is derived from my workbench part.
protected   IGlobalActionContext createContext ()
          Returns a IGlobalActionContext
protected  void doRun ( IProgressMonitor progressMonitor)
           
abstract  java.lang.String getActionId ()
          Returns the GlobalActionId handled by this action
protected  java.util.List getGlobalActionHandlerData ()
          Returns a list of GlobalActionHandlerData.
protected  java.util.List getObjectContextGlobalActionHandlerData ()
          Returns a list with a GlobalActionHandlerData object containing a context of Object.
protected   IUndoContext getUndoContext ()
          Gets the undo context from my workbench part.
protected  java.lang.String getWorkbenchActionConstant ()
          Returns the workbenchActionConstant.
 void init ()
           
 void refresh ()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalAction

public GlobalAction(
IWorkbenchPart workbenchPart)
Creates a GlobalAction.

Parameters:
workbenchPart - The part associated with this action

GlobalAction

public GlobalAction(
IWorkbenchPage workbenchPage)
Creates a GlobalAction.

Parameters:
workbenchPage - The part associated with this action
Method Detail

doRun

protected void doRun(
IProgressMonitor progressMonitor)

refresh

public void refresh()

getActionId

public abstract java.lang.String getActionId()
Returns the GlobalActionId handled by this action

Returns:
int

createCompositeCommand

protected 
CompositeCommand createCompositeCommand(java.util.List commands)
Returns a CompositeCommand whose undo context is derived from my workbench part.

Parameters:
commands - a list of commands to compose into a CompositeCommand
Returns:
the CompositeCommand

getUndoContext

protected 
IUndoContext getUndoContext()
Gets the undo context from my workbench part. May be null.

Returns:
my undo context

createContext

protected 
IGlobalActionContext createContext()
Returns a IGlobalActionContext

Returns:
IGlobalActionContext

getGlobalActionHandlerData

protected java.util.List getGlobalActionHandlerData()
Returns a list of GlobalActionHandlerData. Handles different types of selections

Returns:
List

getWorkbenchActionConstant

protected java.lang.String getWorkbenchActionConstant()
Returns the workbenchActionConstant.

Returns:
String

getObjectContextGlobalActionHandlerData

protected java.util.List getObjectContextGlobalActionHandlerData()
Returns a list with a GlobalActionHandlerData object containing a context of Object. You can have getObjectContextGlobalActionHandlerData call this instead.

Returns:
List with a GlobalActionHandlerData object containing a context of Object

init

public void init()

Runtime

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire