Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350838

Summary: [xbase] ImportManager should additionally retrun type(ref)s as strings
Product: [Modeling] TMF Reporter: Jan Koehnlein <jan>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: sven.efftinge
Version: 2.0.0Flags: jan: indigo+
Target Milestone: SR2   
Hardware: All   
OS: All   
Whiteboard:

Description Jan Koehnlein CLA 2011-06-30 10:13:43 EDT
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)
Comment 1 Sven Efftinge CLA 2011-09-26 03:13:16 EDT
pushed to master
Comment 2 Karsten Thoms CLA 2017-09-19 17:56:31 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 18:07:22 EDT
Closing all bugs that were set to RESOLVED before Neon.0