Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 350838 - [xbase] ImportManager should additionally retrun type(ref)s as strings
Summary: [xbase] ImportManager should additionally retrun type(ref)s as strings
Status: CLOSED FIXED
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.0.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: SR2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-30 10:13 EDT by Jan Koehnlein CLA
Modified: 2017-09-19 18:07 EDT (History)
1 user (show)

See Also:
jan: indigo+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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