Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkersten2006-09-08 21:37:05 +0000
committermkersten2006-09-08 21:37:05 +0000
commite124b8afd82d8a16153c739dbfceab8719ffdc2d (patch)
treee628a9548cb04d24f4c21e295a41ee702207afdb
parentb55db9b558278799cab9415cf94df619f9b04134 (diff)
downloadorg.eclipse.mylyn.tasks-e124b8afd82d8a16153c739dbfceab8719ffdc2d.tar.gz
org.eclipse.mylyn.tasks-e124b8afd82d8a16153c739dbfceab8719ffdc2d.tar.xz
org.eclipse.mylyn.tasks-e124b8afd82d8a16153c739dbfceab8719ffdc2d.zip
Completed: 156752: When adding a new task, repositories do not show in select repository dialog
https://bugs.eclipse.org/bugs/show_bug.cgi?id=156752
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gifbin61 -> 277 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.xml3
-rw-r--r--org.eclipse.mylyn.help.ui/doc/new.html2
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gifbin0 -> 325 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gifbin325 -> 328 bytes
-rw-r--r--org.eclipse.mylyn.tasks.ui/plugin.xml9
-rw-r--r--org.eclipse.mylyn.tasks.ui/schema/repositories.exsd10
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/RepositoryTaskDecorator.java8
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/util/TasksUiExtensionReader.java11
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TableDecoratingLabelProvider.java1
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesTableLabelProvider.java73
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java19
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoryLabelProvider.java88
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java7
-rw-r--r--org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java11
-rw-r--r--org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gifbin0 -> 277 bytes
-rw-r--r--org.eclipse.mylyn.trac.ui/plugin.xml5
17 files changed, 195 insertions, 52 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif
index a20e6db8c..6d61e73ce 100644
--- a/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif
+++ b/org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gif
Binary files differ
diff --git a/org.eclipse.mylyn.bugzilla.ui/plugin.xml b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
index d73c7a125..97b9a8136 100644
--- a/org.eclipse.mylyn.bugzilla.ui/plugin.xml
+++ b/org.eclipse.mylyn.bugzilla.ui/plugin.xml
@@ -36,7 +36,8 @@
<connectorUi
brandingIcon="icons/eview16/bugzilla-logo.gif"
class="org.eclipse.mylar.internal.bugzilla.ui.tasklist.BugzillaRepositoryUi"
- name="Bugzilla Repository Ui"/>
+ name="Bugzilla Repository Ui"
+ overlayIcon="icons/eview16/overlay-bugzilla.gif"/>
<externalizer
class="org.eclipse.mylar.internal.bugzilla.ui.tasklist.BugzillaTaskExternalizer"
diff --git a/org.eclipse.mylyn.help.ui/doc/new.html b/org.eclipse.mylyn.help.ui/doc/new.html
index 261d4f854..d939000b3 100644
--- a/org.eclipse.mylyn.help.ui/doc/new.html
+++ b/org.eclipse.mylyn.help.ui/doc/new.html
@@ -62,6 +62,8 @@
<ul>
<li>auto detect Bugzilla version</li>
<li>activate on single click [include?]</li>
+ <li>all new comments automatically expanded</li>
+ <li>Task Repositories view improvements</li>
</ul>
<h2>Tasks</h2>
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif
new file mode 100644
index 000000000..ae982990d
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/repository-middle.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif b/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif
index ae982990d..81a3e0340 100644
--- a/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif
+++ b/org.eclipse.mylyn.tasks.ui/icons/eview16/repository.gif
Binary files differ
diff --git a/org.eclipse.mylyn.tasks.ui/plugin.xml b/org.eclipse.mylyn.tasks.ui/plugin.xml
index 75dc2d29d..09c2e51a0 100644
--- a/org.eclipse.mylyn.tasks.ui/plugin.xml
+++ b/org.eclipse.mylyn.tasks.ui/plugin.xml
@@ -117,7 +117,14 @@
Mylar Repository Task Decorator
</description>
<enablement>
- <objectClass name="org.eclipse.mylar.tasks.core.ITaskListElement"/>
+ <or>
+ <objectClass
+ name="org.eclipse.mylar.tasks.core.ITaskListElement">
+ </objectClass>
+ <objectClass
+ name="org.eclipse.mylar.tasks.core.TaskRepository">
+ </objectClass>
+ </or>
</enablement>
</decorator>
</extension>
diff --git a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd b/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
index e587b288e..3ddcfa6bb 100644
--- a/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
+++ b/org.eclipse.mylyn.tasks.ui/schema/repositories.exsd
@@ -171,6 +171,16 @@
</documentation>
</annotation>
</attribute>
+ <attribute name="overlayIcon" type="string">
+ <annotation>
+ <documentation>
+ (no description available)
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="resource"/>
+ </appInfo>
+ </annotation>
+ </attribute>
</complexType>
</element>
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 fc8248cbf..2e87f973c 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
@@ -14,6 +14,7 @@ package org.eclipse.mylar.internal.tasks.ui;
import java.net.MalformedURLException;
import java.net.URL;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IDecoration;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ILightweightLabelDecorator;
@@ -70,7 +71,12 @@ public class RepositoryTaskDecorator implements ILightweightLabelDecorator {
if (url != null && !url.trim().equals("") && !url.equals("http://")) {
decoration.addOverlay(TaskListImages.OVERLAY_WEB, IDecoration.BOTTOM_LEFT);
}
- }
+ } else if (element instanceof TaskRepository) {
+ ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(((TaskRepository)element).getKind());
+ if (overlay != null) {
+ decoration.addOverlay(overlay, IDecoration.BOTTOM_RIGHT);
+ }
+ }
}
public void addListener(ILabelProviderListener listener) {
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 8343747ce..8d3e20f02 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
@@ -73,6 +73,8 @@ public class TasksUiExtensionReader {
public static final String ATTR_BRANDING_ICON = "brandingIcon";
+ public static final String ATTR_OVERLAY_ICON = "overlayIcon";
+
public static final String ELMNT_TYPE = "type";
public static final String ELMNT_QUERY_PAGE = "queryPage";
@@ -216,6 +218,15 @@ public class TasksUiExtensionReader {
TaskListImages.getImage(descriptor));
}
}
+ String overlayIconPath = element.getAttribute(ATTR_OVERLAY_ICON);
+ if (overlayIconPath != null) {
+ ImageDescriptor descriptor = AbstractUIPlugin.imageDescriptorFromPlugin(element.getContributor()
+ .getName(), overlayIconPath);
+ if (descriptor != null) {
+ TasksUiPlugin.getDefault().addOverlayIcon(((AbstractRepositoryConnectorUi)connectorUi).getRepositoryType(),
+ descriptor);
+ }
+ }
} else {
MylarStatusHandler.log("could not not load connector ui: " + connectorUi, null);
}
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 898143774..83164eb6c 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
@@ -65,7 +65,6 @@ public class TableDecoratingLabelProvider extends DecoratingLabelProvider implem
}
public String getColumnText(Object element, int columnIndex) {
- // ignore
return null;
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesTableLabelProvider.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesTableLabelProvider.java
new file mode 100644
index 000000000..9e9595696
--- /dev/null
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesTableLabelProvider.java
@@ -0,0 +1,73 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+/*
+ * Created on Feb 18, 2005
+ */
+package org.eclipse.mylar.internal.tasks.ui.views;
+
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
+import org.eclipse.jface.viewers.ILabelDecorator;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
+import org.eclipse.mylar.tasks.core.TaskRepository;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * @author Mik Kersten
+ */
+public class TaskRepositoriesTableLabelProvider extends DecoratingLabelProvider implements ITableLabelProvider {
+
+ public TaskRepositoriesTableLabelProvider(ILabelProvider provider, ILabelDecorator decorator) {
+ super(provider, decorator);
+ }
+
+ public String getColumnText(Object object, int index) {
+ switch (index) {
+ case 0:
+ return null;
+ case 1:
+ if (object instanceof TaskRepository) {
+ TaskRepository repository = (TaskRepository) object;
+ if (repository.getRepositoryLabel() != null && repository.getRepositoryLabel().length() > 0) {
+ return repository.getRepositoryLabel();
+ } else {
+ return null;
+ }
+// else {
+// return repository.getUrl();
+// }
+ } else if (object instanceof AbstractRepositoryConnector) {
+ return ((AbstractRepositoryConnector) object).getLabel();
+ } else {
+ return getText(object);
+ }
+ case 2:
+ if (object instanceof TaskRepository) {
+ TaskRepository repository = (TaskRepository) object;
+ return repository.getUrl();
+ } else if (object instanceof AbstractRepositoryConnector) {
+ return ((AbstractRepositoryConnector) object).getLabel();
+ } else {
+ return getText(object);
+ }
+ }
+ return null;
+ }
+
+ public Image getColumnImage(Object element, int columnIndex) {
+ if (columnIndex == 0) {
+ return super.getImage(element);
+ } else {
+ return null;
+ }
+ }
+}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
index 969a76908..405678fb4 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskRepositoriesView.java
@@ -16,6 +16,8 @@ import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
@@ -104,7 +106,14 @@ public class TaskRepositoriesView extends ViewPart {
public void createPartControl(Composite parent) {
viewer = new TableViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION);
viewer.setContentProvider(new ViewContentProvider());
- viewer.setLabelProvider(new TaskRepositoryLabelProvider());
+
+// taskListTableLabelProvider = new TaskListTableLabelProvider(new TaskElementLabelProvider(), PlatformUI
+// .getWorkbench().getDecoratorManager().getLabelDecorator(), categoryBackground, this);
+
+ viewer.setLabelProvider(new TaskRepositoriesTableLabelProvider(
+ new TaskRepositoryLabelProvider(),
+ PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
+
viewer.getTable().setHeaderVisible(true);
TableColumn column = new TableColumn(viewer.getTable(), SWT.LEFT);
@@ -112,7 +121,7 @@ public class TaskRepositoriesView extends ViewPart {
column.setWidth(25);
column = new TableColumn(viewer.getTable(), SWT.LEFT);
column.setText("Label");
- column.setWidth(250);
+ column.setWidth(130);
column = new TableColumn(viewer.getTable(), SWT.LEFT);
column.setText("URL");
column.setWidth(250);
@@ -131,7 +140,13 @@ public class TaskRepositoriesView extends ViewPart {
}
});
viewer.setInput(getViewSite());
+ viewer.addDoubleClickListener(new IDoubleClickListener() {
+ public void doubleClick(DoubleClickEvent event) {
+ repositoryPropertiesAction.run();
+ }
+ });
+
hookContextMenu();
contributeToActionBars();
getSite().setSelectionProvider(getViewer());
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 b9d7aa114..f8106359e 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
@@ -11,8 +11,8 @@
package org.eclipse.mylar.internal.tasks.ui.views;
-import org.eclipse.jface.viewers.ITableLabelProvider;
-import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.mylar.internal.tasks.ui.TaskListImages;
import org.eclipse.mylar.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylar.tasks.core.TaskRepository;
@@ -22,39 +22,9 @@ import org.eclipse.swt.graphics.Image;
/**
* @author Mik Kersten
*/
-public class TaskRepositoryLabelProvider extends LabelProvider implements ITableLabelProvider {
+public class TaskRepositoryLabelProvider implements ILabelProvider {
- public String getColumnText(Object object, int index) {
- switch(index) {
- case 0:
- return null;
- case 1:
- if (object instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) object;
- if (repository.getRepositoryLabel() != null && repository.getRepositoryLabel().length() > 0) {
- return repository.getRepositoryLabel();
- } else {
- return repository.getUrl();
- }
- } else if (object instanceof AbstractRepositoryConnector) {
- return ((AbstractRepositoryConnector) object).getLabel();
- } else {
- return getText(object);
- }
- case 2:
- if (object instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) object;
- return repository.getUrl();
- } else if (object instanceof AbstractRepositoryConnector) {
- return ((AbstractRepositoryConnector) object).getLabel();
- } else {
- return getText(object);
- }
- }
-
- return null;
-
- }
+//extends LabelProvider implements ITableLabelProvider {
public Image getColumnImage(Object obj, int index) {
if(index == 0) {
@@ -65,20 +35,52 @@ public class TaskRepositoryLabelProvider extends LabelProvider implements ITable
}
public Image getImage(Object object) {
- String kind = null;
if (object instanceof AbstractRepositoryConnector) {
AbstractRepositoryConnector repositoryConnector = (AbstractRepositoryConnector) object;
- kind = repositoryConnector.getRepositoryType();
- } else if (object instanceof TaskRepository) {
- TaskRepository repository = (TaskRepository) object;
- kind = repository.getKind();
- }
- if (kind != null) {
- Image image = TasksUiPlugin.getDefault().getBrandingIcon(kind);
+ Image image = TasksUiPlugin.getDefault().getBrandingIcon(repositoryConnector.getRepositoryType());
if (image != null) {
return image;
+ } else {
+ return TaskListImages.getImage(TaskListImages.REPOSITORY);
}
+ } else if (object instanceof TaskRepository) {
+ return TaskListImages.getImage(TaskListImages.REPOSITORY);
}
- return TaskListImages.getImage(TaskListImages.REPOSITORY);
+ return null;
+ }
+
+ public String getText(Object object) {
+ if (object instanceof TaskRepository) {
+ TaskRepository repository = (TaskRepository) object;
+ if (repository.getRepositoryLabel() != null && repository.getRepositoryLabel().length() > 0) {
+ return repository.getRepositoryLabel();
+ } else {
+ return repository.getUrl();
+ }
+ } else if (object instanceof AbstractRepositoryConnector) {
+ return ((AbstractRepositoryConnector) object).getLabel();
+ } else {
+ return getText(object);
+ }
+ }
+
+ public void addListener(ILabelProviderListener listener) {
+ // ignore
+
+ }
+
+ public void dispose() {
+ // ignore
+
+ }
+
+ public boolean isLabelProperty(Object element, String property) {
+ // ignore
+ return false;
+ }
+
+ public void removeListener(ILabelProviderListener listener) {
+ // ignore
+
}
}
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
index 885a79c23..e7386b41c 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/SelectRepositoryPage.java
@@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Set;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
@@ -47,6 +48,7 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
+import org.eclipse.ui.PlatformUI;
/**
* @author Mik Kersten
@@ -153,7 +155,10 @@ public abstract class SelectRepositoryPage extends WizardSelectionPage {
protected Table createTableViewer(Composite container) {
viewer = new TableViewer(container, SWT.SINGLE | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
viewer.setContentProvider(new RepositoryContentProvider());
- viewer.setLabelProvider(new TaskRepositoryLabelProvider());
+// viewer.setLabelProvider(new TaskRepositoryLabelProvider());
+ viewer.setLabelProvider(new DecoratingLabelProvider(
+ new TaskRepositoryLabelProvider(),
+ PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
viewer.setInput(TasksUiPlugin.getRepositoryManager().getRepositoryConnectors());
viewer.addSelectionChangedListener(new ISelectionChangedListener() {
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java
index 6f1a680d7..7c064ce80 100644
--- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java
+++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiPlugin.java
@@ -29,6 +29,7 @@ import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Preferences.IPropertyChangeListener;
import org.eclipse.core.runtime.Preferences.PropertyChangeEvent;
import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.hyperlink.IHyperlinkDetector;
import org.eclipse.mylar.context.core.ContextCorePlugin;
import org.eclipse.mylar.context.core.MylarStatusHandler;
@@ -141,6 +142,8 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup {
private Map<String, Image> brandingIcons = new HashMap<String, Image>();
+ private Map<String, ImageDescriptor> overlayIcons = new HashMap<String, ImageDescriptor>();
+
public enum TaskListSaveMode {
ONE_HOUR, THREE_HOURS, DAY;
@Override
@@ -674,6 +677,14 @@ public class TasksUiPlugin extends AbstractUIPlugin implements IStartup {
return brandingIcons.get(repositoryType);
}
+ public void addOverlayIcon(String repositoryType, ImageDescriptor icon) {
+ overlayIcons.put(repositoryType, icon);
+ }
+
+ public ImageDescriptor getOverlayIcon(String repositoryType) {
+ return overlayIcons.get(repositoryType);
+ }
+
public boolean isInitialized() {
return initialized;
}
diff --git a/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif b/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif
new file mode 100644
index 000000000..41ed156ca
--- /dev/null
+++ b/org.eclipse.mylyn.trac.ui/icons/eview16/overlay-trac.gif
Binary files differ
diff --git a/org.eclipse.mylyn.trac.ui/plugin.xml b/org.eclipse.mylyn.trac.ui/plugin.xml
index 0a9c5bfb4..fbbda527a 100644
--- a/org.eclipse.mylyn.trac.ui/plugin.xml
+++ b/org.eclipse.mylyn.trac.ui/plugin.xml
@@ -8,12 +8,13 @@
<connectorCore
class="org.eclipse.mylar.internal.trac.core.TracRepositoryConnector"
id="org.eclipse.mylar.trac.tasklist.repositories"
- name="Trac Headless Client"
+ name="Trac Repository Connector"
type="trac"/>
<connectorUi
brandingIcon="icons/eview16/trac-icon.gif"
class="org.eclipse.mylar.internal.trac.ui.TracRepositoryUi"
- id="Trac UI Client"/>
+ id="Trac Repository UI"
+ overlayIcon="icons/eview16/overlay-trac.gif"/>
<externalizer
class="org.eclipse.mylar.internal.trac.ui.TracTaskExternalizer"
id="org.eclipse.mylar.trac.tasklist.externalizer"

Back to the top