use of org.eclipse.jface.text.ITextViewerExtension in project eclipse.platform.text by eclipse.
the class LineNumberRulerColumn method layout.
/**
* Layouts the enclosing viewer to adapt the layout to changes of the
* size of the individual components.
*
* @param redraw <code>true</code> if this column can be redrawn
*/
protected void layout(boolean redraw) {
if (!redraw) {
fRelayoutRequired = true;
return;
}
fRelayoutRequired = false;
if (fCachedTextViewer instanceof ITextViewerExtension) {
ITextViewerExtension extension = (ITextViewerExtension) fCachedTextViewer;
Control control = extension.getControl();
if (control instanceof Composite && !control.isDisposed()) {
Composite composite = (Composite) control;
composite.layout(true);
}
}
}
Aggregations