From ffb1d836eeefb7c85ea65953a349498ce910503d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 4 Sep 2024 12:06:15 -0400 Subject: [PATCH] Fix some more error ids Signed-off-by: David Thompson --- .../jdt/internal/javac/JavacProblemConverter.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/JavacProblemConverter.java b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/JavacProblemConverter.java index cbdc9e0047e..2210f6ceb0e 100644 --- a/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/JavacProblemConverter.java +++ b/org.eclipse.jdt.core.javac/src/org/eclipse/jdt/internal/javac/JavacProblemConverter.java @@ -997,6 +997,17 @@ yield switch (rootCauseCode) { case "compiler.err.switch.expression.empty" -> IProblem.SwitchExpressionsYieldMissingDefaultCase; case "compiler.err.return.outside.switch.expression" -> IProblem.SwitchExpressionsReturnWithinSwitchExpression; case "compiler.err.cant.apply.diamond.1" -> IProblem.NonGenericType; + case "compiler.err.class.in.unnamed.module.cant.extend.sealed.in.diff.package" -> IProblem.SealedPermittedTypeOutsideOfPackage; + case "compiler.err.non.sealed.or.sealed.expected" -> IProblem.SealedMissingInterfaceModifier; + case "compiler.err.array.dimension.missing" -> IProblem.MustDefineEitherDimensionExpressionsOrInitializer; + case "compiler.warn.deprecated.annotation.has.no.effect" -> IProblem.TypeRelated; // not in ECJ + case "compiler.err.enum.constant.not.expected" -> IProblem.UndefinedMethod; + case "compiler.warn.poor.choice.for.module.name" -> IProblem.ModuleRelated; + case "compiler.err.try.without.catch.finally.or.resource.decls" -> IProblem.Syntax; + case "compiler.warn.unchecked.meth.invocation.applied" -> IProblem.UnsafeTypeConversion; + case "compiler.err.encl.class.required" -> IProblem.MissingEnclosingInstanceForConstructorCall; + case "compiler.err.operator.cant.be.applied" -> IProblem.InvalidOperator; + case "compiler.warn.try.resource.not.referenced" -> IProblem.LocalVariableIsNeverUsed; // not in ECJ default -> { ILog.get().error("Could not convert diagnostic (" + diagnostic.getCode() + ")\n" + diagnostic); yield 0;