Package org.twodividedbyzero.idea.findbugs.preferences

Examples of org.twodividedbyzero.idea.findbugs.preferences.FindBugsPreferences


    // 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());
        panel.getBugTreePanel().setGroupBy(GroupBy.getSortOrderGroup(GroupBy.Package));
      }
    }
  }
View Full Code Here


    if (isProjectNotLoaded(project, presentation)) {
      Messages.showWarningDialog("Project not loaded.", "FindBugs");
      return;
    }

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    if (preferences.getBugCategories().containsValue("true") && preferences.getDetectors().containsValue("true")) {
      initWorker();
    } else {
      FindBugsPluginImpl.showToolWindowNotifier(project, "No bug categories or bug pattern detectors selected. analysis aborted.", MessageType.WARNING);
      ShowSettingsUtil.getInstance().editConfigurable(project, IdeaUtilImpl.getPluginComponent(project));
    }
View Full Code Here


  private void initWorker() {
    final com.intellij.openapi.project.Project project = IdeaUtilImpl.getProject(_dataContext);

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    if (Boolean.valueOf(preferences.getProperty(FindBugsPreferences.TOOLWINDOW_TO_FRONT))) {
      IdeaUtilImpl.activateToolWindow(getPluginInterface(project).getInternalToolWindowId(), _dataContext);
    }

    final FindBugsWorker worker = new FindBugsWorker(project);
View Full Code Here

  }


  protected boolean isDisabled(final CloudPlugin plugin) {
    final FindBugsPlugin findBugsPlugin = _toolWindowPanel.getProject().getComponent(FindBugsPlugin.class);
    final FindBugsPreferences prefs = findBugsPlugin.getPreferences();
    return prefs.isPluginDisabled(plugin.getFindbugsPluginId());
  }
View Full Code Here

    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);
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      final GroupBy[] sortOrderGroup = GroupBy.getSortOrderGroup(GroupBy.Priority);
      if(equals && !Arrays.equals(panel.getBugTreePanel().getGroupBy(), sortOrderGroup)) {
View Full Code Here

    // 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());
        panel.getBugTreePanel().setGroupBy(GroupBy.getSortOrderGroup(GroupBy.Priority));
      }
    }
  }
View Full Code Here

    if (isProjectNotLoaded(project, presentation)) {
      Messages.showWarningDialog("Project not loaded.", "FindBugs");
      return;
    }

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    if (preferences.getBugCategories().containsValue("true") && preferences.getDetectors().containsValue("true")) {
      initWorker();
    } else {
      FindBugsPluginImpl.showToolWindowNotifier(project, "No bug categories or bug pattern detectors selected. analysis aborted.", MessageType.WARNING);
      ShowSettingsUtil.getInstance().editConfigurable(project, IdeaUtilImpl.getPluginComponent(project));
    }
View Full Code Here

  @edu.umd.cs.findbugs.annotations.SuppressFBWarnings({"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"}) // action is not enabled
  @SuppressWarnings("ConstantConditions")
  private void initWorker() {
    final com.intellij.openapi.project.Project project = IdeaUtilImpl.getProject(_dataContext);

    final FindBugsPreferences preferences = getPluginInterface(project).getPreferences();
    if (Boolean.valueOf(preferences.getProperty(FindBugsPreferences.TOOLWINDOW_TO_FRONT))) {
      IdeaUtilImpl.activateToolWindow(getPluginInterface(project).getInternalToolWindowId(), _dataContext);
    }

    final FindBugsWorker worker = new FindBugsWorker(project);
View Full Code Here

    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);
      final ToolWindowPanel panel = (ToolWindowPanel) content.getComponent();
      final GroupBy[] sortOrderGroup = GroupBy.getSortOrderGroup(GroupBy.BugRank);
      if(equals && !Arrays.equals(panel.getBugTreePanel().getGroupBy(), sortOrderGroup)) {
View Full Code Here

    // 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());
        panel.getBugTreePanel().setGroupBy(GroupBy.getSortOrderGroup(GroupBy.BugRank));
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.twodividedbyzero.idea.findbugs.preferences.FindBugsPreferences

Copyright © 2018 www.massapicom. 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.