Closed JulioJu closed 2 years ago
@JulioJu thanks! Now, depending on the content you want to add, I suggest you write the doc in the wiki instead, and link to that from the readme.
@fbricon thanks for your answer,
Maybe add simply something like :
You could customize compiler options and code assists of the server. Under your project folder, modify the file
.settings/org.eclipse.jdt.core.prefs
with options presented at https://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html.
As it's very short, maybe could me indicated in the README ?
sure go ahead
Hi there,
Hope this helps:
### Pattern:
### <option ID>=<default value> # Possible values or value description
org.eclipse.jdt.core.builder.cleanOutputFolder=clean # { "clean", "ignore" }
org.eclipse.jdt.core.builder.duplicateResourceTask=warning # { "error", "warning" }
org.eclipse.jdt.core.builder.invalidClasspath=abort # { "abort", "ignore" }
org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore # { "enabled", "ignore" }
org.eclipse.jdt.core.builder.resourceCopyExclusionFilter= # { "<name>[,<name>]* } where <name> is a file name pattern (* and ? wild-cards allowed) or the name of a folder which ends with '/'
org.eclipse.jdt.core.circularClasspath=error # { "error", "warning" }
org.eclipse.jdt.core.classpath.exclusionPatterns=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error # { "error", "ignore" }
org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error # { "error", "warning", "ignore" }
org.eclipse.jdt.core.codeComplete.argumentPrefixes= # { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.argumentSuffixes= # { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.camelCaseMatch=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.deprecationCheck=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.discouragedReferenceCheck=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.fieldPrefixes= # { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.fieldSuffixes= # { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.forbiddenReferenceCheck=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.forceImplicitQualification=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.localPrefixes= # { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.localSuffixes= # { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= # { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= # { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= # { "<prefix>[,<prefix>]*" } where <prefix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= # { "<suffix>[,<suffix>]*" } where <suffix> is a String without any wild-card
org.eclipse.jdt.core.codeComplete.subwordMatch=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.suggestStaticImports=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.codeComplete.visibilityCheck=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled # { "disabled", "enabled" }
org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore # { "error", "warning", "info", "ignore" }.
org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= # A comma-separated list of legal, fully qualified Java type names; each name in the list must resolve to an annotation type.
org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull # Any legal, fully qualified Java type name; must resolve to an annotation type.
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= # A comma-separated list of legal, fully qualified Java type names; each name in the list must resolve to an annotation type.
org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault # Any legal, fully qualified Java type name; must resolve to an annotation type. That annotation type should have exactly one boolean parameter.
org.eclipse.jdt.core.compiler.annotation.nullable.secondary= # A comma-separated list of legal, fully qualified Java type names; each name in the list must resolve to an annotation type.
org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable # Any legal, fully qualified Java type name; must resolve to an annotation type.
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled # { "disabled", "enabled" }
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate # { "generate", "do not generate" }
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2 # { "1.1", "cldc1.1", "1.2", "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "9", "10", "11" }
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve # { "preserve", "optimize out" }
org.eclipse.jdt.core.compiler.compliance=1.4 # { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "9", "10", "11" }
org.eclipse.jdt.core.compiler.debug.lineNumber=generate # { "generate", "do not generate" }
org.eclipse.jdt.core.compiler.debug.localVariable=generate # { "generate", "do not generate" }
org.eclipse.jdt.core.compiler.debug.sourceFile=generate # { "generate", "do not generate" }
org.eclipse.jdt.core.compiler.doc.comment.support=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 # "<n>" where <n> is zero or a positive integer (if zero then all problems are reported).
org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.APILeak=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.booleanMethodThrowingException=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.deadCode=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.deadCodeInTrivialIfStatement=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.deprecation=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public # { "public", "protected", "default", "private" }
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public # { "public", "protected", "default", "private" }
org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag # { "return_tag", "all_standard_tags", "no_tag" }
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public # { "public", "protected", "default", "private" }
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.nullReference=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error # { "error", "warning" }
org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.overridingMethodWithoutSuperInvocation=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning # { "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled # { "disabled", "enabled" }
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedImport=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning # { "error", "warning", "info", "ignore" }
org.eclipse.jdt.core.compiler.release=disabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.source=1.3 # { "1.3", "1.4", "1.5", "1.6", "1.7", "1.8", "9", "10", "11" }
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled # { "enabled", "disabled" }
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL # { "<priority>[,<priority>]*" } where <priority> is one of "HIGH", "NORMAL" or "LOW"
org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX # { "<tag>[,<tag>]*" } where <tag> is a String without any wild-card or leading/trailing spaces
org.eclipse.jdt.core.computeJavaBuildOrder=ignore # { "compute", "ignore" }
org.eclipse.jdt.core.encoding= # It seems like immutable, uses platform default value
org.eclipse.jdt.core.incompatibleJDKLevel=ignore # { "error", "warning", "ignore" }
org.eclipse.jdt.core.incompleteClasspath=error # { "error", "warning"}
org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter # The ID of the formatter to use in formatting operations.
org.eclipse.jdt.core.timeoutForParameterNameFromAttachedJavadoc=50 # "<n>", where n is an integer greater than or equal to 0
Snapshot from page https://help.eclipse.org/2020-12/index.jsp?topic=%2Forg.eclipse.jdt.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fjdt%2Fcore%2FJavaCore.html
A Crawler trick, regexp is Option id:\n"([^"]+)"\n(Possible values:\n([^\n]+\n))?(Default:\n"([^"]*)"\n)?
=> $1=$5 # $3
I've added the entries under https://github.com/redhat-developer/vscode-java/wiki/Settings-Global-Preferences#java-compiler-options only because there was already a global preference page there. We could probably move that entire page under JDT-LS and link accordingly.
I generated the results from the source file since the javadoc is the result of a build/release and the sources can be accessed directly in the repo. I could add the default values as well.
Maybe it could be cool to write a short paragraph in the README.md to explain how to manage warning preferences ?
And add a link to the corresponding doc at https://help.eclipse.org/neon/topic/org.eclipse.jdt.doc.isv/reference/api/org/eclipse/jdt/core/JavaCore.html ?
If you are ok I could make a PR.
See also https://github.com/eclipse/eclipse.jdt.ls/issues/581