1 /**********************************************************************
 
   2 Copyright (c) 2000, 2002 IBM Corp. and others.
 
   3 All rights reserved. This program and the accompanying materials
 
   4 are made available under the terms of the Common Public License v1.0
 
   5 which accompanies this distribution, and is available at
 
   6 http://www.eclipse.org/legal/cpl-v10.html
 
   9     IBM Corporation - Initial implementation
 
  10     Klaus Hartlage - www.eclipseproject.de
 
  11 **********************************************************************/
 
  12 package net.sourceforge.phpeclipse.actions;
 
  14 import org.eclipse.jface.action.IAction;
 
  15 import org.eclipse.jface.dialogs.MessageDialog;
 
  16 import org.eclipse.ui.IEditorActionDelegate;
 
  17 import org.eclipse.ui.IEditorInput;
 
  18 import org.eclipse.ui.IEditorPart;
 
  19 import org.eclipse.ui.actions.ActionDelegate;
 
  20 import org.eclipse.ui.internal.EditorPluginAction;
 
  22 public class PHPEclipseShowContextHelp
 
  23   extends ActionDelegate
 
  24   implements IEditorActionDelegate {
 
  26 private IEditorPart editor;
 
  28    * @see ActionDelegate#run(IAction)
 
  30   public void run(IAction action) {
 
  31     EditorPluginAction editorPluginAction = (EditorPluginAction) action;
 
  32     IEditorInput input = editor.getEditorInput();
 
  33     // Add your code here to perform the action
 
  34     MessageDialog.openInformation(
 
  35       editor.getSite().getShell(),
 
  41    * @see IEditorActionDelegate#setActiveEditor(IAction, IEditorPart)
 
  43   public void setActiveEditor(IAction action, IEditorPart targetEditor) {
 
  44       this.editor = targetEditor;