KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > markers > internal > ActionAddGlobalTask


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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
12 package org.eclipse.ui.views.markers.internal;
13
14 import org.eclipse.jface.action.Action;
15 import org.eclipse.ui.IWorkbenchPart;
16 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
17
18 /**
19  * The ActionAddGlobalTask is the action for adding a global task.
20  *
21  */

22 public class ActionAddGlobalTask extends Action {
23
24     private static final String JavaDoc ENABLED_IMAGE_PATH = "elcl16/addtsk_tsk.gif"; //$NON-NLS-1$
25

26     private IWorkbenchPart part;
27
28     /**
29      * Create a new instance of the global task.
30      * @param part
31      */

32     public ActionAddGlobalTask(IWorkbenchPart part) {
33         setText(MarkerMessages.addGlobalTaskAction_title);
34         setImageDescriptor(IDEWorkbenchPlugin.getIDEImageDescriptor(ENABLED_IMAGE_PATH));
35         setToolTipText(MarkerMessages.addGlobalTaskAction_tooltip);
36         this.part = part;
37     }
38
39     public void run() {
40         DialogTaskProperties dialog = new DialogTaskProperties(part.getSite()
41                 .getShell(), MarkerMessages.addGlobalTaskDialog_title);
42         dialog.open();
43     }
44 }
45
Popular Tags