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)
Folding for methods is enabled by default.

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:
  • Field Details

    • PREPROCESSOR_FOLDING_ENABLED

      public static final String PREPROCESSOR_FOLDING_ENABLED
      Preference key for folding of preprocessor code blocks enablement
      See Also:
    • CONTROL_FLOW_ENABLED

      public static final String CONTROL_FLOW_ENABLED
      Preference key for folding of control flow statements enablement
      See Also:
    • TRY_EXCEPT_ENABLED

      public static final String TRY_EXCEPT_ENABLED
      Preference key for folding of try/except code blocks enablement
      See Also:
    • FOLD_METHODS_INITIALLY

      public static final String FOLD_METHODS_INITIALLY
      Preference key for initially folding of methods
      See Also:
    • FOLD_COMMENT_METHODS_INITIALLY

      public static final String FOLD_COMMENT_METHODS_INITIALLY
      Preference key for initially folding of methods comment
      See Also:
    • FOLD_LOOPS_INITIALLY

      public static final String FOLD_LOOPS_INITIALLY
      Preference key for initially folding of loops
      See Also:
    • FOLD_CONDITIONS_INITIALLY

      public static final String FOLD_CONDITIONS_INITIALLY
      Preference key for initially folding of conditions
      See Also:
    • FOLD_PREPROC_INITIALLY

      public static final String 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