Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'proctools/plugins/org.eclipse.sequoyah.device.linuxtools/src/org/eclipse/sequoyah/device/linuxtools/tools/memorymap/MemoryMapVViewLabelProvider.java')
-rw-r--r--proctools/plugins/org.eclipse.sequoyah.device.linuxtools/src/org/eclipse/sequoyah/device/linuxtools/tools/memorymap/MemoryMapVViewLabelProvider.java59
1 files changed, 59 insertions, 0 deletions
diff --git a/proctools/plugins/org.eclipse.sequoyah.device.linuxtools/src/org/eclipse/sequoyah/device/linuxtools/tools/memorymap/MemoryMapVViewLabelProvider.java b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools/src/org/eclipse/sequoyah/device/linuxtools/tools/memorymap/MemoryMapVViewLabelProvider.java
new file mode 100644
index 0000000000..66c0a17496
--- /dev/null
+++ b/proctools/plugins/org.eclipse.sequoyah.device.linuxtools/src/org/eclipse/sequoyah/device/linuxtools/tools/memorymap/MemoryMapVViewLabelProvider.java
@@ -0,0 +1,59 @@
+/********************************************************************************
+ * Copyright (c) 2008 Motorola Inc. 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
+ *
+ * Initial Contributor:
+ * Otavio Ferranti (Motorola)
+ *
+ * Contributors:
+ * {Name} (company) - description of contribution.
+ ********************************************************************************/
+
+package org.eclipse.sequoyah.device.linuxtools.tools.memorymap;
+
+import org.eclipse.jface.viewers.ITableLabelProvider;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * @author Otavio Ferranti
+ */
+public class MemoryMapVViewLabelProvider extends LabelProvider implements
+ ITableLabelProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int)
+ */
+ public Image getColumnImage(Object obj, int index) {
+ //TODO: Enhance this.
+ if (index == 2) {
+ return getImage(((Object[]) obj)[index]);
+ } else {
+ return null;
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int)
+ */
+ public String getColumnText(Object obj, int index) {
+ if (obj instanceof String[]) {
+ return getText(((Object[]) obj)[index]);
+ } else {
+ return new String(""); //$NON-NLS-1$
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+ */
+ public Image getImage(Object obj) {
+ return PlatformUI.getWorkbench().
+ getSharedImages().getImage(ISharedImages.IMG_OBJ_ELEMENT);
+ }
+}
+

Back to the top