Examples of FindBugsPlugin


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

    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

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


  public BugReporter(final Project project, final boolean isInspectionRun, final SortedBugCollection bugCollection, final FindBugsProject findBugsProject) {
    //this.monitor = monitor;
    _project = project;
        final FindBugsPlugin pluginComponent = IdeaUtilImpl.getPluginComponent(project);
        _preferences = pluginComponent.getPreferences();
    _isInspectionRun = isInspectionRun;
    _bugCollection = bugCollection;
    _findBugsProject = findBugsProject;
  }
View Full Code Here

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

    final Project project = DataKeys.PROJECT.getData(e.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

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

    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

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

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

    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

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

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

    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

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

  }


  @Nullable
  public LineMarkerInfo<?> getLineMarkerInfo(final PsiElement psiElement) {
    final FindBugsPlugin pluginComponent = IdeaUtilImpl.getPluginComponent(psiElement.getProject());
    if (! pluginComponent.getPreferences().isAnnotationGutterIconEnabled()) {
      return null;
    }

    if(!_isRegistered) {
      EventManagerImpl.getInstance().addEventListener(new BugReporterEventFilter(psiElement.getProject().getName()), this);
      _isRegistered = true;
    }
    if(_analysisRunning) {
      return null;
    }

    final PsiFile psiFile = IdeaUtilImpl.getPsiFile(psiElement);
    _problemCache = pluginComponent.getProblems();

    if (_problemCache.containsKey(psiFile)) {
      final List<ExtendedProblemDescriptor> matchingDescriptors = new ArrayList<ExtendedProblemDescriptor>();
      final List<ExtendedProblemDescriptor> problemDescriptors = _problemCache.get(psiFile);
      if (problemDescriptors == null) {
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.