Templates were updated by pteague. Also a little change by ed_mann.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / ui / actions / AbstractToggleLinkingAction.java
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
7  *
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.ui.actions;
12
13 import net.sourceforge.phpdt.internal.ui.IJavaHelpContextIds;
14 import net.sourceforge.phpdt.internal.ui.PHPUiImages;
15
16 import org.eclipse.jface.action.Action;
17 import org.eclipse.ui.PlatformUI;
18
19 /**
20  * This is an action template for actions that toggle whether it links its
21  * selection to the active editor.
22  * 
23  * @since 3.0
24  */
25 public abstract class AbstractToggleLinkingAction extends Action {
26
27         /**
28          * Constructs a new action.
29          */
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);
38         }
39
40         /**
41          * Runs the action.
42          */
43         public abstract void run();
44 }