diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 2124d221fc3..c8b4ae761ff 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -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 diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/HTMLTextPresenter.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/HTMLTextPresenter.java index 73acfbf4232..30285a0d78e 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/HTMLTextPresenter.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/HTMLTextPresenter.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 ); + } }