From d1fbdec880694640a14bd11b5173e4f98f9bd0b7 Mon Sep 17 00:00:00 2001 From: Nikolay Chashnikov Date: Wed, 25 Jun 2025 10:05:24 +0300 Subject: [PATCH] [java compiler] API cleanup: mark Compiler.validateConfiguration as deprecated and remove implementations This is needed to avoid confusion since the method isn't called by the compilation engine anymore. GitOrigin-RevId: ad95b74748623596cef8dd5a094a2b99c99c3c6e --- .../compiler/util/InspectionValidatorWrapper.java | 5 ----- .../src/com/intellij/openapi/compiler/Compiler.java | 11 ++++++----- .../intellij/uiDesigner/make/Form2SourceCompiler.java | 5 ----- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/java/compiler/impl/src/com/intellij/openapi/compiler/util/InspectionValidatorWrapper.java b/java/compiler/impl/src/com/intellij/openapi/compiler/util/InspectionValidatorWrapper.java index bf6e36d23444..f7a7096bf17f 100644 --- a/java/compiler/impl/src/com/intellij/openapi/compiler/util/InspectionValidatorWrapper.java +++ b/java/compiler/impl/src/com/intellij/openapi/compiler/util/InspectionValidatorWrapper.java @@ -367,11 +367,6 @@ public final class InspectionValidatorWrapper implements Validator { return myValidator.getDescription(); } - @Override - public boolean validateConfiguration(CompileScope scope) { - return true; - } - @Override public ValidityState createValidityState(DataInput in) throws IOException { return PsiElementsValidityState.load(in); diff --git a/java/compiler/openapi/src/com/intellij/openapi/compiler/Compiler.java b/java/compiler/openapi/src/com/intellij/openapi/compiler/Compiler.java index 2c6da0ff8ff0..2a4e23a3e194 100644 --- a/java/compiler/openapi/src/com/intellij/openapi/compiler/Compiler.java +++ b/java/compiler/openapi/src/com/intellij/openapi/compiler/Compiler.java @@ -27,10 +27,11 @@ public interface Compiler { String getDescription(); /** - * Called before compilation starts. If at least one of registered compilers returned false, compilation won't start. - * - * @param scope the scope on which the compilation is started. - * @return true if everything is ok, false otherwise + * @deprecated isn't called by the compilation engine anymore; if the configuration of a specific compiled is invalid, it should report an + * error via {@link CompileContext#addMessage}. */ - boolean validateConfiguration(CompileScope scope); + @Deprecated(forRemoval = true) + default boolean validateConfiguration(CompileScope scope) { + return true; + } } diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/make/Form2SourceCompiler.java b/plugins/ui-designer/src/com/intellij/uiDesigner/make/Form2SourceCompiler.java index 17ebf2611d93..3537018c34c4 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/make/Form2SourceCompiler.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/make/Form2SourceCompiler.java @@ -57,11 +57,6 @@ public final class Form2SourceCompiler implements SourceInstrumentingCompiler{ return UIDesignerBundle.message("component.gui.designer.form.to.source.compiler"); } - @Override - public boolean validateConfiguration(CompileScope scope) { - return true; - } - @Override public ProcessingItem @NotNull [] getProcessingItems(final @NotNull CompileContext context) { final Project project = context.getProject();