01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 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.ui.views.markers.internal;
11:
12: import org.eclipse.jface.action.Action;
13: import org.eclipse.ui.IWorkbenchPart;
14: import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
15:
16: /**
17: * The ActionAddGlobalTask is the action for adding a global task.
18: *
19: */
20: public class ActionAddGlobalTask extends Action {
21:
22: private static final String ENABLED_IMAGE_PATH = "elcl16/addtsk_tsk.gif"; //$NON-NLS-1$
23:
24: private IWorkbenchPart part;
25:
26: /**
27: * Create a new instance of the global task.
28: * @param part
29: */
30: public ActionAddGlobalTask(IWorkbenchPart part) {
31: setText(MarkerMessages.addGlobalTaskAction_title);
32: setImageDescriptor(IDEWorkbenchPlugin
33: .getIDEImageDescriptor(ENABLED_IMAGE_PATH));
34: setToolTipText(MarkerMessages.addGlobalTaskAction_tooltip);
35: this .part = part;
36: }
37:
38: public void run() {
39: DialogTaskProperties dialog = new DialogTaskProperties(part
40: .getSite().getShell(),
41: MarkerMessages.addGlobalTaskDialog_title);
42: dialog.open();
43: }
44: }
|