Examples of Cloud


Examples of edu.umd.cs.findbugs.cloud.Cloud

        statusBarLabel.setText(msg);
    }

    private String updateCloudSigninStatus(String msg) {
        if (getBugCollection() != null) {
            Cloud cloud = getBugCollection().getCloud();
            String pluginMsg = cloud.getStatusMsg();
            if (pluginMsg != null && pluginMsg.length() > 1) {
                msg = join(msg, pluginMsg);
            }
        }
        return msg;
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

        guiLayout.saveState();
        guiSaveState.setFrameBounds(getBounds());
        guiSaveState.setExtendedWindowState(getExtendedState());
        guiSaveState.save();
        if (this.bugCollection != null) {
            Cloud cloud = this.bugCollection.getCloud();
            cloud.shutdown();
        }
        System.exit(0);
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

        }
        acquireDisplayWait();
        try {

            if (this.bugCollection != bugCollection && this.bugCollection != null) {
                Cloud plugin = this.bugCollection.getCloud();
                plugin.removeListener(userAnnotationListener);
                plugin.removeStatusListener(cloudStatusListener);
                plugin.shutdown();
            }
            // setRebuilding(false);
            setProject(project);
            this.bugCollection = bugCollection;
            BugLoader.addDeadBugMatcher(bugCollection);

            comments.updateBugCollection();
            displayer.clearCache();
            if (bugCollection != null) {
                Cloud plugin = bugCollection.getCloud();
                plugin.addListener(userAnnotationListener);
                plugin.addStatusListener(cloudStatusListener);
            }
            mainFrameTree.updateBugTree();
            setProjectChanged(false);
            Runnable runnable = new Runnable() {
                @Override
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

        PreferencesFrame.getInstance().setLocationRelativeTo(this);
        PreferencesFrame.getInstance().setVisible(true);
    }

    public void displayCloudReport() {
        Cloud cloud = this.bugCollection.getCloud();
        cloud.waitUntilIssueDataDownloaded();
        StringWriter stringWriter = new StringWriter();
        PrintWriter writer = new PrintWriter(stringWriter);
        cloud.printCloudSummary(writer, getDisplayedBugs(), viewFilter.getPackagePrefixes());
        writer.close();
        String report = stringWriter.toString();
        DisplayNonmodelMessage.displayNonmodelMessage("Cloud summary", report, this, false);

    }
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

        JMenuItem toggleItem = new JMenuItem(text);

        toggleItem.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent arg0) {
                Cloud cloud = getBugCollection().getCloud();
                if (cloud instanceof DoNothingCloud) {
                    JOptionPane.showMessageDialog(MainFrame.this, "No cloud selected; enable and select optional Bug Collection XML Pseudo-Cloud plugin to store designations in XML");
                } else if (comments.canSetDesignations()) {
                    comments.setDesignation(key);
                } else {
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

            mainFrameTree.rebuildBugTreeIfSortablesDependOnCloud();
        }

        @Override
        public void handleStateChange(SigninState oldState, SigninState state) {
            Cloud cloud = MainFrame.this.bugCollection.getCloudLazily();
            if (cloud != null && cloud.isInitialized()) {
                mainFrameTree.rebuildBugTreeIfSortablesDependOnCloud();
            }
        }
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

            bugCollection.reinitializeCloud();
        }
    }

    public void sync() {
        Cloud cloud = bugCollection.getCloud();
        cloud.initiateCommunication();
        cloud.waitUntilIssueDataDownloaded();
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

    public void report(PrintWriter out) {
        TreeMap<BugRankCategory, Stats> stats = new TreeMap<BugRankCategory, Stats>();
        ProjectStats projectStats = bugCollection.getProjectStats();
        Collection<BugInstance> bugs = bugCollection.getCollection();
        Cloud cloud = bugCollection.getCloud();
        cloud.setMode(Cloud.Mode.COMMUNAL);

        out.printf("Cloud sync and summary report for %s%n", bugCollection.getProject().getProjectName());

        out.printf("Code dated %s%n", new Date(bugCollection.getTimestamp()));
        out.printf("Code analyzed %s%n", new Date(bugCollection.getAnalysisTimestamp()));

        out.printf("%7d total classes%n", projectStats.getNumClasses());
        out.printf("%7d total issues%n", bugs.size());
        long recentTimestamp = System.currentTimeMillis() - options.ageInHours * 3600 * 1000L;
        int allRecentIssues = 0;

        for (BugInstance b : bugs) {
            Stats s = stats.get(BugRankCategory.getRank(b.getBugRank()));
            if (s == null) {
                s = new Stats();
                stats.put(BugRankCategory.getRank(b.getBugRank()), s);
            }
            s.total++;
            long firstSeen = cloud.getFirstSeen(b);
            if (firstSeen > recentTimestamp) {
                s.recent++;
                allRecentIssues++;
            }

        }
        out.printf("%7d recent issues%n", allRecentIssues);

        if (options.cloudSummary != null && cloud.supportsCloudSummaries()) {
            try {
                PrintWriter cs = UserTextFile.printWriter(options.cloudSummary);
                cs.printf("%6s %6s %s%n", "recent", "total", "Rank category");
                for (Entry<BugRankCategory, Stats> e : stats.entrySet()) {
                    Stats s = e.getValue();
                    if (s.total > 0) {
                        cs.printf("%6d %6d %s%n", s.recent, s.total, e.getKey());
                    }
                }
                cs.println();
                cloud.printCloudSummary(cs, bugs, null);
                cs.close();
            } catch (Exception e) {
                out.println("Error writing cloud summary to " + options.cloudSummary);
                e.printStackTrace(out);
            }
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

        }

    }

    public void shutdown() {
        Cloud cloud = bugCollection.getCloud();
        cloud.shutdown();
    }
View Full Code Here

Examples of edu.umd.cs.findbugs.cloud.Cloud

    void setSourceTab(String title, @CheckForNull BugInstance bug) {
        JComponent label = mainFrame.getGuiLayout().getSourceViewComponent();
        if (label != null) {
            URL u = null;
            if (bug != null) {
                Cloud plugin = mainFrame.getBugCollection().getCloud();
                if (plugin.supportsSourceLinks()) {
                    u = plugin.getSourceLink(bug);
                }
            }
            if (u != null) {
                addLink(label, u);
            } else {
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.