| Summary: | [wizard] creating bound role file causes havoc in refactoring.TypeContextChecker | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||
| Component: | OTDT | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 0.8 | ||||||
| Target Milestone: | 2.0 RC2 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Stephan Herrmann
Created attachment 196291 [details]
Fix
The root cause for trouble was:
The base class was resolved using a stub like:
team class MyTeam { class MyRole extends mypack.base.Base {} }
Here the qualified name including a 'base' fragment caused a parse error
inside the team.
Fixed by using a different pattern for the stub when resolving the base class:
public class MyTeam {}
class MyRole extends mypack.base.Base { }
This avoids putting the scanner into OT/J mode.
I'm not sure if this could cause resolving to pick a wrong class,
but I couldn't find any example for this.
The patch also fixes issues wrt base imports for a role file:
if "[ ] inlined" is unchecked maintain two compilation units and their
import rewrites: one for the role file and one for the enclosing team.
Committed as r1618 Verified using build 201105311237 |