@Override @NotNull public Content createContent(@NotNull final String contentId, @NotNull final ComponentWithActions withActions, @NotNull final String displayName, @Nullable final Icon icon, @Nullable final JComponent toFocus) { final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false); content.putUserData(CONTENT_TYPE, contentId); content.putUserData(ViewImpl.ID, contentId); content.setIcon(icon); if (toFocus != null) { content.setPreferredFocusableComponent(toFocus); } if (!withActions.isContentBuiltIn()) { content.setSearchComponent(withActions.getSearchComponent()); content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent()); } return content; }
@Override @Nonnull public Content createContent(@Nonnull final String contentId, @Nonnull final ComponentWithActions withActions, @Nonnull final String displayName, @Nullable final Icon icon, @Nullable final JComponent toFocus) { final Content content = getContentFactory().createContent(withActions.getComponent(), displayName, false); content.putUserData(CONTENT_TYPE, contentId); content.putUserData(ViewImpl.ID, contentId); content.setIcon(icon); if (toFocus != null) { content.setPreferredFocusableComponent(toFocus); } if (!withActions.isContentBuiltIn()) { content.setSearchComponent(withActions.getSearchComponent()); content.setActions(withActions.getToolbarActions(), withActions.getToolbarPlace(), withActions.getToolbarContextComponent()); } return content; }
public Content addAdditionalTabComponent(@NotNull AdditionalTabComponent tabComponent, @NotNull String id, @Nullable Icon icon) { Content logContent = getUi().createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(), icon, tabComponent.getPreferredFocusableComponent()); myAdditionalContent.put(tabComponent, logContent); getUi().addContent(logContent); return logContent; }
public Content addAdditionalTabComponent(@Nonnull AdditionalTabComponent tabComponent, @Nonnull String id, @Nullable Icon icon) { Content logContent = getUi().createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(), icon, tabComponent.getPreferredFocusableComponent()); myAdditionalContent.put(tabComponent, logContent); getUi().addContent(logContent); return logContent; }
@NotNull Content createContent(@NotNull String contentId, @NotNull ComponentWithActions contentWithActions, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent toFocus);
@Override @NotNull public Content createContent(@NotNull String id, @NotNull JComponent component, @NotNull String displayName, @Nullable Icon icon, @Nullable JComponent focusable) { return createContent(id, new ComponentWithActions.Impl(component), displayName, icon, focusable); }
@NotNull public ComponentWithActions createComponent() { return new ComponentWithActions.Impl(getToolbarActions(), null, null, null, myContentPane); }
@Override @NotNull public XDebugTabLayouter createTabLayouter() { final CloudDebugProcessHandler handler = (CloudDebugProcessHandler) getProcessHandler(); return new XDebugTabLayouter() { @Override public void registerAdditionalContent(@NotNull RunnerLayoutUi layout) { layout.removeContent(layout.findContent(DebuggerContentInfo.WATCHES_CONTENT), false); // remove console since the cloud debugger doesn't use it // https://github.com/GoogleCloudPlatform/gcloud-intellij/issues/141 Content consoleContent = layout.findContent(DebuggerContentInfo.CONSOLE_CONTENT); if (consoleContent != null) { layout.removeContent(consoleContent, false); } Content frameContent = layout.findContent(DebuggerContentInfo.FRAME_CONTENT); if (frameContent != null) { layout.removeContent(frameContent, false); layout.addContent(frameContent, 0, PlaceInGrid.center, false); } Content variablesContent = layout.findContent(DebuggerContentInfo.VARIABLES_CONTENT); if (variablesContent != null) { layout.removeContent(variablesContent, false); layout.addContent(variablesContent, 0, PlaceInGrid.right, false); } CloudDebugHistoricalSnapshots timeline = new CloudDebugHistoricalSnapshots(handler); timeline.onBreakpointListChanged(getProcessState()); Content snapshots = layout.createContent( timeline.getTabTitle(), (ComponentWithActions) timeline, timeline.getTabTitle(), GoogleCloudToolsIcons.STACKDRIVER_DEBUGGER, null); layout.addContent(snapshots, 0, PlaceInGrid.left, false); layout .getDefaults() .initFocusContent( timeline.getTabTitle(), LayoutViewOptions.STARTUP, new LayoutAttractionPolicy.FocusOnce(false)); } }; }
protected Content createLogContent(AdditionalTabComponent tabComponent, String id, Icon icon) { return getUi().createContent(id, (ComponentWithActions)tabComponent, tabComponent.getTabTitle(), icon, tabComponent.getPreferredFocusableComponent()); }
@Nonnull Content createContent(@Nonnull String contentId, @Nonnull ComponentWithActions contentWithActions, @Nonnull String displayName, @Nullable Icon icon, @Nullable JComponent toFocus);
@Override @Nonnull public Content createContent(@Nonnull String id, @Nonnull JComponent component, @Nonnull String displayName, @Nullable Icon icon, @Nullable JComponent focusable) { return createContent(id, new ComponentWithActions.Impl(component), displayName, icon, focusable); }