diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aac14ce..7d71654 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,10 @@ on: # Trigger the workflow on any pull request pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: # Run Gradle Wrapper Validation Action to verify the wrapper's checksum @@ -30,24 +34,24 @@ jobs: runs-on: ubuntu-latest outputs: version: ${{ steps.properties.outputs.version }} - filename: ${{ steps.artifact.outputs.filename }} changelog: ${{ steps.properties.outputs.changelog }} + pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }} steps: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v4.2.0 # Validate wrapper - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1.0.4 + uses: gradle/actions/wrapper-validation@v3 - # Setup Java 17 environment for the next steps + # Setup Java 21 environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu - java-version: 17 + java-version: 21 cache: gradle # Set environment variables @@ -59,16 +63,13 @@ jobs: VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" NAME="$(echo "$PROPERTIES" | grep "^pluginName:" | cut -f2- -d ' ')" CHANGELOG="$(./gradlew getChangelog --unreleased --no-header --console=plain -q)" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" echo "::set-output name=version::$VERSION" echo "::set-output name=name::$NAME" echo "::set-output name=changelog::$CHANGELOG" echo "::set-output name=pluginVerifierHomeDir::~/.pluginVerifier" - ./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier + ./gradlew printProductsReleases # prepare list of IDEs for Plugin Verifier # Run tests - name: Run Tests @@ -77,7 +78,7 @@ jobs: # Collect Tests Result of failed tests - name: Collect Tests Result if: ${{ failure() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.4.0 with: name: tests-result path: ${{ github.workspace }}/build/reports/tests @@ -98,12 +99,12 @@ jobs: # Run Verify Plugin task and IntelliJ Plugin Verifier tool - name: Run Plugin Verification tasks - run: ./gradlew runPluginVerifier -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} + run: ./gradlew verifyPlugin -Pplugin.verifier.home.dir=${{ steps.properties.outputs.pluginVerifierHomeDir }} # Collect Plugin Verifier Result - name: Collect Plugin Verifier Result if: ${{ always() }} - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4.4.0 with: name: pluginVerifier-result path: ${{ github.workspace }}/build/reports/pluginVerifier @@ -129,7 +130,7 @@ jobs: # Store already-built plugin as an artifact for downloading - name: Upload artifact - uses: actions/upload-artifact@v2.2.4 + uses: actions/upload-artifact@v4.4.0 with: name: ${{ steps.artifact.outputs.filename }}.zip path: ./build/distributions/ @@ -157,7 +158,7 @@ jobs: | xargs -I '{}' gh api -X DELETE repos/{owner}/{repo}/releases/{} - name: Download build-output artifact - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: name: ${{ needs.build.outputs.filename }}.zip path: ${{ github.workspace }}/build/distributions/ diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0301b1c..660a5c6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,15 +12,18 @@ jobs: release: name: Publish Plugin runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write steps: # Check out current repository - name: Fetch Sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v4 with: ref: ${{ github.event.release.tag_name }} - # Setup Java 11 environment for the next steps + # Setup Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: @@ -28,6 +31,10 @@ jobs: java-version: 17 cache: gradle + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + # Set environment variables - name: Export Properties id: properties @@ -38,11 +45,9 @@ jobs: EOM )" - CHANGELOG="${CHANGELOG//'%'/'%25'}" - CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" - CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" - - echo "::set-output name=changelog::$CHANGELOG" + echo "changelog<> $GITHUB_OUTPUT + echo "$CHANGELOG" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT # Update Unreleased section with the current release note - name: Patch Changelog @@ -56,17 +61,26 @@ jobs: - name: Publish Plugin env: PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} + CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} run: ./gradlew publishPlugin + # Upload artifact as a release asset + - name: Upload Release Asset + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/* + # Create pull request - name: Create Pull Request if: ${{ steps.properties.outputs.changelog != '' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - ./gradlew incrementVersion VERSION="${{ github.event.release.tag_name }}" BRANCH="changelog-update-$VERSION" + LABEL="release changelog" git config user.email "action@github.com" git config user.name "GitHub Action" @@ -74,6 +88,11 @@ jobs: git checkout -b $BRANCH git commit -am "Changelog update - $VERSION" git push --set-upstream origin $BRANCH + + gh label create "$LABEL" \ + --description "Pull requests with release changelog update" \ + --force \ + || true gh pr create \ --title "Changelog update - \`$VERSION\`" \ diff --git a/.github/workflows/run-ui-tests.yml b/.github/workflows/run-ui-tests.yml index 06b54c0..c15022d 100644 --- a/.github/workflows/run-ui-tests.yml +++ b/.github/workflows/run-ui-tests.yml @@ -1,9 +1,9 @@ # GitHub Actions Workflow for launching UI tests on Linux, Windows, and Mac in the following steps: -# - prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with UI -# - wait for IDE to start -# - run UI tests with separate Gradle task +# - Prepare and launch IDE with your plugin and robot-server plugin, which is needed to interact with the UI. +# - Wait for IDE to start. +# - Run UI tests with a separate Gradle task. # -# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform +# Please check https://github.com/JetBrains/intellij-ui-test-robot for information about UI tests with IntelliJ Platform. # # Workflow is triggered manually. @@ -31,17 +31,20 @@ jobs: steps: - # Check out current repository + # Check out the current repository - name: Fetch Sources - uses: actions/checkout@v2.4.0 + uses: actions/checkout@v4 - # Setup Java 17 environment for the next steps + # Set up Java environment for the next steps - name: Setup Java uses: actions/setup-java@v4 with: distribution: zulu java-version: 17 - cache: gradle + + # Setup Gradle + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 # Run IDEA prepared for UI testing - name: Run IDE @@ -49,7 +52,7 @@ jobs: # Wait for IDEA to be started - name: Health Check - uses: jtalk/url-health-check-action@v2 + uses: jtalk/url-health-check-action@v4 with: url: http://127.0.0.1:8082 max-attempts: 15 @@ -57,4 +60,4 @@ jobs: # Run tests - name: Tests - run: ./gradlew test + run: ./gradlew test \ No newline at end of file diff --git a/.gitignore b/.gitignore index c0ef23f..64ed273 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .gradle .idea .qodana +.intellijPlatform build out diff --git a/.run/Run IDE for UI Tests.run.xml b/.run/Run IDE for UI Tests.run.xml deleted file mode 100644 index 9b028c3..0000000 --- a/.run/Run IDE for UI Tests.run.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - true - true - false - - - \ No newline at end of file diff --git a/.run/Run IDE with Plugin.run.xml b/.run/Run IDE with Plugin.run.xml index 3f7b873..b4623aa 100644 --- a/.run/Run IDE with Plugin.run.xml +++ b/.run/Run IDE with Plugin.run.xml @@ -5,7 +5,7 @@ @@ -19,6 +19,7 @@ true true false + false \ No newline at end of file diff --git a/.run/Run Plugin Verification.run.xml b/.run/Run Plugin Verification.run.xml deleted file mode 100644 index 3a8d688..0000000 --- a/.run/Run Plugin Verification.run.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - true - true - false - - - - \ No newline at end of file diff --git a/.run/Run Qodana.run.xml b/.run/Run Qodana.run.xml deleted file mode 100644 index 9603583..0000000 --- a/.run/Run Qodana.run.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - true - true - false - - - \ No newline at end of file diff --git a/.run/Run Tests.run.xml b/.run/Run Tests.run.xml new file mode 100644 index 0000000..55da723 --- /dev/null +++ b/.run/Run Tests.run.xml @@ -0,0 +1,25 @@ + + + + + + + + true + true + false + true + + + \ No newline at end of file diff --git a/.run/Run Plugin Tests.run.xml b/.run/Run Verifications.run.xml similarity index 81% rename from .run/Run Plugin Tests.run.xml rename to .run/Run Verifications.run.xml index ae9ae13..32783f5 100644 --- a/.run/Run Plugin Tests.run.xml +++ b/.run/Run Verifications.run.xml @@ -1,5 +1,5 @@ - + - + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3761d30..99223a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ ## Unreleased +## 1.0.0 + +- Intellij service plugin 2.x update +- Fix deprecated usage and scheduled for removal +- Supported SSDK 18.0.1,17.1.0 (Latest 2 release lines) + ## 0.0.12 ### Update diff --git a/README.md b/README.md index 75c9d84..a0aa6f7 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Plugin based on the [IntelliJ Platform Plugin Template][template]. ## Documentation * Documentation for the plugin is [here](https://github.com/Backbase/intellij-docs) which is published [here](http://engineering.backbase.com/intellij-docs/) -* Plugin is publeshed in [IntelliJ marketplace](https://plugins.jetbrains.com/plugin/18745-backbase-services-toolkit) +* Plugin is published in [IntelliJ marketplace](https://plugins.jetbrains.com/plugin/18745-backbase-services-toolkit) ### Support diff --git a/TECHNICAL_DETAILS.md b/TECHNICAL_DETAILS.md index f2480ce..ff5c8c8 100644 --- a/TECHNICAL_DETAILS.md +++ b/TECHNICAL_DETAILS.md @@ -1,6 +1,6 @@ # Technical Details -There project requires Gradle 7+, Kotlin 1.7+ and Java version specified in the `gradle.properties`. +There project requires Gradle 8+, Kotlin 1.9+ and Java 17 version specified in the `gradle.properties`. Once a pull request is merged a new version will be automatically built along with a draft release. diff --git a/build.gradle.kts b/build.gradle.kts index cd80509..f066650 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,7 @@ import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.markdownToHTML +import org.jetbrains.intellij.platform.gradle.TestFrameworkType + fun properties(key: String) = project.findProperty(key).toString() @@ -7,131 +9,178 @@ plugins { // Java support id("java") // Kotlin support - id("org.jetbrains.kotlin.jvm") version "1.8.10" + id("org.jetbrains.kotlin.jvm") version "1.9.25" // Gradle IntelliJ Plugin - id("org.jetbrains.intellij") version "1.17.3" + id("org.jetbrains.intellij.platform") version "2.1.0" // Gradle Changelog Plugin - id("org.jetbrains.changelog") version "2.0.0" + id("org.jetbrains.changelog") version "2.2.1" // Gradle Qodana Plugin - id("org.jetbrains.qodana") version "0.1.13" + id("org.jetbrains.qodana") version "2024.2.3" + // Kover + id("org.jetbrains.kotlinx.kover") version "0.8.3" } -group = properties("pluginGroup") -version = properties("pluginVersion") +group = providers.gradleProperty("pluginGroup").get() +version = providers.gradleProperty("pluginVersion").get() + +// Set the JVM language level used to build the project. Use Java 17 for 2022.2+ and Java 21 for 2024.2+ . +kotlin { + jvmToolchain(17) + +} // Configure project's dependencies repositories { + mavenCentral() + // IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html + intellijPlatform { + defaultRepositories() + } } -dependencies{ - compileOnly("org.apache.maven:maven-artifact:3.9.6") - testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.7.0") -} -// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin -intellij { - pluginName.set(properties("pluginName")) - version.set(properties("platformVersion")) - type.set(properties("platformType")) +// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog +dependencies { - // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file. - plugins.set(properties("platformPlugins").split(',').map(String::trim).filter(String::isNotEmpty)) -} + val junitVersion = "5.10.2" + testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion") + testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion") + testImplementation("junit:junit:4.13.2") + testImplementation("org.junit.vintage:junit-vintage-engine:$junitVersion") -// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin -changelog { - version.set(properties("pluginVersion")) - groups.set(emptyList()) -} + intellijPlatform { -// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin -qodana { - cachePath.set(projectDir.resolve(".qodana").canonicalPath) - reportPath.set(projectDir.resolve("build/reports/inspections").canonicalPath) - saveReport.set(true) - showReport.set(System.getenv("QODANA_SHOW_REPORT")?.toBoolean() ?: false) -} + // IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html -// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+. -kotlin { - jvmToolchain(17) -} + create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion")) -tasks { + // create(IntelliJPlatformType.IntellijIdeaUltimate, providers.gradleProperty("platformVersion")) + // Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins. + bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') }) - test{ - useJUnitPlatform() - } + // Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace. + plugins(providers.gradleProperty("platformPlugins").map { it.split(',') }) - wrapper { - gradleVersion = properties("gradleVersion") + instrumentationTools() + pluginVerifier() + zipSigner() + testFramework(TestFrameworkType.Platform) } +} + +// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html +intellijPlatform { - patchPluginXml { - version.set(properties("pluginVersion")) - sinceBuild.set(properties("pluginSinceBuild")) - untilBuild.set(properties("pluginUntilBuild")) + pluginConfiguration { + version = providers.gradleProperty("pluginVersion") // Extract the section from README.md and provide for the plugin's manifest - pluginDescription.set( - projectDir.resolve("README.md").readText().lines().run { - val start = "" - val end = "" + description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map { + val start = "" + val end = "" + with(it.lines()) { if (!containsAll(listOf(start, end))) { throw GradleException("Plugin description section not found in README.md:\n$start ... $end") } - subList(indexOf(start) + 1, indexOf(end)) - }.joinToString("\n").run { markdownToHTML(this) } - ) + subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML) + } + } + val changelog = project.changelog // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file - changeNotes.set(provider { - changelog.renderItem(changelog.run { - getOrNull(properties("pluginVersion")) ?: getLatest() - }, Changelog.OutputType.HTML) - }) + changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion -> + with(changelog) { + renderItem( + (getOrNull(pluginVersion) ?: getUnreleased()) + .withHeader(false) + .withEmptySections(false), + Changelog.OutputType.HTML, + ) + } + } + + ideaVersion { + sinceBuild = providers.gradleProperty("pluginSinceBuild") + untilBuild = providers.gradleProperty("pluginUntilBuild") + } } + signing { + certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") + privateKey = providers.environmentVariable("PRIVATE_KEY") + password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") + } + publishing { + token = providers.environmentVariable("PUBLISH_TOKEN") + // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 + // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: + // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel + channels = providers.gradleProperty("pluginVersion") + .map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } + } + pluginVerification { + ides { + recommended() + } + } +} + +// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin +changelog { + + groups.empty() + version = providers.gradleProperty("pluginVersion") + repositoryUrl = providers.gradleProperty("pluginRepositoryUrl") //NA + +} - // Configure UI tests plugin - // Read more: https://github.com/JetBrains/intellij-ui-test-robot - runIdeForUiTests { - systemProperty("robot-server.port", "8082") - systemProperty("ide.mac.message.dialogs.as.sheets", "false") - systemProperty("jb.privacy.policy.text", "") - systemProperty("jb.consents.confirmation.enabled", "false") +// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration +// (Kover is a set of solutions for collecting test coverage of Kotlin code compiled for JVM and Android platforms. ) +kover { + reports { + total { + xml { + onCheck = true + } + } + } + currentProject { + instrumentation { + excludedClasses.add("org.apache.velocity.*") + } } +} - signPlugin { - certificateChain.set(System.getenv("CERTIFICATE_CHAIN")) - privateKey.set(System.getenv("PRIVATE_KEY")) - password.set(System.getenv("PRIVATE_KEY_PASSWORD")) +tasks { + wrapper { + gradleVersion = providers.gradleProperty("gradleVersion").get() } publishPlugin { - dependsOn("patchChangelog") - token.set(System.getenv("PUBLISH_TOKEN")) - // pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 - // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: - // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel - channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())) + dependsOn(patchChangelog) } } -tasks.register("incrementVersion"){ - fun generateVersion(version:String): String { - val (oldMajor, oldMinor, oldPatch) = version.split(".").map(String::toInt) - val (newMajor, newMinor, newPatch) = arrayOf(oldMajor, oldMinor, oldPatch + 1) - return "$newMajor.$newMinor.$newPatch" - } - doLast { - val version = properties("pluginVersion") - val newVersion = generateVersion(version) - println(newVersion) - exec { - commandLine("sh", "incrementVersion.sh", newVersion) +intellijPlatformTesting { + runIde { + register("runIdeForUiTests") { + task { + jvmArgumentProviders += CommandLineArgumentProvider { + listOf( + "-Drobot-server.port=8082", + "-Dide.mac.message.dialogs.as.sheets=false", + "-Djb.privacy.policy.text=", + "-Djb.consents.confirmation.enabled=false" + ) + } + } + + plugins { + robotServerPlugin() + } } } } + + diff --git a/gradle.properties b/gradle.properties index 322e8f0..377b557 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,26 +3,34 @@ pluginGroup = com.backbase pluginName = backbase-services-toolkit +pluginRepositoryUrl = https://github.com/Backbase/backbase-services-toolkit # SemVer format -> https://semver.org -pluginVersion = 0.0.12 +pluginVersion = 1.0.0 # See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html # for insight into build numbers and IntelliJ Platform versions. -pluginSinceBuild = 231 -pluginUntilBuild = 241.* +pluginSinceBuild = 233 +pluginUntilBuild = 242.* # IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties platformType = IC -platformVersion = 2023.1 +platformVersion = 2024.2.3 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 -platformPlugins = com.intellij.java, maven +platformPlugins = +platformBundledPlugins = com.intellij.java, org.jetbrains.idea.maven, # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 8.4 +gradleVersion = 8.9 # Opt-out flag for bundling Kotlin standard library. # See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details. # suppress inspection "UnusedProperty" kotlin.stdlib.default.dependency = false + +# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html +org.gradle.configuration-cache = true + +# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html +org.gradle.caching = true diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1487480..1837297 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip +validateDistributionUrl=true networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file diff --git a/incrementVersion.sh b/incrementVersion.sh deleted file mode 100644 index 46b67cb..0000000 --- a/incrementVersion.sh +++ /dev/null @@ -1 +0,0 @@ -sed -i "/pluginVersion =/ s/=.*/= $1/" gradle.properties \ No newline at end of file diff --git a/qodana.yml b/qodana.yml index 06b939a..e4a4d5d 100644 --- a/qodana.yml +++ b/qodana.yml @@ -2,6 +2,8 @@ # https://www.jetbrains.com/help/qodana/qodana-yaml.html version: 1.0 +linter: jetbrains/qodana-jvm-community:2024.2 +projectJDK: "17" profile: name: qodana.recommended exclude: diff --git a/settings.gradle.kts b/settings.gradle.kts index 832be3c..384ab3b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1 +1,5 @@ rootProject.name = "backbase-services-toolkit" + +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0" +} diff --git a/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleAction.kt b/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleAction.kt index a481594..ce06962 100644 --- a/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleAction.kt @@ -4,6 +4,7 @@ import com.backbase.bst.common.Library import com.backbase.bst.common.MavenTools import com.intellij.notification.Notification import com.intellij.notification.NotificationType +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.DataContext import com.intellij.openapi.command.WriteCommandAction @@ -15,7 +16,6 @@ import org.jetbrains.annotations.Nullable import org.jetbrains.idea.maven.model.MavenId import org.jetbrains.idea.maven.project.MavenProjectsManager import org.jetbrains.idea.maven.utils.actions.MavenActionUtil -import kotlin.collections.HashMap class AddAnyServiceSSDKModuleAction : DumbAwareAction() { @@ -56,7 +56,7 @@ class AddAnyServiceSSDKModuleAction : DumbAwareAction() { val modulesDialog = AddAnyServiceSSDKModuleDialog(project, libraries) modulesDialog.show() - if (modulesDialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (modulesDialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } @@ -109,9 +109,7 @@ class AddAnyServiceSSDKModuleAction : DumbAwareAction() { actionEventDependencies(project, file, e.dataContext, libraries) val mavenProjectManager = MavenProjectsManager.getInstance(project) - mavenProjectManager.forceUpdateProjects(mavenProjectManager.projects) - - mavenProjectManager.waitForPostImportTasksCompletion() + mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() } private fun actionEventDependencies(project: Project, file: VirtualFile, dataContext: DataContext, @@ -136,4 +134,8 @@ class AddAnyServiceSSDKModuleAction : DumbAwareAction() { } } + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } + } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleDialog.kt b/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleDialog.kt index 8da0b32..62606e9 100644 --- a/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/AddAnyServiceSSDKModuleDialog.kt @@ -6,7 +6,10 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper import com.intellij.ui.components.JBScrollPane -import com.intellij.ui.layout.* +import com.intellij.ui.dsl.builder.RightGap +import com.intellij.ui.dsl.builder.bindSelected +import com.intellij.ui.dsl.builder.panel + import java.awt.Rectangle import java.awt.event.MouseEvent import java.awt.event.MouseMotionAdapter @@ -14,9 +17,10 @@ import java.awt.event.MouseMotionListener import javax.swing.JComponent import javax.swing.JPanel -class AddAnyServiceSSDKModuleDialog(project : Project, private val modules : Map) : DialogWrapper(project, true) { +class AddAnyServiceSSDKModuleDialog(project: Project, private val modules: Map) : + DialogWrapper(project, true) { - private var mainPanel : DialogPanel? = null + private var mainPanel: DialogPanel? = null init { @@ -26,25 +30,19 @@ class AddAnyServiceSSDKModuleDialog(project : Project, private val modules : Map override fun createCenterPanel(): JComponent { val keyByPairs = modules.keys.chunked(1) - mainPanel = panel{ - - - keyByPairs.forEach { - - val element1 = modules[it[0]] - row { - - cell { - checkBox(it[0], element1!!::selected) - .comment(element1.description, 100, false) - .withLeftGap() - - } - + mainPanel = panel { + keyByPairs.forEach { pair -> + val element1 = modules[pair[0]] + + element1?.let { module -> + row { + checkBox(pair[0]).bindSelected(module::selected) // Creates a checkbox with the label from pair[0] and binds it to `module.selected` + .comment(module.description) // Adds a comment (description) + .gap(RightGap.SMALL) // Use the latest gap management, replace `.withLeftGap()` with `.gap()` } } } - + } mainPanel!!.autoscrolls = true @@ -63,8 +61,6 @@ class AddAnyServiceSSDKModuleDialog(project : Project, private val modules : Map } - - override fun doOKAction() { mainPanel!!.apply() super.doOKAction() diff --git a/src/main/kotlin/com/backbase/bst/actions/AddPersistenceSupportAction.kt b/src/main/kotlin/com/backbase/bst/actions/AddPersistenceSupportAction.kt index c55f9b0..148fc33 100644 --- a/src/main/kotlin/com/backbase/bst/actions/AddPersistenceSupportAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/AddPersistenceSupportAction.kt @@ -8,6 +8,7 @@ import com.intellij.ide.fileTemplates.FileTemplate import com.intellij.ide.fileTemplates.FileTemplateManager import com.intellij.notification.Notification import com.intellij.notification.NotificationType +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.DataContext import com.intellij.openapi.actionSystem.LangDataKeys @@ -32,7 +33,7 @@ class AddPersistenceSupportAction : DumbAwareAction(){ val persistenceDialog = PersistenceDialog(project) persistenceDialog.show() - if (persistenceDialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (persistenceDialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } @@ -42,10 +43,7 @@ class AddPersistenceSupportAction : DumbAwareAction(){ actionAddPersistenceDependencies(project, file, e.dataContext) val mavenProjectManager = MavenProjectsManager.getInstance(project) - mavenProjectManager.forceUpdateProjects(mavenProjectManager.projects) - - mavenProjectManager.waitForPostImportTasksCompletion() - + mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() } if(persistenceDialog.addLiquibaseFile){ @@ -127,5 +125,9 @@ class AddPersistenceSupportAction : DumbAwareAction(){ } } + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } + } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/ConsumeEventAction.kt b/src/main/kotlin/com/backbase/bst/actions/ConsumeEventAction.kt index 10c82b5..5b9bc0d 100644 --- a/src/main/kotlin/com/backbase/bst/actions/ConsumeEventAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/ConsumeEventAction.kt @@ -6,6 +6,7 @@ import com.backbase.bst.common.SsdkUtils import com.intellij.ide.fileTemplates.FileTemplateManager import com.intellij.notification.Notification import com.intellij.notification.NotificationType +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.LangDataKeys import com.intellij.openapi.command.WriteCommandAction @@ -52,7 +53,7 @@ class ConsumeEventAction : DumbAwareAction() { consumeEventDialog.show() - if (consumeEventDialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (consumeEventDialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } @@ -143,4 +144,8 @@ class ConsumeEventAction : DumbAwareAction() { return } } + + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/ConsumeEventDialog.kt b/src/main/kotlin/com/backbase/bst/actions/ConsumeEventDialog.kt index b2f66f0..5ed9208 100644 --- a/src/main/kotlin/com/backbase/bst/actions/ConsumeEventDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/ConsumeEventDialog.kt @@ -4,10 +4,12 @@ import com.backbase.bst.BackbaseBundle import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper +import com.intellij.ui.JBColor import com.intellij.ui.components.JBList -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.panel + import com.intellij.util.ui.JBUI -import java.awt.Color + import javax.swing.DefaultComboBoxModel import javax.swing.JComponent import javax.swing.ListSelectionModel @@ -22,7 +24,7 @@ class ConsumeEventDialog(project : Project, events : List) : DialogWrapp title =BackbaseBundle.message("action.add.consume.event.dialog.title") jbTable = JBList(listModel) jbTable.autoscrolls = true - jbTable.border=JBUI.Borders.customLine(Color.BLACK, 1) + jbTable.border=JBUI.Borders.customLine(JBColor.BLACK, 1) jbTable.selectionMode = ListSelectionModel.SINGLE_SELECTION jbTable.selectedIndex = 0 init() @@ -32,11 +34,8 @@ class ConsumeEventDialog(project : Project, events : List) : DialogWrapp override fun createCenterPanel(): JComponent? { mainPanel = panel { - row { - label(BackbaseBundle.message("action.add.consume.event.dialog.select.event")) - } - row { - jbTable().focused() + row(BackbaseBundle.message("action.add.consume.event.dialog.select.event")) { + cell(jbTable).focused() // Add JBList to the panel } } diff --git a/src/main/kotlin/com/backbase/bst/actions/ConsumeEventFunctionalStyleAction.kt b/src/main/kotlin/com/backbase/bst/actions/ConsumeEventFunctionalStyleAction.kt index a2f283c..e2949fb 100644 --- a/src/main/kotlin/com/backbase/bst/actions/ConsumeEventFunctionalStyleAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/ConsumeEventFunctionalStyleAction.kt @@ -2,6 +2,7 @@ package com.backbase.bst.actions import com.intellij.codeInsight.template.TemplateManager import com.intellij.codeInsight.template.impl.TemplateSettings +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.CommonDataKeys import com.intellij.openapi.project.DumbAwareAction @@ -25,6 +26,9 @@ class ConsumeEventFunctionalStyleAction : DumbAwareAction() { val psiFile = e.getRequiredData(CommonDataKeys.PSI_FILE) if (psiFile !is PsiJavaFile) e.presentation.isVisible = false + } + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT } } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/DefineEventAction.kt b/src/main/kotlin/com/backbase/bst/actions/DefineEventAction.kt index 6e5e25d..0f7b383 100644 --- a/src/main/kotlin/com/backbase/bst/actions/DefineEventAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/DefineEventAction.kt @@ -9,6 +9,7 @@ import com.intellij.ide.fileTemplates.FileTemplate import com.intellij.ide.fileTemplates.FileTemplateManager import com.intellij.notification.Notification import com.intellij.notification.NotificationType +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.DataContext import com.intellij.openapi.actionSystem.LangDataKeys @@ -21,7 +22,9 @@ import com.intellij.openapi.ui.popup.Balloon import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.PsiDirectory import com.intellij.ui.GotItMessage + import com.intellij.ui.awt.RelativePoint + import com.intellij.util.xml.DomElement import com.intellij.util.xml.reflect.DomCollectionChildDescription import org.jetbrains.annotations.NotNull @@ -46,7 +49,7 @@ class DefineEventAction : DumbAwareAction(){ val persistenceDialog = DefineEventDialog(project) persistenceDialog.show() - if (persistenceDialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (persistenceDialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } @@ -65,7 +68,7 @@ class DefineEventAction : DumbAwareAction(){ val pluginId = MavenId("com.backbase.codegen", "jsonschema-events-maven-plugin", "") if(!MavenTools.findPluginOnBom(project, file, pluginId)) { - addingMavenPlugin(project, file, e) + addingMavenPlugin(project, file) Notification("Backbase notification group", "Define an Event", "Adding plugin jsonschema-events-maven-plugin on pom.xml", NotificationType.INFORMATION).notify(project) } @@ -83,25 +86,19 @@ class DefineEventAction : DumbAwareAction(){ file: VirtualFile, e: AnActionEvent ) { - actionEventDependencies(project, file, e.dataContext) val mavenProjectManager = MavenProjectsManager.getInstance(project) - mavenProjectManager.forceUpdateProjects(mavenProjectManager.projects) - - mavenProjectManager.waitForPostImportTasksCompletion() + mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() } private fun addingMavenPlugin( project: @Nullable Project, - file: VirtualFile, - e: AnActionEvent + file: VirtualFile ) { - actionEventPlugin(project, file, e.dataContext) + actionEventPlugin(project, file) val mavenProjectManager = MavenProjectsManager.getInstance(project) - mavenProjectManager.forceUpdateProjects(mavenProjectManager.projects) - - mavenProjectManager.waitForPostImportTasksCompletion() + mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() } private fun actionEventDependencies(project: Project, file: VirtualFile, dataContext: DataContext) { @@ -115,11 +112,9 @@ class DefineEventAction : DumbAwareAction(){ } } - private fun actionEventPlugin(project: Project, file: VirtualFile, dataContext: DataContext) { + private fun actionEventPlugin(project: Project, file: VirtualFile) { val mavenModel = MavenDomUtil .getMavenDomProjectModel(project, file) - - WriteCommandAction.runWriteCommandAction(project) { createDomPlugin(mavenModel!!.build.plugins, project) @@ -212,5 +207,8 @@ class DefineEventAction : DumbAwareAction(){ } } + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/DefineEventDialog.kt b/src/main/kotlin/com/backbase/bst/actions/DefineEventDialog.kt index 565f69d..2ccf0e9 100644 --- a/src/main/kotlin/com/backbase/bst/actions/DefineEventDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/DefineEventDialog.kt @@ -6,14 +6,16 @@ import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.ui.ValidationInfo import com.intellij.ui.components.JBTextField -import com.intellij.ui.layout.CellBuilder -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.Cell +import com.intellij.ui.dsl.builder.LabelPosition +import com.intellij.ui.dsl.builder.bindText +import com.intellij.ui.dsl.builder.panel import javax.swing.JComponent -class DefineEventDialog(project : Project) : DialogWrapper(project, true) { +class DefineEventDialog(project: Project) : DialogWrapper(project, true) { - private var mainPanel : DialogPanel? = null - private var textField : CellBuilder? = null + private var mainPanel: DialogPanel? = null + private var textField: Cell? = null init { title = BackbaseBundle.message("action.add.define.event.dialog.title") @@ -25,12 +27,9 @@ class DefineEventDialog(project : Project) : DialogWrapper(project, true) { override fun createCenterPanel(): JComponent? { mainPanel = panel { row { - - cell { - label(BackbaseBundle.message("action.add.define.event.dialog.event.name")) - textField = textField(::eventName) - textField!!.focused() - } + textField().bindText(::eventName) + .label(BackbaseBundle.message("action.add.define.event.dialog.event.name"), LabelPosition.LEFT) + .focused() } } @@ -38,11 +37,9 @@ class DefineEventDialog(project : Project) : DialogWrapper(project, true) { } override fun doValidate(): ValidationInfo? { - if (textField!!.component.text == ""){ + if (textField?.component?.text == "") { return ValidationInfo("Event Name cannot be empty") } - - return null } @@ -52,6 +49,4 @@ class DefineEventDialog(project : Project) : DialogWrapper(project, true) { } - - } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/EmitEventAction.kt b/src/main/kotlin/com/backbase/bst/actions/EmitEventAction.kt index 7ade4f9..2d5e82a 100644 --- a/src/main/kotlin/com/backbase/bst/actions/EmitEventAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/EmitEventAction.kt @@ -2,6 +2,7 @@ package com.backbase.bst.actions import com.intellij.codeInsight.template.TemplateManager import com.intellij.codeInsight.template.impl.TemplateSettings +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.CommonDataKeys import com.intellij.openapi.project.DumbAwareAction @@ -36,4 +37,8 @@ class EmitEventAction : DumbAwareAction() { } + + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/PersistenceDialog.kt b/src/main/kotlin/com/backbase/bst/actions/PersistenceDialog.kt index 92c162a..8337df4 100644 --- a/src/main/kotlin/com/backbase/bst/actions/PersistenceDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/PersistenceDialog.kt @@ -4,7 +4,9 @@ import com.backbase.bst.BackbaseBundle import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.bindSelected +import com.intellij.ui.dsl.builder.panel + import javax.swing.JComponent class PersistenceDialog(project : Project) : DialogWrapper(project, true) { @@ -24,16 +26,16 @@ class PersistenceDialog(project : Project) : DialogWrapper(project, true) { override fun createCenterPanel(): JComponent? { - mainPanel = panel { + mainPanel = panel{ row { - checkBox(BackbaseBundle.message("action.add.persistence.support.dialog.pom"),::addPomDependencies) + checkBox(BackbaseBundle.message("action.add.persistence.support.dialog.pom")).bindSelected(::addPomDependencies) } row { - checkBox(BackbaseBundle.message("action.add.persistence.support.dialog.liquibase"),::addLiquibaseFile) + checkBox(BackbaseBundle.message("action.add.persistence.support.dialog.liquibase")).bindSelected(::addLiquibaseFile) } row { - checkBox(BackbaseBundle.message("action.add.persistence.support.dialog.annotation"),::addApplicationClassPersistenceSupport) - } + checkBox(BackbaseBundle.message("action.add.persistence.support.dialog.annotation")).bindSelected(::addApplicationClassPersistenceSupport) + } } return mainPanel diff --git a/src/main/kotlin/com/backbase/bst/actions/SearchGoldenSamplesAction.kt b/src/main/kotlin/com/backbase/bst/actions/SearchGoldenSamplesAction.kt index 48b638c..3f1610f 100644 --- a/src/main/kotlin/com/backbase/bst/actions/SearchGoldenSamplesAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/SearchGoldenSamplesAction.kt @@ -1,6 +1,7 @@ package com.backbase.bst.actions import com.intellij.ide.BrowserUtil +import com.intellij.openapi.actionSystem.ActionUpdateThread import com.intellij.openapi.actionSystem.AnActionEvent import com.intellij.openapi.actionSystem.CommonDataKeys import com.intellij.openapi.project.DumbAwareAction @@ -30,4 +31,8 @@ class SearchGoldenSamplesAction : DumbAwareAction() { e.presentation.isVisible = false } } + + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksAction.kt b/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksAction.kt index 00d3183..fbffd1e 100644 --- a/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksAction.kt @@ -35,7 +35,7 @@ class GenerateHooksAction : DumbAwareAction() { val selectedModule = e.getData(LangDataKeys.MODULE) // If a multimodule project val dialog = GenerateHooksDialog(project) dialog.show() - if (dialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (dialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } diff --git a/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksDialog.kt b/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksDialog.kt index 152e891..458caca 100644 --- a/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/extensions/GenerateHooksDialog.kt @@ -5,16 +5,18 @@ import com.backbase.bst.common.extensions.RouteExtensionType import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper -import com.intellij.ui.components.JBTextField -import com.intellij.ui.layout.CellBuilder -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.bindItem +import com.intellij.ui.dsl.builder.bindText +import com.intellij.ui.dsl.builder.panel +import com.intellij.ui.dsl.builder.toNullableProperty import javax.swing.DefaultComboBoxModel + + import javax.swing.JComponent class GenerateHooksDialog(project: Project) : DialogWrapper(project, true) { private var mainPanel: DialogPanel? = null - private var textField: CellBuilder? = null var behaviorName: String = "undefined" var selectedRouteExtensionType: RouteExtensionType = RouteExtensionType.SIMPLE_ROUTE_HOOK @@ -23,26 +25,20 @@ class GenerateHooksDialog(project: Project) : DialogWrapper(project, true) { init() } - override fun createCenterPanel(): JComponent? { mainPanel = panel { row { - label(BackbaseBundle.message("action.add.extensions.generate.hooks.name")) - textField = textField(::behaviorName) - textField!!.focused() - + textField().label(BackbaseBundle.message("action.add.extensions.generate.hooks.name")).bindText(::behaviorName).focused() } row { - label("Route Extension Type") - comboBox(DefaultComboBoxModel(RouteExtensionType.values()), ::selectedRouteExtensionType) - + comboBox(DefaultComboBoxModel(RouteExtensionType.values())) + .label("Route Extension Type") + .bindItem(:: selectedRouteExtensionType.toNullableProperty()) } } - return mainPanel } - override fun doOKAction() { mainPanel!!.apply() super.doOKAction() diff --git a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientAction.kt b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientAction.kt index 5d7ab1f..6334d16 100644 --- a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientAction.kt @@ -55,7 +55,7 @@ class GenerateClientAction : DumbAwareAction() { val selectedModule = e.getData(LangDataKeys.MODULE) // If a multimodule project val dialog = GenerateClientDialog(project, SpecUtils.getFileName(e)) dialog.show() - if (dialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (dialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } @@ -105,12 +105,11 @@ class GenerateClientAction : DumbAwareAction() { } } val mavenProjectManager = MavenProjectsManager.getInstance(project) - mavenProjectManager.forceUpdateProjects(mavenProjectManager.projects) - - mavenProjectManager.waitForPostImportTasksCompletion() + mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() if (dialog.addRestClientConfiguration) { addRestClientConfigClass(selectedModule, project, "restClientConfiguration", dialog) + val gotIt = GotItMessage.createMessage( BackbaseBundle.message("action.add.define.event.dialog.gotit.title"), BackbaseBundle.message("action.add.openapi.client.gotit.message") diff --git a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientDialog.kt b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientDialog.kt index 195f167..de73ac9 100644 --- a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateClientDialog.kt @@ -4,9 +4,11 @@ import com.backbase.bst.BackbaseBundle import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper -import com.intellij.ui.components.JBTextField -import com.intellij.ui.layout.CellBuilder -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.Align +import com.intellij.ui.dsl.builder.bindSelected +import com.intellij.ui.dsl.builder.bindText +import com.intellij.ui.dsl.builder.panel + import javax.swing.JComponent class GenerateClientDialog(project: Project, fileName: String?) : DialogWrapper(project, true) { @@ -17,10 +19,6 @@ class GenerateClientDialog(project: Project, fileName: String?) : DialogWrapper( var modelPackage: String private var mainPanel: DialogPanel? = null - private var serviceNameTextField: CellBuilder? = null - private var specPathTextField: CellBuilder? = null - private var apiPackageTextField: CellBuilder? = null - private var modelPackageTextField: CellBuilder? = null var addRestClientConfiguration: Boolean = true init { @@ -39,41 +37,24 @@ class GenerateClientDialog(project: Project, fileName: String?) : DialogWrapper( override fun createCenterPanel(): JComponent? { mainPanel = panel { - row { - cell { - label(BackbaseBundle.message("action.add.openapi.client.dialog.serviceName")) - - serviceNameTextField = textField(::serviceName) - serviceNameTextField!!.focused() - } + row (BackbaseBundle.message("action.add.openapi.client.dialog.serviceName")){ + textField().align(Align.FILL) + .bindText(::serviceName).focused() } - row { - cell { - label(BackbaseBundle.message("action.add.openapi.client.dialog.inputSpec")) - - specPathTextField = textField(::specPath) - specPathTextField!!.focused() - } + row(BackbaseBundle.message("action.add.openapi.client.dialog.inputSpec")) { + textField().align(Align.FILL) + .bindText(::specPath).focused() } - row { - cell { - label(BackbaseBundle.message("action.add.openapi.client.dialog.apiPackage")) - apiPackageTextField = textField(::apiPackage) - apiPackageTextField!!.focused() - } + row(BackbaseBundle.message("action.add.openapi.client.dialog.apiPackage")) { + textField().align(Align.FILL) + .bindText(::apiPackage).focused() } - row { - cell { - label(BackbaseBundle.message("action.add.openapi.client.dialog.modelPackage")) - modelPackageTextField = textField(::modelPackage) - modelPackageTextField!!.focused() - } + row(BackbaseBundle.message("action.add.openapi.client.dialog.modelPackage")) { + textField().align(Align.FILL) + .bindText(::modelPackage).focused() } row { - checkBox( - BackbaseBundle.message("action.add.openapi.client.dialog.generateConfig"), - ::addRestClientConfiguration - ) + checkBox(BackbaseBundle.message("action.add.openapi.client.dialog.generateConfig")).bindSelected(::addRestClientConfiguration) } } diff --git a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiAction.kt b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiAction.kt index 2f9edbe..518f2d7 100644 --- a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiAction.kt +++ b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiAction.kt @@ -54,7 +54,7 @@ class GenerateServerApiAction : DumbAwareAction() { val dialog = GenerateServerApiDialog(project, selectedSpecFile) dialog.show() - if (dialog.exitCode === DialogWrapper.CANCEL_EXIT_CODE) { + if (dialog.exitCode == DialogWrapper.CANCEL_EXIT_CODE) { return } @@ -72,7 +72,6 @@ class GenerateServerApiAction : DumbAwareAction() { createDomPlugin( MavenDomUtil .getMavenDomProjectModel(project, projectPomFile)!!.build.plugins, - project, dialog, selectedSpecFile ) @@ -103,19 +102,16 @@ class GenerateServerApiAction : DumbAwareAction() { } WriteCommandAction.runWriteCommandAction(project) { - createPluginExecution(plugin!!, project, dialog, selectedSpecFile) + createPluginExecution(plugin!!, dialog, selectedSpecFile) } } val mavenProjectManager = MavenProjectsManager.getInstance(project) - mavenProjectManager.forceUpdateProjects(mavenProjectManager.projects) - - mavenProjectManager.waitForPostImportTasksCompletion() + mavenProjectManager.forceUpdateAllProjectsOrFindAllAvailablePomFiles() } private fun createDomPlugin( plugins: MavenDomPlugins?, - project: Project, dialog: GenerateServerApiDialog, selectedSpecFile: VirtualFile ): MavenDomPlugin { @@ -123,14 +119,13 @@ class GenerateServerApiAction : DumbAwareAction() { plugin!!.groupId.stringValue = "com.backbase.oss" plugin.artifactId.stringValue = "boat-maven-plugin" - createPluginExecution(plugin, project, dialog, selectedSpecFile) + createPluginExecution(plugin, dialog, selectedSpecFile) return plugin } private fun createPluginExecution( plugin: MavenDomPlugin, - project: Project, dialog: GenerateServerApiDialog, selectedSpecFile: VirtualFile ): MavenDomPlugin { diff --git a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiDialog.kt b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiDialog.kt index 055cd65..9e4ab38 100644 --- a/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiDialog.kt +++ b/src/main/kotlin/com/backbase/bst/actions/openapi/GenerateServerApiDialog.kt @@ -5,31 +5,26 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.ui.DialogPanel import com.intellij.openapi.ui.DialogWrapper import com.intellij.openapi.vfs.VirtualFile -import com.intellij.ui.components.JBTextField -import com.intellij.ui.layout.CellBuilder -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.bindText +import com.intellij.ui.dsl.builder.panel import java.io.File import javax.swing.JComponent -class GenerateServerApiDialog (project: Project, file: VirtualFile) : DialogWrapper(project, true) { +class GenerateServerApiDialog(project: Project, file: VirtualFile) : DialogWrapper(project, true) { var specPath: String var apiPackage: String var modelPackage: String private var serviceName: String - private var mainPanel : DialogPanel? = null - private var serviceNameTextField : CellBuilder? = null - private var specPathTextField : CellBuilder? = null - private var apiPackageTextField : CellBuilder? = null - private var modelPackageTextField : CellBuilder? = null + private var mainPanel: DialogPanel? = null init { title = BackbaseBundle.message("action.add.openapi.server.api.dialog.title") serviceName = SpecUtils.extractServiceNameWithType(file.name) val relativeSpecPath: String = File(project.basePath).toURI().relativize(File(file.canonicalPath).toURI()).path - specPath = ".."+File.separator+relativeSpecPath - val stripServiceName = serviceName.replace("-","") + specPath = ".." + File.separator + relativeSpecPath + val stripServiceName = serviceName.replace("-", "") apiPackage = "com.backbase.$stripServiceName.api" modelPackage = "com.backbase.$stripServiceName.api.model" init() @@ -38,34 +33,26 @@ class GenerateServerApiDialog (project: Project, file: VirtualFile) : DialogWrap override fun createCenterPanel(): JComponent? { mainPanel = panel { row { - cell { - label(BackbaseBundle.message("action.add.openapi.server.api.dialog.serviceName")) - serviceNameTextField = textField(::serviceName) - serviceNameTextField!!.focused() - } + textField().label(BackbaseBundle.message("action.add.openapi.server.api.dialog.serviceName")) + .bindText(::serviceName).focused() + } row { - cell { - label(BackbaseBundle.message("action.add.openapi.server.api.dialog.inputSpec")) + textField().label(BackbaseBundle.message("action.add.openapi.server.api.dialog.inputSpec")) + .bindText(::specPath).focused() + - specPathTextField = textField(::specPath) - specPathTextField!!.focused() - } } row { - cell { - label(BackbaseBundle.message("action.add.openapi.server.api.dialog.apiPackage")) - apiPackageTextField = textField(::apiPackage) - apiPackageTextField!!.focused() - } + textField().label(BackbaseBundle.message("action.add.openapi.server.api.dialog.apiPackage")) + .bindText(::apiPackage).focused() + } row { - cell { - label(BackbaseBundle.message("action.add.openapi.server.api.dialog.modelPackage")) - modelPackageTextField = textField(::modelPackage) - modelPackageTextField!!.focused() - } + textField().label(BackbaseBundle.message("action.add.openapi.server.api.dialog.modelPackage")) + .bindText(::modelPackage).focused() + } } diff --git a/src/main/kotlin/com/backbase/bst/common/SsdkUtils.kt b/src/main/kotlin/com/backbase/bst/common/SsdkUtils.kt index c3b405f..6f25f8c 100644 --- a/src/main/kotlin/com/backbase/bst/common/SsdkUtils.kt +++ b/src/main/kotlin/com/backbase/bst/common/SsdkUtils.kt @@ -9,7 +9,7 @@ object SsdkUtils { private const val defaultPackageName = "com.backbase.demo" fun listVersionsSsdk(): List { - return listOf("17.0.0","16.1.6","16.1.0") + return listOf("18.0.1","17.1.0") } /** diff --git a/src/main/kotlin/com/backbase/bst/wizard/BackbaseMavenModuleBuilder.kt b/src/main/kotlin/com/backbase/bst/wizard/BackbaseMavenModuleBuilder.kt index b60b892..eb3026a 100644 --- a/src/main/kotlin/com/backbase/bst/wizard/BackbaseMavenModuleBuilder.kt +++ b/src/main/kotlin/com/backbase/bst/wizard/BackbaseMavenModuleBuilder.kt @@ -8,19 +8,22 @@ import com.intellij.ide.fileTemplates.FileTemplateUtil import com.intellij.ide.fileTemplates.actions.CreateFromTemplateActionBase import com.intellij.ide.util.EditorHelper import com.intellij.ide.util.PropertiesComponent -import com.intellij.openapi.application.ModalityState import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.fileEditor.FileEditorManager import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VfsUtil import com.intellij.openapi.vfs.VirtualFile -import com.intellij.psi.* +import com.intellij.psi.PsiDirectory +import com.intellij.psi.PsiDocumentManager +import com.intellij.psi.PsiFile +import com.intellij.psi.PsiManager import com.intellij.psi.codeStyle.CodeStyleManager import com.intellij.util.IncorrectOperationException import org.apache.velocity.runtime.parser.ParseException import org.jetbrains.idea.maven.dom.MavenDomUtil -import org.jetbrains.idea.maven.dom.model.* +import org.jetbrains.idea.maven.dom.model.MavenDomParent +import org.jetbrains.idea.maven.dom.model.MavenDomProjectModel import org.jetbrains.idea.maven.model.MavenConstants import org.jetbrains.idea.maven.model.MavenCoordinate import org.jetbrains.idea.maven.model.MavenId @@ -91,7 +94,7 @@ class BackbaseMavenModuleBuilder(private val myProjectId: MavenId, private val m MavenProjectsManager.getInstance(project).forceUpdateAllProjectsOrFindAllAvailablePomFiles() // execute when current dialog is closed (e.g. Project Structure) - MavenUtil.invokeLater(project, ModalityState.NON_MODAL) { + MavenUtil.invokeLater(project) { if (!pom.isValid) { showError(project, RuntimeException("Project is not valid")) return@invokeLater diff --git a/src/main/kotlin/com/backbase/bst/wizard/BackbaseProjectWizard.kt b/src/main/kotlin/com/backbase/bst/wizard/BackbaseProjectWizard.kt index 46e47d0..5f91736 100644 --- a/src/main/kotlin/com/backbase/bst/wizard/BackbaseProjectWizard.kt +++ b/src/main/kotlin/com/backbase/bst/wizard/BackbaseProjectWizard.kt @@ -29,7 +29,7 @@ class BackbaseProjectWizard : ModuleBuilder(){ var myProjectId: MavenId? = null - var ssdkMavenId : MavenId = MavenId("com.backbase.buildingblocks", "service-sdk-starter-core", "17.0.0") + var ssdkMavenId : MavenId = MavenId("com.backbase.buildingblocks", "service-sdk-starter-core", "18.0.1") override fun getNodeIcon(): Icon = BackbaseIcons.BACKBASE_PROJECT_LOGO diff --git a/src/main/kotlin/com/backbase/bst/wizard/SsdkStep.kt b/src/main/kotlin/com/backbase/bst/wizard/SsdkStep.kt index 2369a28..49118d5 100644 --- a/src/main/kotlin/com/backbase/bst/wizard/SsdkStep.kt +++ b/src/main/kotlin/com/backbase/bst/wizard/SsdkStep.kt @@ -1,54 +1,48 @@ package com.backbase.bst.wizard + import com.intellij.ide.util.projectWizard.ModuleWizardStep import com.intellij.openapi.ui.DialogPanel -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.* import org.jetbrains.idea.maven.model.MavenId import javax.swing.DefaultComboBoxModel import javax.swing.JComponent class ProjectId { - var artifactId="" - var groupId="com.backbase" - var version="1.0.0" - var ssdkVersion="" + var artifactId = "" + var groupId = "com.backbase" + var version = "1.0.0" + var ssdkVersion = "" } + class SsdkStep( private val backbaseModuleWizard: BackbaseProjectWizard, private val projectId: ProjectId = ProjectId(), - private val ssdkVersions : List) : ModuleWizardStep() { + private val ssdkVersions: List +) : ModuleWizardStep() { private val panel: DialogPanel = panel { - row { - cell(isFullWidth = true) { - label("ArtifactId ") - textField(projectId::artifactId) - } + row(" ArtifactId ") { + textField().align(Align.FILL).bindText(projectId::artifactId) } - row { - cell(isFullWidth = true) { - label("GroupId ") - textField(projectId::groupId) - } + row(" GroupId ") { + textField().align(Align.FILL).bindText(projectId::groupId) } - row { - cell(isFullWidth = true) { - label("Version ") - textField(projectId::version) - } + row(" Version ") { + textField().align(Align.FILL).bindText(projectId::version) } - row { - cell(isFullWidth = true) { - label("SSDK Version") - comboBox( - DefaultComboBoxModel(ssdkVersions.toTypedArray()), - projectId::ssdkVersion) - } + // Row for SSDK Version ComboBox + row(" SSDK Version ") { + comboBox(DefaultComboBoxModel(ssdkVersions.toTypedArray())).bindItem( + projectId::ssdkVersion, + { selectedOption -> projectId.ssdkVersion = selectedOption!! }) } + } + override fun getComponent(): JComponent { return panel } @@ -57,9 +51,12 @@ class SsdkStep( override fun updateDataModel() { panel.apply() backbaseModuleWizard.myProjectId = MavenId(projectId.groupId, projectId.artifactId, projectId.version) - backbaseModuleWizard.ssdkMavenId = MavenId(backbaseModuleWizard.ssdkMavenId.groupId, + backbaseModuleWizard.ssdkMavenId = MavenId( + backbaseModuleWizard.ssdkMavenId.groupId, backbaseModuleWizard.ssdkMavenId.artifactId, projectId.ssdkVersion ) } + + } \ No newline at end of file diff --git a/src/main/kotlin/com/backbase/bst/wizard/extensions/BackbaseExtensionProjectBuilder.kt b/src/main/kotlin/com/backbase/bst/wizard/extensions/BackbaseExtensionProjectBuilder.kt index 015f10f..0185330 100644 --- a/src/main/kotlin/com/backbase/bst/wizard/extensions/BackbaseExtensionProjectBuilder.kt +++ b/src/main/kotlin/com/backbase/bst/wizard/extensions/BackbaseExtensionProjectBuilder.kt @@ -1,7 +1,6 @@ package com.backbase.bst.wizard.extensions import com.backbase.bst.BackbaseBundle -import com.intellij.openapi.application.ModalityState import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.fileEditor.FileDocumentManager import com.intellij.openapi.project.Project @@ -23,7 +22,6 @@ import org.jetbrains.idea.maven.utils.MavenUtil import java.io.File import java.io.IOException import java.nio.file.Paths -import java.util.* class BackbaseExtensionProjectBuilder( @@ -84,7 +82,7 @@ class BackbaseExtensionProjectBuilder( MavenProjectsManager.getInstance(project).forceUpdateAllProjectsOrFindAllAvailablePomFiles() // execute when current dialog is closed (e.g. Project Structure) - MavenUtil.invokeLater(project, ModalityState.NON_MODAL) { + MavenUtil.invokeLater(project) { } diff --git a/src/main/kotlin/com/backbase/bst/wizard/extensions/CaptureServiceStep.kt b/src/main/kotlin/com/backbase/bst/wizard/extensions/CaptureServiceStep.kt index 2bec510..f59f7a3 100644 --- a/src/main/kotlin/com/backbase/bst/wizard/extensions/CaptureServiceStep.kt +++ b/src/main/kotlin/com/backbase/bst/wizard/extensions/CaptureServiceStep.kt @@ -2,7 +2,10 @@ package com.backbase.bst.wizard.extensions import com.intellij.ide.util.projectWizard.ModuleWizardStep import com.intellij.openapi.ui.DialogPanel -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.Align +import com.intellij.ui.dsl.builder.bindText +import com.intellij.ui.dsl.builder.panel + import javax.swing.JComponent @@ -16,25 +19,27 @@ class CaptureServiceStep( private val panel: DialogPanel = panel { - row(separated = true) { - label("ServiceGroupId") + row(" ServiceGroupId ") { + textField().bindText(::serviceGroupId).align(Align.FILL) .comment("The groupId of the service you are creating an extension for") - textField(::serviceGroupId) } - row(separated = true) { - label("ServiceArtifactId") + row(" ServiceArtifactId ") { + textField().bindText(::serviceArtifactId).align(Align.FILL) .comment("The artifactId of the service you are creating an extension for") - textField(::serviceArtifactId) } - row(separated = true) { - label("BBVersion") + row(" BBVersion ") { + + textField().bindText(::bbVersion).align(Align.FILL) .comment("The version number of Backbase you want to create an extension for") - textField(::bbVersion) } - noteRow("Check Community for service details") + row { + comment("Check Community for service details").align( + Align.CENTER + ) + } } override fun getComponent(): JComponent { diff --git a/src/main/kotlin/com/backbase/bst/wizard/extensions/ExtensionProjectStep.kt b/src/main/kotlin/com/backbase/bst/wizard/extensions/ExtensionProjectStep.kt index 7baf99f..97671ed 100644 --- a/src/main/kotlin/com/backbase/bst/wizard/extensions/ExtensionProjectStep.kt +++ b/src/main/kotlin/com/backbase/bst/wizard/extensions/ExtensionProjectStep.kt @@ -4,7 +4,10 @@ import com.backbase.bst.common.SsdkUtils import com.intellij.ide.util.projectWizard.ModuleWizardStep import com.intellij.ide.util.projectWizard.WizardContext import com.intellij.openapi.ui.DialogPanel -import com.intellij.ui.layout.panel +import com.intellij.ui.dsl.builder.Align +import com.intellij.ui.dsl.builder.bindItem +import com.intellij.ui.dsl.builder.bindText +import com.intellij.ui.dsl.builder.panel import org.jetbrains.idea.maven.model.MavenId import javax.swing.DefaultComboBoxModel import javax.swing.JComponent @@ -22,31 +25,22 @@ class ExtensionProjectStep( private val panel: DialogPanel = panel { - row(separated = true) { - label("GroupId") - .comment("The groupId of the generated Maven project") - textField(::groupId) + row (" GroupId "){ + textField().bindText(::groupId).align(Align.FILL).comment("The groupId of the generated Maven project") } - row(separated = true) { - label("ArtifactId") + row (" ArtifactId "){ + textField().bindText(::artifactId).align(Align.FILL) .comment("The artifactId of the generated Maven project") - textField(::artifactId) - } - row(separated = true) { - label("Version") + row (" Version "){ + textField().bindText(::version).align(Align.FILL) .comment("The version number of the generated Maven project") - textField(::version) - } - row(separated = true) { - label("Extension Version") + row (" Extension Version "){ + comboBox(DefaultComboBoxModel(SsdkUtils.listVersionsSsdk().toTypedArray())) .comment("Backbase service extension starter parent version ") - comboBox( - DefaultComboBoxModel(SsdkUtils.listVersionsSsdk().toTypedArray()), - ::ssdkVersion - ) - + .bindItem(::ssdkVersion, + { selectedOption -> ssdkVersion = selectedOption!! }) } } @@ -62,6 +56,6 @@ class ExtensionProjectStep( behaviourExtensionsProjectWizard.version = version behaviourExtensionsProjectWizard.ssdkVersion = ssdkVersion wizardContext.projectName = artifactId - behaviourExtensionsProjectWizard.myProjectId = MavenId(groupId,artifactId,version) + behaviourExtensionsProjectWizard.myProjectId = MavenId(groupId, artifactId, version) } } \ No newline at end of file diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index dd53b4d..0e46d2d 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -51,21 +51,21 @@ + text="Generate Clients from OpenAPI Specs" icon="/icons/openapi_icon_132133.svg"> + description="Generate server api from openAPI spec" + text="Generate Server Api from OpenAPI Spec" icon="/icons/openapi_icon_132133.svg"> + text="Generate New Behaviour Extension Hooks" icon="/icons/camel.svg"> diff --git a/src/main/resources/liveTemplates/backbase.xml b/src/main/resources/liveTemplates/backbase.xml index 817f1b6..a2388f3 100644 --- a/src/main/resources/liveTemplates/backbase.xml +++ b/src/main/resources/liveTemplates/backbase.xml @@ -1,5 +1,5 @@ -