Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 315834 - Refactoring: Remove Computed Go To
Summary: Refactoring: Remove Computed Go To
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Refactoring Engine (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 7.0   Edit
Assignee: Rui Wang CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-04 16:01 EDT by Rui Wang CLA
Modified: 2010-06-24 11:30 EDT (History)
1 user (show)

See Also:


Attachments
code (16.46 KB, patch)
2010-06-04 16:01 EDT, Rui Wang CLA
com-eclipse-dot-org: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rui Wang CLA 2010-06-04 16:01:20 EDT
Created attachment 171165 [details]
code

Added a new refactoring called RemoveComputedGoTo Refactoring and its tests
Comment 1 Jeffrey Overbey CLA 2010-06-04 16:05:18 EDT
Thanks, Rui.  Can you please confirm that

1. you wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others,

2. you have the right to contribute the code to Eclipse, and

3. you have included the EPL license header in all source files?
Comment 2 Rui Wang CLA 2010-06-04 16:09:12 EDT
(In reply to comment #1)
> Thanks, Rui.  Can you please confirm that
> 
> 1. you wrote 100% of the code without incorporating content from elsewhere or
> relying on the intellectual property of others,
> 
> 2. you have the right to contribute the code to Eclipse, and
> 
> 3. you have included the EPL license header in all source files?

I confirm that 

 1. I wrote 100% of the code without incorporating content from elsewhere or
 relying on the intellectual property of others,
 
 2. I have the right to contribute the code to Eclipse, and
 
 3. I have included the EPL license header in all source files?
Comment 3 Jeffrey Overbey CLA 2010-06-15 18:09:38 EDT
This is a small contribution, so we will not need to file a CQ.
Comment 4 Jeffrey Overbey CLA 2010-06-22 20:45:51 EDT
Thanks, Rui.  I committed this to CVS with some minor changes:

1. I changed the makeSelectStmt() method to use a StringBuilder rather than string concatenation (concatenation performs a lot of unnecessary copying and uses a StringBuilder internally anyway).

2. I changed several fields to local variables since they were only used in one method.

3. Some of the casts to IASTNode were unnecessary.
Comment 5 Jeffrey Overbey CLA 2010-06-22 20:48:57 EDT
Rui, could you please add documentation for this refactoring to the Photran *7.0* Advanced Features manual?  It is here:

http://wiki.eclipse.org/PTP/photran/documentation/photran7advanced

Please follow the general form used for the other refactorings.  Let me know when that's done, and we can close this bug. Thanks a lot.
Comment 6 Rui Wang CLA 2010-06-23 11:26:12 EDT
Documentation is done.