cdt/cdt_6_0_x/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java
changeset 111 c2563c416525
parent 110 9262ca4bdfff
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java	Thu Nov 05 15:17:54 2009 -0600
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/editors/DebugTextHover.java	Tue Nov 10 09:58:50 2009 -0600
@@ -16,7 +16,6 @@
 import org.eclipse.cdt.debug.ui.editors.AbstractDebugTextHover;
 import org.eclipse.core.runtime.IAdaptable;
 import org.eclipse.debug.core.DebugException;
-import org.eclipse.jface.viewers.IStructuredSelection;
 
 /**
  * The text hovering support for C/C++ debugger.
@@ -30,17 +29,11 @@
 	 * @return the evaluation stack frame, or <code>null</code> if none
 	 */
 	protected ICStackFrame getFrame() {
-		if (fSelection instanceof IStructuredSelection) {
-			IStructuredSelection selection = (IStructuredSelection) fSelection;
-			if (selection.size() == 1) {
-				Object el = selection.getFirstElement();
-				if (el instanceof IAdaptable) {
-					return (ICStackFrame) ((IAdaptable) el)
-							.getAdapter(ICStackFrame.class);
-				}
-			}
-		}
-		return null;
+        IAdaptable adaptable = getSelectionAdaptable();
+        if (adaptable != null) {
+            return (ICStackFrame) adaptable.getAdapter(ICStackFrame.class);
+        }
+        return null;
 	}
 
 	@Override