Skip to content

Commit 6c2f374

Browse files
committed
update
Former-commit-id: 68ed8fa
1 parent 8462002 commit 6c2f374

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ kotlin.code.style=official
44

55
pluginGroup = spp.jetbrains
66
pluginName = Source++
7-
pluginVersion = 0.2.1
7+
pluginVersion = 0.2.2
88
pluginSinceBuild = 202.4357
99
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
1010
# See https://jb.gg/intellij-platform-builds-list for available build versions

marker/py-marker/src/main/kotlin/spp/jetbrains/marker/py/PythonVariableSimpleNode.kt

+16-13
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ class PythonVariableSimpleNode(private val variable: LiveVariable) : SimpleNode(
2222

2323
override fun getChildren(): Array<SimpleNode> {
2424
if (variable.liveClazz == "<class 'dict'>") {
25-
val dict = JsonObject((variable.value as String).replace("'", "\""))
25+
val dict = JsonObject(
26+
(variable.value as String).replace("'", "\"")
27+
.replace(": True", ": true").replace(": False", ": false")
28+
)
2629
val children = mutableListOf<SimpleNode>()
2730
dict.map.forEach {
2831
children.add(PythonVariableSimpleNode(LiveVariable("'" + it.key + "'", it.value)))
@@ -46,29 +49,29 @@ class PythonVariableSimpleNode(private val variable: LiveVariable) : SimpleNode(
4649
)
4750
}
4851

49-
when (variable.liveClazz) {
50-
"<class 'dict'>" -> {
52+
when {
53+
variable.liveClazz == "<class 'int'>" || variable.value is Number -> {
5154
presentation.addText(
5255
variable.value.toString(),
53-
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.IDENTIFIER))
56+
SimpleTextAttributes.fromTextAttributes(
57+
scheme.getAttributes(DefaultLanguageHighlighterColors.NUMBER)
58+
)
5459
)
5560
}
56-
"<class 'str'>" -> {
61+
variable.liveClazz == "<class 'str'>" -> {
5762
presentation.addText(
5863
"\"" + variable.value + "\"",
59-
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.STRING))
60-
)
61-
}
62-
"<class 'NoneType'>" -> {
63-
presentation.addText(
64-
variable.value.toString(),
65-
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.IDENTIFIER))
64+
SimpleTextAttributes.fromTextAttributes(
65+
scheme.getAttributes(DefaultLanguageHighlighterColors.STRING)
66+
)
6667
)
6768
}
6869
else -> {
6970
presentation.addText(
7071
variable.value.toString(),
71-
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.CONSTANT))
72+
SimpleTextAttributes.fromTextAttributes(
73+
scheme.getAttributes(DefaultLanguageHighlighterColors.IDENTIFIER)
74+
)
7275
)
7376
}
7477
}

plugin/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## [Unreleased]
66

7-
## [0.2.1] - 2021-11-22
7+
## [0.2.2] - 2021-11-23
88
- Improved Python live breakpoint display
99

1010
## [0.2.0] - 2021-11-20

0 commit comments

Comments
 (0)