Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-07-14 14:10:31 -0400
committermkersten2005-07-14 14:10:31 -0400
commit87ab906c11d1537a3c26399f99b58147470b39be (patch)
tree68307dc3f2d32a45026bf32dc3e44f23584754d7 /org.eclipse.mylyn.tasks.ui
parent0d3394b3e10a01c73d105951a3da0f4c8e13ffbb (diff)
downloadorg.eclipse.mylyn.tasks-87ab906c11d1537a3c26399f99b58147470b39be.tar.gz
org.eclipse.mylyn.tasks-87ab906c11d1537a3c26399f99b58147470b39be.tar.xz
org.eclipse.mylyn.tasks-87ab906c11d1537a3c26399f99b58147470b39be.zip
Fix for Bugzilla Bug 103748
make highlighters work with de-coupled task list
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui')
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskListExternalizer.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ClearContextAction.java76
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ToggleIntersectionModeAction.java41
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java4
4 files changed, 2 insertions, 123 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskListExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskListExternalizer.java
index aa8bb368b..5f6aea23e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskListExternalizer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/internal/TaskListExternalizer.java
@@ -218,7 +218,7 @@ public class TaskListExternalizer {
if (!wasRead && defaultExternalizer.canReadCategory(child)) {
defaultExternalizer.readCategory(child, tlist);
} else {
- MylarPlugin.log("Did not read: " + child.getNodeName(), this);
+// MylarPlugin.log("Did not read: " + child.getNodeName(), this);
}
} else {
for (ITaskListExternalizer externalizer : externalizers) {
@@ -237,7 +237,7 @@ public class TaskListExternalizer {
if (!wasRead && defaultExternalizer.canReadTask(child)) {
tlist.addRootTask(defaultExternalizer.readTask(child, tlist, null, null));
} else {
- MylarPlugin.log("Did not read: " + child.getNodeName(), this);
+// MylarPlugin.log("Did not read: " + child.getNodeName(), this);
}
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ClearContextAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ClearContextAction.java
deleted file mode 100644
index 29cf2c923..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ClearContextAction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * University Of British Columbia - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylar.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylar.core.MylarPlugin;
-import org.eclipse.mylar.tasks.ITask;
-import org.eclipse.mylar.tasks.TaskListImages;
-import org.eclipse.mylar.tasks.Task;
-import org.eclipse.mylar.tasks.ui.views.TaskListView;
-import org.eclipse.ui.internal.Workbench;
-
-/**
- * @author Mik Kersten and Ken Sueda
- */
-public class ClearContextAction extends Action {
-
- public static final String ID = "org.eclipse.mylar.tasks.actions.context.clear";
-
- private final TaskListView view;
-
- public ClearContextAction(TaskListView view) {
- this.view = view;
- setText("Clear Task Context");
- setToolTipText("Clear Task Context");
- setId(ID);
- setImageDescriptor(TaskListImages.ERASE_TASKSCAPE);
- }
-
- @Override
- public void run() {
- Object selectedObject = ((IStructuredSelection)this.view.getViewer().getSelection()).getFirstElement();
- if (selectedObject != null && selectedObject instanceof ITask) {
- boolean deleteConfirmed = MessageDialog.openQuestion(
- Workbench.getInstance().getActiveWorkbenchWindow().getShell(),
- "Confirm clear context",
- "Clear context for the selected task?");
- if (!deleteConfirmed)
- return;
-
- MylarPlugin.getTaskscapeManager().taskDeleted(((ITask)selectedObject).getHandle(), ((Task)selectedObject).getPath());
- this.view.getViewer().refresh();
- }
- // XXX: refactored put this somewhere
-// else if (selectedObject != null && selectedObject instanceof BugzillaHit) {
-// BugzillaTask task = ((BugzillaHit)selectedObject).getAssociatedTask();
-// if(task != null){
-// if (task.isActive()) {
-// MessageDialog.openError(Workbench.getInstance()
-// .getActiveWorkbenchWindow().getShell(), "Clear context failed",
-// "Task must be deactivated before clearing task context.");
-// return;
-// }
-// boolean deleteConfirmed = MessageDialog.openQuestion(
-// Workbench.getInstance().getActiveWorkbenchWindow().getShell(),
-// "Confirm clear context",
-// "Clear context for the selected task?");
-// if (!deleteConfirmed)
-// return;
-// MylarPlugin.getTaskscapeManager().taskDeleted(task.getHandle(), task.getPath());
-// }
-// this.view.getViewer().refresh();
-// }
- }
-} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ToggleIntersectionModeAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ToggleIntersectionModeAction.java
deleted file mode 100644
index b73564396..000000000
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/actions/ToggleIntersectionModeAction.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2005 University Of British Columbia and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * University Of British Columbia - initial API and implementation
- *******************************************************************************/
-/*
- * Created on May 11, 2005
- */
-package org.eclipse.mylar.tasks.ui.actions;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.mylar.core.MylarPlugin;
-
-/**
- * @author Mik Kersten
- */
-@Deprecated
-public class ToggleIntersectionModeAction extends Action {
-
- public ToggleIntersectionModeAction() {
- super();
- setText("Intersect Tasskscapes");
- setToolTipText("Intersect Taskscapes");
-// setImageDescriptor(TaskListImages.);
- setActionDefinitionId("org.eclipse.mylar.ui.interest.intersection");
-// setChecked(MylarUiPlugin.getDefault().isGlobalFilteringEnabled());
- }
-
- @Override
- public void run() {
- setChecked(!isChecked());
- MylarPlugin.log("not implemented", this);
-// MylarUiPlugin.getDefault().setIntersectionMode(isChecked());
-// MylarPlugin.getTaskscapeManager().notifyActivePresentationSettingsChange(ITaskscapeListener.UpdateKind.HIGHLIGHTER);
- }
-}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
index 22b1413d8..57f841dfa 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
@@ -59,7 +59,6 @@ import org.eclipse.mylar.tasks.Task;
import org.eclipse.mylar.tasks.TaskListImages;
import org.eclipse.mylar.tasks.internal.TaskCategory;
import org.eclipse.mylar.tasks.ui.TaskEditorInput;
-import org.eclipse.mylar.tasks.ui.actions.ClearContextAction;
import org.eclipse.mylar.tasks.ui.actions.CreateCategoryAction;
import org.eclipse.mylar.tasks.ui.actions.CreateTaskAction;
import org.eclipse.mylar.tasks.ui.actions.DeleteAction;
@@ -119,7 +118,6 @@ public class TaskListView extends ViewPart {
private DeleteAction delete;
private OpenTaskEditorAction doubleClickAction;
- private ClearContextAction clearSelectedTaskscapeAction;
//private Action toggleIntersectionModeAction = new ToggleIntersectionModeAction();
// private Action toggleFilteringAction = new ToggleGlobalInterestFilteringAction();
@@ -870,7 +868,6 @@ public class TaskListView extends ViewPart {
MenuManager subMenuManager = contributor.getSubMenuManager(this, (ITaskListElement)selectedObject);
if (subMenuManager != null) manager.add(subMenuManager);
}
- manager.add(clearSelectedTaskscapeAction);
}
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
updateActionEnablement(selectedObject);
@@ -940,7 +937,6 @@ public class TaskListView extends ViewPart {
completeTask = new MarkTaskCompleteAction(this);
incompleteTask = new MarkTaskIncompleteAction(this);
// rename = new RenameAction();
- clearSelectedTaskscapeAction = new ClearContextAction(this);
// moveTaskToRoot = new MoveTaskToRootAction(this);
doubleClickAction = new OpenTaskEditorAction(this);
filterCompleteTask = new FilterCompletedTasksAction(this);

Back to the top