use of com.jetbrains.python.codeInsight.PyCodeInsightSettings in project intellij-community by JetBrains.
the class PyIntentionTest method testGoogleDocStubWithTypes.
// PY-9795
public void testGoogleDocStubWithTypes() {
final PyCodeInsightSettings codeInsightSettings = PyCodeInsightSettings.getInstance();
final boolean oldInsertTypeDocStub = codeInsightSettings.INSERT_TYPE_DOCSTUB;
codeInsightSettings.INSERT_TYPE_DOCSTUB = true;
try {
doDocStubTest(DocStringFormat.GOOGLE);
} finally {
codeInsightSettings.INSERT_TYPE_DOCSTUB = oldInsertTypeDocStub;
}
}
use of com.jetbrains.python.codeInsight.PyCodeInsightSettings in project intellij-community by JetBrains.
the class PyAutoImportOptions method reset.
public void reset() {
final PyCodeInsightSettings settings = PyCodeInsightSettings.getInstance();
myRbFromImport.setSelected(settings.PREFER_FROM_IMPORT);
myRbImport.setSelected(!settings.PREFER_FROM_IMPORT);
myShowImportPopupCheckBox.setSelected(settings.SHOW_IMPORT_POPUP);
}
use of com.jetbrains.python.codeInsight.PyCodeInsightSettings in project intellij-community by JetBrains.
the class PyAutoImportOptions method apply.
public void apply() throws ConfigurationException {
final PyCodeInsightSettings settings = PyCodeInsightSettings.getInstance();
settings.PREFER_FROM_IMPORT = myRbFromImport.isSelected();
settings.SHOW_IMPORT_POPUP = myShowImportPopupCheckBox.isSelected();
}
use of com.jetbrains.python.codeInsight.PyCodeInsightSettings 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;
}
}
Aggregations