diff options
Diffstat (limited to 'platform/lang-impl/src/com/intellij/formatting/FormatterEx.java')
-rw-r--r-- | platform/lang-impl/src/com/intellij/formatting/FormatterEx.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java b/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java index e9e8c130a6f4..f5417dfb5a25 100644 --- a/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java +++ b/platform/lang-impl/src/com/intellij/formatting/FormatterEx.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,7 +116,14 @@ public abstract class FormatterEx{ TextRange affectedRange); public abstract void setProgressTask(@NotNull FormattingProgressTask progressIndicator); - + + /** + * Calculates minimum spacing, allowed by formatting model (in columns) for a block starting at given offset, + * relative to its previous sibling block. + * Returns zero, if required block cannot be found at provided offset, or spacing cannot be calculated due to some other reason. + */ + public abstract int getSpacingForBlockAtOffset(FormattingModel model, int offset); + public interface IndentInfoStorage { void saveIndentInfo(@Nullable IndentInfo info, int startOffset); |