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.help.WorkbenchHelp;
 
  21  * This is an action template for actions that toggle whether
 
  22  * it links its selection to the active editor.
 
  26 public abstract class AbstractToggleLinkingAction extends Action {
 
  29          * Constructs a new action.
 
  31         public AbstractToggleLinkingAction() {
 
  32                 super(ActionMessages.getString("ToggleLinkingAction.label")); //$NON-NLS-1$
 
  33                 setDescription(ActionMessages.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                 WorkbenchHelp.setHelp(this, IJavaHelpContextIds.LINK_EDITOR_ACTION);
 
  42         public abstract void run();