Package org.fife.ui.autocomplete

Examples of org.fife.ui.autocomplete.CompletionProvider


   * @return The provider.
   */
  private CompletionProvider createCompletionProvider() {

    // Create the provider used when typing code.
    CompletionProvider codeCP = createCodeCompletionProvider();

    // The provider used when typing a string.
    CompletionProvider stringCP = createStringCompletionProvider();

    // The provider used when typing a comment.
    CompletionProvider commentCP = createCommentCompletionProvider();

    // Create the "parent" completion provider.
    CCompletionProvider provider = new CCompletionProvider(codeCP);
    provider.setStringCompletionProvider(stringCP);
    provider.setCommentCompletionProvider(commentCP);
View Full Code Here


     *
     * @param s the s
     */
    public void changeSyntaxStyle(String s) {
      // textArea.setSyntaxEditingStyle(determineScriptType(s));
      CompletionProvider provider = createCompletionProvider();

      AutoCompletion ac = new AutoCompletion(provider);
      ac.install(textArea);

    }
View Full Code Here

   *
   * @param s the s
   */
  public void changeSyntaxStyle(Script s) {
    textArea.setSyntaxEditingStyle(determineScriptType(s));
    CompletionProvider provider = createCompletionProvider(s.getScript());

    AutoCompletion ac = new AutoCompletion(provider);
    ac.install(textArea);
   
  }
View Full Code Here

  @Override
  protected List getCompletionsImpl(JTextComponent comp) {
    if (!(comp instanceof RSyntaxTextArea)) {
      return new ArrayList(0);
    }
    CompletionProvider provider = getProviderFor(comp);
    return provider!=null ? provider.getCompletions(comp) new ArrayList(0);
  }
View Full Code Here

  @Override
  public String getAlreadyEnteredText(JTextComponent comp) {
    if (!(comp instanceof RSyntaxTextArea)) {
      return EMPTY_STRING;
    }
    CompletionProvider provider = getProviderFor(comp);
    return provider.getAlreadyEnteredText(comp);
  }
View Full Code Here

TOP

Related Classes of org.fife.ui.autocomplete.CompletionProvider

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.