| Summary: | Refactoring problem converting data array to parameter array | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] PTP | Reporter: | Cyril Georgy <cyril.georgy> | ||||||||||
| Component: | Photran.Refactoring Engine | Assignee: | Matthew Fotzler <incongruous> | ||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P5 | CC: | com-eclipse-dot-org, incongruous | ||||||||||
| Version: | unspecified | ||||||||||||
| Target Milestone: | 6.0.2 | ||||||||||||
| Hardware: | Macintosh | ||||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Cyril Georgy
Created attachment 172756 [details]
Screenshot illustrating the problem.
Created attachment 172759 [details]
Example code
Created attachment 172760 [details]
Example code - expected result
Created attachment 173791 [details]
patch
The patch addresses this bug by not allowing the refactoring to occur on any arrays, data implied do loops, or pointers. When it encounters a data statement with one of the previous mentioned constructs, it will convert up to that construct and leave the rest of that particular data statement alone (to avoid the bug occurring). note: This should be an editor refactoring rather than a resource refactoring, as it is not likely the user wants to convert all data statements to parameters. Thanks, Matt. Sometime we should look at making this an editor refactoring and dealing correctly with constant-size arrays. Regarding your patch, 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? Yes, I wrote 100% of the code without incorporating content from elsewhere or relying on the intellectual property of others, I have the right to contribute the code to Eclipse, and I have included the EPL license header in all source files. This is a small contribution, so I can commit it without filing a CQ. The patch is committed to CVS for 6.0.2 and 7.0. We still need to address the following issues: - This should be an editor refactoring rather than a resource refactoring, as it is not likely the user wants to convert all data statements to parameters. - This fix is not optimal. In simple cases (e.g., the array has known bounds), we should still be able to do the conversion to a PARAMETER statement. Closing since the fix was applied for 6.0.2 |