Skip to content

Commit bbba98f

Browse files
authored
Fix images in 'Authenticate' panel (#3980)
Image was available in the sandbox, but were not getting bundled into the final artifact
1 parent c4df8da commit bbba98f

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix issue where images in 'Authenticate' panel do not show up"
4+
}

jetbrains-core/build.gradle.kts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,11 @@ artifacts {
9696
add("gatewayArtifacts", gatewayJar)
9797
}
9898

99-
val codewhispererReadmeAssets = tasks.register<Sync>("codewhispererReadmeAssets") {
100-
from("${project.projectDir}/assets")
101-
into("$buildDir/assets")
102-
}
103-
10499
tasks.prepareSandbox {
105-
dependsOn(codewhispererReadmeAssets)
106-
from(codewhispererReadmeAssets) {
107-
into("aws-toolkit-jetbrains/assets")
108-
}
100+
// you probably do not want to modify this.
101+
// this affects the IDE sandbox / build for `:jetbrains-core`, but will not propogate to the build generated by `:intellij`
102+
// (which is what is ultimately published to the marketplace)
103+
// without additional effort
109104
}
110105

111106
tasks.testJar {
File renamed without changes.
File renamed without changes.
File renamed without changes.

jetbrains-core/src/software/aws/toolkits/jetbrains/core/gettingstarted/editor/GettingStartedPanel.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ class GettingStartedPanel(
314314
}
315315
}
316316

317-
image(AwsToolkit.pluginPath().resolve("assets").resolve("codecatalyst.png").toString())
317+
image("/gettingstarted/codecatalyst.png")
318318

319319
row {
320320
text(message("caws.getstarted.panel.description"))
@@ -533,7 +533,7 @@ class GettingStartedPanel(
533533
}
534534
}
535535

536-
image(AwsToolkit.pluginPath().resolve("assets").resolve("explorer.png").toString())
536+
image("/gettingstarted/explorer.png")
537537

538538
row {
539539
text(message("aws.getstarted.resource.panel_description"))
@@ -741,7 +741,7 @@ class GettingStartedPanel(
741741
}
742742
}
743743

744-
image(AwsToolkit.pluginPath().resolve("assets").resolve("codewhisperer.png").toString())
744+
image("/gettingstarted/codewhisperer.png")
745745

746746
row {
747747
text(message("codewhisperer.gettingstarted.panel.comment"))
@@ -1050,7 +1050,8 @@ class GettingStartedPanel(
10501050

10511051
protected fun Panel.image(path: String) {
10521052
row {
1053-
val image = ImageIcon(path).image
1053+
// `this` is a [Row], so class needs to be specified or we get the wrong classloader
1054+
val image = ImageIcon(GettingStartedPanel::class.java.getResource(path)).image
10541055
// need to account for margin introduced by indent
10551056
// Image.SCALE_DEFAULT is the only valid parameter for gifs
10561057
.getScaledInstance(PANEL_WIDTH - (indentSize * 2), -1, if (path.endsWith("gif")) Image.SCALE_DEFAULT else Image.SCALE_SMOOTH)

0 commit comments

Comments
 (0)