Skip to content

Commit

Permalink
Merge branch 'private-release/v1.2.3-221' into public-release/v1.2.3-221
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Oct 2, 2024
2 parents 386de29 + 5e4aeaf commit 2d0964b
Show file tree
Hide file tree
Showing 19 changed files with 335 additions and 49 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.gradle
.idea
.intellijPlatform
/build
/ide_for_launch

Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

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

## [Unreleased]

### Features

* Feature: Correct alignment for fields in working set dialog ([745143cc](https://github.com/zowe/zowe-explorer-intellij/commit/745143cc))

### Bufixes

* Bugfix: Fixed unexpected freezes of IDE during work with USS part ([38f1f5b3](https://github.com/zowe/zowe-explorer-intellij/commit/38f1f5b3))
* Bugfix: Fixed error that was caused by members renaming ([238ebc08](https://github.com/zowe/zowe-explorer-intellij/commit/238ebc08))
* Bugfix: Fixed missed automatic translation to uppercase ([1b48de61](https://github.com/zowe/zowe-explorer-intellij/commit/1b48de61))
* Bugfix: Fixed synchronization errors ([f96d9302](https://github.com/zowe/zowe-explorer-intellij/commit/f96d9302))
* Bugfix: Fixed permissions change in opened file ([b04ed99e](https://github.com/zowe/zowe-explorer-intellij/commit/b04ed99e))
* Bugfix: Fixed copy-paste folder to another folder with name conflicts ([13d7d773](https://github.com/zowe/zowe-explorer-intellij/commit/13d7d773))
* Bugfix: Validation changes for LRECL field ([14e384a4](https://github.com/zowe/zowe-explorer-intellij/commit/14e384a4))
* 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))

## [1.2.2-221] (2024-08-21)

### Features
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ Consider some new feature for the plugin. The first that you need is to create a
- In case of bug - make a reproduction scheme or short description on how to achieve this;
- 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;
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***
7. Assign Uladzislau Kalesnikau and Valiantsin Krus as reviewers to the pull request
7. Assign Uladzislau Kalesnikau as a reviewer to the pull request
8. Attach the issue to the pull request
9. Wait on the approval (thanks in advance)
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ some of the communication chanels:
* [For Mainframe GitHub (create or review issues)](https://github.com/for-mainframe/For-Mainframe/issues)
* [Zowe Explorer IntelliJ GitHub (create or review issues)](https://github.com/zowe/zowe-explorer-intellij/issues)
* Email to: <a href="mailto:[email protected]">Uladzislau Kalesnikau (Team Lead of the IJMP)</a>
* Email to: <a href="mailto:[email protected]">Valiantsin Krus (Tech Lead of the IJMP)</a>

**Note: GitHub issue is the preferred way of communicating in case of creating some bug/feature/request for enhancement.
If you need direct consulting or you have any related questions, please, reach us out using Slack channels or E-mail**
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ org.gradle.jvmargs=-Xss1M
platformVersion = 2022.1

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import eu.ibagroup.formainframe.ui.build.tso.config.TSOConfigWrapper
import eu.ibagroup.formainframe.ui.build.tso.ui.TSOSessionParams
import org.zowe.kotlinsdk.TsoData

const val USER_OR_OWNER_SYMBOLS_MAX_SIZE: Int = 7
const val USER_OR_OWNER_SYMBOLS_MAX_SIZE: Int = 8

/**
* Sends TSO request "oshell whoami", with which it receives the name of the real user (owner) of the system.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import com.intellij.openapi.ui.DialogWrapper
import com.intellij.openapi.ui.ValidationInfo
import com.intellij.ui.CollectionComboBoxModel
import com.intellij.ui.SimpleListCellRenderer
import com.intellij.ui.dsl.builder.RowLayout
import com.intellij.ui.dsl.builder.bindItem
import com.intellij.ui.dsl.builder.bindText
import com.intellij.ui.dsl.builder.panel
Expand Down Expand Up @@ -102,7 +103,7 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
private val panel by lazy {
panel {
row {
label(wsNameLabel)
label("$wsNameLabel: ")
textField()
.bindText(state::workingSetName)
.validationOnApply {
Expand All @@ -114,9 +115,9 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
)
}
.focused()
}
}.layout(RowLayout.LABEL_ALIGNED)
row {
label("Specify connection")
label("z/OSMF Connection: ")
comboBox(connectionComboBoxModel, SimpleListCellRenderer.create("") { it?.name })
.bindItem(
{
Expand All @@ -142,7 +143,7 @@ abstract class AbstractWsDialog<Connection : ConnectionConfigBase, WSConfig : Wo
null
}
}
}
}.layout(RowLayout.LABEL_ALIGNED)
group(tableTitle, false) {
row {
tableWithToolbar(masksTable, addDefaultActions = true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ package eu.ibagroup.formainframe.dataops.attributes
import com.intellij.openapi.util.io.FileAttributes
import eu.ibagroup.formainframe.config.connect.ConnectionConfigBase
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.utils.runWriteActionInEdtAndWait
import eu.ibagroup.formainframe.utils.sendTopic
import eu.ibagroup.formainframe.vfs.MFVirtualFile
import eu.ibagroup.formainframe.vfs.MFVirtualFileSystem
Expand All @@ -35,7 +34,7 @@ private fun String.trimUrl(): String {
* Base abstract service class to handle attributes on virtual file
* @param dataOpsManager data ops manager to get component manager
*/
abstract class MFRemoteAttributesServiceBase<Connection: ConnectionConfigBase, Attributes : MFRemoteFileAttributes<Connection, *>>(
abstract class MFRemoteAttributesServiceBase<Connection : ConnectionConfigBase, Attributes : MFRemoteFileAttributes<Connection, *>>(
val dataOpsManager: DataOpsManager
) : AttributesService<Attributes, MFVirtualFile> {

Expand Down Expand Up @@ -98,9 +97,7 @@ abstract class MFRemoteAttributesServiceBase<Connection: ConnectionConfigBase, A
*/
private fun reassignAttributesToFile(file: MFVirtualFile, oldAttributes: Attributes, newAttributes: Attributes) {
obtainAndRenameUrlDirIfNeeded(newAttributes)
runWriteActionInEdtAndWait {
reassignAttributesAfterUrlFolderRenaming(file, oldAttributes, newAttributes)
}
reassignAttributesAfterUrlFolderRenaming(file, oldAttributes, newAttributes)
}

protected abstract fun buildUniqueAttributes(attributes: Attributes): Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,16 @@ class DocumentedSyncProvider(

/** Default sync success handler. Won't do anything after the sync action is completed until redefined */
val defaultOnSyncSuccessHandler: () -> Unit = {}

/**
* Static function is used to determine if Document exists for the Virtual File provided
* @param file - virtual file to check
* @return Document instance or null is no document exists for the given file
*/
fun findDocumentForFile(file: VirtualFile): Document? {
return FileDocumentManager.getInstance().getDocument(file)
}

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import com.intellij.openapi.progress.ProgressIndicator
import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.newvfs.events.VFileDeleteEvent
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
import com.intellij.openapi.vfs.newvfs.events.VFilePropertyChangeEvent
import eu.ibagroup.formainframe.dataops.DataOpsManager
import eu.ibagroup.formainframe.dataops.attributes.FileAttributes
import eu.ibagroup.formainframe.dataops.attributes.RemoteUssAttributes
Expand Down Expand Up @@ -60,6 +61,14 @@ abstract class RemoteAttributedContentSynchronizer<FAttributes : FileAttributes>
events.filterIsInstance<VFileDeleteEvent>().forEach { event ->
fetchedAtLeastOnce.removeIf { it.file == event.file }
}

events.filterIsInstance<VFilePropertyChangeEvent>().forEach { event ->
if (event.propertyName == VirtualFile.PROP_WRITABLE && !event.file.isDirectory) {
event.newValue.castOrNull<Boolean>()?.let {
DocumentedSyncProvider.findDocumentForFile(event.file)?.setReadOnly(!it)
}
}
}
}
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ class JobFetchProvider(dataOpsManager: DataOpsManager) :
val response = if (query.request.jobId.isNotEmpty()) {
api<JESApi>(query.connectionConfig).getFilteredJobs(
basicCredentials = query.connectionConfig.authToken,
// "owner=*" and "prefix=*" are needed to get the job by job ID.
// If we do not provide the values, the default ones will be used (the current user as owner)
owner = "*",
prefix = "*",
jobId = query.request.jobId,
execData = ExecData.YES
).cancelByIndicator(progressIndicator).execute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ abstract class RemoteFileFetchProviderBase<Connection : ConnectionConfigBase, Re
progressIndicator: ProgressIndicator
): List<File> {
val fetched = fetchResponse(query, progressIndicator)
return fetched.mapNotNull {
convertResponseToFile(it)
return runWriteActionInEdtAndWait {
fetched.mapNotNull {
convertResponseToFile(it)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
) {
when (val attributes = operation.attributes) {
is RemoteDatasetAttributes -> {
attributes.requesters.map {
attributes.requesters.forEach {
try {
progressIndicator.checkCanceled()
val response = api<DataAPI>(it.connectionConfig).renameDataset(
Expand All @@ -84,6 +84,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
runWriteActionInEdtAndWait {
operation.file.rename(this, operation.newName)
}
return
} else {
throw CallException(response, "Unable to rename the selected dataset")
}
Expand All @@ -98,7 +99,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
}
is RemoteMemberAttributes -> {
val parentAttributes = dataOpsManager.tryToGetAttributes(attributes.parentFile) as RemoteDatasetAttributes
parentAttributes.requesters.map {
parentAttributes.requesters.forEach {
try {
progressIndicator.checkCanceled()
log.info("Checking for duplicate names in dataset ${parentAttributes.datasetInfo.name}")
Expand All @@ -117,7 +118,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
).cancelByIndicator(progressIndicator).execute()
if (!response.isSuccessful) {
throw CallException(response, "Unable to duplicate the selected member")
}
} else return
} else {
val response = api<DataAPI>(it.connectionConfig).renameDatasetMember(
authorizationToken = it.connectionConfig.authToken,
Expand All @@ -134,6 +135,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
runWriteActionInEdtAndWait {
operation.file.rename(this, operation.newName)
}
return
} else {
throw CallException(response, "Unable to rename the selected member")
}
Expand All @@ -149,7 +151,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
}
is RemoteUssAttributes -> {
val parentDirPath = attributes.parentDirPath
attributes.requesters.map {
attributes.requesters.forEach {
try {
progressIndicator.checkCanceled()
val response = api<DataAPI>(it.connectionConfig).moveUssFile(
Expand All @@ -163,6 +165,7 @@ class RenameOperationRunner(private val dataOpsManager: DataOpsManager) : Operat
runWriteActionInEdtAndWait {
operation.file.rename(this, operation.newName)
}
return
} else {
throw CallException(response, "Unable to rename the selected file or directory")
}
Expand Down
Loading

0 comments on commit 2d0964b

Please sign in to comment.