use of org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher.IgnoreCase in project xtext-eclipse by eclipse.
the class Bug349773Test method createMatcher.
@Override
protected FQNPrefixMatcher createMatcher() {
IgnoreCase ignoreCase = new PrefixMatcher.IgnoreCase();
FQNPrefixMatcher result = new FQNPrefixMatcher();
result.setDelegate(ignoreCase);
result.setLastSegmentFinder(new FQNPrefixMatcher.DefaultLastSegmentFinder());
return result;
}
use of org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher.IgnoreCase in project xtext-eclipse by eclipse.
the class FQNPrefixMatcherTest method createMatcher.
@Override
protected FQNPrefixMatcher createMatcher() {
IgnoreCase ignoreCase = new PrefixMatcher.IgnoreCase();
FQNPrefixMatcher result = new FQNPrefixMatcher();
result.setDelegate(ignoreCase);
result.setLastSegmentFinder(new FQNPrefixMatcher.LastSegmentFinder() {
@Override
public String getLastSegment(String fqn, char delimiter) {
int i = fqn.lastIndexOf(delimiter);
if (i >= 0) {
if (i != fqn.length() - 1)
return fqn.substring(i + 1);
return "";
}
return fqn;
}
});
return result;
}
Aggregations