Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Raynaud2011-11-02 09:43:17 +0000
committerXavier Raynaud2011-11-02 09:43:17 +0000
commitda8315d5f3c216811bb1d00b85b44d28a7cee8e0 (patch)
treef9b9c9a4990686888a887d16f63cd385fdfcba4a
parent696c47932cb782824a3b78f326f4516a52501791 (diff)
parentffbb36970f943bcc20a381b8584665ca9e1a081f (diff)
downloadorg.eclipse.linuxtools-da8315d5f3c216811bb1d00b85b44d28a7cee8e0.tar.gz
org.eclipse.linuxtools-da8315d5f3c216811bb1d00b85b44d28a7cee8e0.tar.xz
org.eclipse.linuxtools-da8315d5f3c216811bb1d00b85b44d28a7cee8e0.zip
Merge branch 'master' of git://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml2
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog9
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java14
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindUIPlugin.java12
4 files changed, 35 insertions, 2 deletions
diff --git a/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml b/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml
index bbc311e29b..35e2db62fd 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml
+++ b/valgrind/org.eclipse.linuxtools.valgrind-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.linuxtools.valgrind"
label="%featureName"
- version="1.0.0.qualifier"
+ version="0.10.0.qualifier"
provider-name="%featureProvider"
os="linux,macosx">
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog b/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog
index 454593734a..1317da5726 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-31 Jeff Johnston <jjohnstn@redhat.com>
+
+ Bug #362125
+
+ * src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java (CoreMessagesViewer): Use an
+ ImageRegistry to store the Valgrind error icon.
+ (.getImage): Get error image from image registry.
+ * src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindUIPlugin.java (getImageDescriptor): New method.
+
2011-10-12 Jeff Johnston <jjohnstn@redhat.com>
Bug #360085
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
index 3bb18ff743..d05c463bd9 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/CoreMessagesViewer.java
@@ -26,6 +26,8 @@ import org.eclipse.jface.action.IAction;
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.resource.ImageRegistry;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
@@ -49,6 +51,11 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
public class CoreMessagesViewer {
+
+ static ImageRegistry imageRegistry = new ImageRegistry();
+
+ public static final String VALGRIND_ERROR = "Valgrind_Errore"; //$NON-NLS-1$
+ public static final String VALGRIND_ERROR_IMAGE = "icons/valgrind-error.gif"; //$NON-NLS-1$
public IDoubleClickListener doubleClickListener;
public ITreeContentProvider contentProvider;
public IAction expandAction;
@@ -59,6 +66,11 @@ public class CoreMessagesViewer {
public CoreMessagesViewer(Composite parent, int style) {
viewer = new TreeViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | style);
viewer.getControl().setLayoutData(new GridData(GridData.FILL_BOTH));
+ if (imageRegistry.getDescriptor(VALGRIND_ERROR) == null) {
+ ImageDescriptor d = ValgrindUIPlugin.getImageDescriptor(VALGRIND_ERROR_IMAGE);
+ if (d != null)
+ imageRegistry.put(VALGRIND_ERROR, d);
+ }
contentProvider = new ITreeContentProvider() {
public Object[] getChildren(Object parentElement) {
@@ -101,7 +113,7 @@ public class CoreMessagesViewer {
image = DebugUITools.getImage(IDebugUIConstants.IMG_OBJS_STACKFRAME);
}
else if (element instanceof ValgrindError) {
- image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK);
+ image = imageRegistry.get(VALGRIND_ERROR);
}
else {
image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_INFO_TSK);
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindUIPlugin.java b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindUIPlugin.java
index 8786fb81d3..d3d9ce9015 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindUIPlugin.java
+++ b/valgrind/org.eclipse.linuxtools.valgrind.ui/src/org/eclipse/linuxtools/internal/valgrind/ui/ValgrindUIPlugin.java
@@ -18,6 +18,7 @@ import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.linuxtools.internal.valgrind.core.PluginConstants;
import org.eclipse.linuxtools.valgrind.ui.IValgrindToolView;
import org.eclipse.linuxtools.valgrind.ui.ValgrindUIConstants;
@@ -182,6 +183,17 @@ public class ValgrindUIPlugin extends AbstractUIPlugin {
}
}
+ /**
+ * Returns an image descriptor for the image file at the given
+ * plug-in relative path.
+ *
+ * @param path the path
+ * @return the image descriptor
+ */
+ public static ImageDescriptor getImageDescriptor(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
protected HashMap<String, IConfigurationElement> getToolMap() {
if (toolMap == null) {
initializeToolMap();

Back to the top