How to get ToolWindow view instance
已回答
How to get ToolWindow view instance?
i want to change data in ToolWindow view when AnAction completed
i want to get the instance of FastRequestToolWindow,any suggestions?
public class FastRequestToolWindowFactory implements ToolWindowFactory {
private GeneratorUrlService generatorUrlService = ServiceManager.getService(GeneratorUrlService.class);
private FastRequestToolWindow window;
@Override
public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
window = new FastRequestToolWindow(toolWindow);
ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
//displayName="" let content in first tab
Content content = contentFactory.createContent(window.getContent(), "", false);
toolWindow.getContentManager().addContent(content);
}
public FastRequestToolWindow getWindow(){
return window;
}
}
请先登录再写评论。
solved by MessageBus thanks!
com.intellij.openapi.wm.ToolWindowManager#getToolWindow