Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317875 - AST utility class for quick fixes
Summary: AST utility class for quick fixes
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 8.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on: 312736
Blocks:
  Show dependency tree
 
Reported: 2010-06-24 15:06 EDT by Tomasz Wesolowski CLA
Modified: 2011-05-12 16:49 EDT (History)
1 user (show)

See Also:


Attachments
ASTQuickFixUtil class (6.79 KB, patch)
2010-06-24 15:07 EDT, Tomasz Wesolowski CLA
no flags Details | Diff
CxxAstUtils extended, TextUtils created (7.15 KB, patch)
2010-06-28 12:30 EDT, Tomasz Wesolowski CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Wesolowski CLA 2010-06-24 15:06:03 EDT
Build Identifier: 3.6.0

Some AST traversal/manipulation routines common to many quick fixes can be encapsulated in one class.

Reproducible: Always
Comment 1 Tomasz Wesolowski CLA 2010-06-24 15:07:31 EDT
Created attachment 172668 [details]
ASTQuickFixUtil class

used in a few fixes (soon to be committed)
Comment 2 Elena Laskavaia CLA 2010-06-25 20:24:37 EDT
Location of utility is not correct. checkers.ui is only intended for checker quickfixes itself. All framework parts should in codan.ui.

Second it has two independent group of functions ast manipulation and text manipulaton. 
Ast manipulation can go into class org.eclipse.cdt.codan.core.cxx.CxxAstUtils
(already exists). And we can create one in ui for text manipulation and name it appropriately.
Comment 3 Tomasz Wesolowski CLA 2010-06-28 12:30:00 EDT
Created attachment 172923 [details]
CxxAstUtils extended, TextUtils created

I agree.
Changed according to your suggestions
Comment 4 Elena Laskavaia CLA 2010-06-29 20:43:47 EDT
I cannot commit it because it depends on a class that does not exist in the 
patch import org.eclipse.cdt.core.dom.rewrite.DeclarationGenerator
I assume it is part of patch for refactoring: 312736.
I added dependency.
Comment 5 Elena Laskavaia CLA 2010-07-01 09:40:31 EDT
I applied it, but I renamed TextUtils to JFaceTextUtils for clarity
Thanks