jdt core - build notes 2.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. Most recent information is listed first.
This present document covers all changes since Release 2.0, changes which occurred up to Release 2.0 can be found in build notes R2.0. |
var1
is more relevant than var2
.public class X { int var1; Object var2; void foo() { int i = 1 + var<cursor> } }
IPackageFragmentRoot.attachSource(IPath, IPath, IProgressMonitor)
and
JavaCore.newLibraryEntry(...)
.
JavaCore.newLibraryEntry(...)
and IPackageFragmentRoot.attachSource(...)
),
then the Java Model will do its best to compute this root path automatically. The underlying algorithm
finds the first .java file, parses it, and extract the package declaration to compute the root path.
IPackageFragmentRoot.computeSourceAttachmentRootPath(IPath sourceAttachmentPath)
allows to detect the root path for a given source attachment and package fragment root.
var2
is less relevant than var1
.public class X { int var1; int var2 = var<cursor> }
var2
is more relevant than var1
.public class X { static int var1; int var2; void foo() { this.var<cursor> } }
var2
and the parameter var1
are more relevant
than field var1
.public class X { int var1; int var2; void foo(int var1) { var<cursor> } }
var
is more relevant than field varPlus
.public class X { int var; int varPlus; void foo() { var<cursor> } }
JavaCore.newSourceEntry(IPath path, IPath[] exclusionPatterns)
IClasspathEntry.getExclusionPatterns()
JavaCore.newSourceEntry(IPath path, IPath[] exclusionPatterns, IPath specificOutputLocation)
IClasspathEntry.getOutputLocation()
* BUILDER / Cleaning Output Folder(s) * Indicate whether the JavaBuilder is allowed to clean the output folders * when performing full build operations. * - option id: "org.eclipse.jdt.core.builder.cleanOutputFolder" * - possible values: { "clean", "ignore" } * - default: "clean"
* COMPILER / Reporting Assignment with no effect * When enabled, the compiler will issue an error or a warning whenever an assignment * has no effect (e.g 'x = x'). * - option id: "org.eclipse.jdt.core.compiler.problem.noEffectAssignment" * - possible values: { "error", "warning", "ignore" } * - default: "warning"
var2
is more relevant than var1
.public class X { Object var1; int var2; void foo() { int i = var<cursor> } }
var2
is more relevant than var1
.public class X { Object var1; int var2; void foo() { int i; i = var<cursor> } }
var2
is more relevant than var1
.public class X { Object var1; int var2; int foo() { return var<cursor> } }
var2
is more relevant than var1
.public class X { Object var1; int var2; long foo() { return (int)var<cursor> } }
var2
is more relevant than var1
.public class X { Object var1; int var2; void foo(int i) { foo(var<cursor> } }
""
meaning
tasks have normal priority).
* COMPILER / Define the Automatic Task Priorities * In parallel with the Automatic Task Tags, this list defines the priorities (high, normal or low) * of the task markers issued by the compiler. * If the default is specified, the priority of each task marker is "NORMAL". * - option id: "org.eclipse.jdt.core.compiler.taskPriorities" * - possible values: { "priority[,priority]*" } where priority is one of "HIGH", "NORMAL" or "LOW" * - default: ""
/** * Helper method for returning one option value only. Equivalent to(String)this.getOptions(inheritJavaCoreOptions).get(optionName)
* Note that it may answernull
if this option does not exist, or if there is no custom value for it. ** For a complete description of the configurable options, see
* @param optionName the name of an option * @param inheritJavaCoreOptions - boolean indicating whether JavaCore options should be inherited as well * @return the String value of a given option * @see JavaCore#getDefaultOptions * @since 2.1 */ String getOption(String optionName, boolean inheritJavaCoreOptions);JavaCore#getDefaultOptions
. *
/** * Returns the table of the current custom options for this project. Projects remember their custom options, * i.e. only the options different from the the JavaCore global options for the workspace. * A boolean argument allows to directly merge the project options with global ones fromJavaCore
. ** For a complete description of the configurable options, see
* * @param inheritJavaCoreOptions - boolean indicating whether JavaCore options should be inherited as well * @return table of current settings of all options * (key type:JavaCore#getDefaultOptions
. *String
; value type:String
) * @see JavaCore#getDefaultOptions * @since 2.1 */ Map getOptions(boolean inheritJavaCoreOptions);
/** * Sets the project custom options. All and only the options explicitly included in the given table * are remembered; all previous option settings are forgotten, including ones not explicitly * mentioned. ** For a complete description of the configurable options, see
* * @param newOptions the new options (key type:JavaCore#getDefaultOptions
. *String
; value type:String
), * ornull
to flush all custom options (clients will automatically get the global JavaCore options). * @see JavaCore#getDefaultOptions * @since 2.1 */ void setOptions(Map newOptions);
JavaCore.run(IWorkspaceRunnable, IProgressMonitor)
that allows batching
of java model operations. Only one Java element changed event is reported at the end of the batch.
For example the following code snippet notifies listeners twice:
ICompilationUnit unit = ...; unit.createType("class B {}", null, false, monitor); unit.getType("A").createField("int i;", null, false, monitor);To be notified only once, use the following:
JavaCore.run( new IWorkspaceRunnable() { public void run(IProgressMonitor monitor) throws CoreException { ICompilationUnit unit = ...; unit.createType("class B {}", null, false, monitor); unit.getType("A").createField("int i;", null, false, monitor); } }, monitor);
* JAVACORE / Reporting Incomplete Classpath * An entry on the classpath doesn't exist or is not visible (e.g. a referenced project is closed). * - option id: "org.eclipse.jdt.core.incompleteClasspath" * - possible values: { "error", "warning"} * - default: "error" * * JAVACORE / Reporting Classpath Cycle * A project is involved in a cycle. * - option id: "org.eclipse.jdt.core.circularClasspath" * - possible values: { "error", "warning" } * - default: "error"
* COMPILER / Reporting Deprecation Inside Deprecated Code * When enabled, the compiler will signal use of deprecated API inside deprecated code. * The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.deprecation". * - option id: "org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode" * - possible values: { "enabled", "disabled" } * - default: "disabled"
"org.eclipse.jdt.core.task"
).
org.eclipse.jdt.core.compiler.IProblem#Task
. Note that
clients of IProblemRequestor
will get detected tasks as warnings with this new ID, they
can be filtered out if needed.
""
meaning no
task is detected).
* COMPILER / Define the Automatic Task Tags * When the tag is non empty, the compiler will issue a task marker whenever it encounters * one of the corresponding tag inside any comment in Java source code. * Generated task messages will include the tag, and range until the next line separator or comment ending, and will be trimmed. * - option id: "org.eclipse.jdt.core.taskTags" * - possible values: { "[, ]*" } where is a String without any wild-card * - default: ""
JavaCore.COMPILER_PB_STATIC_ACCESS_RECEIVER()
)