Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2010-05-28 13:01:57 +0000
committerJohn Cortell2010-05-28 13:01:57 +0000
commit6f3aa8adf27bd927ef82bfa65408e613d5285302 (patch)
tree8a14e7ec105a9196d0d785cd7f2ed56f0d17ee31
parent50cde93ef8a9ef9fd5603e5736c5cfdfb7164428 (diff)
downloadorg.eclipse.cdt-6f3aa8adf27bd927ef82bfa65408e613d5285302.tar.gz
org.eclipse.cdt-6f3aa8adf27bd927ef82bfa65408e613d5285302.tar.xz
org.eclipse.cdt-6f3aa8adf27bd927ef82bfa65408e613d5285302.zip
Bug 314745: Need to API to expose the address bar text and memory space ID set in Memory Browser
-rw-r--r--debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF1
-rw-r--r--debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/provisional/IRepositionableMemoryRendering2.java39
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java8
3 files changed, 47 insertions, 1 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
index be0d5e11f1..7cb7f39b33 100644
--- a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
@@ -35,6 +35,7 @@ Export-Package:
org.eclipse.cdt.debug.ui.editors,
org.eclipse.cdt.debug.ui.importexecutable,
org.eclipse.cdt.debug.ui.preferences,
+ org.eclipse.cdt.debug.ui.provisional;x-internal:=true,
org.eclipse.cdt.debug.ui.sourcelookup
Require-Bundle: org.eclipse.ui.ide;bundle-version="[3.2.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.2.0,4.0.0)",
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/provisional/IRepositionableMemoryRendering2.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/provisional/IRepositionableMemoryRendering2.java
new file mode 100644
index 0000000000..5e70df3986
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/provisional/IRepositionableMemoryRendering2.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Freescale Semiconductor 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:
+ * Freescale Semiconductor - Initial API
+ *******************************************************************************/
+package org.eclipse.cdt.debug.ui.provisional;
+
+import java.math.BigInteger;
+
+import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.ui.memory.IRepositionableMemoryRendering;
+
+/**
+ * An extension to the platform's repositionable rendering interface.
+ */
+public interface IRepositionableMemoryRendering2 extends IRepositionableMemoryRendering {
+
+ /**
+ * Position the rendering to the given address.
+ *
+ * @param address
+ * the address to go to
+ * @param expression
+ * if the goto address originated as an expression, then this is
+ * that expression. Null if n/a. <i>This is for informational
+ * purposes only</i>. Implementation should behave just as if
+ * {@link IRepositionableMemoryRendering#goToAddress(BigInteger)}
+ * had been called .</b>
+ * @throws DebugException
+ * when there is a problem repositioning the rendering to the
+ * address
+ */
+ public abstract void goToAddress(BigInteger address, String expression) throws DebugException;
+}
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
index 853890c395..c686c3c6a2 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
+++ b/memory/org.eclipse.cdt.debug.ui.memory.memorybrowser/src/org/eclipse/cdt/debug/ui/memory/memorybrowser/MemoryBrowser.java
@@ -23,6 +23,7 @@ import java.util.Map;
import org.eclipse.cdt.debug.core.model.provisional.IMemoryRenderingViewportProvider;
import org.eclipse.cdt.debug.core.model.provisional.IMemorySpaceAwareMemoryBlockRetrieval;
import org.eclipse.cdt.debug.internal.core.CRequest;
+import org.eclipse.cdt.debug.ui.provisional.IRepositionableMemoryRendering2;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -442,7 +443,12 @@ public class MemoryBrowser extends ViewPart implements IDebugContextListener, IM
if (block.supportBaseAddressModification()) {
block.setBaseAddress(newBase);
}
- renderingFinal.goToAddress(newBase);
+ if(renderingFinal instanceof IRepositionableMemoryRendering2) {
+ ((IRepositionableMemoryRendering2)renderingFinal).goToAddress(newBase, expression);
+ }
+ else {
+ renderingFinal.goToAddress(newBase);
+ }
fGotoAddressBar.handleExpressionStatus(Status.OK_STATUS);
runOnUIThread(new Runnable(){
public void run() {

Back to the top