Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » ProposalProvider for DomainModel example
ProposalProvider for DomainModel example [message #782733] Tue, 24 January 2012 10:18
Maxim Frolov is currently offline Maxim FrolovFriend
Messages: 4
Registered: January 2012
Location: Aachen, Germany
Junior Member
In the DomainModel example shipped with Xtext 2.2 I want to have model elements of type Entity defined in the current model and imported from external models be visible in the completion list of references to model elements of type JvmTypeReference like Property.type in the DomainModel example alongside Jvm types defined in the classpath.

Generally referencing Entity works. In other words, it's in Scope of Property.type.
But it's missing in the completion list of Property.type.

Is there a simple way to implement this?


If I would override completeJvmParameterizedTypeReference_Type() method of the DomainmodelProposalProvider, how can I access all visible elements of Type Entity?

@Override
public void completeJvmParameterizedTypeReference_Type(EObject model, Assignment assignment,
			ContentAssistContext context, ICompletionProposalAcceptor acceptor) 
{
	super.completeJvmParameterizedTypeReference_Type(model, assignment, context, acceptor);

	for (Entity entity: all visible elements of type Entity)
		acceptor.accept(createCompletionProposal(qualifiedNameProvider.getFullyQualifiedName(entity).toString(), context));

}


Previous Topic:errors while exporting to Repository
Next Topic:Cancel "Clean" causes more resources on next "Clean"
Goto Forum:
  


Current Time: Thu Apr 25 08:17:51 GMT 2024

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

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

Back to the top