mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Contributing new disassembly.
This commit is contained in:
parent
0f97e58d2f
commit
fe4b90d99a
3 changed files with 18 additions and 20 deletions
|
@ -164,12 +164,10 @@ public class DisassemblyEditor extends EditorPart implements ITextEditor, IReusa
|
|||
if ( document != null && viewer != null ) {
|
||||
DocumentContentProvider contentProvider = document.getContentProvider();
|
||||
Object oldInput = contentProvider.getInput();
|
||||
if ( !oldInput.equals( debugContext ) ) {
|
||||
contentProvider.changeInput( getViewer(), document.getPresentationContext(), oldInput, debugContext, document.getCurrentOffset() );
|
||||
// getViewer().refresh( false, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.ui.contexts.IDebugContextListener#debugContextChanged(org.eclipse.debug.ui.contexts.DebugContextEvent)
|
||||
|
@ -186,7 +184,6 @@ public class DisassemblyEditor extends EditorPart implements ITextEditor, IReusa
|
|||
if ( disassemblyContext != null ) {
|
||||
DisassemblyEditorInput oldInput = (DisassemblyEditorInput)getEditorInput();
|
||||
if ( oldInput.getDisassemblyContext().equals( disassemblyContext ) ) {
|
||||
if ( !oldInput.getDebugContext().equals( context ) ) {
|
||||
setInput( new DisassemblyEditorInput( context, disassemblyContext ) );
|
||||
}
|
||||
}
|
||||
|
@ -194,7 +191,6 @@ public class DisassemblyEditor extends EditorPart implements ITextEditor, IReusa
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private IDisassemblyContextProvider getDisassemblyContextProvider( Object element ) {
|
||||
IDisassemblyContextProvider adapter = null;
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
|
||||
package org.eclipse.cdt.debug.internal.ui.disassembly.editor;
|
||||
|
||||
import org.eclipse.cdt.debug.internal.ui.preferences.ICDebugPreferenceConstants;
|
||||
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
|
||||
import org.eclipse.cdt.debug.ui.ICDebugUIConstants;
|
||||
import org.eclipse.cdt.debug.ui.disassembly.IDocumentPresentation;
|
||||
import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationContext;
|
||||
|
@ -21,19 +23,21 @@ import org.eclipse.debug.internal.ui.viewers.model.provisional.PresentationConte
|
|||
*/
|
||||
public class DisassemblyEditorPresentation extends PresentationContext implements IDocumentPresentation {
|
||||
|
||||
private boolean fShowIntstructions = true;
|
||||
private boolean fShowInstructions = true;
|
||||
private boolean fShowSource = false;
|
||||
|
||||
public DisassemblyEditorPresentation() {
|
||||
super( ICDebugUIConstants.ID_DEFAULT_DISASSEMBLY_EDITOR );
|
||||
fShowInstructions = CDebugUIPlugin.getDefault().getPreferenceStore().getBoolean( ICDebugPreferenceConstants.PREF_DISASM_SHOW_INSTRUCTIONS );
|
||||
fShowSource = CDebugUIPlugin.getDefault().getPreferenceStore().getBoolean( ICDebugPreferenceConstants.PREF_DISASM_SHOW_SOURCE );
|
||||
}
|
||||
|
||||
public boolean showIntstructions() {
|
||||
return fShowIntstructions;
|
||||
return fShowInstructions;
|
||||
}
|
||||
|
||||
public void setShowIntstructions( boolean showIntstructions ) {
|
||||
fShowIntstructions = showIntstructions;
|
||||
fShowInstructions = showIntstructions;
|
||||
}
|
||||
|
||||
public boolean showSource() {
|
||||
|
|
|
@ -130,7 +130,6 @@ public class DocumentContentProvider implements IModelChangedListener {
|
|||
|
||||
public void changeInput( VirtualSourceViewer viewer, IDocumentPresentation presentationContext, Object oldInput, Object newInput, int offset ) {
|
||||
fViewer = viewer;
|
||||
if ( newInput != oldInput ) {
|
||||
fInput = newInput;
|
||||
IDocumentElementContentProvider contentAdapter = getContentAdapter( getInput() );
|
||||
if ( contentAdapter != null ) {
|
||||
|
@ -141,7 +140,6 @@ public class DocumentContentProvider implements IModelChangedListener {
|
|||
inputChanged( new DocumentBaseChangeUpdate( this, contentAdapter, presentationContext, getRoot(), getBase(), getInput(), offset ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void inputChanged( DocumentBaseChangeUpdate update ) {
|
||||
if ( fUpdateInProgress == update ) {
|
||||
|
|
Loading…
Add table
Reference in a new issue