Tabnine Logo
CodeCompletionHandlerBase.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
com.intellij.codeInsight.completion.CodeCompletionHandlerBase
constructor

Best Java code snippets using com.intellij.codeInsight.completion.CodeCompletionHandlerBase.<init> (Showing top 4 results out of 315)

origin: hsz/idea-gitignore

/**
 * Handles QuickFix action invoked on {@link IgnoreSyntax}.
 *
 * @param project      the {@link Project} containing the working file
 * @param file         the {@link PsiFile} containing handled entry
 * @param startElement the {@link IgnoreSyntax} that will be selected and replaced
 * @param endElement   the {@link PsiElement} which is ignored in invoked action
 */
@Override
public void invoke(@NotNull Project project, @NotNull PsiFile file,
          @Nullable("is null when called from inspection") Editor editor,
          @NotNull PsiElement startElement, @NotNull PsiElement endElement) {
  if (startElement instanceof IgnoreSyntax) {
    PsiElement value = ((IgnoreSyntax) startElement).getValue();
    if (editor != null) {
      editor.getSelectionModel().setSelection(
          value.getTextOffset(),
          value.getTextOffset() + value.getTextLength()
      );
    }
    new CodeCompletionHandlerBase(CompletionType.BASIC).invokeCompletion(project, editor);
  }
}
origin: Camelcade/Perl5-IDEA

 @Override
 public void handleInsert(@NotNull final InsertionContext context, @NotNull LookupElement item) {

  final Editor editor = context.getEditor();
  if ("returns".equals(item.getLookupString())) {
   EditorModificationUtil.insertStringAtCaret(editor, " ");

   context.setLaterRunnable(() -> new CodeCompletionHandlerBase(CompletionType.BASIC).invokeCompletion(context.getProject(), editor, 1));
  }
 }
}
origin: Camelcade/Perl5-IDEA

 @Override
 public void handleInsert(@NotNull final InsertionContext context, @NotNull final LookupElement item) {
  // fixme this is bad check for auto-inserting, i belive
  if (context.getCompletionChar() != '\u0000') {
   context.setLaterRunnable(() -> {
    Editor editor = context.getEditor();
    new CodeCompletionHandlerBase(CompletionType.BASIC).invokeCompletion(context.getProject(), editor, 1);
   });
  }
 }
}
origin: mustfun/mybatis-plus

  @Override
  public void run() {
    //当前文件是否最新,没有未提交的
    if (PsiDocumentManager.getInstance(project).isCommitted(editor.getDocument())) {
      //唤醒代码自动补全 , CompletionContributor
      new CodeCompletionHandlerBase(CompletionType.BASIC).invokeCompletion(project, editor, 1);
    }
  }
});
com.intellij.codeInsight.completionCodeCompletionHandlerBase<init>

Popular methods of CodeCompletionHandlerBase

  • invokeCompletion

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • getExternalFilesDir (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now