jdt core - build notes 3.2 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.1 (also see a summary of API changes).
Maintenance of previous releases of JDT/Core is performed in parallel branches: R3.1.x, R3.0.x, R2.1.x, R2.0.x, R1.0.x. |
* COMPILER / Reporting Unreferenced Label * When enabled, the compiler will issue an error or a warning when encountering a labeled statement which label * is never explicitly referenced. A label is considered to be referenced if its name explicitly appears behind a break * or continue statement; for instance the following label would be considered unreferenced; LABEL: { break; } * - option id: "org.eclipse.jdt.core.compiler.problem.unusedLabel" * - possible values: { "error", "warning", "ignore" } * - default: "warning"
org.eclipse.jdt.core.ToolFactory#createDefaultClassFileReader(java.io.InputStream,int)
that allows to the creation of an org.eclipse.jdt.core.util.IClassFileReader object using an input stream.
JavaCore#addPreProcessingResourceChangedListener(IResourceChangeListener,int)
that allows to register an IResourceChangedListener
for a given event type that runs
before JDT Core.IMember#getCategories()
and to get the children of a type for a given category
IType#getChildrenForCategory(String)
.* 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 '?'. * * 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 trailing lowercase characters, which will be match in a case sensitive way. These characters must * appear in sequence in the name, after the last matching capital of the pattern. For instance, 'NPExcep' will match * 'NullPointerException', but not 'NullPointerExCEPTION'. public static final boolean camelCaseMatch(char[] pattern, char[] name) public static final boolean camelCaseMatch(char[] pattern, int patternStart, int patternEnd, char[] name, int nameStart, int nameEnd)
@SuppressWarnings("unchecked")
* COMPILER / Reporting Raw Type Reference * When enabled, the compiler will issue an error or a warning when detecting references to raw types. Raw types are * discouraged, and are intended to help interfacing with legacy code. In the future, the language specification may * reject raw references to generic types. * - option id: "org.eclipse.jdt.core.compiler.problem.rawTypeReference" * - possible values: { "error", "warning", "ignore" } * - default: "ignore"
CategorizedProblem
to extend IProblem
definitions with notion of
problem category and marker type. This will enable other pluggable tool to participate in various compilation stages
and report domain specific problems through the existing API (IProblem
based). It is recommended that
clients do not directly implement IProblem
but instead do extend the abstract class CategorizedProblem
.
/**
* Returns an integer identifying the category of this problem. Categories, like problem IDs are
* defined in the context of some marker type. Custom implementations of CategorizedProblem
* may choose arbitrary values for problem/category IDs, as long as they are associated with a different
* marker type.
* @return id - an integer identifying the category of this problem
*/
public abstract int getCategoryID();
/** * Returns the marker type associated to this problem, if it was persisted into a marker by the JavaBuilder * Standard Java problems are associated to marker type "org.eclipse.jdt.core.problem"), standard tasks * are associated to marker type "org.eclipse.jdt.core.task". * @return the type of the marker which would be associated to the problem * @see org.eclipse.jdt.core.IJavaModelMarker#JAVA_MODEL_PROBLEM_MARKER * @see org.eclipse.jdt.core.IJavaModelMarker#TASK_MARKER */ public abstract String getMarkerType();
IJavaElementDelta#F_AST_AFFECTED
and IJavaElementDelta#getCompilationUnitAST()
.
The Java element delta's flag is set to F_AST_AFFECTED
when a reconcile operation affects the AST
created in the last reconcile operation. In this case the AST should be re-acquired using getCompilationUnitAST()
.
IJavaProject#encodeClasspathEntry(IClasspathEntry)
and decodeClasspathEntry(String)
.
IClassFile#becomeWorkingCopy(...)
that returns an ICompilationUnit
in working copy mode on the given class file. See its Javadoc for more details.List l = (ArrayList) someList;
List foo(List someList) { return (ArrayList) someList;}
* COMPILER / Reporting Raw Type Reference * When enabled, the compiler will signal references to raw types. Raw types are discouraged, and are intended to help interfacing * with legacy code. In the future, the language specification may reject raw references to generic types. * The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation". * - option id: "org.eclipse.jdt.core.compiler.problem.rawTypeReference" * - possible values: { "enabled", "disabled" } * - default: "disabled"
...
// System.out.println(""); //$NON-NLS-1$
...
String s = "Hello, World"; //$NON-NLS-1$ This won't be removed //$NON-NLS-2$ at all
becomes:
String s = "Hello, World"; //$NON-NLS-1$ This won't be removed at all