We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d76e282 commit bb4cca1Copy full SHA for bb4cca1
adapter/src/main/kotlin/org/javacs/ktda/core/Source.kt
@@ -6,4 +6,8 @@ import java.nio.file.Path
6
class Source(
7
val name: String,
8
val filePath: Path
9
-)
+) {
10
+ override fun equals(other: Any?): Boolean {
11
+ return (other is Source) && (name == other.name) && (filePath == other.filePath)
12
+ }
13
+}
adapter/src/main/kotlin/org/javacs/ktda/util/ObservableMap.kt
@@ -13,7 +13,12 @@ class ObservableMap<K, V>(
fun remove(key: K) = entries.remove(key).also { fire() }
14
15
operator fun set(key: K, value: V) {
16
- entries[key] = value
+ try {
17
+ val sameKey = entries.keys.first { it == key }
18
+ entries[sameKey] = value
19
+ } catch(error: NoSuchElementException) {
20
+ entries[key] = value
21
22
fire()
23
}
24
0 commit comments