1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 314745: Need to API to expose the address bar text and memory space ID set in Memory Browser

This commit is contained in:
John Cortell 2010-05-28 13:01:57 +00:00
parent 50cde93ef8
commit 6f3aa8adf2
3 changed files with 47 additions and 1 deletions

View file

@ -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)",

View file

@ -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;
}

View file

@ -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);
}
if(renderingFinal instanceof IRepositionableMemoryRendering2) {
((IRepositionableMemoryRendering2)renderingFinal).goToAddress(newBase, expression);
}
else {
renderingFinal.goToAddress(newBase);
}
fGotoAddressBar.handleExpressionStatus(Status.OK_STATUS);
runOnUIThread(new Runnable(){
public void run() {