Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 315834

Summary: Refactoring: Remove Computed Go To
Product: [Tools] PTP Reporter: Rui Wang <ruiwang3>
Component: Photran.Refactoring EngineAssignee: Rui Wang <ruiwang3>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: com-eclipse-dot-org
Version: 6.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
code com-eclipse-dot-org: iplog+

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.