testindentprefs.java

来自「Python Development Environment (Python I」· Java 代码 · 共 80 行

JAVA
80
字号
package org.python.pydev.editor;

import org.python.pydev.editor.autoedit.AbstractIndentPrefs;


public class TestIndentPrefs extends AbstractIndentPrefs {
    
    private boolean useSpaces;
    private int tabWidth;
    boolean autoPar = true;
    boolean autoColon = true;
    boolean autoBraces = true;
    boolean autoWriteImport = true;
    boolean smartIndentAfterPar = true;
    boolean autoAddSelf = true;
    boolean autoElse;
    boolean indentToParLevel = true;

    public TestIndentPrefs(boolean useSpaces, int tabWidth){
        this.useSpaces = useSpaces;
        this.tabWidth = tabWidth;
    }

    public TestIndentPrefs(boolean useSpaces, int tabWidth, boolean autoPar){
        this(useSpaces,tabWidth, autoPar, true);
    }

    public TestIndentPrefs(boolean useSpaces, int tabWidth, boolean autoPar, boolean autoElse){
        this(useSpaces,tabWidth);
        this.autoPar = autoPar;
        this.autoElse = autoElse;
    }
    
    public boolean getUseSpaces() {
        return useSpaces;
    }

    public int getTabWidth() {
        return tabWidth;
    }

    public boolean getAutoParentesis() {
        return autoPar;
    }

    public boolean getAutoColon() {
        return autoColon;
    }

    public boolean getAutoBraces()
    {
        return autoBraces;
    }

    public boolean getAutoWriteImport() {
        return autoWriteImport;
    }

    public boolean getSmartIndentPar() {
        return smartIndentAfterPar;
    }

    public boolean getAutoAddSelf() {
        return autoAddSelf;
    }

    public boolean getAutoDedentElse() {
        return autoElse;
    }

    public boolean getIndentToParLevel() {
        return indentToParLevel;
    }

    public void regenerateIndentString() {
        //ignore it
    }

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?