Package org.twodividedbyzero.idea.findbugs.core

Examples of org.twodividedbyzero.idea.findbugs.core.FindBugsPlugin


    final Project project = DataKeys.PROJECT.getData(event.getDataContext());
    if (project == null) {
      return;
    }

    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());
View Full Code Here


    popup.showInCenterOf(signInOutLink);
  }


  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

    final Project project = DataKeys.PROJECT.getData(event.getDataContext());
    if (project == null) {
      return false;
    }

    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());
View Full Code Here

    final Project project = DataKeys.PROJECT.getData(event.getDataContext());
    if (project == null) {
      return;
    }

    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());
View Full Code Here

    return _previewEnabled;
  }


  private void checkFindBugsPlugin() {
    final FindBugsPlugin findBugsPlugin = IdeaUtilImpl.getPluginComponent(_project);
    installListeners();
    if (findBugsPlugin == null) {
      throw new IllegalStateException("Couldn't get " + FindBugsPluginConstants.TOOL_WINDOW_ID + " plugin");
    }
  }
View Full Code Here

    return ToolWindowManager.getInstance(project).getToolWindow(getPluginInterface(project).getInternalToolWindowId());
  }


  protected void isPluginAccessible(final Project project) {
    final FindBugsPlugin findBugsPlugin = project.getComponent(FindBugsPlugin.class);
    if (findBugsPlugin == null) {
      Messages.showWarningDialog("Couldn't get findbugs plugin", "FindBugs");
      throw new IllegalStateException("Couldn't get findbugs plugin");
    }
  }
View Full Code Here

    final Project project = DataKeys.PROJECT.getData(event.getDataContext());
    if (project == null) {
      return false;
    }

    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());
View Full Code Here

    final Project project = DataKeys.PROJECT.getData(event.getDataContext());
    if (project == null) {
      return;
    }

    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());
View Full Code Here

    final Project project = DataKeys.PROJECT.getData(_actionEvent.getDataContext());
    if (project == null) {
      return;
    }

    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());
View Full Code Here

    if (fileToImport == null || fileToImport.trim().isEmpty()) {
      return;
    }


    final FindBugsPlugin findBugsPlugin = getPluginInterface(project);
    final BugCollection bugCollection = findBugsPlugin.getToolWindowPanel().getBugCollection();
    if (bugCollection != null && !bugCollection.getCollection().isEmpty()) {
      //noinspection DialogTitleCapitalization
      final int result = Messages.showYesNoDialog(project, "Current result in the 'Found bugs view' will be deleted. Continue ?", "Delete found bugs?", Messages.getQuestionIcon());
      if (result == 1) {
        return;
      }
    }

    //Create a task to export the bug collection to html
    final AtomicReference<Task> importTask = new AtomicReference<Task>(new BackgroundableTask(project, "Importing Findbugs Result", true) {
      private ProgressIndicator _indicator;


      @SuppressWarnings({"IOResourceOpenedButNotSafelyClosed"})
      @Override
      public void run(@NotNull final ProgressIndicator indicator) {

        EventManagerImpl.getInstance().fireEvent(new BugReporterEventImpl(Operation.ANALYSIS_STARTED, null, 0, project.getName()));
        setProgressIndicator(indicator);
        indicator.setFraction(0.0);
        indicator.setIndeterminate(false);
        indicator.setText(fileToImport);
        try {
          _bugCollection = new SortedBugCollection();
          final FindBugsPlugin pluginComponent = IdeaUtilImpl.getPluginComponent(project);
          _importBugCollection = _bugCollection.createEmptyCollectionWithMetadata();
          final edu.umd.cs.findbugs.Project importProject = _importBugCollection.getProject();
          importProject.setGuiCallback(new PluginGuiCallback(pluginComponent));
          _importBugCollection.setDoNotUseCloud(true);
          for (final Plugin plugin : Plugin.getAllPlugins()) {
View Full Code Here

TOP

Related Classes of org.twodividedbyzero.idea.findbugs.core.FindBugsPlugin

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.