### 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 null 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 ); -}*/ +} }