Skip to content

Commit

Permalink
chore: replace .form UI files with Kotlin UI DSL v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jansorg committed Feb 2, 2024
1 parent d8ee3e0 commit f3076c4
Show file tree
Hide file tree
Showing 16 changed files with 154 additions and 286 deletions.
43 changes: 24 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@ buildscript {

plugins {
idea
id("org.jetbrains.intellij") version "1.13.2"
id("org.jetbrains.kotlin.jvm") version "1.9.22"
id("org.jetbrains.intellij") version "1.17.0"
id("org.jetbrains.changelog") version "1.3.1"
id("com.adarshr.test-logger") version "3.2.0"
id("de.undercouch.download") version "5.4.0"

kotlin("plugin.lombok") version "1.8.10"
}

val pluginVersion = prop("pluginVersion")
Expand All @@ -44,6 +47,8 @@ allprojects {
}

apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("org.jetbrains.kotlin.plugin.lombok")
plugin("idea")
plugin("org.jetbrains.intellij")
plugin("com.adarshr.test-logger")
Expand Down Expand Up @@ -76,7 +81,7 @@ allprojects {
version.set(prop("ideVersion"))
downloadSources.set(!isCI)
updateSinceUntilBuild.set(true)
instrumentCode.set(true)
instrumentCode.set(false)
}

configure<JavaPluginExtension> {
Expand All @@ -85,6 +90,14 @@ allprojects {
}

tasks {
compileKotlin {
kotlinOptions.jvmTarget = "11"
}

compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}

buildSearchableOptions.get().enabled = false

buildPlugin {
Expand Down Expand Up @@ -187,10 +200,10 @@ allprojects {

project(":") {
dependencies {
implementation(project(":plugin-core", "instrumentedJar"))
implementation(project(":plugin-gradle", "instrumentedJar"))
implementation(project(":plugin-java", "instrumentedJar"))
implementation(project(":plugin-maven", "instrumentedJar"))
implementation(project(":plugin-core"))
implementation(project(":plugin-gradle"))
implementation(project(":plugin-java"))
implementation(project(":plugin-maven"))
}

changelog {
Expand Down Expand Up @@ -235,17 +248,9 @@ project(":") {
dependsOn("copyPluginAssets")
}

instrumentCode {
dependsOn("copyPluginAssets")
}

jar {
dependsOn("copyPluginAssets")
}

instrumentedJar {
dependsOn("copyPluginAssets")
}
}

patchPluginXml {
Expand Down Expand Up @@ -296,7 +301,7 @@ project(":") {

project(":plugin-java") {
dependencies {
implementation(project(":plugin-core", "instrumentedJar"))
implementation(project(":plugin-core"))
}

intellij {
Expand All @@ -306,8 +311,8 @@ project(":plugin-java") {

project(":plugin-gradle") {
dependencies {
implementation(project(":plugin-core", "instrumentedJar"))
implementation(project(":plugin-java", "instrumentedJar"))
implementation(project(":plugin-core"))
implementation(project(":plugin-java"))
}

intellij {
Expand All @@ -317,8 +322,8 @@ project(":plugin-gradle") {

project(":plugin-maven") {
dependencies {
implementation(project(":plugin-core", "instrumentedJar"))
implementation(project(":plugin-java", "instrumentedJar"))
implementation(project(":plugin-core"))
implementation(project(":plugin-java"))
}

intellij {
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ ideVersion=IC-2021.3.3
#ideVersion=IC-2023.2
#ideVersion=IC-2023.3.2

kotlin.stdlib.default.dependency = false

org.gradle.jvmargs=-Dfile.encoding=UTF-8
org.gradle.parallel=false
org.gradle.parallel=false
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
import appland.files.AppMapFiles;
import appland.files.AppMapVfsUtils;
import appland.notifications.AppMapNotifications;
import appland.remote.RemoteRecordingService;
import appland.remote.RemoteRecordingStatusService;
import appland.remote.StopRemoteRecordingDialog;
import appland.remote.StopRemoteRecordingForm;
import appland.remote.*;
import appland.settings.AppMapProjectSettingsService;
import com.intellij.notification.NotificationType;
import com.intellij.openapi.actionSystem.AnAction;
Expand Down Expand Up @@ -104,8 +101,8 @@ private static void stopAndSaveRemoteRecording(@NotNull Project project,
new Task.Backgroundable(project, AppMapBundle.get("action.stopAppMapRemoteRecording.progressTitle"), false) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
var newFile = RemoteRecordingService.getInstance().stopRecording(form.getURL(), storageLocation, form.getName());
RemoteRecordingStatusService.getInstance(project).recordingStopped(form.getURL());
var newFile = RemoteRecordingService.getInstance().stopRecording(form.getUrl(), storageLocation, form.getName());
RemoteRecordingStatusService.getInstance(project).recordingStopped(form.getUrl());

if (newFile != null && Files.exists(newFile)) {
var newVfsFile = LocalFileSystem.getInstance().refreshAndFindFileByNioFile(newFile);
Expand All @@ -116,7 +113,7 @@ public void run(@NotNull ProgressIndicator indicator) {
}, ModalityState.defaultModalityState());
}
} else {
showStopRecordingFailedError(project, form.getURL());
showStopRecordingFailedError(project, form.getUrl());
}
}
}.queue();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ public static String show(@NotNull Project project) {
return null;
}

var url = dialog.form.getURL();
var url = dialog.form.getUrl();
AppMapProjectSettingsService.getState(project).addRecentRemoteRecordingURLs(url);
return url;
}

@Override
protected @Nullable ValidationInfo doValidate() {
var urlError = UrlInputValidator.INSTANCE.getErrorText(form.getURL());
var urlError = UrlInputValidator.INSTANCE.getErrorText(form.getUrl());
if (urlError != null) {
return new ValidationInfo(urlError, form.getUrlComboBox());
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static StopRemoteRecordingForm show(@NotNull Project project,

@Override
protected @Nullable ValidationInfo doValidate() {
var urlError = UrlInputValidator.INSTANCE.getErrorText(form.getURL());
var urlError = UrlInputValidator.INSTANCE.getErrorText(form.getUrl());
if (urlError != null) {
return new ValidationInfo(urlError, form.getUrlComboBox());
}
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit f3076c4

Please sign in to comment.