package org.cookbook.ch12.MenuPlugInFromScratch;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
/**
* TODO: Provide description for "Action1".
* @see IWorkbenchWindowActionDelegate
*/
public class Action1 implements IWorkbenchWindowActionDelegate {
private IWorkbenchWindow window;
/**
* TODO: Implement the "Action1" constructor.
*/
public Action1() {
}
/**
* TODO: Implement "run".
* @see IWorkbenchWindowActionDelegate#run
*/
public void run(IAction action) {
MessageDialog.openInformation(
window.getShell(),
"New Plug-in",
"This plug-in is functional.");
}
/**
* TODO: Implement "selectionChanged".
* @see IWorkbenchWindowActionDelegate#selectionChanged
*/
public void selectionChanged(IAction action, ISelection selection) {
}
/**
* TODO: Implement "dispose".
* @see IWorkbenchWindowActionDelegate#dispose
*/
public void dispose() {
}
/**
* TODO: Implement "init".
* @see IWorkbenchWindowActionDelegate#init
*/
public void init(IWorkbenchWindow window) {
this.window = window;
}
}
|