Search in sources :

Example 1 with GitBrancher

use of git4idea.branch.GitBrancher in project intellij-community by JetBrains.

the class GitCheckoutRevisionAction method actionPerformed.

@Override
protected void actionPerformed(@NotNull GitRepository repository, @NotNull Hash commit) {
    GitBrancher brancher = GitBrancher.getInstance(repository.getProject());
    brancher.checkout(commit.asString(), false, Collections.singletonList(repository), null);
}
Also used : GitBrancher(git4idea.branch.GitBrancher)

Example 2 with GitBrancher

use of git4idea.branch.GitBrancher in project intellij-community by JetBrains.

the class GitCreateNewTag method execute.

public void execute() {
    final String name = Messages.showInputDialog(myProject, "Enter the name of new tag", "Create New Tag On " + myReference, Messages.getQuestionIcon(), "", new InputValidator() {

        @Override
        public boolean checkInput(String inputString) {
            return !StringUtil.isEmpty(inputString) && !StringUtil.containsWhitespaces(inputString);
        }

        @Override
        public boolean canClose(String inputString) {
            return !StringUtil.isEmpty(inputString) && !StringUtil.containsWhitespaces(inputString);
        }
    });
    if (name != null) {
        GitBrancher brancher = GitBrancher.getInstance(myProject);
        brancher.createNewTag(name, myReference, Collections.singletonList(myRepository), myCallInAwtAfterExecution);
    }
}
Also used : InputValidator(com.intellij.openapi.ui.InputValidator) GitBrancher(git4idea.branch.GitBrancher)

Aggregations

GitBrancher (git4idea.branch.GitBrancher)2 InputValidator (com.intellij.openapi.ui.InputValidator)1