| Summary: | [xbase] ImportManager should additionally retrun type(ref)s as strings | ||
|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Jan Koehnlein <jan> |
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | sven.efftinge |
| Version: | 2.0.0 | Flags: | jan:
indigo+
|
| Target Milestone: | SR2 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
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 |
To use the ImportManager, one currently has to write a helper function that instantiates a StringBuilder and returns its string value, like this def shortName(JvmTypeReference typeRef, ImportManager importManager) { val result = new StringBuilder() importManager.appendTypeRef(typeRef, result) result.toString } As this is going to happen in almost every code generator - we usually have to collect imports first and cannot use the appendable directly - , it'd be nice to have methods String getTypeRef(JvmTypeRef) String getType(JvmType)