1 /*******************************************************************************
 
   2  * Copyright (c) 2000, 2004 IBM Corporation 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 API and implementation
 
  10  *******************************************************************************/
 
  11 package net.sourceforge.phpdt.internal.ui.actions;
 
  13 import net.sourceforge.phpdt.internal.ui.IJavaHelpContextIds;
 
  14 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
 
  16 import org.eclipse.jface.action.Action;
 
  17 import org.eclipse.ui.PlatformUI;
 
  20  * This is an action template for actions that toggle whether it links its
 
  21  * selection to the active editor.
 
  25 public abstract class AbstractToggleLinkingAction extends Action {
 
  28          * Constructs a new action.
 
  30         public AbstractToggleLinkingAction() {
 
  31                 super(ActionMessages.getString("ToggleLinkingAction.label")); //$NON-NLS-1$
 
  32                 setDescription(ActionMessages
 
  33                                 .getString("ToggleLinkingAction.description")); //$NON-NLS-1$
 
  34                 setToolTipText(ActionMessages.getString("ToggleLinkingAction.tooltip")); //$NON-NLS-1$
 
  35                 PHPUiImages.setLocalImageDescriptors(this, "synced.gif"); //$NON-NLS-1$
 
  36                 PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
 
  37                                 IJavaHelpContextIds.LINK_EDITOR_ACTION);
 
  43         public abstract void run();