use of org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher 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.FQNPrefixMatcher in project xtext-eclipse by eclipse.
the class PrefixMatcherOutlineAdapterTest method createStringMatcher.
@Override
protected StringMatcher createStringMatcher(String pattern) {
FQNPrefixMatcher fqnPrefixMatcher = new FQNPrefixMatcher();
fqnPrefixMatcher.setLastSegmentFinder(new FQNPrefixMatcher.DefaultLastSegmentFinder());
fqnPrefixMatcher.setDelegate(new PrefixMatcher.CamelCase());
return new PrefixMatcherOutlineAdapter(pattern, fqnPrefixMatcher);
}
use of org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher 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