Community
Participate
Working Groups
Build ID: M20060921-0945 Steps To Reproduce: 1. Create the ICompilationUnit using the JavaCore 2. Get the IMethod from a created ICompilationUnit 3. Create the CompilationUnit using the ASTParser (JLS3) 4. Get the MethodDeclaration from the CompilationUnit 5. Invoke MethodDeclaration.setConstructor(true) 6. Save the change of the AST to the buffer DocumentAdapter document = new DocumentAdpater(ICompilationUnit.getBuffer()); TextEdit edit = CompilationUnit.rewrite(document, null); edit.apply(document); 7. Invoke the IMethod.isConstructor() Result : The IMethod.isConstructor still return false. More information:
Are you calling reconcile(...) on the ICompilationUnit after you save the IBuffer ?
need to call reconcile manually? will not refresh automatically?
Yes, reconcile must be called when making changes to the buffer so as to bring the working copy in sync with the buffer.
No further action.
Verified for 3.4M4.