congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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
  • onRequestPermissionsResult (Fragment)
  • startActivity (Activity)
  • onCreateOptionsMenu (Activity)
  • Menu (java.awt)
  • String (java.lang)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Vim plugins
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