Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawel Piech2010-05-04 12:47:31 -0400
committerPawel Piech2010-05-04 12:47:31 -0400
commitdd03e0de6e6dcc7e32223803868a14419f83fbc4 (patch)
treeb58da433f8851f28030a28d77da41e0002165cbb
parent8bbfb23b00b68a2744c8ee052ca2f6c6d5f9a031 (diff)
downloadeclipse.platform.debug-dd03e0de6e6dcc7e32223803868a14419f83fbc4.tar.gz
eclipse.platform.debug-dd03e0de6e6dcc7e32223803868a14419f83fbc4.tar.xz
eclipse.platform.debug-dd03e0de6e6dcc7e32223803868a14419f83fbc4.zip
Bug 310497 - [flex-hierarchy] IProcess object needs a default content provider
-rw-r--r--org.eclipse.debug.ui/plugin.xml3
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java47
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java5
3 files changed, 55 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/plugin.xml b/org.eclipse.debug.ui/plugin.xml
index 82fa6cab3..8cac651f4 100644
--- a/org.eclipse.debug.ui/plugin.xml
+++ b/org.eclipse.debug.ui/plugin.xml
@@ -2345,6 +2345,9 @@ M4 = Platform-specific fourth key
adaptableType="org.eclipse.debug.core.model.IProcess"
class="org.eclipse.debug.internal.ui.views.launch.DebugElementAdapterFactory">
<adapter
+ type="org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider">
+ </adapter>
+ <adapter
type="org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory">
</adapter>
<adapter
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
new file mode 100644
index 000000000..7b25c8dfd
--- /dev/null
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/ProcessContentProvider.java
@@ -0,0 +1,47 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Wind River Systems 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:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.ui.model.elements;
+
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate;
+import org.eclipse.debug.ui.IDebugUIConstants;
+
+/**
+ * Default content provider for process objects. Even though process objects
+ * have no children by default, they still need a content provider to ensure
+ * proper display (see bug
+ *
+ * @since 3.6
+ */
+public class ProcessContentProvider extends ElementContentProvider {
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildren(java.lang.Object, int, int, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+ */
+ protected Object[] getChildren(Object parent, int index, int length, IPresentationContext context, IViewerUpdate monitor) {
+ return EMPTY;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#getChildCount(java.lang.Object, org.eclipse.debug.internal.ui.viewers.model.provisional.IPresentationContext, org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerUpdate)
+ */
+ protected int getChildCount(Object element, IPresentationContext context, IViewerUpdate monitor) {
+ return 0;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.model.elements.ElementContentProvider#supportsContextId(java.lang.String)
+ */
+ protected boolean supportsContextId(String id) {
+ return IDebugUIConstants.ID_DEBUG_VIEW.equals(id);
+ }
+
+}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
index 3c13a0a41..1754e348e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/launch/DebugElementAdapterFactory.java
@@ -60,6 +60,7 @@ import org.eclipse.debug.internal.ui.model.elements.MemoryBlockContentProvider;
import org.eclipse.debug.internal.ui.model.elements.MemoryBlockLabelProvider;
import org.eclipse.debug.internal.ui.model.elements.MemoryRetrievalContentProvider;
import org.eclipse.debug.internal.ui.model.elements.MemoryViewElementMementoProvider;
+import org.eclipse.debug.internal.ui.model.elements.ProcessContentProvider;
import org.eclipse.debug.internal.ui.model.elements.RegisterGroupContentProvider;
import org.eclipse.debug.internal.ui.model.elements.RegisterGroupLabelProvider;
import org.eclipse.debug.internal.ui.model.elements.RegisterGroupMementoProvider;
@@ -114,6 +115,7 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
private static IElementContentProvider fgCPLaunchManger = new LaunchManagerContentProvider();
private static IElementContentProvider fgCPLaunch = new LaunchContentProvider();
+ private static IElementContentProvider fgCPProcess = new ProcessContentProvider();
private static IElementContentProvider fgCPTarget = new DebugTargetContentProvider();
private static IElementContentProvider fgCPThread = new ThreadContentProvider();
private static IElementContentProvider fgCPFrame = new StackFrameContentProvider();
@@ -165,6 +167,9 @@ public class DebugElementAdapterFactory implements IAdapterFactory {
if (adaptableObject instanceof ILaunch) {
return fgCPLaunch;
}
+ if (adaptableObject instanceof IProcess) {
+ return fgCPProcess;
+ }
if (adaptableObject instanceof IDebugTarget) {
return fgCPTarget;
}

Back to the top