Package edu.umd.cs.findbugs

Examples of edu.umd.cs.findbugs.Project


        } else {
            bugCollection.readXML(System.in);
        }

        SortedBugCollection results = bugCollection.createEmptyCollectionWithMetadata();
        Project project = results.getProject();
        project.getSourceDirList().clear();
        project.getFileList().clear();
        project.getAuxClasspathEntryList().clear();

        results.getProjectStats().getPackageStats().clear();
        results.clearMissingClasses();
        results.clearErrors();
View Full Code Here


        }
        ProjectStats stats = result.getProjectStats();
        ProjectStats stats2 = newCollection.getProjectStats();
        stats.addStats(stats2);

        Project project = result.getProject();
        project.add(newCollection.getProject());

        return result;
    }
View Full Code Here

        }

        cloud = results.getCloud();
        cloud.waitUntilIssueDataDownloaded();
        isConnectedToCloud = !(cloud instanceof BugCollectionStorageCloud);
        Project project = results.getProject();
        originalMode = cloud.getMode();

        cloud.setMode(Cloud.Mode.COMMUNAL);
        long old = System.currentTimeMillis() - options.maxAge * (24 * 3600 * 1000L);
        if (options.baselineDate != null) {
            long old2 = options.baselineDate.getTime();
            if (old2 > old) {
                old = old2;
            }
        }

        scaryBugs = results.createEmptyCollectionWithMetadata();
        for (BugInstance warning : results.getCollection()) {
            if (!project.getSuppressionFilter().match(warning)) {
                int rank = BugRanker.findRank(warning);
                if (rank > BugRanker.VISIBLE_RANK_MAX) {
                    continue;
                }
                if (cloud.getConsensusDesignation(warning).score() < 0) {
View Full Code Here

    }

    static SortedBugCollection createPreconfiguredBugCollection(List<String> workingDirList, List<String> srcDirList,
            IGuiCallback guiCallback) {
        Project project = new Project();
        for (String cwd : workingDirList) {
            project.addWorkingDir(cwd);
        }
        for (String srcDir : srcDirList) {
            project.addSourceDir(srcDir);
        }
        project.setGuiCallback(guiCallback);
        return new SortedBugCollection(project);
    }
View Full Code Here

    }

    public static CloudPlugin getCloudPlugin(BugCollection bc) {
        CloudPlugin plugin = null;
        Project project = bc.getProject();
        assert project != null;
        String cloudId = project.getCloudId();
        if (cloudId != null) {
            plugin = DetectorFactoryCollection.instance().getRegisteredClouds().get(cloudId);
            if (plugin == null && FAIL_ON_CLOUD_ERROR) {
                throw new IllegalArgumentException("Cannot find registered cloud for " + cloudId);
            }
        }
        // is the desired plugin disabled for this project (and/or globally)? if so, skip it.
        if (plugin != null) {
            Plugin fbplugin = Plugin.getByPluginId(plugin.getFindbugsPluginId());
            //noinspection PointlessBooleanExpression
            if (fbplugin != null && Boolean.FALSE.equals(project.getPluginStatus(fbplugin))) {
                plugin = null; // use default cloud below
            }
        }
        if (plugin == null) {
            if (DEFAULT_CLOUD != null) {
View Full Code Here

    }

    public static @CheckForNull
    Project loadProject(MainFrame mainFrame, File f) {
        try {
            Project project = Project.readXML(f);
            project.setGuiCallback(mainFrame.getGuiCallback());
            return project;
        } catch (IOException e) {
            JOptionPane.showMessageDialog(mainFrame, "Could not read " + f + "; " + e.getMessage());
        } catch (SAXException e) {
            JOptionPane.showMessageDialog(mainFrame, "Could not read  project from " + f + "; " + e.getMessage());
View Full Code Here

        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                mainFrame.acquireDisplayWait();
                try {
                    Project project = new Project();
                    project.setGuiCallback(mainFrame.getGuiCallback());
                    project.setCurrentWorkingDirectory(file.getParentFile());
                    BugLoader.loadBugs(mainFrame, project, file);
                    project.getSourceFinder(); // force source finder to be
                    // initialized
                    mainFrame.updateBugTree();
                } finally {
                    mainFrame.releaseDisplayWait();
                }
View Full Code Here

        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                mainFrame.acquireDisplayWait();
                try {
                    Project project = new Project();
                    project.setGuiCallback(mainFrame.getGuiCallback());
                    BugLoader.loadBugs(mainFrame, project, url);
                    project.getSourceFinder(); // force source finder to be
                    // initialized
                    mainFrame.updateBugTree();
                } finally {
                    mainFrame.releaseDisplayWait();
                }
View Full Code Here

    void loadProjectFromFile(final File f) {

        Runnable runnable = new Runnable() {
            @Override
            public void run() {
                final Project project = BugLoader.loadProject(mainFrame, f);
                final BugCollection bc = project == null ? null : BugLoader.doAnalysis(project);
                mainFrame.updateProjectAndBugCollection(bc);
                mainFrame.setProjectAndBugCollectionInSwingThread(project, bc);
            }
        };
View Full Code Here

        getTree().getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
        getTree().setCellRenderer(new BugRenderer());
        getTree().setRowHeight((int) (Driver.getFontSize() + 7));
        getTree().setModel(new BugTreeModel(mainFrame, getTree(), getSorter(), new BugSet(new ArrayList<BugLeafNode>())));
        setupTreeListeners();
        mainFrame.setProject(new Project());

        treeScrollPane = new JScrollPane(getTree());

        treePanel = new JPanel(new BorderLayout());
        treePanel.add(treeScrollPane, BorderLayout.CENTER);
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.Project

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.