Package com._1c.g5.v8.dt.bsl.ui.folding
Class FoldingPreferences
java.lang.Object
com._1c.g5.v8.dt.bsl.ui.folding.FoldingPreferences
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPreferences store initializer for folding preferences -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPreference key for folding of control flow statements enablementstatic final StringPreference key for initially folding of methods commentstatic final StringPreference key for initially folding of conditionsstatic final StringPreference key for initially folding of loopsstatic final StringPreference key for initially folding of methodsstatic final StringPreference key for initially folding of preprocessor blocksprotected org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccessstatic final StringPreference key for folding of preprocessor code blocks enablementstatic final StringPreference key for folding of try/except code blocks enablement -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if folding for control flow statements is enabledbooleanChecks if methods comment folds initially on editor openbooleanChecks if conditions folds initially on editor openbooleanChecks if loops folds initially on editor openbooleanChecks if methods folds initially on editor openbooleanChecks if preprocessor blocks folds initially on editor openbooleanChecks if folding for preprocessor is enabledbooleanChecks if folding for try\except is enabledvoidsetControlFlowFolding(boolean isEnableFolding) Configure folding for control flow statementsvoidsetFoldCommentMethodsInitially(boolean isFoldInitially) Configure folding for methods comments on editor openvoidsetFoldConditionsInitially(boolean isFoldInitially) Configure folding for conditions on editor openvoidsetFoldLoopsInitially(boolean isFoldInitially) Configure folding for loops on editor openvoidsetFoldMethodsInitially(boolean isFoldInitially) Configure folding for methods on editor openvoidsetFoldPreprocessorInitially(boolean isFoldInitially) Configure folding for preprocessor blocks on editor openvoidsetPreprocessorFolding(boolean isEnableFolding) Configure folding for preprocessor blocksvoidsetTryExceptFolding(boolean isEnableFolding) Configure folding for try\except blocks
-
Field Details
-
PREPROCESSOR_FOLDING_ENABLED
Preference key for folding of preprocessor code blocks enablement- See Also:
-
CONTROL_FLOW_ENABLED
Preference key for folding of control flow statements enablement- See Also:
-
TRY_EXCEPT_ENABLED
Preference key for folding of try/except code blocks enablement- See Also:
-
FOLD_METHODS_INITIALLY
Preference key for initially folding of methods- See Also:
-
FOLD_COMMENT_METHODS_INITIALLY
Preference key for initially folding of methods comment- See Also:
-
FOLD_LOOPS_INITIALLY
Preference key for initially folding of loops- See Also:
-
FOLD_CONDITIONS_INITIALLY
Preference key for initially folding of conditions- See Also:
-
FOLD_PREPROC_INITIALLY
Preference key for initially folding of preprocessor blocks- See Also:
-
preferenceStoreAccess
@Inject protected org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess preferenceStoreAccess
-
-
Constructor Details
-
FoldingPreferences
public FoldingPreferences()
-
-
Method Details
-
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
-