| Summary: | [Xtend] quick fix for implementing abstract methods | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Sven Efftinge <sven.efftinge> |
| Component: | Xtext | Assignee: | Jan Koehnlein <jan> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | jan, sebastian.zarnekow, tmf.xtext-inbox |
| Version: | 2.1.0 | Flags: | sven.efftinge:
juno+
|
| Target Milestone: | M4 | ||
| Hardware: | PC | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 342398 | ||
|
Description
Sven Efftinge
Quickfix pushed to master. Code completion also pushed to MASTER. One issue remains: In JDT, the quick fix creates ALL missing abstract methods at once. Xtext allows one fix per issue instance, and each missing method is a separate issue (as in JDT). Not sure whether this is a serious problem. Removed static methods form code assist. Just tried. Very Cool!
Just the cursor seems to behave a bit funny.
When I use the proposals it jumps at arbitrary places, depending on which method I override.
It should select the whole
'throw new UnsupportedOperationException("TODO: Auto-generated function stub");"
And it shouldn't generate a semicolon and the TODO doesn't seem to work in string literals so we should remove it as well.
'throw new UnsupportedOperationException("Auto-generated function stub");"
Pushed fine-tuned version to MASTER. There should be one issue and one quick fix which lists/ adds all abstract methods at once. (In reply to comment #6) > There should be one issue and one quick fix which lists/ adds all abstract > methods at once. We should be carefule with the error message, e.g. listing all abstract methods may not be practical. Something like 'Foo has to implement add(int, Object) and 15 more' could work, though. Pushed to MASTER. To be able to reuse the IAppendable stuff - like variable name handling, type serializtion using TypeSerializer and import handling - I wrote a ReplaceAppendable adapter class that can be used in ContentAssist and QuickFixes. Now writing some tests. Pushed to MASTER. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |