From bacf21dec8722db2902daa063629694beadc20f8 Mon Sep 17 00:00:00 2001 From: Rustam Vishnyakov Date: Tue, 31 May 2016 18:10:17 +0300 Subject: [PATCH] Refactoring: LineIndentProvider moved to lang-api, lineIndent package --- .../codeInsight/editorActions/JavaLineIndentProvider.java | 4 ++-- .../psi/codeStyle/lineIndent}/LineIndentProvider.java | 2 +- .../psi/codeStyle/lineIndent}/LineIndentProviderEP.java | 3 ++- .../psi/impl/source/codeStyle/CodeStyleFacadeImpl.java | 3 ++- .../{ => lineIndent}/FormatterBasedLineIndentProvider.java | 3 ++- .../{ => lineIndent}/JavaLikeLangLineIndentProvider.java | 5 +++-- .../platform-resources/src/META-INF/LangExtensionPoints.xml | 2 +- platform/platform-resources/src/META-INF/LangExtensions.xml | 2 +- 8 files changed, 14 insertions(+), 10 deletions(-) rename platform/{lang-impl/src/com/intellij/psi/impl/source/codeStyle => lang-api/src/com/intellij/psi/codeStyle/lineIndent}/LineIndentProvider.java (97%) rename platform/{lang-impl/src/com/intellij/psi/impl/source/codeStyle => lang-api/src/com/intellij/psi/codeStyle/lineIndent}/LineIndentProviderEP.java (92%) rename platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/{ => lineIndent}/FormatterBasedLineIndentProvider.java (92%) rename platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/{ => lineIndent}/JavaLikeLangLineIndentProvider.java (97%) diff --git a/java/java-impl/src/com/intellij/codeInsight/editorActions/JavaLineIndentProvider.java b/java/java-impl/src/com/intellij/codeInsight/editorActions/JavaLineIndentProvider.java index feb3ad1db87c..3857da0cc18d 100644 --- a/java/java-impl/src/com/intellij/codeInsight/editorActions/JavaLineIndentProvider.java +++ b/java/java-impl/src/com/intellij/codeInsight/editorActions/JavaLineIndentProvider.java @@ -19,14 +19,14 @@ import com.intellij.lang.Language; import com.intellij.lang.java.JavaLanguage; import com.intellij.psi.JavaTokenType; import com.intellij.psi.TokenType; -import com.intellij.psi.impl.source.codeStyle.JavaLikeLangLineIndentProvider; +import com.intellij.psi.impl.source.codeStyle.lineIndent.JavaLikeLangLineIndentProvider; import com.intellij.psi.impl.source.codeStyle.SemanticEditorPosition; import com.intellij.psi.tree.IElementType; import com.intellij.util.containers.HashMap; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import static com.intellij.psi.impl.source.codeStyle.JavaLikeLangLineIndentProvider.JavaLikeElement.*; +import static com.intellij.psi.impl.source.codeStyle.lineIndent.JavaLikeLangLineIndentProvider.JavaLikeElement.*; /** * @author Rustam Vishnyakov diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/LineIndentProvider.java b/platform/lang-api/src/com/intellij/psi/codeStyle/lineIndent/LineIndentProvider.java similarity index 97% rename from platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/LineIndentProvider.java rename to platform/lang-api/src/com/intellij/psi/codeStyle/lineIndent/LineIndentProvider.java index 78b5dcce0554..d2baf99b9cbe 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/LineIndentProvider.java +++ b/platform/lang-api/src/com/intellij/psi/codeStyle/lineIndent/LineIndentProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.psi.impl.source.codeStyle; +package com.intellij.psi.codeStyle.lineIndent; import com.intellij.lang.Language; import com.intellij.openapi.editor.Editor; diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/LineIndentProviderEP.java b/platform/lang-api/src/com/intellij/psi/codeStyle/lineIndent/LineIndentProviderEP.java similarity index 92% rename from platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/LineIndentProviderEP.java rename to platform/lang-api/src/com/intellij/psi/codeStyle/lineIndent/LineIndentProviderEP.java index d1f2c9f34a0f..3b7176609b73 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/LineIndentProviderEP.java +++ b/platform/lang-api/src/com/intellij/psi/codeStyle/lineIndent/LineIndentProviderEP.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.psi.impl.source.codeStyle; +package com.intellij.psi.codeStyle.lineIndent; import com.intellij.lang.Language; import com.intellij.openapi.extensions.ExtensionPointName; +import com.intellij.psi.codeStyle.lineIndent.LineIndentProvider; import org.jetbrains.annotations.Nullable; /** diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleFacadeImpl.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleFacadeImpl.java index 8473af9a7196..2ca18f1d0c7b 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleFacadeImpl.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/CodeStyleFacadeImpl.java @@ -27,9 +27,10 @@ import com.intellij.openapi.fileTypes.FileType; import com.intellij.openapi.options.Configurable; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiDocumentManager; -import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleManager; import com.intellij.psi.codeStyle.CodeStyleSettingsManager; +import com.intellij.psi.codeStyle.lineIndent.LineIndentProvider; +import com.intellij.psi.codeStyle.lineIndent.LineIndentProviderEP; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/FormatterBasedLineIndentProvider.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/FormatterBasedLineIndentProvider.java similarity index 92% rename from platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/FormatterBasedLineIndentProvider.java rename to platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/FormatterBasedLineIndentProvider.java index 7de5a996cddd..38e2812b02d5 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/FormatterBasedLineIndentProvider.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/FormatterBasedLineIndentProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.psi.impl.source.codeStyle; +package com.intellij.psi.impl.source.codeStyle.lineIndent; import com.intellij.lang.Language; import com.intellij.openapi.editor.Document; @@ -21,6 +21,7 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.Project; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.codeStyle.CodeStyleManager; +import com.intellij.psi.codeStyle.lineIndent.LineIndentProvider; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; diff --git a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/JavaLikeLangLineIndentProvider.java b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java similarity index 97% rename from platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/JavaLikeLangLineIndentProvider.java rename to platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java index 15c681139c0c..6974a8af543c 100644 --- a/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/JavaLikeLangLineIndentProvider.java +++ b/platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/lineIndent/JavaLikeLangLineIndentProvider.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.intellij.psi.impl.source.codeStyle; +package com.intellij.psi.impl.source.codeStyle.lineIndent; import com.intellij.formatting.IndentInfo; import com.intellij.lang.Language; @@ -26,6 +26,7 @@ import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import com.intellij.psi.codeStyle.CodeStyleSettingsManager; import com.intellij.psi.codeStyle.CommonCodeStyleSettings; +import com.intellij.psi.impl.source.codeStyle.SemanticEditorPosition; import com.intellij.psi.impl.source.codeStyle.SemanticEditorPosition.SyntaxElement; import com.intellij.psi.tree.IElementType; import com.intellij.util.text.CharArrayUtil; @@ -34,7 +35,7 @@ import org.jetbrains.annotations.Nullable; import static com.intellij.formatting.Indent.Type; import static com.intellij.formatting.Indent.Type.*; -import static com.intellij.psi.impl.source.codeStyle.JavaLikeLangLineIndentProvider.JavaLikeElement.*; +import static com.intellij.psi.impl.source.codeStyle.lineIndent.JavaLikeLangLineIndentProvider.JavaLikeElement.*; /** * A base class Java-like language line indent provider. If JavaLikeLangLineIndentProvider is unable to calculate diff --git a/platform/platform-resources/src/META-INF/LangExtensionPoints.xml b/platform/platform-resources/src/META-INF/LangExtensionPoints.xml index b1d266303395..dd2315af8b49 100644 --- a/platform/platform-resources/src/META-INF/LangExtensionPoints.xml +++ b/platform/platform-resources/src/META-INF/LangExtensionPoints.xml @@ -289,7 +289,7 @@ - + diff --git a/platform/platform-resources/src/META-INF/LangExtensions.xml b/platform/platform-resources/src/META-INF/LangExtensions.xml index b6d60fe42d55..6374f7eb25fe 100644 --- a/platform/platform-resources/src/META-INF/LangExtensions.xml +++ b/platform/platform-resources/src/META-INF/LangExtensions.xml @@ -953,7 +953,7 @@ - +