Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 83515 Details for
Bug 210310
IJavaElementDelta contains wrong data after APT processor is enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix and regression test
210310.txt (text/plain), 2.48 KB, created by
Jerome Lanneluc
on 2007-11-22 06:24:09 EST
(
hide
)
Description:
Proposed fix and regression test
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2007-11-22 06:24:09 EST
Size:
2.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java,v >retrieving revision 1.120 >diff -u -r1.120 ReconcilerTests.java >--- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 24 Oct 2007 13:50:40 -0000 1.120 >+++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 22 Nov 2007 11:22:19 -0000 >@@ -2687,6 +2687,32 @@ > ); > } > >+/* >+ * Ensures that the delta is still correct if a participant resets the ast during reconcile >+ * (regression test for https://bugs.eclipse.org/bugs/show_bug.cgi?id=210310) >+ */ >+public void testReconcileParticipant11() throws CoreException { >+ new ReconcileParticipant() { >+ public void reconcile(ReconcileContext context) { >+ context.resetAST(); >+ } >+ }; >+ setWorkingCopyContents( >+ "package p1;\n" + >+ "import p2.*;\n" + >+ "public class X {\n" + >+ " private void foo() {\n" + >+ " }\n" + >+ "}" >+ ); >+ this.workingCopy.reconcile(AST.JLS3, true/*force problem detection*/, null, null); >+ assertDeltas( >+ "Unexpected delta", >+ "X[*]: {CHILDREN | FINE GRAINED}\n" + >+ " foo()[*]: {MODIFIERS CHANGED}" >+ ); >+} >+ > /** > * Ensures that the reconciler reconciles the new contents with the current > * contents, updating the structure of this reconciler's compilation >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/internal/core/ReconcileWorkingCopyOperation.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/internal/core/ReconcileWorkingCopyOperation.java,v >retrieving revision 1.46 >diff -u -r1.46 ReconcileWorkingCopyOperation.java >--- model/org/eclipse/jdt/internal/core/ReconcileWorkingCopyOperation.java 27 Mar 2007 14:28:58 -0000 1.46 >+++ model/org/eclipse/jdt/internal/core/ReconcileWorkingCopyOperation.java 22 Nov 2007 11:22:20 -0000 >@@ -214,7 +214,9 @@ > reconcileFlags, > this.progressMonitor); > if (this.ast != null) { >- this.deltaBuilder.delta = new JavaElementDelta(workingCopy); >+ if (this.deltaBuilder.delta == null) { >+ this.deltaBuilder.delta = new JavaElementDelta(workingCopy); >+ } > this.deltaBuilder.delta.changedAST(this.ast); > } > if (this.progressMonitor != null) this.progressMonitor.worked(1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210310
: 83515