Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn-feature/feature.xml39
-rw-r--r--org.eclipse.mylyn.bugzilla-feature/feature.xml11
-rw-r--r--org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java11
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java1
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java2
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java41
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java5
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.classpath2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.xml6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperlinkUtil.java84
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaTaskHyperlinkDetector.java69
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java21
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java6
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java4
-rw-r--r--org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/doc/internal/dialogs/UiLegendDialog.java50
-rw-r--r--org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF7
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Activator.java58
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java4
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/Task.java15
-rw-r--r--org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java39
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java1
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java29
-rw-r--r--org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF5
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gifbin0 -> 146 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gifbin0 -> 342 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gifbin0 -> 519 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gifbin0 -> 318 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gifbin0 -> 310 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gifbin0 -> 3345 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml23
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java18
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java10
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java23
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java (renamed from org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImages.java)18
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DiscardOutgoingAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskCompleteAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewLocalTaskAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java34
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PreviousTaskDropDownAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java10
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java36
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java17
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java310
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java14
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java10
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityViewContentProvider.java69
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java28
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableLabelProvider.java28
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java160
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java2
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskListManager.java25
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java12
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java96
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorInput.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttachmentTableLabelProvider.java6
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java135
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java188
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java4
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java45
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java11
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java4
-rw-r--r--org.eclipse.mylyn.trac-feature/feature.xml17
-rw-r--r--org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.mylyn.trac.ui/.classpath2
-rw-r--r--org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java4
-rw-r--r--org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java4
111 files changed, 1427 insertions, 712 deletions
diff --git a/org.eclipse.mylyn-feature/feature.xml b/org.eclipse.mylyn-feature/feature.xml
index 30416dffd..125d476f3 100644
--- a/org.eclipse.mylyn-feature/feature.xml
+++ b/org.eclipse.mylyn-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.mylar_feature"
label="Mylar Task List (Required)"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
provider-name="Eclipse.org"
plugin="org.eclipse.mylar">
@@ -214,84 +214,81 @@ litigation.
</license>
<url>
- <update label="Mylar for Eclipse 3.3" url="http://download.eclipse.org/technology/mylar/update-site/e3.3"/>
+ <update label="Mylar for Eclipse 3.2" url="http://download.eclipse.org/technology/mylar/update-site/e3.2"/>
</url>
<requires>
- <import plugin="org.eclipse.ui" version="3.3.0.I20070321" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui" version="3.2.0" match="compatible"/>
<import plugin="org.eclipse.ui.forms" version="0.0.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylar.tasks.core"/>
- <import plugin="org.eclipse.mylar.tasks.ui"/>
- <import plugin="org.eclipse.mylar" version="2.0.0.v20070216" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime" version="0.0.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylar.monitor.core"/>
<import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.mylar.context.core"/>
<import plugin="org.eclipse.update.core"/>
<import plugin="org.eclipse.ui.browser"/>
<import plugin="org.eclipse.ui.editors"/>
<import plugin="org.eclipse.ui.views"/>
<import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.mylar.monitor.ui"/>
<import plugin="org.eclipse.core.resources" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.search"/>
+ <import feature="org.eclipse.platform" version="3.2.0" match="equivalent"/>
+ <import plugin="org.eclipse.swt"/>
+ <import plugin="org.eclipse.jface"/>
</requires>
<plugin
id="org.eclipse.mylar.doc"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
id="org.eclipse.mylar"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
id="org.eclipse.mylar.context.core"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
id="org.eclipse.mylar.tasks.ui"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
- id="org.eclipse.mylar.monitor.ui"
+ id="org.eclipse.mylar.tasks.core"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
- id="org.eclipse.mylar.tasks.core"
+ id="org.eclipse.mylar.tasks.web"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
- id="org.eclipse.mylar.tasks.web"
+ id="org.eclipse.mylar.monitor.core"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
- id="org.eclipse.mylar.monitor.core"
+ id="org.eclipse.mylar.monitor.ui"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
</feature>
diff --git a/org.eclipse.mylyn.bugzilla-feature/feature.xml b/org.eclipse.mylyn.bugzilla-feature/feature.xml
index f20f0fe9b..146fb589e 100644
--- a/org.eclipse.mylyn.bugzilla-feature/feature.xml
+++ b/org.eclipse.mylyn.bugzilla-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.mylar.bugzilla_feature"
label="Mylar Connector: Bugzilla"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
provider-name="Eclipse.org"
plugin="org.eclipse.mylar">
@@ -214,7 +214,7 @@ litigation.
</license>
<url>
- <update label="Mylar for Eclipse 3.3" url="http://download.eclipse.org/technology/mylar/update-site/e3.3"/>
+ <update label="Mylar for Eclipse 3.2" url="http://download.eclipse.org/technology/mylar/update-site/e3.2"/>
</url>
<requires>
@@ -234,24 +234,23 @@ litigation.
<import plugin="org.eclipse.ui.editors" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.workbench.texteditor" version="0.0.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.update.ui"/>
- <import plugin="org.eclipse.mylar.bugzilla.core"/>
<import plugin="org.eclipse.mylar.context.core"/>
<import plugin="org.eclipse.mylar.tasks.ui"/>
- <import feature="org.eclipse.mylar_feature" version="2.0.0.v20070216" match="greaterOrEqual"/>
+ <import feature="org.eclipse.mylar_feature" version="2.0.0.v20070330-2000" match="greaterOrEqual"/>
</requires>
<plugin
id="org.eclipse.mylar.bugzilla.core"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
id="org.eclipse.mylar.bugzilla.ui"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
</feature>
diff --git a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
index 7d6e88561..9882763d7 100644
--- a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Bugzilla Connector Core Plug-in
Bundle-SymbolicName: org.eclipse.mylar.bugzilla.core; singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Bundle-Activator: org.eclipse.mylar.internal.bugzilla.core.BugzillaCorePlugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylar.tasks.core,
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
index 55bd68e14..a781d0827 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
@@ -453,7 +453,8 @@ public class BugzillaClient {
if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
RepositoryQueryResultsFactory queryFactory = new RepositoryQueryResultsFactory(method
.getResponseBodyAsStream(), characterEncoding);
- queryFactory.performQuery(taskList, repositoryUrl.toString(), collector, QueryHitCollector.MAX_HITS);
+ queryFactory.performQuery(taskList, repositoryUrl.toString(), collector,
+ QueryHitCollector.MAX_HITS);
return;
}
}
@@ -470,7 +471,8 @@ public class BugzillaClient {
public static void setupExistingBugAttributes(String serverUrl, RepositoryTaskData existingReport) {
// ordered list of elements as they appear in UI
// and additional elements that may not appear in the incoming xml
- // stream but need to be present for bug submission
+ // stream but need to be present for bug submission / not always dirty
+ // state handling
BugzillaReportElement[] reportElements = { BugzillaReportElement.SHORT_DESC, BugzillaReportElement.BUG_STATUS,
BugzillaReportElement.RESOLUTION, BugzillaReportElement.BUG_ID, BugzillaReportElement.REP_PLATFORM,
BugzillaReportElement.PRODUCT, BugzillaReportElement.OP_SYS, BugzillaReportElement.COMPONENT,
@@ -478,7 +480,8 @@ public class BugzillaClient {
BugzillaReportElement.ASSIGNED_TO, BugzillaReportElement.TARGET_MILESTONE,
BugzillaReportElement.REPORTER, BugzillaReportElement.DEPENDSON, BugzillaReportElement.BLOCKED,
BugzillaReportElement.BUG_FILE_LOC, BugzillaReportElement.NEWCC, BugzillaReportElement.KEYWORDS,
- BugzillaReportElement.CC, BugzillaReportElement.NEW_COMMENT, BugzillaReportElement.QA_CONTACT };
+ BugzillaReportElement.CC, BugzillaReportElement.NEW_COMMENT, BugzillaReportElement.QA_CONTACT,
+ BugzillaReportElement.STATUS_WHITEBOARD, BugzillaReportElement.DEADLINE };
for (BugzillaReportElement element : reportElements) {
RepositoryTaskAttribute reportAttribute = BugzillaClient.makeNewAttribute(element);
@@ -994,7 +997,7 @@ public class BugzillaClient {
try {
// TODO: Handle too long of url (IBugzillaConstants.MAX_URL_LENGTH)
-
+
String requestUrl = repositoryUrl + IBugzillaConstants.URL_GET_SHOW_BUG_XML_NOID;
HashMap<String, RepositoryTaskData> taskDataMap = new HashMap<String, RepositoryTaskData>();
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
index b1862042a..54bba3d3b 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaReportElement.java
@@ -20,6 +20,7 @@ package org.eclipse.mylar.internal.bugzilla.core;
public enum BugzillaReportElement {
// Format: ENUM ( "pretty name", "xml key", <hidden: true/false>, <readonly: true/false>)
// Hidden elements are not automatically displayed in ui
+ STATUS_WHITEBOARD ("Status Whiteboard:", "status_whiteboard", true, false),
ACTUAL_TIME ("Hours Worked:", "actual_time", true),
ADD_COMMENT ("Additional Comments:", "comment", true, false),
ASSIGNED_TO ("Assigned to:", "assigned_to", true, true),
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
index f70d3fa88..709e6c499 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
@@ -53,7 +53,7 @@ public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
private static final String CHANGED_BUGS_CGI_QUERY = "/buglist.cgi?query_format=advanced&chfieldfrom=";
- private static final String CLIENT_LABEL = "Bugzilla (supports uncustomized 2.18-2.22)";
+ private static final String CLIENT_LABEL = "Bugzilla (supports uncustomized 2.18-3.0)";
private BugzillaAttachmentHandler attachmentHandler;
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
index 3e17f9cc7..c35a83b76 100644
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
+++ b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTask.java
@@ -19,7 +19,6 @@ import java.util.List;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
-import org.eclipse.mylar.tasks.core.RepositoryTaskData;
import org.eclipse.mylar.tasks.core.TaskComment;
/**
@@ -27,9 +26,9 @@ import org.eclipse.mylar.tasks.core.TaskComment;
*/
public class BugzillaTask extends AbstractRepositoryTask {
- private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm";
+ private static final String DEADLINE_FORMAT = "yyyy-MM-dd";
- private static SimpleDateFormat comment_creation_ts_format = new SimpleDateFormat(COMMENT_FORMAT);
+ private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm";
public BugzillaTask(String repositoryUrl, String id, String label, boolean newTask) {
super(repositoryUrl, id, label, newTask);
@@ -64,14 +63,8 @@ public class BugzillaTask extends AbstractRepositoryTask {
return super.getSummary();
} else {
if (isSynchronizing()) {
- // return
- // AbstractRepositoryTask.getTaskId(getHandleIdentifier()) + ":
- // <synchronizing>";
return "<synchronizing>";
} else {
- // return
- // AbstractRepositoryTask.getTaskId(getHandleIdentifier()) + ":
- // ";
return "";
}
}
@@ -107,20 +100,15 @@ public class BugzillaTask extends AbstractRepositoryTask {
try {
if (taskData != null) {
if (isCompleted()) {
- // if (taskData.isResolved()) {
List<TaskComment> taskComments = taskData.getComments();
if (taskComments != null && !taskComments.isEmpty()) {
// TODO: fix not to be based on comment
- return comment_creation_ts_format.parse(taskComments.get(taskComments.size() - 1).getCreated());
- // return
- // offlineHandler.getDateForAttributeType(RepositoryTaskAttribute.COMMENT_DATE,
- // (taskComments.get(taskComments.size() -
- // 1).getCreated()));
+ return new SimpleDateFormat(COMMENT_FORMAT).parse(taskComments.get(taskComments.size() - 1)
+ .getCreated());
}
}
}
} catch (Exception e) {
- // MylarStatusHandler.log(e, "BugzillaTask.getCompletionDate()");
return null;
}
return super.getCompletionDate();
@@ -149,8 +137,23 @@ public class BugzillaTask extends AbstractRepositoryTask {
}
}
- public RepositoryTaskData getOldTaskData() {
- // ignore
- return null;
+ @Override
+ public Date getDueDate() {
+
+ if (taskData != null && taskData.getAttribute(BugzillaReportElement.ESTIMATED_TIME.getKeyString()) != null) {
+ // HACK: if estimated_time field exists, time tracking is enabled
+ try {
+ String dueStr = taskData.getAttributeValue(BugzillaReportElement.DEADLINE.getKeyString());
+ if (dueStr != null) {
+ return new SimpleDateFormat(DEADLINE_FORMAT).parse(dueStr);
+ }
+ } catch (Exception e) {
+ return null;
+ }
+ return null;
+ } else {
+ return super.getDueDate();
+ }
+
}
}
diff --git a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
index 6fdb60c93..f72da4462 100644
--- a/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
+++ b/org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java
@@ -14,7 +14,6 @@ import junit.framework.Test;
import junit.framework.TestSuite;
import org.eclipse.mylar.bugzilla.tests.headless.BugzillaQueryTest;
-import org.eclipse.mylar.bugzilla.tests.headless.BugzillaTaskHistoryTest;
/**
* @author Mik Kersten
@@ -35,7 +34,7 @@ public class AllBugzillaTests {
suite.addTestSuite(RepositoryEditorWizardTest.class);
suite.addTestSuite(RepositoryReportFactoryTest.class);
suite.addTestSuite(BugzillaConfigurationTest.class);
- suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
+// suite.addTestSuite(BugzillaTaskHyperlinkDetectorTest.class);
suite.addTestSuite(BugzillaSearchEngineTest.class);
// suite.addTestSuite(Bugzilla220ParserTest.class);
suite.addTestSuite(BugzillaRepositoryConnectorTest.class);
@@ -53,7 +52,7 @@ public class AllBugzillaTests {
// suite.addTest(new TestSuite(BugzillaParserTest.class));
suite.addTestSuite(BugzillaSearchDialogTest.class);
suite.addTestSuite(DuplicateDetetionTest.class);
- suite.addTestSuite(BugzillaTaskHistoryTest.class);
+// suite.addTestSuite(BugzillaTaskHistoryTest.class);
// $JUnit-END$
return suite;
}
diff --git a/org.eclipse.mylyn.bugzilla.ui/.classpath b/org.eclipse.mylyn.bugzilla.ui/.classpath
index fb06a62b3..ddacaf769 100644
--- a/org.eclipse.mylyn.bugzilla.ui/.classpath
+++ b/org.eclipse.mylyn.bugzilla.ui/.classpath
@@ -3,7 +3,7 @@
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
- <accessrule kind="accessible" pattern="**/TaskListImages"/>
+ <accessrule kind="accessible" pattern="**/TasksUiImages"/>
<accessrule kind="accessible" pattern="**/TaskListColorsAndFonts"/>
<accessrule kind="accessible" pattern="**/TaskListPreferenceConstants"/>
<accessrule kind="accessible" pattern="**/mylar/internal/bugzilla/**"/>
diff --git a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
index ca8a9743f..845e06aff 100644
--- a/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Bugzilla Client Ui Plug-in
Bundle-SymbolicName: org.eclipse.mylar.bugzilla.ui; singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Bundle-Activator: org.eclipse.mylar.internal.bugzilla.ui.BugzillaUiPlugin
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.mylyn.bugzilla.ui/plugin.xml b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
index d1ff45600..334ffa91c 100644
--- a/org.eclipse.mylyn.bugzilla.ui/plugin.xml
+++ b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
@@ -27,9 +27,9 @@
<extension
point="org.eclipse.mylar.tasks.ui.editors">
<editorFactory class="org.eclipse.mylar.internal.bugzilla.ui.tasklist.BugzillaTaskEditorFactory"/>
- <!-- <hyperlinkDetector
- class="org.eclipse.mylar.tasks.ui.editors.TaskHyperlinkDetector"
- id="org.eclipse.mylar.tasks.hyperlinkdetector.bugzillatask"/>-->
+ <hyperlinkDetector
+ class="org.eclipse.mylar.internal.bugzilla.ui.BugzillaTaskHyperlinkDetector"
+ id="org.eclipse.mylar.tasks.hyperlinkdetector.bugzillatask"/>
</extension>
<extension
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperlinkUtil.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperlinkUtil.java
new file mode 100644
index 000000000..e2dad9ee0
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaHyperlinkUtil.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * 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.mylar.internal.bugzilla.ui;
+
+import java.util.ArrayList;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.Region;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.mylar.tasks.core.TaskRepository;
+import org.eclipse.mylar.tasks.ui.TaskHyperlink;
+import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
+
+/**
+ * @author Rob Elves (multiple bug/task hyperlink support)
+ * @author Mik Kersten
+ */
+public class BugzillaHyperlinkUtil {
+
+ private static final int TASK_NUM_GROUP = 3;
+
+ private static final String regexp = "(duplicate of|bug|task)(\\s#|#|#\\s|\\s|)(\\s\\d+|\\d+)";
+
+ private static final Pattern PATTERN = Pattern.compile(regexp, Pattern.CASE_INSENSITIVE);
+
+ public static IHyperlink[] findBugHyperlinks(String repositoryUrl, int offset, String comment, int lineOffset) {
+ ArrayList<IHyperlink> hyperlinksFound = new ArrayList<IHyperlink>();
+
+ Matcher m = PATTERN.matcher(comment);
+ while (m.find()) {
+ if (offset >= m.start() && offset <= m.end()) {
+ IHyperlink link = extractHyperlink(repositoryUrl, lineOffset, m);
+ if (link != null)
+ hyperlinksFound.add(link);
+ }
+ }
+
+ if (hyperlinksFound.size() > 0) {
+ return hyperlinksFound.toArray(new IHyperlink[1]);
+ }
+ return null;
+ }
+
+ private static IHyperlink extractHyperlink(String repositoryUrl, int lineOffset, Matcher m) {
+
+ int start = -1;
+
+ if(m.group().startsWith("duplicate")) {
+ start = m.start() + m.group().indexOf(m.group(TASK_NUM_GROUP));
+ } else {
+ start = m.start();
+ }
+
+ int end = m.end();
+
+ if (end == -1)
+ end = m.group().length();
+
+ TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(repositoryUrl);
+
+ try {
+
+ String bugId = m.group(TASK_NUM_GROUP).trim();
+ start += lineOffset;
+ end += lineOffset;
+
+ IRegion sregion = new Region(start, end - start);
+ return new TaskHyperlink(sregion, repository, bugId);
+
+ } catch (NumberFormatException e) {
+ return null;
+ }
+ }
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaTaskHyperlinkDetector.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaTaskHyperlinkDetector.java
new file mode 100644
index 000000000..361ea2bd6
--- /dev/null
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaTaskHyperlinkDetector.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.mylar.internal.bugzilla.ui;
+
+import org.eclipse.jface.text.BadLocationException;
+import org.eclipse.jface.text.IDocument;
+import org.eclipse.jface.text.IRegion;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.jface.text.hyperlink.IHyperlink;
+import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
+import org.eclipse.mylar.tasks.core.TaskRepository;
+import org.eclipse.mylar.tasks.ui.editors.RepositoryTextViewer;
+
+/**
+ * @author Rob Elves
+ */
+public class BugzillaTaskHyperlinkDetector implements IHyperlinkDetector {
+
+ private TaskRepository repository;
+
+ public IHyperlink[] detectHyperlinks(ITextViewer textViewer, IRegion region, boolean canShowMultipleHyperlinks) {
+ if (region == null || textViewer == null)
+ return null;
+
+ if (!(textViewer instanceof RepositoryTextViewer))
+ return null;
+
+ RepositoryTextViewer viewer = (RepositoryTextViewer) textViewer;
+
+ repository = viewer.getRepository();
+
+ if (repository == null)
+ return null;
+
+ IDocument document = textViewer.getDocument();
+
+ int offset = region.getOffset();
+
+ if (document == null)
+ return null;
+
+ IRegion lineInfo;
+ String line;
+ try {
+ lineInfo = document.getLineInformationOfOffset(offset);
+ line = document.get(lineInfo.getOffset(), lineInfo.getLength());
+ } catch (BadLocationException ex) {
+ return null;
+ }
+
+ int offsetInLine = offset - lineInfo.getOffset();
+
+ IHyperlink[] links = BugzillaHyperlinkUtil.findBugHyperlinks(repository.getUrl(), offsetInLine, line, lineInfo
+ .getOffset());
+
+ return links;
+
+ }
+
+}
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
index 4ae0588a5..40d07ee3f 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditor.java
@@ -52,7 +52,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.List;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.FormColors;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
@@ -212,6 +212,18 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
Text urlField = createTextField(composite, attribute, SWT.FLAT);
GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(urlField);
}
+
+ attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString());
+ if(attribute == null){
+ this.taskData.setAttributeValue(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString(), "");
+ attribute = this.taskData.getAttribute(BugzillaReportElement.STATUS_WHITEBOARD.getKeyString());
+ }
+ if (attribute != null && !attribute.isReadOnly()) {
+ Label label = createLabel(composite, attribute);
+ GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
+ Text whiteboardField = createTextField(composite, attribute, SWT.FLAT);
+ GridDataFactory.fillDefaults().hint(135, SWT.DEFAULT).applyTo(whiteboardField);
+ }
addVoting(composite);
@@ -235,7 +247,8 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
BugzillaReportElement.CCLIST_ACCESSIBLE.getKeyString(),
BugzillaReportElement.ESTIMATED_TIME.getKeyString(),
BugzillaReportElement.REMAINING_TIME.getKeyString(), BugzillaReportElement.ACTUAL_TIME.getKeyString(),
- BugzillaReportElement.DEADLINE.getKeyString() };
+ BugzillaReportElement.DEADLINE.getKeyString(),
+ BugzillaReportElement.STATUS_WHITEBOARD.getKeyString()};
for (String key : customAttributeKeys) {
RepositoryTaskAttribute attribute = taskData.getAttribute(key);
if (hasChanged(attribute)) {
@@ -388,7 +401,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
}
Label label = toolkit.createLabel(timeComposite, "Current Estimate:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
Text currentEstimate = toolkit.createText(timeComposite,
""
@@ -537,7 +550,7 @@ public class BugzillaTaskEditor extends AbstractRepositoryTaskEditor {
protected void addVoting(Composite attributesComposite) {
Label label = toolkit.createLabel(attributesComposite, "Votes:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).applyTo(label);
Composite votingComposite = toolkit.createComposite(attributesComposite);
GridLayout layout = new GridLayout(3, false);
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
index 3b8408d7c..724a03ffa 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.bugzilla.ui.tasklist;
import org.eclipse.mylar.internal.bugzilla.core.BugzillaRepositoryQuery;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.mylar.tasks.ui.search.AbstractRepositoryQueryPage;
@@ -49,7 +49,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
this.repository = repository;
setTitle(LABEL_CUSTOM_QUERY);
// setDescription(DESCRIPTION);
- setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
public BugzillaCustomQueryWizardPage(TaskRepository repository) {
@@ -57,7 +57,7 @@ public class BugzillaCustomQueryWizardPage extends AbstractRepositoryQueryPage {
this.repository = repository;
setTitle(LABEL_CUSTOM_QUERY);
// setDescription(DESCRIPTION);
- setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
@Override
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
index 2b3de45ec..f07dc93f8 100644
--- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
+++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.internal.bugzilla.ui.tasklist;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.mylar.internal.bugzilla.ui.search.BugzillaSearchPage;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -49,7 +49,7 @@ public class BugzillaQueryTypeWizardPage extends WizardPage {
super(TITLE);
setTitle(TITLE);
setDescription(DESCRIPTION);
- setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
customPage = new BugzillaCustomQueryWizardPage(repository);
searchPage = new BugzillaSearchPage(repository);
searchPage.setRestoreQueryOptions(false);
diff --git a/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
index e38e494e4..b310dafb4 100644
--- a/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Documentation Plug-in
Bundle-SymbolicName: org.eclipse.mylar.doc; singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Eclipse-AutoStart: true
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/doc/internal/dialogs/UiLegendDialog.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/doc/internal/dialogs/UiLegendDialog.java
index 5261962dd..32fbf2c2b 100644
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/doc/internal/dialogs/UiLegendDialog.java
+++ b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/doc/internal/dialogs/UiLegendDialog.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.doc.internal.dialogs;
import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.Task;
import org.eclipse.mylar.tasks.ui.TasksUiUtil;
import org.eclipse.swt.SWT;
@@ -98,7 +98,7 @@ public class UiLegendDialog extends PopupDialog {
// buttonsComposite.setLayout(new RowLayout());
final ImageHyperlink closeHyperlink = toolkit.createImageHyperlink(buttonsComposite, SWT.NONE);
closeHyperlink.setLayout(buttonsLayout);
- closeHyperlink.setImage(TaskListImages.getImage(TaskListImages.NOTIFICATION_CLOSE));
+ closeHyperlink.setImage(TasksUiImages.getImage(TasksUiImages.NOTIFICATION_CLOSE));
closeHyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -114,23 +114,23 @@ public class UiLegendDialog extends PopupDialog {
setSectionLayout(sectionClient, section, false);
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.PRIORITY_1));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_1));
toolkit.createLabel(sectionClient, Task.PriorityLevel.P1.getDescription());
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.PRIORITY_2));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_2));
toolkit.createLabel(sectionClient, Task.PriorityLevel.P2.getDescription());
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.PRIORITY_3));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_3));
toolkit.createLabel(sectionClient, Task.PriorityLevel.P3.getDescription() + " (default)");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.PRIORITY_4));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_4));
toolkit.createLabel(sectionClient, Task.PriorityLevel.P4.getDescription());
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.PRIORITY_5));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.PRIORITY_5));
toolkit.createLabel(sectionClient, Task.PriorityLevel.P5.getDescription());
@@ -140,23 +140,23 @@ public class UiLegendDialog extends PopupDialog {
setSectionLayout(sectionClient, section, false);
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
toolkit.createLabel(sectionClient, "Task");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_NOTES));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_NOTES));
toolkit.createLabel(sectionClient, "Task with notes");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_REPOSITORY));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY));
toolkit.createLabel(sectionClient, "Repository task");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.CATEGORY));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.CATEGORY));
toolkit.createLabel(sectionClient, "Category");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.QUERY));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.QUERY));
toolkit.createLabel(sectionClient, "Repository query");
@@ -166,25 +166,25 @@ public class UiLegendDialog extends PopupDialog {
setSectionLayout(sectionClient, section, false);
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
Label labelOverdue = toolkit.createLabel(sectionClient, "Overdue, schedule via popup menu");
labelOverdue.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
TaskListColorsAndFonts.THEME_COLOR_TASK_OVERDUE));
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
Label labelToday = toolkit.createLabel(sectionClient, "Scheduled for today");
labelToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_SCHEDULED));
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
Label labelThisWeek = toolkit.createLabel(sectionClient, "Scheduled for this week");
labelThisWeek.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED));
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_COMPLETED));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_COMPLETED));
Label labelCompleted = toolkit.createLabel(sectionClient, "Completed");
labelCompleted.setFont(TaskListColorsAndFonts.STRIKETHROUGH);
// labelCompleted.setForeground(TaskListColorsAndFonts.COLOR_TASK_COMPLETED);
@@ -192,14 +192,14 @@ public class UiLegendDialog extends PopupDialog {
TaskListColorsAndFonts.THEME_COLOR_COMPLETED));
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_COMPLETED));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_COMPLETED));
Label labelCompletedToday = toolkit.createLabel(sectionClient, "Completed today");
labelCompletedToday.setFont(TaskListColorsAndFonts.STRIKETHROUGH);
labelCompletedToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
TaskListColorsAndFonts.THEME_COLOR_TASK_TODAY_COMPLETED));
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.BLANK));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.BLANK));
Hyperlink adjust = toolkit.createHyperlink(sectionClient, "Adjust Colors and Fonts...", SWT.NULL);
adjust.addHyperlinkListener(new IHyperlinkListener() {
@@ -225,15 +225,15 @@ public class UiLegendDialog extends PopupDialog {
setSectionLayout(sectionClient, section, false);
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_INACTIVE));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE));
toolkit.createLabel(sectionClient, "Inactive task with no context");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_INACTIVE_CONTEXT));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE_CONTEXT));
toolkit.createLabel(sectionClient, "Inactive task with context");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.TASK_ACTIVE));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.TASK_ACTIVE));
toolkit.createLabel(sectionClient, "Active task");
@@ -243,19 +243,19 @@ public class UiLegendDialog extends PopupDialog {
setSectionLayout(sectionClient, section, true);
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.OVERLAY_INCOMMING));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING));
toolkit.createLabel(sectionClient, "Incoming changes, open to view");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.OVERLAY_OUTGOING));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_OUTGOING));
toolkit.createLabel(sectionClient, "Outgoing changes, synchronize to discard");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.OVERLAY_WARNING));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_WARNING));
toolkit.createLabel(sectionClient, "Synchronization failed, mouse over for details");
image = toolkit.createLabel(sectionClient, "");
- image.setImage(TaskListImages.getImage(TaskListImages.OVERLAY_CONFLICT));
+ image.setImage(TasksUiImages.getImage(TasksUiImages.OVERLAY_CONFLICT));
toolkit.createLabel(sectionClient, "Conflicting changes, need to synchronize");
diff --git a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
index c5d36e0a5..7341a7078 100644
--- a/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.core/META-INF/MANIFEST.MF
@@ -2,15 +2,14 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Tasks Core Plug-in
Bundle-SymbolicName: org.eclipse.mylar.tasks.core;singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Eclipse-AutoStart: true
Bundle-Vendor: Eclipse.org
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylar.context.core,
org.eclipse.update.core,
- org.eclipse.mylar,
- org.eclipse.core.net;bundle-version="[1.0.0,2.0.0)"
+ org.eclipse.mylar
Export-Package: org.eclipse.mylar.internal.tasks.core,
org.eclipse.mylar.tasks.core
-Bundle-Activator: org.eclipse.mylar.internal.tasks.core.Activator
+
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Activator.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Activator.java
deleted file mode 100644
index ea8947742..000000000
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/internal/tasks/core/Activator.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.mylar.internal.tasks.core;
-
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.Plugin;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * @author Michael Valenta
- */
-public class Activator extends Plugin {
-
- private static Activator instance;
-
- private ServiceTracker tracker;
-
- public Activator() {
- instance = this;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- tracker = new ServiceTracker(getBundle().getBundleContext(), IProxyService.class.getName(), null);
- tracker.open();
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- tracker.close();
- }
-
- /**
- * Return the {@link IProxyService} or <code>null</code> if the service is
- * not available.
- *
- * @return the {@link IProxyService} or <code>null</code>
- */
- public IProxyService getProxyService() {
- return (IProxyService) tracker.getService();
- }
-
- public static Activator getInstance() {
- return instance;
- }
-
-}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
index b2c30a04e..5da3be760 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/AbstractTaskContainer.java
@@ -77,6 +77,10 @@ public abstract class AbstractTaskContainer extends PlatformObject implements IT
childHandles.remove(task.getHandleIdentifier());
}
+ void clear() {
+ childHandles.clear();
+ }
+
public boolean isCompleted() {
return false;
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java
index 5ead79b16..540f674eb 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/DateRangeContainer.java
@@ -79,7 +79,11 @@ public class DateRangeContainer extends AbstractTaskContainer {
}
public void clear() {
+ totalEstimated = 0;
+ totalElapsed = 0;
+ taskToDuration.clear();
dateRangeDelegates.clear();
+ super.clear();
}
public void addTask(DateRangeActivityDelegate taskWrapper) {
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/Task.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/Task.java
index 10fe692c8..9f5bc6f14 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/Task.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/Task.java
@@ -18,7 +18,6 @@ import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.PlatformObject;
-import org.eclipse.mylar.core.MylarStatusHandler;
/**
* @author Mik Kersten
@@ -124,8 +123,6 @@ public class Task extends PlatformObject implements ITask {
private AbstractTaskContainer parentCategory = null;
- private long timeActive = 0;
-
private Date completionDate = null;
private Date creationDate = null;
@@ -245,18 +242,6 @@ public class Task extends PlatformObject implements ITask {
this.notes = notes;
}
- public long getElapsedTime() {
- return timeActive;
- }
-
- public void setElapsedTime(long elapsedTime) {
- if (elapsedTime >= 0) {
- this.timeActive = elapsedTime;
- } else {
- MylarStatusHandler.log("Attempt to set negative time on task: " + getSummary(), this);
- }
- }
-
public int getEstimateTimeHours() {
return estimatedTimeHours;
}
diff --git a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
index 803948ec2..93f76841e 100644
--- a/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
+++ b/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/TaskRepository.java
@@ -12,17 +12,21 @@
package org.eclipse.mylar.tasks.core;
-import java.net.*;
+import java.net.InetSocketAddress;
+import java.net.MalformedURLException;
+import java.net.Proxy;
+import java.net.URL;
import java.net.Proxy.Type;
-import java.util.*;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.TimeZone;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.net.proxy.IProxyService;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.core.net.WebClientUtil;
-import org.eclipse.mylar.internal.tasks.core.Activator;
+import org.eclipse.update.internal.core.UpdateCore;
/**
* Note that task repositories use Strings for storing time stamps because using
@@ -412,24 +416,19 @@ public class TaskRepository {
return "true".equals(getProperty(PROXY_USEDEFAULT)) || (getProperty(PROXY_HOSTNAME) == null);
}
- /**
- * TODO: move utility method, should use TaskRepository.getProxy()
+ /**
+ * TODO: move
+ * utility method, should use TaskRepository.getProxy()
*/
public static Proxy getSystemProxy() {
Proxy proxy = Proxy.NO_PROXY;
- IProxyService service = Activator.getInstance().getProxyService();
- if (service != null && service.isProxiesEnabled()) {
- IProxyData data = service.getProxyData(IProxyData.HTTP_PROXY_TYPE);
- if (data.getHost() != null) {
- String proxyHost = data.getHost();
- int proxyPort = data.getPort();
- // Change the IProxyData default port to the Java default port
- if (proxyPort == -1)
- proxyPort = 0;
-
- InetSocketAddress sockAddr = new InetSocketAddress(proxyHost, proxyPort);
- proxy = new Proxy(Type.HTTP, sockAddr);
- }
+ if (UpdateCore.getPlugin() != null
+ && UpdateCore.getPlugin().getPluginPreferences().getBoolean(UpdateCore.HTTP_PROXY_ENABLE)) {
+ String proxyHost = UpdateCore.getPlugin().getPluginPreferences().getString(UpdateCore.HTTP_PROXY_HOST);
+ int proxyPort = UpdateCore.getPlugin().getPluginPreferences().getInt(UpdateCore.HTTP_PROXY_PORT);
+
+ InetSocketAddress sockAddr = new InetSocketAddress(proxyHost, proxyPort);
+ proxy = new Proxy(Type.HTTP, sockAddr);
}
return proxy;
}
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java
index b3faa2838..8162764dc 100644
--- a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTest.java
@@ -95,6 +95,7 @@ public class TaskActivityTest extends TestCase {
assertEquals(2, testContainer.getDateRangeDelegates().size());
testContainer
.addTask(new DateRangeActivityDelegate(testContainer, task2, currentTaskStart, currentTaskEnd, 10));
+
assertEquals(30, testContainer.getTotalElapsed());
// assertEquals(3 * (currentEndMili - currentStartMili),
// testContainer.getTotalElapsed());
diff --git a/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
new file mode 100644
index 000000000..7910dd240
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 Mylar committers 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
+ *******************************************************************************/
+
+package org.eclipse.mylar.tasks.tests;
+
+import org.eclipse.mylar.tasks.core.IRepositoryConstants;
+import org.eclipse.mylar.tasks.core.TaskRepository;
+
+import junit.framework.TestCase;
+
+/**
+ * @author Mik Kersten
+ */
+public class TaskRepositoryTest extends TestCase {
+
+ public void testLabel() {
+ TaskRepository repository = new TaskRepository("kind", "http://foo.bar");
+ assertTrue(repository.getRepositoryLabel().equals(repository.getUrl()));
+
+ repository.setProperty(IRepositoryConstants.PROPERTY_LABEL, "label");
+ assertTrue(repository.getRepositoryLabel().equals("label"));
+ }
+
+}
diff --git a/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF
index 3276b8889..e4e517599 100644
--- a/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.tasks.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Tasks UI Plug-in
Bundle-SymbolicName: org.eclipse.mylar.tasks.ui;singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Bundle-Activator: org.eclipse.mylar.tasks.ui.TasksUiPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@@ -20,8 +20,7 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.ui.ide,
org.eclipse.search,
org.eclipse.mylar.monitor.core,
- org.eclipse.mylar,
- org.eclipse.ui.net
+ org.eclipse.mylar
Eclipse-AutoStart: true
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.mylar.internal.tasks.ui,
diff --git a/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif b/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif
new file mode 100644
index 000000000..284be870c
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/elcl16/refresh-small.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif
new file mode 100644
index 000000000..c0e069d0d
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/obj16/attachment-patch.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gif
new file mode 100644
index 000000000..d4b0e39c2
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/obj16/browser-small.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gif
new file mode 100644
index 000000000..d9629a1a9
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/obj16/calendar-small.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif b/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif
new file mode 100644
index 000000000..ceb1f9811
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/obj16/repository-small.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif
new file mode 100644
index 000000000..5b43097f9
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/wizban/banner-repository-settings.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.xml b/org.eclipse.mylyn.tasks.ui/plugin.xml
index 5a069daa2..74617ba16 100644
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ b/org.eclipse.mylyn.tasks.ui/plugin.xml
@@ -179,20 +179,12 @@
name="Task Planner"/>
</extension>
- <extension
- point="org.eclipse.mylar.tasks.ui.editors">
- <hyperlinkDetector
- class="org.eclipse.mylar.tasks.ui.editors.TaskHyperlinkDetector"
- id="org.eclipse.mylar.java.hyperlink.detector.tasks"/>
- </extension>
-
<extension point="org.eclipse.ui.perspectiveExtensions">
<perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
<viewShortcut id="org.eclipse.mylar.tasks.ui.views.TaskListView"/>
<view
closeable="true"
id="org.eclipse.mylar.tasks.ui.views.TaskListView"
- minimized="false"
moveable="true"
ratio="0.5"
relationship="top"
@@ -217,7 +209,6 @@
<view
closeable="true"
id="org.eclipse.mylar.tasks.ui.views.TaskListView"
- minimized="false"
relationship="left"
relative="org.eclipse.ui.views.TaskList">
</view>
@@ -241,7 +232,6 @@
<perspectiveExtension targetID="org.eclipse.team.cvs.ui.cvsPerspective">
<view
id="org.eclipse.mylar.tasklist.repositories"
- minimized="false"
ratio="0.7"
relationship="bottom"
relative="org.eclipse.team.ccvs.ui.RepositoriesView"
@@ -251,7 +241,6 @@
<perspectiveExtension targetID="org.tigris.subversion.subclipse.ui.svnPerspective">
<view
id="org.eclipse.mylar.tasklist.repositories"
- minimized="false"
ratio="0.7"
relationship="bottom"
relative="org.tigris.subversion.subclipse.ui.repository.RepositoriesView"
@@ -261,7 +250,6 @@
<perspectiveExtension targetID="org.eclipse.team.ui.TeamSynchronizingPerspective">
<view
id="org.eclipse.mylar.tasklist.repositories"
- minimized="false"
ratio="0.7"
relationship="bottom"
relative="org.eclipse.team.sync.views.SynchronizeView"
@@ -550,7 +538,7 @@
id="org.eclipse.mylar.tasks.ui.colors.category.gradient.end"
isEditable="true"
label="Task List - Category Gradient Bottom"
- value="220,220,220">
+ value="234,233,237"> <!-- was all 220 -->
<description>
Background end color for Task List category gradients.
</description>
@@ -756,15 +744,6 @@
</adapter>
</factory>
</extension>
- <extension
- point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectors">
- <hyperlinkDetector
- class="org.eclipse.mylar.tasks.ui.editors.TaskHyperlinkDetector"
- id="org.eclipse.mylar.jira.ui.hyperlinkdetector"
- name="Mylar Task"
- targetId="org.eclipse.ui.DefaultTextEditor">
- </hyperlinkDetector>
- </extension>
</plugin>
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java
index ab9fd2370..7d3f8cf47 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/MoveToCategoryMenuContributor.java
@@ -48,7 +48,7 @@ public class MoveToCategoryMenuContributor implements IDynamicSubMenuContributor
};
String text = handleAcceleratorKeys(category.getSummary());
action.setText(text);
- action.setImageDescriptor(TaskListImages.CATEGORY);
+ action.setImageDescriptor(TasksUiImages.CATEGORY);
subMenuManager.add(action);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java
index ab5981bdd..1f3cad868 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java
@@ -50,7 +50,7 @@ public class RepositoryTaskDecorator implements ILightweightLabelDecorator {
}
}
if (query.isSynchronizing()) {
- decoration.addOverlay(TaskListImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT);
}
} else if (element instanceof AbstractRepositoryTask) {
AbstractRepositoryTask task = (AbstractRepositoryTask) element;
@@ -61,20 +61,20 @@ public class RepositoryTaskDecorator implements ILightweightLabelDecorator {
task.getRepositoryUrl());
if (connectorUi != null) {
if (!connectorUi.hasRichEditor()) {
- decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT);
} else if (connector != null && connector.hasRepositoryContext(repository, task)) {
- decoration.addOverlay(TaskListImages.OVERLAY_REPOSITORY_CONTEXT, IDecoration.BOTTOM_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_REPOSITORY_CONTEXT, IDecoration.BOTTOM_LEFT);
} else {
- decoration.addOverlay(TaskListImages.OVERLAY_REPOSITORY, IDecoration.BOTTOM_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_REPOSITORY, IDecoration.BOTTOM_LEFT);
}
}
if (task.isSynchronizing()) {
- decoration.addOverlay(TaskListImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_SYNCHRONIZING, IDecoration.TOP_LEFT);
}
if (!task.isCompleted() && TasksUiPlugin.getTaskListManager().isOverdue(task)) {
- decoration.addOverlay(TaskListImages.OVERLAY_DUE, IDecoration.TOP_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_DUE, IDecoration.TOP_LEFT);
} else if (!task.isCompleted() && task.getDueDate() != null) {
- decoration.addOverlay(TaskListImages.OVERLAY_HAS_DUE, IDecoration.TOP_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_HAS_DUE, IDecoration.TOP_LEFT);
}
} else if (element instanceof AbstractQueryHit) {
ITask correspondingTask = ((AbstractQueryHit) element).getCorrespondingTask();
@@ -83,10 +83,10 @@ public class RepositoryTaskDecorator implements ILightweightLabelDecorator {
ITask task = (ITask) element;
String url = task.getTaskUrl();
if (url != null && !url.trim().equals("") && !url.equals("http://")) {
- decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT);
}
if (!task.isCompleted() && TasksUiPlugin.getTaskListManager().isOverdue(task)) {
- decoration.addOverlay(TaskListImages.OVERLAY_DUE, IDecoration.TOP_LEFT);
+ decoration.addOverlay(TasksUiImages.OVERLAY_DUE, IDecoration.TOP_LEFT);
}
} else if (element instanceof TaskRepository) {
ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(((TaskRepository) element).getKind());
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java
index 6f0c0e487..b69d91970 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListBackupManager.java
@@ -40,7 +40,7 @@ import org.eclipse.ui.progress.IProgressService;
public class TaskListBackupManager implements IPropertyChangeListener {
private static final String TITLE_TASKLIST_BACKUP = "Tasklist Backup";
-
+
private static final String BACKUP_JOB_NAME = "Scheduled task data backup";
public static final String BACKUP_FAILURE_MESSAGE = "Could not backup task data. Check backup preferences.\n";
@@ -48,7 +48,7 @@ public class TaskListBackupManager implements IPropertyChangeListener {
private static final long SECOND = 1000;
private static final long MINUTE = 60 * SECOND;
-
+
private static final long HOUR = 60 * MINUTE;
private static final long DAY = 24 * HOUR;
@@ -167,10 +167,10 @@ public class TaskListBackupManager implements IPropertyChangeListener {
// backupFiles.add(file);
// }
// }
-// }
+// }
//
// File[] backupFileArray = backupFiles.toArray(new File[backupFiles.size()]);
-//
+//
// if (backupFileArray != null && backupFileArray.length > 0) {
// Arrays.sort(backupFileArray, new Comparator<File>() {
// public int compare(File file1, File file2) {
@@ -187,7 +187,7 @@ public class TaskListBackupManager implements IPropertyChangeListener {
// }
class CheckBackupRequired extends TimerTask {
-
+
@Override
public void run() {
if (!Platform.isRunning() || TasksUiPlugin.getDefault() == null) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java
index 44a81c523..3c10dc6fc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationIncoming.java
@@ -92,7 +92,7 @@ public class TaskListNotificationIncoming implements ITaskListNotification {
}
public Image getOverlayIcon() {
- return TaskListImages.getImage(TaskListImages.OVERLAY_INCOMMING);
+ return TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING);
}
public Date getDate() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java
index 8e678d6d0..d3fd15d22 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java
@@ -149,7 +149,7 @@ public class TaskListNotificationPopup extends PopupDialog {
ImageHyperlink hyperlink = new ImageHyperlink(section, SWT.NONE);
toolkit.adapt(hyperlink, true, true);
hyperlink.setBackground(null);
- hyperlink.setImage(TaskListImages.getImage(TaskListImages.NOTIFICATION_CLOSE));
+ hyperlink.setImage(TasksUiImages.getImage(TasksUiImages.NOTIFICATION_CLOSE));
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
close();
@@ -173,19 +173,17 @@ public class TaskListNotificationPopup extends PopupDialog {
private Rectangle restoreBounds() {
bounds = form.getBounds();
Rectangle maxBounds = null;
- // IWorkbenchWindow window =
- // PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- // if (window != null) {
- // maxBounds = window.getShell().getBounds();
- if (getShell() != null && !getShell().isDisposed()) {
- maxBounds = getShell().getDisplay().getClientArea();
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window != null) {
+ maxBounds = window.getShell().getMonitor().getClientArea();
} else {
// fallback
Display display = Display.getCurrent();
if (display == null)
display = Display.getDefault();
if (display != null && !display.isDisposed())
- maxBounds = display.getBounds();
+ maxBounds = display.getPrimaryMonitor().getClientArea();
}
if (bounds.width > -1 && bounds.height > -1) {
@@ -199,14 +197,15 @@ public class TaskListNotificationPopup extends PopupDialog {
}
if (bounds.x > -1 && bounds.y > -1 && maxBounds != null) {
- bounds.x = Math.max(bounds.x, maxBounds.x);
- bounds.y = Math.max(bounds.y, maxBounds.y);
+ //bounds.x = Math.max(bounds.x, maxBounds.x);
+ //bounds.y = Math.max(bounds.y, maxBounds.y);
if (bounds.width > -1 && bounds.height > -1) {
- bounds.x = maxBounds.width - bounds.width;
- bounds.y = maxBounds.height - bounds.height;
+ bounds.x = maxBounds.x + maxBounds.width - bounds.width;
+ bounds.y = maxBounds.y + maxBounds.height - bounds.height;
}
}
+
return bounds;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java
index 690aa4180..d9e71f08e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationQueryIncoming.java
@@ -77,7 +77,7 @@ public class TaskListNotificationQueryIncoming implements ITaskListNotification
}
public Image getOverlayIcon() {
- return TaskListImages.getImage(TaskListImages.OVERLAY_INCOMMING);
+ return TasksUiImages.getImage(TasksUiImages.OVERLAY_INCOMMING);
}
public Date getDate() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java
index ed49a634f..19f5a63cc 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationReminder.java
@@ -63,7 +63,7 @@ public class TaskListNotificationReminder implements ITaskListNotification {
}
public Image getOverlayIcon() {
- return TaskListImages.getImage(TaskListImages.CALENDAR);
+ return TasksUiImages.getImage(TasksUiImages.CALENDAR);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
index aeafaee2c..ac9abee6d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListImages.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiImages.java
@@ -25,7 +25,7 @@ import org.eclipse.swt.graphics.Point;
/**
* @author Mik Kersten
*/
-public class TaskListImages {
+public class TasksUiImages {
private static ImageRegistry imageRegistry;
@@ -35,6 +35,8 @@ public class TaskListImages {
private static final String T_TOOL = "etool16";
+ private static final String T_OBJ = "obj16";
+
private static final String T_WIZBAN = "wizban";
private static final String T_OVR = "ovr16";
@@ -47,6 +49,8 @@ public class TaskListImages {
public static final ImageDescriptor REPOSITORY = create("eview16", "repository.gif");
+ public static final ImageDescriptor REPOSITORY_SMALL = create(T_OBJ, "repository-small.gif");
+
public static final ImageDescriptor REPOSITORY_NEW = create("etool16", "repository-new.gif");
public static final ImageDescriptor REPOSITORIES = create("eview16", "repositories.gif");
@@ -81,6 +85,8 @@ public class TaskListImages {
public static final ImageDescriptor OVERLAY_WEB = create(T_TOOL, "overlay-web.gif");
+ public static final ImageDescriptor BROWSER_SMALL = create(T_OBJ, "browser-small.gif");
+
public static final ImageDescriptor OVERLAY_SYNCHRONIZING = create(T_EVIEW, "overlay-synchronizing.gif");
public static final ImageDescriptor OVERLAY_HAS_DUE = create(T_EVIEW, "overlay-has-due.gif");
@@ -113,7 +119,7 @@ public class TaskListImages {
public static final ImageDescriptor CONTEXT_TRANSFER = create(T_TOOL, "context-transfer.gif");
- public static final ImageDescriptor ATTACHMENT_PATCH = create(T_TOOL, "attachment-patch.gif");
+ public static final ImageDescriptor ATTACHMENT_PATCH = create(T_OBJ, "attachment-patch.gif");
public static final ImageDescriptor OVERLAY_INCOMMING = create(T_EVIEW, "overlay-incoming.gif");
@@ -175,6 +181,8 @@ public class TaskListImages {
public static final ImageDescriptor REFRESH = create(T_ELCL, "refresh.gif");
+ public static final ImageDescriptor REFRESH_SMALL = create(T_ELCL, "refresh-small.gif");
+
public static final ImageDescriptor TASK_ACTIVE = createSize(create(T_TOOL, "task-active.gif"), SIZE);
public static final ImageDescriptor TASK_ACTIVE_CENTERED = createSize(create(T_TOOL, "task-active-centered.gif"), SIZE);
@@ -208,14 +216,16 @@ public class TaskListImages {
public static final ImageDescriptor CALENDAR = create(T_TOOL, "calendar.gif");
+ public static final ImageDescriptor CALENDAR_SMALL = create(T_OBJ, "calendar-small.gif");
+
public static final ImageDescriptor BANNER_REPOSITORY = create(T_WIZBAN, "banner-repository.gif");
public static final ImageDescriptor BANNER_REPOSITORY_CONTEXT = create(T_WIZBAN, "banner-repository-context.gif");
public static final ImageDescriptor BANNER_IMPORT = create(T_WIZBAN, "banner-import.gif");
- public static final ImageDescriptor STATUS_WARNING = createWithOverlay(TaskListImages.STATUS_NORMAL,
- TaskListImages.OVERLAY_WARNING, false, true);
+ public static final ImageDescriptor STATUS_WARNING = createWithOverlay(TasksUiImages.STATUS_NORMAL,
+ TasksUiImages.OVERLAY_WARNING, false, true);
public static final ImageDescriptor BLANK = create(T_ELCL, "blank.gif");
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java
index 9097657f8..fa733b6d7 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ActivityReportAction.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.planner.TaskActivityWizard;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
@@ -32,7 +32,7 @@ public class ActivityReportAction extends Action {
setId(ID);
setText(LABEL);
setToolTipText(LABEL);
- setImageDescriptor(TaskListImages.TASKLIST);
+ setImageDescriptor(TasksUiImages.TASKLIST);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java
index a062bc710..f1cecb248 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/AddRepositoryAction.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.ui.TaskCommandIds;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.ui.PlatformUI;
@@ -29,7 +29,7 @@ public class AddRepositoryAction extends Action {
private static final String ID = "org.eclipse.mylar.tasklist.repositories.add";
public AddRepositoryAction() {
- setImageDescriptor(TaskListImages.REPOSITORY_NEW);
+ setImageDescriptor(TasksUiImages.REPOSITORY_NEW);
setText(TITLE);
setId(ID);
setEnabled(TasksUiPlugin.getRepositoryManager().hasUserManagedRepositoryConnectors());
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java
index 33838cbbc..e0eaaff3e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CollapseAllAction.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
/**
@@ -32,7 +32,7 @@ public class CollapseAllAction extends Action {
setId(ID);
setText(LABEL);
setToolTipText(LABEL);
- setImageDescriptor(TaskListImages.COLLAPSE_ALL);
+ setImageDescriptor(TasksUiImages.COLLAPSE_ALL);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java
index fa2d972ae..d339dc57e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/CopyTaskDetailsAction.java
@@ -12,7 +12,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
@@ -40,7 +40,7 @@ public class CopyTaskDetailsAction extends BaseSelectionListenerAction {
super(LABEL);
setToolTipText(LABEL);
setId(ID);
- setImageDescriptor(TaskListImages.COPY);
+ setImageDescriptor(TasksUiImages.COPY);
if (setAccelerator) {
setAccelerator(SWT.MOD1 + 'c');
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DiscardOutgoingAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DiscardOutgoingAction.java
index 862ac138d..732a50d77 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DiscardOutgoingAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/DiscardOutgoingAction.java
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITask;
@@ -42,7 +42,7 @@ public class DiscardOutgoingAction extends Action {
setText(ACTION_NAME);
setToolTipText(ACTION_NAME);
setId(ID);
- setImageDescriptor(TaskListImages.STATUS_NORMAL);
+ setImageDescriptor(TasksUiImages.STATUS_NORMAL);
if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof AbstractRepositoryTask)) {
AbstractRepositoryTask task = (AbstractRepositoryTask) selectedElements.get(0);
setEnabled(task.getSyncState().equals(RepositoryTaskSyncState.OUTGOING));
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java
index 11e26cb53..2716b0f78 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/ExpandAllAction.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
/**
@@ -32,7 +32,7 @@ public class ExpandAllAction extends Action {
setId(ID);
setText(LABEL);
setToolTipText(LABEL);
- setImageDescriptor(TaskListImages.EXPAND_ALL);
+ setImageDescriptor(TasksUiImages.EXPAND_ALL);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java
index dbe72931a..b5d2e6cbd 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterArchiveContainerAction.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -33,7 +33,7 @@ public class FilterArchiveContainerAction extends Action {
setText(LABEL);
setToolTipText(LABEL);
setId(ID);
- setImageDescriptor(TaskListImages.FILTER_ARCHIVE);
+ setImageDescriptor(TasksUiImages.FILTER_ARCHIVE);
setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains(TaskListPreferenceConstants.FILTER_ARCHIVE_MODE));
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java
index 6f83cdb37..4c1292a2c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/FilterCompletedTasksAction.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -33,7 +33,7 @@ public class FilterCompletedTasksAction extends Action {
setText(LABEL);
setToolTipText(LABEL);
setId(ID);
- setImageDescriptor(TaskListImages.FILTER_COMPLETE);
+ setImageDescriptor(TasksUiImages.FILTER_COMPLETE);
setChecked(TasksUiPlugin.getDefault().getPreferenceStore().contains(TaskListPreferenceConstants.FILTER_COMPLETE_MODE));
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java
index dbcc30235..44d33129e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoIntoAction.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.ui.IViewActionDelegate;
import org.eclipse.ui.IViewPart;
@@ -34,7 +34,7 @@ public class GoIntoAction extends Action implements IViewActionDelegate {
setId(ID);
setText(LABEL);
setToolTipText(LABEL);
- setImageDescriptor(TaskListImages.GO_INTO);
+ setImageDescriptor(TasksUiImages.GO_INTO);
}
public void init(IViewPart view) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java
index 739584fbb..aed9d75c8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/GoUpAction.java
@@ -11,7 +11,7 @@
package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.ui.part.DrillDownAdapter;
@@ -23,7 +23,7 @@ public class GoUpAction extends Action {
setText("Go Up To Root");
setToolTipText("Go Up To Root");
setId(ID);
- setImageDescriptor(TaskListImages.GO_UP);
+ setImageDescriptor(TasksUiImages.GO_UP);
}
@Override
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 bd3d9dd38..fa7c8861d 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
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.jface.action.Action;
import org.eclipse.mylar.internal.tasks.core.WebQueryHit;
import org.eclipse.mylar.internal.tasks.core.WebTask;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.core.ITaskListElement;
@@ -39,7 +39,7 @@ public class MarkTaskCompleteAction extends Action {
setText(ACTION_NAME);
setToolTipText("Mark "+ACTION_NAME);
setId(ID);
- setImageDescriptor(TaskListImages.TASK_COMPLETE);
+ setImageDescriptor(TasksUiImages.TASK_COMPLETE);
if(selectedElements.size() == 1 && (selectedElements.get(0) instanceof Task)) {
Task task = (Task)selectedElements.get(0);
if (task instanceof WebTask) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java
index 1f59bb6fb..9b56d973e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskIncompleteAction.java
@@ -16,7 +16,7 @@ import java.util.List;
import org.eclipse.jface.action.Action;
import org.eclipse.mylar.internal.tasks.core.WebQueryHit;
import org.eclipse.mylar.internal.tasks.core.WebTask;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.core.ITaskListElement;
@@ -38,7 +38,7 @@ public class MarkTaskIncompleteAction extends Action {
setText(ACTION_NAME);
setToolTipText("Mark "+ACTION_NAME);
setId(ID);
- setImageDescriptor(TaskListImages.TASK_INCOMPLETE);
+ setImageDescriptor(TasksUiImages.TASK_INCOMPLETE);
if(selectedElements.size() == 1 && (selectedElements.get(0) instanceof ITask)) {
Task task = (Task)selectedElements.get(0);
setEnabled(task.isLocal());
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java
index 47bbb4e13..80c110cb2 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/MarkTaskUnreadAction.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import java.util.List;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITaskListElement;
import org.eclipse.mylar.tasks.core.Task;
@@ -34,7 +34,7 @@ public class MarkTaskUnreadAction extends AbstractRepositoryTasksAction {
setToolTipText(ACTION_NAME);
setToolTipText("Mark " + ACTION_NAME);
setId(ID);
- setImageDescriptor(TaskListImages.STATUS_NORMAL_INCOMING);
+ setImageDescriptor(TasksUiImages.STATUS_NORMAL_INCOMING);
if (selectedElements.size() == 1 && (selectedElements.get(0) instanceof Task)) {
Task task = (Task) selectedElements.get(0);
setEnabled(!task.isLocal());
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java
index bc6048b6c..c0666a92f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewCategoryAction.java
@@ -16,7 +16,7 @@ import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.window.Window;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.TaskCategory;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.ui.IViewActionDelegate;
@@ -38,7 +38,7 @@ public class NewCategoryAction extends Action implements IViewActionDelegate {
setText("New Category...");
setToolTipText("New Category...");
setId(ID);
- setImageDescriptor(TaskListImages.CATEGORY_NEW);
+ setImageDescriptor(TasksUiImages.CATEGORY_NEW);
}
public void init(IViewPart view) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewLocalTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewLocalTaskAction.java
index e8b6fac85..22d77a98f 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewLocalTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/NewLocalTaskAction.java
@@ -19,7 +19,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.mylar.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.internal.tasks.ui.views.TaskInputDialog;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
@@ -49,7 +49,7 @@ public class NewLocalTaskAction extends Action implements IViewActionDelegate {
setText(TaskInputDialog.LABEL_SHELL);
setToolTipText(TaskInputDialog.LABEL_SHELL);
setId(ID);
- setImageDescriptor(TaskListImages.TASK_NEW);
+ setImageDescriptor(TasksUiImages.TASK_NEW);
}
public void init(IViewPart view) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java
new file mode 100644
index 000000000..73a52211d
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/OpenTasksUiPreferencesAction.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 Mylar committers 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
+ *******************************************************************************/
+
+package org.eclipse.mylar.internal.tasks.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.mylar.internal.tasks.ui.preferences.TasksPreferencePage;
+import org.eclipse.mylar.tasks.ui.TasksUiUtil;
+
+/**
+ * @author Mik Kersten
+ */
+public class OpenTasksUiPreferencesAction extends Action {
+
+ public static final String ID = "org.eclipse.mylar.tasks.ui.actions.preferences.open";
+
+ private static final String LABEL = "Preferences...";
+
+ public OpenTasksUiPreferencesAction() {
+ setText(LABEL);
+ setToolTipText(LABEL);
+ setId(ID);
+ }
+
+ @Override
+ public void run() {
+ TasksUiUtil.showPreferencePage(TasksPreferencePage.ID, new TasksPreferencePage());
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java
index ab86ee5c8..a4f65458c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PresentationDropDownSelectionAction.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.ITaskListPresentation;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.swt.widgets.Control;
@@ -43,7 +43,7 @@ public class PresentationDropDownSelectionAction extends Action implements IMenu
setToolTipText(LABEL_NAME);
setId(ID);
setEnabled(true);
- setImageDescriptor(TaskListImages.TASKLIST_MODE);
+ setImageDescriptor(TasksUiImages.TASKLIST_MODE);
}
protected void addActionsToMenu() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PreviousTaskDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PreviousTaskDropDownAction.java
index c1c34adfb..d0002fc52 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PreviousTaskDropDownAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/PreviousTaskDropDownAction.java
@@ -14,7 +14,7 @@ import java.util.List;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskActivationHistory;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.ITask;
@@ -33,7 +33,7 @@ public class PreviousTaskDropDownAction extends TaskNavigateDropDownAction {
setToolTipText("Previous Task");
setId(ID);
setEnabled(true);
- setImageDescriptor(TaskListImages.NAVIGATE_PREVIOUS);
+ setImageDescriptor(TasksUiImages.NAVIGATE_PREVIOUS);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java
index 0383b1582..ee64192a0 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/RemoveFromCategoryAction.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.core.TaskCategory;
@@ -37,7 +37,7 @@ public class RemoveFromCategoryAction extends Action {
this.view = view;
setText("Remove From Category");
setId(ID);
- setImageDescriptor(TaskListImages.REMOVE);
+ setImageDescriptor(TasksUiImages.REMOVE);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java
new file mode 100644
index 000000000..cce5fe138
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeAutomaticallyAction.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 Mylar committers 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
+ *******************************************************************************/
+
+package org.eclipse.mylar.internal.tasks.ui.actions;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
+import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
+
+/**
+ * @author Mik Kersten
+ */
+public class SynchronizeAutomaticallyAction extends Action {
+
+ public static final String ID = "org.eclipse.mylar.tasks.ui.actions.synchronize.background";
+
+ private static final String LABEL = "Synchronize Automatically";
+
+ public SynchronizeAutomaticallyAction() {
+ setText(LABEL);
+ setToolTipText(LABEL);
+ setId(ID);
+ setChecked(TasksUiPlugin.getDefault().getPreferenceStore().getBoolean(TaskListPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED));
+ }
+
+ @Override
+ public void run() {
+ TasksUiPlugin.getDefault().getPreferenceStore().setValue(TaskListPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED,
+ isChecked());
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java
index 09508006f..dac58100b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/SynchronizeEditorAction.java
@@ -15,7 +15,7 @@ import java.util.Iterator;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITask;
@@ -38,7 +38,7 @@ public class SynchronizeEditorAction extends BaseSelectionListenerAction {
super(LABEL);
setToolTipText(LABEL);
setId(ID);
- setImageDescriptor(TaskListImages.REFRESH);
+ setImageDescriptor(TasksUiImages.REFRESH_SMALL);
// setAccelerator(SWT.MOD1 + 'r');
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java
index ab96c3d24..44efda25b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskActivateAction.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -31,7 +31,7 @@ public class TaskActivateAction extends Action implements IViewActionDelegate {
public TaskActivateAction() {
setId(ID);
setText("Activate");
- setImageDescriptor(TaskListImages.TASK_ACTIVE_CENTERED);
+ setImageDescriptor(TasksUiImages.TASK_ACTIVE_CENTERED);
}
public void init(IViewPart view) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java
index 9e9e75243..b46da6db2 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskDeactivateAction.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.actions;
import org.eclipse.jface.action.Action;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.ITask;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -29,7 +29,7 @@ public class TaskDeactivateAction extends Action {
public TaskDeactivateAction() {
setId(ID);
setText("Deactivate");
- setImageDescriptor(TaskListImages.TASK_INACTIVE);
+ setImageDescriptor(TasksUiImages.TASK_INACTIVE);
}
public void run(ITask task) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java
index f2d50cb01..ebd2d70a8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/RepositoryTaskOutlinePage.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.TaskComment;
import org.eclipse.mylar.tasks.ui.editors.AbstractRepositoryTaskEditor;
import org.eclipse.mylar.tasks.ui.editors.RepositoryTaskOutlineNode;
@@ -83,13 +83,13 @@ public class RepositoryTaskOutlinePage extends ContentOutlinePage {
if (RepositoryTaskOutlineNode.LABEL_COMMENTS.equals(node.getContents())||
RepositoryTaskOutlineNode.LABEL_NEW_COMMENT.equals(node.getContents())) {
- return TaskListImages.getImage(TaskListImages.COMMENT);
+ return TasksUiImages.getImage(TasksUiImages.COMMENT);
} if (RepositoryTaskOutlineNode.LABEL_DESCRIPTION.equals(node.getContents())) {
- return TaskListImages.getImage(TaskListImages.TASK_NOTES);
+ return TasksUiImages.getImage(TasksUiImages.TASK_NOTES);
} else if (node.getComment() != null) {
- return TaskListImages.getImage(TaskListImages.PERSON);
+ return TasksUiImages.getImage(TasksUiImages.PERSON);
} else {
- return TaskListImages.getImage(TaskListImages.TASK_REPOSITORY);
+ return TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY);
}
} else {
return super.getImage(element);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
index 7bb102019..187fd831b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorActionContributor.java
@@ -31,7 +31,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.mylar.internal.tasks.ui.AddExistingTaskJob;
import org.eclipse.mylar.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.actions.AttachFileAction;
import org.eclipse.mylar.internal.tasks.ui.actions.CopyTaskDetailsAction;
import org.eclipse.mylar.internal.tasks.ui.actions.OpenWithBrowserAction;
@@ -173,6 +173,9 @@ public class TaskEditorActionContributor extends MultiPageEditorActionBarContrib
final MenuManager subMenuManager = new MenuManager("Add to " + TaskListView.LABEL_VIEW);
List<AbstractTaskContainer> categories = new ArrayList<AbstractTaskContainer>(TasksUiPlugin
.getTaskListManager().getTaskList().getCategories());
+
+ // This is added to solve Bug 180252
+ categories.add(TasksUiPlugin.getTaskListManager().getTaskList().getRootCategory());
Collections.sort(categories);
for (final AbstractTaskContainer category : categories) {
if (!category.equals(TasksUiPlugin.getTaskListManager().getTaskList().getArchiveContainer())) {
@@ -184,7 +187,7 @@ public class TaskEditorActionContributor extends MultiPageEditorActionBarContrib
};
String text = category.getSummary();
action.setText(text);
- action.setImageDescriptor(TaskListImages.CATEGORY);
+ action.setImageDescriptor(TasksUiImages.CATEGORY);
subMenuManager.add(action);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
index 4f6be5640..4b5b740a9 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskPlanningEditor.java
@@ -22,7 +22,7 @@ import org.eclipse.mylar.context.core.ContextCorePlugin;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.core.util.DateUtil;
import org.eclipse.mylar.internal.tasks.ui.RetrieveTitleFromUrlJob;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.actions.NewLocalTaskAction;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.monitor.ui.MylarMonitorUiPlugin;
@@ -57,7 +57,7 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Spinner;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.FormColors;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.events.ExpansionEvent;
@@ -206,11 +206,9 @@ public class TaskPlanningEditor extends TaskFormPage {
summary.setText(updateTask.getSummary());
TaskPlanningEditor.this.markDirty(wasDirty);
}
- if (parentEditor != null) {
+ if (parentEditor != null && updateTask != null) {
parentEditor.changeTitle();
- }
- if (form != null && updateTask != null) {
- form.setText(updateTask.getSummary());
+ parentEditor.updateTitle(updateTask.getSummary());
}
}
@@ -342,7 +340,7 @@ public class TaskPlanningEditor extends TaskFormPage {
layout.marginHeight = 3;
nameValueComp.setLayout(layout);
toolkit.createLabel(nameValueComp, label, SWT.NONE).setForeground(
- toolkit.getColors().getColor(IFormColors.TITLE));
+ toolkit.getColors().getColor(FormColors.TITLE));
Text text;
if ((SWT.READ_ONLY & style) == SWT.READ_ONLY) {
text = new Text(nameValueComp, style);
@@ -392,7 +390,7 @@ public class TaskPlanningEditor extends TaskFormPage {
GridLayout nameValueLayout = new GridLayout(2, false);
nameValueLayout.marginHeight = 3;
nameValueComp.setLayout(nameValueLayout);
- toolkit.createLabel(nameValueComp, "Priority:").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ toolkit.createLabel(nameValueComp, "Priority:").setForeground(toolkit.getColors().getColor(FormColors.TITLE));
priorityCombo = new CCombo(nameValueComp, SWT.FLAT);
priorityCombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
toolkit.paintBordersFor(nameValueComp);
@@ -422,7 +420,7 @@ public class TaskPlanningEditor extends TaskFormPage {
nameValueComp = toolkit.createComposite(statusComposite);
nameValueComp.setLayout(new GridLayout(2, false));
- toolkit.createLabel(nameValueComp, "Status:").setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ toolkit.createLabel(nameValueComp, "Status:").setForeground(toolkit.getColors().getColor(FormColors.TITLE));
statusCombo = new CCombo(nameValueComp, SWT.FLAT);
statusCombo.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
toolkit.paintBordersFor(nameValueComp);
@@ -472,7 +470,7 @@ public class TaskPlanningEditor extends TaskFormPage {
GridDataFactory.fillDefaults().grab(true, false).applyTo(urlComposite);
Label label = toolkit.createLabel(urlComposite, "URL:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
issueReportURL = toolkit.createText(urlComposite, task.getTaskUrl(), SWT.FLAT);
issueReportURL.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
@@ -584,7 +582,7 @@ public class TaskPlanningEditor extends TaskFormPage {
Composite nameValueComp = makeComposite(sectionClient, 3);
Label label = toolkit.createLabel(nameValueComp, LABEL_SCHEDULE);
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
datePicker = new DatePicker(nameValueComp, SWT.FLAT, DatePicker.LABEL_CHOOSE);
@@ -613,7 +611,7 @@ public class TaskPlanningEditor extends TaskFormPage {
ImageHyperlink clearScheduledDate = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearScheduledDate.setImage(TaskListImages.getImage(TaskListImages.REMOVE));
+ clearScheduledDate.setImage(TasksUiImages.getImage(TasksUiImages.REMOVE));
clearScheduledDate.setToolTipText(CLEAR);
clearScheduledDate.addHyperlinkListener(new HyperlinkAdapter() {
@@ -627,11 +625,12 @@ public class TaskPlanningEditor extends TaskFormPage {
nameValueComp = makeComposite(sectionClient, 3);
label = toolkit.createLabel(nameValueComp, LABEL_DUE);
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
dueDatePicker = new DatePicker(nameValueComp, SWT.FLAT, DatePicker.LABEL_CHOOSE);
calendar = Calendar.getInstance();
+
if (task.getDueDate() != null) {
calendar.setTime(task.getDueDate());
dueDatePicker.setDate(calendar);
@@ -649,7 +648,7 @@ public class TaskPlanningEditor extends TaskFormPage {
toolkit.paintBordersFor(nameValueComp);
ImageHyperlink clearDueDate = toolkit.createImageHyperlink(nameValueComp, SWT.NONE);
- clearDueDate.setImage(TaskListImages.getImage(TaskListImages.REMOVE));
+ clearDueDate.setImage(TasksUiImages.getImage(TasksUiImages.REMOVE));
clearDueDate.setToolTipText(CLEAR);
clearDueDate.addHyperlinkListener(new HyperlinkAdapter() {
@@ -661,10 +660,15 @@ public class TaskPlanningEditor extends TaskFormPage {
});
+ if (task instanceof AbstractRepositoryTask) {
+ dueDatePicker.setEnabled(false);
+ clearDueDate.setEnabled(false);
+ }
+
// Estimated time
nameValueComp = makeComposite(sectionClient, 2);
label = toolkit.createLabel(nameValueComp, "Estimated hours:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
estimated = new Spinner(nameValueComp, SWT.NONE);
toolkit.adapt(estimated, true, true);
@@ -690,7 +694,7 @@ public class TaskPlanningEditor extends TaskFormPage {
// GridDataFactory.fillDefaults().span(2, 1).align(SWT.LEFT,
// SWT.DEFAULT).applyTo(nameValueComp);
label = toolkit.createLabel(nameValueComp, "Active:");
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
label.setToolTipText(DESCRIPTION_ESTIMATED);
String elapsedTimeString = NO_TIME_ELAPSED;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java
index ae73cf616..813f8a05e 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/DateSelectionDialog.java
@@ -25,6 +25,7 @@ import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.forms.widgets.FormToolkit;
/**
* @author Ken Sueda
@@ -39,12 +40,16 @@ public class DateSelectionDialog extends Dialog {
private Calendar initialCalendar = GregorianCalendar.getInstance();
+ private FormToolkit toolkit;
+
public DateSelectionDialog(Shell parentShell, String title) {
this(parentShell, GregorianCalendar.getInstance(), title);
}
public DateSelectionDialog(Shell parentShell, Calendar initialDate, String title) {
super(parentShell);
+
+ toolkit = new FormToolkit(parentShell.getDisplay());;
if(title != null) {
this.title = title;
}
@@ -56,9 +61,8 @@ public class DateSelectionDialog extends Dialog {
@Override
protected Control createDialogArea(Composite parent) {
- getShell().setText(title);
+ getShell().setText(title);
DatePickerPanel datePanel = new DatePickerPanel(parent, SWT.NULL, initialCalendar);
-
datePanel.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
@@ -68,12 +72,19 @@ public class DateSelectionDialog extends Dialog {
}
}
});
-
+ //datePanel.setBackground(toolkit.getColors().getBackground());
return datePanel;
}
@Override
+ public boolean close() {
+ toolkit.dispose();
+ return super.close();
+ }
+
+ @Override
protected void createButtonsForButtonBar(Composite parent) {
+ parent.setBackground(toolkit.getColors().getBackground());
createButton(parent, IDialogConstants.CLIENT_ID + 1, "Clear", false);
super.createButtonsForButtonBar(parent);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java
index d93b5aa7f..dfb0468bf 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/planner/RemoveTaskAction.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.internal.tasks.ui.planner;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.ITask;
/**
@@ -29,7 +29,7 @@ public class RemoveTaskAction extends Action {
this.viewer = view;
setText("Remove Selected");
setId(ID);
- setImageDescriptor(TaskListImages.REMOVE);
+ setImageDescriptor(TasksUiImages.REMOVE);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
index dbd3aef3f..22b8e14ba 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java
@@ -23,7 +23,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.tasks.ui.IDynamicSubMenuContributor;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.ITaskListExternalizer;
import org.eclipse.mylar.tasks.core.RepositoryTemplate;
@@ -280,7 +280,7 @@ public class TasksUiExtensionReader {
.getName(), iconPath);
if (descriptor != null) {
TasksUiPlugin.getDefault().addBrandingIcon(((AbstractRepositoryConnectorUi)connectorUi).getRepositoryType(),
- TaskListImages.getImage(descriptor));
+ TasksUiImages.getImage(descriptor));
}
}
String overlayIconPath = element.getAttribute(ATTR_OVERLAY_ICON);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java
index 0ee4d7a49..a7cb994e7 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/DatePickerPanel.java
@@ -12,28 +12,32 @@
package org.eclipse.mylar.internal.tasks.ui.views;
import java.text.DateFormat;
+import java.text.DateFormatSymbols;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.List;
import org.eclipse.jface.layout.GridDataFactory;
-import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.ListViewer;
import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.MouseEvent;
+import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DateTime;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Spinner;
/**
* @author Bahadir Yagan
@@ -42,49 +46,64 @@ import org.eclipse.swt.widgets.DateTime;
*/
public class DatePickerPanel extends Composite implements KeyListener, ISelectionProvider {
+ // private Combo timeCombo = null;
+
+ // private Combo monthCombo = null;
+
private org.eclipse.swt.widgets.List timeList = null;
- private ISelection selection = null;
+ private org.eclipse.swt.widgets.List monthList = null;
+
+ private Spinner yearSpinner = null;
+
+ private Composite headerComposite = null;
+
+ private Composite calendarComposite = null;
+
+ private Calendar initialDate = null;
private Calendar date = null;
- private DateTime calendar = null;
+ private ISelection selection = null;
+
+ private DateFormatSymbols dateFormatSymbols = null;
+
+ private Label[] calendarLabels = null;
private List<ISelectionChangedListener> selectionListeners = new ArrayList<ISelectionChangedListener>();
public DatePickerPanel(Composite parent, int style, Calendar initialDate) {
super(parent, style);
+ this.initialDate = GregorianCalendar.getInstance();
+ this.initialDate.setTime(initialDate.getTime());
this.date = initialDate;
initialize();
- setDate(date);
+ updateCalendar();
}
private void initialize() {
if (date == null) {
date = GregorianCalendar.getInstance();
- date.set(Calendar.HOUR_OF_DAY, TasksUiPlugin.getTaskListManager().getStartHour());
}
+ dateFormatSymbols = new DateFormatSymbols();
+ calendarLabels = new Label[42];
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
+ // gridLayout.horizontalSpacing = 3;
+ // gridLayout.verticalSpacing = 3;
this.setLayout(gridLayout);
+ // pickerPanel.setSize(new org.eclipse.swt.graphics.Point(400, 200));
+ createMonthList(this);
Composite middle = new Composite(this, SWT.NONE);
GridLayout middleLayout = new GridLayout();
- // middleLayout.verticalSpacing = 0;
+ middleLayout.verticalSpacing = 0;
middle.setLayout(middleLayout);
- calendar = new DateTime(middle, SWT.CALENDAR | SWT.BORDER);
- calendar.addSelectionListener(new SelectionAdapter() {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- date.set(Calendar.YEAR, calendar.getYear());
- date.set(Calendar.MONTH, calendar.getMonth());
- date.set(Calendar.DAY_OF_MONTH, calendar.getDay());
- setSelection(new DateSelection(date));
- notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
- }
- });
-
+ createYearSpinner(middle);
+ createComposite(middle);
+ createComposite1(middle);
+ createCalendarData();
createTimeList(this);
+
}
/**
@@ -92,49 +111,248 @@ public class DatePickerPanel extends Composite implements KeyListener, ISelectio
*
*/
private void createTimeList(Composite composite) {
-
+ timeList = new org.eclipse.swt.widgets.List(composite, SWT.READ_ONLY | SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
DateFormat dateFormat = DateFormat.getTimeInstance(DateFormat.SHORT);
- Calendar tempCalendar = Calendar.getInstance();
+ Calendar tempCalendar = Calendar.getInstance();
tempCalendar.set(Calendar.MINUTE, 0);
tempCalendar.set(Calendar.SECOND, 0);
- String[] times = new String[24];
- for (int x = 0; x < 24; x++) {
+ for(int x = 0; x < 24; x++) {
tempCalendar.set(Calendar.HOUR_OF_DAY, x);
- String timeString = dateFormat.format(tempCalendar.getTime());
- times[x] = timeString;
+ timeList.add(dateFormat.format(tempCalendar.getTime()));
}
- ListViewer listViewer = new ListViewer(composite);
+ if (date == null) {
+ timeList.select(Calendar.getInstance().get(Calendar.HOUR_OF_DAY));
+ } else {
+ timeList.select(date.get(Calendar.HOUR_OF_DAY));
+ }
+ timeList.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ date.set(Calendar.HOUR_OF_DAY, timeList.getSelectionIndex());
+ date.set(Calendar.MINUTE, 0);
+ setSelection(new DateSelection(date));
+ notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
+ // updateCalendar();
+ }
+ });
+ GridDataFactory.fillDefaults().hint(SWT.DEFAULT, 150).grab(false, true).applyTo(timeList);
+ timeList.addKeyListener(this);
+ }
- listViewer.setContentProvider(new ArrayContentProvider());
- listViewer.setInput(times);
+ // /**
+ // * This method initializes the month combo
+ // *
+ // */
+ // private void createTimeCombo(Composite composite) {
+ // timeCombo = new Combo(composite, SWT.READ_ONLY);
+ // timeCombo.setItems(new String[] { "12:00 AM", "1:00 AM", "2:00 AM", "3:00
+ // AM", "4:00 AM", "5:00 AM",
+ // "6:00 AM", "7:00 AM", "8:00 AM", "9:00 AM", "10:00 AM", "11:00 AM",
+ // "12:00 PM", "1:00 PM",
+ // "2:00 PM", "3:00 PM", "4:00 PM", "5:00 PM", "6:00 PM", "7:00 PM", "8:00
+ // PM", "9:00 PM", "10:00 PM",
+ // "11:00 PM" });
+ // if(date == null) {
+ // timeCombo.select(Calendar.getInstance().get(Calendar.HOUR_OF_DAY));
+ // } else {
+ // timeCombo.select(date.get(Calendar.HOUR_OF_DAY));
+ // }
+ // timeCombo.addModifyListener(new ModifyListener() {
+ // public void modifyText(ModifyEvent arg0) {
+ // date.set(Calendar.HOUR_OF_DAY, timeCombo.getSelectionIndex());
+ // date.set(Calendar.MINUTE, 0);
+ // setSelection(new DateSelection(date));
+ // notifyListeners(new SelectionChangedEvent(DatePickerPanel.this,
+ // getSelection()));
+ // //updateCalendar();
+ // }
+ // });
+ // timeCombo.addKeyListener(this);
+ // }
- timeList = listViewer.getList();
+ /**
+ * This method initializes the month combo
+ *
+ */
+ private void createMonthList(Composite composite) {
+ monthList = new org.eclipse.swt.widgets.List(composite, SWT.READ_ONLY | SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL);
+ for (String month : dateFormatSymbols.getMonths()) {
+ if (month != null && !month.equals("")) {
+ monthList.add(month);
+ }
+ }
+ GridDataFactory.fillDefaults().hint(SWT.DEFAULT, 50).grab(false, false).applyTo(monthList);
+ monthList.select(date.get(Calendar.MONTH));
+ monthList.addSelectionListener(new SelectionAdapter() {
- listViewer.addSelectionChangedListener(new ISelectionChangedListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ date.set(Calendar.MONTH, monthList.getSelectionIndex());
+ setSelection(new DateSelection(date));
+ notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
+ updateCalendar();
+ }
+ });
+ monthList.addKeyListener(this);
+ }
- public void selectionChanged(SelectionChangedEvent event) {
- date.set(Calendar.HOUR_OF_DAY, timeList.getSelectionIndex());
- date.set(Calendar.MINUTE, 0);
+ private void createYearSpinner(Composite composite) {
+ Composite yearComposite = new Composite(composite, SWT.NONE);
+ GridDataFactory.fillDefaults().align(SWT.CENTER, SWT.CENTER).applyTo(yearComposite);
+ yearComposite.setLayout(new GridLayout(2, false));
+ org.eclipse.swt.widgets.Label yearLabel = new org.eclipse.swt.widgets.Label(yearComposite, SWT.NONE);
+ yearLabel.setText("Year: ");
+ GridData gridData1 = new GridData();
+ gridData1.horizontalAlignment = GridData.BEGINNING;
+ gridData1.grabExcessVerticalSpace = false;
+ gridData1.grabExcessHorizontalSpace = false;
+ gridData1.heightHint = -1;
+ gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
+ yearSpinner = new Spinner(yearComposite, SWT.BORDER | SWT.READ_ONLY);
+ yearSpinner.setMinimum(1900);
+ yearSpinner.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ yearSpinner.setDigits(0);
+ yearSpinner.setMaximum(3000);
+ yearSpinner.setLayoutData(gridData1);
+ yearSpinner.setSelection(date.get(Calendar.YEAR));
+ yearSpinner.addModifyListener(new ModifyListener() {
+
+ public void modifyText(ModifyEvent arg0) {
+ date.set(Calendar.YEAR, yearSpinner.getSelection());
setSelection(new DateSelection(date));
notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
+ updateCalendar();
}
+
});
+ yearSpinner.addKeyListener(this);
+ }
- GridDataFactory.fillDefaults().hint(SWT.DEFAULT, 150).grab(false, true).applyTo(timeList);
- if (date != null) {
- listViewer.setSelection(new StructuredSelection(times[date.get(Calendar.HOUR_OF_DAY)]), true);
- } else {
- listViewer.setSelection(new StructuredSelection(times[8]), true);
+ private void createComposite(Composite composite) {
+ String[] weekDays = dateFormatSymbols.getWeekdays();
+ GridLayout gridLayout1 = new GridLayout();
+ gridLayout1.numColumns = 7;
+ gridLayout1.verticalSpacing = 0;
+ gridLayout1.makeColumnsEqualWidth = true;
+ GridData gridData = new org.eclipse.swt.layout.GridData();
+ gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.grabExcessVerticalSpace = false;
+ // gridData.horizontalSpan = 3;
+ gridData.verticalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
+ headerComposite = new Composite(composite, SWT.NONE);
+ headerComposite.setLayoutData(gridData);
+ headerComposite.setLayout(gridLayout1);
+ GridData labelGridData = new org.eclipse.swt.layout.GridData();
+ labelGridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
+ labelGridData.grabExcessHorizontalSpace = true;
+ labelGridData.verticalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
+ for (int i = 1; i < 8; ++i) {
+ Label headerLabel = new Label(headerComposite, SWT.BEGINNING);
+ headerLabel.setText(weekDays[i].substring(0, 3));
+ headerLabel.setLayoutData(labelGridData);
+ }
+ }
+
+ /**
+ * This method initializes composite1
+ *
+ */
+ private void createComposite1(Composite composite) {
+ GridLayout gridLayout2 = new GridLayout();
+ gridLayout2.numColumns = 7;
+ gridLayout2.verticalSpacing = 0;
+ gridLayout2.makeColumnsEqualWidth = true;
+ GridData gridData1 = new org.eclipse.swt.layout.GridData();
+ // gridData1.horizontalSpan = 3;
+ gridData1.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
+ gridData1.verticalAlignment = org.eclipse.swt.layout.GridData.BEGINNING;
+ gridData1.grabExcessVerticalSpace = false;
+ gridData1.grabExcessHorizontalSpace = true;
+ calendarComposite = new Composite(composite, SWT.BORDER);
+ calendarComposite.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ calendarComposite.setLayout(gridLayout2);
+ calendarComposite.setLayoutData(gridData1);
+ }
+
+ private void createCalendarData() {
+ GridData gridData = new org.eclipse.swt.layout.GridData();
+ gridData.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
+ gridData.grabExcessHorizontalSpace = true;
+ gridData.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
+ for (int i = 0; i < 42; ++i) {
+ Label headerLabel = new Label(calendarComposite, SWT.CENTER);
+ headerLabel.setText("99");
+ headerLabel.setLayoutData(gridData);
+ calendarLabels[i] = headerLabel;
+ headerLabel.addMouseListener(new MouseListener() {
+
+ public void mouseDoubleClick(MouseEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void mouseDown(MouseEvent arg0) {
+ unSellectAll();
+ Label label = (Label) arg0.getSource();
+ if (!label.getText().equals("")) {
+ label.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION));
+ label.setForeground(Display.getDefault().getSystemColor(SWT.COLOR_WHITE));
+ }
+ }
+
+ public void mouseUp(MouseEvent arg0) {
+ Label label = (Label) arg0.getSource();
+ if (!label.getText().equals("")) {
+ date.set(Calendar.YEAR, yearSpinner.getSelection());
+ date.set(Calendar.MONTH, monthList.getSelectionIndex());
+ date.set(Calendar.DAY_OF_MONTH, Integer.parseInt(label.getText()));
+ setSelection(new DateSelection(date));
+ notifyListeners(new SelectionChangedEvent(DatePickerPanel.this, getSelection()));
+ }
+
+ }
+
+ });
+ }
+ }
+
+ private void updateCalendar() {
+ unSellectAll();
+ // Fill Labels
+ Calendar cal = new GregorianCalendar(date.get(Calendar.YEAR), date.get(Calendar.MONTH), 1);
+ int dayofWeek = cal.get(Calendar.DAY_OF_WEEK) - 1;
+
+ for (int i = 0; i < dayofWeek; ++i) {
+ calendarLabels[i].setText("");
+ }
+
+ for (int i = 1; i <= cal.getActualMaximum(Calendar.DAY_OF_MONTH); ++i) {
+ calendarLabels[i + dayofWeek - 1].setText("" + i);
+ }
+
+ for (int i = cal.getActualMaximum(Calendar.DAY_OF_MONTH) + dayofWeek; i < 42; ++i) {
+ calendarLabels[i].setText("");
+ }
+
+ calendarLabels[date.get(Calendar.DAY_OF_MONTH) + dayofWeek - 1].setBackground(Display.getDefault()
+ .getSystemColor(SWT.COLOR_LIST_SELECTION));
+ calendarLabels[date.get(Calendar.DAY_OF_MONTH) + dayofWeek - 1].setForeground(Display.getDefault()
+ .getSystemColor(SWT.COLOR_WHITE));
+
+ }
+
+ private void unSellectAll() {
+ for (int i = 0; i < 42; ++i) {
+ calendarLabels[i].setForeground(Display.getDefault().getSystemColor(SWT.COLOR_BLACK));
+ calendarLabels[i].setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_WHITE));
}
- timeList.addKeyListener(this);
}
public void setDate(Calendar date) {
this.date = date;
- calendar.setYear(date.get(Calendar.YEAR));
- calendar.setMonth(date.get(Calendar.MONTH));
- calendar.setDay(date.get(Calendar.DAY_OF_MONTH));
+ updateCalendar();
}
public void keyPressed(KeyEvent e) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
index 9bda4ebae..17bf00dfa 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/PriorityDropDownAction.java
@@ -11,7 +11,7 @@ package org.eclipse.mylar.internal.tasks.ui.views;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IMenuCreator;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.tasks.core.Task;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -47,7 +47,7 @@ class PriorityDropDownAction extends Action implements IMenuCreator {
this.taskListView = taskListView;
setText(FILTER_PRIORITY_LABEL);
setToolTipText(FILTER_PRIORITY_LABEL);
- setImageDescriptor(TaskListImages.FILTER_PRIORITY);
+ setImageDescriptor(TasksUiImages.FILTER_PRIORITY);
setMenuCreator(this);
}
@@ -89,7 +89,7 @@ class PriorityDropDownAction extends Action implements IMenuCreator {
};
priority1.setEnabled(true);
priority1.setText(Task.PriorityLevel.P1.getDescription());
- priority1.setImageDescriptor(TaskListImages.PRIORITY_1);
+ priority1.setImageDescriptor(TasksUiImages.PRIORITY_1);
ActionContributionItem item = new ActionContributionItem(priority1);
item.fill(dropDownMenu, -1);
@@ -106,7 +106,7 @@ class PriorityDropDownAction extends Action implements IMenuCreator {
};
priority2.setEnabled(true);
priority2.setText(Task.PriorityLevel.P2.getDescription());
- priority2.setImageDescriptor(TaskListImages.PRIORITY_2);
+ priority2.setImageDescriptor(TasksUiImages.PRIORITY_2);
item = new ActionContributionItem(priority2);
item.fill(dropDownMenu, -1);
@@ -123,7 +123,7 @@ class PriorityDropDownAction extends Action implements IMenuCreator {
};
priority3.setEnabled(true);
priority3.setText(Task.PriorityLevel.P3.getDescription());
- priority3.setImageDescriptor(TaskListImages.PRIORITY_3);
+ priority3.setImageDescriptor(TasksUiImages.PRIORITY_3);
item = new ActionContributionItem(priority3);
item.fill(dropDownMenu, -1);
@@ -140,7 +140,7 @@ class PriorityDropDownAction extends Action implements IMenuCreator {
};
priority4.setEnabled(true);
priority4.setText(Task.PriorityLevel.P4.getDescription());
- priority4.setImageDescriptor(TaskListImages.PRIORITY_4);
+ priority4.setImageDescriptor(TasksUiImages.PRIORITY_4);
item = new ActionContributionItem(priority4);
item.fill(dropDownMenu, -1);
@@ -156,7 +156,7 @@ class PriorityDropDownAction extends Action implements IMenuCreator {
}
};
priority5.setEnabled(true);
- priority5.setImageDescriptor(TaskListImages.PRIORITY_5);
+ priority5.setImageDescriptor(TasksUiImages.PRIORITY_5);
priority5.setText(Task.PriorityLevel.P5.getDescription());
item = new ActionContributionItem(priority5);
item.fill(dropDownMenu, -1);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java
index 83164eb6c..605b2d145 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java
@@ -16,7 +16,7 @@ import org.eclipse.jface.viewers.ILabelDecorator;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.mylar.context.core.ContextCorePlugin;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.ITask;
@@ -43,16 +43,16 @@ public class TableDecoratingLabelProvider extends DecoratingLabelProvider implem
ITask task = TaskElementLabelProvider.getCorrespondingTask((ITaskListElement)element);
if (task != null) {
if (task.isActive()) {
- return TaskListImages.getImage(TaskListImages.TASK_ACTIVE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_ACTIVE);
} else {
if (ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier())) {
- return TaskListImages.getImage(TaskListImages.TASK_INACTIVE_CONTEXT);
+ return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE_CONTEXT);
} else {
- return TaskListImages.getImage(TaskListImages.TASK_INACTIVE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
}
}
} else {
- return TaskListImages.getImage(TaskListImages.TASK_INACTIVE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
}
}
} else if (columnIndex == 1) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
index bee5491fa..a0ec18689 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityLabelProvider.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.core.util.DateUtil;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.AbstractTaskContainer;
import org.eclipse.mylar.tasks.core.DateRangeActivityDelegate;
@@ -54,7 +54,7 @@ public class TaskActivityLabelProvider extends DecoratingLabelProvider implement
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == 0) {
if (element instanceof DateRangeContainer) {
- return TaskListImages.getImage(TaskListImages.CALENDAR);
+ return TasksUiImages.getImage(TasksUiImages.CALENDAR);
} else if (element instanceof DateRangeActivityDelegate) {
return super.getImage(((DateRangeActivityDelegate) element).getCorrespondingTask());
} else {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityViewContentProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityViewContentProvider.java
new file mode 100644
index 000000000..f883bc5b1
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskActivityViewContentProvider.java
@@ -0,0 +1,69 @@
+/*******************************************************************************
+ * 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.mylar.internal.tasks.ui.views;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.mylar.tasks.core.DateRangeActivityDelegate;
+import org.eclipse.mylar.tasks.core.DateRangeContainer;
+import org.eclipse.mylar.tasks.ui.TaskListManager;
+
+/**
+ * @author Rob Elves
+ * @author Mik Kersten
+ */
+public class TaskActivityViewContentProvider implements IStructuredContentProvider, ITreeContentProvider {
+
+ private TaskListManager taskListManager;
+
+ public TaskActivityViewContentProvider(TaskListManager taskActivityManager) {
+ this.taskListManager = taskActivityManager;
+ }
+
+ public Object[] getElements(Object parent) {
+ return taskListManager.getDateRanges().toArray();
+ }
+
+ public Object getParent(Object child) {
+ if (child instanceof DateRangeActivityDelegate) {
+ DateRangeActivityDelegate dateRangeTaskWrapper = (DateRangeActivityDelegate) child;
+ return dateRangeTaskWrapper.getParent();
+ } else {
+ return new Object[0];
+ }
+ }
+
+ public Object[] getChildren(Object parent) {
+ if (parent instanceof DateRangeContainer) {
+ DateRangeContainer taskContainer = (DateRangeContainer) parent;
+ return taskContainer.getChildren().toArray();
+ } else {
+ return new Object[0];
+ }
+ }
+
+ public boolean hasChildren(Object parent) {
+ if (parent instanceof DateRangeContainer) {
+ DateRangeContainer dateRangeTaskCategory = (DateRangeContainer) parent;
+ return dateRangeTaskCategory.getChildren() != null && dateRangeTaskCategory.getChildren().size() > 0;
+ } else {
+ return false;
+ }
+ }
+
+ public void dispose() {
+ }
+
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
index 432096388..4f991eee6 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskElementLabelProvider.java
@@ -18,7 +18,7 @@ import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.mylar.internal.tasks.ui.ITaskHighlighter;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
@@ -49,17 +49,17 @@ public class TaskElementLabelProvider extends LabelProvider implements IColorPro
@Override
public Image getImage(Object element) {
if (element instanceof TaskArchive) {
- return TaskListImages.getImage(TaskListImages.CATEGORY_ARCHIVE);
+ return TasksUiImages.getImage(TasksUiImages.CATEGORY_ARCHIVE);
} else if (element instanceof TaskCategory) {
- return TaskListImages.getImage(TaskListImages.CATEGORY);
+ return TasksUiImages.getImage(TasksUiImages.CATEGORY);
} else if (element instanceof AbstractRepositoryQuery) {
- return TaskListImages.getImage(TaskListImages.QUERY);
+ return TasksUiImages.getImage(TasksUiImages.QUERY);
} else if (element instanceof AbstractQueryHit) {
AbstractQueryHit hit = (AbstractQueryHit) element;
if (hit.getCorrespondingTask() != null) {
return getImage(hit.getCorrespondingTask());
} else {
- return TaskListImages.getImage(TaskListImages.TASK_REMOTE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_REMOTE);
}
} else if (element instanceof ITask) {
ITask task = (ITask) element;
@@ -69,36 +69,36 @@ public class TaskElementLabelProvider extends LabelProvider implements IColorPro
AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin
.getRepositoryUi(((AbstractRepositoryTask) task).getRepositoryKind());
if (connectorUi != null && !connectorUi.hasRichEditor()) {
- return TaskListImages.getImage(TaskListImages.TASK_COMPLETED);
+ return TasksUiImages.getImage(TasksUiImages.TASK_COMPLETED);
} else {
- return TaskListImages.getImage(TaskListImages.TASK_REPOSITORY_COMPLETED);
+ return TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY_COMPLETED);
}
} else {
- return TaskListImages.getImage(TaskListImages.TASK_COMPLETED);
+ return TasksUiImages.getImage(TasksUiImages.TASK_COMPLETED);
}
} else if (task.getNotes() != null && !task.getNotes().trim().equals("")) {
if (task instanceof AbstractRepositoryTask) {
AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin
.getRepositoryUi(((AbstractRepositoryTask) task).getRepositoryKind());
if (connectorUi != null && !connectorUi.hasRichEditor()) {
- return TaskListImages.getImage(TaskListImages.TASK_NOTES);
+ return TasksUiImages.getImage(TasksUiImages.TASK_NOTES);
} else {
- return TaskListImages.getImage(TaskListImages.TASK_REPOSITORY_NOTES);
+ return TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY_NOTES);
}
} else {
- return TaskListImages.getImage(TaskListImages.TASK_NOTES);
+ return TasksUiImages.getImage(TasksUiImages.TASK_NOTES);
}
} else {
if (task instanceof AbstractRepositoryTask) {
AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin
.getRepositoryUi(((AbstractRepositoryTask) task).getRepositoryKind());
if (connectorUi != null && !connectorUi.hasRichEditor()) {
- return TaskListImages.getImage(TaskListImages.TASK);
+ return TasksUiImages.getImage(TasksUiImages.TASK);
} else {
- return TaskListImages.getImage(TaskListImages.TASK_REPOSITORY);
+ return TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY);
}
} else {
- return TaskListImages.getImage(TaskListImages.TASK);
+ return TasksUiImages.getImage(TasksUiImages.TASK);
}
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableLabelProvider.java
index 240cf72d1..94f21e5cb 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListTableLabelProvider.java
@@ -24,7 +24,7 @@ import org.eclipse.jface.viewers.ITableFontProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.mylar.context.core.ContextCorePlugin;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
@@ -90,23 +90,23 @@ public class TaskListTableLabelProvider extends DecoratingLabelProvider implemen
}
if (columnIndex == 0) {
if (element instanceof DateRangeContainer) {
- return TaskListImages.getImage(TaskListImages.CALENDAR);
+ return TasksUiImages.getImage(TasksUiImages.CALENDAR);
} else if (element instanceof AbstractTaskContainer) {
return super.getImage(element);
} else {
ITask task = TaskElementLabelProvider.getCorrespondingTask((ITaskListElement) element);
if (task != null) {
if (task.isActive()) {
- return TaskListImages.getImage(TaskListImages.TASK_ACTIVE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_ACTIVE);
} else {
if (ContextCorePlugin.getContextManager().hasContext(task.getHandleIdentifier())) {
- return TaskListImages.getImage(TaskListImages.TASK_INACTIVE_CONTEXT);
+ return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE_CONTEXT);
} else {
- return TaskListImages.getImage(TaskListImages.TASK_INACTIVE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
}
}
} else {
- return TaskListImages.getImage(TaskListImages.TASK_INACTIVE);
+ return TasksUiImages.getImage(TasksUiImages.TASK_INACTIVE);
}
}
} else if (columnIndex == 1) {
@@ -129,30 +129,30 @@ public class TaskListTableLabelProvider extends DecoratingLabelProvider implemen
if (repositoryTask != null) {
ImageDescriptor image = null;
if (repositoryTask.getSyncState() == RepositoryTaskSyncState.OUTGOING) {
- image = TaskListImages.STATUS_NORMAL_OUTGOING;
+ image = TasksUiImages.STATUS_NORMAL_OUTGOING;
} else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.INCOMING) {
- image = TaskListImages.STATUS_NORMAL_INCOMING;
+ image = TasksUiImages.STATUS_NORMAL_INCOMING;
} else if (repositoryTask.getSyncState() == RepositoryTaskSyncState.CONFLICT) {
- image = TaskListImages.STATUS_NORMAL_CONFLICT;
+ image = TasksUiImages.STATUS_NORMAL_CONFLICT;
}
if (image == null && repositoryTask.getStatus() != null) {
- return TaskListImages.getImage(TaskListImages.STATUS_WARNING);
+ return TasksUiImages.getImage(TasksUiImages.STATUS_WARNING);
} else if (image != null) {
- return TaskListImages.getImage(image);
+ return TasksUiImages.getImage(image);
}
} else if (element instanceof AbstractQueryHit) {
- return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_INCOMING);
+ return TasksUiImages.getImage(TasksUiImages.STATUS_NORMAL_INCOMING);
} else if (element instanceof AbstractTaskContainer) {
AbstractTaskContainer container = (AbstractTaskContainer) element;
if (container instanceof AbstractRepositoryQuery) {
AbstractRepositoryQuery query = (AbstractRepositoryQuery) container;
if (query.getStatus() != null) {
- return TaskListImages.getImage(TaskListImages.STATUS_WARNING);
+ return TasksUiImages.getImage(TasksUiImages.STATUS_WARNING);
}
}
if (view != null && !Arrays.asList(view.getViewer().getExpandedElements()).contains(element)
&& hasIncoming(container)) {
- return TaskListImages.getImage(TaskListImages.STATUS_NORMAL_INCOMING);
+ return TasksUiImages.getImage(TasksUiImages.STATUS_NORMAL_INCOMING);
}
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java
index 70522f09f..df4a8e313 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListToolTipHandler.java
@@ -42,6 +42,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Monitor;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.ToolBar;
@@ -54,6 +55,7 @@ import org.eclipse.ui.PlatformUI;
/**
* @author Mik Kersten
* @author Eric Booth
+ * @author Leo Dos Santos - multi-monitor support
*/
public class TaskListToolTipHandler {
@@ -147,7 +149,7 @@ public class TaskListToolTipHandler {
completed++;
}
}
- //suffix = " (query max: " + query.getMaxHits() + ")";
+ // suffix = " (query max: " + query.getMaxHits() + ")";
}
taskProgressBar.reset(completed, total);
return "Completed " + completed + " of " + total + suffix;
@@ -187,7 +189,7 @@ public class TaskListToolTipHandler {
} catch (RuntimeException e) {
// ignore
}
- tooltip += " Elapsed: " + elapsedTimeString+"\n";
+ tooltip += " Elapsed: " + elapsedTimeString + "\n";
return tooltip;
}
@@ -258,14 +260,30 @@ public class TaskListToolTipHandler {
}
private String formatScheduledFor(ITaskListElement element) {
+ String result = "";
if (element instanceof ITask) {
+
+ String elapsedTimeString = NO_MINUTES;
+ try {
+ long elapsed = TasksUiPlugin.getTaskListManager().getElapsedTime((ITask)element);
+ elapsedTimeString = DateUtil.getFormattedDurationShort(elapsed);
+ if (elapsedTimeString.equals("")) {
+ elapsedTimeString = NO_MINUTES;
+ }
+ } catch (RuntimeException e) {
+ // ignore
+ }
+
+ result += SEPARATOR +"\nElapsed: " + elapsedTimeString + "\n";
+
+
Date date = ((ITask) element).getScheduledForDate();
if (date != null) {
- return SEPARATOR + "Scheduled for: " + DateFormat.getDateInstance(DateFormat.FULL).format(date) + ", "
+ result += "Scheduled for: " + DateFormat.getDateInstance(DateFormat.FULL).format(date) + ", "
+ DateFormat.getTimeInstance(DateFormat.SHORT).format(date) + "";
}
}
- return "";
+ return result;
}
// private String formatLastRefreshTime(Date lastRefresh) {
@@ -441,9 +459,24 @@ public class TaskListToolTipHandler {
* @return the top-left location for a hovering box
*/
private void setHoverLocation(Shell shell, Point position) {
- Rectangle displayBounds = shell.getDisplay().getBounds();
+ Rectangle displayBounds = shell.getMonitor().getClientArea();
Rectangle shellBounds = shell.getBounds();
- shellBounds.x = Math.max(Math.min(position.x, displayBounds.width - shellBounds.width), 0);
+
+ // We need to find the exact monitor we're mousing over
+ Monitor[] array = PlatformUI.getWorkbench().getDisplay().getMonitors();
+ for (Monitor m : array) {
+ Rectangle monitorBounds = m.getBounds();
+ if ((position.x >= monitorBounds.x) && (position.x < (monitorBounds.x + monitorBounds.width))
+ && (position.y >= monitorBounds.y) && (position.y < (monitorBounds.y + monitorBounds.height))) {
+ displayBounds = m.getClientArea();
+ }
+ }
+
+ if ((position.x + shellBounds.width) > (displayBounds.x + displayBounds.width))
+ shellBounds.x = displayBounds.x + displayBounds.width - shellBounds.width;
+ else
+ shellBounds.x = position.x;
+
shellBounds.y = Math.max(Math.min(position.y + 10, displayBounds.height - shellBounds.height), 0);
shell.setBounds(shellBounds);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
index 2844199c1..bd4299bab 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java
@@ -54,10 +54,10 @@ import org.eclipse.mylar.internal.tasks.ui.IDynamicSubMenuContributor;
import org.eclipse.mylar.internal.tasks.ui.TaskArchiveFilter;
import org.eclipse.mylar.internal.tasks.ui.TaskCompletionFilter;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPatternFilter;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.internal.tasks.ui.TaskPriorityFilter;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.actions.CollapseAllAction;
import org.eclipse.mylar.internal.tasks.ui.actions.CopyTaskDetailsAction;
import org.eclipse.mylar.internal.tasks.ui.actions.DeleteAction;
@@ -107,18 +107,10 @@ import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.graphics.Region;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.Menu;
-import org.eclipse.swt.widgets.Scrollable;
-import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IActionBars;
@@ -141,6 +133,8 @@ import org.eclipse.ui.themes.IThemeManager;
*/
public class TaskListView extends ViewPart {
+ private static final String PRESENTATION_SCHEDULED = "Scheduled";
+
public static final String ID = "org.eclipse.mylar.tasks.ui.views.TaskListView";
public static final String LABEL_VIEW = "Task List";
@@ -256,9 +250,9 @@ public class TaskListView extends ViewPart {
int sortDirection = DEFAULT_SORT_DIRECTION;
- private Color categoryGradientStart;
-
- private Color categoryGradientEnd;
+// private Color categoryGradientStart;
+//
+// private Color categoryGradientEnd;
private final static int MAX_SELECTION_HISTORY_SIZE = 10;
@@ -276,7 +270,7 @@ public class TaskListView extends ViewPart {
}
public ImageDescriptor getImageDescriptor() {
- return TaskListImages.CATEGORY;
+ return TasksUiImages.CATEGORY;
}
};
@@ -288,11 +282,11 @@ public class TaskListView extends ViewPart {
}
public String getPresentationName() {
- return "Scheduled";
+ return PRESENTATION_SCHEDULED;
}
public ImageDescriptor getImageDescriptor() {
- return TaskListImages.CALENDAR;
+ return TasksUiImages.CALENDAR;
}
};
@@ -301,40 +295,40 @@ public class TaskListView extends ViewPart {
*/
protected boolean isPaused = false;
- private final Listener CATEGORY_GRADIENT_DRAWER = new Listener() {
- public void handleEvent(Event event) {
- if (event.item.getData() instanceof AbstractTaskContainer) {
- Scrollable scrollable = (Scrollable) event.widget;
- GC gc = event.gc;
-
- Rectangle area = scrollable.getClientArea();
- Rectangle rect = event.getBounds();
-
- /* Paint the selection beyond the end of last column */
- expandRegion(event, scrollable, gc, area);
-
- /* Draw Gradient Rectangle */
- Color oldForeground = gc.getForeground();
- Color oldBackground = gc.getBackground();
-
- gc.setForeground(categoryGradientStart);
- gc.setBackground(categoryGradientEnd);
- gc.fillGradientRectangle(0, rect.y, area.width, rect.height, true);
-
- /* Bottom Line */
- gc.setForeground(categoryGradientEnd);
- gc.drawLine(0, rect.y + rect.height - 1, area.width, rect.y + rect.height - 1);
-
- gc.setForeground(oldForeground);
- gc.setBackground(oldBackground);
-
- /* Mark as Background being handled */
- event.detail &= ~SWT.BACKGROUND;
- }
- }
- };
-
- private boolean gradientListenerAdded = false;
+// private final Listener CATEGORY_GRADIENT_DRAWER = new Listener() {
+// public void handleEvent(Event event) {
+// if (event.item.getData() instanceof AbstractTaskContainer) {
+// Scrollable scrollable = (Scrollable) event.widget;
+// GC gc = event.gc;
+//
+// Rectangle area = scrollable.getClientArea();
+// Rectangle rect = event.getBounds();
+//
+// /* Paint the selection beyond the end of last column */
+// expandRegion(event, scrollable, gc, area);
+//
+// /* Draw Gradient Rectangle */
+// Color oldForeground = gc.getForeground();
+// Color oldBackground = gc.getBackground();
+//
+// gc.setForeground(categoryGradientStart);
+// gc.setBackground(categoryGradientEnd);
+// gc.fillGradientRectangle(0, rect.y, area.width, rect.height, true);
+//
+// /* Bottom Line */
+// gc.setForeground(categoryGradientEnd);
+// gc.drawLine(0, rect.y + rect.height - 1, area.width, rect.y + rect.height - 1);
+//
+// gc.setForeground(oldForeground);
+// gc.setBackground(oldBackground);
+//
+// /* Mark as Background being handled */
+// event.detail &= ~SWT.BACKGROUND;
+// }
+// }
+// };
+//
+// private boolean gradientListenerAdded = false;
private final ITaskActivityListener TASK_ACTIVITY_LISTENER = new ITaskActivityListener() {
public void taskActivated(final ITask task) {
@@ -495,19 +489,19 @@ public class TaskListView extends ViewPart {
};
private void updateGradientColors() {
- categoryGradientStart = themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_START);
- categoryGradientEnd = themeManager.getCurrentTheme().getColorRegistry().get(
- TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_END);
-
- if (gradientListenerAdded == false && categoryGradientStart != null
- && !categoryGradientStart.equals(categoryGradientEnd)) {
- getViewer().getTree().addListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
- gradientListenerAdded = true;
- } else if (categoryGradientStart != null && categoryGradientStart.equals(categoryGradientEnd)) {
- getViewer().getTree().removeListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
- gradientListenerAdded = false;
- }
+// categoryGradientStart = themeManager.getCurrentTheme().getColorRegistry().get(
+// TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_START);
+// categoryGradientEnd = themeManager.getCurrentTheme().getColorRegistry().get(
+// TaskListColorsAndFonts.THEME_COLOR_CATEGORY_GRADIENT_END);
+
+// if (gradientListenerAdded == false && categoryGradientStart != null
+// && !categoryGradientStart.equals(categoryGradientEnd)) {
+// getViewer().getTree().addListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
+// gradientListenerAdded = true;
+// } else if (categoryGradientStart != null && categoryGradientStart.equals(categoryGradientEnd)) {
+// getViewer().getTree().removeListener(SWT.EraseItem, CATEGORY_GRADIENT_DRAWER);
+// gradientListenerAdded = false;
+// }
}
public static TaskListView getFromActivePerspective() {
@@ -937,8 +931,12 @@ public class TaskListView extends ViewPart {
if (!filteredTree.getFilterControl().getText().equals("")) {
filteredTree.getFilterControl().setText("");
}
+ if(presentation.getPresentationName().equals(PRESENTATION_SCHEDULED)) {
+ TasksUiPlugin.getTaskListManager().parseFutureReminders();
+ }
getViewer().setContentProvider(presentation.getContentProvider());
refreshAndFocus(isFocusedMode());
+
currentPresentation = presentation;
} finally {
getViewer().getControl().setRedraw(true);
@@ -986,24 +984,24 @@ public class TaskListView extends ViewPart {
}
}
- private void expandRegion(Event event, Scrollable scrollable, GC gc, Rectangle area) {
- int columnCount;
- if (scrollable instanceof Table)
- columnCount = ((Table) scrollable).getColumnCount();
- else
- columnCount = ((Tree) scrollable).getColumnCount();
-
- if (event.index == columnCount - 1 || columnCount == 0) {
- int width = area.x + area.width - event.x;
- if (width > 0) {
- Region region = new Region();
- gc.getClipping(region);
- region.add(event.x, event.y, width, event.height);
- gc.setClipping(region);
- region.dispose();
- }
- }
- }
+// private void expandRegion(Event event, Scrollable scrollable, GC gc, Rectangle area) {
+// int columnCount;
+// if (scrollable instanceof Table)
+// columnCount = ((Table) scrollable).getColumnCount();
+// else
+// columnCount = ((Tree) scrollable).getColumnCount();
+//
+// if (event.index == columnCount - 1 || columnCount == 0) {
+// int width = area.x + area.width - event.x;
+// if (width > 0) {
+// Region region = new Region();
+// gc.getClipping(region);
+// region.add(event.x, event.y, width, event.height);
+// gc.setClipping(region);
+// region.dispose();
+// }
+// }
+// }
private void initDragAndDrop(Composite parent) {
Transfer[] dragTypes = new Transfer[] { TaskTransfer.getInstance(), TextTransfer.getInstance(),
@@ -1503,7 +1501,7 @@ public class TaskListView extends ViewPart {
isPaused = paused;
IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager();
if (isPaused) {
- statusLineManager.setMessage(TaskListImages.getImage(TaskListImages.TASKLIST),
+ statusLineManager.setMessage(TasksUiImages.getImage(TasksUiImages.TASKLIST),
"Mylar context capture paused");
setPartName("(paused) " + PART_NAME);
} else {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java
index f8106359e..42d546510 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.views;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -41,10 +41,10 @@ public class TaskRepositoryLabelProvider implements ILabelProvider {
if (image != null) {
return image;
} else {
- return TaskListImages.getImage(TaskListImages.REPOSITORY);
+ return TasksUiImages.getImage(TasksUiImages.REPOSITORY);
}
} else if (object instanceof TaskRepository) {
- return TaskListImages.getImage(TaskListImages.REPOSITORY);
+ return TasksUiImages.getImage(TasksUiImages.REPOSITORY);
}
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java
index 787892529..3de413c5b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/AbstractRepositoryClientWizard.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.internal.tasks.ui.wizards;
import java.util.Collection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -44,7 +44,7 @@ public abstract class AbstractRepositoryClientWizard extends Wizard implements I
protected AbstractRepositoryClientWizard(String repositoryType) {
this.repositoryType = repositoryType;
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
public void setRepositoryConnector(AbstractRepositoryConnector repositoryConnector) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.java
index 257b48e35..40ead07e1 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextAttachWizard.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.TaskRepository;
@@ -46,7 +46,7 @@ public class ContextAttachWizard extends Wizard {
task.getRepositoryUrl());
this.task = task;
setWindowTitle(ContextRetrieveWizard.TITLE);
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY_CONTEXT);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY_CONTEXT);
}
@Override
@@ -71,7 +71,7 @@ public class ContextAttachWizard extends Wizard {
IWorkbenchSite site = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite();
if (site instanceof IViewSite) {
IStatusLineManager statusLineManager = ((IViewSite)site).getActionBars().getStatusLineManager();
- statusLineManager.setMessage(TaskListImages.getImage(TaskListImages.TASKLIST),
+ statusLineManager.setMessage(TasksUiImages.getImage(TasksUiImages.TASKLIST),
"Context attached to task: " + task.getSummary());
TasksUiPlugin.getSynchronizationManager().synchronize(connector, task, true, null);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java
index defb4b047..b3acc6949 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ContextRetrieveWizard.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.RepositoryAttachment;
@@ -47,7 +47,7 @@ public class ContextRetrieveWizard extends Wizard {
task.getRepositoryUrl());
this.task = task;
setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY_CONTEXT);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY_CONTEXT);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
index ea7714b32..28ee41d16 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/EditRepositoryWizard.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.wizards;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
@@ -42,7 +42,7 @@ public class EditRepositoryWizard extends Wizard implements INewWizard {
abstractRepositorySettingsPage.setVersion(repository.getVersion());
abstractRepositorySettingsPage.setWizard(this);
setNeedsProgressMonitor(true);
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
setWindowTitle(TITLE);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java
index fb61d4923..0c257abd6 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/ExistingTaskWizardPage.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.tasks.ui.wizards;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -38,7 +38,7 @@ public class ExistingTaskWizardPage extends WizardPage {
super(TITLE);
setTitle(TITLE);
setDescription(DESCRIPTION);
- setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
public void createControl(Composite parent) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java
index b8f019153..80f361b22 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/MultiRepositoryAwareWizard.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.tasks.ui.wizards;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
@@ -30,7 +30,7 @@ public class MultiRepositoryAwareWizard extends Wizard implements INewWizard {
setForcePreviousAndNextButtons(true);
setNeedsProgressMonitor(true);
setWindowTitle(title);
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java
index ed5685fb5..8fd6a0899 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentPage.java
@@ -20,7 +20,7 @@ import java.util.Map;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.LocalAttachment;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -172,7 +172,7 @@ public class NewAttachmentPage extends WizardPage {
attachContextButton = new Button(composite, SWT.CHECK);
attachContextButton.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1));
attachContextButton.setText("Attach Context");
- attachContextButton.setImage(TaskListImages.getImage(TaskListImages.CONTEXT_ATTACH));
+ attachContextButton.setImage(TasksUiImages.getImage(TasksUiImages.CONTEXT_ATTACH));
attachContextButton.setEnabled((((NewAttachmentWizard) getWizard()).hasContext()));
/*
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java
index fa61fffb8..f66c3eff5 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/NewAttachmentWizard.java
@@ -28,7 +28,7 @@ import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylar.context.core.ContextCorePlugin;
import org.eclipse.mylar.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.util.WebBrowserDialog;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
@@ -69,7 +69,7 @@ public class NewAttachmentWizard extends Wizard {
this.repository = repository;
setNeedsProgressMonitor(true);
setWindowTitle("Add Attachment");
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
attachment = new LocalAttachment();
attachment.setFilePath("");
inputPage = new InputAttachmentSourcePage(this);
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java
index d7f51c712..0c5efd854 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizardPage.java
@@ -21,7 +21,7 @@ import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
@@ -98,7 +98,7 @@ public class TaskDataImportWizardPage extends WizardPage {
TasksUiPlugin.PLUGIN_ID, "icons/wizban/banner-import.gif"));
setPageComplete(false);
setDescription(DESCRIPTION);
- setImageDescriptor(TaskListImages.BANNER_IMPORT);
+ setImageDescriptor(TasksUiImages.BANNER_IMPORT);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java
index fd25982af..a1e8fa646 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java
@@ -279,7 +279,7 @@ public class RepositorySynchronizationManager {
status = RepositoryTaskSyncState.INCOMING;
repositoryTask.setNotified(false);
}
- if (hasIncoming || offlineTaskData == null) {
+ if (hasIncoming || offlineTaskData == null || forceSync) {
TasksUiPlugin.getDefault().getTaskDataManager().push(repositoryTask.getHandleIdentifier(), newTaskData);
}
break;
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java
index 695953cde..feefe3aeb 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeQueryJob.java
@@ -25,7 +25,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.core.util.DateUtil;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractQueryHit;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
@@ -80,7 +80,7 @@ class SynchronizeQueryJob extends Job {
repositoryQuery.setStatus(null);
monitor.setTaskName("Synchronizing: " + repositoryQuery.getSummary());
- setProperty(IProgressConstants.ICON_PROPERTY, TaskListImages.REPOSITORY_SYNCHRONIZE);
+ setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
TaskRepository repository = TasksUiPlugin.getRepositoryManager().getRepository(
repositoryQuery.getRepositoryKind(), repositoryQuery.getRepositoryUrl());
if (repository == null) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java
index a0a15c4fa..63febdb13 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/SynchronizeTaskJob.java
@@ -20,7 +20,7 @@ import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITaskDataHandler;
@@ -60,7 +60,7 @@ class SynchronizeTaskJob extends Job {
public IStatus run(IProgressMonitor monitor) {
try {
monitor.beginTask(LABEL_SYNCHRONIZE_TASK, repositoryTasks.size());
- setProperty(IProgressConstants.ICON_PROPERTY, TaskListImages.REPOSITORY_SYNCHRONIZE);
+ setProperty(IProgressConstants.ICON_PROPERTY, TasksUiImages.REPOSITORY_SYNCHRONIZE);
for (final AbstractRepositoryTask repositoryTask : repositoryTasks) {
if (monitor.isCanceled()) {
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 74a5470fa..a85044ff1 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
@@ -271,12 +271,17 @@ public class TaskListManager implements IPropertyChangeListener {
List<InteractionEvent> events = ContextCorePlugin.getContextManager().getActivityHistoryMetaContext()
.getInteractionHistory();
for (InteractionEvent event : events) {
- parseInteractionEvent(event);
+ try {
+ parseInteractionEvent(event);
+ } catch (Exception e) {
+ MylarStatusHandler.fail(e, "Error parsing interaction event", false);
+ }
}
taskActivityHistoryInitialized = true;
+ parseFutureReminders();
}
- private void parseFutureReminders() {
+ public void parseFutureReminders() {
activityFuture.clear();
activityNextWeek.clear();
@@ -318,7 +323,7 @@ public class TaskListManager implements IPropertyChangeListener {
}
Date schedDate = task.getScheduledForDate();
- if (schedDate == null) {
+ if (schedDate == null || isOverdue(task)) {
schedDate = task.getDueDate();
}
@@ -343,7 +348,8 @@ public class TaskListManager implements IPropertyChangeListener {
for (DateRangeContainer day : activityWeekDays) {
if (day.includes(tempCalendar) && !day.getChildren().contains(task)) {
- day.addTask(new DateRangeActivityDelegate(day, task, tempCalendar, tempCalendar));
+ day.addTask(new DateRangeActivityDelegate(day, task, tempCalendar, tempCalendar, this
+ .getElapsedTime(task)));
}
}
}
@@ -385,7 +391,7 @@ public class TaskListManager implements IPropertyChangeListener {
currentHandle = event.getStructureHandle();
}
} else if (event.getStructureHandle().equals(MylarContextManager.ACTIVITY_HANDLE_ATTENTION)) {
- if (!currentHandle.equals("")) {
+ if (currentTask != null && !currentHandle.equals("")) {
long active = event.getEndDate().getTime() - event.getDate().getTime();
// add to running total
@@ -403,9 +409,7 @@ public class TaskListManager implements IPropertyChangeListener {
} else {
taskElapsedTimeMap.put(currentTask, active);
}
-
}
-
}
} else if (event.getDelta().equals(MylarContextManager.ACTIVITY_DELTA_DEACTIVATED)) {
if (!event.getStructureHandle().equals(MylarContextManager.ACTIVITY_HANDLE_ATTENTION)
@@ -749,7 +753,7 @@ public class TaskListManager implements IPropertyChangeListener {
}
resetActivity();
- parseFutureReminders();
+ // parseFutureReminders();
taskListInitialized = true;
for (ITaskActivityListener listener : new ArrayList<ITaskActivityListener>(activityListeners)) {
listener.taskListRead();
@@ -765,7 +769,7 @@ public class TaskListManager implements IPropertyChangeListener {
* Only to be called upon initial startup by plugin.
*/
public void initActivityHistory() {
- resetAndRollOver();// parseTaskActivityInteractionHistory();
+ resetAndRollOver();
taskActivityHistory.loadPersistentHistory();
}
@@ -990,7 +994,7 @@ public class TaskListManager implements IPropertyChangeListener {
* @return true if task due date != null and has past
*/
public boolean isOverdue(ITask task) {
- return (task.getDueDate() != null && new Date().after(task.getDueDate()));
+ return (!task.isCompleted() && task.getDueDate() != null && new Date().after(task.getDueDate()));
}
public void propertyChange(PropertyChangeEvent event) {
@@ -1019,7 +1023,6 @@ public class TaskListManager implements IPropertyChangeListener {
}
}
resetActivity();
- parseFutureReminders();
parseTaskActivityInteractionHistory();
for (ITaskActivityListener listener : activityListeners) {
listener.calendarChanged();
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
index 08ff5d1e3..6f280b021 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiUtil.java
@@ -35,7 +35,7 @@ import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.internal.tasks.ui.editors.CategoryEditorInput;
import org.eclipse.mylar.internal.tasks.ui.views.TaskRepositoriesView;
@@ -87,15 +87,15 @@ public class TasksUiUtil {
}
switch (priorityLevel) {
case P1:
- return TaskListImages.getImage(TaskListImages.PRIORITY_1);
+ return TasksUiImages.getImage(TasksUiImages.PRIORITY_1);
case P2:
- return TaskListImages.getImage(TaskListImages.PRIORITY_2);
+ return TasksUiImages.getImage(TasksUiImages.PRIORITY_2);
case P3:
- return TaskListImages.getImage(TaskListImages.PRIORITY_3);
+ return TasksUiImages.getImage(TasksUiImages.PRIORITY_3);
case P4:
- return TaskListImages.getImage(TaskListImages.PRIORITY_4);
+ return TasksUiImages.getImage(TasksUiImages.PRIORITY_4);
case P5:
- return TaskListImages.getImage(TaskListImages.PRIORITY_5);
+ return TasksUiImages.getImage(TasksUiImages.PRIORITY_5);
default:
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
index 96bae9572..227b12f4d 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractRepositoryTaskEditor.java
@@ -42,6 +42,7 @@ import org.eclipse.jface.action.Separator;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.util.SafeRunnable;
@@ -60,7 +61,7 @@ import org.eclipse.mylar.core.MylarStatusHandler;
import org.eclipse.mylar.internal.core.util.DateUtil;
import org.eclipse.mylar.internal.tasks.core.CommentQuoter;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.actions.AttachFileAction;
import org.eclipse.mylar.internal.tasks.ui.actions.CopyToClipboardAction;
import org.eclipse.mylar.internal.tasks.ui.actions.SaveRemoteFileAction;
@@ -88,6 +89,7 @@ import org.eclipse.mylar.tasks.core.RepositoryTaskData;
import org.eclipse.mylar.tasks.core.TaskComment;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask.RepositoryTaskSyncState;
+import org.eclipse.mylar.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.mylar.tasks.ui.TasksUiUtil;
import org.eclipse.swt.SWT;
@@ -134,7 +136,7 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.RetargetAction;
-import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.FormColors;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.events.ExpansionAdapter;
@@ -579,15 +581,33 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
toolkit = managedForm.getToolkit();
registerDropListener(form);
- // ImageDescriptor overlay =
- // TasksUiPlugin.getDefault().getOverlayIcon(repository.getKind());
- // ImageDescriptor imageDescriptor =
- // TaskListImages.createWithOverlay(TaskListImages.REPOSITORY, overlay,
- // false,
- // false);
- // form.setImage(TaskListImages.getImage(imageDescriptor));
+ ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(repository.getKind());
+ ImageDescriptor imageDescriptor = TasksUiImages.createWithOverlay(TasksUiImages.REPOSITORY, overlay, false,
+ false);
+ form.setImage(TasksUiImages.getImage(imageDescriptor));
- // toolkit.decorateFormHeading(form.getForm());
+ AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(repository.getKind());
+ kindLabel = "";
+ if (connectorUi != null) {
+ kindLabel = connectorUi.getTaskKindLabel(repositoryTask);
+ }
+ String idLabel = "";
+
+ if (repositoryTask != null) {
+ idLabel = repositoryTask.getTaskKey();
+ } else {
+ idLabel = taskData.getId();
+ }
+
+ if (taskData != null && taskData.isNew()) {
+ form.setText("New " + kindLabel);
+ } else if(idLabel != null){
+ form.setText(kindLabel + " " + idLabel);
+ } else {
+ form.setText(kindLabel);
+ }
+
+// toolkit.decorateFormHeading(form.getForm());
editorComposite = form.getBody();
GridLayout editorLayout = new GridLayout();
@@ -595,11 +615,14 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
editorComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
if (taskData == null) {
-
- parentEditor.setMessage(
- "Task data not available. Press synchronize button (right) to retrieve latest data.",
- IMessageProvider.WARNING);
-
+ // NOTE: leave this in for 3.2
+ GridLayout warningLayout = new GridLayout(2, false);
+ Composite warningComposite = toolkit.createComposite(editorComposite);
+ warningComposite.setLayout(warningLayout);
+ Label warning = toolkit.createLabel(warningComposite, "");
+ warning.setImage(TasksUiImages.getImage(TasksUiImages.WARNING));
+ toolkit.createLabel(warningComposite,
+ "Task data not available. If connected, synchronize the task and reopen.");
} else {
createSections();
@@ -658,7 +681,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
Hyperlink link = new Hyperlink(composite, SWT.NONE);
link.setText(label);
link.setFont(TITLE_FONT);
- link.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ link.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
link.addHyperlinkListener(new HyperlinkAdapter() {
@Override
@@ -671,19 +694,19 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
};
- if (parentEditor.getTopForm() != null) {
- parentEditor.getTopForm().getToolBarManager().add(repositoryLabelControl);
+ if (form != null) {
+ form.getToolBarManager().add(repositoryLabelControl);
if (repositoryTask != null) {
SynchronizeEditorAction synchronizeEditorAction = new SynchronizeEditorAction();
synchronizeEditorAction.selectionChanged(new StructuredSelection(this));
- parentEditor.getTopForm().getToolBarManager().add(synchronizeEditorAction);
+ form.getToolBarManager().add(synchronizeEditorAction);
}
// Header drop down menu additions:
// form.getForm().getMenuManager().add(new
// SynchronizeSelectedAction());
- parentEditor.getTopForm().getToolBarManager().update(true);
+ form.getToolBarManager().update(true);
}
// if (form.getToolBarManager() != null) {
@@ -759,7 +782,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
Composite nameValue = toolkit.createComposite(headerInfoComposite);
nameValue.setLayout(new GridLayout(2, false));
Label label = toolkit.createLabel(nameValue, "ID:");// .setFont(TITLE_FONT);
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
// toolkit.createText(nameValue, idLabel, SWT.FLAT | SWT.READ_ONLY);
Text text = new Text(nameValue, SWT.FLAT | SWT.READ_ONLY);
toolkit.adapt(text, true, true);
@@ -808,7 +831,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
ImageHyperlink hyperlink = toolkit.createImageHyperlink(headerInfoComposite, SWT.NONE);
hyperlink.setText(linkName);
hyperlink.setToolTipText(kindLabel + " " + LABEL_HISTORY);
- hyperlink.setImage(TaskListImages.getImage(TaskListImages.TASK_REPOSITORY_HISTORY));
+ hyperlink.setImage(TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY_HISTORY));
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
@Override
public void linkActivated(HyperlinkEvent e) {
@@ -879,7 +902,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
} else {
label = toolkit.createLabel(composite, attribute.getName());
}
- label.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ label.setForeground(toolkit.getColors().getColor(FormColors.TITLE));
return label;
}
@@ -972,14 +995,6 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
text.setLayoutData(textData);
toolkit.paintBordersFor(textFieldComposite);
text.setData(attribute);
- text.addListener(SWT.KeyUp, new Listener() {
- public void handleEvent(Event event) {
- String newValue = text.getText();
- RepositoryTaskAttribute attribute = (RepositoryTaskAttribute) text.getData();
- attribute.setValue(newValue);
- attributeChanged(attribute);
- }
- });
}
currentCol += 2;
@@ -1482,7 +1497,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
final String commentBody) {
final ImageHyperlink replyLink = new ImageHyperlink(section, SWT.NULL);
toolkit.adapt(replyLink, true, true);
- replyLink.setImage(TaskListImages.getImage(TaskListImages.REPLY));
+ replyLink.setImage(TasksUiImages.getImage(TasksUiImages.REPLY));
replyLink.setToolTipText(LABEL_REPLY);
// no need for the background - transparency will take care of it
replyLink.setBackground(null);
@@ -1645,7 +1660,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
ImageHyperlink hyperlink = new ImageHyperlink(commentsSection, SWT.NONE);
toolkit.adapt(hyperlink, true, true);
hyperlink.setBackground(null);
- hyperlink.setImage(TaskListImages.getImage(TaskListImages.EXPAND_ALL));
+ hyperlink.setImage(TasksUiImages.getImage(TasksUiImages.EXPAND_ALL));
hyperlink.addHyperlinkListener(new HyperlinkAdapter() {
public void linkActivated(HyperlinkEvent e) {
revealAllComments();
@@ -1681,7 +1696,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
foundNew = true;
}
- expandableComposite.setTitleBarForeground(toolkit.getColors().getColor(IFormColors.TITLE));
+ expandableComposite.setTitleBarForeground(toolkit.getColors().getColor(FormColors.TITLE));
expandableComposite.setText(taskComment.getNumber() + ": " + taskComment.getAuthorName() + ", "
+ formatDate(taskComment.getCreated()));
@@ -1938,10 +1953,17 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
}
+ // once the following bug is fixed, this check for first focus is probably
+ // not needed -> Bug# 172033: Restore editor focus
+ private boolean firstFocus = true;
+
@Override
public void setFocus() {
if (summaryText != null && !summaryText.isDisposed()) {
- summaryText.setFocus();
+ if (firstFocus) {
+ summaryText.setFocus();
+ firstFocus = false;
+ }
} else {
form.setFocus();
}
@@ -2441,7 +2463,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
protected void addAttachContextButton(Composite buttonComposite, ITask task) {
attachContextButton = toolkit.createButton(buttonComposite, "Attach Context", SWT.CHECK);
- attachContextButton.setImage(TaskListImages.getImage(TaskListImages.CONTEXT_ATTACH));
+ attachContextButton.setImage(TasksUiImages.getImage(TasksUiImages.CONTEXT_ATTACH));
}
/**
@@ -2474,7 +2496,7 @@ public abstract class AbstractRepositoryTaskEditor extends TaskFormPage {
final Button addSelfButton = toolkit.createButton(composite, "Add me to CC", SWT.CHECK);
addSelfButton.setSelection(RepositoryTaskAttribute.TRUE.equals(taskData
.getAttributeValue(RepositoryTaskAttribute.ADD_SELF_CC)));
- addSelfButton.setImage(TaskListImages.getImage(TaskListImages.PERSON));
+ addSelfButton.setImage(TasksUiImages.getImage(TasksUiImages.PERSON));
addSelfButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorInput.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorInput.java
index b1064aa35..542498faf 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorInput.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorInput.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.tasks.ui.editors;
import java.util.Set;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.RepositoryTaskAttribute;
import org.eclipse.mylar.tasks.core.RepositoryTaskData;
import org.eclipse.mylar.tasks.core.TaskRepository;
@@ -79,7 +79,7 @@ public abstract class AbstractTaskEditorInput implements IEditorInput {
}
public ImageDescriptor getImageDescriptor() {
- return TaskListImages.REPOSITORY;
+ return TasksUiImages.REPOSITORY_SMALL;
}
public IPersistableElement getPersistable() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttachmentTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttachmentTableLabelProvider.java
index c00d7be76..60e6f35ea 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttachmentTableLabelProvider.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AttachmentTableLabelProvider.java
@@ -15,7 +15,7 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableColorProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.mylar.internal.tasks.ui.TaskListColorsAndFonts;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.RepositoryAttachment;
import org.eclipse.swt.graphics.Color;
@@ -46,9 +46,9 @@ public class AttachmentTableLabelProvider extends DecoratingLabelProvider implem
RepositoryAttachment attachment = (RepositoryAttachment) element;
if (columnIndex == 0) {
if (AbstractRepositoryConnector.MYLAR_CONTEXT_DESCRIPTION.equals(attachment.getDescription())) {
- return TaskListImages.getImage(TaskListImages.CONTEXT_TRANSFER);
+ return TasksUiImages.getImage(TasksUiImages.CONTEXT_TRANSFER);
} else if (attachment.isPatch()) {
- return TaskListImages.getImage(TaskListImages.ATTACHMENT_PATCH);
+ return TasksUiImages.getImage(TasksUiImages.ATTACHMENT_PATCH);
} else {
return WorkbenchImages.getImage(ISharedImages.IMG_OBJ_FILE);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java
new file mode 100644
index 000000000..d5143a929
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/RepositoryTaskEditorDropListener.java
@@ -0,0 +1,135 @@
+/*******************************************************************************
+ * Copyright (c) 2004 - 2006 Mylar committers 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
+ *******************************************************************************/
+
+package org.eclipse.mylar.tasks.ui.editors;
+
+import java.io.File;
+
+import org.eclipse.mylar.internal.tasks.ui.wizards.NewAttachmentWizard;
+import org.eclipse.mylar.internal.tasks.ui.wizards.NewAttachmentWizardDialog;
+import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
+import org.eclipse.mylar.tasks.core.ITask;
+import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.DropTargetEvent;
+import org.eclipse.swt.dnd.DropTargetListener;
+import org.eclipse.swt.dnd.FileTransfer;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.widgets.Control;
+
+/**
+ * @author Mik Kersten
+ */
+class RepositoryTaskEditorDropListener implements DropTargetListener {
+ /**
+ *
+ */
+ private final AbstractRepositoryTaskEditor abstractRepositoryTaskEditor;
+
+ private final FileTransfer fileTransfer;
+
+ private final TextTransfer textTransfer;
+
+ private final Control control;
+
+ public RepositoryTaskEditorDropListener(AbstractRepositoryTaskEditor abstractRepositoryTaskEditor, FileTransfer fileTransfer, TextTransfer textTransfer, Control control) {
+ this.abstractRepositoryTaskEditor = abstractRepositoryTaskEditor;
+ this.fileTransfer = fileTransfer;
+ this.textTransfer = textTransfer;
+ this.control = control;
+ }
+
+ public void dragEnter(DropTargetEvent event) {
+ if (event.detail == DND.DROP_DEFAULT) {
+ if ((event.operations & DND.DROP_COPY) != 0) {
+ event.detail = DND.DROP_COPY;
+ } else {
+ event.detail = DND.DROP_NONE;
+ }
+ }
+ // will accept text but prefer to have files dropped
+ for (int i = 0; i < event.dataTypes.length; i++) {
+ if (fileTransfer.isSupportedType(event.dataTypes[i])) {
+ event.currentDataType = event.dataTypes[i];
+ // files should only be copied
+ if (event.detail != DND.DROP_COPY) {
+ event.detail = DND.DROP_NONE;
+ }
+ break;
+ }
+ }
+ }
+
+ public void dragOver(DropTargetEvent event) {
+ event.feedback = DND.FEEDBACK_SELECT | DND.FEEDBACK_SCROLL;
+ // if (textTransfer.isSupportedType(event.currentDataType)) {
+ // // NOTE: on unsupported platforms this will return null
+ // Object o = textTransfer.nativeToJava(event.currentDataType);
+ // String t = (String)o;
+ // if (t != null) System.out.println(t);
+ // }
+ }
+
+ public void dragOperationChanged(DropTargetEvent event) {
+ if ((event.detail == DND.DROP_DEFAULT) || (event.operations & DND.DROP_COPY) != 0) {
+
+ event.detail = DND.DROP_COPY;
+ } else {
+ event.detail = DND.DROP_NONE;
+ }
+
+ // allow text to be moved but files should only be copied
+ if (fileTransfer.isSupportedType(event.currentDataType)) {
+ if (event.detail != DND.DROP_COPY) {
+ event.detail = DND.DROP_NONE;
+ }
+ }
+ }
+
+ public void dragLeave(DropTargetEvent event) {
+ }
+
+ public void dropAccept(DropTargetEvent event) {
+ }
+
+ public void drop(DropTargetEvent event) {
+ if (textTransfer.isSupportedType(event.currentDataType)) {
+ String text = (String) event.data;
+ ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(this.abstractRepositoryTaskEditor.repository.getUrl(),
+ this.abstractRepositoryTaskEditor.taskData.getId());
+ if (!(task instanceof AbstractRepositoryTask)) {
+ // Should not happen
+ return;
+ }
+
+ NewAttachmentWizard naw = new NewAttachmentWizard(this.abstractRepositoryTaskEditor.repository, (AbstractRepositoryTask) task, text);
+ NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(control.getShell(), naw);
+ naw.setDialog(dialog);
+ dialog.create();
+ dialog.open();
+ }
+ if (fileTransfer.isSupportedType(event.currentDataType)) {
+ String[] files = (String[]) event.data;
+ if (files.length > 0) {
+ ITask task = TasksUiPlugin.getTaskListManager().getTaskList().getTask(this.abstractRepositoryTaskEditor.repository.getUrl(),
+ this.abstractRepositoryTaskEditor.taskData.getId());
+ if (!(task instanceof AbstractRepositoryTask)) {
+ // Should not happen
+ return;
+ }
+
+ NewAttachmentWizard naw = new NewAttachmentWizard(this.abstractRepositoryTaskEditor.repository, (AbstractRepositoryTask) task,
+ new File(files[0]));
+ NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(control.getShell(), naw);
+ naw.setDialog(dialog);
+ dialog.create();
+ dialog.open();
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
index fa9f2ca62..711aee75b 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/TaskEditor.java
@@ -18,19 +18,17 @@ import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.mylar.core.MylarStatusHandler;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.editors.TaskEditorActionContributor;
import org.eclipse.mylar.internal.tasks.ui.editors.TaskPlanningEditor;
import org.eclipse.mylar.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylar.tasks.core.AbstractRepositoryTask;
import org.eclipse.mylar.tasks.core.ITask;
-import org.eclipse.mylar.tasks.core.RepositoryTaskData;
-import org.eclipse.mylar.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylar.tasks.ui.TasksUiPlugin;
import org.eclipse.mylar.tasks.ui.TasksUiUtil;
import org.eclipse.swt.SWT;
@@ -47,11 +45,9 @@ import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.forms.IManagedForm;
+import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.forms.editor.IFormPage;
-import org.eclipse.ui.forms.editor.SharedHeaderFormEditor;
-import org.eclipse.ui.forms.widgets.Form;
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
/**
@@ -59,7 +55,7 @@ import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
* @author Eric Booth (initial prototype)
* @author Rob Elves
*/
-public class TaskEditor extends SharedHeaderFormEditor {
+public class TaskEditor extends FormEditor {
private static final String ISSUE_WEB_PAGE_LABEL = "Browser";
@@ -237,7 +233,9 @@ public class TaskEditor extends SharedHeaderFormEditor {
}
public void notifyTaskChanged() {
- TasksUiPlugin.getTaskListManager().getTaskList().notifyLocalInfoChanged(task);
+ if (task != null) {
+ TasksUiPlugin.getTaskListManager().getTaskList().notifyLocalInfoChanged(task);
+ }
}
@Override
@@ -412,7 +410,7 @@ public class TaskEditor extends SharedHeaderFormEditor {
taskEditorInput = (TaskEditorInput) getEditorInput();
task = taskEditorInput.getTask();
setPartName(taskEditorInput.getLabel());
- setPageImage(0, TaskListImages.getImage(TaskListImages.CALENDAR));
+ setPageImage(0, TasksUiImages.getImage(TasksUiImages.CALENDAR_SMALL));
}
int selectedIndex = index;
@@ -426,7 +424,7 @@ public class TaskEditor extends SharedHeaderFormEditor {
editor.init(getEditorSite(), input);
index = addPage(taskEditor);
if (input.getImageDescriptor() != null) {
- setPageImage(index, TaskListImages.getImage(input.getImageDescriptor()));
+ setPageImage(index, TasksUiImages.getImage(input.getImageDescriptor()));
}
if (editor instanceof AbstractRepositoryTaskEditor) {
@@ -456,7 +454,7 @@ public class TaskEditor extends SharedHeaderFormEditor {
String urlToOpen = getUrl();
if (urlToOpen != null && !urlToOpen.equals("")) {
browserPageIndex = createBrowserPage(urlToOpen);
- setPageImage(browserPageIndex, TaskListImages.getImage(TaskListImages.OVERLAY_WEB));
+ setPageImage(browserPageIndex, TasksUiImages.getImage(TasksUiImages.BROWSER_SMALL));
if (selectedIndex == 0 && taskEditorInput != null && !taskEditorInput.isNewTask()) {
selectedIndex = browserPageIndex;
}
@@ -467,11 +465,11 @@ public class TaskEditor extends SharedHeaderFormEditor {
}
if (task instanceof AbstractRepositoryTask) {
- setTitleImage(TaskListImages.getImage(TaskListImages.TASK_REPOSITORY));
+ setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_REPOSITORY));
} else if (getEditorInput() instanceof AbstractTaskEditorInput) {
- this.setTitleImage(TaskListImages.getImage(TaskListImages.TASK_REMOTE));
+ this.setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_REMOTE));
} else if (getUrl() != null) {
- setTitleImage(TaskListImages.getImage(TaskListImages.TASK_WEB));
+ setTitleImage(TasksUiImages.getImage(TasksUiImages.TASK_WEB));
}
} catch (PartInitException e) {
@@ -479,6 +477,15 @@ public class TaskEditor extends SharedHeaderFormEditor {
}
}
+ @Override
+ public void setFocus() {
+ if (getActivePageInstance() instanceof AbstractNewRepositoryTaskEditor) {
+ getActivePageInstance().setFocus();
+ } else {
+ super.setFocus();
+ }
+ }
+
/**
* Update the title of the editor
*/
@@ -486,12 +493,13 @@ public class TaskEditor extends SharedHeaderFormEditor {
// setContentDescription(name);
setPartName(name);
setTitleToolTip(name);
+// updateFormTitle();
}
public void showBusy(boolean busy) {
- if (!this.getHeaderForm().getForm().isDisposed()) {
- this.getHeaderForm().getForm().setBusy(busy);
- }
+ // if (!this.getHeaderForm().getForm().isDisposed()) {
+ // this.getHeaderForm().getForm().setBusy(busy);
+ // }
}
public ISelection getSelection() {
@@ -502,51 +510,54 @@ public class TaskEditor extends SharedHeaderFormEditor {
}
}
- @Override
- protected void createHeaderContents(IManagedForm headerForm) {
- getToolkit().decorateFormHeading(headerForm.getForm().getForm());
- headerForm.getForm().setImage(TaskListImages.getImage(TaskListImages.TASK));
-
- IEditorInput input = getEditorInput();
- if (input instanceof TaskEditorInput) {
- ITask task = ((TaskEditorInput) input).getTask();
- if (task instanceof AbstractRepositoryTask) {
- setFormHeaderImage(((AbstractRepositoryTask) task).getRepositoryKind());
- setFormHeaderLabel((AbstractRepositoryTask) task);
- return;
- } else {
- getHeaderForm().getForm().setText("Task: " + task.getSummary());
- }
- } else if (input instanceof RepositoryTaskEditorInput) {
- ITask task = ((RepositoryTaskEditorInput) input).getRepositoryTask();
- if (task != null && task instanceof AbstractRepositoryTask) {
- setFormHeaderImage(((AbstractRepositoryTask) task).getRepositoryKind());
- setFormHeaderLabel((AbstractRepositoryTask) task);
- return;
- } else {
- RepositoryTaskData data = ((RepositoryTaskEditorInput) input).getTaskData();
- if (data != null) {
- setFormHeaderImage(data.getRepositoryKind());
- setFormHeaderLabel(data);
- }
- }
- }
- }
-
- private void setFormHeaderImage(String repositoryKind) {
- ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(repositoryKind);
- ImageDescriptor imageDescriptor = TaskListImages.createWithOverlay(TaskListImages.REPOSITORY, overlay, false,
- false);
- getHeaderForm().getForm().setImage(TaskListImages.getImage(imageDescriptor));
- }
+ // @Override
+ // protected void createHeaderContents(IManagedForm headerForm) {
+ // getToolkit().decorateFormHeading(headerForm.getForm().getForm());
+ // headerForm.getForm().setImage(TasksUiImages.getImage(TasksUiImages.TASK));
+ //
+ // IEditorInput input = getEditorInput();
+ // if (input instanceof TaskEditorInput) {
+ // ITask task = ((TaskEditorInput) input).getTask();
+ // if (task instanceof AbstractRepositoryTask) {
+ // setFormHeaderImage(((AbstractRepositoryTask) task).getRepositoryKind());
+ // setFormHeaderLabel((AbstractRepositoryTask) task);
+ // return;
+ // } else {
+ // getHeaderForm().getForm().setText("Task: " + task.getSummary());
+ // }
+ // } else if (input instanceof RepositoryTaskEditorInput) {
+ // ITask task = ((RepositoryTaskEditorInput) input).getRepositoryTask();
+ // if (task != null && task instanceof AbstractRepositoryTask) {
+ // setFormHeaderImage(((AbstractRepositoryTask) task).getRepositoryKind());
+ // setFormHeaderLabel((AbstractRepositoryTask) task);
+ // return;
+ // } else {
+ // RepositoryTaskData data = ((RepositoryTaskEditorInput)
+ // input).getTaskData();
+ // if (data != null) {
+ // setFormHeaderImage(data.getRepositoryKind());
+ // setFormHeaderLabel(data);
+ // }
+ // }
+ // }
+ // }
- public Form getTopForm() {
- return this.getHeaderForm().getForm().getForm();
- }
+ // private void setFormHeaderImage(String repositoryKind) {
+ // ImageDescriptor overlay =
+ // TasksUiPlugin.getDefault().getOverlayIcon(repositoryKind);
+ // ImageDescriptor imageDescriptor =
+ // TasksUiImages.createWithOverlay(TasksUiImages.REPOSITORY, overlay, false,
+ // false);
+ // getHeaderForm().getForm().setImage(TasksUiImages.getImage(imageDescriptor));
+ // }
- public void setMessage(String message, int type) {
- this.getHeaderForm().getForm().setMessage(message, type);
- }
+ // public Form getTopForm() {
+ // return this.getHeaderForm().getForm().getForm();
+ // }
+ //
+ // public void setMessage(String message, int type) {
+ // this.getHeaderForm().getForm().setMessage(message, type);
+ // }
protected IWorkbenchSiteProgressService getProgressService() {
Object siteService = getEditorSite().getAdapter(IWorkbenchSiteProgressService.class);
@@ -555,32 +566,39 @@ public class TaskEditor extends SharedHeaderFormEditor {
return null;
}
- private void setFormHeaderLabel(RepositoryTaskData taskData) {
-
- String kindLabel = taskData.getTaskKind();
- String idLabel = taskData.getId();
-
- if (idLabel != null) {
- getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
- } else {
- getHeaderForm().getForm().setText(kindLabel);
- }
- }
-
- private void setFormHeaderLabel(AbstractRepositoryTask repositoryTask) {
-
- AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getRepositoryUi(repositoryTask.getRepositoryKind());
- String kindLabel = "";
- if (connectorUi != null) {
- kindLabel = connectorUi.getTaskKindLabel(repositoryTask);
- }
+ // private void setFormHeaderLabel(RepositoryTaskData taskData) {
+ //
+ // String kindLabel = taskData.getTaskKind();
+ // String idLabel = taskData.getId();
+ //
+ // if (idLabel != null) {
+ // getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
+ // } else {
+ // getHeaderForm().getForm().setText(kindLabel);
+ // }
+ // }
- String idLabel = repositoryTask.getTaskKey();
+ // private void setFormHeaderLabel(AbstractRepositoryTask repositoryTask) {
+ //
+ // AbstractRepositoryConnectorUi connectorUi =
+ // TasksUiPlugin.getRepositoryUi(repositoryTask.getRepositoryKind());
+ // String kindLabel = "";
+ // if (connectorUi != null) {
+ // kindLabel = connectorUi.getTaskKindLabel(repositoryTask);
+ // }
+ //
+ // String idLabel = repositoryTask.getTaskKey();
+ //
+ // if (idLabel != null) {
+ // getHeaderForm().getForm().getForm().setText(kindLabel + " " + idLabel);
+ // } else {
+ // getHeaderForm().getForm().setText(kindLabel);
+ // }
+ // }
- if (idLabel != null) {
- getHeaderForm().getForm().setText(kindLabel + " " + idLabel);
- } else {
- getHeaderForm().getForm().setText(kindLabel);
+ public void setMessage(String string, int warning) {
+ if (string != null) {
+ MessageDialog.openInformation(getSite().getShell(), "Task Editor", string);
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java
index 993b829de..5b7eca252 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/search/AbstractRepositoryQueryPage.java
@@ -14,7 +14,7 @@ package org.eclipse.mylar.tasks.ui.search;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.mylar.internal.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.core.TaskRepositoryManager;
@@ -55,7 +55,7 @@ public abstract class AbstractRepositoryQueryPage extends WizardPage implements
this(wizardTitle, null);
setTitle(TITLE);
setDescription(DESCRIPTION);
- setImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
setPageComplete(false);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java
index 043558bd5..1bc5428f0 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractEditQueryWizard.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.tasks.ui.wizards;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.TaskRepository;
@@ -37,7 +37,7 @@ public abstract class AbstractEditQueryWizard extends Wizard {
this.query = query;
setNeedsProgressMonitor(true);
setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
@Override
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
index ce861c25b..f98151289 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/AbstractRepositorySettingsPage.java
@@ -49,8 +49,11 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.Section;
/**
@@ -521,28 +524,36 @@ public abstract class AbstractRepositorySettingsPage extends WizardPage {
proxyAuthComp.setBackground(container.getBackground());
proxyExpComposite.setClient(proxyAuthComp);
- systemProxyButton = new Button(proxyAuthComp, SWT.CHECK);
- GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(systemProxyButton);
+
+ Composite settingsComposite = new Composite(proxyAuthComp, SWT.NULL);
+ GridLayout gridLayout3 = new GridLayout();
+ gridLayout3.numColumns = 2;
+ gridLayout3.verticalSpacing = 0;
+ settingsComposite.setLayout(gridLayout3);
+
+ systemProxyButton = new Button(settingsComposite, SWT.CHECK);
+ GridDataFactory.fillDefaults().align(SWT.LEFT, SWT.TOP).span(2, SWT.DEFAULT).applyTo(settingsComposite);
- systemProxyButton.setText("Use global Network Connections preference settings");
+ systemProxyButton.setText("Use Install/Update preferences");
+ Hyperlink changeProxySettingsLink = toolkit.createHyperlink(settingsComposite, "Change Settings", SWT.NULL);
+ changeProxySettingsLink.setBackground(container.getBackground());
+ changeProxySettingsLink.addHyperlinkListener(new IHyperlinkListener() {
-// Hyperlink changeProxySettingsLink = toolkit.createHyperlink(proxyAuthComp, "Change", SWT.NULL);
-// changeProxySettingsLink.addHyperlinkListener(new IHyperlinkListener() {
-//
-// public void linkActivated(HyperlinkEvent e) {
+ public void linkActivated(HyperlinkEvent e) {
// ProxyPreferencePage page = new ProxyPreferencePage();
// page.init(PlatformUI.getWorkbench());
// TasksUiUtil.showPreferencePage(TasksUiUtil.PREFS_PAGE_ID_NET_PROXY, page);
-// }
-//
-// public void linkEntered(HyperlinkEvent e) {
-// // ignore
-// }
-//
-// public void linkExited(HyperlinkEvent e) {
-// // ignore
-// }
-// });
+ }
+
+ public void linkEntered(HyperlinkEvent e) {
+ // ignore
+ }
+
+ public void linkExited(HyperlinkEvent e) {
+ // ignore
+ }
+ });
+ changeProxySettingsLink.setEnabled(false);
systemProxyButton.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
index 6aa31c4c7..6c666ddc8 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewTaskWizard.java
@@ -13,7 +13,6 @@ import java.lang.reflect.InvocationTargetException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
@@ -22,6 +21,7 @@ import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.tasks.core.AbstractAttributeFactory;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.ITaskDataHandler;
+import org.eclipse.mylar.tasks.core.MylarStatus;
import org.eclipse.mylar.tasks.core.RepositoryTaskData;
import org.eclipse.mylar.tasks.core.Task;
import org.eclipse.mylar.tasks.core.TaskRepository;
@@ -63,8 +63,8 @@ public class NewTaskWizard extends Wizard implements INewWizard {
final ITaskDataHandler taskDataHandler = (ITaskDataHandler) connector.getTaskDataHandler();
if (taskDataHandler == null) {
- MylarStatusHandler.displayStatus("Error creating new task", new Status(IStatus.ERROR,
- TasksUiPlugin.PLUGIN_ID, "The selected repository does not support creating new tasks."));
+ MylarStatusHandler.displayStatus("Error creating new task", new MylarStatus(IStatus.ERROR,
+ TasksUiPlugin.PLUGIN_ID, MylarStatus.REPOSITORY_ERROR, "The selected repository does not support creating new tasks."));
return false;
}
@@ -79,9 +79,8 @@ public class NewTaskWizard extends Wizard implements INewWizard {
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
if (!taskDataHandler.initializeTaskData(taskRepository, taskData, monitor)) {
- throw new CoreException(new Status(IStatus.ERROR,
- TasksUiPlugin.PLUGIN_ID, "The selected repository does not support creating new tasks."));
- }
+ throw new CoreException(new MylarStatus(IStatus.ERROR,
+ TasksUiPlugin.PLUGIN_ID, MylarStatus.REPOSITORY_ERROR, "The selected repository does not support creating new tasks.")); }
} catch (CoreException e) {
throw new InvocationTargetException(e);
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java
index 368394ddd..2cf86c653 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/NewWebTaskWizard.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.tasks.ui.wizards;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.wizards.NewWebTaskPage;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.ui.TasksUiUtil;
@@ -37,7 +37,7 @@ public class NewWebTaskWizard extends Wizard implements INewWizard {
this.newTaskUrl = newTaskUrl;
setWindowTitle("New Repository Task");
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
public void init(IWorkbench workbench, IStructuredSelection selection) {
diff --git a/org.eclipse.mylyn.trac-feature/feature.xml b/org.eclipse.mylyn.trac-feature/feature.xml
index 50bf5d192..9c42292b4 100644
--- a/org.eclipse.mylyn.trac-feature/feature.xml
+++ b/org.eclipse.mylyn.trac-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.mylar.trac_feature"
label="Mylar Connector: Trac"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
provider-name="Eclipse.org"
plugin="org.eclipse.mylar">
@@ -214,35 +214,38 @@ litigation.
</license>
<url>
- <update label="Mylar for Eclipse 3.3" url="http://download.eclipse.org/technology/mylar/update-site/e3.3"/>
+ <update label="Mylar for Eclipse 3.2" url="http://download.eclipse.org/technology/mylar/update-site/e3.2"/>
</url>
<requires>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.ui.forms"/>
<import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.search"/>
- <import feature="org.eclipse.mylar_feature" version="2.0.0.v20070216" match="greaterOrEqual"/>
<import plugin="org.eclipse.mylar.context.core"/>
<import plugin="org.eclipse.mylar.tasks.ui"/>
<import plugin="org.eclipse.mylar.tasks.core"/>
- <import plugin="org.eclipse.mylar.trac.core"/>
+ <import plugin="org.eclipse.search"/>
<import plugin="org.eclipse.mylar" version="2.0.0.v20070216" match="greaterOrEqual"/>
<import plugin="org.eclipse.mylar.monitor.core"/>
+ <import feature="org.eclipse.mylar_feature" version="2.0.0.v20070330-2000" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui.editors"/>
+ <import plugin="org.eclipse.jface.text"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.ui.workbench.texteditor"/>
</requires>
<plugin
id="org.eclipse.mylar.trac.ui"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
<plugin
id="org.eclipse.mylar.trac.core"
download-size="0"
install-size="0"
- version="2.0.0.v20070328-2130"
+ version="2.0.0.v20070403-1300"
unpack="false"/>
</feature>
diff --git a/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF
index 5f5c94eca..36674b7ee 100644
--- a/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.trac.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Trac Core Plug-in
Bundle-SymbolicName: org.eclipse.mylar.trac.core;singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylar.context.core,
diff --git a/org.eclipse.mylyn.trac.ui/.classpath b/org.eclipse.mylyn.trac.ui/.classpath
index 4e67fbe59..92f16e233 100644
--- a/org.eclipse.mylyn.trac.ui/.classpath
+++ b/org.eclipse.mylyn.trac.ui/.classpath
@@ -4,7 +4,7 @@
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
- <accessrule kind="accessible" pattern="**/TaskListImages"/>
+ <accessrule kind="accessible" pattern="**/TasksUiImages"/>
<accessrule kind="accessible" pattern="**/TaskListSynchronizationScheduler"/>
<accessrule kind="accessible" pattern="**/TaskListPreferenceConstants"/>
<accessrule kind="discouraged" pattern="**/mylar/internal/tasks/**"/>
diff --git a/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
index 352b15c1a..0df00e1e1 100644
--- a/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.trac.ui/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Mylar Trac UI Plug-in
Bundle-SymbolicName: org.eclipse.mylar.trac.ui;singleton:=true
-Bundle-Version: 2.0.0.v20070328-2130
+Bundle-Version: 2.0.0.v20070403-1300
Bundle-Activator: org.eclipse.mylar.internal.trac.ui.TracUiPlugin
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.ui,
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java
index 3b5ddd7f3..64deb8288 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracQueryWizard.java
@@ -12,7 +12,7 @@
package org.eclipse.mylar.internal.trac.ui.wizard;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.AbstractRepositoryQuery;
import org.eclipse.mylar.tasks.core.TaskRepository;
@@ -34,7 +34,7 @@ public class NewTracQueryWizard extends Wizard {
setNeedsProgressMonitor(true);
setWindowTitle(TITLE);
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
}
@Override
diff --git a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java
index 23b72ef43..46f357a45 100644
--- a/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java
+++ b/org.eclipse.mylyn.trac.ui/src/org/eclipse/mylyn/internal/trac/ui/wizard/NewTracTaskWizard.java
@@ -13,7 +13,7 @@ package org.eclipse.mylar.internal.trac.ui.wizard;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
+import org.eclipse.mylar.internal.tasks.ui.TasksUiImages;
import org.eclipse.mylar.internal.tasks.ui.TaskListPreferenceConstants;
import org.eclipse.mylar.tasks.core.TaskRepository;
import org.eclipse.mylar.tasks.ui.TasksUiUtil;
@@ -40,7 +40,7 @@ public class NewTracTaskWizard extends Wizard implements INewWizard {
newTaskPage = new NewTracTaskPage(taskRepository);
setWindowTitle("New Repository Task");
- setDefaultPageImageDescriptor(TaskListImages.BANNER_REPOSITORY);
+ setDefaultPageImageDescriptor(TasksUiImages.BANNER_REPOSITORY);
setNeedsProgressMonitor(true);
}

Back to the top