blob: e7a0e0bb87b80205db76d4e340636322432818f5 [file] [log] [blame]
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="IBM">
<meta name="GENERATOR" content="Mozilla/4.75 [en] (Windows NT 5.0; U) [Netscape]">
<title>JDT/Core Release Notes</title>
</head>
<body>
<body text="#000000" bgcolor="#FFFFFF">
&nbsp;
<table border=0 cellspacing=5 cellpadding=2 width="100%" >
<tr>
<td align=left width="72%">
<font face="Verdana, Arial, Helvetica" size="+3"><b>jdt core - build notes 3.0 stream</b></font>
<br><font face="Arial, Helvetica, sans-serif" size="-2" color="#8080ff">java development tooling core</font></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td>
<font face="Arial, Helvetica, sans-serif" size="-1">
Here are the build notes for the Eclipse JDT/Core plug-in project
<a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/main.html"><b>org.eclipse.jdt.core</b></a>,
describing <a href="http://bugs.eclipse.org/bugs" target=new>bug</a> resolution and substantial changes in the <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core"><b>HEAD</b></a> branch.
This present document covers all changes since Release 2.1 (also see a summary of <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/API_changes.html">API changes</a>).
Older changes which occurred up to Release 2.1 can be found in
<a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/R21_buildnotes_jdt-core.html">build notes R2.1</a>.
</font>
</td>
</tr>
</table>
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 16th July 2003 - 3.0 MILESTONE-2
<br>Project org.eclipse.jdt.core v_364
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_364">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=40210">40210</a>
ICompilationUnit#isWorkingCopy() misbehaving for discarded working copies
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 15th July 2003
<br>Project org.eclipse.jdt.core v_363
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_363">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Added flag <code>IJavaElementDelta.F_PRIMARY_WORKING_COPY</code> that signals that a compilation unit has become a
primary working copy, or that a primary working copy has reverted to a compilation unit (i.e. primary working copies are not notified
as being added/removed like other working copies, since the primary unit is only changing mode, also see bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=40028">40028</a>).
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=40028">40028</a>
Deltas and deleted working copies
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39823">39823</a>
AST: Would like to have binding of Serializable and Clonable
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 14th July 2003
<br>Project org.eclipse.jdt.core v_362
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_362">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li> Added optional diagnosis for unnecessary cast or instanceof operations (matching problem IDs are
<code>IProblem.UnnecessaryCast</code>, <code>IProblem.UnnecessaryArgumentCast</code>, <code>IProblem.UnnecessaryInstanceof</code>).
<pre>
* COMPILER / Reporting Unnecessary Type Check
* When enabled, the compiler will issue an error or a warning when a cast or an instanceof operation
* is unnecessary.
* - option id: "org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck"
* - possible values: { "error", "warning", "ignore" }
* - default: "ignore"
</pre>
</li>
<li> Changed Java element delta processing to be thread-safe.
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39926">39926</a>
deleting default package (not in source folder) does nothing
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39877">39877</a>
Rebuild All generates extra "Unable to read classpath" entry.
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39925">39925</a>
Unnecessary instanceof checking leads to a NullPointerException
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35442">35442</a>
flag unnecessary casts
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39841">39841</a>
Give better explanation of why abstract class can't be instantiated
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39467">39467</a>
Classes not implementing abstract methods compile without error
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39763">39763</a>
Non NLS string is reported and it should not
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39779">39779</a>
End position of IType exceeds the size of CompilationUnit
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39766">39766</a>
compilation unit cannot be saved
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39664">39664</a>
setSuperInterfaces(String[] interfaceNames) API of org.eclipse.jdt.core.jdom.IDOMType interface does not work for an empty array parameter as Input
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39663">39663</a>
setSuperclass(String superclassName) API of org.eclipse.jdt.core.jdom.IDOMType interface does not work for null as Input
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39736">39736</a>
JavaModelException on copying read-only CompilationUnits
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39009">39009</a>
NPE in Delta processor while executing JDT/UI tests
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35739">35739</a>
Stack dump on console
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35632">35632</a>
NPE in DeltaProcessor
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39281">39281</a>
Unable Refacter (renaming) an inner class
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38450">38450</a>
Delete: Removing default package removes source folder
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 7th July 2003
<br>Project org.eclipse.jdt.core v_361
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_361">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li> Added optional compiler diagnosis for boolean method declaring thrown exceptions
(matching problem ID is <code>IProblem.BooleanMethodThrowingException</code>)
<pre>
* COMPILER / Reporting Boolean Method Declaring Thrown Exceptions
* When enabled, the compiler will issue an error or a warning when a boolean method declaration
* is specifying a clause for thrown exceptions. Some of them are predicates, and these should only
* return a boolean value and not raise exceptions.
* - option id: "org.eclipse.jdt.core.compiler.problem.booleanMethodThrowingException"
* - possible values: { "error", "warning", "ignore" }
* - default: "ignore"
</pre>
<li> Added optional compiler diagnosis for indirect references to static members (matching problem IDs are:
<code>IProblem.IndirectAccessToStaticField</code>, <code>IProblem.IndirectAccessToStaticMethod</code>, <code>IProblem.IndirectAccessToStaticType</code>).
<pre>
* COMPILER / Reporting Indirect Reference to a Static Member
* When enabled, the compiler will issue an error or a warning whenever a static field
* or method is accessed in an indirect way. A reference to a static member should
* preferably be qualified with its declaring type name.
* - option id: "org.eclipse.jdt.core.compiler.problem.indirectStaticAccess"
* - possible values: { "error", "warning", "ignore" }
* - default: "ignore"
</pre>
</li>
<li> Removed method <code>Parser#grammar()</code>, which was hosting the Java grammar as a massive comment.
From now on, the grammar is defined in its own separate file: <a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/grammar/java_1_4.g"><code>java_1_4.g</code></a>.
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39624">39624</a>
Should warn about predicate throwing exceptions
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39168">39168</a>
Could remove JavaElement.fLEType field
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36989">36989</a>
Incorrect error for "super must be first statement in constructor"
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=3319">3319</a>
wrong compile-time error message (1GG1LDK)
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39268">39268</a>
Optional warning for indirect static references
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39533">39533</a>
Working copy with no corresponding file not considered by NameLookup
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39502">39502</a>
No completion in message send
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39475">39475</a>
Extra error diagnosis in editor from siblings
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 1st July 2003
<br>Project org.eclipse.jdt.core v_360
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_360">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li> Plugin version ID got incremented to 3.0.0.
</li>
<li> Removed tolerance for relative source attachments in <code>JavaCore.newLibraryEntry(...)</code>. Only
allowing relative empty pathes so as to permit using classpath variables to denote the absence of a source attachment.
<li>To finish closing the gap between compilation units and working copies
(see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36888">bug 36888</a>), new APIs were added to generalize
the usage of a working copy owner (entire JavaModel is now aware of owned working copies). These new APIs are copies of existing APIs augmented with
a <code>WorkingCopyOwner</code> parameter, that defines the working copies to consider in the operation.
When specifying an owner parameter, all working copies belonging to this owner will implicitly take precedence over primary ones
(without requiring the owner to remember all its working copies, as in 2.1 era). Note that when no owned working copy is found, a primary
unit will be considered instead, and since primary units have a built-in working copy (see <code>ICompilationUnit.becomeWorkingCopy(...)</code>),
the primary unit may already be in working copy mode (very likely since an editor got opened on it). This means that an owner will already
transparently see unsaved editor contents for all units for which it has no better working copy to contribute.
The following new APIs were added:
<ul>
<li><code>AST.parseCompilationUnit(char[] source, String unitName, IJavaProject project, WorkingCopyOwner owner)</code></li>
<li><code>AST.parseCompilationUnit(IClassFile classFile, boolean resolveBindings, WorkingCopyOwner owner)</code></li>
<li><code>AST.parseCompilationUnit(ICompilationUnit unit, boolean resolveBindings, WorkingCopyOwner owner)</code></li>
<li><code>IEvaluationContext.codeComplete(String codeSnippet, int position, ICompletionRequestor requestor, WorkingCopyOwner owner)</code></li>
<li><code>IEvaluationContext.codeSelect(String codeSnippet, int offset, int length, WorkingCopyOwner owner)</code></li>
<li><code>IDOMCompilationUnit.getCompilationUnit(IPackageFragment parent, WorkingCopyOwner owner)</code></li>
<li><code>ICodeAssist.codeComplete(int offset, ICompletionRequestor requestor, WorkingCopyOwner owner)</code></li>
<li><code>ICodeAssist.codeSelect(int offset, int length, WorkingCopyOwner owner)</code></li>
<li><code>ICompilationUnit.reconcile(boolean forceProblemDetection, WorkingCopyOwner owner, IProgressMonitor monitor)</code></li>
<li><code>IJavaProject.findElement(IPath path, WorkingCopyOwner owner)</code></li>
<li><code>IJavaProject.findType(String packageName, String typeQualifiedName, WorkingCopyOwner owner)</code></li>
<li><code>IJavaProject.findType(String fullyQualifiedName, WorkingCopyOwner owner)</code></li>
<li><code>IJavaProject.newTypeHierarchy(IRegion region, WorkingCopyOwner owner, IProgressMonitor monitor)</code></li>
<li><code>IJavaProject.newTypeHierarchy(IType type, IRegion region, WorkingCopyOwner owner, IProgressMonitor monitor)</code></li>
<li><code>IPackageFragment.getCompilationUnit(String name, WorkingCopyOwner owner)</code></li>
<li><code>IPackageFragment.getCompilationUnits(WorkingCopyOwner owner)</code></li>
<li><code>IType.codeComplete(char[] snippet, int insertion, int position, char[][] localVariableTypeNames, char[][] localVariableNames, int[] localVariableModifiers, boolean isStatic, ICompletionRequestor requestor, WorkingCopyOwner owner)</code></li>
<li><code>IType.newSupertypeHierarchy(WorkingCopyOwner owner, IProgressMonitor monitor)</code></li>
<li><code>IType.newTypeHierarchy(IJavaProject project, WorkingCopyOwner owner, IProgressMonitor monitor)</code></li>
<li><code>IType.newTypeHierarchy(WorkingCopyOwner owner, IProgressMonitor monitor)</code></li>
<li><code>IType.resolveType(String typeName, WorkingCopyOwner owner)</code></li>
<li><code>JavaCore.create(IFile file, WorkingCopyOwner owner)</code></li>
<li><code>JavaCore.create(IResource resource, WorkingCopyOwner owner)</code></li>
<li><code>JavaCore.create(String handleIdentifier, WorkingCopyOwner owner)</code></li>
<li><code>JavaCore.createCompilationUnitFrom(IFile file, WorkingCopyOwner owner)</code></li>
<li><code>JavaCore.getWorkingCopies(WorkingCopyOwner owner)</code></li>
<li><code>SearchEngine.SearchEngine(WorkingCopyOwner workingCopyOwner)</code></li>
<li><code>SearchEngine.createHierarchyScope(IType type, WorkingCopyOwner owner)</code></li>
</ul>
</li>
<li> Added optional problem to signal superfluous semicolons (matching problem ID is <code>IProblem.SuperfluousSemicolon</code>).
<pre>
* COMPILER / Reporting Superfluous Semicolon
* When enabled, the compiler will issue an error or a warning if a superfluous semicolon is met.
* - option id: "org.eclipse.jdt.core.compiler.problem.superfluousSemicolon"
* - possible values: { "error", "warning", "ignore" }
* - default: "ignore"</pre>
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=26281">26281</a>
error hover text indicates wrong problem
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=23166">23166</a>
Syntax error message from Java compiler is confusing.
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33213">33213</a>
Same error reported more than once?
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36214">36214</a>
TODOs reported twice when located at the end of the method declaration
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36232">36232</a>
binding do not fully consider working copies
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36888">36888</a>
Close the gap between original and working copies
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39311">39311</a>
Outliner did not refresh after method rename (refactor)
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39259">39259</a>
While statement has wrong source position
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39007">39007</a>
Infinite loop trying to index a non-existing external jar
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=39172">39172</a>
Incorrect error reported if extra semi-colon exists on a return statement
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 23rd June 2003
<br>Project org.eclipse.jdt.core v_359
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_359">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Added API on <code>ICompilationUnit</code> to get the primary compilation unit of a working copy
(it replaces <code>IWorkingCopy.getOriginalElement()</code>):
<pre>
/**
* Returns the primary compilation unit (whose owner is the primary owner)
* this working copy was created from, or this compilation unit if this a primary
* compilation unit.
* Note that the returned primary compilation unit can be in working copy mode.
*
* @return the primary compilation unit this working copy was created from,
* or this compilation unit if it is primary
* @since 3.0
*/
ICompilationUnit getPrimary();
</pre>
</li>
<li>Added API on <code>IJavaElement</code> to get the primary element of a working copy
element (it replaces <code>IWorkingCopy.getOriginalElement(IJavaElement)</code>):
<pre>
/**
* Returns the primary element (whose compilation unit is the primary compilation unit)
* this working copy element was created from, or this element if it is a descendant of a
* primary compilation unit or if it is not a descendant of a working copy (e.g. it is a
* binary member).
* The returned element may or may not exist.
*
* @return the primary element this working copy element was created from, or this
* element.
* @since 3.0
*/
IJavaElement getPrimaryElement();
</pre>
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38678">38678</a>
workspace did not shutdown
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37006">37006</a>
2 tasks in the tasks view instead of one
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38759">38759</a>
Task Tags: should not consider text in substrings/parts of text
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36066">36066</a>
Outliner did not refresh after field rename
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38951">38951</a>
NPE in editor while saving contents
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35877">35877</a>
Stack overflow in code assist
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35409">35409</a>
RC2 Compiler produces bogus error messages
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38838">38838</a>
SyntaxError- unoptimal syntax error message
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 18th June 2003
<br>Project org.eclipse.jdt.core v_357b
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_357b">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Backported index manager deadlock fix on top of v_357</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38901">38901</a>
IndexManager hangs in end-less loop
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M2 Build - 16th June 2003
<br>Project org.eclipse.jdt.core v_358
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_358">cvs</a>).
<p><b>NOTE:</b> This version got backed out due to severe regression
(see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38951">38951</a> NPE in editor while saving contents).
Until subsequent version is made available (see above), integration builds will revert to previous version (v_357).
<h2>
What's new in this drop</h2>
<ul>
<li><code>JavaCore.newLibraryEntry(...)</code> will now allow an empty source attachment (<code>new Path("")</code>) to
be equivalent to no source attachment (i.e. <code>null</code>). This adjustment is made necessary for
library entries generated from classpath variables which cannot be set to <code>null</code>. Also see
bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38531">38531</a>.
<pre>
* @param sourceAttachmentPath the absolute path of the corresponding source archive or folder,
* or <code>null</code> if none. Note, since 3.0, an empty path is allowed to denote no source attachment.
* and will be automatically converted to <code>null</code>.
</pre>
</li>
<li>Added API <code>IJavaProject#forceClasspathReload(IProgressMonitor)</code> to force reload of <code>.classpath</code> file
before next automatic update occurs.
<pre>
/**
* Force the project to reload its <code>.classpath</code> file from disk and update the classpath accordingly.
* Usually, a change to the <code>.classpath</code> file is automatically noticed and reconciled at the next
* resource change notification event. If required to consider such a change prior to the next automatic
* refresh, then this functionnality should be used to trigger a refresh. In particular, if a change to the file is performed,
* during an operation where this change needs to be reflected before the operation ends, then an explicit refresh is
* necessary.
*
* @param monitor a progress monitor for reporting operation progress
* @exception JavaModelException if the classpath could not be updated. Reasons
* include:
* - This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
* - Two or more entries specify source roots with the same or overlapping paths (NAME_COLLISION)
* - A entry of kind <code>CPE_PROJECT</code> refers to this project (INVALID_PATH)
* - This Java element does not exist (ELEMENT_DOES_NOT_EXIST)</li>
* - The output location path refers to a location not contained in this project (<code>PATH_OUTSIDE_PROJECT</code>)
* - The output location path is not an absolute path (<code>RELATIVE_PATH</code>)
* - The output location path is nested inside a package fragment root of this project (<code>INVALID_PATH</code>)
* - The classpath is being modified during resource change event notification (CORE_EXCEPTION)
* @since 3.0
*/
</pre>
</li>
<li>In the process of closing the gap between compilation units and working copies
(see <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36888 ">bug 36888 </a>), the following new APIs
are added to <code>ICompilationUnit</code>:
<ul>
<li><pre>
/**
* Changes this compilation unit handle into a working copy. A new IBuffer is
* created using this compilation unit handle's owner. Uses the primary owner is none was
* specified when this compilation unit handle was created.
*
* When switching to working copy mode, problems are reported to given
* IProblemRequestor.
*
* Once in working copy mode, changes to this compilation unit or its children are done in memory.
* Only the new buffer is affected. Using commitWorkingCopy(boolean, IProgressMonitor)
* will bring the underlying resource in sync with this compilation unit.
*
* If this compilation unit was already in working copy mode, an internal counter is incremented and no
* other action is taken on this compilation unit. To bring this compilation unit back into the original mode
* (where it reflects the underlying resource), discardWorkingCopy must be call as many
* times as becomeWorkingCopy.
*
* @param problemRequestor a requestor which will get notified of problems detected during
* reconciling as they are discovered. The requestor can be set to null indicating
* that the client is not interested in problems.
* @param monitor a progress monitor used to report progress while opening this compilation unit
* or null if no progress should be reported
* @exception JavaModelException if this compilation unit could not become a working copy.
* @see discardWorkingCopy
* @since 3.0
*/
void becomeWorkingCopy(IProblemRequestor problemRequestor, IProgressMonitor monitor) throws JavaModelException;
</pre></li>
<li><pre>
/**
* Commits the contents of this working copy to its underlying resource.
*
* It is possible that the contents of the original resource have changed
* since this working copy was created, in which case there is an update conflict.
* The value of the force parameter effects the resolution of
* such a conflict:
* - true - in this case the contents of this working copy are applied to
* the underlying resource even though this working copy was created
* before a subsequent change in the resource
* - false - in this case a JavaModelException is thrown
*
* Since 2.1, a working copy can be created on a not-yet existing compilation
* unit. In particular, such a working copy can then be committed in order to create
* the corresponding compilation unit.
*
* @param force a flag to handle the cases when the contents of the original resource have changed
* since this working copy was created
* @param monitor the given progress monitor
* @exception JavaModelException if this working copy could not commit. Reasons include:
* - A CoreException occurred while updating an underlying resource
* - This element is not a working copy (INVALID_ELEMENT_TYPES)
* - A update conflict (described above) (UPDATE_CONFLICT)
* @since 3.0
*/
void commitWorkingCopy(boolean force, IProgressMonitor monitor) throws JavaModelException;
</pre></li>
<li><pre>
/**
* Changes this compilation unit in working copy mode back to its original mode.
*
* This has no effect if this compilation unit was not in working copy mode.
*
* If becomeWorkingCopy was called several times on this
* compilation unit, discardWorkingCopy must be called as
* many times before it switches back to the original mode.
*
* @see becomeWorkingCopy
* @exception JavaModelException if this working copy could not return in its original mode.
* @since 3.0
*/
void discardWorkingCopy() throws JavaModelException;
</pre></li>
<li><pre>
/**
* Returns the working copy owner of this working copy.
* Returns null if it is not a working copy or if it has no owner.
*
* @return WorkingCopyOwner the owner of this working copy or null
* @since 3.0
*/
WorkingCopyOwner getOwner();
</pre></li>
<li><pre>
/**
* Returns a new working copy of this element if this element is not
* a working copy, or this element if this element is already a working copy.
*
* Note: if intending to share a working copy amongst several clients, then
* getWorkingCopy(WorkingCopyOwner, IProblemRequestor, IProgressMonitor)
* should be used instead.
*
* When the working copy instance is created, an ADDED IJavaElementDelta is
* reported on this working copy.
*
* Since 2.1, a working copy can be created on a not-yet existing compilation
* unit. In particular, such a working copy can then be committed in order to create
* the corresponding compilation unit.
*
* @param monitor a progress monitor used to report progress while opening this compilation unit
* or null if no progress should be reported
* @exception JavaModelException if the contents of this element can
* not be determined.
* @return a new working copy of this element if this element is not
* a working copy, or this element if this element is already a working copy
* @since 3.0
*/
ICompilationUnit getWorkingCopy(IProgressMonitor monitor) throws JavaModelException;
</pre></li>
<li><pre>
/**
* Returns a shared working copy on this element using the given working copy owner to create
* the buffer, or this element if this element is already a working copy.
* This API can only answer an already existing working copy if it is based on the same
* original compilation unit AND was using the same working copy owner (that is, as defined by Object.equals).
*
* The life time of a shared working copy is as follows:
* - The first call to getWorkingCopy(WorkingCopyOwner, IProblemRequestor, IProgressMonitor)
* creates a new working copy for this element
* - Subsequent calls increment an internal counter.
* - A call to discardWorkingCopy() decrements the internal counter.
* - When this counter is 0, the working copy is discarded.
*
* So users of this method must discard exactly once the working copy.
*
* Note that the working copy owner will be used for the life time of this working copy, that is if the
* working copy is closed then reopened, this owner will be used.
* The buffer will be automatically initialized with the original's compilation unit content
* upon creation.
*
* When the shared working copy instance is created, an ADDED IJavaElementDelta is reported on this
* working copy.
*
* Since 2.1, a working copy can be created on a not-yet existing compilation
* unit. In particular, such a working copy can then be committed in order to create
* the corresponding compilation unit.
*
* @param owner the working copy owner that creates a buffer that is used to get the content
* of the working copy
* @param problemRequestor a requestor which will get notified of problems detected during
* reconciling as they are discovered. The requestor can be set to null indicating
* that the client is not interested in problems.
* @param monitor a progress monitor used to report progress while opening this compilation unit
* or null if no progress should be reported
* @exception JavaModelException if the contents of this element can
* not be determined.
* @return a new working copy of this element using the given factory to create
* the buffer, or this element if this element is already a working copy
* @since 3.0
*/
ICompilationUnit getWorkingCopy(WorkingCopyOwner owner, IProblemRequestor problemRequestor, IProgressMonitor monitor) throws JavaModelException;
</pre></li>
</ul>
And the following abstract class replaces <code>IBufferFactory</code>:
<pre>
/**
* The owner of an ICompilationUnit handle in working copy mode.
* An owner is used to identify a working copy and to create its buffer.
*
* @see ICompilationUnit#becomeWorkingCopy
* @see ICompilationUnit#discardWorkingCopy
* @since 3.0
*/
public abstract class WorkingCopyOwner {
/**
* Creates a buffer for the given working copy.
* The new buffer will be initialized with the contents of the underlying file
* if and only if it was not already initialized by the compilation owner (a buffer is
* uninitialized if its content is null).
*
* @param workingCopy the working copy of the buffer
* @return IBuffer the created buffer for the given working copy
* @see IBuffer
*/
public IBuffer createBuffer(ICompilationUnit workingCopy) {
...
}
}
</pre>
The intent for the primary owner is to use a buffer factory that would be
provided by the org.eclipse.text infractructure. This infrastructure not being
ready yet, in the meantime one can change the primary owner's
<code>IBufferFactory</code> using the following internal API:
<pre>
org.eclipse.jdt.internal.core.DefaultWorkingCopyOwner.PRIMARY.factory = ...;
</pre>
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38901">38901</a>
IndexManager hangs in end-less loop
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38908">38908</a>
Ant script reports that the bootclasspath cannot be infer
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38531">38531</a>
IllegalArgumentException "Source attachment path should be absolute"
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38424">38424</a>
Mistake on Web site
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38732">38732</a>
organize imports does not work with assert in source code
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38447">38447</a>
AST: Source ranges with missing bracket
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36854">36854</a>
NPE opening type hierarchy
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33530">33530</a>
JavaModel synchronization model should be more optimistic
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=20931">20931</a>
Need an API to reload the classpath from the file
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38393">38393</a>
bytecode generated for evaluation with parentheses is wrong
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 5th June 2003 - 3.0 MILESTONE-1
<br>Project org.eclipse.jdt.core v_357
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_357">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37274">37274</a>
Deadlock on plugin import
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 4th June 2003
<br>Project org.eclipse.jdt.core v_356
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_356">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38362">38362</a>
Inconsistent output when using comparrisson operators
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 3rd June 2003
<br>Project org.eclipse.jdt.core v_355
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_355">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Fix for bug <a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37111">37111</a> may issue some outgoing changes
to .classpath file since the source attachment will be shortened into a project relative path when applicable. The .classpath file
is still backward compatible, and will continue to accept non relative source attachments as well. </li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37111">37111</a>
classpath file - java source attachment shouldn't hardcode project name
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38143">38143</a>
this = null; should raise compile time error
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=38124">38124</a>
Brackets around cast accepted by Eclipse but not javac
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 26th May 2003
<br>Project org.eclipse.jdt.core v_354
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_354">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Added <code>JavaCore</code> optional problem to detect incompatible required binaries, so as to flag situations where
some prerequisite binaries are required a JRE level higher than the project target platform; i.e. compiling against 1.4 libraries
when deploying for 1.1 platform is likely unwanted.
<pre>
* JAVACORE / Reporting Incompatible JDK Level for Required Binaries
* Indicate the severity of the problem reported when a project prerequisites another project
* or library with an incompatible target JDK level (e.g. project targeting 1.1 vm, but compiled against 1.4 libraries).
* - option id: "org.eclipse.jdt.core.incompatibleJDKLevel"
* - possible values: { "error", "warning", "ignore" }
* - default: "ignore"
</pre>
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37750">37750</a>
incorrect handle identifier for IImportContainer
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36674">36674</a>
compiler can generate Java 1.4-only bytecode regardless of compatibility settings
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37962">37962</a>
Unexpected transient problem during reconcile
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37166">37166</a>
NPE in SearchEngine when matching type against ProblemReferenceBinding
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37438">37438</a>
searchenging NPE in searchDeclarationsOfReferencedTypes
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37779">37779</a>
ExceptionInInitializerError when using JDTCompilerAdapter
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36307">36307</a>
JDK1.4.2: Wrong declaring class for clone method on array class
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 19th May 2003
<br>Project org.eclipse.jdt.core v_353
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_353">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37621">37621</a>
java compiler creates class with internal inconsistency
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37646">37646</a>
Help for JDTCompilerAdapter is dated
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36894">36894</a>
JobManager could wait when idle
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37541">37541</a>
Unoptimal deprecation diagnosis
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37565">37565</a>
JACKS: Class literal should not cause class initialization
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37503">37503</a>
Compiler does not take care of exclusion filter
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 13th May 2003
<br>Project org.eclipse.jdt.core v_352
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_352">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Lowered default severity of field/local variable hiding optional diagnosis to <code>"ignore"</code>.
</li>
<li>Lowered default severity of accidental boolean assignment optional diagnosis to <code>"ignore"</code>.
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37501">37501</a>
VerifyError with assert when optimizing out unused local variables
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37387">37387</a>
Compiler generates unnecessary byte codes
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37381">37381</a>
AST: Wrong source ranges on VariableDeclExpression
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37200">37200</a>
"Source->Generate Delegate Methods..." fails
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 29th April 2003
<br>Project org.eclipse.jdt.core v_351
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_351">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=37040">37040</a>
VerifyError "Illegal target of jump or branch"
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36490">36490</a>
Java compiler misses dependency on 'static final' class variables
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36814">36814</a>
NaiveASTFlattener does not serialize try-finally statements correctly
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36772">36772</a>
AST: CompilationUnit.findDeclaringNode: Spec/Impl not same
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36711">36711</a>
Resource duplication message should list location of duplicate
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36718">36718</a>
Compiler should not generate references to classes not on the classpath
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 3.0M1 Build - 22nd April 2003
<br>Project org.eclipse.jdt.core v_350
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_350">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
<li>Added new compiler optional problem to signal cases where a boolean variable is assigned
in a condition expression. It is likely an accidental situation, where a comparison was actually meant.
<pre>
* COMPILER / Reporting Possible Accidental Boolean Assignment
* When enabled, the compiler will issue an error or a warning if a boolean assignment is acting as the condition
* of a control statement (where it probably was meant to be a boolean comparison).
* - option id: "org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment"
* - possible values: { "error", "warning", "ignore" }
* - default: "warning"
</pre>
</li>
<li>Added new compiler settings to control the diagnosis of variable hiding other ones.
<pre>
* COMPILER / Reporting Local Variable Declaration Hiding another Variable
* When enabled, the compiler will issue an error or a warning whenever a local variable
* declaration is hiding some field or local variable (either locally, inherited or defined in enclosing type).
* - option id: "org.eclipse.jdt.core.compiler.problem.localVariableHiding"
* - possible values: { "error", "warning", "ignore" }
* - default: "warning"
*
* COMPILER / Reporting Field Declaration Hiding another Variable
* When enabled, the compiler will issue an error or a warning whenever a field
* declaration is hiding some field or local variable (either locally, inherited or defined in enclosing type).
* - option id: "org.eclipse.jdt.core.compiler.problem.fieldHiding"
* - possible values: { "error", "warning", "ignore" }
* - default: "warning"
*
* COMPILER / Reporting Special Parameter Hiding another Field
* When enabled, the compiler will signal cases where a constructor or setter method parameter declaration
* is hiding some field (either locally, inherited or defined in enclosing type).
* The severity of the problem is controlled with option "org.eclipse.jdt.core.compiler.problem.localVariableHiding".
* - option id: "org.eclipse.jdt.core.compiler.problem.specialParameterHidingField"
* - possible values: { "enabled", "disabled" }
* - default: "disabled"
</pre>
</li>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36510">36510</a>
Automatically attach source for source files located in a class folder
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36499">36499</a>
exists() returns true for a source file inside a classfolder
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36438">36438</a>
null == null causes java.lang.VerifyError
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35755">35755</a>
Search in hierarchy misses dependent projects
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36465">36465</a>
Unable to create multiple source folders when not using bin for output
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36339">36339</a>
Try codegen issues slightly incorrect ANY exception handler
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35965">35965</a>
Source not found in source attachment
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36447">36447</a>
Unoptimal wide conditional branch bytecode sequence
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=19286">19286</a>
Suspicious synchronized operations
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36213">36213</a>
ArrayIndex out of bounds
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36244">36244</a>
JDK1.4.2: Add -cp as a batch option
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35528">35528</a>
When I check out a project from CVS, Updating takes a very long time
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36058">36058</a>
Unknown NPE in log
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21661">21661</a>
Compile dependency problems
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=28937">28937</a>
Compiler Problem Marker: Accidental Boolean Assignment
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33831">33831</a>
ast API: add FieldAccess.resolveFieldBinding
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35649">35649</a>
The SourceMapper instances could share the fileNamefilter
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34896">34896</a>
compiler setting "unused private fields"
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=33751">33751</a>
The numbering of anonymous could be optimized
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35849">35849</a>
Incremental compilation ignores linked folders
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35926">35926</a>
Batch compiler compile should return false when the command line is incorrect
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35421">35421</a>
[nls] Inconsistencies between properties files and nls strings
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=34173">34173</a>
Create a compiler warning when an instance variable is "re-declared" as a local variable.
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=21140">21140</a>
Warning/error on shadowing definition of data member?
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35490">35490</a>
Search doesn't work for reference of 'cursorLocation'
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35338">35338</a>
Cannot save file, "Save failed:null" error message received
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35438">35438</a>
CastExpression resolution departs from JLS section 6.5.1
<br><a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=36165">36165</a>
[DOM/AST] Incorrect grammar rule in TypeDeclaration
<p><hr><h1>
Eclipse Platform Build Notes&nbsp;<br>
Java Development Tooling Core</h1>
Eclipse SDK 2.1 Build (before 3.0/2.1.1 branching) - 31st March 2003
<br>Project org.eclipse.jdt.core v_312
(<a href="http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.core/?only_with_tag=v_312">cvs</a>).
<h2>
What's new in this drop</h2>
<ul>
</ul>
<h3>Problem Reports Fixed</h3>
<a href="http://bugs.eclipse.org/bugs/show_bug.cgi?id=35831">35831</a>
NPE navigating references using links
<p><hr>
For earlier build notes, also see <a href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.jdt.core/notes/R21_buildnotes_jdt-core.html">build notes up to Release 2.1</a>.
<br>&nbsp;
</body>
</html>