mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[295895] DSF Disassembly view attempts to insert source even when 'Show Source' option is off
This commit is contained in:
parent
c753fd5b74
commit
214ac8648b
2 changed files with 72 additions and 57 deletions
|
@ -1752,7 +1752,7 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
|||
return;
|
||||
}
|
||||
if (DEBUG) System.out.println("retrieveDisassembly "+getAddressText(startAddress)+" "+lines+" lines"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
|
||||
retrieveDisassembly(startAddress, endAddress, lines, true, false);
|
||||
retrieveDisassembly(startAddress, endAddress, lines, fShowSource, false);
|
||||
}
|
||||
|
||||
private void retrieveDisassembly(final BigInteger startAddress, BigInteger endAddress, final int linesHint, boolean mixed, boolean ignoreFile) {
|
||||
|
@ -3346,6 +3346,14 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
|||
} else {
|
||||
fPCAnnotationUpdatePending = true;
|
||||
updateInvalidSource();
|
||||
if (fShowSource) {
|
||||
Runnable doit = new Runnable() {
|
||||
public void run() {
|
||||
fDocument.invalidateAddressRange(fStartAddress, fEndAddress, true);
|
||||
fGotoFramePending = true;
|
||||
}};
|
||||
doScrollLocked(doit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,8 @@ import org.eclipse.debug.core.sourcelookup.containers.LocalFileStorage;
|
|||
import org.eclipse.jface.text.BadLocationException;
|
||||
import org.eclipse.jface.text.BadPositionCategoryException;
|
||||
import org.eclipse.jface.text.DefaultLineTracker;
|
||||
import org.eclipse.jface.text.DocumentRewriteSession;
|
||||
import org.eclipse.jface.text.DocumentRewriteSessionType;
|
||||
import org.eclipse.jface.text.IDocument;
|
||||
import org.eclipse.jface.text.IRegion;
|
||||
import org.eclipse.jface.text.Position;
|
||||
|
@ -1228,6 +1230,8 @@ public class DisassemblyDocument extends REDDocument {
|
|||
}
|
||||
|
||||
public void deleteDisassemblyRange(BigInteger startAddress, BigInteger endAddress, boolean invalidate, boolean collapse) {
|
||||
DocumentRewriteSession session = startRewriteSession(DocumentRewriteSessionType.STRICTLY_SEQUENTIAL);
|
||||
try {
|
||||
String replacement = invalidate ? "...\n" : null; //$NON-NLS-1$
|
||||
int replaceLen = replacement != null ? replacement.length() : 0;
|
||||
AddressRangePosition lastPos = null;
|
||||
|
@ -1293,6 +1297,9 @@ public class DisassemblyDocument extends REDDocument {
|
|||
}
|
||||
}
|
||||
removePositions(CATEGORY_DISASSEMBLY, toRemove);
|
||||
} finally {
|
||||
stopRewriteSession(session);
|
||||
}
|
||||
if (DEBUG) checkConsistency();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue