1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Ruler tooltips in the dissassembly editor.

This commit is contained in:
Mikhail Khodjaiants 2003-05-06 16:33:03 +00:00
parent 33aba856fd
commit 63628b58a1
3 changed files with 68 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2003-05-06 Mikhail Khodjaiants
Ruler tooltips in the dissassembly editor.
* DisassemblyEditor.java
* DisassemblySourceViewerConfiguration.java: new
2003-05-05 Mikhail Khodjaiants
New implementation of overlayed images.
* OverlayImageDescriptor.java: new

View file

@ -7,6 +7,7 @@ package org.eclipse.cdt.debug.internal.ui.editors;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor;
import org.eclipse.cdt.ui.CUIPlugin;
/**
* Enter type comment.
@ -24,6 +25,7 @@ public class DisassemblyEditor extends AsmTextEditor
{
super();
setDocumentProvider( CDebugUIPlugin.getDefault().getDisassemblyDocumentProvider() );
setSourceViewerConfiguration( new DisassemblySourceViewerConfiguration( CUIPlugin.getDefault().getAsmTextTools(), this ) );
setEditorContextMenuId("#DisassemblyEditorContext"); //$NON-NLS-1$
setRulerContextMenuId("#DisassemblyEditorRulerContext"); //$NON-NLS-1$
}

View file

@ -0,0 +1,61 @@
/*
*(c) Copyright QNX Software Systems Ltd. 2002.
* All Rights Reserved.
*
*/
package org.eclipse.cdt.debug.internal.ui.editors;
import org.eclipse.cdt.internal.ui.editor.asm.AsmSourceViewerConfiguration;
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextEditor;
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextTools;
import org.eclipse.cdt.internal.ui.text.CAnnotationHover;
import org.eclipse.cdt.internal.ui.text.HTMLTextPresenter;
import org.eclipse.jface.text.DefaultInformationControl;
import org.eclipse.jface.text.IInformationControl;
import org.eclipse.jface.text.IInformationControlCreator;
import org.eclipse.jface.text.source.IAnnotationHover;
import org.eclipse.jface.text.source.ISourceViewer;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;
/**
* Enter type comment.
*
* @since May 5, 2003
*/
public class DisassemblySourceViewerConfiguration extends AsmSourceViewerConfiguration
{
public DisassemblySourceViewerConfiguration( AsmTextTools tools, AsmTextEditor editor )
{
super( tools, editor );
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getAnnotationHover(org.eclipse.jface.text.source.ISourceViewer)
*/
public IAnnotationHover getAnnotationHover(ISourceViewer sourceViewer)
{
return new CAnnotationHover();
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.source.SourceViewerConfiguration#getInformationControlCreator(org.eclipse.jface.text.source.ISourceViewer)
*/
public IInformationControlCreator getInformationControlCreator( ISourceViewer sourceViewer )
{
return getInformationControlCreator( sourceViewer, true );
}
public IInformationControlCreator getInformationControlCreator( ISourceViewer sourceViewer, final boolean cutDown )
{
return new IInformationControlCreator()
{
public IInformationControl createInformationControl( Shell parent )
{
int style = cutDown ? SWT.NONE : ( SWT.V_SCROLL | SWT.H_SCROLL );
return new DefaultInformationControl( parent, style, new HTMLTextPresenter( cutDown ) );
}
};
}
}