Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332347 - ASTRewrite should provide an insertAfter method
Summary: ASTRewrite should provide an insertAfter method
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-refactoring (show other bugs)
Version: 8.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-10 17:31 EST by Fredrik Berg Kjolstad CLA
Modified: 2020-09-04 15:23 EDT (History)
3 users (show)

See Also:


Attachments
Patch that adds an insertAfter method to the ASTRewrite class (9.35 KB, patch)
2010-12-10 17:34 EST, Fredrik Berg Kjolstad CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fredrik Berg Kjolstad CLA 2010-12-10 17:31:44 EST
Build Identifier: M20100909-0800

The ASTRewrite class does not currently provide insertAfter functionality similar to JDT's getListRewrite().insertAfter().  This makes it awkward to insert statements after another statement.

Reproducible: Always
Comment 1 Fredrik Berg Kjolstad CLA 2010-12-10 17:34:11 EST
Created attachment 185007 [details]
Patch that adds an insertAfter method to the ASTRewrite class
Comment 2 Marc-André Laperle CLA 2011-03-03 01:52:40 EST
Hi Fredrik, I haven't really looked at the patch (yet?) but in org.eclipse.cdt.core.parser.tests.rewrite.changegenerator.* I see tests for append, insertbefore, remove and replace. So this might need some tests too.
Comment 3 Sergey Prigogin CLA 2011-11-13 00:51:47 EST
The patch doesn't apply to the latest code. Please update it.