Codota Logo
CodeInsightSettings.getInstance
Code IndexAdd Codota 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)

  • Common ways to obtain CodeInsightSettings
private void myMethod () {
CodeInsightSettings c =
  • Codota IconInsight.CodeInsightSettings CodeInsightSettings;CodeInsightSettings.getInstance()
  • Smart code suggestions by Codota
}
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

    • Updating database using SQL prepared statement
    • setRequestProperty (URLConnection)
    • requestLocationUpdates (LocationManager)
    • getApplicationContext (Context)
    • Timestamp (java.sql)
      A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
    • Calendar (java.util)
      Calendar is an abstract base class for converting between a Date object and a set of integer fields
    • Manifest (java.util.jar)
      The Manifest class is used to obtain attribute information for a JarFile and its entries.
    • JButton (javax.swing)
    • JFileChooser (javax.swing)
    • IOUtils (org.apache.commons.io)
      General IO stream manipulation utilities. This class provides static utility methods for input/outpu
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now