Skip to content

Commit 2b787dd

Browse files
authored
Merge pull request #5653 from microsoft/bugfix-1864196
[Bug 1864196]spring cloud artifacts not show in Azure SDK Reference Book
2 parents a811067 + 6627984 commit 2b787dd

File tree

1 file changed

+12
-6
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/azure-sdk-reference-book/src/main/java/com/microsoft/azure/toolkit/intellij/azuresdk/referencebook

1 file changed

+12
-6
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-sdk-reference-book/src/main/java/com/microsoft/azure/toolkit/intellij/azuresdk/referencebook/AzureSdkArtifactDetailPanel.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See License.txt in the project root for license information.
4+
*/
5+
16
package com.microsoft.azure.toolkit.intellij.azuresdk.referencebook;
27

38
import com.google.common.collect.ImmutableMap;
@@ -49,11 +54,12 @@ private void initEventListeners() {
4954

5055
private void setLinks(@Nonnull final Map<String, String> links) {
5156
this.links.removeAll();
52-
links.forEach((type, url) -> {
53-
final HyperlinkLabel link = new HyperlinkLabel();
57+
linkNames.forEach((type, name) -> {
58+
final String url = links.get(type);
5459
if (StringUtils.isNotBlank(url)) {
60+
final HyperlinkLabel link = new HyperlinkLabel();
5561
this.links.add(new JToolBar.Separator());
56-
link.setHyperlinkText(linkNames.get(type));
62+
link.setHyperlinkText(name);
5763
link.setHyperlinkTarget(url);
5864
this.links.add(new JSeparator(SwingConstants.VERTICAL));
5965
this.links.add(link);
@@ -69,14 +75,14 @@ private DropDownLink<String> buildVersionSelector() {
6975
if (StringUtils.isNotBlank(artifact.getVersionPreview())) {
7076
versions.add(artifact.getVersionPreview());
7177
}
72-
final DropDownLink<String> version = new DropDownLink<>(versions.get(0), versions, (String v) -> {
78+
final DropDownLink<String> versionSelector = new DropDownLink<>(versions.get(0), versions, (String v) -> {
7379
if (this.artifactId.isSelected()) {
7480
this.setLinks(this.artifact.getLinks(v));
7581
this.onArtifactOrVersionSelected.accept(this.artifact, this.version.getSelectedItem());
7682
}
7783
}, true);
78-
version.setForeground(JBColor.BLACK);
79-
return version;
84+
versionSelector.setForeground(JBColor.BLACK);
85+
return versionSelector;
8086
}
8187

8288
public void setSelected(boolean selected) {

0 commit comments

Comments
 (0)