Community
Participate
Working Groups
currently its not possible to compute a local name based on a different strategy inside #getQualifiedName() besides overiding the complete getQualifiedName() method. therefore i suggest to either inject the local name function or call the protected #getResolver() method from within getQualifiedName(). additionally the getResolver method should return interface Function<EObject,String> instead of SimpleAttributeResolver.
Not sure I understood the enhancement request. The qualified name provider is used to compute a global (i.e. without any context) name for an EObject. Local names make use of local context, in order to shorten global names or introduce aliases. In other words it is not the duty of an IQualifiedNameProvider to compute a local name. Could you please try to explain what you want to do?
(In reply to comment #1) > Not sure I understood the enhancement request. > > The qualified name provider is used to compute a global (i.e. without any > context) name for an EObject. > Local names make use of local context, in order to shorten global names or > introduce aliases. In other words it is not the duty of an > IQualifiedNameProvider to compute a local name. > > Could you please try to explain what you want to do? integration with external models (non-xtext) which do not contain a 'name' feature to compute local name from. since the IQNP concatenates 'local' (SimpleAttributeResolver) names to build up a global/qualified name i need the possibility to change the 'local' name function
Sorry I didn't understand you were talking about DefaultDeclarativeQualifiedNameProvider. Overriding the protected method should be sufficient, isn't it? Agreed that the return type should be Function instead of SimpleAttributeResolver.
IIRC, the method is never used. That seems to be the problem.
:-) Yes, that might be problematic
done
Closing bug which were set to RESOLVED before Eclipse Neon.0.