public class FileDialogUtils
{
+ public static final int YES_ID = 0;
+ public static final int YES_TO_ALL_ID = 1;
+ public static final int NO_ID = 2;
+ public static final int CANCEL_ID = 3;
+
public static int checkOverwrite(final String filename)
{
String message = NLS.bind(Messages.getString("FileDialogUtils.overwrite.message"), filename);
- String[] labels = new String[] { IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL,
- IDialogConstants.CANCEL_LABEL };
+ String[] labels = new String[] {
+ IDialogConstants.YES_LABEL, IDialogConstants.YES_TO_ALL_LABEL, IDialogConstants.NO_LABEL, IDialogConstants.CANCEL_LABEL};
int type = MessageDialog.QUESTION;
return openFileDialog(labels, message, type);
}
PlatformUI.getWorkbench().getDisplay().syncExec(query);
return resultAtomicInteger.get();
}
-}
\ No newline at end of file
+}
} else
{
ret = FileDialogUtils.checkOverwrite(f.getName());
- switch (ret)
+ switch (ret )
{
- case IDialogConstants.CANCEL_ID:
+ case FileDialogUtils.CANCEL_ID:
return null;
- case IDialogConstants.NO_ID:
+ case FileDialogUtils.NO_ID:
continue;
- case IDialogConstants.YES_TO_ALL_ID:
+ case FileDialogUtils.YES_TO_ALL_ID:
yesAll = true;
- case IDialogConstants.YES_ID:
+ case FileDialogUtils.YES_ID:
break;
default:
break;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.ui.part.IDropActionDelegate;
import org.tizen.common.connection.ConnectionPlugin;
import org.tizen.common.connection.ddmuilib.FileDialogUtils;
if (isAlwayCopy == false) {
int ret = FileDialogUtils.checkOverwrite(f.getName());
switch (ret) {
- case IDialogConstants.CANCEL_ID :
+ case FileDialogUtils.CANCEL_ID :
return false;
- case IDialogConstants.YES_TO_ALL_ID :
+ case FileDialogUtils.YES_TO_ALL_ID :
isAlwayCopy = true;
break;
- case IDialogConstants.NO_ID :
+ case FileDialogUtils.NO_ID :
continue;
default:
}