Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2005-11-13 19:51:29 -0500
committermkersten2005-11-13 19:51:29 -0500
commit8bb2562e67033f820cbda60f5cf69d21ebe18834 (patch)
treebbd7a46a47b01eb5bc573c851ed50231c4a06e20
parent2cc92963032a083f8c92fd86ae1feed0bd9dfac5 (diff)
downloadorg.eclipse.mylyn.tasks-8bb2562e67033f820cbda60f5cf69d21ebe18834.tar.gz
org.eclipse.mylyn.tasks-8bb2562e67033f820cbda60f5cf69d21ebe18834.tar.xz
org.eclipse.mylyn.tasks-8bb2562e67033f820cbda60f5cf69d21ebe18834.zip
Fixed Bug 115705: dynamic change set in a sync view is not refreshed on task change
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaAction.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaReportsAction.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaHit.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaQueryCategory.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java26
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskHandler.java8
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskListManager.java4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTasksTools.java2
-rw-r--r--org.eclipse.mylyn.help.ui/doc/new.html5
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/ChangeMainTaskDirTest.java6
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskCategory.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskList.java349
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/internal/CompletedTaskCollector.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditorInput.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/DeleteAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/RemoveFromCategoryAction.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskActivationHistory.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListContentProvider.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java2
26 files changed, 239 insertions, 231 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaAction.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaAction.java
index f37ae3f0f..1d307812c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaAction.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaAction.java
@@ -136,11 +136,11 @@ public class RefreshBugzillaAction extends Action implements IViewActionDelegate
}
for(ITask task: MylarTasklistPlugin.getTaskListManager().getTaskList().getActiveTasks()){
if(task instanceof BugzillaTask){
- ITask found = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandle(), false);
+ ITask found = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandleIdentifier(), false);
if(found == null){
MylarTasklistPlugin.getTaskListManager().addRootTask(task);
MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Bugzilla Task Moved To Root", "Bugzilla Task " +
- BugzillaTask.getBugId(task.getHandle()) +
+ BugzillaTask.getBugId(task.getHandleIdentifier()) +
" has been moved to the root since it is activated and has disappeared from a query.");
}
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaReportsAction.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaReportsAction.java
index c30bcd3c2..f4ad3df13 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaReportsAction.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/actions/RefreshBugzillaReportsAction.java
@@ -71,11 +71,11 @@ public class RefreshBugzillaReportsAction extends Action implements IViewActionD
// bugs
for(ITask task: MylarTasklistPlugin.getTaskListManager().getTaskList().getActiveTasks()){
if(task instanceof BugzillaTask){
- ITask found = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandle(), false);
+ ITask found = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandleIdentifier(), false);
if(found == null){
MylarTasklistPlugin.getTaskListManager().addRootTask(task);
MessageDialog.openInformation(Display.getCurrent().getActiveShell(), "Bugzilla Task Moved To Root", "Bugzilla Task " +
- BugzillaTask.getBugId(task.getHandle()) +
+ BugzillaTask.getBugId(task.getHandleIdentifier()) +
" has been moved to the root since it is activated and has disappeared from a query.");
}
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaHit.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaHit.java
index c16d6f44f..4961fb09a 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaHit.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaHit.java
@@ -94,7 +94,7 @@ public class BugzillaHit implements IQueryHit {
}
}
- public String getHandle() {
+ public String getHandleIdentifier() {
return getServerName()+"-"+getID();
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaQueryCategory.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaQueryCategory.java
index 6b9c266c1..1da78b90e 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaQueryCategory.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaQueryCategory.java
@@ -121,7 +121,7 @@ public class BugzillaQueryCategory implements IQuery {
}
public void addHit(IQueryHit hit) {
- BugzillaTask task = BugzillaUiPlugin.getDefault().getBugzillaTaskListManager().getFromBugzillaTaskRegistry(hit.getHandle());
+ BugzillaTask task = BugzillaUiPlugin.getDefault().getBugzillaTaskListManager().getFromBugzillaTaskRegistry(hit.getHandleIdentifier());
hit.setAssociatedTask(task);
hits.add(hit);
}
@@ -267,7 +267,7 @@ public class BugzillaQueryCategory implements IQuery {
return null;
}
- public String getHandle() {
+ public String getHandleIdentifier() {
return handle;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java
index e870bb7b7..83ef98194 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTask.java
@@ -136,13 +136,13 @@ public class BugzillaTask extends Task {
}
public BugzillaTask(BugzillaHit hit, boolean newTask) {
- this(hit.getHandle(), hit.getDescription(false), newTask);
+ this(hit.getHandleIdentifier(), hit.getDescription(false), newTask);
setPriority(hit.getPriority());
setUrl();
}
private void setUrl() {
- int id = BugzillaTask.getBugId(getHandle());
+ int id = BugzillaTask.getBugId(getHandleIdentifier());
String url = BugzillaRepository.getBugUrlWithoutLogin(id);
if (url != null)
super.setIssueReportURL(url);
@@ -154,9 +154,9 @@ public class BugzillaTask extends Task {
return super.getDescription(truncate);
} else {
if (getState() == BugzillaTask.BugTaskState.FREE) {
- return BugzillaTask.getBugId(getHandle()) + ": <Could not find bug>";
+ return BugzillaTask.getBugId(getHandleIdentifier()) + ": <Could not find bug>";
} else {
- return BugzillaTask.getBugId(getHandle()) + ":";
+ return BugzillaTask.getBugId(getHandleIdentifier()) + ":";
}
}
// return BugzillaTasksTools.getBugzillaDescription(this);
@@ -238,10 +238,10 @@ public class BugzillaTask extends Task {
try {
// XXX make sure to send in the server name if there are multiple repositories
if (BugzillaPlugin.getDefault() == null) {
- MylarPlugin.log("Bug Beport download failed for: " + getBugId(getHandle()) + " due to bugzilla core not existing", this);
+ MylarPlugin.log("Bug Beport download failed for: " + getBugId(getHandleIdentifier()) + " due to bugzilla core not existing", this);
return null;
}
- return BugzillaRepository.getInstance().getBug(getBugId(getHandle()));
+ return BugzillaRepository.getInstance().getBug(getBugId(getHandleIdentifier()));
} catch (LoginException e) {
Workbench.getInstance().getDisplay().asyncExec(new Runnable() {
@@ -254,7 +254,7 @@ public class BugzillaTask extends Task {
Workbench.getInstance().getDisplay().asyncExec(new Runnable() {
public void run() {
((ApplicationWindow) BugzillaPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()).setStatus("Download of bug "
- + getBugId(getHandle()) + " failed due to I/O exception");
+ + getBugId(getHandleIdentifier()) + " failed due to I/O exception");
}
});
// MylarPlugin.log(e, "download failed due to I/O exception");
@@ -318,7 +318,7 @@ public class BugzillaTask extends Task {
@Override
public String toString() {
- return "bugzilla report id: " + getHandle();
+ return "bugzilla report id: " + getHandleIdentifier();
}
/**
@@ -434,7 +434,7 @@ public class BugzillaTask extends Task {
if (status.equals("RESOLVED") || status.equals("CLOSED") || status.equals("VERIFIED")) {
setCompleted(true);
}
- this.setDescription(HtmlStreamTokenizer.unescape(BugzillaTask.getBugId(getHandle()) + ": " + bugReport.getSummary()));
+ this.setDescription(HtmlStreamTokenizer.unescape(BugzillaTask.getBugId(getHandleIdentifier()) + ": " + bugReport.getSummary()));
} catch (NullPointerException npe) {
MylarPlugin.fail(npe, "Task details update failed", false);
}
@@ -466,7 +466,7 @@ public class BugzillaTask extends Task {
return new Status(IStatus.OK, MylarPlugin.IDENTIFIER, IStatus.OK, "", null);
} catch (Exception e) {
// MessageDialog.openError(null, "Error Opening Bug", "Unable to open Bug report: " + BugzillaTask.getBugId(bugTask.getHandle()));
- MylarPlugin.fail(e, "Unable to open Bug report: " + BugzillaTask.getBugId(bugTask.getHandle()), true);
+ MylarPlugin.fail(e, "Unable to open Bug report: " + BugzillaTask.getBugId(bugTask.getHandleIdentifier()), true);
}
return Status.CANCEL_STATUS;
}
@@ -486,7 +486,7 @@ public class BugzillaTask extends Task {
public boolean readBugReport() {
// XXX server name needs to be with the bug report
- IBugzillaBug tempBug = OfflineView.find(getBugId(getHandle()));
+ IBugzillaBug tempBug = OfflineView.find(getBugId(getHandleIdentifier()));
if (tempBug == null) {
bugReport = null;
return true;
@@ -528,7 +528,7 @@ public class BugzillaTask extends Task {
public void removeReport() {
// XXX do we really want to do this???
// XXX remove from registry too??
- IBugzillaBug tempBug = OfflineView.find(getBugId(getHandle()));
+ IBugzillaBug tempBug = OfflineView.find(getBugId(getHandleIdentifier()));
OfflineView.removeReport(tempBug);
// OfflineReportsFile offlineReports = BugzillaPlugin.getDefault().getOfflineReports();
// int location = offlineReports.find(getBugId(getHandle()));
@@ -624,7 +624,7 @@ public class BugzillaTask extends Task {
}
public String getStringForSortingDescription() {
- return getBugId(getHandle()) + "";
+ return getBugId(getHandleIdentifier()) + "";
}
public static long getLastRefreshTimeInMinutes(Date lastRefresh) {
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
index 67edca3e2..017af6650 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskEditorInput.java
@@ -38,10 +38,10 @@ public class BugzillaTaskEditorInput extends ExistingBugEditorInput {
private boolean offline;
public BugzillaTaskEditorInput(BugzillaTask bugTask, boolean offline) throws LoginException, IOException {
- super(BugzillaTask.getBugId(bugTask.getHandle()), offline);
+ super(BugzillaTask.getBugId(bugTask.getHandleIdentifier()), offline);
this.bugTask = bugTask;
offlineBug = bugTask.getBugReport();
- bugId = BugzillaTask.getBugId(bugTask.getHandle());
+ bugId = BugzillaTask.getBugId(bugTask.getHandleIdentifier());
bugTitle = "";
this.offline = offline;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskHandler.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskHandler.java
index 76a2cf5a0..5aa9907a4 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskHandler.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskHandler.java
@@ -77,7 +77,7 @@ public class BugzillaTaskHandler implements ITaskHandler {
task.removeReport();
MylarTasklistPlugin.getTaskListManager().deleteTask(task);
- MylarPlugin.getContextManager().contextDeleted(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextDeleted(task.getHandleIdentifier(), task.getPath());
IWorkbenchPage page = MylarTasklistPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
// if we couldn't get the page, get out of here
@@ -109,7 +109,7 @@ public class BugzillaTaskHandler implements ITaskHandler {
MessageDialog.openInformation(null, "Unable to open bug", "Unable to open the selected bugzilla task since you are currently offline");
return;
}
- String title = "Bug #" + BugzillaTask.getBugId(t.getHandle());
+ String title = "Bug #" + BugzillaTask.getBugId(t.getHandleIdentifier());
BugzillaUITools.openUrl(title, title, t.getBugUrl());
} else {
// not supported
@@ -164,7 +164,7 @@ public class BugzillaTaskHandler implements ITaskHandler {
MessageDialog.openInformation(null, "Unable to open bug", "Unable to open the selected bugzilla report since you are currently offline");
return;
}
- String title = "Bug #" + BugzillaTask.getBugId(hit.getHandle());
+ String title = "Bug #" + BugzillaTask.getBugId(hit.getHandleIdentifier());
BugzillaUITools.openUrl(title, title, hit.getBugUrl());
} else {
// not supported
@@ -211,7 +211,7 @@ public class BugzillaTaskHandler implements ITaskHandler {
public ITask taskAdded(ITask newTask) {
if(newTask instanceof BugzillaTask){
- BugzillaTask bugTask = BugzillaUiPlugin.getDefault().getBugzillaTaskListManager().getFromBugzillaTaskRegistry(newTask.getHandle());
+ BugzillaTask bugTask = BugzillaUiPlugin.getDefault().getBugzillaTaskListManager().getFromBugzillaTaskRegistry(newTask.getHandleIdentifier());
if(bugTask == null){
BugzillaUiPlugin.getDefault().getBugzillaTaskListManager().addToBugzillaTaskRegistry((BugzillaTask)newTask);
bugTask = (BugzillaTask)newTask;
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskListManager.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskListManager.java
index 333a8a33c..ede9abbdf 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskListManager.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTaskListManager.java
@@ -34,8 +34,8 @@ public class BugzillaTaskListManager implements IOfflineBugListener {
// XXX we never delete anything from this registry
public void addToBugzillaTaskRegistry(BugzillaTask task){
- if(bugzillaTaskRegistry.get(task.getHandle()) == null){
- bugzillaTaskRegistry.put(task.getHandle(), task);
+ if(bugzillaTaskRegistry.get(task.getHandleIdentifier()) == null){
+ bugzillaTaskRegistry.put(task.getHandleIdentifier(), task);
if(cat != null){
cat.internalAddTask(task);
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTasksTools.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTasksTools.java
index 9be7de674..aff27cb8c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTasksTools.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/bugzilla/ui/tasklist/BugzillaTasksTools.java
@@ -30,7 +30,7 @@ public class BugzillaTasksTools {
if (bugTask == null) return "<no info>";
String prefix = //((bugTask.isDirty()) ? ">" : "") +
- BugzillaTask.getBugId(bugTask.getHandle()) + ": ";
+ BugzillaTask.getBugId(bugTask.getHandleIdentifier()) + ": ";
if (bugTask.getState() == BugzillaTask.BugTaskState.DOWNLOADING) {
return prefix + "<Downloading bug report from server...>";
diff --git a/org.eclipse.mylyn.help.ui/doc/new.html b/org.eclipse.mylyn.help.ui/doc/new.html
index c8c731034..2cfcfea75 100644
--- a/org.eclipse.mylyn.help.ui/doc/new.html
+++ b/org.eclipse.mylyn.help.ui/doc/new.html
@@ -41,11 +41,12 @@ highlighted&nbsp; </span></p>
<table cellpadding="10" cellspacing="0" width="600" id="table97">
<tr>
<td align="left" valign="top" width="30%" bgcolor="#E0D0E6">
- <p align="right"><b>Commit resources in context to CVS</b></p>
+ <p align="right"><b>Change Set Integration</b></p>
</td>
<td valign="top" width="70%">
For an active task... if completed message is &quot;resolved..&quot;, if
- incomplete message is &quot;progress on..&quot;<p>
+ incomplete message is &quot;progress on..&quot;&nbsp; Multiple
+ active tasks not yet supported (will default to first activated).<p>
&nbsp;</td>
</tr>
<tr>
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/ChangeMainTaskDirTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/ChangeMainTaskDirTest.java
index e2a8ac941..2351020a4 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/ChangeMainTaskDirTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/ChangeMainTaskDirTest.java
@@ -52,7 +52,7 @@ public class ChangeMainTaskDirTest extends TestCase{
//Check that the main data dir task isn't in the list or the folder
File taskFile = new File(MylarPlugin.getDefault().getMylarDataDirectory() + File.separator + mainDataDirTask.getPath() + MylarTasklistPlugin.FILE_EXTENSION);
assertFalse(taskFile.exists());
- assertNull(manager.getTaskForHandle(mainDataDirTask.getHandle(), false));
+ assertNull(manager.getTaskForHandle(mainDataDirTask.getHandleIdentifier(), false));
//Check that a newly created task appears in the right place (method will check)
ITask newDataDirTask = createAndSaveTask("New Data Dir");
@@ -67,7 +67,7 @@ public class ChangeMainTaskDirTest extends TestCase{
switchMainTaskDirectory(originalMainDataDir);
//Check that the previously created main dir task is in the task list and its file exists
- assertNotNull(manager.getTaskForHandle(mainDataDirTask.getHandle(), false));
+ assertNotNull(manager.getTaskForHandle(mainDataDirTask.getHandleIdentifier(), false));
taskFile = new File(MylarPlugin.getDefault().getMylarDataDirectory() + File.separator + mainDataDirTask.getPath() + MylarTasklistPlugin.FILE_EXTENSION);
assertTrue(taskFile.exists());
@@ -83,7 +83,7 @@ public class ChangeMainTaskDirTest extends TestCase{
//Create the task and add it to the root of the task list
ITask newTask = new Task(MylarTasklistPlugin.getTaskListManager().genUniqueTaskId(), taskName, true);
manager.addRootTask(newTask);
- MylarContext mockContext = MylarPlugin.getContextManager().loadContext(newTask.getHandle(), newTask.getPath());
+ MylarContext mockContext = MylarPlugin.getContextManager().loadContext(newTask.getHandleIdentifier(), newTask.getPath());
InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT,"structureKind","handle","originId");
mockContext.parseEvent(event);
MylarPlugin.getContextManager().contextActivated(mockContext);
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java
index fb3991139..dbad6b528 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasklist/tests/TaskDataExportTest.java
@@ -47,7 +47,7 @@ public class TaskDataExportTest extends TestCase{
//Create a task and context with an interaction event to be saved
task1 = new Task(MylarTasklistPlugin.getTaskListManager().genUniqueTaskId(), "Export Test Task", true);
manager.addRootTask(task1);
- MylarContext mockContext = MylarPlugin.getContextManager().loadContext(task1.getHandle(), task1.getPath());
+ MylarContext mockContext = MylarPlugin.getContextManager().loadContext(task1.getHandleIdentifier(), task1.getPath());
InteractionEvent event = new InteractionEvent(InteractionEvent.Kind.EDIT,"structureKind","handle","originId");
mockContext.parseEvent(event);
MylarPlugin.getContextManager().contextActivated(mockContext);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java
index 9dd5d1e9f..e4014ea82 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ITaskListElement.java
@@ -39,7 +39,7 @@ public interface ITaskListElement {
public abstract void setDescription(String description);
- public abstract String getHandle();
+ public abstract String getHandleIdentifier();
public abstract void setHandle(String id);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java
index 1d103467e..a8f289d6e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/MylarTasklistPlugin.java
@@ -161,17 +161,17 @@ public class MylarTasklistPlugin extends AbstractUIPlugin implements IStartup {
private static ITaskActivityListener CONTEXT_MANAGER_TASK_LISTENER = new ITaskActivityListener() {
public void taskActivated(ITask task) {
- MylarPlugin.getContextManager().contextActivated(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextActivated(task.getHandleIdentifier(), task.getPath());
}
public void tasksActivated(List<ITask> tasks) {
for (ITask task : tasks) {
- MylarPlugin.getContextManager().contextActivated(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextActivated(task.getHandleIdentifier(), task.getPath());
}
}
public void taskDeactivated(ITask task) {
- MylarPlugin.getContextManager().contextDeactivated(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextDeactivated(task.getHandleIdentifier(), task.getPath());
}
public void taskPropertyChanged(ITask updatedTask, String property) {
@@ -337,7 +337,7 @@ public class MylarTasklistPlugin extends AbstractUIPlugin implements IStartup {
public void saveTaskListAndContexts() {
taskListManager.saveTaskList();
for(ITask task : taskListManager.getTaskList().getActiveTasks()) {
- MylarPlugin.getContextManager().saveContext(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().saveContext(task.getHandleIdentifier(), task.getPath());
}
// lastSave = new Date();
// plugin.getPreferenceStore().setValue(PREVIOUS_SAVE_DATE, lastSave.getTime());
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListManager.java
index c45dd478d..3384e625b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/TaskListManager.java
@@ -132,7 +132,7 @@ public class TaskListManager {
public void activateTask(ITask task) {
if (!MylarTasklistPlugin.getDefault().isMultipleMode()) {
- if(taskList.getActiveTasks().size() > 0 && taskList.getActiveTasks().get(0).getHandle().compareTo(task.getHandle()) != 0) {
+ if(taskList.getActiveTasks().size() > 0 && taskList.getActiveTasks().get(0).getHandleIdentifier().compareTo(task.getHandleIdentifier()) != 0) {
for (ITask t : taskList.getActiveTasks()) {
for (ITaskActivityListener listener : listeners) listener.taskDeactivated(t);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java
index 817162ae1..10381b8a0 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/DefaultTaskListExternalizer.java
@@ -102,7 +102,7 @@ public class DefaultTaskListExternalizer implements ITaskListExternalizer {
Element node = doc.createElement(getTaskTagName());
node.setAttribute(PATH, task.getPath());
node.setAttribute(LABEL, task.getDescription(false));
- node.setAttribute(HANDLE, task.getHandle());
+ node.setAttribute(HANDLE, task.getHandleIdentifier());
node.setAttribute(PRIORITY, task.getPriority());
if (task.isCompleted()) {
@@ -212,7 +212,7 @@ public class DefaultTaskListExternalizer implements ITaskListExternalizer {
if (element.hasAttribute(PATH)) {
task.setPath(element.getAttribute(PATH));
} else {
- task.setPath(task.getHandle());
+ task.setPath(task.getHandleIdentifier());
}
if (element.getAttribute(ACTIVE).compareTo(TRUE) == 0) {
@@ -362,7 +362,7 @@ public class DefaultTaskListExternalizer implements ITaskListExternalizer {
public Element createQueryHitElement(IQueryHit queryHit, Document doc, Element parent) {
Element node = doc.createElement(getQueryHitTagName());
node.setAttribute(NAME, queryHit.getDescription(false));
- node.setAttribute(HANDLE, queryHit.getHandle());
+ node.setAttribute(HANDLE, queryHit.getHandleIdentifier());
node.setAttribute(PRIORITY, queryHit.getPriority());
if (queryHit.isCompleted()) {
node.setAttribute(COMPLETE, TRUE);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskCategory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskCategory.java
index cd40120dc..54759ff54 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskCategory.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskCategory.java
@@ -60,7 +60,7 @@ public class TaskCategory implements ITaskListCategory, Serializable {
/* (non-Javadoc)
* @see org.eclipse.mylar.tasklist.ITaskListCategory#getHandle()
*/
- public String getHandle() {
+ public String getHandleIdentifier() {
return handle;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskList.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskList.java
index 768e6502d..8907979a9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskList.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/internal/TaskList.java
@@ -10,7 +10,7 @@
*******************************************************************************/
/*
* Created on Dec 22, 2004
- */
+ */
package org.eclipse.mylar.tasklist.internal;
import java.io.Serializable;
@@ -24,216 +24,223 @@ import org.eclipse.mylar.tasklist.ITask;
import org.eclipse.mylar.tasklist.ITaskListElement;
import org.eclipse.mylar.tasklist.MylarTasklistPlugin;
-
/**
* @author Mik Kersten
*/
public class TaskList implements Serializable {
- private static final long serialVersionUID = 3618984485791021105L;
+ private static final long serialVersionUID = 3618984485791021105L;
+
+ private List<ITask> rootTasks = new ArrayList<ITask>();
+
+ private List<ITaskListCategory> categories = new ArrayList<ITaskListCategory>();
+
+ private List<IQuery> queries = new ArrayList<IQuery>();
- private List<ITask> rootTasks = new ArrayList<ITask>();
- private List<ITaskListCategory> categories = new ArrayList<ITaskListCategory>();
- private List<IQuery> queries = new ArrayList<IQuery>();
- private transient List<ITask> activeTasks = new ArrayList<ITask>();
-
- public void addRootTask(ITask task) {
- rootTasks.add(task);
- if (MylarTasklistPlugin.getDefault() != null) {
+ private transient List<ITask> activeTasks = new ArrayList<ITask>();
+
+ public void addRootTask(ITask task) {
+ rootTasks.add(task);
+ if (MylarTasklistPlugin.getDefault() != null) {
MylarTasklistPlugin.getDefault().saveTaskListAndContexts();
}
- }
-
- void internalAddRootTask(ITask task) {
- rootTasks.add(task);
- }
-
- public void addCategory(ITaskListCategory cat) {
- categories.add(cat);
- if (MylarTasklistPlugin.getDefault() != null) {
+ }
+
+ void internalAddRootTask(ITask task) {
+ rootTasks.add(task);
+ }
+
+ public void addCategory(ITaskListCategory cat) {
+ categories.add(cat);
+ if (MylarTasklistPlugin.getDefault() != null) {
MylarTasklistPlugin.getDefault().saveTaskListAndContexts();
}
- }
-
- public void addQuery(IQuery query) {
- queries.add(query);
- if (MylarTasklistPlugin.getDefault() != null) {
+ }
+
+ public void addQuery(IQuery query) {
+ queries.add(query);
+ if (MylarTasklistPlugin.getDefault() != null) {
MylarTasklistPlugin.getDefault().saveTaskListAndContexts();
}
- }
-
- /**
- * XXX Only public so that other externalizers can use it
- */
- public void internalAddCategory(ITaskListCategory cat) {
- categories.add(cat);
- }
-
- /**
- * XXX Only public so that other externalizers can use it
- */
- public void internalAddQuery(IQuery query) {
- queries.add(query);
- }
-
- public void setActive(ITask task, boolean active, boolean isStalled) {
- task.setActive(active, isStalled);
- if (active && !activeTasks.contains(task)) {
- activeTasks.add(task);
- } else if(!active){
- activeTasks.remove(task);
- }
-
- }
-
- public void deleteTask(ITask task) {
- boolean deleted = deleteTaskHelper(rootTasks, task);
- if (!deleted) {
+ }
+
+ /**
+ * XXX Only public so that other externalizers can use it
+ */
+ public void internalAddCategory(ITaskListCategory cat) {
+ categories.add(cat);
+ }
+
+ /**
+ * XXX Only public so that other externalizers can use it
+ */
+ public void internalAddQuery(IQuery query) {
+ queries.add(query);
+ }
+
+ public void setActive(ITask task, boolean active, boolean isStalled) {
+ task.setActive(active, isStalled);
+ if (active && !activeTasks.contains(task)) {
+ activeTasks.add(task);
+ } else if (!active) {
+ activeTasks.remove(task);
+ }
+
+ }
+
+ public void deleteTask(ITask task) {
+ boolean deleted = deleteTaskHelper(rootTasks, task);
+ if (!deleted) {
for (TaskCategory cat : getTaskCategories()) {
deleted = deleteTaskHelper(cat.getChildren(), task);
if (deleted) {
return;
}
}
- }
- if (MylarTasklistPlugin.getDefault() != null) {
+ }
+ if (MylarTasklistPlugin.getDefault() != null) {
MylarTasklistPlugin.getDefault().saveTaskListAndContexts();
}
}
-
- private boolean deleteTaskHelper(List<ITask> tasks, ITask t) {
- for (ITask task : tasks) {
- if (task.getHandle().equals(t.getHandle())) {
- tasks.remove(task);
- return true;
- } else {
- if (deleteTaskHelper(task.getChildren(), t))
- return true;
- }
+
+ private boolean deleteTaskHelper(List<ITask> tasks, ITask t) {
+ for (ITask task : tasks) {
+ if (task.getHandleIdentifier().equals(t.getHandleIdentifier())) {
+ tasks.remove(task);
+ return true;
+ } else {
+ if (deleteTaskHelper(task.getChildren(), t))
+ return true;
+ }
}
- return false;
+ return false;
}
-
- public void deleteCategory(ITaskListCategory category) {
- categories.remove(category);
- if (MylarTasklistPlugin.getDefault() != null) {
+
+ public void deleteCategory(ITaskListCategory category) {
+ categories.remove(category);
+ if (MylarTasklistPlugin.getDefault() != null) {
MylarTasklistPlugin.getDefault().saveTaskListAndContexts();
}
- }
-
- public void deleteQuery(IQuery query) {
- queries.remove(query);
- if (MylarTasklistPlugin.getDefault() != null) {
+ }
+
+ public void deleteQuery(IQuery query) {
+ queries.remove(query);
+ if (MylarTasklistPlugin.getDefault() != null) {
MylarTasklistPlugin.getDefault().saveTaskListAndContexts();
}
- }
-
- public ITask getTaskForHandle(String handle, boolean lookInArchives) {
- ITask t = null;
- for (ITaskListCategory cat : categories) {
- if(!lookInArchives && cat.isArchive())
- continue;
+ }
+
+ public ITask getTaskForHandle(String handle, boolean lookInArchives) {
+ ITask t = null;
+ for (ITaskListCategory cat : categories) {
+ if (!lookInArchives && cat.isArchive())
+ continue;
if ((t = findTaskHelper(cat.getChildren(), handle)) != null) {
return t;
}
}
- for (IQuery query : queries) {
+ for (IQuery query : queries) {
if ((t = findTaskHelper(query.getChildren(), handle)) != null) {
return t;
}
}
- return findTaskHelper(rootTasks, handle);
- }
-
- private ITask findTaskHelper(List<? extends ITaskListElement> elements, String handle) {
- for (ITaskListElement element : elements) {
- if(element instanceof ITask){
- if(element.getHandle().compareTo(handle) == 0)
- return (ITask)element;
- } else if(element instanceof IQueryHit){
- IQueryHit hit = (IQueryHit)element;
- if (hit.getHandle().compareTo(handle) == 0 && hit.hasCorrespondingActivatableTask()) {
- return hit.getOrCreateCorrespondingTask();
- }
- }
-
- // for subtasks
- if(element instanceof ITask){
- ITask searchTask = (ITask)element;
- ITask t = findTaskHelper(searchTask.getChildren(), handle);
- if (t != null) {
- return t;
- }
- }
- }
- return null;
- }
-
- public List<ITask> getActiveTasks() {
- return activeTasks;
- }
-
- public List<ITask> getRootTasks() {
- return rootTasks;
- }
-
- public List<ITaskListCategory> getCategories() {
- return categories;
- }
-
- public List<IQuery> getQueries(){
- return queries;
- }
-
- public int findLargestTaskHandle() {
- int max = 0;
- max = Math.max(largestTaskHandleHelper(rootTasks), max);
- for (TaskCategory cat : getTaskCategories()) {
- max = Math.max(largestTaskHandleHelper(cat.getChildren()), max);
- }
- return max;
- }
-
- private int largestTaskHandleHelper(List<ITask> tasks) {
- int ihandle = 0;
- int max = 0;
- for (ITask t : tasks) {
- if(t.participatesInTaskHandles()) {
- String string = t.getHandle().substring(t.getHandle().indexOf('-')+1, t.getHandle().length());
- if (string != "") {
- ihandle = Integer.parseInt(string);
- }
- }
- max = Math.max(ihandle, max);
- ihandle = largestTaskHandleHelper(t.getChildren());
- max = Math.max(ihandle, max);
- }
- return max;
- }
-
- public List<Object> getRoots() {
- List<Object> roots = new ArrayList<Object>();
- for (ITask t : rootTasks) roots.add(t);
- for (ITaskListCategory cat : categories) roots.add(cat);
- for (IQuery query : queries) roots.add(query);
- return roots;
- }
-
- public List<TaskCategory> getTaskCategories() {
- List<TaskCategory> cats = new ArrayList<TaskCategory>();
- for (ITaskListCategory cat : categories) {
- if (cat instanceof TaskCategory) {
- cats.add((TaskCategory)cat);
- }
- }
- return cats;
- }
+ return findTaskHelper(rootTasks, handle);
+ }
+
+ private ITask findTaskHelper(List<? extends ITaskListElement> elements, String handle) {
+ if (handle == null) return null;
+ for (ITaskListElement element : elements) {
+ if (element instanceof ITask) {
+ if (element.getHandleIdentifier().compareTo(handle) == 0)
+ return (ITask) element;
+ } else if (element instanceof IQueryHit) {
+ IQueryHit hit = (IQueryHit) element;
+ if (hit.getHandleIdentifier().compareTo(handle) == 0 && hit.hasCorrespondingActivatableTask()) {
+ return hit.getOrCreateCorrespondingTask();
+ }
+ }
+
+ // for subtasks
+ if (element instanceof ITask) {
+ ITask searchTask = (ITask) element;
+ ITask t = findTaskHelper(searchTask.getChildren(), handle);
+ if (t != null) {
+ return t;
+ }
+ }
+ }
+ return null;
+ }
+
+ public List<ITask> getActiveTasks() {
+ return activeTasks;
+ }
+
+ public List<ITask> getRootTasks() {
+ return rootTasks;
+ }
+
+ public List<ITaskListCategory> getCategories() {
+ return categories;
+ }
+
+ public List<IQuery> getQueries() {
+ return queries;
+ }
+
+ public int findLargestTaskHandle() {
+ int max = 0;
+ max = Math.max(largestTaskHandleHelper(rootTasks), max);
+ for (TaskCategory cat : getTaskCategories()) {
+ max = Math.max(largestTaskHandleHelper(cat.getChildren()), max);
+ }
+ return max;
+ }
+
+ private int largestTaskHandleHelper(List<ITask> tasks) {
+ int ihandle = 0;
+ int max = 0;
+ for (ITask t : tasks) {
+ if (t.participatesInTaskHandles()) {
+ String string = t.getHandleIdentifier().substring(t.getHandleIdentifier().indexOf('-') + 1, t.getHandleIdentifier().length());
+ if (string != "") {
+ ihandle = Integer.parseInt(string);
+ }
+ }
+ max = Math.max(ihandle, max);
+ ihandle = largestTaskHandleHelper(t.getChildren());
+ max = Math.max(ihandle, max);
+ }
+ return max;
+ }
+
+ public List<Object> getRoots() {
+ List<Object> roots = new ArrayList<Object>();
+ for (ITask t : rootTasks)
+ roots.add(t);
+ for (ITaskListCategory cat : categories)
+ roots.add(cat);
+ for (IQuery query : queries)
+ roots.add(query);
+ return roots;
+ }
+
+ public List<TaskCategory> getTaskCategories() {
+ List<TaskCategory> cats = new ArrayList<TaskCategory>();
+ for (ITaskListCategory cat : categories) {
+ if (cat instanceof TaskCategory) {
+ cats.add((TaskCategory) cat);
+ }
+ }
+ return cats;
+ }
public void clear() {
activeTasks.clear();
categories.clear();
rootTasks.clear();
- }
+ }
+
public void clearActiveTasks() {
for (ITask task : activeTasks) {
task.setActive(false, false);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/internal/CompletedTaskCollector.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/internal/CompletedTaskCollector.java
index 41421a970..97155123a 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/internal/CompletedTaskCollector.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/planner/internal/CompletedTaskCollector.java
@@ -36,8 +36,8 @@ public class CompletedTaskCollector implements ITasksCollector {
}
public void consumeTask(ITask task) {
- if (task.isCompleted() && task.getEndDate() != null && task.getEndDate().compareTo(cutOffDate) > 0 && !completedTasks.containsKey(task.getHandle())) {
- completedTasks.put(task.getHandle(), task);
+ if (task.isCompleted() && task.getEndDate() != null && task.getEndDate().compareTo(cutOffDate) > 0 && !completedTasks.containsKey(task.getHandleIdentifier())) {
+ completedTasks.put(task.getHandleIdentifier(), task);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditorInput.java
index 49613e517..d3225e696 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditorInput.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskEditorInput.java
@@ -32,7 +32,7 @@ public class TaskEditorInput implements IEditorInput {
public TaskEditorInput(ITask task) {
this.task = task;
- id = task.getHandle();
+ id = task.getHandleIdentifier();
label = task.getDescription(true);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java
index e597b1f48..7c363ffee 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/TaskSummaryEditor.java
@@ -101,7 +101,7 @@ public class TaskSummaryEditor extends EditorPart {
private ITaskActivityListener TASK_LIST_LISTENER = new ITaskActivityListener() {
public void taskActivated(ITask activeTask) {
- if (task != null && !browse.isDisposed() && activeTask.getHandle().equals(task.getHandle())) {
+ if (task != null && !browse.isDisposed() && activeTask.getHandleIdentifier().equals(task.getHandleIdentifier())) {
browse.setEnabled(false);
}
}
@@ -113,13 +113,13 @@ public class TaskSummaryEditor extends EditorPart {
}
public void taskDeactivated(ITask deactiveTask) {
- if (task != null && !browse.isDisposed() && deactiveTask.getHandle().equals(task.getHandle())) {
+ if (task != null && !browse.isDisposed() && deactiveTask.getHandleIdentifier().equals(task.getHandleIdentifier())) {
browse.setEnabled(true);
}
}
public void taskPropertyChanged(ITask updatedTask, String property) {
- if (task != null && updatedTask.getHandle().equals(task.getHandle())) {
+ if (task != null && updatedTask.getHandleIdentifier().equals(task.getHandleIdentifier())) {
if (property.equals("Description") && !description.isDisposed()) {
description.setText(task.getDescription(false));
} else if (property.equals("Path") && !pathText.isDisposed()) {
@@ -487,7 +487,7 @@ public class TaskSummaryEditor extends EditorPart {
Label l = toolkit.createLabel(container, "Task Handle:");
l.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
- Text handle = toolkit.createText(container, task.getHandle(), SWT.BORDER);
+ Text handle = toolkit.createText(container, task.getHandleIdentifier(), SWT.BORDER);
TableWrapData td = new TableWrapData(TableWrapData.FILL_GRAB);
td.colspan = 2;
handle.setLayoutData(td);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/DeleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/DeleteAction.java
index beb53bd76..28106e9f7 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/DeleteAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/DeleteAction.java
@@ -66,7 +66,7 @@ public class DeleteAction extends Action {
return;
MylarTasklistPlugin.getTaskListManager().deleteTask(task);
- MylarPlugin.getContextManager().contextDeleted(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextDeleted(task.getHandleIdentifier(), task.getPath());
IWorkbenchPage page = MylarTasklistPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
// if we couldn't get the page, get out of here
@@ -87,7 +87,7 @@ public class DeleteAction extends Action {
TaskCategory cat = (TaskCategory) selectedObject;
for (ITask task : cat.getChildren()) {
- MylarPlugin.getContextManager().contextDeleted(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextDeleted(task.getHandleIdentifier(), task.getPath());
IWorkbenchPage page = MylarTasklistPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
if (page != null) {
try {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/RemoveFromCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/RemoveFromCategoryAction.java
index d49a03f3e..53f94382d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/RemoveFromCategoryAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/actions/RemoveFromCategoryAction.java
@@ -74,7 +74,7 @@ public class RemoveFromCategoryAction extends Action {
return;
MylarTasklistPlugin.getTaskListManager().deleteTask(task);
- MylarPlugin.getContextManager().contextDeleted(task.getHandle(), task.getPath());
+ MylarPlugin.getContextManager().contextDeleted(task.getHandleIdentifier(), task.getPath());
}
IWorkbenchPage page = MylarTasklistPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getActivePage();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskActivationHistory.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskActivationHistory.java
index 72efb0cb2..3e6dcd009 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskActivationHistory.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskActivationHistory.java
@@ -67,7 +67,7 @@ public class TaskActivationHistory {
protected boolean isDuplicate(ITask task, int startingIndex){
for (int i = startingIndex; i < MylarPlugin.getContextManager().getActivityHistory().getInteractionHistory().size(); i++){
ITask currTask = getHistoryTaskAt(i);
- if(currTask != null && currTask.getHandle() == task.getHandle()){
+ if(currTask != null && currTask.getHandleIdentifier() == task.getHandleIdentifier()){
return true;
}
}
@@ -172,7 +172,7 @@ public class TaskActivationHistory {
*/
public void navigatedToTask(ITask task){
for(int i = 0; i < history.size(); i++){
- if (history.get(i).getHandle() == task.getHandle()){
+ if (history.get(i).getHandleIdentifier() == task.getHandleIdentifier()){
currentIndex = i;
break;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListContentProvider.java
index b4ec6a019..f5e0d4ee2 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListContentProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListContentProvider.java
@@ -137,7 +137,7 @@ public class TaskListContentProvider implements IStructuredContentProvider, ITre
if(cat.isArchive()){
for (ITask task: cat.getChildren()) {
if(task.isActive()){
- ITask t = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandle(), false);
+ ITask t = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandleIdentifier(), false);
if(t == null)
return true;
}
@@ -164,7 +164,7 @@ public class TaskListContentProvider implements IStructuredContentProvider, ITre
if(((ITaskListCategory)parent).isArchive()){
for (ITask task: ((ITaskListCategory)parent).getChildren()) {
if(task.isActive()){
- ITask t = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandle(), false);
+ ITask t = MylarTasklistPlugin.getTaskListManager().getTaskForHandle(task.getHandleIdentifier(), false);
if(t == null)
children.add(task);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
index a36d20aff..4ce411593 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasklist/ui/views/TaskListView.java
@@ -830,7 +830,7 @@ public class TaskListView extends ViewPart {
ITaskListElement element = (ITaskListElement) selection.getFirstElement();
if (!selection.isEmpty() && element.isDragAndDropEnabled()) {
- event.data = "" + element.getHandle();
+ event.data = "" + element.getHandleIdentifier();
} else {
event.data = "null";
}

Back to the top