mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
[python] PY-64553 DataView code style fixes.
GitOrigin-RevId: 10f6e810847a29d49423644f010f0a2f1dad386b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fa20eca894
commit
3a5afcd87b
@@ -16,7 +16,7 @@ public class PyNumericContainerValueEvaluator extends PyFullValueEvaluator {
|
||||
@Override
|
||||
protected void showCustomPopup(PyFrameAccessor debugProcess, PyDebugValue debugValue) {
|
||||
List<PyNumericContainerPopupCustomizer> providers = PyNumericContainerPopupCustomizer.EP_NAME.getExtensionList();
|
||||
for (PyNumericContainerPopupCustomizer provider : providers) {
|
||||
for (var provider : providers) {
|
||||
if (provider.showFullValuePopup(debugProcess, debugValue)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -49,19 +49,20 @@ class PyDataView(private val project: Project) : DumbAware {
|
||||
addEmptyContent()
|
||||
|
||||
project.messageBus.connect()
|
||||
.subscribe<ToolWindowManagerListener>(ToolWindowManagerListener.TOPIC,
|
||||
object : ToolWindowManagerListener {
|
||||
override fun stateChanged(toolWindowManager: ToolWindowManager) {
|
||||
val window = toolWindowManager.getToolWindow(DATA_VIEWER_ID)
|
||||
if (window == null) {
|
||||
return
|
||||
}
|
||||
if (toolWindow.isAvailable && toolWindow.type == ToolWindowType.FLOATING && !toolWindow.isVisible) {
|
||||
toolWindow.isShowStripeButton = false
|
||||
toolWindow.contentManager.removeAllContents(true)
|
||||
}
|
||||
}
|
||||
})
|
||||
.subscribe<ToolWindowManagerListener>(
|
||||
ToolWindowManagerListener.TOPIC,
|
||||
object : ToolWindowManagerListener {
|
||||
override fun stateChanged(toolWindowManager: ToolWindowManager) {
|
||||
val window = toolWindowManager.getToolWindow(DATA_VIEWER_ID)
|
||||
if (window == null) {
|
||||
return
|
||||
}
|
||||
if (toolWindow.isAvailable && toolWindow.type == ToolWindowType.FLOATING && !toolWindow.isVisible) {
|
||||
toolWindow.isShowStripeButton = false
|
||||
toolWindow.contentManager.removeAllContents(true)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun addEmptyContent() {
|
||||
@@ -256,8 +257,13 @@ class PyDataView(private val project: Project) : DumbAware {
|
||||
const val AUTO_RESIZE = "python.debugger.dataview.autoresize"
|
||||
private const val HELP_ID = "reference.toolWindows.PyDataView"
|
||||
|
||||
fun isAutoResizeEnabled(project: Project) = PropertiesComponent.getInstance(project).getBoolean(AUTO_RESIZE, true)
|
||||
fun isColoringEnabled(project: Project) = PropertiesComponent.getInstance(project).getBoolean(COLORED_BY_DEFAULT, true)
|
||||
@JvmStatic
|
||||
fun isAutoResizeEnabled(project: Project): Boolean = PropertiesComponent.getInstance(project).getBoolean(AUTO_RESIZE, true)
|
||||
|
||||
@JvmStatic
|
||||
fun isColoringEnabled(project: Project): Boolean = PropertiesComponent.getInstance(project).getBoolean(COLORED_BY_DEFAULT, true)
|
||||
|
||||
@JvmStatic
|
||||
fun setColoringEnabled(project: Project, value: Boolean) {
|
||||
PropertiesComponent.getInstance(project).setValue(COLORED_BY_DEFAULT, value, true)
|
||||
}
|
||||
|
||||
@@ -67,8 +67,8 @@ public class PyDataViewDialog extends DialogWrapper {
|
||||
final JBCheckBox colored = new JBCheckBox(PyBundle.message("debugger.data.view.colored.cells"));
|
||||
final JBCheckBox resize = new JBCheckBox(PyBundle.message("debugger.data.view.resize.automatically"));
|
||||
|
||||
resize.setSelected(PyDataView.Companion.isAutoResizeEnabled(myProject));
|
||||
colored.setSelected(PyDataView.Companion.isColoringEnabled(myProject));
|
||||
resize.setSelected(PyDataView.isAutoResizeEnabled(myProject));
|
||||
colored.setSelected(PyDataView.isColoringEnabled(myProject));
|
||||
|
||||
colored.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user