jdt core - build notes 3.4 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.
For more information on 3.4 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.3 (also see a summary of API changes).
Maintenance of previous releases of JDT/Core is performed in parallel branches: R3.3.x, R3.2.x, R3.1.x, R3.0.x, R2.1.x, R2.0.x, R1.0.x. |
.zip
and .jar
can now be put on the classpath as well.
See bug 182360 for details.
This flag is defined in CodeFormatter and named 'F_INCLUDE_COMMENTS'
.
Clients will have to combine it with existing CodeFormatter.K_COMPILATION_UNIT
or CodeFormatter.UNKNOWN kinds to see the fix for this bug activated...
org.eclipse.jdt.core.formatter.CodeFormatter
:
/** * Flag used to include the comments during the formatting of the code * snippet. * * This flag can only be combined with following kinds: * . {@link #K_COMPILATION_UNIT} * . {@link #K_UNKNOWN} * * Note also that it has an effect only when the option * {@link DefaultCodeFormatterConstants * #FORMATTER_COMMENT_FORMAT_JAVADOC_COMMENT} * is set to {@link DefaultCodeFormatterConstants#TRUE} while calling * {@link #format(int, String, int, int, int, String)} or * {@link #format(int, String, IRegion[], int, String)} methods * * For example, with the Eclipse default formatter options, the formatting of * the following code snippet using {@link #K_COMPILATION_UNIT}: * * public class X { * /** * * This is just a simple example to show that comments will be formatted while processing a compilation unit only if the constant flagNote that CodeFormatter.UNKNOWN and CodeFormatter.K_COMPILATION_UNIT specification will be updated to include this new possible combination:F_INCLUDE_COMMENT
flag is set. * * @param str The input string */ * void foo(String str){}} * * will produce the following output: * * public class X { * /** * * This is just a simple example to show that comments will be formatted while processing a compilation unit only if the constant flagF_INCLUDE_COMMENT
flag is set. * * * * @param str The input string * */ * void foo(String str){ * } * } * * Adding this flavor to the kind given while formatting the same source * (e.g. {@link #K_COMPILATION_UNIT} | {@link #F_INCLUDE_COMMENTS}) * will produce the following output instead: * * public class X { * /** * * This is just a simple example to show that comments will be formatted * * while processing a compilation unit only if the constant flag * *F_INCLUDE_COMMENT
flag is set. * * * * @param str * * The input string * */ * void foo(String str){ * } * } * * Note: Although we're convinced that the formatter should * always include the comments while processing a * {@link #K_COMPILATION_UNIT kind of compilation unit}, we * have decided to add a specific flag to fix this formatter incorrect behavior. * This will prevent all existing clients using the {@link #K_COMPILATION_UNIT} * kind to be broken while formatting. * * @since 3.4 */ public static final int F_INCLUDE_COMMENTS = 0x1000;
/**
* Unknown kind
*
* Note that since 3.4, the {@link #F_INCLUDE_COMMENTS} flag can be added
* to this constant in order to get the comments formatted if a
* compilation unit is processed.
*/
public static final int K_UNKNOWN = 0x00;
/**
* Kind used to format a compilation unit
*
* Note that using this constant, the javadoc comments are only indented while
* processing the compilation unit.
*
* Since 3.4, if the corresponding comment option is set to
* true
then it is also possible to format the comments on the fly
* by adding the {@link #F_INCLUDE_COMMENTS} flag to this kind of format.
*/
public static final int K_COMPILATION_UNIT = 0x08;
JavaCore.COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_ALL_TAGS
introduced in 3.4M3 has been renamed to
COMPILER_PB_MISSING_JAVADOC_TAG_DESCRIPTION_ALL_STANDARD_TAGS
.Class-Path
clause of jar files
manifests to complete the classpath. For jar files that are specified on a
-classpath
option, the compiler follows Class-Path
clauses recursively and appends each referenced jar file to the end of the
classpath, provided it is not on the classpath yet. See bug
97332 for
further details.BatchCompiler#compiler(String, PrintWriter, PrintWriter, CompilationProgress)
and
BatchCompiler#compiler(String[], PrintWriter, PrintWriter, CompilationProgress)
.
See 217233 for more details.getLocalElement()
method on the new
ReferenceMatch
API class:/** * An abstract Java search match that represents a reference. * * This class is not intended to be subclassed by clients. * * @since 3.4 */ public abstract class ReferenceMatch extends SearchMatch { ... /** * Returns the local element of this search match, orSee bug 209996 for more details.null
if none. * A local element is the inner most element that contains the reference and that is not * reachable by navigating from the root of the {@link IJavaModel} using * {@link IParent#getChildren()}. * * Known element types for local elements are {@link IJavaElement#ANNOTATION}, * {@link IJavaElement#LOCAL_VARIABLE} and {@link IJavaElement#TYPE_PARAMETER}. * However clients should not assume that this set of element types is closed as * other types of elements may be returned in the future, e.g. if new types * of elements are added in the Java model. Clients can only assume that the * {@link IJavaElement#getParent() parent} chain of this local element eventually leads * to the element from {@link #getElement()}. * * The local element being an {@link IAnnotation} is the most usal case. For example, * * . searching for the references to the methodAnnot.clazz()
in * * public class Test { * void method() { * @Annot(clazz=Test.class) int x; * } * } * * will return one {@link MethodReferenceMatch} match whose local element * is the {@link IAnnotation} 'Annot
'. * * . searching for the references to the typeDeprecated
in * * public class Test { * @Deprecated void method() {} * } * * will return one {@link TypeReferenceMatch} match whose local element * is the {@link IAnnotation} 'Deprecated
'. * * . searching for the references to the fieldCONST
in * * @Num(number= Num.CONST) * @interface Num { * public static final int CONST= 42; * int number(); * } * * will return one {@link FieldReferenceMatch} match whose local element * is the {@link IAnnotation} 'Num
'. * * A local element may also be a {@link ILocalVariable} whose type is the referenced type. For example, * * . searching for the references to the typeTest
in * * public class Test { * void foo() { * Test local; * } * } * * will return one {@link TypeReferenceMatch} match whose local element * is the {@link ILocalVariable} 'local
'. * * Or a local element may be an {@link ITypeParameter} that extends the referenced type. For example, * * . searching for the references to the typeTest
in * * public class X<T extends Test> { * } * * will return one {@link TypeReferenceMatch} match whose local element * is the {@link ITypeParameter} 'T
'. * * @return the local element of this search match, ornull
if none. * * @since 3.4 */ public IJavaElement getLocalElement() { return null; }
org.eclipse.jdt.core.JavaCore#getOptionForConfigurableSeverity(int)
to link back problem IDs to options that configure problems:/** * Returns the option that can be used to configure the severity of the * compiler problem identified by problemID if any, null otherwise. Non-null * return values are taken from the constants defined by this class whose * names start with COMPILER_PB and for which the possible values of the * option are defined by { "error", "warning", "ignore" }. A null return * value means that the provided problem ID is unknown or that it matches * a problem whose severity cannot be configured. * @param problemID one of the problem IDs defined by {@link IProblem} * @return the option that can be used to configure the severity of the * compiler problem identified by problemID if any, null otherwise * @since 3.4 */ public static String getOptionForConfigurableSeverity(int problemID) {...}
public class X { void foo() { zzz| // ctrl+space at | location } }
getEnclosingElement()
returns the IMethod named foo.
public class X { p.Y f1; p.Z f2; void foo() { p.Y l1; p.Z l2; zzz| // ctrl+space at | location } }
getVisibleElements("Lp/Z;")
returns the IField named f2 and the ILocalVariable name l2.
public class CompletionRequestor { ... /** * Returns whether this requestor requires an extended context. * * By default this method returnfalse
. * * @returntrue
if this requestor requires an extended context. * * @see CompletionContext#isExtended() * * @since 3.4 */ public boolean isExtendedContextRequired() {...} /** * Sets whether this requestor requires an extended context. * * @param requiretrue
if this requestor requires an extended context. * * @see CompletionContext#isExtended() * * @since 3.4 */ public void setRequireExtendedContext(boolean require) {...} ... }
public class CompletionContext { ... /** * Returns whether this completion context is an extended context. * Some methods of this context can be used only if this context is an extended context but an extended context consumes more memory. * * @returntrue
if this completion context is an extended context. * * @since 3.4 */ public boolean isExtended() {...} /** * Returns the innermost enclosing Java element which contains the completion location ornull
if this element cannot be computed. * The returned Java element and all Java elements in the same compilation unit which can be navigated to from the returned Java element are special Java elements: * * - they are based on the current content of the compilation unit's buffer, they are not the result of a reconcile operation * - they are not updated if the buffer changes. * - they do not contain local types which are not visible from the completion location. * - they do not give information about categories. {@link IMember#getCategories()} will return an empty array * * Reasons for returningnull
include: * * - the compilation unit no longer exists * - the completion occurred in a binary type. However this restriction might be relaxed in the future. * * @return the innermost enclosing Java element which contains the completion location ornull
if this element cannot be computed. * * @exception UnsupportedOperationException if the context is not an extended context * * @since 3.4 */ public IJavaElement getEnclosingElement() {...} /** * Return the elements which are visible from the completion location and which can be assigned to the given type. * An element is assignable if its type can be assigned to a variable * of the given type, as specified in section 5.2 of The Java Language * Specification, Third Edition (JLS3). * A visible element is either: * * - a {@link ILocalVariable} - the element type is {@link ILocalVariable#getTypeSignature()} * - a {@link IField} - the element type is {@link IField#getTypeSignature()} * - a {@link IMethod} - the element type is {@link IMethod#getReturnType()} * * Returned elements defined in the completed compilation unit are special Java elements: * * - they are based on the current content of the compilation unit's buffer, they are not the result of a reconcile operation * - they are not updated if the buffer changes. * - they do not contain local types which are not visible from the completion location. * - they do not give information about categories. {@link IMember#getCategories()} will return an empty array * * Note the array can be empty if: * * - the compilation unit no longer exists * - the completion occurred in a binary type. However this restriction might be relaxed in the future. * * @param typeSignature elements which can be assigned to this type are returned. * Ifnull
there is no constraint on the type of the returned elements. * * @return elements which are visible from the completion location and which can be assigned to the given type. * * @exception UnsupportedOperationException if the context is not an extended context * * @see #isExtended() * * @since 3.4 */ public IJavaElement[] getVisibleElements(String typeSignature) {...} ... }
* Compiler option ID: Reporting Unused Declared Thrown Exception Exempts Exception And Throwable. * When enabled, the compiler will issue an error or a warning when a * method or a constructor is declaring a checked exception else than * java.lang.Throwable or java.lang.Exception as thrown, * but its body actually raises neither that exception, nor any other * exception extending it. When disabled, the compiler will issue an * error or a warning when a method or a constructor is declaring a * checked exception (including java.lang.Throwable and * java.lang.Exception) as thrown, but its body actually raises * neither that exception, nor any other exception extending it. * The severity of the unused declared thrown exception problem is * controlled with option COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION. * This diagnostic is further tuned by options * COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_INCLUDE_DOC_COMMENT_REFERENCE * and COMPILER_PB_UNUSED_DECLARED_THROWN_EXCEPTION_WHEN_OVERRIDING. * * Option id: "org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable" * Possible values: { "enabled", "disabled" } * Default: "enabled"(note that the specification for unusedDeclaredThrownException has been amended accordingly, and that another option that had been added in 3.4M5 but never surfaced in the IDE has been withdrawn; see bug 219461 for details)
IJavaSearchConstants
fine grained search API
constant to reduce the search to type references used in the instanceof
pattern (see bug 221130):
/** * Return only type references used as an instance of. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int INSTANCEOF_TYPE_REFERENCE = 0x100000;
public interface ICompilationUnit {
...
/**
* Applies a text edit to the compilation unit's buffer.
*
* @param edit the edit to apply
* @param monitor the progress monitor to use or null
if
* no progress should be reported
* @return the undo edit
* @throws JavaModelException if this edit can not be applied to the
* compilation unit's buffer. Reasons include:
* This compilation unit does not exist
* ({@link IJavaModelStatusConstants#ELEMENT_DOES_NOT_EXIST}).
* The provided edit can not be applied as there is a problem with the
* text edit locations ({@link IJavaModelStatusConstants#BAD_TEXT_EDIT_LOCATION}).
*
* @since 3.4
*/
public UndoEdit applyTextEdit(TextEdit edit, IProgressMonitor monitor) throws JavaModelException;
...
}
Implementors of IBuffer can now additionally implement IBuffer.ITextEditCapability
and provide the implementation for applyTextEdit
. Calls to ICompilationUnit.applyTextEdit
will then be forwarded to this API.
Zork<String>
).JavaCore#newLibraryEntry(...)
with
a file system path to an external library folder to add this folder on the build path. Note that one can also use an external source folder
as a source attachment using the same API.CompletionContext#getTokenLocation()
to know if the completed token is at the start of the member
or at the start of a statement. In the future this API could be improved and more locations could be recognized.
public class CompletionContext {
...
/**
* The completed token is the first token of a member declaration.
* e.g.
*
* public class X {
* Foo| // completion occurs at |
* }
*
* @see #getTokenLocation()
*
* @since 3.4
*/
public static final int TL_MEMBER_START = 1;
/**
* The completed token is the first token of a statement.
* e.g.
*
* public class X {
* public void bar() {
* Foo| // completion occurs at |
* }
* }
*
* @see #getTokenLocation()
*
* @since 3.4
*/
public static final int TL_STATEMENT_START = 2;
/**
* Returns the location of completion token being proposed.
* The returned location is a bit mask which can contain some values
* of the constants declared on this class whose name starts with TL
,
* or possibly values unknown to the caller.
*
* The set of different location values is expected to change over time.
* It is strongly recommended that clients do not assume that
* the location contains only known value, and code defensively for
* the possibility of unexpected future growth.
*
* @return the location
*
* @since 3.4
*/
public int getTokenLocation() {...}
...
}
* FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_MEMBER * FORMATTER / Option to insert a new line after an annotation on a member (package, class, method, field declaration) * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member" * - possible values: { INSERT, DO_NOT_INSERT } * - default: INSERT * * FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_PARAMETER * FORMATTER / Option to insert a new line after an annotation on a parameter * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" * - possible values: { INSERT, DO_NOT_INSERT } * - default: DO_NOT_INSERT * * FORMATTER_INSERT_NEW_LINE_AFTER_ANNOTATION_ON_LOCAL_VARIABLE * FORMATTER / Option to insert a new line after an annotation on a local variable * - option id: "org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" * - possible values: { INSERT, DO_NOT_INSERT } * - default: INSERTThe addition of new lines after annotations has been discussed in bug 122247
IJavaSearchConstants
API constants for fine grained search
(see bug 155013).limitTo
parameter while calling SearchPattern.createPattern(...)
methods.Here is the exhaustive list of these fine grain search flags:
/** * Return only type references used as the type of a field declaration. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int FIELD_DECLARATION_TYPE_REFERENCE = 0x40; /** * Return only type references used as the type of a local variable declaration. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int LOCAL_VARIABLE_DECLARATION_TYPE_REFERENCE = 0x80; /** * Return only type references used as the type of a method parameter * declaration. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int PARAMETER_DECLARATION_TYPE_REFERENCE = 0x100; /** * Return only type references used as a super type or as a super interface. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int SUPERTYPE_TYPE_REFERENCE = 0x200; /** * Return only type references used in a throws clause. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int THROWS_CLAUSE_TYPE_REFERENCE = 0x400; /** * Return only type references used in a cast expression. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int CAST_TYPE_REFERENCE = 0x800; /** * Return only type references used in a catch header. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int CATCH_TYPE_REFERENCE = 0x1000; /** * Return only type references used in class instance creation. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * Example: * public class Test { * Test() {} * static Test bar() { * return new Test(); * } * } * * Searching references to the typeTest
using this flag in the * above snippet will match only the reference in italic. * * Note that array creations are not returned when using this flag. * * @since 3.4 * @category limitTo */ int CLASS_INSTANCE_CREATION_TYPE_REFERENCE = 0x2000; /** * Return only type references used as a method return type. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int RETURN_TYPE_REFERENCE = 0x4000; /** * Return only type references used in an import declaration. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int IMPORT_DECLARATION_TYPE_REFERENCE = 0x8000; /** * Return only type references used as an annotation. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int ANNOTATION_TYPE_REFERENCE = 0x10000; /** * Return only type references used as a type argument in a parameterized * type or a parameterized method. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int TYPE_ARGUMENT_TYPE_REFERENCE = 0x20000; /** * Return only type references used as a type variable bound. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int TYPE_VARIABLE_BOUND_TYPE_REFERENCE = 0x40000; /** * Return only type references used as a wildcard bound. * * When this flag is set, only {@link TypeReferenceMatch} matches will be * returned. * * @since 3.4 * @category limitTo */ int WILDCARD_BOUND_TYPE_REFERENCE = 0x80000; /** * Return only super field accesses or super method invocations (e.g. using the *super
qualifier). * * When this flag is set, the kind of returned matches will depend on the * specified nature of the searched element: * . for the {@link #FIELD} nature, only {@link FieldReferenceMatch} * matches will be returned, * . for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned. * * @since 3.4 * @category limitTo */ int SUPER_REFERENCE = 0x1000000; /** * Return only qualified field accesses or qualified method invocations. * * When this flag is set, the kind of returned matches will depend on the * specified nature of the searched element: * . for the {@link #FIELD} nature, only {@link FieldReferenceMatch} * matches will be returned, * . for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned. * * @since 3.4 * @category limitTo */ int QUALIFIED_REFERENCE = 0x2000000; /** * Return only primary field accesses or primary method invocations (e.g. using * thethis
qualifier). * * When this flag is set, the kind of returned matches will depend on the * specified nature of the searched element: * . for the {@link #FIELD} nature, only {@link FieldReferenceMatch} * matches will be returned, * . for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned. * * @since 3.4 * @category limitTo */ int THIS_REFERENCE = 0x4000000; /** * Return only field accesses or method invocations without any qualification. * * When this flag is set, the kind of returned matches will depend on the * specified nature of the searched element: * . for the {@link #FIELD} nature, only {@link FieldReferenceMatch} * matches will be returned, * . for the {@link #METHOD} nature, only {@link MethodReferenceMatch} * matches will be returned. * * @since 3.4 * @category limitTo */ int IMPLICIT_THIS_REFERENCE = 0x8000000;
@SuppressWarnings
to only complain if the relevant warnings were effectively
enabled when compiling. So if you turn off certain warnings, then the compiler is not going to suggest getting rid of existing @SuppressWarnings
in your code, until you will have enabled these back, and the compiler will have proved that there is no occurrence of them.
IMethod#getDefaultValue()
to retrieve the default value of an annotation method.IMemberValuePair#K_SIMPLE_NAME
to indicate that the value kind of the value is a simple name reference.IJavaProject#findElement(String, WorkingCopyOwner)
to retrieve a IJavaElement
from a binding key.* COMPILER / Reporting Redundant Superinterface * When enabled, the compiler will issue an error or a warning if a type * explicitly implements an interface that is already implemented by any * of its supertypes. * - option id: "org.eclipse.jdt.core.compiler.problem.redundantSuperinterface" * - possible values: { "error", "warning", "ignore" } * - default: "ignore"(see bug 77918)
CodeFormatter#format(int, String, IRegion[], int, String)
to allow the formatting of a set of
org.eclipse.jface.text.IRegion
s.@SupressWarnings(...)
annotations which were necessary a while ago, but are no longer useful.
Note that @SuppressWarnings("all")
is still silencing the warning for unnecessary @SuppressWarnings
,
as it is the master switch to silence ALL warnings.
Also added option: JavaCore.COMPILER_PB_UNUSED_WARNING_TOKEN
and problem ID
IProblem.UnusedWarningToken
.
* COMPILER / Reporting Unnecessary @SuppressWarnings * When enabled, the compiler will issue an error or a warning when encountering @SuppressWarnings annotation * for which no corresponding warning got detected in the code. This diagnostic is provided to help developers to get * rid of transient @SuppressWarnings no longer needed. Note that(see bug 127533)@SuppressWarnings("all")
is still * silencing the warning for unnecessary@SuppressWarnings
, as it is the master switch to silence ALL warnings. * - option id: "org.eclipse.jdt.core.compiler.problem.unusedWarningToken" * - possible values: { "error", "warning", "ignore" } * - default: "warning"
public interface IAnnotation extends IJavaElement, ISourceReference { String getElementName(); IMemberValuePair[] getMemberValuePairs() throws JavaModelException; ISourceRange getNameRange() throws JavaModelException; int getOccurrenceCount(); }
public interface IMemberValuePair { int K_INT = 1; int K_BYTE = 2; int K_SHORT = 3; int K_CHAR = 4; int K_FLOAT = 5; int K_DOUBLE = 6; int K_LONG = 7; int K_BOOLEAN = 8; int K_STRING = 9; int K_ANNOTATION = 10; int K_CLASS = 11; int K_QUALIFIED_NAME = 12; int K_UNKNOWN = 13; String getMemberName(); Object getValue(); int getValueKind(); }
public interface IAnnotatable { IAnnotation getAnnotation(String name); IAnnotation[] getAnnotations() throws JavaModelException; }
IField
, IMethod
, IType
, IPackageDeclaration
, and ILocalVariable
now implement this interface.public interface IJavaElement extends IAdaptable { ... int ANNOTATION = 16; ... }
public interface IJavaElementDelta { ... public int F_ANNOTATIONS = 0x400000; public IJavaElementDelta[] getAnnotationDeltas(); ... }
CompletionRequestor#CompletionRequestor(boolean ignoreAll)
to be able to ignore all completion kinds by default instead of propose all completion kinds by default.
if
statement with an instanceof
expression as condition.instanceof
type are proposed and the receiver is casted to this type.
Object x = ... ; if (x instanceof IType) { x.get|code assistThe method
IType#getFullyQualifiedName()
will be proposed and the receiver will be casted to IType
.
The completion string will be '((IType)x).getFullyQualifiedName()'.CompletionProposal#METHOD_REF_WITH_CASTED_RECEIVER
and
CompletionProposal#FIELD_REF_WITH_CASTED_RECEIVER
.public class CompletionProposal { ... /** * Completion is a reference to a method with a casted receiver. * This kind of completion might occur in a context like * <code>"receiver.fo^();"</code> and complete it to * <code>""((X)receiver).foo();"</code>. * <p> * The following additional context information is available * for this kind of completion proposal at little extra cost: * <ul> * <li>{@link #getDeclarationSignature()} - * the type signature of the type that declares the method that is referenced * </li> * <li>{@link #getFlags()} - * the modifiers flags of the method that is referenced * </li> * <li>{@link #getName()} - * the simple name of the method that is referenced * </li> * <li>{@link #getReceiverSignature()} - * the type signature of the receiver type. It's the type of the cast expression. * </li> * <li>{@link #getSignature()} - * the method signature of the method that is referenced * </li> * </ul> * </p> * * @see #getKind() * * @since 3.4 */ public static final int METHOD_REF_WITH_CASTED_RECEIVER; /** * Completion is a reference to a field with a casted receiver. * This kind of completion might occur in a context like * <code>"recevier.ref^ = 0;"</code> and complete it to * <code>"((X)receiver).refcount = 0;"</code>. * <p> * The following additional context information is available * for this kind of completion proposal at little extra cost: * <ul> * <li>{@link #getDeclarationSignature()} - * the type signature of the type that declares the field that is referenced * </li> * <li>{@link #getFlags()} - * the modifiers flags (including ACC_ENUM) of the field that is referenced * </li> * <li>{@link #getName()} - * the simple name of the field that is referenced * </li> * <li>{@link #getReceiverSignature()} - * the type signature of the receiver type. It's the type of the cast expression. * </li> * <li>{@link #getSignature()} - * the type signature of the field's type (as opposed to the * signature of the type in which the referenced field * is declared) * </li> * * </ul> * </p> * * @see #getKind() * * @since 3.4 */ public static final int FIELD_REF_WITH_CASTED_RECEIVER; /** * Returns the type signature or package name of the relevant * receiver in the context, or <code>null</code> if none. * <p> * This field is available for the following kinds of * completion proposals: * <ul> * <li><code>FIELD_REF_WITH_CASTED_RECEIVER</code> - type signature * of the type that cast the receiver of the field that is referenced</li> * <li><code>METHOD_REF_WITH_CASTED_RECEIVER</code> - type signature * of the type that cast the receiver of the method that is referenced</li> * </ul> * For kinds of completion proposals, this method returns * <code>null</code>. Clients must not modify the array * returned. * </p> * * @return a type signature or a package name (depending * on the kind of completion), or <code>null</code> if none * @see Signature * * @since 3.4 */ public char[] getReceiverSignature() {} /** * Returns the character index of the start of the * subrange in the source file buffer containing the * relevant receiver of the member being completed. This * receiver is an expression. * * <p> * This field is available for the following kinds of * completion proposals: * <ul> * <li><code>FIELD_REF_WITH_CASTED_RECEIVER</code></li> * <li><code>METHOD_REF_WITH_CASTED_RECEIVER</code></li> * </ul> * For kinds of completion proposals, this method returns <code>0</code>. * </p> * * @return character index of receiver start position (inclusive) * * @since 3.4 */ public int getReceiverStart() {} /** * Returns the character index of the end (exclusive) of the subrange * in the source file buffer containing the * relevant receiver of the member being completed. * * * <p> * This field is available for the following kinds of * completion proposals: * <ul> * <li><code>FIELD_REF_WITH_CASTED_RECEIVER</code></li> * <li><code>METHOD_REF_WITH_CASTED_RECEIVER</code></li> * </ul> * For kinds of completion proposals, this method returns <code>0</code>. * </p> * * @return character index of receiver end position (exclusive) * * @since 3.4 */ public int getReceiverEnd() {} ... }
/** * Notifies this participant that a build has finished for the project. * This will be sent, even if buildStarting() was not sent when no source files needed to be compiled * or the build failed. * Only sent to participants interested in the project. * @param project the project about to build * @since 3.4 */ public void buildFinished(IJavaProject project)
@SuppressWarnings("unused")
.
Also added option: JavaCore.COMPILER_PB_UNUSED_TYPE_ARGUMENTS_FOR_METHOD_INVOCATION
and problem ID
IProblem.UnusedTypeArgumentsForMethodInvocation
.
* COMPILER / Reporting Presence of Type Arguments for a Non-Generic Method Invocation * When enabled, the compiler will issue an error or a warning whenever type arguments are encountered for a * non-generic method invocation. Note that prior to compliance level is "1.7", this situation would automatically result * in an error. From Java7 on, unused type arguments are being tolerated, and optionally warned against. * - option id: "org.eclipse.jdt.core.compiler.problem.unusedTypeArgumentsForMethodInvocation" * - possible values: { "error", "warning", "ignore" } * - default: "warning"
SearchPattern#R_CAMELCASE_SAME_PART_COUNT_MATCH
./** * Match rule: The search pattern contains a Camel Case expression with * a strict expected number of parts. * * Examples: * . 'HM' type string pattern will match 'HashMap' and 'HtmlMapper' types, * but not 'HashMapEntry' * . 'HMap' type string pattern will still match previous 'HashMap' and * 'HtmlMapper' types, but not 'HighMagnitude' * * This rule is not intended to be combined with any other match rule. In case * of other match rule flags are combined with this one, then match rule validation * will return a modified rule in order to perform a better appropriate search request * (see {@link #validateMatchRule(String, int)} for more details). * * @see CharOperation#camelCaseMatch(char[], char[], boolean) for a detailed * explanation of Camel Case matching. * * @since 3.4 */ public static final int R_CAMELCASE_SAME_PART_COUNT_MATCH = 0x0100;Note that this constant replace previous one
R_CAMEL_CASE_MATCH
added while fixing bug 124624.R_CAMELCASE_MATCH
is no longer deprecated as, finally,
Camel Case match rule flags are not supposed to be combined with other ones (e.g.
R_PREFIX_MATCH
or R_PATTERN_MATCH
).
SearchPattern#validateMatchRule(String, int)
has been modified to include the new #R_CAMELCASE_SAME_PART_COUNT_MATCH
constant:
/**
* Validate compatibility between given string pattern and match rule.
*
* In certain circumstances described in the table below, the returned match rule is
* modified in order to provide a more efficient search pattern:
* 1. when the {@link #R_REGEXP_MATCH} flag is set, then the pattern is
* rejected as this kind of match is not supported yet and -1
* s returned).
* 2. when the string pattern has no pattern characters (e.g. '*' or '?')
* and the pattern match flag is set (i.e. the match rule has the {@link #R_PATTERN_MATCH}
* flag), then the pattern match flag is reset.
* Reversely, when the string pattern has pattern characters and the pattern
* match flag is not set, then the pattern match flag is set.
* 3. when the {@link #R_PATTERN_MATCH} flag is set then, other
* {@link #R_PREFIX_MATCH}, {@link #R_CAMELCASE_MATCH} or
* {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH} flags are reset
* if they are tentatively combined.
* 4. when the {@link #R_CAMELCASE_MATCH} flag is set, then other
* {@link #R_PREFIX_MATCH} or {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH}
* flags are reset if they are tentatively combined.
* Reversely, if the string pattern cannot be a camel case pattern (i.e. contains
* invalid Java identifier characters or does not have at least two uppercase
* characters - one for method camel case patterns), then the CamelCase
* match flag is replaced with a prefix match flag.
* 5. when the {@link #R_CAMELCASE_SAME_PART_COUNT_MATCH} flag is set,
* then ({@link #R_PREFIX_MATCH} flag is reset if it's tentatively
* combined.
* Reversely, if the string pattern cannot be a camel case pattern (i.e. contains
* invalid Java identifier characters or does not have at least two uppercase
* characters - one for method camel case patterns), then the CamelCase
* part count match flag is reset.
* Note: the rules are validated in the documented order. For example, it means
* that as soon as the string pattern contains one pattern character, the pattern
* match flag will be set and all other match flags reset: validation of rule 2)
* followed by rule 3)...
*
* @param stringPattern The string pattern
* @param matchRule The match rule
* @return Optimized valid match rule or -1 if an incompatibility was detected.
* @since 3.2
*/
public static int validateMatchRule(String stringPattern, int matchRule) {
...
}
CharOperation
and SearchPattern
Camel Case API methods
added while fixing bug 124624)
have been modified to clarify the behavior of the additional boolean parameter./** *... * CamelCase can be restricted to match only the same count of parts. When this * restriction is specified the given pattern and the given name must have exactly * the same number of parts (i.e. the same number of uppercase characters). * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap' and * 'HatMapper' but not 'HashMapEntry'. *... * . pattern = "HM".toCharArray() * name = "HashMapEntry".toCharArray() * result => (samePartCount == false) *... * @param samePartCount flag telling whether the pattern and the name should * have the same count of parts or not. * For example: * . 'HM' type string pattern will match 'HashMap' and 'HtmlMapper' types, * but not 'HashMapEntry' * . 'HMap' type string pattern will still match previous 'HashMap' and * 'HtmlMapper' types, but not 'HighMagnitude' * @return true if the pattern matches the given name, false otherwise * @since 3.4 */ public static final boolean camelCaseMatch(char[] pattern, char[] name, boolean samePartCount) { ... } /** *... * CamelCase can be restricted to match only the same count of parts. When this * restriction is specified the given pattern and the given name must have exactly * the same number of parts (i.e. the same number of uppercase characters). * For instance, 'HM' , 'HaMa' and 'HMap' patterns will match 'HashMap' and * 'HatMapper' but not 'HashMapEntry'. *... * . pattern = "HM".toCharArray() * patternStart = 0 * patternEnd = 2 * name = "HashMapEntry".toCharArray() * nameStart = 0 * nameEnd = 12 * result => (samePartCount == false) *... * @param samePartCount flag telling whether the pattern and the name should * have the same count of parts or not. * For example: * . 'HM' type string pattern will match 'HashMap' and 'HtmlMapper' types, * but not 'HashMapEntry' * . 'HMap' type string pattern will still match previous 'HashMap' and * 'HtmlMapper' types, but not 'HighMagnitude' * @return true if a sub-pattern matches the sub-part of the given name, false otherwise * @since 3.4 */ public static final boolean camelCaseMatch(char[] pattern, int patternStart, int patternEnd, char[] name, int nameStart, int nameEnd, boolean prefixMatch) { ... }Note that similar modifications have been done on
SearchPattern
corresponding methods:
public static final boolean camelCaseMatch(String pattern, String name, boolean samePartCount) { ... } public static final boolean camelCaseMatch(String pattern, int patternStart, int patternEnd, String name, int nameStart, int nameEnd, boolean samePartCount) { ... }
CompletionProposal#getRequiredProposals()
.TYPE_REF
proposals can now have a TYPE_REF proposal as required proposal
package p; public class X { public static void bar() {} } package q; public class Y { public void foo() { X.bar } }When the completion occurs after X.bar the method
X#bar()
is proposed with a required proposal to complete the not yet imported type.
IJavaElementDelta#F_RESOLVED_CLASSPATH_CHANGED
. This flag is set when the resolved classpath of a Java project changes.
This is independent from IJavaElementDelta#F_CLASSPATH_CHANGED
which indicates that the raw classpath has changed.SearchPattern#R_CAMELCASE_MATCH
constant is no longer deprecated andSearchPattern#R_CAMEL_CASE_MATCH
will surely be renamed in next milestone.org.eclipse.jdt.core.JavaCore#VERSION_CLDC_1_1
in order to support the cldc1.1 target inside the IDE.
COMPILER / Consider Reference in Doc Comment for Unused Declared Thrown Exception Check When enabled, the compiler will consider doc comment references to exceptions (i.e. @throws clauses) for the unused declared thrown exception check. Thus, documented exceptions will be considered as mandated as per doc contract. The severity of the unused declared thrown exception problem is controlled with option "org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException". Note: this option has no effect until the doc comment support is enabled according to the option "org.eclipse.jdt.core.compiler.doc.comment.support". - option id: "org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocReference" - possible values: { "enabled", "disabled" } - default: "enabled"See bug 73244 for details.
org.eclipse.jdt.core.compiler.CharOperation
:
/** * Answers true if the pattern matches the given name using CamelCase rules, or * false otherwise. char[] CamelCase matching does NOT accept explicit wild-cards * '*' and '?' and is inherently case sensitive. * * CamelCase denotes the convention of writing compound names without spaces, * and capitalizing every term. This function recognizes both upper and lower * CamelCase, depending whether the leading character is capitalized or not. * The leading part of an upper CamelCase pattern is assumed to contain a * sequence of capitals which are appearing in the matching name; e.g. 'NPE' will * match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern * uses a lowercase first character. In Java, type names follow the upper * CamelCase convention, whereas method or field names follow the lower * CamelCase convention. * * The pattern may contain lowercase characters, which will be match in a case * sensitive way. These characters must appear in sequence in the name. * For instance, 'NPExcep' will match 'NullPointerException', but not * 'NullPointerExCEPTION' or 'NuPoEx' will match 'NullPointerException', but not * 'NoPointerException'. * * Digit characters are treated in a special way. They can be used in the pattern * but are not always considered as leading character. For instance, both * 'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'. * * CamelCase may or may not match prefixes depending on the given parameter. * When the prefix match parameter isNote that same methods have been added ontrue
, the given pattern can * match only a prefix of the given name. For instance, 'HM' , 'HaMa' and 'HMap' * patterns will all match 'HashMap', 'HatMapper' and 'HashMapEntry'. * Reversely, if the prefix match parameter isfalse
, then pattern * and name must have exactly the same number of parts, and their last * parts must be identical if they contain lowercase characters. * For instance, 'HMap' and 'HaMap' patterns will match 'HashMap' but neither * 'HashMapEntry' nor 'HatMapper'. Note that when the last part does not contain * lowercase characters, then the name may end with lowercase characters. * So, 'HM' pattern will match both 'HashMap' and 'HatMapper' but will not * match 'HashMapEntry'. * * Examples: * 1. pattern = { 'N', 'P', 'E' } * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => true * 2. pattern = { 'N', 'P', 'E' } * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => true * 3. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => true * 4. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => false * 5. pattern = { 'n', p', 'e' } * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * result => false * 6. pattern = { 'I', 'P', 'L', '3' } * name = { 'I', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '3' } * result => true * 7. pattern = { 'H', M' } * name = { 'H', 'a', 's', 'h', 'M', 'a', 'p', 'E', 'n', 't', 'r', 'y' } * result => (prefixMatch == true) * 8. pattern = { 'H', M', 'a', 'p' } * name = { 'H', 'a', 't', 'M', 'a', 'p', 'p', 'e', 'r' } * result => (prefixMatch == true) * * @param pattern the given pattern * @param name the given name * @param prefixMatch flag telling whether the pattern can match name prefix or not. * . For example, when it'strue
: * - 'HM' type string pattern will match 'HashMap' and 'HtmlMapper' types, * but not 'HashMapEntry' * - 'HMap' type string pattern will match 'HashMap' type but not 'HtmlMapper'. * . and, when it'sfalse
: * - 'HM' type string pattern will match both 'HashMap' and 'HtmlMapper' * and 'HashMapEntry' * - 'HMap' type string pattern will match both 'HashMap' and 'HtmlMapper' * types. * * @return true if the pattern matches the given name, false otherwise * @since 3.4 */ public static final boolean camelCaseMatch(char[] pattern, char[] name, boolean prefixMatch) { ... } /** * Answers true if a sub-pattern matches the sub-part of the given name using * CamelCase rules, or false otherwise. char[] CamelCase matching does NOT * accept explicit wild-cards '*' and '?' and is inherently case sensitive. * Can match only subset of name/pattern, considering end positions as * non-inclusive. The sub-pattern is defined by the patternStart and patternEnd * positions. * * CamelCase denotes the convention of writing compound names without spaces, * and capitalizing every term. This function recognizes both upper and lower * CamelCase, depending whether the leading character is capitalized or not. * The leading part of an upper CamelCase pattern is assumed to contain * a sequence of capitals which are appearing in the matching name; e.g. 'NPE' will * match 'NullPointerException', but not 'NewPerfData'. A lower CamelCase pattern * uses a lowercase first character. In Java, type names follow the upper * CamelCase convention, whereas method or field names follow the lower * CamelCase convention. * * The pattern may contain lowercase characters, which will be match in a case * sensitive way. These characters must appear in sequence in the name. * For instance, 'NPExcep' will match 'NullPointerException', but not * 'NullPointerExCEPTION' or 'NuPoEx' will match 'NullPointerException', but not * 'NoPointerException'. * * Digit characters are treated in a special way. They can be used in the pattern * but are not always considered as leading character. For instance, both * 'UTF16DSS' and 'UTFDSS' patterns will match 'UTF16DocumentScannerSupport'. * * CamelCase may or may not match prefixes depending on the given parameter. * When the prefix match parameter istrue
, the given pattern can * match only a prefix of the given name. For instance, 'HM' , 'HaMa' and 'HMap' * patterns will all match 'HashMap', 'HatMapper' and 'HashMapEntry'. * Reversely, if the prefix match parameter isfalse
, then pattern * and name must have exactly the same number of parts, and their last * parts must be identical if they contain lowercase characters. * For instance, 'HMap' and 'HaMap' patterns will match 'HashMap' but neither * 'HashMapEntry' nor 'HatMapper'. Note that when the last part does not contain * lowercase characters, then the name may end with lowercase characters. * So, 'HM' pattern will match both 'HashMap' and 'HatMapper' but will not * match 'HashMapEntry'. * * Examples: * 1. pattern = { 'N', 'P', 'E' } * patternStart = 0 * patternEnd = 3 * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 20 * result => true * 2. pattern = { 'N', 'P', 'E' } * patternStart = 0 * patternEnd = 3 * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 21 * result => true * 3. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * patternStart = 0 * patternEnd = 6 * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 20 * result => true * 4. pattern = { 'N', 'u', 'P', 'o', 'E', 'x' } * patternStart = 0 * patternEnd = 6 * name = { 'N', 'o', 'P', 'e', 'r', 'm', 'i', 's', 's', 'i', 'o', 'n', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 0 * nameEnd = 21 * result => false * 5. pattern = { 'n', p', 'e' } * patternStart = 0 * patternEnd = 3 * name = { 'N', 'u','l', 'l', 'P', 'o', 'i', 'n', 't', 'e', 'r', 'E', 'x', 'c', 'e', 'p', 't', 'i', 'o', 'n' } * nameStart = 20 * nameEnd = 9 * result => false * 6. pattern = { 'I', 'P', 'L', '3' } * patternStart = 0 * patternEnd = 4 * name = { 'I', 'P', 'e', 'r', 's', 'p', 'e', 'c', 't', 'i', 'v', 'e', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '3' } * nameStart = 0 * nameEnd = 21 * result => true * 7. pattern = { 'H', M' } * patternStart = 0 * patternEnd = 2 * name = { 'H', 'a', 's', 'h', 'M', 'a', 'p', 'E', 'n', 't', 'r', 'y' } * nameStart = 0 * nameEnd = 12 * result => (prefixMatch == true) * 8. pattern = { 'H', M', 'a', 'p' } * patternStart = 0 * patternEnd = 4 * name = { 'H', 'a', 't', 'M', 'a', 'p', 'p', 'e', 'r' } * nameStart = 0 * nameEnd = 9 * result => (prefixMatch == true) * * @param pattern the given pattern * @param patternStart the start index of the pattern, inclusive * @param patternEnd the end index of the pattern, exclusive * @param name the given name * @param nameStart the start index of the name, inclusive * @param nameEnd the end index of the name, exclusive * @param prefixMatch flag telling whether the pattern can match name prefix or not. * . For example, when it'strue
: * - 'HM' type string pattern will match 'HashMap' and 'HtmlMapper' types, * but not 'HashMapEntry' * - 'HMap' type string pattern will match 'HashMap' type but not 'HtmlMapper'. * . and, when it'sfalse
: * - 'HM' type string pattern will match both 'HashMap' and 'HtmlMapper' * and 'HashMapEntry' * - 'HMap' type string pattern will match both 'HashMap' and 'HtmlMapper' * types. * * @return true if a sub-pattern matches the sub-part of the given name, false otherwise * @since 3.4 */ public static final boolean camelCaseMatch(char[] pattern, int patternStart, int patternEnd, char[] name, int nameStart, int nameEnd, boolean prefixMatch) { ... }
SearchPattern
but with
String
parameters instead of char[]
ones (javadoc comments
are identical):
public static final boolean camelCaseMatch(String pattern, String name, boolean prefixMatch) { ... } public static final boolean camelCaseMatch(String pattern, int patternStart, int patternEnd, String name, int nameStart, int nameEnd, boolean prefixMatch) { ... }Note also that methods
camelCaseMatch(String, int, int, String, int, int)
of CharOperation
and SearchPattern
classes have been
deprecated to avoid too many 'camelCaseMatch*' methods on these classes.
SearchPattern
constants while using Camel Case one (see bug 200400).SearchPattern#R_CAMELCASE_MATCH
constant has been deprecated andSearchPattern#R_CAMEL_CASE_MATCH
:/** * Match rule: The search pattern contains a Camel Case expression with * a strict number of parts and preventing automatic prefix matching for the last * part (if it consists of multiple letters). * * Examples: * . 'HM' type string pattern will match 'HashMap' and 'HtmlMapper' types, * but not 'HashMapEntry' * . 'HMap' type string pattern will match 'HashMap' type but not 'HtmlMapper'. * * This Camel Case match rule does not allow prefix match but accept insensitive * case. For instance, 'HashMap' or 'HASHMAP' patterns using this Camel Case * rule will match both 'HashMap' but not 'HashMapEntry'. * * This rule still can be combined to prefix match to accept prefix matches * ('HashMap' pattern matching 'HashMapEntry' name). It can also be combined * to case sensitive match to reject case insensitive matches ('HAMA' pattern * will not match 'HashMap' name). * * If {@link #R_PATTERN_MATCH} rule is also combined, then the real used * match rule will depend on whether string pattern contains specific pattern * characters (e.g. '*' or '?') or not. If it does, then only Pattern match rule will * be used, otherwise only Camel Case match will be used. * For example, with 'NPE' string pattern, search will only use * Camel Case match rule, but with 'N*P*E*' string pattern, it will * use only Pattern match rule. * * @see CharOperation#camelCaseMatch(char[], char[], boolean) for a detailed * explanation of Camel Case matching. * * @since 3.4 */ public static final int R_CAMEL_CASE_MATCH = 0x0100;This change was necessary has the obsolete
R_CAMELCASE_MATCH
could
not support correctly additional constants as R_PREFIX_MATCH
or
R_CASE_SENSITIVE
.R_CAMEL_CASE_MATCH | R_PREFIX_MATCH
JavaProject.setOption(String, String)
behavior has been slightly changed consequent upon following bugs fixing:
null
is now accepted for the option value and remove the corresponding preference from the project,org.eclipse.jdt.core.compiler.IProblem
.
For earlier build notes, also see build notes up to Release 3.3.