Skip to content

Commit

Permalink
enhance: remove lang.StringUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
huangbaihua001 committed Dec 22, 2024
1 parent d1c70d3 commit aed6f05
Showing 1 changed file with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package jiux.net.plugin.restful.listener;

import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManagerListener;
import jiux.net.plugin.restful.navigator.RestServicesNavigator;
import jiux.net.plugin.utils.ToolkitUtil;
import org.jetbrains.annotations.NotNull;

public class ProjectOpenCloseListener implements ProjectManagerListener {

@Override
public void projectOpened(@NotNull Project project) {
if (ApplicationManager.getApplication().isUnitTestMode()) {
return;
}

RestServicesNavigator restServicesNavigator = RestServicesNavigator.getInstance(
project
);

restServicesNavigator.listenForProjectsChanges();

ToolkitUtil.runWhenInitialized(
project,
() -> {
if (project.isDisposed()) {
return;
}
restServicesNavigator.initToolWindow();
}
);
}
}

0 comments on commit aed6f05

Please sign in to comment.