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 class
Preferences store initializer for folding preferences -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Preference key for folding of control flow statements enablementstatic final String
Preference key for initially folding of methods commentstatic final String
Preference key for initially folding of conditionsstatic final String
Preference key for initially folding of loopsstatic final String
Preference key for initially folding of methodsstatic final String
Preference key for initially folding of preprocessor blocksprotected org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreAccess
static final String
Preference key for folding of preprocessor code blocks enablementstatic final String
Preference key for folding of try/except code blocks enablement -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if folding for control flow statements is enabledboolean
Checks if methods comment folds initially on editor openboolean
Checks if conditions folds initially on editor openboolean
Checks if loops folds initially on editor openboolean
Checks if methods folds initially on editor openboolean
Checks if preprocessor blocks folds initially on editor openboolean
Checks if folding for preprocessor is enabledboolean
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 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
-