Java 类org.eclipse.ui.part.IWorkbenchPartOrientation 实例源码

项目:Eclipse-Postfix-Code-Completion    文件:TemplateProposal.java   
public IInformationControlCreator getInformationControlCreator() {
    int orientation;
    IEditorPart editor= getJavaEditor();
    if (editor instanceof IWorkbenchPartOrientation)
        orientation= ((IWorkbenchPartOrientation)editor).getOrientation();
    else
        orientation= SWT.LEFT_TO_RIGHT;
    return new TemplateInformationControlCreator(orientation);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:TemplateProposal.java   
public IInformationControlCreator getInformationControlCreator() {
    int orientation;
    IEditorPart editor= getJavaEditor();
    if (editor instanceof IWorkbenchPartOrientation)
        orientation= ((IWorkbenchPartOrientation)editor).getOrientation();
    else
        orientation= SWT.LEFT_TO_RIGHT;
    return new TemplateInformationControlCreator(orientation);
}
项目:goclipse    文件:LangTemplateProposal.java   
public static IInformationControlCreator createTemplateInformationControlCreator() {
    int orientation = SWT.LEFT_TO_RIGHT;
    IEditorPart editor = WorkbenchUtils.getActiveEditor();
    if(editor instanceof IWorkbenchPartOrientation) {
        orientation = ((IWorkbenchPartOrientation) editor).getOrientation();
        orientation = orientation == SWT.NONE ? SWT.LEFT_TO_RIGHT : orientation;
    }
    return new TemplateInformationControlCreator(orientation);
}
项目:PDFReporter-Studio    文件:MultiPageToolbarEditorPart.java   
/**
 * Get the orientation of the editor.
 * 
 * @param editor
 * @return int the orientation flag
 * @see SWT#RIGHT_TO_LEFT
 * @see SWT#LEFT_TO_RIGHT
 * @see SWT#NONE
 */
private int getOrientation(IEditorPart editor) {
    if (editor instanceof IWorkbenchPartOrientation) {
        return ((IWorkbenchPartOrientation) editor).getOrientation();
    }
    return getOrientation();
}