Skip to content

Commit

Permalink
Merge branch 'bugfix/IJMP-2041-perform-refresh-concurrently-on-inters…
Browse files Browse the repository at this point in the history
…ecting-nodes' into 'release/v2.1.0'

IJMP-2041-perform-refresh-concurrently-on-intersecting-nodes

See merge request ijmp/for-mainframe!641
  • Loading branch information
Uladzislau Kalesnikau committed Jan 28, 2025
2 parents d70c400 + 726fbd0 commit 6a7a2eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ import eu.ibagroup.formainframe.common.ui.showUntilDone
import eu.ibagroup.formainframe.config.connect.ConnectionConfig
import eu.ibagroup.formainframe.config.connect.CredentialService
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.dataops.RemoteQuery
import eu.ibagroup.formainframe.dataops.attributes.RemoteUssAttributes
import eu.ibagroup.formainframe.dataops.exceptions.CredentialsNotFoundForConnectionException
import eu.ibagroup.formainframe.dataops.fetch.UssQuery
import eu.ibagroup.formainframe.dataops.getAttributesService
import eu.ibagroup.formainframe.dataops.operations.UssAllocationOperation
import eu.ibagroup.formainframe.dataops.operations.UssAllocationParams
Expand Down Expand Up @@ -125,12 +123,6 @@ abstract class CreateUssEntityAction : AnAction() {
progressIndicator = indicator
)

val fileFetchProvider = dataOpsManager
.getFileFetchProvider<UssQuery, RemoteQuery<ConnectionConfig, UssQuery, Unit>, MFVirtualFile>(
UssQuery::class.java, RemoteQuery::class.java, MFVirtualFile::class.java
)
ussDirNode?.query?.let { query -> fileFetchProvider.reload(query) }

changeFileModeIfNeeded(file, allocationParams, connectionConfig, indicator)

AnalyticsService.getService().trackAnalyticsEvent(
Expand All @@ -140,7 +132,10 @@ abstract class CreateUssEntityAction : AnAction() {
)
)
}.onSuccess {
ussDirNode?.cleanCache(false)
ussDirNode?.let {
view.myFsTreeStructure.findByPredicate { node -> node is FetchNode && node.query == it.query }
.forEach { node -> node.cleanCacheIfPossible(false) }
}
res = true
}.onFailure { t ->
NotificationsService.errorNotification(t, project)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,8 @@ abstract class ExplorerTreeView<Connection : ConnectionConfigBase, U : WorkingSe
override fun after(events: List<VFileEvent>) {
events
.mapNotNull {
val nodes = myFsTreeStructure.findByVirtualFile(it.file ?: return@mapNotNull null)
val eventFile = it.file ?: return@mapNotNull null
val nodes = myFsTreeStructure.findByVirtualFile(eventFile)
when {
this@ExplorerTreeView
.ignoreVFSChangeEvents
Expand Down

0 comments on commit 6a7a2eb

Please sign in to comment.