Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » qulified names(delimiter as dot)
qulified names [message #759868] Wed, 30 November 2011 12:07 Go to next message
Mokhtar Abdu is currently offline Mokhtar AbduFriend
Messages: 104
Registered: November 2011
Senior Member
Hallo all,

is it possible to change the QualifiedName delimiter to : instead of dot ?
e.g. ref = [Type|MyQName]
MyQName: ID':'ID;

if yes where?

Thanks,
Mokhtar
Re: qulified names [message #759869 is a reply to message #759868] Wed, 30 November 2011 12:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13409
Registered: July 2009
Senior Member
see IQualifiedNameConverter

~Christian


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: qulified names [message #759872 is a reply to message #759869] Wed, 30 November 2011 12:22 Go to previous message
Cedric Moonen is currently offline Cedric MoonenFriend
Messages: 274
Registered: August 2009
Senior Member
Create a new class which extends IQualifiedNameConverter.DefaultImpl and in which you override the getDelimiter method. For instance:

public class CppQualifiedNameConverter extends
		IQualifiedNameConverter.DefaultImpl {
	@Override
	public String getDelimiter() {
		return "::";
	}
}


You then have to bind that class in your runtime module:

	public Class<? extends IQualifiedNameConverter> bindIQualifiedNameConverter() {
		return CppQualifiedNameConverter.class;
	}
Previous Topic:[Xtext 2.1] Fully qualified names export and ScopeProvider
Next Topic:How to write Content Assist
Goto Forum:
  


Current Time: Sun Mar 29 13:15:31 GMT 2020

Powered by FUDForum. Page generated in 0.02361 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top