Package org.eclipse.dltk.ui.text.completion

Examples of org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector


public class RutaNoTypeCompletionProposalComputer extends ScriptCompletionProposalComputer {

  @Override
  protected ScriptCompletionProposalCollector createCollector(
          ScriptContentAssistInvocationContext context) {
    ScriptCompletionProposalCollector collector = new RutaCompletionProposalCollector(
            context.getSourceModule());

    collector.setIgnored(CompletionProposal.FIELD_REF, false);
    collector.setIgnored(CompletionProposal.KEYWORD, false);
    collector.setIgnored(CompletionProposal.PACKAGE_REF, false);
    collector.setIgnored(CompletionProposal.LABEL_REF, false);
    collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, false);
    collector.setIgnored(CompletionProposal.METHOD_DECLARATION, false);
    collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, false);
    collector.setIgnored(CompletionProposal.METHOD_REF, false);
    collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, false);
    collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, false);

    // collector.setIgnored(CompletionProposal.TYPE_REF, true);
    collector.setIgnored(CompletionProposal.TYPE_REF, false);
    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

    return collector;
  }
View Full Code Here


public class RutaTypeCompletionProposalComputer extends ScriptCompletionProposalComputer {

  @Override
  protected ScriptCompletionProposalCollector createCollector(
          ScriptContentAssistInvocationContext context) {
    ScriptCompletionProposalCollector collector = new RutaCompletionProposalCollector(
            context.getSourceModule());

    collector.setIgnored(CompletionProposal.FIELD_REF, true);
    collector.setIgnored(CompletionProposal.KEYWORD, true);
    collector.setIgnored(CompletionProposal.LABEL_REF, true);
    collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, true);
    collector.setIgnored(CompletionProposal.METHOD_DECLARATION, true);
    collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, true);
    collector.setIgnored(CompletionProposal.METHOD_REF, true);
    collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, true);
    collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, true);

    collector.setIgnored(CompletionProposal.TYPE_REF, false);

    IPreferenceStore preferenceStore = RutaIdeUIPlugin.getDefault().getPreferenceStore();

    return collector;
  }
View Full Code Here

public class RutaNoTypeCompletionProposalComputer extends ScriptCompletionProposalComputer {

  @Override
  protected ScriptCompletionProposalCollector createCollector(
          ScriptContentAssistInvocationContext context) {
    ScriptCompletionProposalCollector collector = new RutaCompletionProposalCollector(
            context.getSourceModule());

    collector.setIgnored(CompletionProposal.FIELD_REF, false);
    collector.setIgnored(CompletionProposal.KEYWORD, false);
    collector.setIgnored(CompletionProposal.PACKAGE_REF, false);
    collector.setIgnored(CompletionProposal.LABEL_REF, false);
    collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, false);
    collector.setIgnored(CompletionProposal.METHOD_DECLARATION, false);
    collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, false);
    collector.setIgnored(CompletionProposal.METHOD_REF, false);
    collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, false);
    collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, false);

    // collector.setIgnored(CompletionProposal.TYPE_REF, true);
    collector.setIgnored(CompletionProposal.TYPE_REF, false);
    IPreferenceStore preferenceStore = RutaIdePlugin.getDefault().getPreferenceStore();

    return collector;
  }
View Full Code Here

public class RutaTypeCompletionProposalComputer extends ScriptCompletionProposalComputer {

  @Override
  protected ScriptCompletionProposalCollector createCollector(
          ScriptContentAssistInvocationContext context) {
    ScriptCompletionProposalCollector collector = new RutaCompletionProposalCollector(
            context.getSourceModule());

    collector.setIgnored(CompletionProposal.FIELD_REF, true);
    collector.setIgnored(CompletionProposal.KEYWORD, true);
    collector.setIgnored(CompletionProposal.LABEL_REF, true);
    collector.setIgnored(CompletionProposal.LOCAL_VARIABLE_REF, true);
    collector.setIgnored(CompletionProposal.METHOD_DECLARATION, true);
    collector.setIgnored(CompletionProposal.METHOD_NAME_REFERENCE, true);
    collector.setIgnored(CompletionProposal.METHOD_REF, true);
    collector.setIgnored(CompletionProposal.POTENTIAL_METHOD_DECLARATION, true);
    collector.setIgnored(CompletionProposal.VARIABLE_DECLARATION, true);

    collector.setIgnored(CompletionProposal.TYPE_REF, false);

    IPreferenceStore preferenceStore = RutaIdePlugin.getDefault().getPreferenceStore();

    return collector;
  }
View Full Code Here

    /*int timeout = DLTKUIPlugin.getDefault().getPreferenceStore()
      .getInt(PreferenceConstants.CODEASSIST_TIMEOUT);*/
    int timeout = 5000;
    ISourceModule module = getSourceModule(ifile);
    ScriptCompletionProposalCollector collector = getCompletionCollector(module);
    module.codeComplete(offset, collector, timeout);

    IScriptCompletionProposal[] proposals =
      collector.getScriptCompletionProposals();
    Arrays.sort(proposals, new ScriptCompletionProposalComparator());

    ArrayList<CodeCompleteResult> results = new ArrayList<CodeCompleteResult>();
    for (IScriptCompletionProposal proposal : proposals){
      CodeCompleteResult ccresult = new CodeCompleteResult(
View Full Code Here

TOP

Related Classes of org.eclipse.dltk.ui.text.completion.ScriptCompletionProposalCollector

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.