KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > actions > AbstractToggleLinkingAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.ui.actions;
12
13 import org.eclipse.jface.action.Action;
14
15 import org.eclipse.ui.PlatformUI;
16
17 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
18 import org.eclipse.jdt.internal.ui.JavaPluginImages;
19
20
21 /**
22  * This is an action template for actions that toggle whether
23  * it links its selection to the active editor.
24  *
25  * @since 3.0
26  */

27 public abstract class AbstractToggleLinkingAction extends Action {
28     
29     /**
30      * Constructs a new action.
31      */

32     public AbstractToggleLinkingAction() {
33         super(ActionMessages.ToggleLinkingAction_label);
34         setDescription(ActionMessages.ToggleLinkingAction_description);
35         setToolTipText(ActionMessages.ToggleLinkingAction_tooltip);
36         JavaPluginImages.setLocalImageDescriptors(this, "synced.gif"); //$NON-NLS-1$
37
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.LINK_EDITOR_ACTION);
38     }
39
40     /**
41      * Runs the action.
42      */

43     public abstract void run();
44 }
45
Popular Tags