@Override public void add(@NotNull DockableContent content, RelativePoint dropTarget) { if (isTerminalSessionContent(content)) { TerminalSessionVirtualFileImpl terminalFile = (TerminalSessionVirtualFileImpl) content.getKey(); myTerminalWidget.addTab(terminalFile.getName(), terminalFile.getTerminal()); terminalFile.getTerminal().setNextProvider(myTerminalWidget); } }
private boolean isTerminalSessionContent(DockableContent content) { return content.getKey() instanceof TerminalSessionVirtualFileImpl; }