Skip to main content



      Home
Home » Modeling » TMF (Xtext) » How do I change the Matcher at ContentAssistContext?
How do I change the Matcher at ContentAssistContext? [message #701652] Mon, 25 July 2011 07:56 Go to next message
Eclipse UserFriend
Hi anybody,

I want to migrate our modeling-project to indigo and found a
code that looks like a workaround:

In overriden method
complete_JavaRefType(EObject model, RuleCall ruleCall, ContentAssistContext context,
ICompletionProposalAcceptor acceptor) {



try {
PrefixMatcher matcher = new PrefixMatcher() {

@Override
public boolean isCandidateMatchingPrefix(String name, String prefix) {
name = name.replaceAll("\\^", "");
prefix = prefix.replaceAll("\\^", "");
return original.isCandidateMatchingPrefix(name, prefix);
}

};
context.setMatcher(matcher);
ITypeProposalAcceptor typeProposalAcceptor = new DefaultTypeProposalAcceptor(context, acceptor);

completeJavaType(model, feature, context.getPrefix(), typeProposalAcceptor);
} finally {
context.setMatcher(original);
}

That dowsn't compile anymore in 2.0.0, because setMatcher not available anymore.
How can I make this workaround work again or how can I get rid of it?


Thanks for your help
Best regards
Markus

}
Re: How do I change the Matcher at ContentAssistContext? [message #701653 is a reply to message #701652] Mon, 25 July 2011 07:58 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

the setMatcher has moved into the Builder
(see copy method)

~Christian
Re: How do I change the Matcher at ContentAssistContext? [message #701729 is a reply to message #701653] Mon, 25 July 2011 09:55 Go to previous message
Eclipse UserFriend
OK, Thank you...
Previous Topic:"static initializer is exceeding the 65535 bytes limit" with xtext2.0
Next Topic:What has happened to org.eclipse.xtext.builder.builderState.PersistableResourceDescriptionsImpl?
Goto Forum:
  


Current Time: Sun Jul 27 02:11:31 EDT 2025

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

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

Back to the top