Skip to content

Commit

Permalink
Merge branch 'private-release/v1.1.0-231' into public-release/v1.1.0-231
Browse files Browse the repository at this point in the history
  • Loading branch information
Dzianis Lisiankou authored and Dzianis Lisiankou committed Sep 7, 2023
2 parents 3aab3cb + 3a61c84 commit a95282c
Show file tree
Hide file tree
Showing 42 changed files with 3,131 additions and 1,177 deletions.
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,59 @@

All notable changes to the Zowe IntelliJ Plugin will be documented in this file.

## `1.1.0 (2023-09-07)`

* Feature: GitHub issue #14: UX: Edit WS mask ([0d358d0d](https://github.com/zowe/zowe-explorer-intellij/commit/0d358d0d))
* Feature: GitHub issue #23: Double click on a working set or connection ([e7f040d7](https://github.com/zowe/zowe-explorer-intellij/commit/e7f040d7))
* Feature: GitHub issue #49: Plugin logging ([76b6b175](https://github.com/zowe/zowe-explorer-intellij/commit/76b6b175))
* Feature: GitHub issue #52: Presets for creating datasets ([6b8a5ca6](https://github.com/zowe/zowe-explorer-intellij/commit/6b8a5ca6))
* Feature: GitHub issue #111: "Rename" in dialog window should be "Edit" for DS and USS masks ([c39f7c01](https://github.com/zowe/zowe-explorer-intellij/commit/c39f7c01))
* Feature: GitHub issue #112: Migrate all UI tests from real data usage to mock server ([531d0e94](https://github.com/zowe/zowe-explorer-intellij/commit/531d0e94))
* Feature: GitHub issue #113: Change user password feature ([0706abcb](https://github.com/zowe/zowe-explorer-intellij/commit/0706abcb))
* Feature: GitHub issue #122: "whoami" on connection creation ([23ad877b](https://github.com/zowe/zowe-explorer-intellij/commit/23ad877b))
* Feature: GitHub issue #123: Implement "No items found" for USS and DS masks ([762827d0](https://github.com/zowe/zowe-explorer-intellij/commit/762827d0))
* Feature: GitHub issue #124: Clarify DS organization ([361f5f0a](https://github.com/zowe/zowe-explorer-intellij/commit/361f5f0a))
* Feature: GitHub issue #125: 80 LRECL by default ([62598726](https://github.com/zowe/zowe-explorer-intellij/commit/62598726))
* Feature: GitHub issue #126: Copy + rename ([440b65d9](https://github.com/zowe/zowe-explorer-intellij/commit/440b65d9))
* Feature: GitHub issue #130: JDK search index broken in IntelliJ after dataset is open
* Feature: GitHub issue #136: CLEARTEXT communication not enabled for client ([a2958223](https://github.com/zowe/zowe-explorer-intellij/commit/a2958223))
* Feature: GitHub issue #140: Exception in Zowe Explorer (1.0.2-221) for Android Studio(Android Studio Flamingo | 2022.2.1 Patch 2) ([3ce3813e](https://github.com/zowe/zowe-explorer-intellij/commit/3ce3813e))
* Feature: GitHub issue #144: Incorrect encoding should not be changed directly, until a user is decided to change it when we suggest ([02ae0c62](https://github.com/zowe/zowe-explorer-intellij/commit/02ae0c62))
* Feature: GitHub issue #145: Migrated dataset properties should not be visible if they are not available ([18b13ff1](https://github.com/zowe/zowe-explorer-intellij/commit/18b13ff1))
* Feature: GitHub issue #146: Hints for creating working sets after connection is created ([dcd92dfa](https://github.com/zowe/zowe-explorer-intellij/commit/dcd92dfa))
* Feature: GitHub issue #147: "Duplicate" for member ([1493f1e8](https://github.com/zowe/zowe-explorer-intellij/commit/1493f1e8))
* Feature: GitHub issue #148: Warning about incompatible encodings ([3bd29c7a](https://github.com/zowe/zowe-explorer-intellij/commit/3bd29c7a))
* Feature: Separate info and tso requests during connection test ([83aa6bf2](https://github.com/zowe/zowe-explorer-intellij/commit/83aa6bf2))
* Feature: Rework configs in the plug-in to accept new configurables ([d0ff5b3d](https://github.com/zowe/zowe-explorer-intellij/commit/d0ff5b3d))
* Feature: Rework file sync with MF ([c43b8198](https://github.com/zowe/zowe-explorer-intellij/commit/c43b8198))
* Feature: Presets: improvement ([7255dfce](https://github.com/zowe/zowe-explorer-intellij/commit/7255dfce))
* Feature: VFS_CHANGES to MF_VFS_CHANGES ([0dd8b1b4](https://github.com/zowe/zowe-explorer-intellij/commit/0dd8b1b4))
* Feature: Change XML and JSON comparison on different plugin versions ([7f480747](https://github.com/zowe/zowe-explorer-intellij/commit/7f480747))
* Feature: Substitute R2Z with Zowe Kotlin SDK ([df6d11c1](https://github.com/zowe/zowe-explorer-intellij/commit/df6d11c1))
* Feature: Enhance configuration for CICS connections ([cfa94f88](https://github.com/zowe/zowe-explorer-intellij/commit/cfa94f88))
* Feature: Unit tests ([019bef00](https://github.com/zowe/zowe-explorer-intellij/commit/019bef00), [fa903c1c](https://github.com/zowe/zowe-explorer-intellij/commit/fa903c1c), [709a5e2f](https://github.com/zowe/zowe-explorer-intellij/commit/709a5e2f), [07ecd283](https://github.com/zowe/zowe-explorer-intellij/commit/07ecd283), [93febb62](https://github.com/zowe/zowe-explorer-intellij/commit/93febb62), [517c2cff](https://github.com/zowe/zowe-explorer-intellij/commit/517c2cff), [29cd85e4](https://github.com/zowe/zowe-explorer-intellij/commit/29cd85e4), [3850fcec](https://github.com/zowe/zowe-explorer-intellij/commit/3850fcec), [5646963e](https://github.com/zowe/zowe-explorer-intellij/commit/5646963e), [be3b5086](https://github.com/zowe/zowe-explorer-intellij/commit/be3b5086), [5043f5da](https://github.com/zowe/zowe-explorer-intellij/commit/5043f5da), [fdf67e1c](https://github.com/zowe/zowe-explorer-intellij/commit/fdf67e1c))


* Bugfix: GitHub issue #138: Job is identified as successful while it ends with RC=12 ([99491858](https://github.com/zowe/zowe-explorer-intellij/commit/99491858))
* Bugfix: Tooltip on JES Working set shows 'Working set' ([9937c128](https://github.com/zowe/zowe-explorer-intellij/commit/9937c128))
* Bugfix: "debounce" test is failed sometimes ([8bb98da8](https://github.com/zowe/zowe-explorer-intellij/commit/8bb98da8))
* Bugfix: Allocate like strange behavior ([a0bf3da4](https://github.com/zowe/zowe-explorer-intellij/commit/a0bf3da4))
* Bugfix: Change permissions: incorrect permissions shown after change failure ([2143e4ba](https://github.com/zowe/zowe-explorer-intellij/commit/2143e4ba))
* Bugfix: Empty pds is not deleted after its move to pds ([e88f830f](https://github.com/zowe/zowe-explorer-intellij/commit/e88f830f))
* Bugfix: It shows that the job is still running after successfull purge ([d4a4289e](https://github.com/zowe/zowe-explorer-intellij/commit/d4a4289e))
* Bugfix: Errors for several actions in JES Explorer ([3496acc1](https://github.com/zowe/zowe-explorer-intellij/commit/3496acc1))
* Bugfix: Error if move empty PS to PDS ([15b262c0](https://github.com/zowe/zowe-explorer-intellij/commit/15b262c0))
* Bugfix: Password is changed only for one connection ([a52830c8](https://github.com/zowe/zowe-explorer-intellij/commit/a52830c8))
* Bugfix: Userid for new ws/jws is not changed in FileExplorer/JesExplorer after changes in corresponding connection ([ea0c9706](https://github.com/zowe/zowe-explorer-intellij/commit/ea0c9706))
* Bugfix: FileNotFoundException on configs search (The system cannot find the file specified) ([76badb81](https://github.com/zowe/zowe-explorer-intellij/commit/76badb81))
* Bugfix: Content of uss-file is changed to UTF-8 while copying it from remote to local ([ed86553e](https://github.com/zowe/zowe-explorer-intellij/commit/ed86553e))
* Bugfix: Copy/paste and DnD of PS dataset from one host to uss-folder on another host does not work ([1522e08a](https://github.com/zowe/zowe-explorer-intellij/commit/1522e08a))
* Bugfix: validateForGreaterValue should show correct message ([f841692e](https://github.com/zowe/zowe-explorer-intellij/commit/f841692e))
* Bugfix: JCL highlight does not work on mainframe files ([80c8288a](https://github.com/zowe/zowe-explorer-intellij/commit/80c8288a))
* Bugfix: IDE error when rename member/dataset to existing one/to the same ([e8dbaa8a](https://github.com/zowe/zowe-explorer-intellij/commit/e8dbaa8a))
* Bugfix: ClassCastException: class java.util.ArrayList cannot be cast to class com.intellij.openapi.vfs.VirtualFile ([cdc0a458](https://github.com/zowe/zowe-explorer-intellij/commit/cdc0a458))


## `1.0.2 (2023-06-13)`

* Feature: Returned support for IntelliJ 2022.1 ([6329c788](https://github.com/zowe/zowe-explorer-intellij/commit/6329c788))
Expand Down
65 changes: 49 additions & 16 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -101,30 +101,62 @@ tasks {

patchPluginXml {
sinceBuild.set("231.8109")
untilBuild.set("231.*")
untilBuild.set("232.*")
changeNotes.set(
"""
<b>WARNING: </b> version 1.0 introduces breaking change. You won't be able to use the plugin with IntelliJ version less than 2022.3
<br>
<br>
<b>New features:</b>
<ul>
<li>Returned support for IntelliJ 2022.1</li>
<li>Focus on dataset name field in allocation dialog</li>
<li>GitHub issue #14: UX: Edit WS mask</li>
<li>GitHub issue #23: Double click on a working set or connection</li>
<li>GitHub issue #49: Plugin logging</li>
<li>GitHub issue #52: Presets for creating datasets</li>
<li>GitHub issue #111: "Rename" in dialog window should be "Edit" for DS and USS masks</li>
<li>GitHub issue #112: Migrate all UI tests from real data usage to mock server</li>
<li>GitHub issue #113: Change user password feature</li>
<li>GitHub issue #122: "whoami" on connection creation</li>
<li>GitHub issue #123: Implement "No items found" for USS and DS masks</li>
<li>GitHub issue #124: Clarify DS organization</li>
<li>GitHub issue #125: 80 LRECL by default</li>
<li>GitHub issue #126: Copy + rename</li>
<li>GitHub issue #130: JDK search index broken in IntelliJ after dataset is open</li>
<li>GitHub issue #136: CLEARTEXT communication not enabled for client</li>
<li>GitHub issue #140: Exception in Zowe Explorer (1.0.2-221) for Android Studio(Android Studio Flamingo | 2022.2.1 Patch 2)</li>
<li>GitHub issue #144: Incorrect encoding should not be changed directly, until a user is decided to change it when we suggest</li>
<li>GitHub issue #145: Migrated dataset properties should not be visible if they are not available</li>
<li>GitHub issue #146: Hints for creating working sets after connection is created</li>
<li>GitHub issue #147: "Duplicate" for member</li>
<li>GitHub issue #148: Warning about incompatible encodings</li>
<li>Separate info and tso requests during connection test</li>
<li>Rework configs in the plug-in to accept new configurables</li>
<li>Rework file sync with MF</li>
<li>Presets: improvement</li>
<li>VFS_CHANGES to MF_VFS_CHANGES</li>
<li>Change XML and JSON comparison on different plugin versions</li>
<li>Substitute R2Z with Zowe Kotlin SDK</li>
<li>Enhance configuration for CICS connections</li>
<li>Unit tests</li>
</ul>
<br>
<b>Fixed bugs:</b>
<ul>
<li>Memory leak bug</li>
<li>GitHub issue #132: IDE internal error - NPE</li>
<li>Access denied error when copy from remote to local file when local has folder with the same name</li>
<li>Paste to dataset with LRECL does not move exceeding characters to a new line</li>
<li>USS file with 0 permissions is not accessible and no error message displayed</li>
<li>Refresh does not work for job filter with one job after purge</li>
<li>Name conflict message if move uss-file from folder to mask and then back</li>
<li>File cash conflict</li>
<li>Cancel button does not work for TSO connection test during</li>
<li>Unknown file type after delete member after move</li>
<<li>GitHub issue #138: Job is identified as successful while it ends with RC=12</li>
<li>Tooltip on JES Working set shows 'Working set'</li>
<li>"debounce" test is failed sometimes</li>
<li>Allocate like strange behavior</li>
<li>Change permissions: incorrect permissions shown after change failure</li>
<li>Empty pds is not deleted after its move to pds</li>
<li>It shows that the job is still running after successfull purge</li>
<li>Errors for several actions in JES Explorer</li>
<li>Error if move empty PS to PDS</li>
<li>Password is changed only for one connection</li>
<li>Userid for new ws/jws is not changed in FileExplorer/JesExplorer after changes in corresponding connection</li>
<li>FileNotFoundException on configs search (The system cannot find the file specified)</li>
<li>Content of uss-file is changed to UTF-8 while copying it from remote to local</li>
<li>Copy/paste and DnD of PS dataset from one host to uss-folder on another host does not work</li>
<li>validateForGreaterValue should show correct message</li>
<li>JCL highlight does not work on mainframe files</li>
<li>IDE error when rename member/dataset to existing one/to the same</li>
<li>ClassCastException: class java.util.ArrayList cannot be cast to class com.intellij.openapi.vfs.VirtualFile</li>
</ul>"""
)
}
Expand All @@ -140,6 +172,7 @@ tasks {
finalizedBy("koverHtmlReport")
systemProperty("idea.force.use.core.classloader", "true")
systemProperty("idea.use.core.classloader.for.plugin.path", "true")
systemProperty("java.awt.headless", "true")

afterSuite(
KotlinClosure2<TestDescriptor, TestResult, Unit>({ desc, result ->
Expand Down
8 changes: 4 additions & 4 deletions src/main/kotlin/eu/ibagroup/formainframe/api/ZosmfApiImpl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ class ZosmfApiImpl : ZosmfApi {
useBytesConverter: Boolean
): Api {
val zosmfUrl = ZosmfUrl(url, isAllowSelfSigned)
val defaultApi = Pair<MutableMap<ZosmfUrl, Any>, MutableMap<ZosmfUrl, Any>>(hashMapOf(), hashMapOf())
if (!apis.containsKey(apiClass)) {
synchronized(apis) {
if (!apis.containsKey(apiClass)) {
apis[apiClass] = Pair(hashMapOf(), hashMapOf())
apis[apiClass] = defaultApi
}
}
}
val apiClassMap = apis[apiClass]!!
val apiClassMap = apis[apiClass] ?: defaultApi
synchronized(apiClassMap) {
if (!useBytesConverter && !apiClassMap.first.containsKey(zosmfUrl)) {
apiClassMap.first[zosmfUrl] = buildApi(zosmfUrl.url, getOkHttpClient(zosmfUrl.isAllowSelfSigned), apiClass)
Expand All @@ -94,7 +95,6 @@ class ZosmfApiImpl : ZosmfApi {
}
return if (!useBytesConverter) apiClassMap.first[zosmfUrl] as Api else apiClassMap.second[zosmfUrl] as Api
}

}

private val gsonFactory = GsonConverterFactory.create(GsonBuilder().create())
Expand Down Expand Up @@ -130,7 +130,7 @@ private fun OkHttpClient.Builder.setupClient(): OkHttpClient.Builder {
it.request().newBuilder().addHeader("X-CSRF-ZOSMF-HEADER", "").build().let { request ->
it.proceed(request)
}
}.connectionSpecs(mutableListOf(ConnectionSpec.MODERN_TLS, ConnectionSpec.COMPATIBLE_TLS))
}.connectionSpecs(mutableListOf(ConnectionSpec.MODERN_TLS, ConnectionSpec.COMPATIBLE_TLS, ConnectionSpec.CLEARTEXT))
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ import com.intellij.ui.dsl.gridLayout.HorizontalAlign
import eu.ibagroup.formainframe.common.ui.DialogMode
import eu.ibagroup.formainframe.common.ui.StatefulDialog
import eu.ibagroup.formainframe.common.ui.showUntilDone
import eu.ibagroup.formainframe.config.configCrudable
import eu.ibagroup.formainframe.config.connect.*
import eu.ibagroup.formainframe.config.connect.ui.ChangePasswordDialog
import eu.ibagroup.formainframe.config.connect.ui.ChangePasswordDialogState
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.dataops.operations.*
import eu.ibagroup.formainframe.utils.*
import eu.ibagroup.formainframe.utils.crudable.Crudable
import eu.ibagroup.formainframe.utils.runTask
import eu.ibagroup.formainframe.utils.validateConnectionName
import eu.ibagroup.formainframe.utils.validateForBlank
import eu.ibagroup.formainframe.utils.validateZosmfUrl
import eu.ibagroup.formainframe.utils.crudable.getAll
import org.zowe.kotlinsdk.ChangePassword
import org.zowe.kotlinsdk.annotations.ZVersion
import java.awt.Component
Expand Down Expand Up @@ -96,7 +95,6 @@ class ConnectionDialog(
runCatching {
service<DataOpsManager>().performOperation(InfoOperation(newTestedConnConfig), it)
}.onSuccess {
state.owner = whoAmI(newTestedConnConfig) ?: ""
val systemInfo = service<DataOpsManager>().performOperation(ZOSInfoOperation(newTestedConnConfig))
state.zVersion = when (systemInfo.zosVersion) {
"04.25.00" -> ZVersion.ZOS_2_2
Expand Down Expand Up @@ -143,6 +141,9 @@ class ConnectionDialog(
}
addAnyway
} else {
runTask(title = "Retrieving user information", project = project) {
state.owner = whoAmI(newTestedConnConfig) ?: ""
}
true
}
}
Expand Down Expand Up @@ -300,6 +301,16 @@ class ConnectionDialog(
val relativePoint = RelativePoint(this, Point(this.width / 2, this.height))
balloon.show(relativePoint, Balloon.Position.below)
}

configCrudable.getAll<ConnectionConfig>().filter { it.url == state.connectionUrl }
.filter { CredentialService.instance.getUsernameByKey(it.uuid) == state.username }
.forEach {
CredentialService.instance.setCredentials(
connectionConfigUuid = it.uuid,
username = state.username,
password = state.password
)
}
}
true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,21 @@ import com.intellij.openapi.ui.ValidationInfo
import com.intellij.ui.layout.ValidationInfoBuilder
import com.intellij.util.ui.ColumnInfo
import com.intellij.util.ui.ComboBoxCellEditor
import eu.ibagroup.formainframe.common.ui.*
import eu.ibagroup.formainframe.common.ui.DEFAULT_ROW_HEIGHT
import eu.ibagroup.formainframe.common.ui.DialogMode
import eu.ibagroup.formainframe.common.ui.ValidatingCellRenderer
import eu.ibagroup.formainframe.common.ui.ValidatingColumnInfo
import eu.ibagroup.formainframe.common.ui.ValidatingListTableModel
import eu.ibagroup.formainframe.common.ui.ValidatingTableView
import eu.ibagroup.formainframe.config.connect.ConnectionConfig
import eu.ibagroup.formainframe.config.connect.getUsername
import eu.ibagroup.formainframe.config.ws.FilesWorkingSetConfig
import eu.ibagroup.formainframe.config.ws.MaskState
import eu.ibagroup.formainframe.config.ws.ui.AbstractWsDialog
import eu.ibagroup.formainframe.config.ws.ui.FilesWorkingSetDialogState
import eu.ibagroup.formainframe.utils.MaskType
import eu.ibagroup.formainframe.utils.crudable.Crudable
import eu.ibagroup.formainframe.utils.crudable.getByUniqueKey
import eu.ibagroup.formainframe.utils.validateDatasetMask
import eu.ibagroup.formainframe.utils.validateForBlank
import eu.ibagroup.formainframe.utils.validateUssMask
Expand All @@ -38,7 +45,7 @@ import javax.swing.table.TableCellRenderer
* @author Viktar Mushtsin
*/
class FilesWorkingSetDialog(
crudable: Crudable,
private val crudable: Crudable,
state: FilesWorkingSetDialogState
) : AbstractWsDialog<ConnectionConfig, FilesWorkingSetConfig, MaskState, FilesWorkingSetDialogState>(
crudable,
Expand Down Expand Up @@ -231,6 +238,12 @@ class FilesWorkingSetDialog(
}
}

override fun emptyTableRow(): MaskState = MaskState()
/**
* Returns mask state with predefined mask name as "<HLQ>.*"
*/
override fun emptyTableRow(): MaskState {
val config = crudable.getByUniqueKey<ConnectionConfig>(state.connectionUuid)
return MaskState(if (config != null) "${getUsername(config)}.*" else "")
}

}
Loading

0 comments on commit a95282c

Please sign in to comment.