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 155471 Details for
Bug 130000
[API] ReconcileContext API: Does getAST3 return AST with bindings?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Proposed fix + regression test
patch_130000_2.txt (text/plain), 4.04 KB, created by
Olivier Thomann
on 2010-01-06 21:30:52 EST
(
hide
)
Description:
Proposed fix + regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2010-01-06 21:30:52 EST
Size:
4.04 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core >Index: model/org/eclipse/jdt/core/compiler/ReconcileContext.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/model/org/eclipse/jdt/core/compiler/ReconcileContext.java,v >retrieving revision 1.18 >diff -u -r1.18 ReconcileContext.java >--- model/org/eclipse/jdt/core/compiler/ReconcileContext.java 7 Jan 2010 01:43:57 -0000 1.18 >+++ model/org/eclipse/jdt/core/compiler/ReconcileContext.java 7 Jan 2010 02:21:05 -0000 >@@ -118,7 +118,20 @@ > public boolean isResolvingBindings() { > return this.operation.resolveBindings; > } >- >+/** >+ * Returns the reconcile flag of this context. This flag is a bitwise value of the constant defined >+ * in {@link ICompilationUnit}. >+ * >+ * @return the reconcile flag of this context >+ * @since 3.6 >+ * >+ * @see ICompilationUnit#ENABLE_BINDINGS_RECOVERY >+ * @see ICompilationUnit#ENABLE_STATEMENTS_RECOVERY >+ * @see ICompilationUnit#IGNORE_METHOD_BODIES >+ */ >+public int getReconcileFlags() { >+ return this.operation.reconcileFlags; >+} > /** > * Returns the delta describing the change to the working copy being reconciled. > * Returns <code>null</code> if there is no change. >#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.148 >diff -u -r1.148 ReconcilerTests.java >--- src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 7 Jan 2010 01:43:49 -0000 1.148 >+++ src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java 7 Jan 2010 02:21:07 -0000 >@@ -87,7 +87,7 @@ > } > } > >-/* static class ReconcileParticipant2 extends CompilationParticipant { >+ static class ReconcileParticipant2 extends CompilationParticipant { > IJavaElementDelta delta; > org.eclipse.jdt.core.dom.CompilationUnit ast; > ReconcileParticipant2() { >@@ -100,8 +100,8 @@ > this.delta = context.getDelta(); > try { > this.ast = context.getAST3(); >- assertTrue("Context should have statement recovery enabled", context.hasStatementRecovery()); >- assertTrue("Context should have ignore method body enabled", context.hasIgnoreMethodBodies()); >+ assertTrue("Context should have statement recovery enabled", (context.getReconcileFlags() & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0); >+ assertTrue("Context should have ignore method body enabled", (context.getReconcileFlags() & ICompilationUnit.IGNORE_METHOD_BODIES) != 0); > } catch (JavaModelException e) { > assertNull("Unexpected exception", e); > } >@@ -121,13 +121,13 @@ > this.delta = context.getDelta(); > try { > this.ast = context.getAST3(); >- assertFalse("Context should have statement recovery enabled", context.hasStatementRecovery()); >- assertTrue("Context should have ignore method body enabled", context.hasIgnoreMethodBodies()); >+ assertFalse("Context should have statement recovery enabled", (context.getReconcileFlags() & ICompilationUnit.ENABLE_STATEMENTS_RECOVERY) != 0); >+ assertTrue("Context should have ignore method body enabled", (context.getReconcileFlags() & ICompilationUnit.IGNORE_METHOD_BODIES) != 0); > } catch (JavaModelException e) { > assertNull("Unexpected exception", e); > } > } >- }*/ >+ } > /** > */ > public ReconcilerTests(String name) { >@@ -4428,7 +4428,8 @@ > ast > ); > } >-/*public void testIgnoreMethodBodies3() throws CoreException { >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=130000 >+public void testIgnoreMethodBodies3() throws CoreException { > new ReconcileParticipant2(); > setWorkingCopyContents( > "package p1;\n" + >@@ -4462,6 +4463,7 @@ > ast > ); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=130000 > public void testIgnoreMethodBodies4() throws CoreException { > new ReconcileParticipant3(); > setWorkingCopyContents( >@@ -4495,5 +4497,5 @@ > "}\n", > ast > ); >-}*/ >+} > }
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 130000
:
155429
| 155471