| jdt core - build notes 3.7 stream |
| Java development tools 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.
For more information on 3.7 planning, please refer to JDT/Core release plan,
the next milestone plan,
the overall official plan,
or the build schedule.
This present document covers all changes since Release 3.6 (also see a summary of API changes).
Maintenance of previous releases of JDT/Core is performed in parallel branches: R3.6.x, R3.5.x, R3.4.x, R3.3.x, R3.2.x, R3.1.x, R3.0.x, R2.1.x, R2.0.x, R1.0.x. |
/** * Returns the binding key of the declaring type of the element represented by this binding key. If the binding key * does not represent a member or if the member doesn't have a declaring type, returnsnull. * ** Note that only binding keys for references to methods and fields * are fully supported. The binding keys for declarations will not have type parameters. * * @return the type binding key or
null* @since 3.7.1 */ public BindingKey getDeclaringType();
/** * Returns whether it is safe to use the '<>' (diamond) operator in place of explicitly specifying * type arguments for this proposal. * * This is only relevant for source level 1.7 or greater. * * @param coreContext the completion context associated with the proposal * @since 3.7 * @returntrueif it is safe to use the diamond operator for the constructor invocation, *falseotherwise. Also returnsfalsefor source levels below 1.7 */ public boolean canUseDiamond(CompletionContext coreContext);
/** * Compiler option ID: Reporting redundant specification of type arguments in class instance creation expressions. * When enabled, the compiler will issue an error or a warning if type arguments are used in a class instance creation, * when the '<>' operator can be used instead. * * This option only has an effect if the compiler compliance is 1.7 or greater. * * Option id:"org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments"* Possible values:{ "error", "warning", "ignore" }* Default:"ignore"* * @since 3.7 * @category CompilerOptionID */ public static final String COMPILER_PB_REDUNDANT_TYPE_ARGUMENTS = PLUGIN_ID + ".compiler.problem.redundantSpecificationOfTypeArguments";
/** * Returnstrueif the resolved class type has been inferred * from the assignment context (JLS4 15.12.2.8),falseotherwise. * * This information is available only when bindings are requested when the AST is being built. * * @returntrueif the resolved class type has been inferred * from the assignment context (JLS3 15.12.2.8),falseotherwise * @since 3.7 */ public boolean isResolvedTypeInferredFromExpectedType();
/** * Returns the parameters of this method. * An empty array is returned, if the method has no parameters. * For binary types, associated source is used to retrieve the name range, * source range and the flags. * These local variables can be used to retrieve the parameter annotations. * * @return the parameters of this method * @throws JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource. * @since 3.7 */ ILocalVariable[] getParameters() throws JavaModelException;
/**
* FORMATTER / Option to control whether the white space between code and line comments should be preserved or replaced with a single space
* - option id: "org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments"
* - possible values: { TRUE, FALSE }
* - default: FALSE
*
* @see #TRUE
* @see #FALSE
* @since 3.7
*/
public final static String FORMATTER_COMMENT_PRESERVE_WHITE_SPACE_BETWEEN_CODE_AND_LINE_COMMENT = "org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments";
static, but not been declared as one.(see details in bug 318682):
/** * Compiler option ID: Reporting a method that qualifies as static, but not declared static. * When enabled, the compiler will issue an error or a warning if a method has * not been declared asstatic, even though it qualifies as one. * * Option id:"org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic"* Possible values:{ "error", "warning", "ignore" }* Default:"ignore"* * @since 3.7 * @category CompilerOptionID */ public static final String COMPILER_PB_MISSING_STATIC_ON_METHOD = PLUGIN_ID + ".compiler.problem.reportMethodCanBeStatic";
static when another method doesn't override it,
but not been declared as one.(see details in bug 318682):
/** * Compiler option ID: Reporting a method that may qualify as static, but not declared static. * When enabled, the compiler will issue an error or a warning if a method has * not been declared asstatic, even though it may qualify as one, * when another method doesn't override it. * * Option id:"org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic"* Possible values:{ "error", "warning", "ignore" }* Default:"ignore"* * @since 3.7 * @category CompilerOptionID */ public static final String COMPILER_PB_POTENTIALLY_MISSING_STATIC_ON_METHOD = PLUGIN_ID + ".compiler.problem.reportMethodCanBePotentiallyStatic";
/** * Compiler option ID: Reporting of Unavoidable Generic Type Problems. * When enabled, the compiler will issue an error or warning even when it detects a generic type problem * that could not have been avoided by the programmer. As an example, a type may be forced to use raw types * in its method signatures and return types because the methods it overrides from a super type are declared to * use raw types in the first place. * * Option id:"org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems"* Possible values:{ "enabled", "disabled" }* Default:"enabled"* * @since 3.7 * @category CompilerOptionID */ public static final String COMPILER_PB_UNAVOIDABLE_GENERIC_TYPE_PROBLEMS = PLUGIN_ID + ".compiler.problem.unavoidableGenericTypeProblems";
/**
* Answers true if the given name, starting from the given index, starts with the given prefix,
* false otherwise. isCaseSensitive is used to find out whether or not the comparison should be
* case sensitive.
*
*
* For example:
*
* 1. prefix = { 'a' , 'B' }
* name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' }
* startIndex = 2
* isCaseSensitive = false
* result => true
*
* 2. prefix = { 'a' , 'B' }
* name = { 'c', 'd', 'a' , 'b', 'b', 'a', 'b', 'a' }
* startIndex = 2
* isCaseSensitive = true
* result => false
*
*
* @param prefix the given prefix
* @param name the given name
* @param isCaseSensitive to find out whether or not the comparison should be case sensitive
* @param startIndex index from which the prefix should be searched in the name
* @return true if the given name starts with the given prefix, false otherwise
* @throws NullPointerException if the given name is null or if the given prefix is null
* @since 3.7
*/
public static final boolean prefixEquals(char[] prefix, char[] name, boolean isCaseSensitive, int startIndex)
@param tag. (see details in bug 322581):
/**
* Compiler option ID: Reporting Missing Javadoc Tags for Method Type Parameters.
* Specify whether a missing @param for a type parameter in a method declaration should be reported.
* When enabled, the compiler will issue a missing Javadoc tag error or warning for a type parameter without a
* corresponding @param tag.
*
* This option only has an effect if the compiler compliance is 1.5 or greater.
*
* Option id:"org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters"
* Possible values:{ "enabled", "disabled" }
* Default:"disabled"
*
* @since 3.7
* @category CompilerOptionID
*/
public static final String COMPILER_PB_MISSING_JAVADOC_TAGS_METHOD_TYPE_PARAMETERS = PLUGIN_ID + ".compiler.problem.missingJavadocTagsMethodTypeParameters";
/**
* Returns the value of the named property of this rewrite, or null if none.
*
* @param propertyName the property name
* @return the property value, or null if none
* @see #setProperty(String,Object)
* @throws IllegalArgumentException if the given property name is null
* @since 3.7
*/
public final Object getProperty(String propertyName);
/** * Sets the named property of this rewrite to the given value, * or to null to clear it. * * Clients should employ property names that are sufficiently unique * to avoid inadvertent conflicts with other clients that might also be * setting properties on the same rewrite. * * * Note that modifying a property is not considered a modification to the * AST itself. This is to allow clients to decorate existing rewrites with * their own properties without jeopardizing certain things (like the * validity of bindings), which rely on the underlying tree remaining static. * * * @param propertyName the property name * @param data the new property value, or null if none * @see #getProperty(String) * @throws IllegalArgumentException if the given property name is null * @since 3.7 */ public final void setProperty(String propertyName, Object data);
/**
* Compiler option ID: Raise null related errors or warnings arising because of assert statements.
* When enabled, the compiler will flag all null related errors or warnings that have been enabled by the user,
* irrespective of whether a variable occurred in an assert statement.
* When disabled, the compiler will not flag null related errors or warnings on variables that got marked as maybe or definitely
* null in an assert statement upstream.
*
* Option id:"org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts"
* Possible values:{ "enabled", "disabled" }
* Default:"disabled"
*
* @since 3.7
* @category CompilerOptionID
*/
public static final String COMPILER_PB_INCLUDE_ASSERTS_IN_NULL_ANALYSIS = PLUGIN_ID + ".compiler.problem.includeNullInfoFromAsserts";
/**
* Returns true if this local variable is a method parameter, false otherwise.
*
* @return true if this local variable is a method parameter, false otherwise
* @since 3.7
*/
boolean isParameter();
/**
* Returns the modifier flags for this local variable. The flags can be examined using class.
*
* Note that only flags as indicated in the source are returned.
*
* @return the modifier flags for this local variable
* @see Flags
* @since 3.7
*/
int getFlags();
/**
* Returns the declaring member of this local variable.
*
* This is a handle-only method.
*
* @return the declaring member of this local variable
* @since 3.7
*/
IMember getDeclaringMember();
/**
* Returns the Java type root in which this local variable is declared.
*
* This is a handle-only method.
*
* @return the Java type root in which this local variable is declared
* @since 3.7
*/
ITypeRoot getTypeRoot();
/**
* Returns the Java type root in which this type parameter is declared.
*
* This is a handle-only method.
*
* @return the Java type root in which this type parameter is declared
* @since 3.7
*/
ITypeRoot getTypeRoot();
* FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_FIELD
* FORMATTER / Option to insert a new line after an annotation on a field declaration
* - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field"
* - possible values: { INSERT, DO_NOT_INSERT }
* - default: INSERT
*
* FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_METHOD
* FORMATTER / Option to insert a new line after an annotation on a method declaration
* - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method"
* - possible values: { INSERT, DO_NOT_INSERT }
* - default: INSERT
*
* FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PACKAGE
* FORMATTER / Option to insert a new line after an annotation on a package declaration
* - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package"
* - possible values: { INSERT, DO_NOT_INSERT }
* - default: INSERT
*
* FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_TYPE
* FORMATTER / Option to insert a new line after an annotation on a type declaration
* - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type"
* - possible values: { INSERT, DO_NOT_INSERT }
* - default: INSERT
The addition of new lines after annotations has been discussed in bug 308000have been moved to the org.eclipse.jdt.core.ISourceReference interface. See bug 321764 for details:org.eclipse.jdt.core.IImportDeclaration#getNameRange(),
org.eclipse.jdt.core.IPackageDeclaration#getNameRange()
/** * Returns the name range associated with this element. * * If the element is an IMember, it returns * the source range of this member's simple name, * or null if this member does not have a name * (for example, an initializer), or if this member does not have * associated source code (for example, a binary type). * * If this element is an IImportDeclaration, the source range * of this import declaration's name, or null if this import * declaration does not have associated source code (for example, a binary type). * The source range for the name includes the trailing '*' if the call to * IImportDeclaration#isOnDemand() returns true. * * If this element is an IPackageDeclaration, the source range of * this package declaration's name, or null if this package * declaration does not have associated source code (for example, a binary type). * * If this element is an IAnnotation, the source range of * this annotation's name, or null if this annotation does not have * associated source code (for example, in a binary type). * * If this element is an ITypeParameter, the source range of this * type parameter's name, or null if this type parameter does not have * associated source code (for example, in a binary type). * * If this element is an ITypeRoot or IImportContainer, it * returns null. * * @return the name range associated with this element, or null if * not available * * @since 3.7 */ ISourceRange getNameRange() throws JavaModelException;
org.eclipse.jdt.core.IImportDeclaration:
/** * Returns the source range of this import declaration's name, * or null if this import declaration does not have * associated source code (for example, a binary type). * * The source range for the name includes the trailing '*' if the call to * isOnDemand() returns true. * * * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource. * @return the source range of this import declaration's name, * or null if this import declaration does not have * associated source code (for example, a binary type) * @since 3.7 */ ISourceRange getNameRange() throws JavaModelException;
org.eclipse.jdt.core.IPackageDeclaration:
/** * Returns the source range of this package declaration's name, * or null if this package declaration does not have * associated source code (for example, a binary type). * * @exception JavaModelException if this element does not exist or if an * exception occurs while accessing its corresponding resource. * @return the source range of this package declaration's name, * or null if this package declaration does not have * associated source code (for example, a binary type) * @since 3.7 */ ISourceRange getNameRange() throws JavaModelException;
For earlier build notes, also see build notes up to Release 3.6.