@Override public void attachToProcess(ProcessHandler processHandler) { myProcessHandler = processHandler; myPrimaryConsoleView.attachToProcess(processHandler); mySecondaryConsoleView.attachToProcess(processHandler); }
@NotNull @Override public AnAction[] createConsoleActions() { List<AnAction> actions = Lists.newArrayList(); actions.addAll(Arrays.asList(myPrimaryConsoleView.createConsoleActions())); actions.add(mySwitchConsoleAction); return ArrayUtil.toObjectArray(actions, AnAction.class); }
public DuplexConsoleView( @NotNull S primaryConsoleView, @NotNull T secondaryConsoleView, @Nullable String stateStorageKey) { super(new CardLayout()); myPrimaryConsoleView = primaryConsoleView; mySecondaryConsoleView = secondaryConsoleView; myStateStorageKey = stateStorageKey; add(myPrimaryConsoleView.getComponent(), PRIMARY_CONSOLE_PANEL); add(mySecondaryConsoleView.getComponent(), SECONDARY_CONSOLE_PANEL); mySwitchConsoleAction = new SwitchDuplexConsoleViewAction(); myPrimary = true; enableConsole(getStoredState()); Disposer.register(this, myPrimaryConsoleView); Disposer.register(this, mySecondaryConsoleView); }
@Override public void allowHeavyFilters() { myPrimaryConsoleView.allowHeavyFilters(); }
@Override public int getContentSize() { return myPrimaryConsoleView.getContentSize(); }
@Override public void printHyperlink(String hyperlinkText, HyperlinkInfo info) { myPrimaryConsoleView.printHyperlink(hyperlinkText, info); mySecondaryConsoleView.printHyperlink(hyperlinkText, info); }
@Override public void addMessageFilter(Filter filter) { myPrimaryConsoleView.addMessageFilter(filter); mySecondaryConsoleView.addMessageFilter(filter); }
@Override public void setHelpId(String helpId) { myPrimaryConsoleView.setHelpId(helpId); mySecondaryConsoleView.setHelpId(helpId); }
@Override public boolean hasDeferredOutput() { return myPrimaryConsoleView.hasDeferredOutput() && mySecondaryConsoleView.hasDeferredOutput(); }
@Override public void setOutputPaused(boolean value) { myPrimaryConsoleView.setOutputPaused(value); mySecondaryConsoleView.setOutputPaused(value); }
@Override public void scrollTo(int offset) { myPrimaryConsoleView.scrollTo(offset); mySecondaryConsoleView.scrollTo(offset); }
@Override public void clear() { myPrimaryConsoleView.clear(); mySecondaryConsoleView.clear(); }
@Override public void print(@NotNull String s, @NotNull ConsoleViewContentType contentType) { myPrimaryConsoleView.print(s, contentType); mySecondaryConsoleView.print(s, contentType); }