2
* Created on May 5, 2005
4
* @author Fabio Zadrozny
6
package org.python.pydev.editor.autoedit;
8
import org.eclipse.jface.text.DocumentCommand;
9
import org.eclipse.jface.text.IDocument;
12
* @author Fabio Zadrozny
14
public interface IIndentPrefs {
17
* @return True if we should substitute tabs for spaces.
19
public boolean getUseSpaces();
22
* Sets the forceTabs preference for auto-indentation.
25
* This is the preference that overrides "use spaces" preference when file
26
* contains tabs (like mine do).
28
* If the first indented line starts with a tab, then tabs override spaces.
30
* @return True If tabs should be used even if it says we should use spaces.
32
public void setForceTabs(boolean forceTabs);
33
public boolean getForceTabs();
36
* @return the width a tab should have.
38
public int getTabWidth();
41
* @return the indentation string based on the current settings.
43
public String getIndentationString();
46
* Given the current settings, convert the current string to tabs or spaces.
48
public void convertToStd(IDocument document, DocumentCommand command);
51
* @return whether we should auto-close parentesis
53
public boolean getAutoParentesis();
56
* Get whether or not to do colon detection.
57
* @return true iff colon detection is turned on
59
public boolean getAutoColon();
62
* Get whether or not to auto-skip braces insertion
63
* @return iff auto-skip braces is ENABLED
65
public boolean getAutoBraces();
68
* Get whether we should auto-write 'import' if we are in a from xxx import fff
70
public boolean getAutoWriteImport();
73
* Get whether we should smart-indent after a '('
75
public boolean getSmartIndentPar();
78
* Get whether we should add 'self' automatically when declaring method
80
public boolean getAutoAddSelf();
83
* Get whether we should auto-dedent 'else:'
85
public boolean getAutoDedentElse();
88
* @return whether we should indent to a parenthesis level on auto-indent or only add 1 tab to the indent).
90
public boolean getIndentToParLevel();
93
* Should be called to regenerate the indent string that's in the cache.
95
public void regenerateIndentString();