Java 类org.eclipse.ui.texteditor.ITextEditorExtension3 实例源码

项目:typescript.java    文件:TypeScriptMergeViewer.java   
@SuppressWarnings("unchecked")
@Override
public Object getAdapter(Class adapter) {
    if (adapter == ITextEditorExtension3.class) {
        IEditorInput activeInput = (IEditorInput) super.getAdapter(IEditorInput.class);
        if (activeInput != null) {
            for (Iterator<TypeScriptEditorAdapter> iterator = fEditor.values().iterator(); iterator.hasNext();) {
                TypeScriptEditorAdapter editor = iterator.next();
                if (activeInput.equals(editor.getEditorInput()))
                    return editor;
            }
        }
        return null;
    }
    return super.getAdapter(adapter);
}
项目:typescript.java    文件:IndentAction.java   
/**
 * Returns the smart preference state.
 * 
 * @return <code>true</code> if smart mode is on, <code>false</code>
 *         otherwise
 */
private boolean isSmartMode() {
    ITextEditor editor = getTextEditor();

    if (editor instanceof ITextEditorExtension3)
        return ((ITextEditorExtension3) editor).getInsertMode() == ITextEditorExtension3.SMART_INSERT;

    return false;
}
项目:typescript.java    文件:JSDocAutoIndentStrategy.java   
private boolean isSmartMode() {
    IWorkbenchPage page = JavaScriptPlugin.getActivePage();
    if (page != null) {
        IEditorPart part = page.getActiveEditor();
        if (part instanceof ITextEditorExtension3) {
            ITextEditorExtension3 extension = (ITextEditorExtension3) part;
            return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
        }
    }
    return false;
}
项目:typescript.java    文件:TypeScriptAutoIndentStrategy.java   
private boolean computeSmartMode() {
    IWorkbenchPage page= JavaScriptPlugin.getActivePage();
    if (page != null)  {
        IEditorPart part= page.getActiveEditor();
        if (part instanceof ITextEditorExtension3) {
            ITextEditorExtension3 extension= (ITextEditorExtension3) part;
            return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:IndentAction.java   
/**
 * Returns the smart preference state.
 *
 * @return <code>true</code> if smart mode is on, <code>false</code> otherwise
 */
private boolean isSmartMode() {
    ITextEditor editor= getTextEditor();

    if (editor instanceof ITextEditorExtension3)
        return ((ITextEditorExtension3) editor).getInsertMode() == ITextEditorExtension3.SMART_INSERT;

    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaStringAutoIndentStrategy.java   
private boolean isSmartMode() {
    IWorkbenchPage page= JavaPlugin.getActivePage();
    if (page != null)  {
        IEditorPart part= page.getActiveEditor();
        if (part instanceof ITextEditorExtension3) {
            ITextEditorExtension3 extension= (ITextEditorExtension3) part;
            return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion    文件:JavaMergeViewer.java   
@Override
public Object getAdapter(Class adapter) {
    if (adapter == ITextEditorExtension3.class) {
        IEditorInput activeInput= (IEditorInput)super.getAdapter(IEditorInput.class);
        if (activeInput != null) {
            for (Iterator<CompilationUnitEditorAdapter> iterator= fEditor.values().iterator(); iterator.hasNext();) {
                CompilationUnitEditorAdapter editor= iterator.next();
                if (activeInput.equals(editor.getEditorInput()))
                    return editor;
            }
        }
        return null;
    }
    return super.getAdapter(adapter);
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:IndentAction.java   
/**
 * Returns the smart preference state.
 *
 * @return <code>true</code> if smart mode is on, <code>false</code> otherwise
 */
private boolean isSmartMode() {
    ITextEditor editor= getTextEditor();

    if (editor instanceof ITextEditorExtension3)
        return ((ITextEditorExtension3) editor).getInsertMode() == ITextEditorExtension3.SMART_INSERT;

    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaStringAutoIndentStrategy.java   
private boolean isSmartMode() {
    IWorkbenchPage page= JavaPlugin.getActivePage();
    if (page != null)  {
        IEditorPart part= page.getActiveEditor();
        if (part instanceof ITextEditorExtension3) {
            ITextEditorExtension3 extension= (ITextEditorExtension3) part;
            return extension.getInsertMode() == ITextEditorExtension3.SMART_INSERT;
        }
    }
    return false;
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavaMergeViewer.java   
@Override
public Object getAdapter(Class adapter) {
    if (adapter == ITextEditorExtension3.class) {
        IEditorInput activeInput= (IEditorInput)super.getAdapter(IEditorInput.class);
        if (activeInput != null) {
            for (Iterator<CompilationUnitEditorAdapter> iterator= fEditor.values().iterator(); iterator.hasNext();) {
                CompilationUnitEditorAdapter editor= iterator.next();
                if (activeInput.equals(editor.getEditorInput()))
                    return editor;
            }
        }
        return null;
    }
    return super.getAdapter(adapter);
}