Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2007-06-14 16:38:09 -0400
committermkersten2007-06-14 16:38:09 -0400
commitbc31015f1e3ee0c4b8974a4a1d7949ec73b7e4b0 (patch)
tree9ad58d0f7232d1348f05f2214b7bd6b22cddf1e7
parent134e01595bb99c1675fbfe3d2e8d3f79c4b0c95c (diff)
downloadorg.eclipse.mylyn.tasks-bc31015f1e3ee0c4b8974a4a1d7949ec73b7e4b0.tar.gz
org.eclipse.mylyn.tasks-bc31015f1e3ee0c4b8974a4a1d7949ec73b7e4b0.tar.xz
org.eclipse.mylyn.tasks-bc31015f1e3ee0c4b8974a4a1d7949ec73b7e4b0.zip
RESOLVED - bug 183593: Move WebQueryHit and WebTask back to org.eclipse.mylar.tasks.web
https://bugs.eclipse.org/bugs/show_bug.cgi?id=183593
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WebTask.java63
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java4
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java11
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java4
6 files changed, 12 insertions, 76 deletions
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WebTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WebTask.java
deleted file mode 100644
index 8581bae75..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/WebTask.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004 - 2006 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.mylyn.internal.tasks.core;
-
-import org.eclipse.mylyn.tasks.core.AbstractTask;
-
-/**
- * Task used with generic web-based repositories
- *
- * @author Eugene Kuleshov
- */
-public class WebTask extends AbstractTask {
-
- // TODO: move
- public static final String REPOSITORY_TYPE = "web";
-
- private static final String UNKNOWN_OWNER = "<unknown>";
-
- private final String taskPrefix;
-
- private final String repsitoryType;
-
- public WebTask(String id, String label, String taskPrefix, String repositoryUrl, String repsitoryType) {
- super(repositoryUrl, id, label);
- this.taskPrefix = taskPrefix;
- this.repsitoryType = repsitoryType;
- setTaskUrl(taskPrefix + id);
- }
-
- public String getTaskPrefix() {
- return this.taskPrefix;
- }
-
- @Override
- public String getRepositoryKind() {
- return repsitoryType;
- }
-
- @Override
- public String getTaskKey() {
- return null;
- }
-
- public String getOwner() {
- return UNKNOWN_OWNER;
- }
-
- @Override
- public boolean isLocal() {
- // ignore
- return false;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
index 4fb65a10f..e1dfb29a7 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTask.java
@@ -175,6 +175,10 @@ public abstract class AbstractTask extends AbstractTaskContainer {
return RepositoryTaskHandleUtil.getHandle(repositoryUrl, taskId);
}
+ /**
+ * True for tasks that can be modified without a round-trip to a server. For example,
+ * such a task can be marked completed via the Task List.
+ */
public abstract boolean isLocal();
public abstract String getRepositoryKind();
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
index 14774c94a..9b4b2ae10 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java
@@ -21,12 +21,12 @@ import junit.framework.TestCase;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.mylyn.internal.tasks.core.WebTask;
import org.eclipse.mylyn.internal.tasks.ui.MoveToCategoryMenuContributor;
import org.eclipse.mylyn.internal.tasks.ui.TaskPriorityFilter;
import org.eclipse.mylyn.internal.tasks.ui.actions.MarkTaskCompleteAction;
import org.eclipse.mylyn.internal.tasks.ui.actions.NewCategoryAction;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
+import org.eclipse.mylyn.internal.web.tasks.WebTask;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.ITaskListChangeListener;
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java
index 62120d04a..aaab8ee19 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java
@@ -14,7 +14,6 @@ package org.eclipse.mylyn.internal.tasks.ui.actions;
import java.util.List;
import org.eclipse.jface.action.Action;
-import org.eclipse.mylyn.internal.tasks.core.WebTask;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.AbstractTaskContainer;
@@ -39,11 +38,11 @@ public class MarkTaskCompleteAction extends Action {
setImageDescriptor(TasksUiImages.TASK_COMPLETE);
if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof AbstractTask)) {
AbstractTask task = (AbstractTask) selectedElements.get(0);
- if (task instanceof WebTask) {
- setEnabled(true);
- } else {
- setEnabled(task.isLocal());
- }
+// if (task instanceof WebTask) {
+// setEnabled(true);
+// } else {
+ setEnabled(task.isLocal());
+// }
// } else if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof WebQueryHit)) {
// setEnabled(true);
} else {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
index 9a2ebc251..bedae69a8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/AbstractRepositoryConnectorUi.java
@@ -20,7 +20,6 @@ import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.mylyn.core.MylarStatusHandler;
import org.eclipse.mylyn.internal.tasks.core.LocalTask;
-import org.eclipse.mylyn.internal.tasks.core.WebTask;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.internal.tasks.ui.wizards.CommonAddExistingTaskWizard;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
@@ -121,9 +120,6 @@ public abstract class AbstractRepositoryConnectorUi {
* Task kind overlay, recommended to override with connector-specific overlay.
*/
public ImageDescriptor getTaskKindOverlay(AbstractTask task) {
- if (!(task instanceof LocalTask) && (!hasRichEditor() || task instanceof WebTask)) {
- return TasksUiImages.OVERLAY_WEB;
- }
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
index c2d30f35d..3de22324d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java
@@ -44,7 +44,6 @@ import org.eclipse.mylyn.internal.tasks.core.RepositoryTaskHandleUtil;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskDelegate;
import org.eclipse.mylyn.internal.tasks.core.TaskDataManager;
-import org.eclipse.mylyn.internal.tasks.core.WebTask;
import org.eclipse.mylyn.internal.tasks.ui.ITasksUiConstants;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPreferenceConstants;
import org.eclipse.mylyn.internal.tasks.ui.WorkspaceAwareContextStore;
@@ -925,7 +924,8 @@ public class TaskListManager implements IPropertyChangeListener {
}
public boolean isOwnedByUser(AbstractTask task) {
- if (task instanceof WebTask || (task instanceof AbstractTask && ((AbstractTask) task).isLocal())) {
+// if (task instanceof WebTask || (task instanceof AbstractTask && ((AbstractTask) task).isLocal())) {
+ if (task.isLocal()) {
return true;
}

Back to the top