org.eclipse.emf.mapping.action
Class NameMatchMappingAction

java.lang.Object
  extended byorg.eclipse.emf.edit.ui.action.CommandAction
      extended byorg.eclipse.emf.mapping.action.NameMatchMappingAction
All Implemented Interfaces:
CommandStackListener, IActionDelegate, IEditorActionDelegate

public class NameMatchMappingAction
extends CommandAction
implements CommandStackListener


Nested Class Summary
static class NameMatchMappingAction.DelegateCommand
           
 
Field Summary
 
Fields inherited from class org.eclipse.emf.edit.ui.action.CommandAction
action, collection, command, editingDomain, editorPart
 
Constructor Summary
NameMatchMappingAction()
           
 
Method Summary
 void commandStackChanged(EventObject event)
          Called when the CommandStack's state has changed.
protected  Command createActionCommand(EditingDomain editingDomain, Collection collection)
          Match the command for this action
protected  Object getDefaultImage()
          This returns the image that is used if the command does not provide an override.
protected  ImageDescriptor objectToImageDescriptor(Object object)
           
 void selectionChanged(IAction action, ISelection selection)
          This is invoked by the framework so that the action state can be updated.
 void setActiveEditor(IAction action, IEditorPart editorPart)
          The framework calls this so that we can register against this editor.
 
Methods inherited from class org.eclipse.emf.edit.ui.action.CommandAction
getDefaultImageDescriptor, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NameMatchMappingAction

public NameMatchMappingAction()
Method Detail

setActiveEditor

public void setActiveEditor(IAction action,
                            IEditorPart editorPart)
Description copied from class: CommandAction
The framework calls this so that we can register against this editor. We use this as an opportunity to record the action and the editor part for later use.

Specified by:
setActiveEditor in interface IEditorActionDelegate
Overrides:
setActiveEditor in class CommandAction

commandStackChanged

public void commandStackChanged(EventObject event)
Description copied from interface: CommandStackListener
Called when the CommandStack's state has changed.

Specified by:
commandStackChanged in interface CommandStackListener
Parameters:
event - the event.

selectionChanged

public void selectionChanged(IAction action,
                             ISelection selection)
Description copied from class: CommandAction
This is invoked by the framework so that the action state can be updated.

Specified by:
selectionChanged in interface IActionDelegate
Overrides:
selectionChanged in class CommandAction

getDefaultImage

protected Object getDefaultImage()
This returns the image that is used if the command does not provide an override.


objectToImageDescriptor

protected ImageDescriptor objectToImageDescriptor(Object object)
Overrides:
objectToImageDescriptor in class CommandAction

createActionCommand

protected Command createActionCommand(EditingDomain editingDomain,
                                      Collection collection)
Match the command for this action

Overrides:
createActionCommand in class CommandAction

Copyright 2001-2004 IBM Corporation and others.
All Rights Reserved.