Java 类org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher 实例源码

项目:bts    文件:PrefixMatcherOutlineAdapter.java   
public PrefixMatcherOutlineAdapter(String prefix, PrefixMatcher strategy) {
    super("", true);
    this.prefix = prefix;
    this.prefixParts = splitIntoParts(prefix);
    this.strategy = strategy;
    boolean ignoreCase = prefix.equals(prefix.toLowerCase());
    this.prefixStringMatcher = new StringMatcher(prefix, ignoreCase);
    stringMatchers = Lists.newArrayList();
    for(String part: prefixParts) {
        stringMatchers.add(new StringMatcher(part, ignoreCase));
    }
}
项目:bts    文件:TerminalsProposalProvider.java   
public void complete_ID(EObject model, RuleCall ruleCall, final ContentAssistContext context,
        ICompletionProposalAcceptor acceptor) {
    if (doCreateIdProposals()) {
        PrefixMatcher newMatcher = new PrefixMatcher() {
            @Override
            public boolean isCandidateMatchingPrefix(String name, String prefix) {
                String strippedName = name;
                if (name.startsWith("^") && !prefix.startsWith("^")) {
                    strippedName = name.substring(1);
                }
                return context.getMatcher().isCandidateMatchingPrefix(strippedName, prefix);
            }
        };
        ContentAssistContext myContext = context.copy().setMatcher(newMatcher).toContext();
        String feature = getAssignedFeature(ruleCall);
        String proposalText = feature != null ? feature : Strings.toFirstUpper(ruleCall.getRule().getName().toLowerCase());
        String displayText = proposalText;
        if (feature != null)
            displayText = proposalText + " - " + ruleCall.getRule().getName();
        proposalText = getValueConverter().toString(proposalText, ruleCall.getRule().getName());
        ICompletionProposal proposal = createCompletionProposal(proposalText, displayText, null, myContext);
        if (proposal instanceof ConfigurableCompletionProposal) {
            ConfigurableCompletionProposal configurable = (ConfigurableCompletionProposal) proposal;
            configurable.setSelectionStart(configurable.getReplacementOffset());
            configurable.setSelectionLength(proposalText.length());
            configurable.setAutoInsertable(false);
            configurable.setSimpleLinkedMode(myContext.getViewer(), '\t', ' ');
        }
        acceptor.accept(proposal);
    }
}
项目:pokemon-tcgo-deck-generator    文件:AbstractPkmntcgoUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:n4js    文件:N4JSUiModule.java   
/**
 * Filter fully qualified proposals also by their last segment and not only by their fully qualified name.
 */
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:n4js    文件:AbstractRegularExpressionUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:Xtext_Xtend_HTML_Generator    文件:AbstractMyDslUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:bromium    文件:AbstractBromiumUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:gw4e.project    文件:AbstractDSLPoliciesUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:lcdsl    文件:AbstractLcDslUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:gemoc-studio    文件:AbstractDslUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:org.xtext.dsl.restaurante    文件:AbstractRestauranteUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:OCCI-Studio    文件:AbstractOCCIUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:M2Doc    文件:AbstractMyDslUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:minitl    文件:AbstractMinitlUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:Sparrow    文件:AbstractModelEditorUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:CooperateModelingEnvironment    文件:AbstractComponentUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:CooperateModelingEnvironment    文件:AbstractClsUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:CooperateModelingEnvironment    文件:AbstractUsecaseUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:cs2as    文件:AbstractASBHLangUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}
项目:cs2as    文件:AbstractMiniOCLUiModule.java   
public Class<? extends PrefixMatcher> bindPrefixMatcher() {
    return FQNPrefixMatcher.class;
}