Example usage for org.eclipse.jgit.lib RepositoryState isRebasing

List of usage examples for org.eclipse.jgit.lib RepositoryState isRebasing

Introduction

In this page you can find the example usage for org.eclipse.jgit.lib RepositoryState isRebasing.

Prototype

public abstract boolean isRebasing();

Source Link

Usage

From source file:org.eclipse.egit.ui.internal.actions.RebaseAction.java

License:Open Source License

private boolean isInRebasingState(Repository repo) {
    if (repo == null)
        return false;

    RepositoryState state = repo.getRepositoryState();
    return state.isRebasing();
}

From source file:org.eclipse.egit.ui.internal.actions.RebaseActionHandler.java

License:Open Source License

@Override
public boolean isEnabled() {
    Repository repo = getRepository();//from  w  ww.  ja va2s .co m
    if (repo == null)
        return false;

    // Either we want this to be enabled because a new rebase can be started
    // (main action) or an active rebase can be continued, skipped or
    // aborted (menu items). Even when the main action is not enabled we
    // must enable this because otherwise the menu items can not be opened.
    RepositoryState state = repo.getRepositoryState();
    return state.isRebasing() || RebaseCurrentRefCommand.isEnabledForState(repo, state);
}