Package org.twodividedbyzero.idea.findbugs.collectors

Examples of org.twodividedbyzero.idea.findbugs.collectors.RecurseClassCollector


  @Nullable
  public static PsiElement findAnonymousClassPsiElement(@Nullable final PsiFileSystemItem psiFile, @NotNull final BugInstanceNode bugInstanceNode, @NotNull final Project project) {
    if (psiFile != null) {
      final String classNameToFind = BugInstanceUtil.getSimpleClassName(bugInstanceNode.getBugInstance());
      final RecurseClassCollector recurseClassCollector = new RecurseClassCollector(null, project, false);
      recurseClassCollector.addContainingClasses(psiFile.getVirtualFile());
      final Map<String, PsiElement> result = recurseClassCollector.getResult();

      for (final Entry<String, PsiElement> entry : result.entrySet()) {
        final String fileName = new File(entry.getKey()).getName();
        if (fileName.equals(classNameToFind + RecurseClassCollector.CLASS_FILE_SUFFIX)) {
          return entry.getValue();
View Full Code Here


    //final com.intellij.openapi.project.Project project = IdeaUtilImpl.getProject(dataContext);
    final VirtualFile vFile = IdeaUtilImpl.getVirtualFile(selectedPsiClass);
    if (vFile != null) {
      _outputFiles = Arrays.asList(vFile.getPath());

      final RecurseClassCollector classCollector = new RecurseClassCollector(this, project);
      //classCollector.setVirtualFile(file);
      classCollector.addContainingClasses(selectedPsiClass);

      // clear for gc
      classCollector.getResult().clear();
    }
  }
View Full Code Here

  public void configureOutputFiles(final com.intellij.openapi.project.Project project, final VirtualFile[] selectedSourceFiles) {
    //final com.intellij.openapi.project.Project project = IdeaUtilImpl.getProject(dataContext);
    _outputFiles = asPathList(selectedSourceFiles);

    RecurseClassCollector classCollector = null;
    for (final VirtualFile file : selectedSourceFiles) {
      if (IdeaUtilImpl.isValidFileType(file.getFileType())) {
        classCollector = new RecurseClassCollector(this, project);
        //classCollector.setVirtualFile(file);
        classCollector.addContainingClasses(file);
      }
    }

    // clear for gc
    if (classCollector != null) {
      classCollector.getResult().clear();
    }
  }
View Full Code Here

TOP

Related Classes of org.twodividedbyzero.idea.findbugs.collectors.RecurseClassCollector

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.