Skip to content

Commit

Permalink
Merge branch 'private-main' into public-main
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
  • Loading branch information
KUGDev committed Jul 11, 2024
2 parents bdf5ab4 + 25bbe69 commit daf23a6
Show file tree
Hide file tree
Showing 68 changed files with 1,625 additions and 1,174 deletions.
10 changes: 8 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
build-job:
stage: build
image: openjdk:17
parallel:
matrix:
- PRODUCT_NAME: "IC-231"
- PRODUCT_NAME: "IC-233"
script:
- |
echo "Build is going to proceed with the next Java:"
Expand All @@ -23,8 +27,10 @@ build-job:
test-job:
stage: test
image: openjdk:17
dependencies:
- build-job
parallel:
matrix:
- PRODUCT_NAME: "IC-231"
- PRODUCT_NAME: "IC-233"
script:
- |
echo "Test is going to proceed with the next Java:"
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,23 @@ All notable changes to the Zowe IntelliJ Plugin will be documented in this file.

## [1.1.2-231] (2024-01-22)

### Bugfixes
### Features

* Feature: GitHub issue #165: IntelliJ 2023.3 support ([81f24fa3](https://github.com/zowe/zowe-explorer-intellij/commit/81f24fa3))

### Bugfixes

* Bugfix: Sync action does not work after file download ([bfb125d7](https://github.com/zowe/zowe-explorer-intellij/commit/bfb125d7))
* Bugifx: "Skip This Files" doesn't work when uploading local file to PDS ([749b2d4b](https://github.com/zowe/zowe-explorer-intellij/commit/749b2d4b))
* Bugifx: "Use new name" doesn't work for copying partitioned dataset to USS folder ([26d865be](https://github.com/zowe/zowe-explorer-intellij/commit/26d865be))
* Bugifx: "Use new name" doesn't work for copying sequential dataset to partitioned dataset ([349c02e9](https://github.com/zowe/zowe-explorer-intellij/commit/349c02e9))
* Bugfix: "Use new name" doesn't work when uploading local file to PDS ([26d865be](https://github.com/zowe/zowe-explorer-intellij/commit/26d865be))
* Bugfix: Editing two members with the same name does not update the content for one of the members ([25606368](https://github.com/zowe/zowe-explorer-intellij/commit/25606368))
* Bugfix: Topics handling ([25606368](https://github.com/zowe/zowe-explorer-intellij/commit/25606368))
* Bugfix: Zowe config v2 handling ([fd79b908](https://github.com/zowe/zowe-explorer-intellij/commit/fd79b908))
* Bugfix: JES Explorer bug when ABEND job is being displayed ([614aa6cf](https://github.com/zowe/zowe-explorer-intellij/commit/614aa6cf))
* Bugfix: GitHub issue #167: Zowe explorer config is not converted ([b5eae7a2](https://github.com/zowe/zowe-explorer-intellij/commit/b5eae7a2))

## [1.1.1-231] (2023-11-23)

### Bugfixes
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,16 @@ Firstly, you need to download it. Then, go to "Edit Configurations..." -> "Edit
In there, you need to enable VM options and add the following lines:

```
-Didea.force.use.core.classloader=true
-Didea.force.use.core.classloader=true
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.nio.file=ALL-UNNAMED
--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED
--add-opens=java.desktop/java.awt=ALL-UNNAMED
--add-opens=java.desktop/sun.awt=ALL-UNNAMED
--add-opens=java.desktop/java.awt.event=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-exports=java.base/jdk.internal.vm=ALL-UNNAMED
--add-opens=java.desktop/javax.swing=ALL-UNNAMED
--add-opens=java.desktop/javax.swing.plaf.basic=ALL-UNNAMED
--add-opens=java.desktop/sun.awt=ALL-UNNAMED
--add-opens=java.desktop/sun.font=ALL-UNNAMED
```

After the "Kotest" is set up, just click on the green arrow near the test you want to run.
Expand Down
61 changes: 50 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,37 @@ dependencies {
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitVersion")
}

data class PluginDescriptor(
val since: String, // earliest version string this is compatible with
val until: String, // latest version string this is compatible with, can be wildcard like 202.*
// https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
val sdkVersion: String, // the version string passed to the intellij sdk gradle plugin
val sourceFolder: String, // used as the source root for specifics of this build
val deps: List<String> // dependent plugins of this plugin
)

val plugins = listOf(
PluginDescriptor(
since = properties("pluginSinceBuild").get(),
until = "232.*",
sdkVersion = "IC-2023.1",
sourceFolder = "IC-231",
deps = listOf("java", "org.jetbrains.plugins.gradle", "org.jetbrains.kotlin")
),
PluginDescriptor(
since = "233.11799",
until = properties("pluginUntilBuild").get(),
sdkVersion = "IC-2023.3",
sourceFolder = "IC-233",
deps = listOf("java", "org.jetbrains.plugins.gradle", "org.jetbrains.kotlin")
)
)
val productName = System.getenv("PRODUCT_NAME") ?: "IC-231"
val descriptor = plugins.first { it.sourceFolder == productName }

intellij {
version.set(properties("platformVersion").get())
version.set(descriptor.sdkVersion)
plugins.addAll(*descriptor.deps.toTypedArray())
// !Development only!
// downloadSources.set(true)
// In Settings | Advanced Settings enable option Download sources in section Build Tools. Gradle.
Expand Down Expand Up @@ -143,14 +172,10 @@ tasks {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

withType<ClasspathIndexCleanupTask> {
dependsOn(compileTestKotlin)
}

patchPluginXml {
version.set(properties("pluginVersion").get())
sinceBuild.set(properties("pluginSinceBuild").get())
untilBuild.set(properties("pluginUntilBuild").get())
version.set("${properties("pluginVersion").get()}-${descriptor.since.substringBefore(".")}")
sinceBuild.set(descriptor.since)
untilBuild.set(descriptor.until)

val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
Expand All @@ -170,6 +195,12 @@ tasks {
)
}

withType<Test> {
withType<ClasspathIndexCleanupTask> {
dependsOn(compileTestKotlin)
}
}

test {
useJUnitPlatform()
testLogging {
Expand Down Expand Up @@ -215,6 +246,7 @@ tasks {

buildPlugin {
dependsOn(createOpenApiSourceJar)
archiveClassifier.set(descriptor.sdkVersion)
from(createOpenApiSourceJar) { into("lib/src") }
}

Expand All @@ -234,12 +266,11 @@ tasks {
.map {
listOf(
it.substringAfter('-', "")
.substringAfter('-', "")
.substringBefore('.')
.ifEmpty { "stable" }
)
}
.map { it })
.map { it }
)
}

downloadRobotServerPlugin {
Expand All @@ -256,6 +287,14 @@ tasks {
* Adds uiTest source sets
*/
sourceSets {
main {
java {
srcDir("src/${descriptor.sourceFolder}/kotlin")
}
resources {
srcDir("src/${descriptor.sourceFolder}/resources")
}
}
create("uiTest") {
compileClasspath += sourceSets.main.get().output
runtimeClasspath += sourceSets.main.get().output
Expand Down
9 changes: 3 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
# Copyright IBA Group 2020
#

org.gradle.jvmargs=-Xss1M

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformVersion = 2023.1
org.gradle.jvmargs = -Xss1M

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

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 231.8109
pluginUntilBuild = 233.*
pluginUntilBuild = 242.*

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.7
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/*
* Copyright (c) 2020 IBA Group.
*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* IBA Group
* Zowe Community
*/

package eu.ibagroup.formainframe.vfs

import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileSystem
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
import eu.ibagroup.formainframe.vfs.MFVirtualFileSystem.Companion.MF_VFS_CHANGES_TOPIC

/**
* MF virtual file property change event. Carries info about a property of a MF virtual file being changed.
* Use it together with [MF_VFS_CHANGES_TOPIC]
* @property requestor an instance to describe the event requester
* @property file the MF virtual file to change property of
* @property propName the name of the property to change
* @property oldValue the old value of the property being changed
* @property newValue the possible new value of the property being changed
* @property delegate the delegate to execute the necessary functions
*/
class MFVFilePropertyChangeEvent(
requestor: Any?,
private val file: MFVirtualFile,
private val propName: MFVirtualFile.PropName,
private val oldValue: Any,
private val newValue: Any,
private val delegate: MFVFilePropertyChangeEventDelegate
) : VFileEvent(requestor, false) {

init {
delegate.checkPropValid(requestor, propName, oldValue, newValue)
}

override fun equals(other: Any?): Boolean {
var otherFile: MFVirtualFile? = null
var otherPropName: MFVirtualFile.PropName? = null
var otherOldValue: Any? = null
var otherNewValue: Any? = null
if (other is MFVFilePropertyChangeEvent) {
otherFile = other.file
otherPropName = other.propName
otherOldValue = other.oldValue
otherNewValue = other.newValue
}
return delegate.equals(
this, file, propName, oldValue, newValue, other, otherFile, otherPropName, otherOldValue, otherNewValue
)
}

override fun hashCode(): Int {
return delegate.hashCode(propName, oldValue, newValue, file)
}

override fun computePath(): String {
return delegate.computePath(file)
}

override fun getFile(): VirtualFile {
return delegate.getFile(file)
}

override fun getFileSystem(): VirtualFileSystem {
return delegate.getFileSystem(file)
}

override fun isValid(): Boolean {
return delegate.isValid(file)
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
/*
* This program and the accompanying materials are made available under the terms of the
* Eclipse Public License v2.0 which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v20.html
*
* SPDX-License-Identifier: EPL-2.0
*
* Copyright IBA Group 2020
*/

package eu.ibagroup.formainframe.vfs

import com.intellij.openapi.vfs.VirtualFile
import com.intellij.openapi.vfs.VirtualFileSystem
import com.intellij.openapi.vfs.newvfs.events.VFileEvent
import eu.ibagroup.formainframe.vfs.MFVirtualFileSystem.Companion.MF_VFS_CHANGES_TOPIC

/**
* MF virtual file property change event. Carries info about a property of a MF virtual file being changed.
* Use it together with [MF_VFS_CHANGES_TOPIC]
* @property requestor an instance to describe the event requester
* @property file the MF virtual file to change property of
* @property propName the name of the property to change
* @property oldValue the old value of the property being changed
* @property newValue the possible new value of the property being changed
* @property delegate the delegate to execute the necessary functions
*/
class MFVFilePropertyChangeEvent(
requestor: Any?,
private val file: MFVirtualFile,
private val propName: MFVirtualFile.PropName,
private val oldValue: Any,
private val newValue: Any,
private val delegate: MFVFilePropertyChangeEventDelegate
) : VFileEvent(requestor) {

init {
delegate.checkPropValid(requestor, propName, oldValue, newValue)
}

override fun equals(other: Any?): Boolean {
var otherFile: MFVirtualFile? = null
var otherPropName: MFVirtualFile.PropName? = null
var otherOldValue: Any? = null
var otherNewValue: Any? = null
if (other is MFVFilePropertyChangeEvent) {
otherFile = other.file
otherPropName = other.propName
otherOldValue = other.oldValue
otherNewValue = other.newValue
}
return delegate.equals(
this, file, propName, oldValue, newValue, other, otherFile, otherPropName, otherOldValue, otherNewValue
)
}

override fun hashCode(): Int {
return delegate.hashCode(propName, oldValue, newValue, file)
}

override fun computePath(): String {
return delegate.computePath(file)
}

override fun getFile(): VirtualFile {
return delegate.getFile(file)
}

override fun getFileSystem(): VirtualFileSystem {
return delegate.getFileSystem(file)
}

override fun isValid(): Boolean {
return delegate.isValid(file)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ fun sendConfigServiceTopic(): EventHandler = sendTopic(CONFIGS_CHANGED)
@JvmField
val CONFIGS_CHANGED = Topic.create("configsChanged", EventHandler::class.java)

@JvmField
val CONFIGS_LOADED = Topic.create("configsLoaded", Runnable::class.java)

/** Interface to represent the config service */
interface ConfigService : PersistentStateComponent<ConfigStateV2> {

Expand Down Expand Up @@ -89,11 +86,6 @@ interface ConfigService : PersistentStateComponent<ConfigStateV2> {
*/
fun getRegisteredConfigDeclarations(): List<ConfigDeclaration<*>>

/** Inserts all configs from old state in a new one if they were not migrated before. */
fun migrateOldConfigState(state: ConfigState)

/** Update the contents of the old config if the config structure has not been changed. */
fun updateOldConfigs()
}

val configCrudable: Crudable
Expand Down
Loading

0 comments on commit daf23a6

Please sign in to comment.