Search in sources :

Example 26 with CodeInsightSettings

use of com.intellij.codeInsight.CodeInsightSettings in project intellij-community by JetBrains.

the class PySmartEnterTest method testDocTypeRType.

public void testDocTypeRType() {
    CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
    boolean oldStubOnEnter = codeInsightSettings.JAVADOC_STUB_ON_ENTER;
    codeInsightSettings.JAVADOC_STUB_ON_ENTER = true;
    PyCodeInsightSettings pyCodeInsightSettings = PyCodeInsightSettings.getInstance();
    boolean oldInsertType = pyCodeInsightSettings.INSERT_TYPE_DOCSTUB;
    pyCodeInsightSettings.INSERT_TYPE_DOCSTUB = true;
    PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(myFixture.getModule());
    documentationSettings.setFormat(DocStringFormat.EPYTEXT);
    try {
        doTest();
    } finally {
        documentationSettings.setFormat(DocStringFormat.PLAIN);
        codeInsightSettings.JAVADOC_STUB_ON_ENTER = oldStubOnEnter;
        pyCodeInsightSettings.INSERT_TYPE_DOCSTUB = oldInsertType;
    }
}
Also used : CodeInsightSettings(com.intellij.codeInsight.CodeInsightSettings) PyCodeInsightSettings(com.jetbrains.python.codeInsight.PyCodeInsightSettings) PyDocumentationSettings(com.jetbrains.python.documentation.PyDocumentationSettings) PyCodeInsightSettings(com.jetbrains.python.codeInsight.PyCodeInsightSettings)

Example 27 with CodeInsightSettings

use of com.intellij.codeInsight.CodeInsightSettings in project intellij-community by JetBrains.

the class PySmartEnterTest method testDocEpytext.

public void testDocEpytext() {
    CodeInsightSettings codeInsightSettings = CodeInsightSettings.getInstance();
    boolean oldStubOnEnter = codeInsightSettings.JAVADOC_STUB_ON_ENTER;
    codeInsightSettings.JAVADOC_STUB_ON_ENTER = true;
    PyDocumentationSettings documentationSettings = PyDocumentationSettings.getInstance(myFixture.getModule());
    documentationSettings.setFormat(DocStringFormat.EPYTEXT);
    try {
        doTest();
    } finally {
        documentationSettings.setFormat(DocStringFormat.PLAIN);
        codeInsightSettings.JAVADOC_STUB_ON_ENTER = oldStubOnEnter;
    }
}
Also used : CodeInsightSettings(com.intellij.codeInsight.CodeInsightSettings) PyCodeInsightSettings(com.jetbrains.python.codeInsight.PyCodeInsightSettings) PyDocumentationSettings(com.jetbrains.python.documentation.PyDocumentationSettings)

Aggregations

CodeInsightSettings (com.intellij.codeInsight.CodeInsightSettings)27 EditorSettingsExternalizable (com.intellij.openapi.editor.ex.EditorSettingsExternalizable)7 RichCopySettings (com.intellij.openapi.editor.richcopy.settings.RichCopySettings)4 PyCodeInsightSettings (com.jetbrains.python.codeInsight.PyCodeInsightSettings)4 DaemonCodeAnalyzerSettings (com.intellij.codeInsight.daemon.DaemonCodeAnalyzerSettings)3 UISettings (com.intellij.ide.ui.UISettings)3 Project (com.intellij.openapi.project.Project)3 VcsApplicationSettings (com.intellij.openapi.vcs.VcsApplicationSettings)3 PyDocumentationSettings (com.jetbrains.python.documentation.PyDocumentationSettings)3 Document (com.intellij.openapi.editor.Document)2 PsiFile (com.intellij.psi.PsiFile)2 NotNull (org.jetbrains.annotations.NotNull)2 CompletionProcess (com.intellij.codeInsight.completion.CompletionProcess)1 CamelHumpMatcher (com.intellij.codeInsight.completion.impl.CamelHumpMatcher)1 QuickDocOnMouseOverManager (com.intellij.codeInsight.documentation.QuickDocOnMouseOverManager)1 SmartBackspaceMode (com.intellij.codeInsight.editorActions.SmartBackspaceMode)1 EnterHandlerDelegate (com.intellij.codeInsight.editorActions.enter.EnterHandlerDelegate)1 EditorWindow (com.intellij.injected.editor.EditorWindow)1 UsageDescriptor (com.intellij.internal.statistic.beans.UsageDescriptor)1 Disposable (com.intellij.openapi.Disposable)1