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.Class.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.Class.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;
      }

      // enable ?
      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());
    final Content content = toolWindow.getContentManager().getContent(0);

    if (content != null) {
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      panel.getBugTreePanel().expandTree();
    }
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.isCollapsed(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 = _bugCollection != null && _bugCollection.iterator().hasNext();
      }

      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.Package.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.Package.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 ?
      final List<VirtualFile> modifiedFiles = IdeaUtilImpl.getAllModifiedFiles(_dataContext);
      if (!_running && !modifiedFiles.isEmpty()) {
        for (final VirtualFile virtualFile : modifiedFiles) {
          if (IdeaUtilImpl.isValidFileType(virtualFile.getFileType())) {
            _enabled = true;
            break;
          } else {
            _enabled = false;
          }
        }
      } else {
        _enabled = false;
      }

      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);

      // enable ?
      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
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.