diff options
Diffstat (limited to 'org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java')
-rw-r--r-- | org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java b/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java deleted file mode 100644 index 8507ffccc1a..00000000000 --- a/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/TaskRulerAction.java +++ /dev/null @@ -1,76 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2000, 2003 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Common Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/cpl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - - -package org.eclipse.ui.texteditor; - - -import java.util.ResourceBundle; - -import org.eclipse.core.resources.IMarker; -import org.eclipse.core.resources.IResource; - -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.text.source.IVerticalRulerInfo; - -import org.eclipse.ui.views.tasklist.TaskPropertiesDialog; - - - -/** - * Adapter for the marker ruler action creating/removing tasks. - * @since 2.0 - */ -public class TaskRulerAction extends AbstractRulerActionDelegate { - - /** - * Adds a task marker over the ruler context menu. Uses the Workbench's Task properties dialog. - */ - static class TaskMarkerRulerAction extends MarkerRulerAction { - - /** - * Creates a new action for the given ruler and editor. The action configures - * its visual representation from the given resource bundle. - * - * @param bundle the resource bundle - * @param prefix a prefix to be prepended to the various resource keys - * (described in <code>ResourceAction</code> constructor), or - * <code>null</code> if none - * @param editor the text editor - * @param ruler the vertical ruler info - * @see ResourceAction#ResourceAction - */ - public TaskMarkerRulerAction(ResourceBundle bundle, String prefix, ITextEditor editor, IVerticalRulerInfo ruler) { - super(bundle, prefix, editor, ruler, IMarker.TASK, false); - } - - /* - * @see MarkerRulerAction#addMarker() - */ - protected void addMarker() { - IResource resource= getResource(); - if (resource == null) - return; - - TaskPropertiesDialog dialog = new TaskPropertiesDialog(getTextEditor().getSite().getShell()); - dialog.setResource(resource); - dialog.setInitialAttributes(getInitialAttributes()); - dialog.open(); - } - } - - /* - * @see AbstractRulerActionDelegate#createAction(ITextEditor, IVerticalRulerInfo) - */ - protected IAction createAction(ITextEditor editor, IVerticalRulerInfo rulerInfo) { - return new TaskMarkerRulerAction(TextEditorMessages.getResourceBundle(), "Editor.ManageTasks.", editor, rulerInfo); //$NON-NLS-1$ - } -} |