org.eclipse.emf.mapping.action
Class AddRootTopAction

java.lang.Object
  |
  +--org.eclipse.emf.edit.ui.action.CommandAction
        |
        +--org.eclipse.emf.mapping.action.AddRootTopAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IEditorActionDelegate

public class AddRootTopAction
extends CommandAction

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


Fields inherited from class org.eclipse.emf.edit.ui.action.CommandAction
action, collection, command, editingDomain, editorPart
 
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(org.eclipse.jface.action.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(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          This action ignores the selection.
 void setActiveEditor(org.eclipse.jface.action.IAction action, org.eclipse.ui.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
createActionCommand, getDefaultImageDescriptor, objectToImageDescriptor
 
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(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)
This action ignores the selection.
Overrides:
selectionChanged in class CommandAction

run

public void run(org.eclipse.jface.action.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.
Overrides:
run in class CommandAction

setActiveEditor

public void setActiveEditor(org.eclipse.jface.action.IAction action,
                            org.eclipse.ui.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.
Overrides:
setActiveEditor in class CommandAction

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