Examples of ToolWindow


Examples of com.intellij.openapi.wm.ToolWindow

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());
    registerEventListener(project);

    // toggle value
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
      final String groupByProperty = preferences.getProperty(FindBugsPreferences.TOOLWINDOW_GROUP_BY, GroupBy.BugCategory.name());

      final boolean equals = GroupBy.Priority.name().equals(groupByProperty);
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());

    // toggle value
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
      if (selected) {
        preferences.setProperty(FindBugsPreferences.TOOLWINDOW_GROUP_BY, GroupBy.Priority.name());
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      registerEventListener(project);

      // enable ?
      if (!_running) {
        _enabled = project != null && project.isInitialized() && project.isOpen();
      }
      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistred(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      // selected ?
      final Boolean selected = isSelected(event) ? Boolean.TRUE : Boolean.FALSE;
      presentation.putClientProperty(SELECTED_PROPERTY, selected);
      //setSelected(event, isSelected(event));

      // enable ?
      if (isRunning() && selected || !isRunning()) {
        _enabled = Boolean.TRUE;
      }

      //_enabled = isRunning() && selected ? ;
      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());
    registerEventListener(project);

    // toggle value
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
      final String groupByProperty = preferences.getProperty(FindBugsPreferences.TOOLWINDOW_GROUP_BY, GroupBy.BugCategory.name());

      final boolean equals = GroupBy.BugRank.name().equals(groupByProperty);
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());

    // toggle value
    final Content content = toolWindow.getContentManager().getContent(0);
    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
      if (selected) {
        preferences.setProperty(FindBugsPreferences.TOOLWINDOW_GROUP_BY, GroupBy.BugRank.name());
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }

    final ToolWindow toolWindow = ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());
    final Content content = toolWindow.getContentManager().getContent(0);

    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      panel.getBugTreePanel().collapseTree();
    }
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      // enable ?
      final Content content = toolWindow.getContentManager().getContent(0);

      if (content != null) {
        final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
        final JTree tree = panel.getBugTreePanel().getBugTree();
        _enabled = tree.isExpanded(1) && tree.getRowCount() > 1;
        presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
        presentation.setVisible(true);
      }
    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow

      }

      isPluginAccessible(project);

      // check if tool window is registered
      final ToolWindow toolWindow = isToolWindowRegistered(project);
      if (toolWindow == null) {
        presentation.setEnabled(false);
        presentation.setVisible(false);

        return;
      }

      registerEventListener(project);

      if (!_running) {
        _enabled = _importBugCollection == null;
      }

      presentation.setEnabled(toolWindow.isAvailable() && isEnabled());
      presentation.setVisible(true);

    } catch (final Throwable e) {
      final FindBugsPluginException processed = FindBugsPluginImpl.processError("Action update failed", e);
      LOGGER.error("Action update failed", processed);
View Full Code Here

Examples of com.intellij.openapi.wm.ToolWindow


  public static void activateToolWindow(final String toolWindowId, @NotNull final DataContext dataContext) {
    EventDispatchThreadHelper.invokeLater(new Runnable() {
      public void run() {
        final ToolWindow toolWindow = getToolWindowById(toolWindowId, dataContext);
        activateToolWindow(toolWindow);
      }
    });
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.