Skip to content

Commit 8f670b4

Browse files
committed
Merge branch 'private-release/v1.2.5-221' into private-release/v1.2.5-223
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
2 parents cb2b76a + a948271 commit 8f670b4

5 files changed

Lines changed: 30 additions & 3 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
/ide_for_launch
66
/out
77
/allure-results
8+
**/mock_project/*
89

910
libs
1011
verifier-all.jar

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
All notable changes to the For Mainframe Plugin will be documented in this file.
44

5-
## [1.2.4-223] (2024-11-18)
5+
## [Unreleased]
6+
7+
## [1.2.4-221] (2024-11-18)
68

79
### Bugfixes
810

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xss1M
1414
platformVersion = 2022.3
1515

1616
# SemVer format -> https://semver.org
17-
pluginVersion = 1.2.4-223
17+
pluginVersion = 1.2.5-223
1818
pluginGroup = eu.ibagroup
1919
pluginRepositoryUrl = https://github.com/for-mainframe/For-Mainframe
2020

src/main/kotlin/eu/ibagroup/formainframe/analytics/ui/AnalyticsPolicyDialog.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class AnalyticsPolicyDialog(
6161
lineWrap = true
6262
wrapStyleWord = true
6363
caretPosition = 0
64+
isEditable = false
6465
}
6566
scrollCell(licenseTextArea)
6667
.horizontalAlign(HorizontalAlign.FILL)

src/main/kotlin/eu/ibagroup/formainframe/explorer/ui/ExplorerTreeView.kt

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,29 @@ abstract class ExplorerTreeView<Connection: ConnectionConfigBase, U : WorkingSet
9696

9797
private var treeModel: AsyncTreeModel
9898

99+
/**
100+
* Function is called when onFetchCancelled event has been raised.
101+
* It searches for nodes by provided @param Query, looks through the tree and collects
102+
* TreePath objects on Promise resolution. For every found TreePath collapses this path
103+
* @param query - query on which 'fetch cancelled' event has been occurred
104+
*/
105+
private fun collapseNodesByQuery(query: Query<*, *>) {
106+
// Collapse only those nodes for which TreePath has been resolved.
107+
// If tree path cannot be resolved as the result of Promise resolution,
108+
// it means that node does not present in the tree model anymore
109+
myFsTreeStructure.findByPredicate { it is FetchNode && it.query == query }
110+
.mapNotNull { myStructure.promisePath(it, myTree).get() }
111+
.forEach { foundTreePath ->
112+
treeModel.onValidThread {
113+
myTree.collapsePath(foundTreePath)
114+
synchronized(myNodesToInvalidateOnExpand) {
115+
val node = foundTreePath.lastPathComponent
116+
myNodesToInvalidateOnExpand.add(node)
117+
}
118+
}
119+
}
120+
}
121+
99122
/**
100123
* Get node by provided query and invalidate them. The nodes will be either collapsed or invalidated on this action, basing on the provided parameters
101124
* @param query the query to search nodes by
@@ -326,7 +349,7 @@ abstract class ExplorerTreeView<Connection: ConnectionConfigBase, U : WorkingSet
326349
}
327350

328351
override fun <R : Any, Q : Query<R, Unit>> onFetchCancelled(query: Q) {
329-
getNodesByQueryAndInvalidate(query, collapse = true, invalidate = false)
352+
collapseNodesByQuery(query)
330353
}
331354

332355
override fun <R : Any, Q : Query<R, Unit>> onFetchFailure(query: Q, throwable: Throwable) {

0 commit comments

Comments
 (0)