Class DelegatingCodeStyleManager

  • All Implemented Interfaces:
    com.intellij.psi.codeStyle.FormattingModeAwareIndentAdjuster
    Direct Known Subclasses:
    SpringCodeStyleManager

    public class DelegatingCodeStyleManager
    extends com.intellij.psi.codeStyle.CodeStyleManager
    implements com.intellij.psi.codeStyle.FormattingModeAwareIndentAdjuster
    CodeStyleManager implementation that delegates all calls.
    Author:
    Phillip Webb
    • Constructor Summary

      Constructors 
      Constructor Description
      DelegatingCodeStyleManager​(com.intellij.psi.codeStyle.CodeStyleManager delegate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      int adjustLineIndent​(com.intellij.openapi.editor.Document document, int offset)  
      int adjustLineIndent​(com.intellij.openapi.editor.Document document, int offset, com.intellij.formatting.FormattingMode mode)  
      int adjustLineIndent​(com.intellij.psi.PsiFile file, int offset)  
      void adjustLineIndent​(com.intellij.psi.PsiFile file, com.intellij.openapi.util.TextRange rangeToAdjust)  
      java.lang.String fillIndent​(com.intellij.psi.codeStyle.Indent indent, com.intellij.openapi.fileTypes.FileType fileType)
      Deprecated.
      com.intellij.formatting.FormattingMode getCurrentFormattingMode()  
      com.intellij.psi.codeStyle.CodeStyleManager getDelegate()  
      com.intellij.psi.codeStyle.DocCommentSettings getDocCommentSettings​(com.intellij.psi.PsiFile file)  
      com.intellij.psi.codeStyle.Indent getIndent​(java.lang.String text, com.intellij.openapi.fileTypes.FileType fileType)
      Deprecated.
      java.lang.String getLineIndent​(com.intellij.openapi.editor.Document document, int offset)  
      java.lang.String getLineIndent​(com.intellij.psi.PsiFile file, int offset)  
      java.lang.String getLineIndent​(com.intellij.psi.PsiFile file, int offset, com.intellij.formatting.FormattingMode mode)  
      int getMinLineFeeds​(com.intellij.psi.PsiFile file, int offset)  
      com.intellij.openapi.project.Project getProject()  
      int getSpacing​(com.intellij.psi.PsiFile file, int offset)  
      boolean isLineToBeIndented​(com.intellij.psi.PsiFile file, int offset)
      Deprecated.
      boolean isSequentialProcessingAllowed()  
      <T> T performActionWithFormatterDisabled​(com.intellij.openapi.util.Computable<T> r)  
      <T extends java.lang.Throwable>
      void
      performActionWithFormatterDisabled​(com.intellij.util.ThrowableRunnable<T> r)  
      void performActionWithFormatterDisabled​(java.lang.Runnable r)  
      com.intellij.psi.PsiElement reformat​(com.intellij.psi.PsiElement element)  
      com.intellij.psi.PsiElement reformat​(com.intellij.psi.PsiElement element, boolean canChangeWhiteSpacesOnly)  
      void reformatNewlyAddedElement​(com.intellij.lang.ASTNode block, com.intellij.lang.ASTNode addedElement)  
      com.intellij.psi.PsiElement reformatRange​(com.intellij.psi.PsiElement element, int startOffset, int endOffset)  
      com.intellij.psi.PsiElement reformatRange​(com.intellij.psi.PsiElement element, int startOffset, int endOffset, boolean canChangeWhiteSpacesOnly)  
      void reformatText​(com.intellij.psi.PsiFile file, int startOffset, int endOffset)  
      void reformatText​(com.intellij.psi.PsiFile file, java.util.Collection<com.intellij.openapi.util.TextRange> ranges)  
      void reformatTextWithContext​(com.intellij.psi.PsiFile file, com.intellij.psi.codeStyle.ChangedRangesInfo info)  
      void reformatTextWithContext​(com.intellij.psi.PsiFile file, java.util.Collection<com.intellij.openapi.util.TextRange> ranges)  
      void runWithDocCommentFormattingDisabled​(com.intellij.psi.PsiFile file, java.lang.Runnable runnable)  
      void scheduleIndentAdjustment​(com.intellij.openapi.editor.Document document, int offset)  
      void scheduleReformatWhenSettingsComputed​(com.intellij.psi.PsiFile file)  
      com.intellij.psi.codeStyle.Indent zeroIndent()
      Deprecated.
      • Methods inherited from class com.intellij.psi.codeStyle.CodeStyleManager

        getCurrentFormattingMode, getInstance, getInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DelegatingCodeStyleManager

        public DelegatingCodeStyleManager​(com.intellij.psi.codeStyle.CodeStyleManager delegate)
    • Method Detail

      • getDelegate

        public com.intellij.psi.codeStyle.CodeStyleManager getDelegate()
      • getSpacing

        public int getSpacing​(com.intellij.psi.PsiFile file,
                              int offset)
        Overrides:
        getSpacing in class com.intellij.psi.codeStyle.CodeStyleManager
      • getMinLineFeeds

        public int getMinLineFeeds​(com.intellij.psi.PsiFile file,
                                   int offset)
        Overrides:
        getMinLineFeeds in class com.intellij.psi.codeStyle.CodeStyleManager
      • runWithDocCommentFormattingDisabled

        public void runWithDocCommentFormattingDisabled​(com.intellij.psi.PsiFile file,
                                                        java.lang.Runnable runnable)
        Overrides:
        runWithDocCommentFormattingDisabled in class com.intellij.psi.codeStyle.CodeStyleManager
      • getDocCommentSettings

        public com.intellij.psi.codeStyle.DocCommentSettings getDocCommentSettings​(com.intellij.psi.PsiFile file)
        Overrides:
        getDocCommentSettings in class com.intellij.psi.codeStyle.CodeStyleManager
      • getProject

        public com.intellij.openapi.project.Project getProject()
        Specified by:
        getProject in class com.intellij.psi.codeStyle.CodeStyleManager
      • reformat

        public com.intellij.psi.PsiElement reformat​(com.intellij.psi.PsiElement element)
                                             throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformat in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformat

        public com.intellij.psi.PsiElement reformat​(com.intellij.psi.PsiElement element,
                                                    boolean canChangeWhiteSpacesOnly)
                                             throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformat in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformatRange

        public com.intellij.psi.PsiElement reformatRange​(com.intellij.psi.PsiElement element,
                                                         int startOffset,
                                                         int endOffset)
                                                  throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformatRange in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformatRange

        public com.intellij.psi.PsiElement reformatRange​(com.intellij.psi.PsiElement element,
                                                         int startOffset,
                                                         int endOffset,
                                                         boolean canChangeWhiteSpacesOnly)
                                                  throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformatRange in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformatText

        public void reformatText​(com.intellij.psi.PsiFile file,
                                 int startOffset,
                                 int endOffset)
                          throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformatText in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformatText

        public void reformatText​(com.intellij.psi.PsiFile file,
                                 java.util.Collection<com.intellij.openapi.util.TextRange> ranges)
                          throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformatText in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformatTextWithContext

        public void reformatTextWithContext​(com.intellij.psi.PsiFile file,
                                            java.util.Collection<com.intellij.openapi.util.TextRange> ranges)
                                     throws com.intellij.util.IncorrectOperationException
        Overrides:
        reformatTextWithContext in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • reformatTextWithContext

        public void reformatTextWithContext​(com.intellij.psi.PsiFile file,
                                            com.intellij.psi.codeStyle.ChangedRangesInfo info)
                                     throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformatTextWithContext in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • adjustLineIndent

        public void adjustLineIndent​(com.intellij.psi.PsiFile file,
                                     com.intellij.openapi.util.TextRange rangeToAdjust)
                              throws com.intellij.util.IncorrectOperationException
        Specified by:
        adjustLineIndent in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • adjustLineIndent

        public int adjustLineIndent​(com.intellij.psi.PsiFile file,
                                    int offset)
                             throws com.intellij.util.IncorrectOperationException
        Specified by:
        adjustLineIndent in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • adjustLineIndent

        public int adjustLineIndent​(com.intellij.openapi.editor.Document document,
                                    int offset)
        Specified by:
        adjustLineIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • isLineToBeIndented

        @Deprecated
        public boolean isLineToBeIndented​(com.intellij.psi.PsiFile file,
                                          int offset)
        Deprecated.
        Specified by:
        isLineToBeIndented in class com.intellij.psi.codeStyle.CodeStyleManager
      • getLineIndent

        public java.lang.String getLineIndent​(com.intellij.psi.PsiFile file,
                                              int offset)
        Specified by:
        getLineIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • getLineIndent

        public java.lang.String getLineIndent​(com.intellij.openapi.editor.Document document,
                                              int offset)
        Specified by:
        getLineIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • getLineIndent

        public java.lang.String getLineIndent​(com.intellij.psi.PsiFile file,
                                              int offset,
                                              com.intellij.formatting.FormattingMode mode)
        Overrides:
        getLineIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • getIndent

        @Deprecated
        public com.intellij.psi.codeStyle.Indent getIndent​(java.lang.String text,
                                                           com.intellij.openapi.fileTypes.FileType fileType)
        Deprecated.
        Specified by:
        getIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • fillIndent

        @Deprecated
        public java.lang.String fillIndent​(com.intellij.psi.codeStyle.Indent indent,
                                           com.intellij.openapi.fileTypes.FileType fileType)
        Deprecated.
        Specified by:
        fillIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • zeroIndent

        @Deprecated
        public com.intellij.psi.codeStyle.Indent zeroIndent()
        Deprecated.
        Specified by:
        zeroIndent in class com.intellij.psi.codeStyle.CodeStyleManager
      • reformatNewlyAddedElement

        public void reformatNewlyAddedElement​(com.intellij.lang.ASTNode block,
                                              com.intellij.lang.ASTNode addedElement)
                                       throws com.intellij.util.IncorrectOperationException
        Specified by:
        reformatNewlyAddedElement in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        com.intellij.util.IncorrectOperationException
      • isSequentialProcessingAllowed

        public boolean isSequentialProcessingAllowed()
        Specified by:
        isSequentialProcessingAllowed in class com.intellij.psi.codeStyle.CodeStyleManager
      • performActionWithFormatterDisabled

        public void performActionWithFormatterDisabled​(java.lang.Runnable r)
        Specified by:
        performActionWithFormatterDisabled in class com.intellij.psi.codeStyle.CodeStyleManager
      • performActionWithFormatterDisabled

        public <T extends java.lang.Throwable> void performActionWithFormatterDisabled​(com.intellij.util.ThrowableRunnable<T> r)
                                                                                throws T extends java.lang.Throwable
        Specified by:
        performActionWithFormatterDisabled in class com.intellij.psi.codeStyle.CodeStyleManager
        Throws:
        T extends java.lang.Throwable
      • performActionWithFormatterDisabled

        public <T> T performActionWithFormatterDisabled​(com.intellij.openapi.util.Computable<T> r)
        Specified by:
        performActionWithFormatterDisabled in class com.intellij.psi.codeStyle.CodeStyleManager
      • adjustLineIndent

        public int adjustLineIndent​(com.intellij.openapi.editor.Document document,
                                    int offset,
                                    com.intellij.formatting.FormattingMode mode)
        Specified by:
        adjustLineIndent in interface com.intellij.psi.codeStyle.FormattingModeAwareIndentAdjuster
      • getCurrentFormattingMode

        public com.intellij.formatting.FormattingMode getCurrentFormattingMode()
        Specified by:
        getCurrentFormattingMode in interface com.intellij.psi.codeStyle.FormattingModeAwareIndentAdjuster
      • scheduleIndentAdjustment

        public void scheduleIndentAdjustment​(com.intellij.openapi.editor.Document document,
                                             int offset)
        Overrides:
        scheduleIndentAdjustment in class com.intellij.psi.codeStyle.CodeStyleManager
      • scheduleReformatWhenSettingsComputed

        public void scheduleReformatWhenSettingsComputed​(com.intellij.psi.PsiFile file)
        Overrides:
        scheduleReformatWhenSettingsComputed in class com.intellij.psi.codeStyle.CodeStyleManager