Skip to content

Commit 052b0ef

Browse files
committed
Merge branch 'private-release/v1.2.3-221' into public-release/v1.2.3-221
Signed-off-by: Uladzislau <[email protected]>
2 parents 386de29 + 5e4aeaf commit 052b0ef

19 files changed

+335
-49
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.gradle
22
.idea
3+
.intellijPlatform
34
/build
45
/ide_for_launch
56

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@ All notable changes to the Zowe IntelliJ Plugin will be documented in this file.
66

77
### Features
88

9+
* Feature: Correct alignment for fields in working set dialog ([745143cc](https://github.com/zowe/zowe-explorer-intellij/commit/745143cc))
10+
11+
### Bufixes
12+
13+
* Bugfix: Fixed unexpected freezes of IDE during work with USS part ([38f1f5b3](https://github.com/zowe/zowe-explorer-intellij/commit/38f1f5b3))
14+
* Bugfix: Fixed error that was caused by members renaming ([238ebc08](https://github.com/zowe/zowe-explorer-intellij/commit/238ebc08))
15+
* Bugfix: Fixed missed automatic translation to uppercase ([1b48de61](https://github.com/zowe/zowe-explorer-intellij/commit/1b48de61))
16+
* Bugfix: Fixed synchronization errors ([f96d9302](https://github.com/zowe/zowe-explorer-intellij/commit/f96d9302))
17+
* Bugfix: Fixed permissions change in opened file ([b04ed99e](https://github.com/zowe/zowe-explorer-intellij/commit/b04ed99e))
18+
* Bugfix: Fixed copy-paste folder to another folder with name conflicts ([13d7d773](https://github.com/zowe/zowe-explorer-intellij/commit/13d7d773))
19+
* Bugfix: Validation changes for LRECL field ([14e384a4](https://github.com/zowe/zowe-explorer-intellij/commit/14e384a4))
20+
* Bugfix: Fixed issue when job was not visible in JesExplorerView when Job Filter is created by JOBID ([5bb17263](https://github.com/zowe/zowe-explorer-intellij/commit/5bb17263))
21+
22+
## [1.2.2-221] (2024-08-21)
23+
24+
### Features
25+
926
* Feature: Removed "openApiUtils" functions that were duplicating the ones already implemented in IntelliJ IDEA platform ([fbf7db62](https://github.com/zowe/zowe-explorer-intellij/commit/fbf7db62))
1027

1128
### Bugfixes

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,6 @@ Consider some new feature for the plugin. The first that you need is to create a
6060
- In case of bug - make a reproduction scheme or short description on how to achieve this;
6161
- In case of new feature or improvement - describe, what you are trying to implement, how it should work, and (if applicable) why it should be introduced in the plugin;
6262
6. After the changes are made, create a pull request on any of the main branches in the project repo. ***It is not a problem if you specified an incorrect target branch, we will help you with it before the changes are pushed***
63-
7. Assign Uladzislau Kalesnikau and Valiantsin Krus as reviewers to the pull request
63+
7. Assign Uladzislau Kalesnikau as a reviewer to the pull request
6464
8. Attach the issue to the pull request
6565
9. Wait on the approval (thanks in advance)

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ some of the communication chanels:
199199
* [For Mainframe GitHub (create or review issues)](https://github.com/for-mainframe/For-Mainframe/issues)
200200
* [Zowe Explorer IntelliJ GitHub (create or review issues)](https://github.com/zowe/zowe-explorer-intellij/issues)
201201
* Email to: <a href="mailto:[email protected]">Uladzislau Kalesnikau (Team Lead of the IJMP)</a>
202-
* Email to: <a href="mailto:[email protected]">Valiantsin Krus (Tech Lead of the IJMP)</a>
203202

204203
**Note: GitHub issue is the preferred way of communicating in case of creating some bug/feature/request for enhancement.
205204
If you need direct consulting or you have any related questions, please, reach us out using Slack channels or E-mail**

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xss1M
1414
platformVersion = 2022.1
1515

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

src/main/kotlin/eu/ibagroup/formainframe/config/connect/connectUtils.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import eu.ibagroup.formainframe.ui.build.tso.config.TSOConfigWrapper
2121
import eu.ibagroup.formainframe.ui.build.tso.ui.TSOSessionParams
2222
import org.zowe.kotlinsdk.TsoData
2323

24-
const val USER_OR_OWNER_SYMBOLS_MAX_SIZE: Int = 7
24+
const val USER_OR_OWNER_SYMBOLS_MAX_SIZE: Int = 8
2525

2626
/**
2727
* Sends TSO request "oshell whoami", with which it receives the name of the real user (owner) of the system.

src/main/kotlin/eu/ibagroup/formainframe/config/ws/ui/AbstractWsDialog.kt

+5-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import com.intellij.openapi.ui.DialogWrapper
1414
import com.intellij.openapi.ui.ValidationInfo
1515
import com.intellij.ui.CollectionComboBoxModel
1616
import com.intellij.ui.SimpleListCellRenderer
17+
import com.intellij.ui.dsl.builder.RowLayout
1718
import com.intellij.ui.dsl.builder.bindItem
1819
import com.intellij.ui.dsl.builder.bindText
1920
import com.intellij.ui.dsl.builder.panel
@@ -102,7 +103,7 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
102103
private val panel by lazy {
103104
panel {
104105
row {
105-
label(wsNameLabel)
106+
label("$wsNameLabel: ")
106107
textField()
107108
.bindText(state::workingSetName)
108109
.validationOnApply {
@@ -114,9 +115,9 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
114115
)
115116
}
116117
.focused()
117-
}
118+
}.layout(RowLayout.LABEL_ALIGNED)
118119
row {
119-
label("Specify connection")
120+
label("z/OSMF Connection: ")
120121
comboBox(connectionComboBoxModel, SimpleListCellRenderer.create("") { it?.name })
121122
.bindItem(
122123
{
@@ -142,7 +143,7 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
142143
null
143144
}
144145
}
145-
}
146+
}.layout(RowLayout.LABEL_ALIGNED)
146147
group(tableTitle, false) {
147148
row {
148149
tableWithToolbar(masksTable, addDefaultActions = true) {

src/main/kotlin/eu/ibagroup/formainframe/dataops/attributes/MFRemoteAttributesServiceBase.kt

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ package eu.ibagroup.formainframe.dataops.attributes
1313
import com.intellij.openapi.util.io.FileAttributes
1414
import eu.ibagroup.formainframe.config.connect.ConnectionConfigBase
1515
import eu.ibagroup.formainframe.dataops.DataOpsManager
16-
import eu.ibagroup.formainframe.utils.runWriteActionInEdtAndWait
1716
import eu.ibagroup.formainframe.utils.sendTopic
1817
import eu.ibagroup.formainframe.vfs.MFVirtualFile
1918
import eu.ibagroup.formainframe.vfs.MFVirtualFileSystem
@@ -35,7 +34,7 @@ private fun String.trimUrl(): String {
3534
* Base abstract service class to handle attributes on virtual file
3635
* @param dataOpsManager data ops manager to get component manager
3736
*/
38-
abstract class MFRemoteAttributesServiceBase<Connection: ConnectionConfigBase, Attributes : MFRemoteFileAttributes<Connection, *>>(
37+
abstract class MFRemoteAttributesServiceBase<Connection : ConnectionConfigBase, Attributes : MFRemoteFileAttributes<Connection, *>>(
3938
val dataOpsManager: DataOpsManager
4039
) : AttributesService<Attributes, MFVirtualFile> {
4140

@@ -98,9 +97,7 @@ abstract class MFRemoteAttributesServiceBase<Connection: ConnectionConfigBase, A
9897
*/
9998
private fun reassignAttributesToFile(file: MFVirtualFile, oldAttributes: Attributes, newAttributes: Attributes) {
10099
obtainAndRenameUrlDirIfNeeded(newAttributes)
101-
runWriteActionInEdtAndWait {
102-
reassignAttributesAfterUrlFolderRenaming(file, oldAttributes, newAttributes)
103-
}
100+
reassignAttributesAfterUrlFolderRenaming(file, oldAttributes, newAttributes)
104101
}
105102

106103
protected abstract fun buildUniqueAttributes(attributes: Attributes): Attributes

src/main/kotlin/eu/ibagroup/formainframe/dataops/content/synchronizer/DocumentedSyncProvider.kt

+10
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,16 @@ class DocumentedSyncProvider(
6464

6565
/** Default sync success handler. Won't do anything after the sync action is completed until redefined */
6666
val defaultOnSyncSuccessHandler: () -> Unit = {}
67+
68+
/**
69+
* Static function is used to determine if Document exists for the Virtual File provided
70+
* @param file - virtual file to check
71+
* @return Document instance or null is no document exists for the given file
72+
*/
73+
fun findDocumentForFile(file: VirtualFile): Document? {
74+
return FileDocumentManager.getInstance().getDocument(file)
75+
}
76+
6777
}
6878

6979
/**

src/main/kotlin/eu/ibagroup/formainframe/dataops/content/synchronizer/RemoteAttributedContentSynchronizer.kt

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import com.intellij.openapi.progress.ProgressIndicator
1717
import com.intellij.openapi.vfs.VirtualFile
1818
import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent
1919
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
20+
import com.intellij.openapi.vfs.newvfs.events.VFilePropertyChangeEvent
2021
import eu.ibagroup.formainframe.dataops.DataOpsManager
2122
import eu.ibagroup.formainframe.dataops.attributes.FileAttributes
2223
import eu.ibagroup.formainframe.dataops.attributes.RemoteUssAttributes
@@ -60,6 +61,14 @@ abstract class RemoteAttributedContentSynchronizer<FAttributes : FileAttributes>
6061
events.filterIsInstance<VFileDeleteEvent>().forEach { event ->
6162
fetchedAtLeastOnce.removeIf { it.file == event.file }
6263
}
64+
65+
events.filterIsInstance<VFilePropertyChangeEvent>().forEach { event ->
66+
if (event.propertyName == VirtualFile.PROP_WRITABLE && !event.file.isDirectory) {
67+
event.newValue.castOrNull<Boolean>()?.let {
68+
DocumentedSyncProvider.findDocumentForFile(event.file)?.setReadOnly(!it)
69+
}
70+
}
71+
}
6372
}
6473
}
6574
)

src/main/kotlin/eu/ibagroup/formainframe/dataops/fetch/JobFetchProvider.kt

+4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ class JobFetchProvider(dataOpsManager: DataOpsManager) :
7070
val response = if (query.request.jobId.isNotEmpty()) {
7171
api<JESApi>(query.connectionConfig).getFilteredJobs(
7272
basicCredentials = query.connectionConfig.authToken,
73+
// "owner=*" and "prefix=*" are needed to get the job by job ID.
74+
// If we do not provide the values, the default ones will be used (the current user as owner)
75+
owner = "*",
76+
prefix = "*",
7377
jobId = query.request.jobId,
7478
execData = ExecData.YES
7579
).cancelByIndicator(progressIndicator).execute()

src/main/kotlin/eu/ibagroup/formainframe/dataops/fetch/RemoteFileFetchProviderBase.kt

+4-2
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,10 @@ abstract class RemoteFileFetchProviderBase<Connection : ConnectionConfigBase, Re
110110
progressIndicator: ProgressIndicator
111111
): List<File> {
112112
val fetched = fetchResponse(query, progressIndicator)
113-
return fetched.mapNotNull {
114-
convertResponseToFile(it)
113+
return runWriteActionInEdtAndWait {
114+
fetched.mapNotNull {
115+
convertResponseToFile(it)
116+
}
115117
}
116118
}
117119

src/main/kotlin/eu/ibagroup/formainframe/dataops/operations/RenameOperationRunner.kt

+7-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
6868
) {
6969
when (val attributes = operation.attributes) {
7070
is RemoteDatasetAttributes -> {
71-
attributes.requesters.map {
71+
attributes.requesters.forEach {
7272
try {
7373
progressIndicator.checkCanceled()
7474
val response = api<DataAPI>(it.connectionConfig).renameDataset(
@@ -84,6 +84,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
8484
runWriteActionInEdtAndWait {
8585
operation.file.rename(this, operation.newName)
8686
}
87+
return
8788
} else {
8889
throw CallException(response, "Unable to rename the selected dataset")
8990
}
@@ -98,7 +99,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
9899
}
99100
is RemoteMemberAttributes -> {
100101
val parentAttributes = dataOpsManager.tryToGetAttributes(attributes.parentFile) as RemoteDatasetAttributes
101-
parentAttributes.requesters.map {
102+
parentAttributes.requesters.forEach {
102103
try {
103104
progressIndicator.checkCanceled()
104105
log.info("Checking for duplicate names in dataset ${parentAttributes.datasetInfo.name}")
@@ -117,7 +118,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
117118
).cancelByIndicator(progressIndicator).execute()
118119
if (!response.isSuccessful) {
119120
throw CallException(response, "Unable to duplicate the selected member")
120-
}
121+
} else return
121122
} else {
122123
val response = api<DataAPI>(it.connectionConfig).renameDatasetMember(
123124
authorizationToken = it.connectionConfig.authToken,
@@ -134,6 +135,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
134135
runWriteActionInEdtAndWait {
135136
operation.file.rename(this, operation.newName)
136137
}
138+
return
137139
} else {
138140
throw CallException(response, "Unable to rename the selected member")
139141
}
@@ -149,7 +151,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
149151
}
150152
is RemoteUssAttributes -> {
151153
val parentDirPath = attributes.parentDirPath
152-
attributes.requesters.map {
154+
attributes.requesters.forEach {
153155
try {
154156
progressIndicator.checkCanceled()
155157
val response = api<DataAPI>(it.connectionConfig).moveUssFile(
@@ -163,6 +165,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
163165
runWriteActionInEdtAndWait {
164166
operation.file.rename(this, operation.newName)
165167
}
168+
return
166169
} else {
167170
throw CallException(response, "Unable to rename the selected file or directory")
168171
}

0 commit comments

Comments
 (0)