use of org.eclipse.egit.ui.internal.history.GitHistoryPage in project egit by eclipse.
the class CheckoutCommitHandler method isEnabled.
@Override
public boolean isEnabled() {
GitHistoryPage page = getPage();
if (page == null)
return false;
IStructuredSelection sel = getSelection(page);
return sel.size() == 1 && sel.getFirstElement() instanceof RevCommit;
}
use of org.eclipse.egit.ui.internal.history.GitHistoryPage in project egit by eclipse.
the class CompareWithWorkingTreeHandler method isEnabled.
@Override
public boolean isEnabled() {
GitHistoryPage page = getPage();
if (page == null)
return false;
int size = getSelection(page).size();
if (size != 1)
return false;
return page.getInputInternal().isSingleFile();
}
use of org.eclipse.egit.ui.internal.history.GitHistoryPage in project egit by eclipse.
the class CreateBranchOnCommitHandler method isEnabled.
@Override
public boolean isEnabled() {
GitHistoryPage page = getPage();
if (page == null)
return false;
IStructuredSelection sel = getSelection(page);
return sel.size() == 1 && sel.getFirstElement() instanceof RevCommit;
}
use of org.eclipse.egit.ui.internal.history.GitHistoryPage in project egit by eclipse.
the class CreateTagOnCommitHandler method isEnabled.
@Override
public boolean isEnabled() {
GitHistoryPage page = getPage();
if (page == null)
return false;
IStructuredSelection sel = getSelection(page);
return sel.size() == 1 && sel.getFirstElement() instanceof RevCommit;
}
use of org.eclipse.egit.ui.internal.history.GitHistoryPage in project egit by eclipse.
the class DeleteBranchOnCommitHandler method isEnabled.
@Override
public boolean isEnabled() {
GitHistoryPage page = getPage();
Repository repository = getRepository(page);
if (repository == null)
return false;
List<Ref> branchesOfCommit;
try {
branchesOfCommit = getBranchesOfCommit(getSelection(page), repository, true);
} catch (IOException e) {
Activator.logError(UIText.AbstractHistoryCommitHandler_cantGetBranches, e);
return false;
}
return !branchesOfCommit.isEmpty();
}
Aggregations