Skip to content

Commit 02191c0

Browse files
Merge pull request #6809 from microsoft/fixes-endgame-202207
Resolve issues in end game
2 parents bd4504c + 7a23768 commit 02191c0

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-guidance/src/main/java/com/microsoft/azure/toolkit/ide/guidance/GuidanceStartupListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void runActivity(@NotNull Project project) {
2121
.ifPresent(config -> GuidanceViewManager.getInstance().openCourseView(project, courseConfigFromWorkspace));
2222
// show guidance tool window after install
2323
final IIdeStore ideStore = AzureStoreManager.getInstance().getIdeStore();
24-
if (StringUtils.isEmpty(ideStore.getProperty(GUIDANCE, GUIDANCE_SHOWN))) {
24+
if (ideStore != null && StringUtils.isEmpty(ideStore.getProperty(GUIDANCE, GUIDANCE_SHOWN))) {
2525
ideStore.setProperty(GUIDANCE, GUIDANCE_SHOWN, String.valueOf(true));
2626
GuidanceViewManager.getInstance().showCoursesView(project);
2727
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/IntelliJAzureIcons.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,13 @@ private static Icon getFileTypeIcon(final String name) {
105105

106106
@Nullable
107107
private static Icon loadIcon(String iconPathOrName, Class<?> clazz) {
108+
if (StringUtils.isBlank(iconPathOrName)) {
109+
return null;
110+
}
108111
try {
109112
final Icon result = IconLoader.getIcon(iconPathOrName, clazz);
110113
return result.getIconHeight() > 1 ? result : null; // IconLoader may return dot for non-existing icon
111-
} catch (final RuntimeException ise) {
114+
} catch (final Throwable ise) {
112115
return null;
113116
}
114117
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-lib/src/main/java/com/microsoft/azure/toolkit/intellij/common/component/Tree.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ private void refreshChildrenView() {
150150
@Override
151151
@AzureOperation(name = "common.load_children.node", params = "this.getLabel()", type = AzureOperation.Type.ACTION)
152152
public synchronized void refreshChildren(boolean... incremental) {
153-
Optional.ofNullable(this.inner).ifPresent(ignore -> this.setAllowsChildren(inner.hasChildren()));
154153
if (this.getAllowsChildren() && BooleanUtils.isNotFalse(this.loaded)) {
155154
final DefaultTreeModel model = (DefaultTreeModel) this.tree.getModel();
156155
if (incremental.length > 0 && incremental[0] && Objects.nonNull(model)) {
@@ -162,9 +161,6 @@ public synchronized void refreshChildren(boolean... incremental) {
162161
}
163162
this.loaded = null;
164163
this.loadChildren(incremental);
165-
} else if (!this.getAllowsChildren()) {
166-
this.removeAllChildren();
167-
this.refreshChildrenView();
168164
}
169165
}
170166

0 commit comments

Comments
 (0)