How to get ToolWindow view instance

Answered

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;
}

}
2 comments
Comment actions Permalink

solved by MessageBus thanks!

0
Comment actions Permalink

com.intellij.openapi.wm.ToolWindowManager#getToolWindow

0

Please sign in to leave a comment.