use of org.freeplane.plugin.workspace.io.CancelExecutionException in project freeplane by freeplane.
the class FileExistsConflictDialog method resolveConflict.
public void resolveConflict(File file, Properties properties) throws IOException {
if (properties == null) {
properties = new Properties();
}
FileExistsDialogPanel dialog = new FileExistsDialogPanel(file, FileExistsDialogPanel.class.getSimpleName().toLowerCase(Locale.ENGLISH) + ".file.text");
int opt = JOptionPane.showConfirmDialog(UITools.getFrame(), dialog, TextUtils.getText("workspace.fileexists.title." + properties.getProperty("opType", "1")), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
if (opt == JOptionPane.CANCEL_OPTION) {
throw new CancelExecutionException();
}
if (opt == JOptionPane.NO_OPTION) {
throw new SkipTaskException();
}
properties.setProperty("overwriteAll", String.valueOf(dialog.applyToAll()));
}
use of org.freeplane.plugin.workspace.io.CancelExecutionException in project freeplane by freeplane.
the class DirectoryMergeConflictDialog method resolveConflict.
public void resolveConflict(File file, Properties properties) throws IOException {
if (properties == null) {
properties = new Properties();
}
FileExistsDialogPanel dialog = new FileExistsDialogPanel(file, FileExistsDialogPanel.class.getSimpleName().toLowerCase(Locale.ENGLISH) + ".dir.text");
int opt = JOptionPane.showConfirmDialog(UITools.getFrame(), dialog, TextUtils.getText("workspace.directory.merge.title"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
if (opt == JOptionPane.CANCEL_OPTION) {
throw new CancelExecutionException();
}
if (opt == JOptionPane.NO_OPTION) {
throw new SkipTaskException();
}
properties.setProperty("mergeAll", String.valueOf(dialog.applyToAll()));
}
Aggregations