Community
Participate
Working Groups
Build ID: M20060629-1905 Steps To Reproduce: 1.get the Imports List from the compilationUnit and then newcompilationUnit.imports().add(importdeclaration) the statements blocks the next line of codes. 2. 3. More information: I am trying to add new Import Statements in the JAVA Class but the line of code blocks the ext Lines and not give proper results.
You should look at the javadoc of the class org.eclipse.jdt.core.dom.rewrite.ASTRewrite. This might help. Also please describe what you mean by "not give proper results".
(In reply to comment #0) > Build ID: M20060629-1905 > > Steps To Reproduce: > 1.get the Imports List from the compilationUnit and then > newcompilationUnit.imports().add(importdeclaration) the statements blocks the > next line of codes. > 2. > 3. > > > More information: > I am trying to add new Import Statements in the JAVA Class > but the line of code blocks the ext Lines and not give proper results. > (In reply to comment #1) > You should look at the javadoc of the class > org.eclipse.jdt.core.dom.rewrite.ASTRewrite. This might help. > > Also please describe what you mean by "not give proper results". > I mean to say the Compilation Unit does not show the added import Statement
So did you try the AST Rewrite? Closing as INVALID since ASTRewrite is the way to go. Please reopen if using it doesn't work using ASTRewrite.
Verify for 3.3M7 with I20070503-1400.