congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CodeInsightSettings.getInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
getInstance
method
in
com.intellij.codeInsight.CodeInsightSettings

Best Java code snippets using com.intellij.codeInsight.CodeInsightSettings.getInstance (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.codeInsightCodeInsightSettingsgetInstance

Popular methods of CodeInsightSettings

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • scheduleAtFixedRate (Timer)
    • getExternalFilesDir (Context)
    • addToBackStack (FragmentTransaction)
    • BorderLayout (java.awt)
      A border layout lays out a container, arranging and resizing its components to fit in five regions:
    • HttpURLConnection (java.net)
      An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
    • Dictionary (java.util)
      Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
    • HashSet (java.util)
      HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
    • StringTokenizer (java.util)
      Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
    • ExecutorService (java.util.concurrent)
      An Executor that provides methods to manage termination and methods that can produce a Future for tr
    • 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