Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2003-09-26 20:02:14 +0000
committerJean Michel-Lemieux2003-09-26 20:02:14 +0000
commite817e2268c0de520fe0b064fd143fccd90468954 (patch)
treea095ea54dd685bc95a5a0e4736f08f1f6ea9d0d1
parentce1f752e65bf5b82a22e394b6063d1cfaf2451b5 (diff)
downloadeclipse.platform.team-e817e2268c0de520fe0b064fd143fccd90468954.tar.gz
eclipse.platform.team-e817e2268c0de520fe0b064fd143fccd90468954.tar.xz
eclipse.platform.team-e817e2268c0de520fe0b064fd143fccd90468954.zip
Bug 42788: The class TeamImages is missing.
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java19
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java3
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java48
3 files changed, 60 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
index 39a5110c9..06f4b1da2 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/TeamUIPlugin.java
@@ -47,16 +47,19 @@ public class TeamUIPlugin extends AbstractUIPlugin implements IPropertyChangeLis
private static TeamUIPlugin instance;
+ // image paths
+ public static final String ICON_PATH = "icons/full/"; //$NON-NLS-1$
+
public static final String ID = "org.eclipse.team.ui"; //$NON-NLS-1$
public static final String PT_SUBSCRIBER_MENUS = "subscriberMenus"; //$NON-NLS-1$
- // plugin id
+ // plugin id
public static final String PLUGIN_ID = "org.eclipse.team.ui"; //$NON-NLS-1$
- // extension points
- public static final String PT_CONFIGURATION ="configurationWizards"; //$NON-NLS-1$
- public static final String PT_TARGETCONFIG ="targetConfigWizards"; //$NON-NLS-1$
- public static final String PT_DECORATORS = "decorators"; //$NON-NLS-1$
+ // extension points
+ public static final String PT_CONFIGURATION ="configurationWizards"; //$NON-NLS-1$
+ public static final String PT_TARGETCONFIG ="targetConfigWizards"; //$NON-NLS-1$
+ public static final String PT_DECORATORS = "decorators"; //$NON-NLS-1$
private static List propertyChangeListeners = new ArrayList(5);
@@ -250,7 +253,7 @@ public class TeamUIPlugin extends AbstractUIPlugin implements IPropertyChangeLis
protected static void createImageDescriptor(String id, URL baseURL) {
URL url = null;
try {
- url = new URL(baseURL, ISharedImages.ICON_PATH + id);
+ url = new URL(baseURL, ICON_PATH + id);
} catch (MalformedURLException e) {
}
ImageDescriptor desc = ImageDescriptor.createFromURL(url);
@@ -294,11 +297,13 @@ public class TeamUIPlugin extends AbstractUIPlugin implements IPropertyChangeLis
private void initializeImages() {
URL baseURL = TeamUIPlugin.getPlugin().getDescriptor().getInstallURL();
- // View decoration overlays
+ // Overlays
createImageDescriptor(ISharedImages.IMG_DIRTY_OVR, baseURL);
createImageDescriptor(ISharedImages.IMG_CONFLICT_OVR, baseURL);
createImageDescriptor(ISharedImages.IMG_CHECKEDIN_OVR, baseURL);
createImageDescriptor(ISharedImages.IMG_CHECKEDOUT_OVR, baseURL);
+
+
createImageDescriptor(ISharedImages.IMG_SYNC_VIEW, baseURL);
// Collapse all
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
index 097f7a723..440c7c0db 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/ISharedImages.java
@@ -17,9 +17,6 @@ package org.eclipse.team.ui;
* convenience.
*/
public interface ISharedImages {
- // image paths
- public final String ICON_PATH = "icons/full/"; //$NON-NLS-1$
-
public final String IMG_DIRTY_OVR = "ovr/dirty_ov.gif"; //$NON-NLS-1$
public final String IMG_CHECKEDIN_OVR = "ovr/version_controlled.gif"; //$NON-NLS-1$
public final String IMG_CHECKEDOUT_OVR = "ovr/checkedout_ov.gif"; //$NON-NLS-1$
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
new file mode 100644
index 000000000..5af378995
--- /dev/null
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/TeamImages.java
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.team.ui;
+
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.team.internal.ui.TeamUIPlugin;
+
+/**
+ * TeamImages provides convenience methods for accessing shared images
+ * provided by the org.eclipse.team.ui plug-in.
+ * <p>
+ * This class provides <code>Image</code> and <code>ImageDescriptor</code>s
+ * for each named image in the interface. All <code>Image</code> objects provided
+ * by this class are managed by this class and must never be disposed
+ * by other clients.
+ * </p>
+ */
+public class TeamImages {
+ /**
+ * Returns the image descriptor for the given image ID.
+ * Returns null if there is no such image.
+ *
+ * @param id the identifier for the image to retrieve
+ * @return the image associated with the given ID
+ */
+ public static ImageDescriptor getImageDescriptor(String id) {
+ return TeamUIPlugin.getImageDescriptor(id);
+ }
+ /**
+ * Convenience method to get an image descriptor for an extension
+ *
+ * @param extension the extension declaring the image
+ * @param subdirectoryAndFilename the path to the image
+ * @return the image
+ */
+ public static ImageDescriptor getImageDescriptorFromExtension(IExtension extension, String subdirectoryAndFilename) {
+ return TeamUIPlugin.getImageDescriptorFromExtension(extension, subdirectoryAndFilename);
+ }
+}

Back to the top