mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
HTMLTextPresenter implements DefaultInformationControl.IInformationPresenterExtension instead of deprecated DefaultInformationControl.IInformationPresenter.
This commit is contained in:
parent
5c2821d29b
commit
f91558ee2f
2 changed files with 19 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-12-27 Mikhail Khodjaiants
|
||||
HTMLTextPresenter implements DefaultInformationControl.IInformationPresenterExtension
|
||||
instead of deprecated DefaultInformationControl.IInformationPresenter.
|
||||
* HTMLTextPresenter.java
|
||||
|
||||
2005-12-27 Mikhail Khodjaiants
|
||||
Cleanup.
|
||||
* RetargetAction.java
|
||||
|
|
|
@ -13,19 +13,18 @@ package org.eclipse.cdt.debug.internal.ui;
|
|||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.io.StringReader;
|
||||
|
||||
import java.util.Iterator;
|
||||
import org.eclipse.swt.custom.StyleRange;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
import org.eclipse.cdt.debug.internal.ui.views.disassembly.DisassemblyMessages;
|
||||
import org.eclipse.debug.core.DebugPlugin;
|
||||
import org.eclipse.jface.text.DefaultInformationControl;
|
||||
import org.eclipse.jface.text.Region;
|
||||
import org.eclipse.jface.text.TextPresentation;
|
||||
import org.eclipse.swt.custom.StyleRange;
|
||||
import org.eclipse.swt.graphics.Drawable;
|
||||
import org.eclipse.swt.graphics.GC;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
public class HTMLTextPresenter implements DefaultInformationControl.IInformationPresenter {
|
||||
public class HTMLTextPresenter implements DefaultInformationControl.IInformationPresenter, DefaultInformationControl.IInformationPresenterExtension {
|
||||
|
||||
private static final String LINE_DELIM= System.getProperty("line.separator", "\n"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
|
@ -93,12 +92,12 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
|||
/*
|
||||
* @see IHoverInformationPresenter#updatePresentation(Display display, String, TextPresentation, int, int)
|
||||
*/
|
||||
public String updatePresentation(Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
|
||||
public String updatePresentation(Drawable drawable, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight) {
|
||||
|
||||
if (hoverInfo == null)
|
||||
return null;
|
||||
|
||||
GC gc= new GC(display);
|
||||
GC gc= new GC(drawable);
|
||||
try {
|
||||
|
||||
StringBuffer buffer= new StringBuffer();
|
||||
|
@ -185,4 +184,11 @@ public class HTMLTextPresenter implements DefaultInformationControl.IInformation
|
|||
presentation.setResultWindow(new Region(start, buffer.length()));
|
||||
return buffer.toString();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jface.text.DefaultInformationControl$IInformationPresenter#updatePresentation(org.eclipse.swt.widgets.Display, java.lang.String, org.eclipse.jface.text.TextPresentation, int, int)
|
||||
*/
|
||||
public String updatePresentation( Display display, String hoverInfo, TextPresentation presentation, int maxWidth, int maxHeight ) {
|
||||
return updatePresentation( (Drawable)display, hoverInfo, presentation, maxWidth, maxHeight );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue