org.eclipse.emf.mapping.action
Class AddRootTopAction

java.lang.Object
  extended by org.eclipse.emf.edit.ui.action.CommandAction
      extended by org.eclipse.emf.mapping.action.AddRootTopAction
All Implemented Interfaces:
IActionDelegate, IActionDelegate2, IEditorActionDelegate, IViewActionDelegate
Direct Known Subclasses:
AddInputRootAction

public class AddRootTopAction
extends CommandAction

This adds new root inputs to the mapping domain's root mapping.


Field Summary
 
Fields inherited from class org.eclipse.emf.edit.ui.action.CommandAction
action, collection, command, editingDomain, editorPart, workbenchPart
 
Constructor Summary
AddRootTopAction()
           
 
Method Summary
protected  java.util.Collection<?> getTopsToAdd()
          This method should be overriden with a domain-specific implementation that returns the inputs to be added, e.g., by querying the user with a dialog.
 void run(IAction action)
          The action must have been enabled for this to have been called, so we must have stored the selection already by this point.
 void selectionChanged(IAction action, ISelection selection)
          This action ignores the selection.
 void setActiveWorkbenchPart(IWorkbenchPart workbenchPart)
          This records the specified workbench part, and if it is an editing domain provider, its editing domain.
 
Methods inherited from class org.eclipse.emf.edit.ui.action.CommandAction
createActionCommand, dispose, getDefaultImageDescriptor, init, init, objectToImageDescriptor, runWithEvent, setActiveEditor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AddRootTopAction

public AddRootTopAction()
Method Detail

getTopsToAdd

protected java.util.Collection<?> getTopsToAdd()
This method should be overriden with a domain-specific implementation that returns the inputs to be added, e.g., by querying the user with a dialog.


selectionChanged

public void selectionChanged(IAction action,
                             ISelection selection)
This action ignores the selection.

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

run

public void run(IAction action)
Description copied from class: CommandAction
The action must have been enabled for this to have been called, so we must have stored the selection already by this point.

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

setActiveWorkbenchPart

public void setActiveWorkbenchPart(IWorkbenchPart workbenchPart)
Description copied from class: CommandAction
This records the specified workbench part, and if it is an editing domain provider, its editing domain.

Overrides:
setActiveWorkbenchPart in class CommandAction

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