public final class PostprocessReformattingAspect extends java.lang.Object implements PomModelAspect
Constructor and Description |
---|
PostprocessReformattingAspect(Project project) |
Modifier and Type | Method and Description |
---|---|
void |
assertDocumentChangeIsAllowed(FileViewProvider viewProvider)
Checks that view provider doesn't contain any PSI modifications which will be used in postponed formatting and may conflict with
changes made to the document.
|
static void |
assertDocumentChangeIsAllowed(PsiFile file) |
void |
clear() |
<T> T |
disablePostprocessFormattingInside(Computable<T> computable) |
void |
disablePostprocessFormattingInside(java.lang.Runnable runnable) |
void |
doPostponedFormatting() |
void |
doPostponedFormatting(FileViewProvider viewProvider) |
static PostprocessReformattingAspect |
getInstance(Project project) |
boolean |
isDisabled() |
boolean |
isViewProviderLocked(FileViewProvider fileViewProvider) |
<T> T |
postponeFormattingInside(Computable<T> computable) |
void |
postponeFormattingInside(java.lang.Runnable runnable) |
void |
update(PomModelEvent event) |
public PostprocessReformattingAspect(Project project)
public void disablePostprocessFormattingInside(java.lang.Runnable runnable)
public <T> T disablePostprocessFormattingInside(Computable<T> computable)
public void postponeFormattingInside(java.lang.Runnable runnable)
public <T> T postponeFormattingInside(Computable<T> computable)
public void update(PomModelEvent event)
update
in interface PomModelAspect
public void doPostponedFormatting()
public void doPostponedFormatting(FileViewProvider viewProvider)
public boolean isViewProviderLocked(FileViewProvider fileViewProvider)
public static void assertDocumentChangeIsAllowed(PsiFile file)
public void assertDocumentChangeIsAllowed(FileViewProvider viewProvider)
viewProvider
- The view provider to validate.java.lang.RuntimeException
- If the assertion fails.public static PostprocessReformattingAspect getInstance(Project project)
public boolean isDisabled()
public void clear()