Bug 279917 SWT Editor Example does not work RC3
examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/texteditor/TextEditor.java
}
		disposeRanges(selectedRanges);
	}
	
	void handleMouseUp (Event event) {
		if (link != null) {
			int offset = styledText.getCaretOffset();
			StyleRange range = offset > 0 ? styledText.getStyleRangeAtOffset(offset-1) : null;
			if (range != null) {
				if (link == range.data) {
					Shell dialog = new Shell(shell);
					dialog.setLayout(new FillLayout());
					dialog.setText(getResourceString("Browser")); 
					Browser browser = new Browser(dialog, SWT.MOZILLA);
					browser.setUrl(link);
					dialog.open();
				}
			}
		}
	}
	
	void handlePaintObject(PaintObjectEvent event) {
		GC gc = event.gc;
		StyleRange style = event.style;
		Object data = style.data;
		if (data instanceof Image) {
			Image image = (Image)data;
			int x = event.x;
			int y = event.y + event.ascent - style.metrics.ascent;
			gc.drawImage(image, x, y);