| Summary: | [QuickFix] Adding missing methods with UnsupportedOperationException as body | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Aaron Digulla <digulla> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | RESOLVED WORKSFORME | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | markus.kell.r |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Aaron Digulla
You can configure the body of generated methods in Preferences > Java > Code Style > Code Templates. Edit "Method Body" and use a pattern like this:
// ${todo} Auto-generated method stub
throw new UnsupportedOperationException("${enclosing_method}");
${body_statement}
The workaround works for me, too. It's just a bit tedious to change the body all the time. Is it possible to change the UI so I can assign *several* templates and then select them in the quick fix? Might be useful for other things as well, like when you work on different projects (say OSS ones and for your company). You probably don't want the EPL header in your company's sources... (In reply to comment #2) You can set project-specific code templates. |