Package com.urswolfer.intellij.plugin.gerrit.util

Examples of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder


        List<ProjectInfo> availableProjects = null;
        try {
            availableProjects = gerritUtil.getAvailableProjects(project);
        } catch (Exception e) {
            log.info(e);
            NotificationBuilder notification = new NotificationBuilder(
                    project,
                    "Couldn't get the list of Gerrit repositories",
                    gerritUtil.getErrorTextFromException(e));
            notificationService.notifyError(notification);
        }
View Full Code Here


            ByteStreams.copy(commitMessageHook, new FileOutputStream(targetFile));
            //noinspection ResultOfMethodCallIgnored
            targetFile.setExecutable(true);
        } catch (Exception e) {
            log.info(e);
            NotificationBuilder notification = new NotificationBuilder(
                    project,
                    "Couldn't set up Gerrit Commit-Message Hook. Please do it manually.",
                    gerritUtil.getErrorTextFromException(e));
            notificationService.notifyError(notification);
        }
View Full Code Here

                        return Optional.of(repository);
                    }
                }
            }
        }
        NotificationBuilder notification = new NotificationBuilder(project, "Error",
                String.format("No repository found for Gerrit project: '%s'.", gerritProjectName));
        notificationService.notifyError(notification);
        return Optional.absent();
    }
View Full Code Here

                            fetchNatively(gitRepository.getGitDir(), remote, repositoryUrl, branch, project, indicator);
                            return;
                        }
                    }
                }
                NotificationBuilder notification = new NotificationBuilder(project, "Error",
                        String.format("Could not fetch commit because no remote url matches Gerrit host.<br/>" +
                                "Git repository: '%s'.", gitRepository.getPresentableUrl()));
                notificationService.notifyError(notification);
            }
        });
View Full Code Here

            UntrackedFilesNotifier.notifyUntrackedFilesOverwrittenBy(project, platformFacade, untrackedFilesDetector.getFiles(),
                    "cherry-pick", description);
            return false;
        } else if (localChangesOverwrittenDetector.hasHappened()) {
            notificationService.notifyError(new NotificationBuilder(project, "Cherry-Pick Error",
                    "Your local changes would be overwritten by cherry-pick.<br/>Commit your changes or stash them to proceed."));
            return false;
        } else {
            notificationService.notifyError(new NotificationBuilder(project, "Cherry-Pick Error",
                    result.getErrorOutputAsHtmlString()));
            return false;
        }
    }
View Full Code Here

            gerritGitUtil.fetchChange(project, gitRepository, url, ref, fetchCallback);
        }
    }

    private void notifyError() {
        NotificationBuilder notification = new NotificationBuilder(
                project, "Cannot fetch changes",
                "No fetch information provided. If you are using Gerrit 2.8 or later, " +
                        "you need to install the plugin 'download-commands' in Gerrit."
        );
        notificationService.notifyError(notification);
View Full Code Here

        }
        SubmitInput submitInput = new SubmitInput();
        gerritUtil.postSubmit(selectedChange.get().id, submitInput, project, new Consumer<Void>() {
            @Override
            public void consume(Void aVoid) {
                NotificationBuilder notification = new NotificationBuilder(
                        project, "Change submitted", getSuccessMessage(selectedChange.get())
                ).hideBalloon();
                notificationService.notifyInformation(notification);
            }
        });
View Full Code Here

                        reviewInput,
                        project,
                        new Consumer<Void>() {
                            @Override
                            public void consume(Void result) {
                                NotificationBuilder notification = new NotificationBuilder(
                                        project, "Review posted",
                                        buildSuccessMessage(changeDetails, reviewInput))
                                        .hideBalloon();
                                notificationService.notifyInformation(notification);
                                if (finalSubmitChange) {
View Full Code Here

                        .append("</li>");

                notifiedChanges.add(change.changeId);
            }
            stringBuilder.append("</ul>");
            NotificationBuilder notification = new NotificationBuilder(
                    project,
                    "Gerrit Changes waiting for my review",
                    stringBuilder.toString()
            );
            notificationService.notifyInformation(notification);
View Full Code Here

                        hashes.add(revisionId);

                        gitCommits = GitHistoryUtils.commitsDetails(project, filePath, new SymbolicRefs(), hashes);
                    } catch (VcsException e) {
                        log.warn("Error getting Git commit details.", e);
                        NotificationBuilder notification = new NotificationBuilder(
                                project, "Cannot show change",
                                "Git error occurred while getting commit. Please check if Gerrit is configured as remote " +
                                        "for the currently used Git repository."
                        );
                        notificationService.notifyError(notification);
View Full Code Here

TOP

Related Classes of com.urswolfer.intellij.plugin.gerrit.util.NotificationBuilder

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.