Examples of Cloud


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

                }
            });
        }
        component.setCursor(new Cursor(Cursor.HAND_CURSOR));
        Cloud plugin = mainFrame.getBugCollection().getCloud();
        if (plugin != null) {
            component.setToolTipText(plugin.getSourceLinkToolTip(null));
        }

    }
View Full Code Here

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

        MainFrame.getInstance().setProjectAndBugCollectionInSwingThread(project, col);
        return col;
    }

    private static void initiateCommunication(SortedBugCollection col) {
        Cloud cloud = col.getCloud();
        cloud.initiateCommunication();
    }
View Full Code Here

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

    @Override
    public @Nonnull Cloud getCloud() {
        if (shouldNotUsePlugin) {
            return CloudFactory.getPlainCloud(this);
        }
        Cloud result = cloud;
        if (result == null) {
            IGuiCallback callback = getProject().getGuiCallback();
            result = cloud = CloudFactory.createCloudWithoutInitializing(this);
            try {
                CloudFactory.initializeCloud(this, result);
            } catch (Exception e) {
                LOGGER.log(Level.SEVERE, "Could not load cloud plugin "+ result.getCloudName(), e);
                callback.showMessageDialog("Unable to connect to " + result.getCloudName() + ": " + Util.getNetworkErrorMessage(e));
                if (CloudFactory.FAIL_ON_CLOUD_ERROR) {
                    throw new IllegalStateException("Could not load FindBugs Cloud plugin - to avoid this message, " +
                            "set -D" + CloudFactory.FAIL_ON_CLOUD_ERROR_PROP + "=false", e);
                }
                result = cloud = CloudFactory.getPlainCloud(this);
            }
            callback.registerCloud(getProject(), this, result);


        }
        if (!result.isInitialized()) {
            LOGGER.log(Level.SEVERE, "Cloud " + result.getCloudName() + " is not initialized ");
        }
        if (bugsPopulated) {
            result.bugsPopulated();
        }
        return result;
    }
View Full Code Here

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

        }
        return in;
    }

    public void clearCloud() {
        Cloud oldCloud = cloud;
        IGuiCallback callback = project.getGuiCallback();
        if (oldCloud != null) {
            callback.unregisterCloud(project, this, oldCloud);
            oldCloud.shutdown();
        }
        cloud = null;
    }
View Full Code Here

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

        cloud = null;
    }

    @Override
    public @Nonnull Cloud reinitializeCloud() {
        Cloud oldCloud = cloud;
        IGuiCallback callback = project.getGuiCallback();
        if (oldCloud != null) {
            callback.unregisterCloud(project, this, oldCloud);
            oldCloud.shutdown();
        }
        cloud = null;
        @Nonnull Cloud newCloud = getCloud();
        assert newCloud == cloud;
        assert cloud != null;
        assert cloud.isInitialized();
        if (bugsPopulated ) {
            cloud.bugsPopulated();
View Full Code Here

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

        }
    }

    protected void signInOrOutClicked() {
        if (_bugCollection != null) {
            final Cloud cloud = _bugCollection.getCloud();
            if (cloud.getPlugin().getId().equals("edu.umd.cs.findbugs.cloud.doNothingCloud")) {
                changeClicked();
            }
            SigninState state = cloud.getSigninState();
            if (state == SigninState.SIGNED_IN) {
                backgroundExecutor.execute(new Runnable() {
                    @Override
                    public void run() {
                        cloud.signOut();
                        refresh();
                    }
                });
                refresh();
            } else if (state.couldSignIn()) {
                backgroundExecutor.execute(new Runnable() {
                    @Override
                    public void run() {
                        try {
                            cloud.signIn();
                        } catch (Exception e) {
                            _bugCollection
                            .getProject()
                            .getGuiCallback()
                            .showMessageDialog(
View Full Code Here

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

    public boolean canSetDesignations() {
        List<BugInstance> bugs = getSelectedBugs();
        if (bugs.isEmpty()) {
            return true;
        }
        Cloud plugin = _bugCollection != null ? _bugCollection.getCloud() : null;
        if (plugin == null) {
            return false;
        }
        for(BugInstance b : bugs) {
            if (plugin.canStoreUserAnnotation(b)) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

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

                String oldValue = bug.getUserDesignationKey();
                String key = designationKey;
                if (key.equals(oldValue)) {
                    return;
                }
                Cloud plugin = _bugCollection != null ? _bugCollection.getCloud() : null;
                if (plugin != null && key.equals("I_WILL_FIX") && plugin.supportsClaims()) {
                    String claimedBy = plugin.claimedBy(bug);
                    if (claimedBy != null && !plugin.getUser().equals(claimedBy)) {
                        int result = JOptionPane.showConfirmDialog(null,
                                bug.getMessage() + "\n"
                                        + claimedBy + " has already said they will fix this issue\n"
                                        + "Do you want to also be listed as fixing this issue?\n"
                                        + "If so, please coordinate with " + claimedBy,
View Full Code Here

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

            MainFrame.getInstance().setProjectChanged(true);
            backgroundExecutor.execute(new Runnable() {
                @Override
                public void run() {
                    _bugCollection.reinitializeCloud();
                    Cloud cloud = _bugCollection.getCloud();
                    if (cloud != null) {
                        cloud.waitUntilIssueDataDownloaded();
                    }
                    updateCloudListeners(_bugCollection);
                    refresh();
                }
            });
View Full Code Here

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

        updateCloudListeners(_bugCollection);
        refresh();
    }

    private void updateCloudListeners(BugCollection newBugCollection) {
        final Cloud newCloud = newBugCollection == null ? null : newBugCollection.getCloud();
        if (_bugCollection != null) {
            //noinspection ObjectEquality
            if (lastCloud != newCloud) {
                if (lastCloud != null) {
                    lastCloud.removeStatusListener(_cloudStatusListener);
                }
            }
        }
        if (lastCloud != newCloud && newCloud != null) {
            lastCloud = newCloud;
            newCloud.addStatusListener(_cloudStatusListener);
        }
    }
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.