Skip to main content

JDT Core R3.1.x

Back to Development Resources.

What's Happening?

This section describes the JDT/Core implementation of the official plan.

 Rollup 3.1.3 - NOT PLANNED!
  • preview available in Updates area.
 Rollup 3.1.2 - completed on 2006/01/26  Rollup 3.1.1 - completed on 2005/10/03  Release 3.1.0 - completed on 2005/06/28
  • available on the download area.
  • final build notes
  • Incremental Java Compiler
    • support for J2SE 5.0 features: (jsr-176)
    • provide support for restraining access to prerequisites (import/export rules): (29865)
      • diagnose forbidden/discouraged references
      • diagnosis for missing javadoc could selectively be enabled only in exported region of a project (i.e. only document API)
    • provide support for shareable compiler settings (59258)
  • Java Model
    • leverage support for J2SE 5.0 features.
    • remove dependency to old JDOM in JavaModel implementation (using DOM AST rewrite instead) (77894) (2 weeks)
    • [optional] adopt all types cache (36899) (2 weeks)
    • provide classpath attributes (e.g. to store javadoc location) (22969)
  • Code Assist
    • leverage support for J2SE 5.0 features.
    • leverage access restriction rules into completion relevance (forbidden references should not be very relevant)
  • Search
    • leverage support for J2SE 5.0 features.
    • add visibility to ITypeNameRequestor requestor API (36896) (1 week)
  • DOM AST
    • leverage support for J2SE 5.0 features.
    • adopt helper (refactoring) methods in Binding and ASTNode (36900)
    • provide support for batching DOM AST creation (requestor based API to optimize footprint) (73675)
    • bridge the gap in between model and DOM AST (handle<--->ast/binding) (73669)
    • surface more compiler functionalities on DOM bindings, so as to provide override rules, type compatibility rules. (73676)
  • Code Formatter
    • leverage support for J2SE 5.0 features.

Feature List

Work items completed in the 3.1 stream, also see build notes.

 Incremental Java Compiler
  • From target 1.5 on, the JSR bytecode instruction is no longer generated. As a consequence, the corresponding compiler option status will be ignored as soon as -target 1.5 or -target 5 is specified.
  • Batch compiler defaults to 1.5 source and target, when toggled in 1.5 compliant mode ("-1.5" or "-5").
  • Cast/instanceof operations are now fully supported, along with extra diagnosis for unsafe type operations.
  • Explicit parameterizations of message sends and constructor calls are also supported.
  • Wildcard type compatibilities got reworked quite significantly. In particular, it now diagnoses usage of methods which parameters are of wildcard type (see 59641).
  • Can now issue synthetic bridge methods for allowing overriding to parameterized methods.
  • Digest generic methods and perform type inference.
  • It also recognizes the Object.getClass() method and perform adequate substitutions (see 57784).
  • Properly decode signatures of parameterized member types which are flourishing in 1.5 class libs
  • Support for hexadecimal floating-point literals (in 1.5 mode only).
  • Support for static imports was added.
  • Support for enumeration was added.
  • Access restrictions can be defined in the classpath, and the compiler will diagnose access to types that are not accessible.
  • Problem descriptions show ellipsis in varargs method signatures
  • Compiler is able to parse 1.5 syntax in Javadoc comments
  • Support for annotation was added. @Target and @Override annotations are recognized by the compiler.
  • Support for autoboxing was added.
  • JavaCore 1.5 specific options. Either augmented to consider 1.5 or added.

    * 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"
    *
    * 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 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"
    *
    * 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: "warning"
    *
    * COMPILER / Reporting Invalid Javadoc Tags with Deprecated References
    * Specify whether the compiler will report deprecated references used in Javadoc tags.
    * Note that this diagnosis can be enabled based on the visibility of the construct associated with the Javadoc;
    * also see the setting "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility".
    * - option id: "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef"
    * - possible values: { "enabled", "disabled" }
    * - default: "enabled"
    *
    * COMPILER / Reporting Invalid Javadoc Tags with Not Visible References
    * Specify whether the compiler will report non-visible references used in Javadoc tags.
    * Note that this diagnosis can be enabled based on the visibility of the construct associated with the Javadoc;
    * also see the setting "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility".
    * - option id: "org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef"
    * - possible values: { "enabled", "disabled" }
    * - default: "enabled"
    *
    * COMPILER / Reporting Varargs Argument Needing a Cast in Method/Constructor Invocation
    * When enabled, the compiler will issue an error or a warning whenever a varargs arguments should be cast
    * when passed to a method/constructor invocation. (e.g. Class.getMethod(String name, Class ... args )
    * invoked with arguments ("foo", null)).
    * - option id: "org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast"
    * - possible values: { "error", "warning", "ignore" }
    * - default: "warning"
    *
    * COMPILER / Reporting Boxing/Unboxing Conversion
    * When enabled, the compiler will issue an error or a warning whenever a boxing or an unboxing
    * conversion is performed.
    * - option id: "org.eclipse.jdt.core.compiler.problem.autoboxing"
    * - possible values: { "error", "warning", "ignore" }
    * - default: "ignore"
    *
    * COMPILER / Reporting Unchecked 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<String>) with arguments (X)).
    * - option id: "org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation"
    * - possible values: { "error", "warning", "ignore" }
    * - default: "warning"

 Java Model
  • ITypes and IMethods know about their type parameters (ITypeParameter)
  • Resource change listeners react to encoding change.
  • Varargs are supported in the Java model.
  • Disassembler shows constant pool contents.
  • Hierarchies on enumerations and annotations are supported.
  • The internal Java model cache adapts to the number of elements in the workspace.
  • Support for handling annotation types and annotations was added in Java model.
  • Validation of type parameter names.
  • Creation of a type hierarchy on an IRegion independently of a project.
  • Java model operations are now working on local, anonymous, enumerations and annotation types.
  • Types, fields and methods can be asked for their binding keys.
 DOM AST
  • Added support for parameterized/generic to DOM AST
  • A binding can returns the corresponding IJavaElement.
  • Enum constants are now in a separate list from the body declarations.
  • ASTs can be created and resolved in batch.
  • Compatibility rules APIs
  • Added support to create DOM bindings from Java elements
 Code Assist
  • Generic types completion is available
  • Type parameters are proposed as possible completions
  • Static imports are used to propose completions
  • Types that are not accessible (through access restrictions) can be filtered out
  • CompletionRequestor replaces ICompletionRequestor.
  • Methods are proposed in static imports.
  • Annotation and annotation types completion is available.
  • Options added for code assist:
     * CODEASSIST / Activate Access Restrictions Sensitive Completion
    * When active, completion doesn't show that is access restricted.
    * - option id: "org.eclipse.jdt.core.codeComplete.restrictionsCheck"
    * - possible values: { "enabled", "disabled" }
    * - default: "disabled"
  • A completion proposal can be asked for its binding key or for the binding key of its declaring type.
  • Special resolved handles are returned using code select.
 Code Select
  • Selecting a type parameter opens its declaration
  • Resolved handles are returned when selecting a type, method or field. For parameterized type, the key contains the resolved information.
  • Annotation and annotation types can be selected
 Search
  • Declaration/references of/to generic types can be searched for
  • Parameterized types and fields can be searched for
  • References in static imports are found
  • Enumerations and enum constants can be searched for
  • Varargs methods can be searched for
  • Annotation types can be searched for
  • Support for erasure match and equivalent match in generics was added
  • Declaration/references of/to generic/paramerized methods can be searched for
  • Declaration/references of/to type parameters can be searched for
 Code Formatter
  • Support for 1.5 constructs.

Release Process

Bug Resolution

Updates

These patches are not yet part of any official release or rollup; but provide an early access to the next delivery for quality assessment. If you find any regression using these patches, please inform the JDT/Core team by entering a bug report.

 Batch compiler

(Binary) posted on 2006/05/09, 1,11 MB (click on picture)
(Source) posted on 2006/05/09, 921 KB (click on picture)
extracted from release 3.1.2
 Post 3.1.2 update
posted on 2007/11/02, 6,258 KB (click on picture)
applies to build R3.1.2
description Post 3.1.2 update.

This patch can be applied by expanding the zip archive into the <install>/eclipse/plugins/ directory. Be sure to move the src zip files to the proper source project.
Plug-in revision ID is "3.1.3". Corresponding sources are versioned using tag v_585b_R31x
Addresses the following issues:
208263 [ast rewrite] performance problems with lots of changes
166977 [vista] Unexpected errors while running JDT/Core tests
97693 [1.5][compiler] Unchecked generic cast gives false compiler error.
122987 [1.5][compiler] Boxing conversion should be performed in conditional expression
126091 [1.5][compiler] Java compiler generates extra field for enums with abstract methods
126191 Code formatter doesn't format properly empty enums
126177 [1.5][compiler] Visibility issue with intersection type
126087 [1.5][compiler] Java compiler generates incorrect byte code for empty enums
124853 [compiler] Compiler generates wrong code (try-catch-finally)
125570 [1.5][compiler] Named inner inner classes have illegal names
124943 [1.4][compiler] 1.4 Compiler Compliance not working for compareTo
122995 [1.5][compiler] Access rules don't apply to generic types
123721 two types of 'remove' for TODO task tags
Also see corresponding build notes.
 3.1.2 preview
posted on 2005/11/03, 6,119 KB (click on picture)
applies to build R3.1.1
description Early preview of 3.1.2 build.

(Note that 3.1.2 builds are now available which make this preview obsolete. However it is  kept for developpers that are still using 3.1.1).

This patch can be applied by expanding the zip archive into the <install>/eclipse/plugins/ directory. Be sure to move the src zip files to the proper source project.
Plug-in revision ID is "3.1.1". Corresponding sources are versioned using tag v_579d_R31x
Addresses the following issues:
114855 [compiler] OutOfMemoryError compiling deeply nested try-catch
114304 [1.5][compiler] Return type not compatible with generic subinterface.
112109 Compilation problem: Eclipse does not recognise parametrized notify-method in generic context
113273 [1.5][compiler] Compiler confused by multiply bounded type parameter
106466 [1.5][compiler] Type parameter followed by other types in bound - rejected by javac, accepted by Eclipse
100970 [1.5][compiler] Interface methods may conflict with Object methods
100182 [1.5][compiler] unecessary cast in case of boxing
112231 [1.5][compiler] enum declaration
108856 [1.5][compiler] Inner inner classes have illegal names
105756 [1.5][model] Incorrect warning on using raw types
112666 [1.5][compiler] Compiler rejects valid assignment to complex capture
111350 [1.5][compiler] method override and generics
108782 [1.5][compiler] inconsistent @Override error
108780 [1.5][compiler] Subsignature checking does not respect erasure conversion
105808 [1.5][dom] MethodBinding#overrides(..) should not consider return types
112500 [1.5][compiler] bug between inference and wilcard
112268 [1.5][compiler] Type mismatch introduced in 3.1.1
111898 [compiler] Wrong code generation
107045 [1.5][compiler] Compiler misses name clash with bounded class type parameter
109118 [1.5][compiler] Unhandled Exception Compiler error involving generics in java 1.5
111703 Static initialization block in anonymous inner class causes compiler to fail
111208 [1.5][compiler] Compiler gets confused by multiple generic-extends'
111299 JavaModelCache may overflow the memory.
111014 Internal Compiler Error
Also see corresponding build notes.

Getting the sources

  • Make sure to target a recent SDK R3.1.x maintenance build.
  • Define a CVS connection to server pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse
  • Check out the R3_1_maintenance branch of the project org.eclipse.jdt.core.
  • The sources of this project have been compiled against a 1.4 JRE. The default JRE should thus be a 1.4 JRE.

Back to the top