use of org.eclipse.che.plugin.svn.ide.common.threechoices.ChoiceDialog in project che by eclipse.
the class LockUnlockPresenter method showDialog.
private void showDialog(final boolean lock) {
final Project project = appContext.getRootProject();
checkState(project != null);
final Resource[] resources = appContext.getResources();
checkState(!Arrays.isNullOrEmpty(resources));
final String withoutForceLabel = getWithoutForceLabel(lock);
final String withForceLabel = getWithForceLabel(lock);
final String cancelLabel = getCancelLabel(lock);
final ConfirmCallback withoutForceCallback = new ConfirmCallback() {
@Override
public void accepted() {
doAction(lock, false, toRelative(project, resources));
}
};
final ConfirmCallback withForceCallback = new ConfirmCallback() {
@Override
public void accepted() {
doAction(lock, true, toRelative(project, resources));
}
};
final ChoiceDialog dialog = this.choiceDialogFactory.createChoiceDialog(getTitle(lock), getContent(lock), withoutForceLabel, withForceLabel, cancelLabel, withoutForceCallback, withForceCallback, null);
dialog.show();
}
Aggregations