(1);
+ possibleIDs.add(DETAIL_PANE_ID);
+ return possibleIDs;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.ui.IDetailPaneFactory#getDefaultDetailPane(java.util.Set, org.eclipse.jface.viewers.IStructuredSelection)
+ */
+ public String getDefaultDetailPane(IStructuredSelection selection) {
+ return DETAIL_PANE_ID;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getName(java.lang.String)
+ */
+ public String getDetailPaneName(String id) {
+ if (id.equals(DETAIL_PANE_ID)){
+ return DETAIL_PANE_NAME;
+ }
+ return null;
+ }
+
+
+ /* (non-Javadoc)
+ * @see org.eclipse.debug.internal.ui.views.variables.IDetailsFactory#getDescription(java.lang.String)
+ */
+ public String getDetailPaneDescription(String id) {
+ if (id.equals(DETAIL_PANE_ID)){
+ return DETAIL_PANE_DESC;
+ }
+ return null;
+ }
+
+}
diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/Messages.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/Messages.java
new file mode 100644
index 00000000000..5d278c057f6
--- /dev/null
+++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/Messages.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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:
+ * Randy Rohrbach (Wind River Systems, Inc.) - initial implementation
+ *******************************************************************************/
+package org.eclipse.dd.dsf.debug.ui.viewmodel.detailpanesupport;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.dd.dsf.debug.ui.viewmodel.detailpanesupport.messages"; //$NON-NLS-1$
+
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
+ .getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+}
diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/TextViewerAction.java b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/TextViewerAction.java
new file mode 100644
index 00000000000..7cd6bafbc15
--- /dev/null
+++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/TextViewerAction.java
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * Copyright (c) 2006, 2007 IBM Corporation 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:
+ * IBM Corporation - initial API and implementation
+ * Randy Rohrbach (Wind River Systems, Inc.) - extended implementation
+ *******************************************************************************/
+package org.eclipse.dd.dsf.debug.ui.viewmodel.detailpanesupport;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.text.ITextOperationTarget;
+import org.eclipse.jface.text.ITextViewer;
+import org.eclipse.ui.texteditor.IUpdate;
+
+/**
+ * Common function for actions that operate on a text viewer.
+ *
+ * Clients may subclass this class.
+ *
+ * @since 3.0
+ */
+public class TextViewerAction extends Action implements IUpdate {
+
+ private int fOperationCode= -1;
+ private ITextOperationTarget fOperationTarget;
+
+ /**
+ * Constructs a new action in the given text viewer with
+ * the specified operation code.
+ *
+ * @param viewer
+ * @param operationCode
+ */
+ public TextViewerAction(ITextViewer viewer, int operationCode) {
+ fOperationCode= operationCode;
+ fOperationTarget= viewer.getTextOperationTarget();
+ update();
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.texteditor.IUpdate#update()
+ *
+ * Updates the enabled state of the action.
+ * Fires a property change if the enabled state changes.
+ *
+ * @see org.eclipse.jface.action.Action#firePropertyChange(String, Object, Object)
+ */
+ public void update() {
+
+ boolean wasEnabled= isEnabled();
+ boolean isEnabled= (fOperationTarget != null && fOperationTarget.canDoOperation(fOperationCode));
+ setEnabled(isEnabled);
+
+ if (wasEnabled != isEnabled) {
+ firePropertyChange(ENABLED, wasEnabled ? Boolean.TRUE : Boolean.FALSE, isEnabled ? Boolean.TRUE : Boolean.FALSE);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.jface.action.IAction#run()
+ */
+ @Override
+ public void run() {
+ if (fOperationCode != -1 && fOperationTarget != null) {
+ fOperationTarget.doOperation(fOperationCode);
+ }
+ }
+
+ /**
+ * Configures this action with a label, tool tip, and description.
+ *
+ * @param text action label
+ * @param toolTipText action tool tip
+ * @param description action description
+ */
+ public void configureAction(String text, String toolTipText, String description) {
+ setText(text);
+ setToolTipText(toolTipText);
+ setDescription(description);
+ }
+}
+
diff --git a/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/messages.properties b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/messages.properties
new file mode 100644
index 00000000000..5d99640c01d
--- /dev/null
+++ b/plugins/org.eclipse.dd.dsf.debug.ui/src/org/eclipse/dd/dsf/debug/ui/viewmodel/detailpanesupport/messages.properties
@@ -0,0 +1,3 @@
+DetailPaneFactory.0=DSF Default Detail Pane
+DetailPaneFactory.1=DSF Default Viewer
+DetailPaneFactory.2=This is the default detail pane representation for DSF assisted views