From f483ccef0264f59c602d45f813dae5479f6b4b9c Mon Sep 17 00:00:00 2001 From: Uladzislau Date: Tue, 16 Apr 2024 22:15:45 +0200 Subject: [PATCH] Release v2.0.0 branch is prepared and fixed Signed-off-by: Uladzislau --- build.gradle.kts | 31 ++++++++++++------- .../config/connect/Credentials.kt | 10 +++--- .../editor/FileEditorEventsListener.kt | 11 +++++-- .../editor/MFPastePreprocessor.kt | 1 - .../explorer/actions/PurgeJobAction.kt | 9 ++++-- .../ui/build/tso/ui/TSOConsoleView.kt | 23 +++++++------- 6 files changed, 50 insertions(+), 35 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 2873ea13a..67aeac0b4 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -37,6 +37,13 @@ version = properties("pluginVersion").get() val remoteRobotVersion = "0.11.22" val okHttp3Version = "4.12.0" val kotestVersion = "5.8.1" +val retrofit2Vertion = "2.11.0" +val junitVersion = "5.10.2" +val mockkVersion = "1.13.10" +val ibmMqVersion = "9.3.5.0" +val jGraphTVersion = "1.5.2" +val zoweKotlinSdkVersion = "0.4.0" +val javaAnalyticsVersion = "3.5.1" repositories { mavenCentral() @@ -62,25 +69,25 @@ java { } dependencies { - implementation(group = "com.squareup.retrofit2", name = "retrofit", version = "2.9.0") - implementation("com.squareup.retrofit2:converter-gson:2.9.0") - implementation("com.squareup.retrofit2:converter-scalars:2.9.0") + implementation(group = "com.squareup.retrofit2", name = "retrofit", version = retrofit2Vertion) + implementation("com.squareup.retrofit2:converter-gson:$retrofit2Vertion") + implementation("com.squareup.retrofit2:converter-scalars:$retrofit2Vertion") implementation("com.squareup.okhttp3:okhttp:$okHttp3Version") - implementation("org.jgrapht:jgrapht-core:1.5.2") - implementation("org.zowe.sdk:zowe-kotlin-sdk:0.4.0") - implementation("com.segment.analytics.java:analytics:3.5.0") - implementation("com.ibm.mq:com.ibm.mq.allclient:9.3.4.1") - implementation("org.junit.jupiter:junit-jupiter-params:5.9.2") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.1") - testImplementation("io.mockk:mockk:1.13.9") + implementation("org.jgrapht:jgrapht-core:$jGraphTVersion") + implementation("org.zowe.sdk:zowe-kotlin-sdk:$zoweKotlinSdkVersion") + implementation("com.segment.analytics.java:analytics:$javaAnalyticsVersion") + implementation("com.ibm.mq:com.ibm.mq.allclient:$ibmMqVersion") + implementation("org.junit.jupiter:junit-jupiter-params:$junitVersion") + testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion") + testImplementation("io.mockk:mockk:$mockkVersion") testImplementation("io.kotest:kotest-assertions-core:$kotestVersion") testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion") testImplementation("com.intellij.remoterobot:remote-robot:$remoteRobotVersion") testImplementation("com.intellij.remoterobot:remote-fixtures:$remoteRobotVersion") testImplementation("com.squareup.okhttp3:mockwebserver:$okHttp3Version") testImplementation("com.squareup.okhttp3:okhttp-tls:$okHttp3Version") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.1") - testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.10.1") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion") + testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitVersion") } intellij { diff --git a/src/main/kotlin/eu/ibagroup/formainframe/config/connect/Credentials.kt b/src/main/kotlin/eu/ibagroup/formainframe/config/connect/Credentials.kt index 815bbe949..e57018345 100755 --- a/src/main/kotlin/eu/ibagroup/formainframe/config/connect/Credentials.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/config/connect/Credentials.kt @@ -38,7 +38,7 @@ class Credentials { if (other == null || javaClass != other.javaClass) return false val that = other as Credentials if (configUuid != that.configUuid) return false - return if (username != that.username) false else password == that.password + return username == that.username && password == that.password } override fun hashCode(): Int { @@ -51,9 +51,9 @@ class Credentials { override fun toString(): String { return "Credentials{" + - "connectionConfigUuid='" + configUuid + '\'' + - ", username='" + username + '\'' + - ", password='" + password + '\'' + - '}' + "connectionConfigUuid='" + configUuid + '\'' + + ", username='" + username + '\'' + + ", password='" + password + '\'' + + '}' } } diff --git a/src/main/kotlin/eu/ibagroup/formainframe/editor/FileEditorEventsListener.kt b/src/main/kotlin/eu/ibagroup/formainframe/editor/FileEditorEventsListener.kt index 8d3829e6a..1112be42e 100644 --- a/src/main/kotlin/eu/ibagroup/formainframe/editor/FileEditorEventsListener.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/editor/FileEditorEventsListener.kt @@ -10,7 +10,6 @@ package eu.ibagroup.formainframe.editor -import com.intellij.openapi.actionSystem.ex.ActionUtil import com.intellij.openapi.components.service import com.intellij.openapi.editor.ex.EditorEx import com.intellij.openapi.fileEditor.FileEditorManager @@ -19,8 +18,14 @@ import com.intellij.openapi.progress.runModalTask import com.intellij.openapi.vfs.VirtualFile import eu.ibagroup.formainframe.config.ConfigService import eu.ibagroup.formainframe.dataops.DataOpsManager -import eu.ibagroup.formainframe.dataops.content.synchronizer.* -import eu.ibagroup.formainframe.utils.* +import eu.ibagroup.formainframe.dataops.content.synchronizer.AutoSyncFileListener +import eu.ibagroup.formainframe.dataops.content.synchronizer.DocumentedSyncProvider +import eu.ibagroup.formainframe.dataops.content.synchronizer.SaveStrategy +import eu.ibagroup.formainframe.utils.checkEncodingCompatibility +import eu.ibagroup.formainframe.utils.runReadActionInEdtAndWait +import eu.ibagroup.formainframe.utils.runWriteActionInEdtAndWait +import eu.ibagroup.formainframe.utils.sendTopic +import eu.ibagroup.formainframe.utils.showSaveAnywayDialog import eu.ibagroup.formainframe.vfs.MFVirtualFile /** diff --git a/src/main/kotlin/eu/ibagroup/formainframe/editor/MFPastePreprocessor.kt b/src/main/kotlin/eu/ibagroup/formainframe/editor/MFPastePreprocessor.kt index d4439aca9..9efe12adb 100644 --- a/src/main/kotlin/eu/ibagroup/formainframe/editor/MFPastePreprocessor.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/editor/MFPastePreprocessor.kt @@ -20,7 +20,6 @@ import com.intellij.openapi.util.Ref import com.intellij.psi.PsiFile import eu.ibagroup.formainframe.utils.`is` import eu.ibagroup.formainframe.vfs.MFVirtualFile -import org.jetbrains.annotations.ApiStatus import java.awt.datatransfer.DataFlavor import java.awt.datatransfer.Transferable diff --git a/src/main/kotlin/eu/ibagroup/formainframe/explorer/actions/PurgeJobAction.kt b/src/main/kotlin/eu/ibagroup/formainframe/explorer/actions/PurgeJobAction.kt index 434022c4f..8dfbf6ec3 100644 --- a/src/main/kotlin/eu/ibagroup/formainframe/explorer/actions/PurgeJobAction.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/explorer/actions/PurgeJobAction.kt @@ -25,11 +25,11 @@ import eu.ibagroup.formainframe.dataops.DataOpsManager import eu.ibagroup.formainframe.dataops.attributes.RemoteJobAttributes import eu.ibagroup.formainframe.dataops.operations.jobs.BasicPurgeJobParams import eu.ibagroup.formainframe.dataops.operations.jobs.PurgeJobOperation -import eu.ibagroup.formainframe.explorer.ui.ExplorerTreeNode -import eu.ibagroup.formainframe.explorer.ui.FetchNode import eu.ibagroup.formainframe.explorer.ui.JesExplorerView import eu.ibagroup.formainframe.explorer.ui.JesFilterNode +import eu.ibagroup.formainframe.explorer.ui.JesWsNode import eu.ibagroup.formainframe.explorer.ui.JobNode +import eu.ibagroup.formainframe.explorer.ui.NodeData import eu.ibagroup.formainframe.explorer.ui.getExplorerView import eu.ibagroup.formainframe.ui.build.jobs.JOBS_LOG_VIEW import eu.ibagroup.formainframe.ui.build.jobs.JobBuildTreeView @@ -134,7 +134,10 @@ class PurgeJobAction : AnAction() { if (foundJobsWaitingInPurgeQueue.isNotEmpty()) { foundJobsWaitingInPurgeQueue.clear() val filterRefreshSize = jobsByFilterWaitingPurgeMap[filterNode]!!.size - runRefreshByFilter(filterNode, if (filterRefreshSize == 1) (filterRefreshSize.toLong() * 1000) else (filterRefreshSize / 2).toLong() * 1000) + runRefreshByFilter( + filterNode, + if (filterRefreshSize == 1) (filterRefreshSize.toLong() * 1000) else (filterRefreshSize / 2).toLong() * 1000 + ) } else { filterNode.cleanCache() } diff --git a/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/ui/TSOConsoleView.kt b/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/ui/TSOConsoleView.kt index 6efecfdfb..766855a61 100644 --- a/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/ui/TSOConsoleView.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/ui/TSOConsoleView.kt @@ -51,6 +51,7 @@ class TSOConsoleView( private lateinit var tsoMessageTypeBox: ComboBox private lateinit var tsoDataTypeBox: ComboBox private lateinit var cancelCommandButton: JButton + private lateinit var reopenSessionButton: JButton private val tsoWidthGroup: String = "TSO_WIDTH_GROUP" private val tsoMessageTypes: List = @@ -93,6 +94,17 @@ class TSOConsoleView( tsoDataTypeBox = it.component } }.visible(debugMode) + row { + button("Reopen Session") { + runBackgroundableTask("Re-opening TSO session", project) { + sendTopic(SESSION_REOPEN_TOPIC).reopen(project, this@TSOConsoleView) + } + }.also { + reopenSessionButton = it.component + reopenSessionButton.apply { toolTipText = "The server tries to re-open the current session in case of some troubles (for example console hangs)" } + } + .widthGroup(tsoWidthGroup) + } row { button("Cancel Command (PA1)") { log.info("CANCEL COMMAND (PA1)") @@ -108,17 +120,6 @@ class TSOConsoleView( cancelCommandButton = it.component } .widthGroup(tsoWidthGroup) - }.visible(debugMode) - row { - button("Reopen Session") { - runBackgroundableTask("Re-opening TSO session", project) { - sendTopic(SESSION_REOPEN_TOPIC).reopen(project, this@TSOConsoleView) - } - }.also { - reopenSessionButton = it.component - reopenSessionButton.apply { toolTipText = "The server tries to re-open the current session in case of some troubles (for example console hangs)" } - } - .widthGroup(tsoWidthGroup) } }.also { it.border = JBEmptyBorder(10, 15, 10, 15)