jdt core - build notes 3.1 stream
java development tooling core |
Here are the build notes for the Eclipse JDT/Core plug-in project
org.eclipse.jdt.core,
describing bug resolution and substantial changes in the HEAD branch.
This present document covers all changes since Release 3.0 (also see a summary of API changes).
Maintenance of previous releases of JDT/Core is performed in parallel branches: R3.0.x, R2.1.x, R2.0.x, R1.0.x. |
In order to challenge this, before UI preferences are added, you may edit manually preference files and add the following lines (tuned for Eclipse development rules):
org.eclipse.jdt.core.compiler.accessRestriction.import.exclude=**/internal/ org.eclipse.jdt.core.compiler.accessRestriction.export.exclude=**/internal/ org.eclipse.jdt.core.compiler.problem.forbiddenReference=warningNote that the workspace default preferences are located in:
<workspace>\.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.jdt.core.prefs
,
and can be refined on a project basis (see <project>/.settings/org.eclipse.jdt.core.prefs
)
Corresponding problem marker ID is IProblem.ForbiddenReference
.
* COMPILER / Reporting Forbidden Reference to Type with Restricted Access * When enabled, the compiler will issue an error or a warning when referring to a type with restricted access, as defined according * to the access restriction specifications. * - option id: "org.eclipse.jdt.core.compiler.problem.forbiddenReference" * - possible values: { "error", "warning", "ignore" } * - default: "ignore" * * COMPILER / Define the Inclusion Rules for Import Access Restriction * When the inclusion rule list is not empty, the compiler will issue a problem marker whenever it encounters a reference * to type defined outside the current project, and for which the file path does not match the inclusion rule (the file path is * considered only relatively to its containing source or library root path, e.g. "java/lang/" would include all types located * in package "java.lang"). Note that in case both exclusion and inclusion rules are specified, exclusion rules will prevail. * Also note that when imported types are contributed from sources of a prerequisite project, the export restrictions * of the prerequisite will automatically apply as well (import restrictions do not override export ones). * - option id: "org.eclipse.jdt.core.compiler.accessRestriction.import.include" * - possible values: { "<pattern>[,<pattern>]*" } where <pattern> is an Ant file pattern, allowing use of '**,'*' and '?' wildcards * - default: "" * * COMPILER / Define the Exclusion Rules for Import Access Restriction * When the exclusion rule list is not empty, the compiler will issue a problem marker whenever it encounters a reference * to a type defined outside the current project, and for which the file path does not match the exclusion rule (the file path is * considered only relatively to its containing source or library root path, e.g. "java/lang/" would exclude all types located * in package "java.lang"). Note that in case both exclusion and inclusion rules are specified, exclusion rules will prevail. * Also note that when imported types are contributed from sources of a prerequisite project, the export restrictions * of the prerequisite will automatically apply as well (import restrictions do not override export ones). * - option id: "org.eclipse.jdt.core.compiler.accessRestriction.import.exclude" * - possible values: { "<pattern>[,<pattern>]*" } where <pattern> is an Ant file pattern, allowing use of '**,'*' and '?' wildcards * - default: "" * * COMPILER / Define the Inclusion Rules for Export Access Restriction * A project can be associated with export restrictions, so as not to expose portions of its implementation to dependent * project. When the inclusion rule list is not empty, the compiler will recognize certain types to be exported based on these * inclusion rules. If a non exported type is directy referenced outside its defining project, then the compiler will issue a * problem marker. Inclusion rules are described in term of file path, relative to their containing source root path, * e.g. "java/lang/" would export all types located in package "java.lang"). Note that in case both exclusion and inclusion * rules are specified, exclusion rules will prevail. * Also note that an export restriction on prereq project cannot be overriden by an import restriction on dependent project. * Export restrictions are checked before considering import ones. * - option id: "org.eclipse.jdt.core.compiler.accessRestriction.export.include" * - possible values: { "<pattern>[,<pattern>]*" } where <pattern> is an Ant file pattern, allowing use of '**,'*' and '?' wildcards * - default: "" * * COMPILER / Define the Exclusion Rules for Export Access Restriction * A project can be associated with export restrictions, so as not to expose portions of its implementation to dependent * project. When the inclusion rule list is not empty, the compiler will recognize certain types to be exported based on these * exclusion rules. If a non exported type is directy referenced outside its defining project, then the compiler will issue a * problem marker. Inclusion rules are described in term of file path, relative to their containing source root path, * e.g. "java/lang/" would export all types located in package "java.lang"). Note that in case both exclusion and inclusion * rules are specified, exclusion rules will prevail. * Also note that an export restriction on prereq project cannot be overriden by an import restriction on dependent project. * Export restrictions are checked before considering import ones. * - option id: "org.eclipse.jdt.core.compiler.accessRestriction.export.exclude" * - possible values: { "<pattern>[,<pattern>]*" } where <pattern> is an Ant file pattern, allowing use of '**,'*' and '?' wildcards * - default: ""
IBinding#getJavaElement()
to get the Java element corresponding to a
org.eclipse.jdt.core.dom.IBinding
.
ITypeParameter
s are no longer children of their IType
or IMethod
.
To get the type parameters of a type or a method use IType/IMethod#getTypeParameters()
.TypeParameter#ENABLED
has been removed.ICodeAssist#codeSelect()
) return a ITypeParameter
when a type
parameter is selected.* COMPILER / Reporting Usage of 'enum' Identifier * When enabled, the compiler will issue an error or a warning whenever 'enum' is * used as an identifier (reserved keyword in 1.5) * - option id: "org.eclipse.jdt.core.compiler.problem.enumIdentifier" * - possible values: { "error", "warning", "ignore" } * - default: "warning"
ITypeParameter
that represents a formal type parameter in a generic type or method.
Note types and methods should have type parameters as children, but this is currently disabled as JDT UI doesn't support
this kind of element yet.
To enable set org.eclipse.jdt.internal.core.TypeParameter#ENABLED
to true
.* COMPILER / Reporting Missing Declaration of serialVersionUID Field on Serializable Class * When enabled, the compiler will issue an error or a warning whenever a serializable class is missing a local declaration * of a serialVersionUID field. This field must be declared as static final and be of type long. * - option id: "org.eclipse.jdt.core.compiler.problem.missingSerialVersion" * - possible values: { "error", "warning", "ignore" } * - default: "warning"
isConstructor()
and isSynthetic()
getters to MethodReferenceMatch.
SearchRequestor
) accepts this kind of match,
it can now distinguish between method and constructor reference matches. It can also know
if a constructor reference match is a default constructor or use an implicit super call.
* COMPILER / Setting Compliance Level * Select the compliance level for the compiler. In "1.3" mode, source and target settings * should not go beyond "1.3" level. * - option id: "org.eclipse.jdt.core.compiler.compliance" * - possible values: { "1.3", "1.4", "1.5" } * - default: "1.4" * * COMPILER / Setting Source Compatibility Mode * Specify whether which source level compatibility is used. From 1.4 on, 'assert' is a keyword * reserved for assertion support. Also note, than when toggling to 1.4 mode, the target VM * level should be set to "1.4" and the compliance mode should be "1.4". * Source level 1.5 is necessary to enable generics, autoboxing, covariance, annotations, enumerations * enhanced for loop, static imports and varargs. Once toggled, the target VM level should be set to "1.5" * and the compliance mode should be "1.5". * - option id: "org.eclipse.jdt.core.compiler.source" * - possible values: { "1.3", "1.4", "1.5" } * - default: "1.3" * * COMPILER / Defining Target Java Platform * For binary compatibility reason, .class files can be tagged to with certain VM versions and later. * Note that "1.4" target require to toggle compliance mode to "1.4" too. Similarily, "1.5" target require * to toggle compliance mode to "1.5". * - option id: "org.eclipse.jdt.core.compiler.codegen.targetPlatform" * - possible values: { "1.1", "1.2", "1.3", "1.4", "1.5" } * - default: "1.2" * * COMPILER / Reporting Unsafe Type Operation * When enabled, the compiler will issue an error or a warning whenever an operation involves generic types, and potentially * invalidates type safety since involving raw types (e.g. invoking #foo(X) with arguments (X)). * - option id: "org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation" * - possible values: { "error", "warning", "ignore" } * - default: "warning" * * COMPILER / Reporting final Bound for Type Parameter * When enabled, the compiler will issue an error or a warning whenever a generic type parameter is associated with a * bound corresponding to a final type; since final types cannot be further extended, the parameter is pretty useless. * - option id: "org.eclipse.jdt.core.compiler.problem.finalParameterBound" * - possible values: { "error", "warning", "ignore" } * - default: "ignore"