fPaneImage= imageDescriptor.createImage(getControl().getDisplay());
/** * Sets the input of the source viewer to the given document and reveals the * region determined by the given parameter region. * * @param document the document to present * @param region the region to reveal. */ protected void setInput(IDocument document, IRegion region) { Control ctrl= getControl(); if (ctrl != null && ctrl.isDisposed()) ctrl= null; try { if (ctrl != null) ctrl.setRedraw(false); fSourceViewer.setInput(document); if (region != null && document != null) { int offset= region.getOffset(); int length= region.getLength(); if (offset >= 0 && length >= 0) { fSourceViewer.setSelectedRange(offset, length); fSourceViewer.revealRange(offset, length); } } } finally { if (ctrl != null) ctrl.setRedraw(true); } }