Java 类com.intellij.ui.content.ContentManagerListener 实例源码

项目:ali-idea-plugin    文件:AliContentFactory.java   
public static DevMotivePanel addDevMotiveContent(Project project, VirtualFile file, List<VcsFileRevision> revisions, String vcsName, ContentManagerListener listener, boolean select) {
    ApplicationManager.getApplication().assertIsDispatchThread();

    ToolWindowManager toolWindowManager = project.getComponent(ToolWindowManager.class);
    ToolWindow toolWindow = toolWindowManager.getToolWindow(TOOL_WINDOW_MAIN);
    ContentManager contentManager = toolWindow.getContentManager();

    Content content = findDevMotiveContent(toolWindow, file);
    if (content == null) {
        contentManager = toolWindow.getContentManager();
        int idx = contentManager.getContentCount();
        DevMotivePanel devMotivePanel = new DevMotivePanel(project, file, revisions, vcsName);
        content = ContentFactory.SERVICE.getInstance().createContent(devMotivePanel, devMotivePanel.getName(), false);
        contentManager.addContent(content, idx);
    } else if (revisions != null) {
        ((DevMotive) content.getComponent()).load(revisions);
    }
    if (select) {
        contentManager.setSelectedContent(content);
    }
    if (listener != null) {
        contentManager.addContentManagerListener(listener);
    }
    return (DevMotivePanel) content.getComponent();
}
项目:intellij-ce-playground    文件:RunnerLayoutUiImpl.java   
@NotNull
@Override
public RunnerLayoutUi addListener(@NotNull final ContentManagerListener listener, @NotNull final Disposable parent) {
  final ContentManager mgr = getContentManager();
  mgr.addContentManagerListener(listener);
  Disposer.register(parent, new Disposable() {
    @Override
    public void dispose() {
      mgr.removeContentManagerListener(listener);
    }
  });
  return this;
}
项目:tools-idea    文件:RunnerLayoutUiImpl.java   
@NotNull
@Override
public RunnerLayoutUi addListener(@NotNull final ContentManagerListener listener, @NotNull final Disposable parent) {
  final ContentManager mgr = getContentManager();
  mgr.addContentManagerListener(listener);
  Disposer.register(parent, new Disposable() {
    @Override
    public void dispose() {
      mgr.removeContentManagerListener(listener);
    }
  });
  return this;
}
项目:consulo    文件:RunnerLayoutUiImpl.java   
@Nonnull
@Override
public RunnerLayoutUi addListener(@Nonnull final ContentManagerListener listener, @Nonnull final Disposable parent) {
  final ContentManager mgr = getContentManager();
  mgr.addContentManagerListener(listener);
  Disposer.register(parent, new Disposable() {
    @Override
    public void dispose() {
      mgr.removeContentManagerListener(listener);
    }
  });
  return this;
}
项目:intellij-ce-playground    文件:RunnerLayoutUi.java   
@NotNull
RunnerLayoutUi addListener(@NotNull ContentManagerListener listener, @NotNull Disposable parent);
项目:intellij-ce-playground    文件:RunnerLayoutUiImpl.java   
@Override
public void removeListener(@NotNull final ContentManagerListener listener) {
  getContentManager().removeContentManagerListener(listener);
}
项目:tools-idea    文件:ToolWindowHeadlessManagerImpl.java   
@Override
public void addContentManagerListener(@NotNull final ContentManagerListener l) {
}
项目:tools-idea    文件:ToolWindowHeadlessManagerImpl.java   
@Override
public void removeContentManagerListener(@NotNull final ContentManagerListener l) {
}
项目:tools-idea    文件:RunnerLayoutUi.java   
@NotNull
RunnerLayoutUi addListener(@NotNull ContentManagerListener listener, @NotNull Disposable parent);
项目:tools-idea    文件:RunnerLayoutUiImpl.java   
@Override
public void removeListener(@NotNull final ContentManagerListener listener) {
  getContentManager().removeContentManagerListener(listener);
}
项目:consulo    文件:ToolWindowHeadlessManagerImpl.java   
@Override
public void addContentManagerListener(@Nonnull final ContentManagerListener l) {
  myDispatcher.getListeners().add(0, l);
}
项目:consulo    文件:ToolWindowHeadlessManagerImpl.java   
@Override
public void removeContentManagerListener(@Nonnull final ContentManagerListener l) {
  myDispatcher.removeListener(l);
}
项目:consulo    文件:RunnerLayoutUi.java   
@Nonnull
RunnerLayoutUi addListener(@Nonnull ContentManagerListener listener, @Nonnull Disposable parent);
项目:consulo    文件:RunnerLayoutUiImpl.java   
@Override
public void removeListener(@Nonnull final ContentManagerListener listener) {
  getContentManager().removeContentManagerListener(listener);
}
项目:intellij-ce-playground    文件:RunnerLayoutUi.java   
void removeListener(@NotNull final ContentManagerListener listener);
项目:tools-idea    文件:RunnerLayoutUi.java   
void removeListener(@NotNull final ContentManagerListener listener);
项目:consulo    文件:RunnerLayoutUi.java   
void removeListener(@Nonnull final ContentManagerListener listener);