Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2008-06-13 15:38:40 -0400
committermkersten2008-06-13 15:38:40 -0400
commitbab6895eb1b52844cb548402d191b01d318e3997 (patch)
tree8d94e2dd631d63c3703d5bee1d6adaa0d60abe39 /org.eclipse.mylyn.help.ui
parent9ca5cfff068e0fc36b58292a44927a9755969d8c (diff)
downloadorg.eclipse.mylyn.tasks-bab6895eb1b52844cb548402d191b01d318e3997.tar.gz
org.eclipse.mylyn.tasks-bab6895eb1b52844cb548402d191b01d318e3997.tar.xz
org.eclipse.mylyn.tasks-bab6895eb1b52844cb548402d191b01d318e3997.zip
RESOLVED - bug 236760: rename "Mylyn" UI entries to "Tasks"
https://bugs.eclipse.org/bugs/show_bug.cgi?id=236760
Diffstat (limited to 'org.eclipse.mylyn.help.ui')
-rw-r--r--org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.mylyn.help.ui/doc/toc.xml2
-rw-r--r--org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml6
-rw-r--r--org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml18
-rw-r--r--org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml8
-rw-r--r--org.eclipse.mylyn.help.ui/plugin.xml29
-rw-r--r--org.eclipse.mylyn.help.ui/src/empty.txt1
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java60
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendControl.java572
-rw-r--r--org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java102
10 files changed, 24 insertions, 776 deletions
diff --git a/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF b/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
index 3e0cd46ec..7b81af077 100644
--- a/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.mylyn.help.ui/META-INF/MANIFEST.MF
@@ -11,6 +11,4 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
org.eclipse.mylyn.tasks.ui;bundle-version="[3.0.0,4.0.0)",
org.eclipse.mylyn.commons.ui;bundle-version="[3.0.0,4.0.0)"
-Export-Package: org.eclipse.mylyn.internal.help.ui.actions;x-internal:=true,
- org.eclipse.mylyn.internal.help.ui.dialogs;x-internal:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/org.eclipse.mylyn.help.ui/doc/toc.xml b/org.eclipse.mylyn.help.ui/doc/toc.xml
index 3cbf09a93..10ad48327 100644
--- a/org.eclipse.mylyn.help.ui/doc/toc.xml
+++ b/org.eclipse.mylyn.help.ui/doc/toc.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?NLS TYPE="org.eclipse.help.toc"?>
-<toc label="Task-Focused Interface" topic="doc/overview.html">
+<toc label="Mylyn" topic="doc/overview.html">
<topic label="Overview" href="doc/overview.html" />
<!--
<topic label="What's new" href="doc/new.html" />
diff --git a/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
index 6473c7f8e..facc4d603 100644
--- a/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
+++ b/org.eclipse.mylyn.help.ui/intro/overviewExtensionContent.xml
@@ -10,10 +10,10 @@
<text>Learn more about how Mylyn will help you focus on tasks</text>
</link>
-->
- <link label="Task-focused interface"
- url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.help.ui.actions.ShowMylynLegendAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
+ <link label="Mylyn"
+ url="http://org.eclipse.ui.intro/runAction?pluginId=org.eclipse.mylyn.help.ui&amp;class=org.eclipse.mylyn.internal.tasks.ui.actions.ShowTasksUiLegendAction&amp;id=org.eclipse.mylyn.doc.legend.show.action"
id="mylyn-overview" style-id="content-link">
- <text>See a summary of Mylyn's Task-Focused interface and open the Task List</text>
+ <text>See the Tasks UI Legend and open the Task List</text>
</link>
</group>
</extensionContent>
diff --git a/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
index 6f0b0a3c0..5aa015537 100644
--- a/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
+++ b/org.eclipse.mylyn.help.ui/intro/tutorialsExtensionContent.xml
@@ -2,17 +2,25 @@
<introContent>
<extensionContent id="org.eclipse.mylyn" name="Mylyn"
style="css/tutorials.css" path="tutorials/@">
- <group label="Mylyn" id="mylyn" style-id="content-group">
+ <group label="Task-focused programming" id="mylyn" style-id="content-group">
<link
url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.query"
label="Use the Task List" id="mylyn-query" style-id="content-link">
- <text>Learn how to create tasks and task repository queries.</text>
+ <text>Learn how to create tasks and task repository queries</text>
</link>
<link
- url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.taskfocus"
- label="Use the Task-Focused UI" id="mylyn-task" style-id="content-link">
- <text>Learn how to reduce information overload and multitask with ease.</text>
+ url="http://www.eclipse.org/mylyn/start/"
+ label="Visit the Mylyn homepage" id="mylyn-task" style-id="content-link">
+ <text>Learn about the benefits of task-focused programming with Mylyn</text>
</link>
</group>
</extensionContent>
</introContent>
+
+<!--
+<link
+ url="http://org.eclipse.ui.intro/showStandby?partId=org.eclipse.platform.cheatsheet&amp;input=org.eclipse.mylyn.cheatsheet.taskfocus"
+ label="Focus on Java" id="mylyn-task" style-id="content-link">
+ <text>Learn how to reduce information overload and multitask with ease.</text>
+</link>
+-->
diff --git a/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml b/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
index ce52bcd52..b9b4d7e00 100644
--- a/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
+++ b/org.eclipse.mylyn.help.ui/intro/whatsnewExtensionContent.xml
@@ -3,8 +3,8 @@
<extensionContent id="org.eclipse.mylyn" name="Mylyn"
style="css/whatsnew.css" path="whatsnew/@">
<group id="content-group" style-id="content-group">
- <link label="Task-focused interface"
- url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/new.html"
+ <link label="Mylyn"
+ url="http://www.eclipse.org/mylyn/new/"
id="mylyn-noteworthy" style-id="content-link">
<text>
Find out the significant changes made to Mylyn
@@ -13,3 +13,7 @@
</group>
</extensionContent>
</introContent>
+
+<!--
+ url="http://org.eclipse.ui.intro/showHelpTopic?id=/org.eclipse.mylyn.help.ui/doc/new.html"
+--> \ No newline at end of file
diff --git a/org.eclipse.mylyn.help.ui/plugin.xml b/org.eclipse.mylyn.help.ui/plugin.xml
index 94ee86250..6e23bc734 100644
--- a/org.eclipse.mylyn.help.ui/plugin.xml
+++ b/org.eclipse.mylyn.help.ui/plugin.xml
@@ -12,19 +12,6 @@
</toc>
</extension>
- <extension point="org.eclipse.ui.commands">
- <category
- id="org.eclipse.mylyn.help.ui.commands"
- name="Tasks Help">
- </category>
- <command
- categoryId="org.eclipse.mylyn.help.ui.commands"
- description="Show Tasks UI Legend"
- id="org.eclipse.mylyn.doc.legend.show"
- name="Show Tasks UI Legend">
- </command>
- </extension>
-
<extension
point="org.eclipse.ui.intro.configExtension">
<configExtension
@@ -65,21 +52,5 @@
</description>
</cheatsheet>
</extension>
- <extension
- point="org.eclipse.ui.viewActions">
- <viewContribution
- id="org.eclipse.mylyn.tasks.ui.views.tasks.help.contribution"
- targetID="org.eclipse.mylyn.tasks.ui.views.tasks">
- <action
- class="org.eclipse.mylyn.internal.help.ui.actions.ShowMylynLegendAction"
- icon="icons/etool16/icons-legend.gif"
- id="org.eclipse.mylyn.doc.legend.show.action"
- label="Show UI Legend"
- menubarPath="additions"
- style="push"
- tooltip="Show UI Legend">
- </action>
- </viewContribution>
- </extension>
</plugin>
diff --git a/org.eclipse.mylyn.help.ui/src/empty.txt b/org.eclipse.mylyn.help.ui/src/empty.txt
new file mode 100644
index 000000000..72979ee5e
--- /dev/null
+++ b/org.eclipse.mylyn.help.ui/src/empty.txt
@@ -0,0 +1 @@
+Currently no source in this bundle \ No newline at end of file
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java
deleted file mode 100644
index 1ef290e39..000000000
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/actions/ShowMylynLegendAction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project 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.mylyn.internal.help.ui.actions;
-
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.mylyn.internal.help.ui.dialogs.UiLegendDialog;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IViewActionDelegate;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.IWorkbenchWindowActionDelegate;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.intro.IIntroManager;
-import org.eclipse.ui.intro.IIntroPart;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class ShowMylynLegendAction implements IWorkbenchWindowActionDelegate, IViewActionDelegate {
-
- private IWorkbenchWindow wbWindow;
-
- public void dispose() {
- // ignore
- }
-
- public void init(IWorkbenchWindow window) {
- wbWindow = window;
- }
-
- public void run(IAction action) {
- IIntroManager introMgr = wbWindow.getWorkbench().getIntroManager();
- IIntroPart intro = introMgr.getIntro();
- if (intro != null) {
- introMgr.setIntroStandby(intro, true);
- }
-
- TasksUiUtil.openTasksViewInActivePerspective();
- Shell parentShell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
- UiLegendDialog uiLegendDialog = new UiLegendDialog(parentShell);
- uiLegendDialog.open();
- }
-
- public void selectionChanged(IAction action, ISelection selection) {
- // ignore
- }
-
- public void init(IViewPart view) {
- wbWindow = view.getViewSite().getWorkbenchWindow();
- }
-}
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendControl.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendControl.java
deleted file mode 100644
index 586eb01f0..000000000
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendControl.java
+++ /dev/null
@@ -1,572 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project 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.mylyn.internal.help.ui.dialogs;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.jface.preference.PreferenceDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonFonts;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonThemes;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryElement;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;
-import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
-import org.eclipse.mylyn.tasks.ui.ITasksUiConstants;
-import org.eclipse.mylyn.tasks.ui.LegendElement;
-import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider;
-import org.eclipse.mylyn.tasks.ui.TasksUi;
-import org.eclipse.mylyn.tasks.ui.TasksUiImages;
-import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.dialogs.PreferencesUtil;
-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;
-import org.eclipse.ui.forms.widgets.TableWrapData;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-import org.eclipse.ui.themes.IThemeManager;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class UiLegendControl extends Composite {
-
- public static final String TITLE = "Mylyn UI Overview";
-
- private final FormToolkit toolkit;
-
- private Window window = null;
-
- private final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
-
- private final IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
-
- private final ArrayList<LegendElement> legendElements = new ArrayList<LegendElement>();
-
- public UiLegendControl(Composite parent, FormToolkit toolkit) {
- this(parent, toolkit, true, SWT.VERTICAL);
- }
-
- public UiLegendControl(Composite parent, FormToolkit toolkit, boolean showConnectors, int style) {
- super(parent, SWT.NONE);
- this.toolkit = toolkit;
- toolkit.adapt(this);
-
- addListeners();
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- if (style == SWT.DEFAULT) {
- createContentsVertical(layout, showConnectors);
- } else if ((style & SWT.HORIZONTAL) != 0) {
- createContentsHorizontal(layout, showConnectors);
- } else {
- createContentsVertical(layout, showConnectors);
- }
-
- setLayout(layout);
- setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB));
- }
-
- private void addListeners() {
- addDisposeListener(new DisposeListener() {
- public void widgetDisposed(DisposeEvent e) {
- doDispose();
- }
- });
- }
-
- private void doDispose() {
- for (LegendElement element : legendElements) {
- element.dispose();
- }
- if (labelProvider != null) {
- labelProvider.dispose();
- }
- dispose();
- }
-
- public void setWindow(Window window) {
- this.window = window;
- }
-
- public boolean close() {
- if (window != null) {
- return window.close();
- } else {
- return false;
- }
- }
-
- private void createContentsHorizontal(TableWrapLayout layout, boolean showConnectors) {
- layout.numColumns = 2;
- createTasksPrioritiesSection(this);
- createContextSection(this);
- createActivitySection(this);
- createSynchronizationSection(this);
-
- Composite subComp = toolkit.createComposite(this);
- TableWrapLayout subLayout = new TableWrapLayout();
- subLayout.topMargin = 0;
- subLayout.bottomMargin = 0;
- subLayout.leftMargin = 0;
- subLayout.rightMargin = 0;
- subComp.setLayout(subLayout);
- subComp.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB, TableWrapData.FILL_GRAB, 1, 2));
-
- if (showConnectors) {
- createConnectorsSection(subComp);
- }
- createGettingStartedSection(subComp);
- }
-
- private void createContentsVertical(TableWrapLayout layout, boolean showConnectors) {
- layout.numColumns = 1;
- createTasksPrioritiesSection(this);
- createActivitySection(this);
- createContextSection(this);
- createSynchronizationSection(this);
- if (showConnectors) {
- createConnectorsSection(this);
- }
- createGettingStartedSection(this);
- }
-
- private void createTasksPrioritiesSection(Composite parent) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = true;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- Composite composite = toolkit.createComposite(parent);
- composite.setLayout(layout);
- composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- createTasksSection(composite);
- createPrioritiesSection(composite);
- }
-
- private void createTasksSection(Composite parent) {
- Section tasksSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- tasksSection.setText("Tasks");
- tasksSection.setLayout(new TableWrapLayout());
- tasksSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite tasksClient = toolkit.createComposite(tasksSection);
- tasksClient.setLayout(layout);
- tasksClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- tasksSection.setClient(tasksClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- toolkit.createLabel(tasksClient, "Task");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CATEGORY));
- toolkit.createLabel(tasksClient, "Category");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.QUERY));
- toolkit.createLabel(tasksClient, "Query");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.CALENDAR));
- toolkit.createLabel(tasksClient, "Date range");
-
- imageLabel = toolkit.createLabel(tasksClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK));
-
- Hyperlink openView = toolkit.createHyperlink(tasksClient, "Open Task List...", SWT.WRAP);
- openView.addHyperlinkListener(new IHyperlinkListener() {
- public void linkActivated(HyperlinkEvent e) {
- close();
- TasksUiUtil.openTasksViewInActivePerspective();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
- }
-
- private void createPrioritiesSection(Composite parent) {
- Section prioritiesSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- prioritiesSection.setText("Priorities");
- prioritiesSection.setLayout(new TableWrapLayout());
- prioritiesSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite prioritiesClient = toolkit.createComposite(prioritiesSection);
- prioritiesClient.setLayout(layout);
- prioritiesClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- prioritiesSection.setClient(prioritiesClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_1));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P1.getDescription());
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_2));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P2.getDescription());
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_3));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P3.getDescription() + " (default)");
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_4));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P4.getDescription());
-
- imageLabel = toolkit.createLabel(prioritiesClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.PRIORITY_5));
- toolkit.createLabel(prioritiesClient, PriorityLevel.P5.getDescription());
- }
-
- private void createActivitySection(Composite parent) {
- Section activitySection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- activitySection.setText("Task Activity");
- activitySection.setLayout(new TableWrapLayout());
- activitySection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite activityClient = toolkit.createComposite(activitySection);
- activityClient.setLayout(layout);
- activityClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- activitySection.setClient(activityClient);
-
- Label imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelToday = toolkit.createLabel(activityClient, "Scheduled for today");
- labelToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_SCHEDULED_TODAY));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelOverdue = toolkit.createLabel(activityClient, "Past scheduled date");
- labelOverdue.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_SCHEDULED_PAST));
-
-// imageLabel = toolkit.createLabel(activityClient, "");
-// imageLabel.setImage(TasksUiImages.getImage(TasksUiImages.TASK));
-// Label labelThisWeek = toolkit.createLabel(activityClient, "Scheduled for this
-// week");
-// labelThisWeek.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
-// TaskListColorsAndFonts.THEME_COLOR_TASK_THISWEEK_SCHEDULED));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelCompleted = toolkit.createLabel(activityClient, "Completed");
- labelCompleted.setFont(CommonFonts.STRIKETHROUGH);
-// labelCompleted.setForeground(TaskListColorsAndFonts.COLOR_TASK_COMPLETED);
- labelCompleted.setForeground(themeManager.getCurrentTheme()
- .getColorRegistry()
- .get(CommonThemes.COLOR_COMPLETED));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.TASK));
- Label labelCompletedToday = toolkit.createLabel(activityClient, "Completed today");
- labelCompletedToday.setFont(CommonFonts.STRIKETHROUGH);
- labelCompletedToday.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(
- CommonThemes.COLOR_COMPLETED_TODAY));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_DATE_DUE));
- toolkit.createLabel(activityClient, "Has due date");
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_DATE_OVERDUE));
- Label textLabel = toolkit.createLabel(activityClient, "Past Due date");
- textLabel.setForeground(themeManager.getCurrentTheme().getColorRegistry().get(CommonThemes.COLOR_OVERDUE));
-
- imageLabel = toolkit.createLabel(activityClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.BLANK));
- Hyperlink adjust = toolkit.createHyperlink(activityClient, "Adjust Colors and Fonts...", SWT.WRAP);
- adjust.addHyperlinkListener(new IHyperlinkListener() {
- public void linkActivated(HyperlinkEvent e) {
- PreferenceDialog dlg = PreferencesUtil.createPreferenceDialogOn(PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getShell(), ITasksUiConstants.ID_PREFERENCES_COLORS_AND_FONTS,
- new String[] { ITasksUiConstants.ID_PREFERENCES_COLORS_AND_FONTS }, null);
- dlg.open();
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
- }
-
- private void createContextSection(Composite parent) {
- Section contextSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- contextSection.setText("Task Context");
- contextSection.setLayout(new TableWrapLayout());
- contextSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 1;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite contextClient = toolkit.createComposite(contextSection);
- contextClient.setLayout(layout);
- contextClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- contextSection.setClient(contextClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_FOCUS));
- toolkit.createLabel(contextClient, "Focus view on active task");
-
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE_EMPTY));
- toolkit.createLabel(contextClient, "Inactive task with no context");
-
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_INACTIVE));
- toolkit.createLabel(contextClient, "Inactive task with context");
-
- imageLabel = toolkit.createLabel(contextClient, "");
- imageLabel.setImage(CommonImages.getImage(TasksUiImages.CONTEXT_ACTIVE));
- toolkit.createLabel(contextClient, "Active task");
- }
-
- private void createSynchronizationSection(Composite parent) {
- Section synchroSection = toolkit.createSection(parent, ExpandableComposite.TITLE_BAR);
- synchroSection.setText("Synchronization");
- synchroSection.setLayout(new TableWrapLayout());
- synchroSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 2;
- layout.makeColumnsEqualWidth = false;
- layout.verticalSpacing = 3;
- layout.topMargin = 1;
- layout.bottomMargin = 1;
-
- Composite synchroClient = toolkit.createComposite(synchroSection);
- synchroClient.setLayout(layout);
- synchroClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- synchroSection.setClient(synchroClient);
-
- Label imageLabel;
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING_NEW));
- toolkit.createLabel(synchroClient, "New task, open to view");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING));
- toolkit.createLabel(synchroClient, "Incoming changes, open to view");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_OUTGOING));
- toolkit.createLabel(synchroClient, "Outgoing changes");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_OUTGOING_NEW));
- toolkit.createLabel(synchroClient, "Unsubmitted outgoing changes");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_WARNING));
- toolkit.createLabel(synchroClient, "Synchronization failed, mouse over for details");
-
- imageLabel = toolkit.createLabel(synchroClient, "");
- imageLabel.setImage(CommonImages.getImage(CommonImages.OVERLAY_SYNC_CONFLICT));
- toolkit.createLabel(synchroClient, "Conflicting changes, need to synchronize");
- }
-
- @SuppressWarnings("deprecation")
- private void createConnectorsSection(Composite parent) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.numColumns = 3;
- layout.makeColumnsEqualWidth = true;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- Composite composite = toolkit.createComposite(parent);
- composite.setLayout(layout);
- composite.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- Collection<AbstractRepositoryConnector> connectors = TasksUi.getRepositoryManager().getRepositoryConnectors();
- for (AbstractRepositoryConnector connector : connectors) {
- AbstractRepositoryConnectorUi connectorUi = TasksUi.getRepositoryConnectorUi(connector.getConnectorKind());
- if (connectorUi != null) {
- List<LegendElement> elements = connectorUi.getLegendElements();
- if (elements != null && elements.size() > 0) {
- legendElements.addAll(elements);
- addLegendElements(composite, connector, elements);
- } else {
- List<ITask> items = connectorUi.getLegendItems();
- if (items != null && !items.isEmpty()) {
- addLegacyLegendItems(composite, connector, items);
- }
- }
- }
- }
- }
-
- private void addLegendElements(Composite composite, AbstractRepositoryConnector connector,
- List<LegendElement> elements) {
- Section connectorSection = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR);
- connectorSection.setLayout(new TableWrapLayout());
- connectorSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- String label = connector.getLabel();
- int parenIndex = label.indexOf('(');
- if (parenIndex != -1) {
- label = label.substring(0, parenIndex);
- }
- connectorSection.setText(label);
-
- TableWrapLayout clientLayout = new TableWrapLayout();
- clientLayout.numColumns = 2;
- clientLayout.makeColumnsEqualWidth = false;
- clientLayout.verticalSpacing = 1;
- clientLayout.topMargin = 1;
- clientLayout.bottomMargin = 1;
-
- Composite connectorClient = toolkit.createComposite(connectorSection);
- connectorClient.setLayout(clientLayout);
- connectorClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- connectorSection.setClient(connectorClient);
-
- Label imageLabel;
- for (LegendElement element : elements) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- imageLabel.setImage(element.getImage());
- toolkit.createLabel(connectorClient, element.getLabel());
- }
-
- if (elements.size() < 4) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- toolkit.createLabel(connectorClient, "");
- }
- }
-
- private void addLegacyLegendItems(Composite composite, AbstractRepositoryConnector connector, List<ITask> elements) {
- Section connectorSection = toolkit.createSection(composite, ExpandableComposite.TITLE_BAR);
- connectorSection.setLayout(new TableWrapLayout());
- connectorSection.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- String label = connector.getLabel();
- int parenIndex = label.indexOf('(');
- if (parenIndex != -1) {
- label = label.substring(0, parenIndex);
- }
- connectorSection.setText(label);
-
- TableWrapLayout clientLayout = new TableWrapLayout();
- clientLayout.numColumns = 2;
- clientLayout.makeColumnsEqualWidth = false;
- clientLayout.verticalSpacing = 1;
- clientLayout.topMargin = 1;
- clientLayout.bottomMargin = 1;
-
- Composite connectorClient = toolkit.createComposite(connectorSection);
- connectorClient.setLayout(clientLayout);
- connectorClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
- connectorSection.setClient(connectorClient);
-
- Label imageLabel;
- for (IRepositoryElement taskListElement : elements) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- imageLabel.setImage(labelProvider.getImage(taskListElement));
- toolkit.createLabel(connectorClient, taskListElement.getSummary());
- }
-
- if (elements.size() < 4) {
- imageLabel = toolkit.createLabel(connectorClient, "");
- toolkit.createLabel(connectorClient, "");
- }
- }
-
- private void createGettingStartedSection(Composite parent) {
- TableWrapLayout layout = new TableWrapLayout();
- layout.verticalSpacing = 0;
- layout.leftMargin = 0;
- layout.rightMargin = 0;
- layout.topMargin = 0;
- layout.bottomMargin = 0;
-
- Composite hyperlinkClient = toolkit.createComposite(parent);
- hyperlinkClient.setLayout(layout);
- hyperlinkClient.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
-
- Hyperlink gettingStartedLink = toolkit.createHyperlink(hyperlinkClient,
- "Also see the Getting Started documentation online", SWT.WRAP);
- gettingStartedLink.addHyperlinkListener(new IHyperlinkListener() {
- public void linkActivated(HyperlinkEvent e) {
- close();
- TasksUiUtil.openUrl("http://www.eclipse.org/mylyn/start/");
- }
-
- public void linkEntered(HyperlinkEvent e) {
- // ignore
- }
-
- public void linkExited(HyperlinkEvent e) {
- // ignore
- }
- });
- }
-
-}
diff --git a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java b/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
deleted file mode 100644
index a2b39b159..000000000
--- a/org.eclipse.mylyn.help.ui/src/org/eclipse/mylyn/internal/help/ui/dialogs/UiLegendDialog.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2007 Mylyn project 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.mylyn.internal.help.ui.dialogs;
-
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.dialogs.PopupDialog;
-import org.eclipse.mylyn.internal.provisional.commons.ui.CommonImages;
-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;
-import org.eclipse.ui.forms.widgets.ScrolledForm;
-import org.eclipse.ui.forms.widgets.TableWrapLayout;
-
-/**
- * @author Mik Kersten
- * @author Leo Dos Santos
- */
-public class UiLegendDialog extends PopupDialog {
-
- private FormToolkit toolkit;
-
- private ScrolledForm form;
-
- private UiLegendControl content;
-
- // TODO e3.4 move to new api
- @SuppressWarnings("deprecation")
- public UiLegendDialog(Shell parent) {
- super(parent, PopupDialog.INFOPOPUP_SHELLSTYLE | SWT.ON_TOP, false, false, false, false, null, null);
- }
-
- @Override
- protected Control createContents(Composite parent) {
- getShell().setBackground(getShell().getDisplay().getSystemColor(SWT.COLOR_DARK_GRAY));
- return createDialogArea(parent);
- }
-
- @Override
- public int open() {
- int open = super.open();
-// getShell().setLocation(getShell().getLocation().x, getShell().getLocation().y+20);
- getShell().setFocus();
- return open;
- }
-
- @Override
- public boolean close() {
- if (form != null && !form.isDisposed()) {
- form.dispose();
- }
-
- if (toolkit != null) {
- if (toolkit.getColors() != null) {
- toolkit.dispose();
- }
- }
-
- if (content != null && !content.isDisposed()) {
- content.dispose();
- }
-
- return super.close();
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- toolkit = new FormToolkit(parent.getDisplay());
- form = toolkit.createScrolledForm(parent);
- form.setText(UiLegendControl.TITLE);
- form.getToolBarManager().add(new CloseDialogAction());
- form.getToolBarManager().update(true);
- form.getBody().setLayout(new TableWrapLayout());
- toolkit.decorateFormHeading(form.getForm());
-
- content = new UiLegendControl(form.getBody(), toolkit);
- content.setWindow(this);
-
- return parent;
- }
-
- private class CloseDialogAction extends Action {
-
- private CloseDialogAction() {
- setImageDescriptor(CommonImages.NOTIFICATION_CLOSE);
- setText("Close Dialog");
- }
-
- @Override
- public void run() {
- close();
- }
-
- }
-}

Back to the top