diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
index 6e22149fba3..27171317f2d 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbAdapterFactory.java
@@ -72,6 +72,7 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.IColumnPresentati
import org.eclipse.debug.internal.ui.viewers.model.provisional.IElementContentProvider;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelProxyFactory;
import org.eclipse.debug.internal.ui.viewers.model.provisional.IModelSelectionPolicyFactory;
+import org.eclipse.debug.internal.ui.viewers.model.provisional.IViewerInputProvider;
import org.eclipse.debug.ui.contexts.ISuspendTrigger;
import org.eclipse.debug.ui.sourcelookup.ISourceDisplay;
@@ -123,7 +124,8 @@ public class GdbAdapterFactory
session.registerModelAdapter(SteppingController.class, fSteppingController);
fViewModelAdapter = new GdbViewModelAdapter(session, fSteppingController);
-
+ session.registerModelAdapter(IViewerInputProvider.class, fViewModelAdapter);
+
if (launch.getSourceLocator() instanceof ISourceLookupDirector) {
fSourceDisplayAdapter = new DsfSourceDisplayAdapter(session, (ISourceLookupDirector)launch.getSourceLocator(), fSteppingController);
} else {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbDebugTextHover.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbDebugTextHover.java
index 7f4d1caf1ac..88120cef29c 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbDebugTextHover.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/GdbDebugTextHover.java
@@ -12,8 +12,10 @@
package org.eclipse.cdt.dsf.gdb.internal.ui;
import org.eclipse.cdt.dsf.debug.ui.AbstractDsfDebugTextHover;
+import org.eclipse.cdt.dsf.gdb.IGdbDebugPreferenceConstants;
import org.eclipse.cdt.dsf.gdb.launching.GdbLaunchDelegate;
import org.eclipse.cdt.dsf.mi.service.MIExpressions;
+import org.eclipse.core.runtime.Platform;
/**
* Debug editor text hover for GDB.
@@ -31,4 +33,14 @@ public class GdbDebugTextHover extends AbstractDsfDebugTextHover {
protected String getHoverFormat() {
return MIExpressions.DETAILS_FORMAT;
}
+
+ @Override
+ protected boolean useExpressionExplorer() {
+ if (Platform.getPreferencesService().getBoolean(GdbUIPlugin.PLUGIN_ID,
+ IGdbDebugPreferenceConstants.PREF_USE_INSPECTOR_HOVER,
+ true, null)) {
+ return true;
+ }
+ return false;
+ }
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbDebugPreferencePage.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbDebugPreferencePage.java
index 8815912e79d..8770c09eb4c 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbDebugPreferencePage.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbDebugPreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Ericsson and others.
+ * Copyright (c) 2009, 2010 Ericsson 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
@@ -84,6 +84,22 @@ public class GdbDebugPreferencePage extends FieldEditorPreferencePage implements
// need to set layout again
group.setLayout(groupLayout);
+ group= new Group(parent, SWT.NONE);
+ group.setText(MessagesForPreferences.GdbDebugPreferencePage_hover_label);
+ groupLayout= new GridLayout(3, false);
+ group.setLayout(groupLayout);
+ group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ boolField= new BooleanFieldEditor(
+ IGdbDebugPreferenceConstants.PREF_USE_INSPECTOR_HOVER,
+ MessagesForPreferences.GdbDebugPreferencePage_useInspectorHover_label,
+ group);
+
+ boolField.fillIntoGrid(group, 3);
+ addField(boolField);
+ // need to set layout again
+ group.setLayout(groupLayout);
+
}
@Override
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbPreferenceInitializer.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbPreferenceInitializer.java
index 547b15559bd..ed11c079108 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbPreferenceInitializer.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/GdbPreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Ericsson and others.
+ * Copyright (c) 2009, 2010 Ericsson 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
@@ -24,5 +24,6 @@ public class GdbPreferenceInitializer extends AbstractPreferenceInitializer {
IPreferenceStore store = GdbUIPlugin.getDefault().getPreferenceStore();
store.setDefault(IGdbDebugPreferenceConstants.PREF_TRACES_ENABLE, true);
store.setDefault(IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB, true);
+ store.setDefault(IGdbDebugPreferenceConstants.PREF_USE_INSPECTOR_HOVER, true);
}
}
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/MessagesForPreferences.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/MessagesForPreferences.java
index 3c3c564f366..1997d92002a 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/MessagesForPreferences.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/MessagesForPreferences.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Ericsson and others.
+ * Copyright (c) 2009, 2010 Ericsson 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
@@ -23,6 +23,8 @@ class MessagesForPreferences extends NLS {
public static String GdbDebugPreferencePage_enableTraces_label;
public static String GdbDebugPreferencePage_termination_label;
public static String GdbDebugPreferencePage_autoTerminateGdb_label;
+ public static String GdbDebugPreferencePage_hover_label;
+ public static String GdbDebugPreferencePage_useInspectorHover_label;
static {
// initialize resource bundle
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/messages.properties b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/messages.properties
index 92220f7061d..e9fad5d4907 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/messages.properties
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/preferences/messages.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2009 Ericsson and others.
+# Copyright (c) 2009, 2010 Ericsson 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
@@ -16,3 +16,6 @@ GdbDebugPreferencePage_enableTraces_label=Enable GDB traces
GdbDebugPreferencePage_termination_label=Termination
GdbDebugPreferencePage_autoTerminateGdb_label=Terminate GDB when last process exits
+
+GdbDebugPreferencePage_hover_label=Debug Text Hover
+GdbDebugPreferencePage_useInspectorHover_label=Use Inspector Debug Hover
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java
index ecc15985b5b..6b7532d33cc 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/src/org/eclipse/cdt/dsf/gdb/internal/ui/viewmodel/GdbViewModelAdapter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2008 Wind River Systems and others.
+ * Copyright (c) 2006, 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
@@ -11,8 +11,10 @@
package org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel;
import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
+import org.eclipse.cdt.dsf.debug.ui.IDsfDebugUIConstants;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.AbstractDebugVMAdapter;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.SteppingController;
+import org.eclipse.cdt.dsf.debug.ui.viewmodel.expression.ExpressionVMProvider;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.modules.ModulesVMProvider;
import org.eclipse.cdt.dsf.debug.ui.viewmodel.register.RegisterVMProvider;
import org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.breakpoints.GdbBreakpointVMProvider;
@@ -50,6 +52,8 @@ public class GdbViewModelAdapter extends AbstractDebugVMAdapter
return new RegisterVMProvider(this, context, getSession());
} else if (IDebugUIConstants.ID_EXPRESSION_VIEW.equals(context.getId()) ) {
return new GdbExpressionVMProvider(this, context, getSession());
+ } else if (IDsfDebugUIConstants.ID_EXPRESSION_HOVER.equals(context.getId()) ) {
+ return new ExpressionVMProvider(this, context, getSession());
} else if (IDebugUIConstants.ID_MODULE_VIEW.equals(context.getId()) ) {
return new ModulesVMProvider(this, context, getSession());
} else if (IDebugUIConstants.ID_BREAKPOINT_VIEW.equals(context.getId()) ) {
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGdbDebugPreferenceConstants.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGdbDebugPreferenceConstants.java
index 740ef713b65..d7be8e100f0 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGdbDebugPreferenceConstants.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/IGdbDebugPreferenceConstants.java
@@ -1,40 +1,46 @@
-/*******************************************************************************
- * Copyright (c) 2009 Ericsson 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:
- * Ericsson - initial implementation
- *******************************************************************************/
-package org.eclipse.cdt.dsf.gdb;
-
-import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
-
-
-
-/**
- * @noimplement This interface is not intended to be implemented by clients.
- * @since 2.0
- */
-public interface IGdbDebugPreferenceConstants {
-
- /**
- * Boolean preference whether to enable GDB traces. Default is true
.
- */
- public static final String PREF_TRACES_ENABLE = "tracesEnable"; //$NON-NLS-1$
-
- /**
- * Boolean preference whether to automatically terminate GDB when the inferior exists. Default is true
.
- */
- public static final String PREF_AUTO_TERMINATE_GDB = "autoTerminateGdb"; //$NON-NLS-1$
-
- /**
- * Help prefixes.
- */
- public static final String PREFIX = GdbPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
-
- public static final String PREFERENCE_PAGE= PREFIX + "preference_page_context"; //$NON-NLS-1$
-}
-
+/*******************************************************************************
+ * Copyright (c) 2009, 2010 Ericsson 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:
+ * Ericsson - initial implementation
+ *******************************************************************************/
+package org.eclipse.cdt.dsf.gdb;
+
+import org.eclipse.cdt.dsf.gdb.internal.GdbPlugin;
+
+
+
+/**
+ * @noimplement This interface is not intended to be implemented by clients.
+ * @since 2.0
+ */
+public interface IGdbDebugPreferenceConstants {
+
+ /**
+ * Boolean preference whether to enable GDB traces. Default is true
.
+ */
+ public static final String PREF_TRACES_ENABLE = "tracesEnable"; //$NON-NLS-1$
+
+ /**
+ * Boolean preference whether to automatically terminate GDB when the inferior exists. Default is true
.
+ */
+ public static final String PREF_AUTO_TERMINATE_GDB = "autoTerminateGdb"; //$NON-NLS-1$
+
+ /**
+ * Boolean preference whether to use the advanced Inspect debug text hover. Default is true
.
+ * @since 3.0
+ */
+ public static final String PREF_USE_INSPECTOR_HOVER = "useInspectorHover"; //$NON-NLS-1$
+
+ /**
+ * Help prefixes.
+ */
+ public static final String PREFIX = GdbPlugin.PLUGIN_ID + "."; //$NON-NLS-1$
+
+ public static final String PREFERENCE_PAGE= PREFIX + "preference_page_context"; //$NON-NLS-1$
+}
+