Package com._1c.g5.v8.dt.bsl.ui.folding
Class FoldingPreferences
- java.lang.Object
-
- com._1c.g5.v8.dt.bsl.ui.folding.FoldingPreferences
-
public class FoldingPreferences extends Object
Folding preferences.Users can configure folding enablement for:
- Preprocessor (#If/#EndIf, #Region) (default: true)
- Control flow statements (If/ElsIf, While, For) (default: false)
- Try/Except block (default: false)
Also users can configure autofolding rules on editor opening for:
- Procedures and Functions (default: false)
- Loops (default: false)
- Conditions (default: false)
- Preprocessor blocks (default: false)
- See Also:
FoldingPreferences.Initializer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FoldingPreferences.Initializer
Preferences store initializer for folding preferences
-
Field Summary
Fields Modifier and Type Field Description static String
CONTROL_FLOW_ENABLED
Preference key for folding of control flow statements enablementstatic String
FOLD_COMMENT_METHODS_INITIALLY
Preference key for initially folding of methods commentstatic String
FOLD_CONDITIONS_INITIALLY
Preference key for initially folding of conditionsstatic String
FOLD_LOOPS_INITIALLY
Preference key for initially folding of loopsstatic String
FOLD_METHODS_INITIALLY
Preference key for initially folding of methodsstatic String
FOLD_PREPROC_INITIALLY
Preference key for initially folding of preprocessor blocksprotected org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess
preferenceStoreAccess
static String
PREPROCESSOR_FOLDING_ENABLED
Preference key for folding of preprocessor code blocks enablementstatic String
TRY_EXCEPT_ENABLED
Preference key for folding of try/except code blocks enablement
-
Constructor Summary
Constructors Constructor Description FoldingPreferences()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isControlFlowFoldingEnabled()
Checks if folding for control flow statements is enabledboolean
isFoldCommentMethodsInitially()
Checks if methods comment folds initially on editor openboolean
isFoldConditionsInitially()
Checks if conditions folds initially on editor openboolean
isFoldLoopsInitially()
Checks if loops folds initially on editor openboolean
isFoldMethodsInitially()
Checks if methods folds initially on editor openboolean
isFoldPreprocessorInitially()
Checks if preprocessor blocks folds initially on editor openboolean
isPreprocessorFoldingEnabled()
Checks if folding for preprocessor is enabledboolean
isTryExceptFoldingEnabled()
Checks if folding for try\except is enabledvoid
setControlFlowFolding(boolean isEnableFolding)
Configure folding for control flow statementsvoid
setFoldCommentMethodsInitially(boolean isFoldInitially)
Configure folding for methods comments on editor openvoid
setFoldConditionsInitially(boolean isFoldInitially)
Configure folding for conditions on editor openvoid
setFoldLoopsInitially(boolean isFoldInitially)
Configure folding for loops on editor openvoid
setFoldMethodsInitially(boolean isFoldInitially)
Configure folding for methods on editor openvoid
setFoldPreprocessorInitially(boolean isFoldInitially)
Configure folding for preprocessor blocks on editor openvoid
setPreprocessorFolding(boolean isEnableFolding)
Configure folding for preprocessor blocksvoid
setTryExceptFolding(boolean isEnableFolding)
Configure folding for try\except blocks
-
-
-
Field Detail
-
PREPROCESSOR_FOLDING_ENABLED
public static final String PREPROCESSOR_FOLDING_ENABLED
Preference key for folding of preprocessor code blocks enablement- See Also:
- Constant Field Values
-
CONTROL_FLOW_ENABLED
public static final String CONTROL_FLOW_ENABLED
Preference key for folding of control flow statements enablement- See Also:
- Constant Field Values
-
TRY_EXCEPT_ENABLED
public static final String TRY_EXCEPT_ENABLED
Preference key for folding of try/except code blocks enablement- See Also:
- Constant Field Values
-
FOLD_METHODS_INITIALLY
public static final String FOLD_METHODS_INITIALLY
Preference key for initially folding of methods- See Also:
- Constant Field Values
-
FOLD_COMMENT_METHODS_INITIALLY
public static final String FOLD_COMMENT_METHODS_INITIALLY
Preference key for initially folding of methods comment- See Also:
- Constant Field Values
-
FOLD_LOOPS_INITIALLY
public static final String FOLD_LOOPS_INITIALLY
Preference key for initially folding of loops- See Also:
- Constant Field Values
-
FOLD_CONDITIONS_INITIALLY
public static final String FOLD_CONDITIONS_INITIALLY
Preference key for initially folding of conditions- See Also:
- Constant Field Values
-
FOLD_PREPROC_INITIALLY
public static final String FOLD_PREPROC_INITIALLY
Preference key for initially folding of preprocessor blocks- See Also:
- Constant Field Values
-
preferenceStoreAccess
@Inject protected org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess preferenceStoreAccess
-
-
Method Detail
-
isPreprocessorFoldingEnabled
public boolean isPreprocessorFoldingEnabled()
Checks if folding for preprocessor is enabled- Returns:
- true if folding for preprocessor is enabled
-
setPreprocessorFolding
public void setPreprocessorFolding(boolean isEnableFolding)
Configure folding for preprocessor blocks- Parameters:
isEnableFolding
- enable folding or not
-
isControlFlowFoldingEnabled
public boolean isControlFlowFoldingEnabled()
Checks if folding for control flow statements is enabled- Returns:
- true if folding for control flow statements is enabled
-
setControlFlowFolding
public void setControlFlowFolding(boolean isEnableFolding)
Configure folding for control flow statements- Parameters:
isEnableFolding
- enable folding or not
-
isTryExceptFoldingEnabled
public boolean isTryExceptFoldingEnabled()
Checks if folding for try\except is enabled- Returns:
- true if folding for try\except is enabled
-
setTryExceptFolding
public void setTryExceptFolding(boolean isEnableFolding)
Configure folding for try\except blocks- Parameters:
isEnableFolding
- enable folding or not
-
isFoldMethodsInitially
public boolean isFoldMethodsInitially()
Checks if methods folds initially on editor open- Returns:
- true if methods folds initially on editor open
-
isFoldCommentMethodsInitially
public boolean isFoldCommentMethodsInitially()
Checks if methods comment folds initially on editor open- Returns:
- true if methods comment folds initially on editor open
-
setFoldMethodsInitially
public void setFoldMethodsInitially(boolean isFoldInitially)
Configure folding for methods on editor open- Parameters:
isEnableFolding
- enable initial folding or not
-
setFoldCommentMethodsInitially
public void setFoldCommentMethodsInitially(boolean isFoldInitially)
Configure folding for methods comments on editor open- Parameters:
isEnableFolding
- enable initial folding or not
-
isFoldLoopsInitially
public boolean isFoldLoopsInitially()
Checks if loops folds initially on editor open- Returns:
- true if loops folds initially on editor open
-
setFoldLoopsInitially
public void setFoldLoopsInitially(boolean isFoldInitially)
Configure folding for loops on editor open- Parameters:
isEnableFolding
- enable initial folding or not
-
isFoldConditionsInitially
public boolean isFoldConditionsInitially()
Checks if conditions folds initially on editor open- Returns:
- true if conditions folds initially on editor open
-
setFoldConditionsInitially
public void setFoldConditionsInitially(boolean isFoldInitially)
Configure folding for conditions on editor open- Parameters:
isEnableFolding
- enable initial folding or not
-
isFoldPreprocessorInitially
public boolean isFoldPreprocessorInitially()
Checks if preprocessor blocks folds initially on editor open- Returns:
- true if preprocessor blocks folds initially on editor open
-
setFoldPreprocessorInitially
public void setFoldPreprocessorInitially(boolean isFoldInitially)
Configure folding for preprocessor blocks on editor open- Parameters:
isEnableFolding
- enable initial folding or not
-
-