01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.internal.ui.actions;
11:
12: import org.eclipse.jface.action.Action;
13:
14: import org.eclipse.ui.PlatformUI;
15:
16: import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
17: import org.eclipse.jdt.internal.ui.JavaPluginImages;
18:
19: /**
20: * This is an action template for actions that toggle whether
21: * it links its 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.ToggleLinkingAction_label);
32: setDescription(ActionMessages.ToggleLinkingAction_description);
33: setToolTipText(ActionMessages.ToggleLinkingAction_tooltip);
34: JavaPluginImages.setLocalImageDescriptors(this , "synced.gif"); //$NON-NLS-1$
35: PlatformUI.getWorkbench().getHelpSystem().setHelp(this ,
36: IJavaHelpContextIds.LINK_EDITOR_ACTION);
37: }
38:
39: /**
40: * Runs the action.
41: */
42: public abstract void run();
43: }
|