diff --git a/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionPipeline.java b/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionPipeline.java index 32ce56a..2a386de 100644 --- a/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionPipeline.java +++ b/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionPipeline.java @@ -48,7 +48,7 @@ public FuncActionPipeline(String name, Project project, Function function){ this.startTime = System.currentTimeMillis(); this.endTime = -1; this.actionTasks = new ArrayList<>(); - this.stateIcon = new Icon[]{new AnimatedIcon.FS()}; + this.stateIcon = new Icon[]{new AnimatedIcon.Default()}; this.state = new String[]{"run tasks ..."}; this.listenerList = new ArrayList<>(); } diff --git a/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionTask.java b/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionTask.java index 6ff5365..c775b98 100644 --- a/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionTask.java +++ b/src/main/java/com/redhat/devtools/intellij/knative/func/FuncActionTask.java @@ -69,7 +69,7 @@ protected ProcessListener buildProcessListener() { @Override public void startNotified(@NotNull ProcessEvent event) { startTime = System.currentTimeMillis(); - stateIcon = new Icon[]{new AnimatedIcon.FS()}; + stateIcon = new Icon[]{new AnimatedIcon.Default()}; state = new String[]{""}; FuncActionTask.this.pipeline.fireChangeRunningStep(); } diff --git a/src/main/java/com/redhat/devtools/intellij/knative/func/RunFuncActionTask.java b/src/main/java/com/redhat/devtools/intellij/knative/func/RunFuncActionTask.java index 8b484ca..e32782d 100644 --- a/src/main/java/com/redhat/devtools/intellij/knative/func/RunFuncActionTask.java +++ b/src/main/java/com/redhat/devtools/intellij/knative/func/RunFuncActionTask.java @@ -40,7 +40,7 @@ protected ProcessListener buildProcessListener() { @Override public void startNotified(@NotNull ProcessEvent event) { startTime = System.currentTimeMillis(); - stateIcon = new Icon[]{new AnimatedIcon.FS()}; + stateIcon = new Icon[]{new AnimatedIcon.Default()}; state = new String[]{""}; pipeline.fireChangeRunningStep(); } diff --git a/src/main/java/com/redhat/devtools/intellij/knative/tree/KnTreeStructure.java b/src/main/java/com/redhat/devtools/intellij/knative/tree/KnTreeStructure.java index 2814df2..78e3721 100644 --- a/src/main/java/com/redhat/devtools/intellij/knative/tree/KnTreeStructure.java +++ b/src/main/java/com/redhat/devtools/intellij/knative/tree/KnTreeStructure.java @@ -14,6 +14,7 @@ import com.intellij.ide.util.treeView.NodeDescriptor; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.IconLoader; +import com.intellij.openapi.util.text.StringUtil; import com.intellij.util.ArrayUtil; import com.intellij.util.Function; import com.redhat.devtools.intellij.common.tree.LabelAndIconDescriptor; @@ -33,7 +34,6 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; import javax.swing.Icon; -import org.apache.commons.codec.binary.StringUtils; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -249,9 +249,9 @@ private boolean hasContextChanged(Config newConfig, Config currentConfig) { private boolean hasServerChanged(NamedContext newContext, NamedContext currentContext) { return newContext == null || currentContext == null - || !StringUtils.equals(currentContext.getContext().getCluster(), newContext.getContext().getCluster()) - || !StringUtils.equals(currentContext.getContext().getUser(), newContext.getContext().getUser()) - || !StringUtils.equals(currentContext.getContext().getNamespace(), newContext.getContext().getNamespace()); + || !StringUtil.equals(currentContext.getContext().getCluster(), newContext.getContext().getCluster()) + || !StringUtil.equals(currentContext.getContext().getUser(), newContext.getContext().getUser()) + || !StringUtil.equals(currentContext.getContext().getNamespace(), newContext.getContext().getNamespace()); } private boolean hasNewToken(NamedContext newContext, Config newConfig, NamedContext currentContext, Config currentConfig) { @@ -267,7 +267,7 @@ private boolean hasNewToken(NamedContext newContext, Config newConfig, NamedCont return false; } String currentToken = KubeConfigUtils.getUserToken(currentConfig, currentContext.getContext()); - return !StringUtils.equals(newToken, currentToken); + return !StringUtil.equals(newToken, currentToken); } protected void refresh() { diff --git a/src/main/java/com/redhat/devtools/intellij/knative/ui/toolwindow/GettingStartedToolWindow.java b/src/main/java/com/redhat/devtools/intellij/knative/ui/toolwindow/GettingStartedToolWindow.java index c19b77c..5552050 100644 --- a/src/main/java/com/redhat/devtools/intellij/knative/ui/toolwindow/GettingStartedToolWindow.java +++ b/src/main/java/com/redhat/devtools/intellij/knative/ui/toolwindow/GettingStartedToolWindow.java @@ -19,6 +19,7 @@ import com.intellij.openapi.wm.ToolWindowManager; import com.intellij.openapi.wm.ex.ToolWindowManagerListener; import com.intellij.openapi.wm.impl.ToolWindowManagerImpl; +import com.intellij.ui.content.ContentManager; import com.redhat.devtools.intellij.common.gettingstarted.GettingStartedContent; import com.redhat.devtools.intellij.common.gettingstarted.GettingStartedCourse; import com.redhat.devtools.intellij.common.gettingstarted.GettingStartedCourseBuilder; @@ -38,7 +39,8 @@ public class GettingStartedToolWindow implements ToolWindowFactory { public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) { toolWindow.setIcon(AllIcons.Toolwindows.Documentation); toolWindow.setStripeTitle("Getting Started"); - ((ToolWindowManagerImpl)ToolWindowManager.getInstance(project)).addToolWindowManagerListener(new ToolWindowManagerListener() { + ContentManager manager = toolWindow.getContentManager(); + project.getMessageBus().connect(manager).subscribe(ToolWindowManagerListener.TOPIC, new ToolWindowManagerListener() { @Override public void stateChanged(@NotNull ToolWindowManager toolWindowManager) { if (hasToShowToolWindow()) {