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;
}
}
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;
}
}
Aggregations