Java Code Examples for org.eclipse.jface.text.ITextViewerExtension#getControl()

The following examples show how to use org.eclipse.jface.text.ITextViewerExtension#getControl() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BookmarkRulerColumn.java    From xds-ide with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * 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);
        }
    }
}
 
Example 2
Source File: CommonLineNumberRulerColumn.java    From APICloud-Studio with GNU General Public License v3.0 6 votes vote down vote up
/**
 * 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);
		}
	}
}