use of org.eclipse.jgit.api.StashDropCommand in project egit by eclipse.
the class StashDropOperation method execute.
@Override
public void execute(IProgressMonitor monitor) throws CoreException {
IWorkspaceRunnable action = new IWorkspaceRunnable() {
@Override
public void run(IProgressMonitor pm) throws CoreException {
StashDropCommand command = Git.wrap(repo).stashDrop();
command.setStashRef(index);
try {
command.call();
repo.fireEvent(new RefsChangedEvent());
} catch (JGitInternalException e) {
throw new TeamException(e.getLocalizedMessage(), e.getCause());
} catch (GitAPIException e) {
throw new TeamException(e.getLocalizedMessage(), e.getCause());
}
}
};
ResourcesPlugin.getWorkspace().run(action, getSchedulingRule(), IWorkspace.AVOID_UPDATE, monitor);
}
Aggregations