Bug 331880 - Refactoring [427]: IF Statement/Construct Refactoring - CQ Approved
Summary: Refactoring [427]: IF Statement/Construct Refactoring - CQ Approved
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Refactoring Engine (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows 7
: P1 enhancement (vote)
Target Milestone: 7.0   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-05 20:07 EST by Xi Chen CLA
Modified: 2011-03-16 03:39 EDT (History)
6 users (show)

See Also:


Attachments
Patch including all updated projects for this enhancement. (65.48 KB, patch)
2010-12-05 20:07 EST, Xi Chen CLA
no flags Details | Diff
If Statement/Construct Refactoring revision patch #1 (64.57 KB, patch)
2010-12-09 18:18 EST, Xi Chen 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 Xi Chen CLA 2010-12-05 20:07:32 EST
Created attachment 184567 [details]
Patch including all updated projects for this enhancement.

Added and modified classes in order to implement IF statement to IF construct and IF construct to IF statement refactoring to Photran. Program will validate that a valid IF statement or construct is selected at the time of refactoring, and will ensure that the selected text is refactorable.
Comment 1 Jeffrey Overbey CLA 2010-12-08 11:30:40 EST
Hi all,

Thanks for the patch.  It looks good... there are just a few minor issues I'd like you to fix.  Please re-submit the patch with these changes:

1. Since this wasn't a work for hire, please remove "UIUC - Initial API and implementation" from the copyright headers for IfConstructStatementConversionRefactoring, IfConstructStatementConversionRefactoringTestSuite, and IfConstructStatementConversionAction -- your names are all we need there

2. We only need @author tags in the JavaDoc for the class itself.  Please remove them from the method comments.

3. You should be able to get rid of the #parseLiteralIfConstructNode and #parseLiteralIfConstructNode methods: Just call #parseLiteralStatement and downcast the result to the appropriate AST node class.

4. In #doCreateChange, it's better to throw IllegalStateException rather than OperationCanceledException since you're essentially checking an assertion.  IllegalStateException is an unchecked exception, so you can throw it without changing the method declaration (i.e., you don't need to include it in the throws clause).

5. You should be able to remove the qualifiers from "org.eclipse.rephraserengine.core.vpg.refactoring.VPGRefactoring.PreconditionFailure" in the throws clauses -- just add an import statement and replace it with "throws PreconditionFailure"

6. Please fix the Java code formatting to match the other refactoring classes (e.g., braces on the next line, spaces before opening parentheses after if and while, etc.).  Source > Format will get you close, but you'll still want to do some manual clean-up.

Thanks a lot!
Comment 2 Xi Chen CLA 2010-12-09 18:18:40 EST
Created attachment 184912 [details]
If Statement/Construct Refactoring revision patch #1

Patch including changes made per reviewer's comments.
Comment 3 Xi Chen CLA 2010-12-09 18:21:02 EST
Changes were made per your comments, and a new patch with the changes reflected is attached for your review. Thank you.
Comment 4 Jeffrey Overbey CLA 2010-12-13 04:02:52 EST
Thanks!  The revised patch looks good.

Zeeshan, Mark, Mumtaz, Burim, and Waseem, can the five of you *each* 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 5 Xi Chen CLA 2010-12-13 20:55:42 EST
1. I wrote 100% of the code that I contributed to without incorporating content from elsewhere or relying on the IP of others.
2. I have the right to contribute the code to Eclipse.
3. All source files created by us has the EPL license header within them.
(In reply to comment #4)
Comment 6 Jeffrey Overbey CLA 2010-12-13 21:31:46 EST
Thanks, Mark.  Zeeshan, Mumtaz, Burim, and Waseem, I need to ask each of you to make similar confirmations as comments on this bug...
Comment 7 zeeshan.k.ansari CLA 2010-12-13 22:08:52 EST
In reply to comment #4, I (Zeeshan Ansari) affirm that:

1. I wrote 100% of the code that I contributed to without incorporating content
from elsewhere or relying on the IP of others.
2. I have the right to contribute the code to Eclipse.
3. All source files created by us has the EPL license header within them.
Comment 8 Burim CLA 2010-12-13 22:28:28 EST
1. I wrote 100% of the code that I contributed to without incorporating content
from elsewhere or relying on the IP of others.
2. I have the right to contribute the code to Eclipse.
3. All source files created by us has the EPL license header within them.

-Burim Isai
Comment 9 Jeffrey Overbey CLA 2010-12-14 18:13:04 EST
As soon as I get a confirmation from Mumtaz and Waseem, I can start the IP process...
Comment 10 Waseem Sheikh CLA 2010-12-15 08:57:11 EST
(In reply to comment #9)
> As soon as I get a confirmation from Mumtaz and Waseem, I can start the IP
> process...

1. I wrote 100% of the code that I contributed to without incorporating content
from elsewhere or relying on the IP of others.
2. I have the right to contribute the code to Eclipse.
3. All source files created by us has the EPL license header within them.
Comment 11 Mumtaz Vauhkonen CLA 2010-12-15 09:44:00 EST
1. I wrote 100% of the code that I contributed to without incorporating content
from elsewhere or relying on the IP of others.
2. I have the right to contribute the code to Eclipse.
3. All source files created by us has the EPL license header within them.
(In reply to comment #4)
Comment 12 Jeffrey Overbey CLA 2010-12-15 10:56:47 EST
Thanks for the replies!

For the IP review, I will need to describe how much of the work was done by each person involved.  Generally, for CS427 projects, the work was more-or-less evenly distributed, so I will use the following breakdown unless you inform me otherwise:

Zeeshan Ansari - 20%
Mark Chen - 20%
Mumtaz Vauhkonen - 20%
Burim Isai - 20%
Waseem Sheikh - 20%

I'll start the IP review process soon.  If the IP team has any questions, I'll post them here.
Comment 13 Jeffrey Overbey CLA 2010-12-15 11:25:24 EST
CQ 4701 Submitted - https://dev.eclipse.org/ipzilla/show_bug.cgi?id=4701
Comment 14 Jeffrey Overbey CLA 2011-01-18 15:09:10 EST
The CQ was approved.  Check in to CVS pending.
Comment 15 Jeffrey Overbey CLA 2011-03-16 03:39:15 EDT
These are committed to CVS HEAD for inclusion in Photran 7.0/Indigo (the June,
2011 release).

Thanks again for the contribution!

Please also make sure your names are all included and are spelled correctly on
the Contributors page: http://www.eclipse.org/photran/contributors.php