org.infai.emo.matcher.editor.action
Class PopupAction

java.lang.Object
  extended by org.infai.emo.matcher.editor.action.PopupAction
All Implemented Interfaces:
org.eclipse.ui.IActionDelegate, org.eclipse.ui.IWorkbenchWindowActionDelegate

public class PopupAction
extends java.lang.Object
implements org.eclipse.ui.IWorkbenchWindowActionDelegate

This class is called when the user selects one or two EMF models and clicks the "Model Operations/compare Models" context-menu entry.
The class opens a new Edtitor for the ModelMatcher and a wizard for importing and comparing both models.

Version:
1.1.0
Author:
Stanley Hillner
See Also:
IWorkbenchWindowActionDelegate

Field Summary
private  ModelMatcherEditor editor
          The editor in which the models shall be imported.
private  org.eclipse.jface.viewers.ISelection selection
          The selection of the treeViewer in which the user selected the models.
 
Constructor Summary
PopupAction()
           
 
Method Summary
 void dispose()
          
 void init(org.eclipse.ui.IWorkbenchWindow window)
          
 void run(org.eclipse.jface.action.IAction action)
          Method is called after the user clicked the context-menu entry.
 void selectionChanged(org.eclipse.jface.action.IAction action, org.eclipse.jface.viewers.ISelection selection)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

selection

private org.eclipse.jface.viewers.ISelection selection
The selection of the treeViewer in which the user selected the models.

See Also:
ISelection

editor

private ModelMatcherEditor editor
The editor in which the models shall be imported.

See Also:
ModelMatcherEditor
Constructor Detail

PopupAction

public PopupAction()
Method Detail

run

public void run(org.eclipse.jface.action.IAction action)
Method is called after the user clicked the context-menu entry.
Opens the ModelChooser with the TreeSelection.

Specified by:
run in interface org.eclipse.ui.IActionDelegate
Parameters:
action - the action caused by the user.
See Also:
IActionDelegate.run(IAction)

selectionChanged

public void selectionChanged(org.eclipse.jface.action.IAction action,
                             org.eclipse.jface.viewers.ISelection selection)

Specified by:
selectionChanged in interface org.eclipse.ui.IActionDelegate

dispose

public void dispose()

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchWindowActionDelegate

init

public void init(org.eclipse.ui.IWorkbenchWindow window)

Specified by:
init in interface org.eclipse.ui.IWorkbenchWindowActionDelegate