congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
CodeInsightSettings
Code IndexAdd Tabnine to your IDE (free)

How to use
CodeInsightSettings
in
com.intellij.codeInsight

Best Java code snippets using com.intellij.codeInsight.CodeInsightSettings (Showing top 11 results out of 315)

origin: go-lang-plugin-org/go-lang-idea-plugin

@Override
protected void tearDown() throws Exception {
 try {
  updateSettings(defaultGoOnTheFly);
  CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
  codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY = defaultJavaMemberOnTheFly;
  codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = defaultJavaOnTheFly;
 }
 finally {
  //noinspection ThrowFromFinallyBlock
  super.tearDown();
 }
}
origin: go-lang-plugin-org/go-lang-idea-plugin

@Override
protected void setUp() throws Exception {
 super.setUp();
 myFixture.enableInspections(GoUnresolvedReferenceInspection.class);
 ((CodeInsightTestFixtureImpl)myFixture).canChangeDocumentDuringHighlighting(true);
 CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
 defaultJavaOnTheFly = codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY;
 defaultJavaMemberOnTheFly = codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY;
 defaultGoOnTheFly = GoCodeInsightSettings.getInstance().isAddUnambiguousImportsOnTheFly();
 codeInsightSettings.ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
 codeInsightSettings.ADD_MEMBER_IMPORTS_ON_THE_FLY = true;
}
origin: BashSupport/BashSupport

@Override
protected void setUp() throws Exception {
  super.setUp();
  oldBasic = CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION;
  oldSmart = CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_SMART_TYPE_COMPLETION;
  CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = autoInsertionEnabled;
  CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_SMART_TYPE_COMPLETION = autoInsertionEnabled;
}
origin: BashSupport/BashSupport

@Override
protected void tearDown() throws Exception {
  CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = oldBasic;
  CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_SMART_TYPE_COMPLETION = oldSmart;
  super.tearDown();
}
origin: BashSupport/BashSupport

@Override
public Result preprocessEnter(@NotNull PsiFile file, @NotNull Editor editor, @NotNull Ref<Integer> caretOffset, @NotNull Ref<Integer> caretAdvance, @NotNull DataContext dataContext, @Nullable EditorActionHandler originalHandler) {
  Project project = editor.getProject();
  if (CodeInsightSettings.getInstance().INSERT_BRACE_ON_ENTER && file instanceof BashFile && project != null) {
    Document document = editor.getDocument();
    CharSequence chars = document.getCharsSequence();
    int offset = caretOffset.get();
    int length = chars.length();
    if (offset < length && offset >= 1 && chars.charAt(offset - 1) == '{') {
      int start = offset + 1;
      int end = offset + 1 + "function".length();
      if (start < length && end < length && "function".contentEquals(chars.subSequence(start, end))) {
        document.insertString(start, "\n");
        PsiDocumentManager.getInstance(project).commitDocument(document);
      }
    }
  }
  return Result.Continue;
}
origin: BashSupport/BashSupport

  @Test
  public void testEmptyFile() throws Exception {
    boolean previous = CodeInsightSettings.getInstance().INSERT_BRACE_ON_ENTER;
    CodeInsightSettings.getInstance().INSERT_BRACE_ON_ENTER = true;

    try {
      myFixture.configureByText(BashFileType.BASH_FILE_TYPE, "abc");
      myFixture.type("\n");
    } finally {
      CodeInsightSettings.getInstance().INSERT_BRACE_ON_ENTER = previous;
    }
  }
}
origin: dhleong/intellivim

final boolean old = CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY;
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = true;
CodeInsightSettings.getInstance().ADD_UNAMBIGIOUS_IMPORTS_ON_THE_FLY = old;
origin: halirutan/Mathematica-IntelliJ-Plugin

private Result skipWithResultQ(@NotNull final PsiFile file, @NotNull final Editor editor, @NotNull final DataContext dataContext) {
 final Project project = CommonDataKeys.PROJECT.getData(dataContext);
 if (project == null) {
  return Result.Continue;
 }
 if (!file.getViewProvider().getLanguages().contains(MathematicaLanguage.INSTANCE)) {
  return Result.Continue;
 }
 if (editor.isViewer()) {
  return Result.Continue;
 }
 final Document document = editor.getDocument();
 if (!document.isWritable()) {
  return Result.Continue;
 }
 if (!CodeInsightSettings.getInstance().SMART_INDENT_ON_ENTER) {
  return Result.Continue;
 }
 PsiDocumentManager.getInstance(project).commitDocument(document);
 int caret = editor.getCaretModel().getOffset();
 if (caret == 0) {
  return Result.DefaultSkipIndent;
 }
 if (caret <= 0) {
  return Result.Continue;
 }
 return null;
}
origin: halirutan/Mathematica-IntelliJ-Plugin

private Result skipWithResultQ(@NotNull final PsiFile file, @NotNull final Editor editor, @NotNull final DataContext dataContext) {
 final Project project = CommonDataKeys.PROJECT.getData(dataContext);
 if (project == null) {
  return Result.Continue;
 }
 if (!file.getViewProvider().getLanguages().contains(MathematicaLanguage.INSTANCE)) {
  return Result.Continue;
 }
 if (editor.isViewer()) {
  return Result.Continue;
 }
 final Document document = editor.getDocument();
 if (!document.isWritable()) {
  return Result.Continue;
 }
 if (!CodeInsightSettings.getInstance().SMART_INDENT_ON_ENTER) {
  return Result.Continue;
 }
 PsiDocumentManager.getInstance(project).commitDocument(document);
 int caret = editor.getCaretModel().getOffset();
 if (caret == 0) {
  return Result.DefaultSkipIndent;
 }
 if (caret <= 0) {
  return Result.Continue;
 }
 return null;
}
origin: Camelcade/Perl5-IDEA

              EditorActionHandler originalHandler) {
if (!file.getLanguage().is(PerlLanguage.INSTANCE) || !CodeInsightSettings.getInstance().SMART_INDENT_ON_ENTER) {
 return Result.Continue;
origin: Camelcade/Perl5-IDEA

IElementType elementTokenType = iterator.getTokenType();
Document document = editor.getDocument();
if (QUOTE_OPEN_ANY.contains(elementTokenType) && CodeInsightSettings.getInstance().AUTOINSERT_PAIR_QUOTE) {
 IElementType quotePrefixType = offset > 0 ? PerlEditorUtil.getPreviousTokenType(highlighter.createIterator(offset - 1)) : null;
 CharSequence text = document.getCharsSequence();
com.intellij.codeInsightCodeInsightSettings

Most used methods

  • getInstance

Popular in Java

  • Making http post requests using okhttp
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
  • String (java.lang)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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