Font font = PlatformUI.getWorkbench().getThemeManager().getCurrentTheme().getFontRegistry().get(ISVNUIConstants.SVN_COMMENT_FONT); if (font != null) result.getTextWidget().setFont(font); result.getTextWidget().addMouseListener(new MouseAdapter() { public void mouseDown(MouseEvent e) { if (e.button != 1) { return; } mouseDown = true; } public void mouseUp(MouseEvent e) { mouseDown = false; StyledText text = (StyledText)e.widget; int offset = text.getCaretOffset(); if (dragEvent) {  dragEvent = false; if (linkList != null && linkList.isLinkAt(offset)) { text.setCursor(handCursor); } } else { if (linkList != null && linkList.isLinkAt(offset)) { text.setCursor(busyCursor); openLink(linkList.getLinkAt(offset)); text.setCursor(null); } } } });  result.getTextWidget().addMouseMoveListener(new MouseMoveListener() { public void mouseMove(MouseEvent e) {  if (mouseDown) { if (!dragEvent) { StyledText text = (StyledText)e.widget; text.setCursor(null); } dragEvent = true; return; } StyledText text = (StyledText)e.widget; int offset = -1; try { offset = text.getOffsetAtLocation(new Point(e.x, e.y)); } catch (IllegalArgumentException ex) {} if (offset == -1) text.setCursor(null); else if (linkList != null && linkList.isLinkAt(offset)) text.setCursor(handCursor); else text.setCursor(null); } });   copyAction = new TextViewerAction(result, ITextOperationTarget.COPY); copyAction.setText(Policy.bind("HistoryView.copy"));  selectAllAction = new TextViewerAction(result, ITextOperationTarget.SELECT_ALL); selectAllAction.setText(Policy.bind("HistoryView.selectAll"));  IActionBars actionBars = getViewSite().getActionBars(); actionBars.setGlobalActionHandler(ITextEditorActionConstants.COPY, copyAction); actionBars.setGlobalActionHandler(ITextEditorActionConstants.SELECT_ALL, selectAllAction); actionBars.updateActionBars();   { MenuManager menuMgr = new MenuManager(); menuMgr.setRemoveAllWhenShown(true); menuMgr.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager menuMgr) { fillTextMenu(menuMgr); } });  StyledText text = result.getTextWidget(); Menu menu = menuMgr.createContextMenu(text); text.setMenu(menu); }
	protected TextViewer createText(Composite parent) {		TextViewer result = new TextViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI | SWT.READ_ONLY);		result.addSelectionChangedListener(new ISelectionChangedListener() {			public void selectionChanged(SelectionChangedEvent event) {				copyAction.update();			}		});		return result;	}