1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-13 03:55:22 +02:00

[220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared

This commit is contained in:
David McKnight 2008-02-28 22:22:45 +00:00
parent 95d57f627a
commit bb5cd64eb7
20 changed files with 290 additions and 103 deletions

View file

@ -26,6 +26,7 @@
* David McKnight (IBM) - [210812] for text transfer, need to tell editor to use local encoding * David McKnight (IBM) - [210812] for text transfer, need to tell editor to use local encoding
* Xuan Chen (IBM) - [210816] Archive testcases throw ResourceException if they are run in batch * Xuan Chen (IBM) - [210816] Archive testcases throw ResourceException if they are run in batch
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.files.ui.resources; package org.eclipse.rse.files.ui.resources;
@ -59,10 +60,13 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.files.ui.actions.SystemDownloadConflictAction; import org.eclipse.rse.internal.files.ui.actions.SystemDownloadConflictAction;
import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper; import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -1108,7 +1112,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
if (!remoteFile.exists()) if (!remoteFile.exists())
{ {
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName()); String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
SystemMessageDialog dialog = new SystemMessageDialog(shell, message); SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
dialog.open(); dialog.open();
@ -1146,7 +1152,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName()); String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName()); String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_DOWNLOAD_NO_WRITE,
IStatus.WARNING, msgTxt, msgDetails);
SystemMessageDialog dialog = new SystemMessageDialog(shell, message); SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
boolean answer = dialog.openQuestion(); boolean answer = dialog.openQuestion();
@ -1171,7 +1179,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
{ {
String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, remotePath, subsystem.getHost().getHostName()); String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, remotePath, subsystem.getHost().getHostName());
String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS, remotePath, subsystem.getHost().getHostName()); String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS, remotePath, subsystem.getHost().getHostName());
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR,
IStatus.WARNING, msgTxt, msgDetails);
SystemMessageDialog dialog = new SystemMessageDialog(shell, message); SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
@ -1232,7 +1242,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
if (!remoteFile.exists()) if (!remoteFile.exists())
{ {
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName()); String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
DisplayMessageDialog dd = new DisplayMessageDialog(message); DisplayMessageDialog dd = new DisplayMessageDialog(message);
Display.getDefault().syncExec(dd); Display.getDefault().syncExec(dd);
@ -1270,7 +1282,9 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName()); String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName()); String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_DOWNLOAD_NO_WRITE,
IStatus.WARNING, msgTxt, msgDetails);
DisplayQuestionDialog dd = new DisplayQuestionDialog(message); DisplayQuestionDialog dd = new DisplayQuestionDialog(message);
Display.getDefault().syncExec(dd); Display.getDefault().syncExec(dd);
@ -1840,9 +1854,11 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
catch (InvocationTargetException e) catch (InvocationTargetException e)
{ {
SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$ SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
String msgTxt = FileResources.MSG_ERROR_UNEXPECTED; String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_ERROR_UNEXPECTED,
IStatus.ERROR, msgTxt);
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message); SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
dialog.open(); dialog.open();
@ -1870,9 +1886,11 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
catch (Exception e) catch (Exception e)
{ {
SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$ SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
String msgTxt = FileResources.MSG_ERROR_UNEXPECTED; String msgTxt = CommonMessages.MSG_ERROR_UNEXPECTED;
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_ERROR_UNEXPECTED,
IStatus.ERROR, msgTxt);
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message); SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
dialog.open(); dialog.open();

View file

@ -41,6 +41,7 @@
* Xuan Chen (IBM) - [210816] Archive testcases throw ResourceException if they are run in batch * Xuan Chen (IBM) - [210816] Archive testcases throw ResourceException if they are run in batch
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.resources; package org.eclipse.rse.files.ui.resources;
@ -81,6 +82,7 @@ import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper; import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants; import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
@ -405,7 +407,9 @@ public class UniversalFileTransferUtility
if (!srcFileOrFolder.exists()){ if (!srcFileOrFolder.exists()){
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName()); String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
resultSet.setMessage(errorMessage); resultSet.setMessage(errorMessage);
} }
@ -594,7 +598,9 @@ public class UniversalFileTransferUtility
{ {
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName()); String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
resultSet.setMessage(errorMessage); resultSet.setMessage(errorMessage);
} }
@ -751,9 +757,11 @@ public class UniversalFileTransferUtility
public static Object downloadResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) { public static Object downloadResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
if (!srcFileOrFolder.exists()) { if (!srcFileOrFolder.exists()) {
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), "LOCALHOST"); String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), "LOCALHOST"); //$NON-NLS-1$
SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
return errorMessage; return errorMessage;
} }
@ -1034,7 +1042,9 @@ public class UniversalFileTransferUtility
{ {
String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName()); String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
return errorMessage; return errorMessage;
} }
@ -1245,7 +1255,9 @@ public class UniversalFileTransferUtility
String msgTxt = FileResources.FILEMSG_SECURITY_ERROR; String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName()); String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_SECURITY_ERROR,
IStatus.ERROR, msgTxt, msgDetails);
resultSet.setMessage(errorMsg); resultSet.setMessage(errorMsg);
return resultSet; return resultSet;
@ -1550,7 +1562,9 @@ public class UniversalFileTransferUtility
{ {
String msgTxt = FileResources.FILEMSG_SECURITY_ERROR; String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName()); String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_SECURITY_ERROR,
IStatus.ERROR, msgTxt, msgDetails);
return errorMsg; return errorMsg;
} }

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.widgets; package org.eclipse.rse.files.ui.widgets;
@ -23,6 +24,7 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
@ -115,7 +117,9 @@ public class SaveAsForm extends SystemSelectRemoteFileOrFolderForm {
{ {
String msgTxt = NLS.bind(FileResources.MSG_UPLOAD_FILE_EXISTS, fileName); String msgTxt = NLS.bind(FileResources.MSG_UPLOAD_FILE_EXISTS, fileName);
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_UPLOAD_FILE_EXISTS,
IStatus.WARNING, msgTxt);
SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
ok = dlg.openQuestionNoException(); ok = dlg.openQuestionNoException();

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.widgets; package org.eclipse.rse.files.ui.widgets;
@ -28,6 +29,7 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration; import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction; import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources; import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
@ -507,7 +509,9 @@ public class SystemFileFilterStringEditPane
{ {
if (textTypes.getText().trim().length() == 0) if (textTypes.getText().trim().length() == 0)
{ {
errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.FILEMSG_ERROR_NOFILETYPES, FileResources.FILEMSG_ERROR_NOFILETYPES_DETAILS); errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_ERROR_NOFILETYPES,
IStatus.ERROR, FileResources.FILEMSG_ERROR_NOFILETYPES, FileResources.FILEMSG_ERROR_NOFILETYPES_DETAILS);
} }
} }
controlInError = textFile; controlInError = textFile;
@ -521,7 +525,9 @@ public class SystemFileFilterStringEditPane
if (notUnique) if (notUnique)
{ {
String msgTxt = NLS.bind(FileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, currFilterString); String msgTxt = NLS.bind(FileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, currFilterString);
errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE,
IStatus.ERROR, msgTxt);
} }
controlInError = textFile; controlInError = textFile;
} }
@ -639,7 +645,9 @@ public class SystemFileFilterStringEditPane
} }
// no path validator, so just use default path empty message // no path validator, so just use default path empty message
else { else {
errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS); errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_VALIDATE_PATH_EMPTY,
IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
} }
} }
// KM: defect 53210 // KM: defect 53210
@ -655,7 +663,9 @@ public class SystemFileFilterStringEditPane
} }
// no path validator, so just use default path empty message // no path validator, so just use default path empty message
else { else {
errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS); errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_VALIDATE_PATH_EMPTY,
IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
} }
} }
} }

View file

@ -17,6 +17,7 @@
* Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
* David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect() * David McKnight (IBM) - [186363] get rid of obsolete calls to ISubSystem.connect()
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.widgets; package org.eclipse.rse.files.ui.widgets;
@ -34,6 +35,7 @@ import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction; import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources; import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility; import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
@ -618,11 +620,11 @@ public class SystemQualifiedRemoteFolderCombo extends Composite
} }
} catch (InterruptedException exc) } catch (InterruptedException exc)
{ {
String msgTxt = NLS.bind(FileResources.MSG_CONNECT_CANCELED, conn.getHostName()); String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_CANCELED, conn.getHostName());
throw new Exception(msgTxt); throw new Exception(msgTxt);
} catch (Exception exc) } catch (Exception exc)
{ {
String msgTxt = NLS.bind(FileResources.MSG_CONNECT_FAILED, conn.getHostName()); String msgTxt = NLS.bind(CommonMessages.MSG_CONNECT_FAILED, conn.getHostName());
throw new Exception(msgTxt); throw new Exception(msgTxt);
} }
} }

View file

@ -13,6 +13,7 @@
* Contributors: * Contributors:
* Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.files.ui.widgets; package org.eclipse.rse.files.ui.widgets;
@ -25,10 +26,11 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.viewers.ICheckStateListener; import org.eclipse.jface.viewers.ICheckStateListener;
import org.eclipse.rse.core.IRSESystemType; import org.eclipse.rse.core.IRSESystemType;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction; import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider; import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
@ -607,7 +609,9 @@ public class SystemSelectRemoteFilesForm extends Composite
{ {
if (msgLine != null) if (msgLine != null)
{ {
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_EXCEPTION_OCCURRED, exc); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_EXCEPTION_OCCURRED,
IStatus.ERROR, CommonMessages.MSG_EXCEPTION_OCCURRED, exc);
msgLine.setErrorMessage(msg); msgLine.setErrorMessage(msg);
} }
else else

View file

@ -16,6 +16,7 @@
* David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button * David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button
* David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui; package org.eclipse.rse.internal.files.ui;
@ -356,8 +357,7 @@ public class FileResources extends NLS
// messages // messages
public static String MSG_ERROR_UNEXPECTED;
public static String MSG_ERROR_FOLDER_NOTFOUND; public static String MSG_ERROR_FOLDER_NOTFOUND;
public static String MSG_ERROR_FILE_NOTFOUND; public static String MSG_ERROR_FILE_NOTFOUND;
public static String MSG_ERROR_FOLDERORFILE_NOTFOUND; public static String MSG_ERROR_FOLDERORFILE_NOTFOUND;
@ -461,26 +461,13 @@ public class FileResources extends NLS
public static String MSG_VALIDATE_PATH_NOTUNIQUE_DETAILS; public static String MSG_VALIDATE_PATH_NOTUNIQUE_DETAILS;
public static String MSG_VALIDATE_PATH_NOTVALID_DETAILS; public static String MSG_VALIDATE_PATH_NOTVALID_DETAILS;
public static String MSG_CONNECT_FAILED;
public static String MSG_CONNECT_UNKNOWNHOST;
public static String MSG_CONNECT_CANCELED;
public static String MSG_EXCEPTION_OCCURRED;
// remote search messages // remote search messages
public static String MSG_REMOTE_SEARCH_INVALID_REGEX; public static String MSG_REMOTE_SEARCH_INVALID_REGEX;
public static String MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS; public static String MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS;
public static String MSG_COPY_PROGRESS;
public static String MSG_EXPAND_FAILED;
public static String MSG_EXPAND_CANCELED;
// operation status
public static String MSG_OPERATION_RUNNING;
public static String MSG_OPERATION_FINISHED;
public static String MSG_OPERTION_STOPPED;
public static String MSG_OPERATION_DISCONNECTED;
public static String MSG_CREATEFILEGENERIC_PROGRESS; public static String MSG_CREATEFILEGENERIC_PROGRESS;
public static String MSG_CREATEFOLDERGENERIC_PROGRESS; public static String MSG_CREATEFOLDERGENERIC_PROGRESS;

View file

@ -16,6 +16,7 @@
# David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button # David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button
# David McKnight(IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files # David McKnight(IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
# David McKnight (IBM)- [216252] [nls] Resources specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible # David McKnight (IBM)- [216252] [nls] Resources specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
# David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
############################################################################### ###############################################################################
# NLS_MESSAGEFORMAT_VAR # NLS_MESSAGEFORMAT_VAR
@ -346,7 +347,6 @@ RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE=Finished
#MESSAGES #MESSAGES
MSG_ERROR_UNEXPECTED=An unexpected error occurred.
MSG_ERROR_FOLDER_NOTFOUND=Folder {0} not found on host {1} MSG_ERROR_FOLDER_NOTFOUND=Folder {0} not found on host {1}
MSG_ERROR_FILE_NOTFOUND=File {0} not found on host {1} MSG_ERROR_FILE_NOTFOUND=File {0} not found on host {1}
@ -451,11 +451,6 @@ MSG_ERROR_CONNECTION_NOTFOUND_DETAILS=No connection named {0} currently exists<
MSG_ERROR_PROFILE_NOTFOUND =Profile {0} not found MSG_ERROR_PROFILE_NOTFOUND =Profile {0} not found
MSG_ERROR_PROFILE_NOTFOUND_DETAILS=No profile named {0} currently exists MSG_ERROR_PROFILE_NOTFOUND_DETAILS=No profile named {0} currently exists
MSG_CONNECT_FAILED = Connect to {0} failed with an unexpected exception
MSG_CONNECT_UNKNOWNHOST = Connect failed. Host {0} not found or not responding
MSG_CONNECT_CANCELED =Connect to {0} was canceled
MSG_EXCEPTION_OCCURRED = An unexpected exception has occurred
FILEMSG_MOVE_INTERRUPTED = Operation interrupted. Some objects have been moved. FILEMSG_MOVE_INTERRUPTED = Operation interrupted. Some objects have been moved.
FILEMSG_MOVE_INTERRUPTED_DETAILS = The following objects have been moved:\n{0} FILEMSG_MOVE_INTERRUPTED_DETAILS = The following objects have been moved:\n{0}
@ -473,18 +468,6 @@ MSG_CACHE_UNABLE_TO_SYNCH = Unable to synchronize cache changes to host. Operati
# remote search messages # remote search messages
MSG_REMOTE_SEARCH_INVALID_REGEX = Regular expression is not valid. MSG_REMOTE_SEARCH_INVALID_REGEX = Regular expression is not valid.
MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS=The value {0} you entered is not a valid regular expression. MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS=The value {0} you entered is not a valid regular expression.
MSG_COPY_PROGRESS = Copying ''{0}'' to ''{1}''
MSG_EXPAND_FAILED = Expand failed. Try again
MSG_EXPAND_CANCELED = Expand canceled. Try again
# operation status
MSG_OPERATION_RUNNING = {0} - Running
MSG_OPERATION_FINISHED = {0} - Finished
MSG_OPERTION_STOPPED = {0} - Canceled
MSG_OPERATION_DISCONNECTED = {0} - Disconnected
MSG_CREATEFILEGENERIC_PROGRESS = Creating file {0}... MSG_CREATEFILEGENERIC_PROGRESS = Creating file {0}...
MSG_CREATEFOLDERGENERIC_PROGRESS =Creating folder {0}... MSG_CREATEFOLDERGENERIC_PROGRESS =Creating folder {0}...

View file

@ -13,6 +13,7 @@
* *
* Contributors: * Contributors:
* David McKnight (IBM) - [216252] cleaning up message ids and strings * David McKnight (IBM) - [216252] cleaning up message ids and strings
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui; package org.eclipse.rse.internal.files.ui;
@ -23,6 +24,70 @@ package org.eclipse.rse.internal.files.ui;
*/ */
public interface ISystemFileConstants public interface ISystemFileConstants
{ {
// --------------------------------
// Message Ids
// -------------------------------
// Remote editing messages
public static final String MSG_DOWNLOAD_NO_WRITE = "RSEF5002"; //$NON-NLS-1$
public static final String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR = "RSEF5009"; //$NON-NLS-1$
public static final String MSG_UPLOAD_FILE_EXISTS = "RSEF5012"; //$NON-NLS-1$
public static final String MSG_FOLDER_UNREADABLE = "RSEF5020"; //$NON-NLS-1$
public static final String MSG_ERROR_FILE_NOTFOUND = "RSEG1106"; //$NON-NLS-1$
// Remote File Exception Messages
public static final String FILEMSG_SECURITY_ERROR = "RSEF1001"; //$NON-NLS-1$
public static final String FILEMSG_IO_ERROR = "RSEF1002"; //$NON-NLS-1$
public static final String FILEMSG_FOLDER_NOTEMPTY = "RSEF1003"; //$NON-NLS-1$
public static final String FILEMSG_FOLDER_NOTFOUND = "RSEF1004"; //$NON-NLS-1$
public static final String FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE = "RSEF1005"; //$NON-NLS-1$
public static final String FILEMSG_FILE_NOTFOUND = "RSEF1006"; //$NON-NLS-1$
public static final String MSG_VALIDATE_PATH_EMPTY = "RSEG1032"; //$NON-NLS-1$
public static final String MSG_VALIDATE_PATH_NOTUNIQUE= "RSEG1033"; //$NON-NLS-1$
public static final String MSG_VALIDATE_PATH_NOTVALID = "RSEG1034"; //$NON-NLS-1$
// --------------------------
// UNIVERSAL FILE MESSAGES...
// --------------------------
public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY = "RSEF1011"; //$NON-NLS-1$
public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= "RSEF1007"; //$NON-NLS-1$
public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID = "RSEF1008"; //$NON-NLS-1$
public static final String FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES = "RSEF1009"; //$NON-NLS-1$
public static final String FILEMSG_DELETE_FILE_FAILED = "RSEF1300"; //$NON-NLS-1$
public static final String FILEMSG_RENAME_FILE_FAILED = "RSEF1301"; //$NON-NLS-1$
public static final String FILEMSG_CREATE_FILE_FAILED = "RSEF1302"; //$NON-NLS-1$
public static final String FILEMSG_CREATE_FILE_FAILED_EXIST = "RSEF1303"; //$NON-NLS-1$
public static final String FILEMSG_CREATE_FOLDER_FAILED = "RSEF1304"; //$NON-NLS-1$
public static final String FILEMSG_CREATE_FOLDER_FAILED_EXIST = "RSEF1309"; //$NON-NLS-1$
public static final String FILEMSG_CREATE_RESOURCE_NOTVISIBLE = "RSEF1310"; //$NON-NLS-1$
public static final String FILEMSG_RENAME_RESOURCE_NOTVISIBLE = "RSEF1311"; //$NON-NLS-1$
public static final String FILEMSG_ERROR_NOFILETYPES = "RSEF1010"; //$NON-NLS-1$
public static final String FILEMSG_COPY_FILE_FAILED = "RSEF1306"; //$NON-NLS-1$
public static final String FILEMSG_MOVE_FILE_FAILED = "RSEF1307"; //$NON-NLS-1$
public static final String FILEMSG_MOVE_TARGET_EQUALS_SOURCE = "RSEF1308"; //$NON-NLS-1$
public static final String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE = "RSEF1312"; //$NON-NLS-1$
public static final String FILEMSG_DELETING = "RSEF1315"; //$NON-NLS-1$
public static final String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE = "RSEF1314"; //$NON-NLS-1$
public static final String FILEMSG_MOVE_FILTER_NOT_VALID = "RSEF1313"; //$NON-NLS-1$
public static final String FILEMSG_RENAME_INTERRUPTED = "RSEG1246"; //$NON-NLS-1$
public static final String FILEMSG_DELETE_INTERRUPTED = "RSEG1247"; //$NON-NLS-1$
public static final String FILEMSG_COPY_INTERRUPTED = "RSEG1248"; //$NON-NLS-1$
public static final String FILEMSG_MOVE_INTERRUPTED = "RSEG1245"; //$NON-NLS-1$
// cache preferences
public static final String MSG_CACHE_UPLOAD_BEFORE_DELETE = "RSEF6101"; //$NON-NLS-1$
public static final String MSG_CACHE_UNABLE_TO_SYNCH = "RSEF6102"; //$NON-NLS-1$
public static final String MSG_ERROR_FILENAME_INVALID = "RSEF6002"; //$NON-NLS-1$
// remote search messages
public static final String MSG_REMOTE_SEARCH_INVALID_REGEX = "RSEG1601"; //$NON-NLS-1$
// -------------------------------- // --------------------------------
// INFO-POPS FOR UNIVERSAL FILE // INFO-POPS FOR UNIVERSAL FILE
// ------------------------------- // -------------------------------

View file

@ -19,6 +19,7 @@
* David McKnight (IBM) - [207178] changing list APIs for file service and subsystems * David McKnight (IBM) - [207178] changing list APIs for file service and subsystems
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions; package org.eclipse.rse.internal.files.ui.actions;
@ -45,6 +46,7 @@ import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog; import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.internal.ui.view.SystemView; import org.eclipse.rse.internal.ui.view.SystemView;
@ -236,7 +238,9 @@ public class SystemCopyRemoteFileAction extends SystemBaseCopyAction
{ {
String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, srcFileOrFolder.getName()); String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, srcFileOrFolder.getName());
String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS; String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
} }
else else

View file

@ -20,6 +20,7 @@
* Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
* Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions; package org.eclipse.rse.internal.files.ui.actions;
@ -38,6 +39,7 @@ import org.eclipse.rse.core.model.IHost;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -123,7 +125,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
String msgTxt = FileResources.FILEMSG_MOVE_INTERRUPTED; String msgTxt = FileResources.FILEMSG_MOVE_INTERRUPTED;
String msgDetails = NLS.bind(FileResources.FILEMSG_MOVE_INTERRUPTED_DETAILS, movedFileNamesList); String msgDetails = NLS.bind(FileResources.FILEMSG_MOVE_INTERRUPTED_DETAILS, movedFileNamesList);
SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_MOVE_INTERRUPTED,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(shell, thisMessage); SystemMessageDialog.displayErrorMessage(shell, thisMessage);
status = Status.CANCEL_STATUS; status = Status.CANCEL_STATUS;
@ -204,7 +208,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
{ {
String msgTxt = NLS.bind(FileResources.FILEMSG_MOVE_FILE_FAILED, srcFileOrFolder.getName()); String msgTxt = NLS.bind(FileResources.FILEMSG_MOVE_FILE_FAILED, srcFileOrFolder.getName());
String msgDetails = FileResources.FILEMSG_MOVE_FILE_FAILED_DETAILS; String msgDetails = FileResources.FILEMSG_MOVE_FILE_FAILED_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_MOVE_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
throw new SystemMessageException(msg); throw new SystemMessageException(msg);
} }
else else
@ -250,7 +256,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
if (selectedFolderPath.equals(selectedParentFile.getAbsolutePath())) if (selectedFolderPath.equals(selectedParentFile.getAbsolutePath()))
{ {
if (targetEqualsParentSrcMsg == null){ if (targetEqualsParentSrcMsg == null){
targetEqualsParentSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, targetEqualsParentSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE,
IStatus.ERROR,
FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE, FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE,
FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS); FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS);
@ -261,7 +269,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
else if (selectedFolderPath.equals(selectedFile.getAbsolutePath())) else if (selectedFolderPath.equals(selectedFile.getAbsolutePath()))
{ {
if (targetEqualsSrcMsg == null){ if (targetEqualsSrcMsg == null){
targetEqualsSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, targetEqualsSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_MOVE_TARGET_EQUALS_SOURCE,
IStatus.ERROR,
FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE, FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE,
FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS); FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS);
} }
@ -270,7 +280,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
else if (selectedFolder.isDescendantOf(selectedFile)) else if (selectedFolder.isDescendantOf(selectedFile))
{ {
if (targetDescendsFromSrcMsg == null){ if (targetDescendsFromSrcMsg == null){
targetDescendsFromSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, targetDescendsFromSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE,
IStatus.ERROR,
FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE, FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE,
FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS); FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS);
@ -288,7 +300,9 @@ public class SystemMoveRemoteFileAction extends SystemCopyRemoteFileAction
// Drives and Root Filters which we can't Move files to. // Drives and Root Filters which we can't Move files to.
if (firstFilterString.equals("*") || firstFilterString.equals("/*")) { //$NON-NLS-1$ //$NON-NLS-2$ if (firstFilterString.equals("*") || firstFilterString.equals("/*")) { //$NON-NLS-1$ //$NON-NLS-2$
if (invalidFilterMsg == null) { if (invalidFilterMsg == null) {
invalidFilterMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, invalidFilterMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_MOVE_FILTER_NOT_VALID,
IStatus.ERROR,
FileResources.FILEMSG_MOVE_FILTER_NOT_VALID, FileResources.FILEMSG_MOVE_FILTER_NOT_VALID,
FileResources.FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS); FileResources.FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS);

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.actions; package org.eclipse.rse.internal.files.ui.actions;
@ -37,8 +38,11 @@ import org.eclipse.rse.files.ui.dialogs.SaveAsDialog;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.ui.SystemResources; import org.eclipse.rse.internal.ui.SystemResources;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -102,7 +106,9 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
{ {
SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$ SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_ERROR_UNEXPECTED); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_ERROR_UNEXPECTED,
IStatus.ERROR, CommonMessages.MSG_ERROR_UNEXPECTED);
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message); SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
SystemMessageDialogRunnable runnable = ((SubSystem)fs).new SystemMessageDialogRunnable(dialog); SystemMessageDialogRunnable runnable = ((SubSystem)fs).new SystemMessageDialogRunnable(dialog);
Display.getDefault().asyncExec(runnable); Display.getDefault().asyncExec(runnable);
@ -375,7 +381,9 @@ public class SystemUploadConflictAction extends SystemBaseAction implements Runn
else else
{ {
enableOkButton(false); enableOkButton(false);
_errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, _errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_VALIDATE_PATH_EMPTY,
IStatus.ERROR,
FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY,
FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS); FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.propertypages; package org.eclipse.rse.internal.files.ui.propertypages;
@ -42,6 +43,7 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager; import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants; import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
import org.eclipse.rse.internal.ui.GenericMessages; import org.eclipse.rse.internal.ui.GenericMessages;
@ -610,7 +612,9 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
List dirtyEditors = new ArrayList(); List dirtyEditors = new ArrayList();
if (!getDirtyReplicas(dirtyEditors)) if (!getDirtyReplicas(dirtyEditors))
{ {
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_CACHE_UNABLE_TO_SYNCH); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_CACHE_UNABLE_TO_SYNCH,
IStatus.ERROR, FileResources.MSG_CACHE_UNABLE_TO_SYNCH);
SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg); SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
dlg.open(); dlg.open();
@ -629,7 +633,9 @@ public class SystemCachePreferencePage extends PreferencePage implements IWorkbe
WorkbenchContentProvider cprovider = new WorkbenchContentProvider(); WorkbenchContentProvider cprovider = new WorkbenchContentProvider();
SystemTableViewProvider lprovider = new SystemTableViewProvider(); SystemTableViewProvider lprovider = new SystemTableViewProvider();
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_CACHE_UPLOAD_BEFORE_DELETE); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_CACHE_UPLOAD_BEFORE_DELETE,
IStatus.ERROR, FileResources.MSG_CACHE_UPLOAD_BEFORE_DELETE);
ListSelectionDialog dlg = ListSelectionDialog dlg =
new ListSelectionDialog(getShell(), input, cprovider, lprovider, msg.getLevelOneText()); new ListSelectionDialog(getShell(), input, cprovider, lprovider, msg.getLevelOneText());

View file

@ -23,6 +23,7 @@
* David McKnight (IBM) - [209660] use parent encoding as default, rather than system encoding * David McKnight (IBM) - [209660] use parent encoding as default, rather than system encoding
* David McKnight (IBM) - [209703] apply encoding and updating remote file when apply on property page * David McKnight (IBM) - [209703] apply encoding and updating remote file when apply on property page
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui.propertypages; package org.eclipse.rse.internal.files.ui.propertypages;
@ -44,6 +45,7 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile; import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources; import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -547,12 +549,16 @@ public class SystemFilePropertyPage extends SystemBasePropertyPage
} }
catch (RemoteFileIOException exc) { catch (RemoteFileIOException exc) {
String msgDetails = NLS.bind(FileResources.FILEMSG_IO_ERROR_DETAILS, exc.getMessage()); String msgDetails = NLS.bind(FileResources.FILEMSG_IO_ERROR_DETAILS, exc.getMessage());
setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.FILEMSG_IO_ERROR, msgDetails)); setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_IO_ERROR,
IStatus.ERROR, FileResources.FILEMSG_IO_ERROR, msgDetails));
} }
catch (RemoteFileSecurityException exc) { catch (RemoteFileSecurityException exc) {
String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, exc.getMessage()); String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, exc.getMessage());
setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.FILEMSG_SECURITY_ERROR, msgDetails)); setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_SECURITY_ERROR,
IStatus.ERROR, FileResources.FILEMSG_SECURITY_ERROR, msgDetails));
} }
catch (SystemMessageException e) { catch (SystemMessageException e) {

View file

@ -17,6 +17,7 @@
* David McKnight (IBM) - [203114] Usability improvements for file transfer mode prefs * David McKnight (IBM) - [203114] Usability improvements for file transfer mode prefs
* David McKnight (IBM) - [210142] for accessibility need transfer mode toggle button * David McKnight (IBM) - [210142] for accessibility need transfer mode toggle button
* Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal * Martin Oberhuber (Wind River) - [220020][api][breaking] SystemFileTransferModeRegistry should be internal
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.propertypages; package org.eclipse.rse.internal.files.ui.propertypages;
@ -44,6 +45,7 @@ import org.eclipse.jface.viewers.TextCellEditor;
import org.eclipse.jface.window.Window; import org.eclipse.jface.window.Window;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants; import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeMapping; import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeMapping;
import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeRegistry; import org.eclipse.rse.internal.subsystems.files.core.model.SystemFileTransferModeRegistry;
@ -729,7 +731,9 @@ public class UniversalPreferencePage
SystemMessageFile mf = RSEUIPlugin.getPluginMessageFile(); SystemMessageFile mf = RSEUIPlugin.getPluginMessageFile();
Shell shell = getControl().getShell(); Shell shell = getControl().getShell();
String msgTxt = FileResources.MSG_ERROR_FILENAME_INVALID; String msgTxt = FileResources.MSG_ERROR_FILENAME_INVALID;
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILENAME_INVALID,
IStatus.ERROR, msgTxt);
SystemMessageDialog.displayErrorMessage(shell, message); SystemMessageDialog.displayErrorMessage(shell, message);
return; return;
} }

View file

@ -17,6 +17,7 @@
* Kevin Doyle (IBM) - [187427] Selecting an Archive will check Search Archives checkbox * Kevin Doyle (IBM) - [187427] Selecting an Archive will check Search Archives checkbox
* Martin Oberhuber (Wind River) - [196936] Hide disabled system types * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.search; package org.eclipse.rse.internal.files.ui.search;
@ -44,6 +45,7 @@ import org.eclipse.rse.core.model.ISystemProfile;
import org.eclipse.rse.core.model.ISystemRegistry; import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.ui.view.search.SystemSearchUI; import org.eclipse.rse.internal.ui.view.search.SystemSearchUI;
import org.eclipse.rse.internal.ui.view.search.SystemSearchViewPart; import org.eclipse.rse.internal.ui.view.search.SystemSearchViewPart;
import org.eclipse.rse.services.clientserver.SystemSearchString; import org.eclipse.rse.services.clientserver.SystemSearchString;
@ -679,7 +681,9 @@ public class SystemSearchPage extends DialogPage implements ISearchPage {
String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX; String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX;
String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, searchString); String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, searchString);
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_REMOTE_SEARCH_INVALID_REGEX,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(getShell(), message); SystemMessageDialog.displayErrorMessage(getShell(), message);
stringCombo.setFocus(); stringCombo.setFocus();
@ -699,7 +703,9 @@ public class SystemSearchPage extends DialogPage implements ISearchPage {
String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX; String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX;
String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, fileNameString); String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, fileNameString);
SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_REMOTE_SEARCH_INVALID_REGEX,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(getShell(), message); SystemMessageDialog.displayErrorMessage(getShell(), message);
fileNameCombo.setFocus(); fileNameCombo.setFocus();

View file

@ -46,6 +46,7 @@
* David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files * David McKnight (IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
* David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind * David McKnight (IBM) - [216252] MessageFormat.format -> NLS.bind
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -97,6 +98,7 @@ import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility; import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.internal.files.ui.actions.SystemCompareFilesAction; import org.eclipse.rse.internal.files.ui.actions.SystemCompareFilesAction;
import org.eclipse.rse.internal.files.ui.actions.SystemCompareWithEditionAction; import org.eclipse.rse.internal.files.ui.actions.SystemCompareWithEditionAction;
import org.eclipse.rse.internal.files.ui.actions.SystemEditFilesAction; import org.eclipse.rse.internal.files.ui.actions.SystemEditFilesAction;
@ -119,6 +121,8 @@ import org.eclipse.rse.services.clientserver.StringCompare;
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
import org.eclipse.rse.services.clientserver.SystemSearchString; import org.eclipse.rse.services.clientserver.SystemSearchString;
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
import org.eclipse.rse.services.clientserver.messages.CommonMessages;
import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -750,14 +754,19 @@ public class SystemViewRemoteFileAdapter
catch (InterruptedException exc) catch (InterruptedException exc)
{ {
children = new SystemMessageObject[1]; children = new SystemMessageObject[1];
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL, FileResources.MSG_EXPAND_CANCELED); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_EXPAND_CANCELED,
IStatus.CANCEL, CommonMessages.MSG_EXPAND_CANCELED);
children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_CANCEL, element); children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_CANCEL, element);
} }
catch (Exception exc) catch (Exception exc)
{ {
children = new SystemMessageObject[1]; children = new SystemMessageObject[1];
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_EXPAND_FAILED); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_EXPAND_FAILED,
IStatus.ERROR,
CommonMessages.MSG_EXPAND_FAILED);
children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element); children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element);
SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$ SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
} // message already issued } // message already issued
@ -1956,7 +1965,9 @@ public class SystemViewRemoteFileAdapter
{ {
String msgTxt = FileResources.FILEMSG_SECURITY_ERROR; String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName()); String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_SECURITY_ERROR,
IStatus.ERROR, msgTxt, msgDetails);
resultSet.setMessage(errorMsg); resultSet.setMessage(errorMsg);
return resultSet; return resultSet;
@ -2015,7 +2026,9 @@ public class SystemViewRemoteFileAdapter
String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED; String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames); String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_INTERRUPTED,
IStatus.ERROR, msgTxt, msgDetails);
resultSet.setMessage(thisMessage); resultSet.setMessage(thisMessage);
} }
} }
@ -2095,7 +2108,9 @@ public class SystemViewRemoteFileAdapter
srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getAbsolutePath(),
srcFileOrFolder.getSystemConnection().getAliasName()); srcFileOrFolder.getSystemConnection().getAliasName());
SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
resultSet.setMessage(errorMessage); resultSet.setMessage(errorMessage);
return resultSet; return resultSet;
} }
@ -2178,7 +2193,9 @@ public class SystemViewRemoteFileAdapter
String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, srcFileOrFolder.getAbsolutePath()); String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, srcFileOrFolder.getAbsolutePath());
String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS; String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
resultSet.setMessage(msg); resultSet.setMessage(msg);
} }
} }
@ -2206,7 +2223,9 @@ public class SystemViewRemoteFileAdapter
String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED; String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames); String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_INTERRUPTED,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(shell, thisMessage); SystemMessageDialog.displayErrorMessage(shell, thisMessage);
} }
else else
@ -2282,7 +2301,9 @@ public class SystemViewRemoteFileAdapter
String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED; String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames); String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_INTERRUPTED,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(shell, thisMessage); SystemMessageDialog.displayErrorMessage(shell, thisMessage);
} }
@ -2351,7 +2372,9 @@ public class SystemViewRemoteFileAdapter
String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName()); String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
SystemMessage errorMsg = null; SystemMessage errorMsg = null;
errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_SECURITY_ERROR,
IStatus.ERROR, msgTxt, msgDetails);
return errorMsg; return errorMsg;
} }
@ -2463,12 +2486,16 @@ public class SystemViewRemoteFileAdapter
srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getAbsolutePath(),
srcFileOrFolder.getSystemConnection().getAliasName()); srcFileOrFolder.getSystemConnection().getAliasName());
SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.MSG_ERROR_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
return errorMessage; return errorMessage;
} }
String msgTxt = NLS.bind(FileResources.MSG_COPY_PROGRESS, srcFileOrFolder.getName(), targetFolder.getAbsolutePath()); String msgTxt = NLS.bind(CommonMessages.MSG_COPY_PROGRESS, srcFileOrFolder.getName(), targetFolder.getAbsolutePath());
SystemMessage copyMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.INFO, msgTxt); SystemMessage copyMessage = new SimpleSystemMessage(Activator.PLUGIN_ID,
ICommonMessageIds.MSG_COPY_PROGRESS,
IStatus.INFO, msgTxt);
IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem(); IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem();
@ -2707,7 +2734,9 @@ public class SystemViewRemoteFileAdapter
String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString()); String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString());
String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS; String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_DELETE_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(shell, msg); SystemMessageDialog.displayErrorMessage(shell, msg);
} }
return ok; return ok;
@ -2751,7 +2780,9 @@ public class SystemViewRemoteFileAdapter
String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString()); String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString());
String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS; String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_DELETE_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(shell, msg); SystemMessageDialog.displayErrorMessage(shell, msg);
} }
} }

View file

@ -14,6 +14,7 @@
* Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.view; package org.eclipse.rse.internal.files.ui.view;
@ -26,7 +27,7 @@ import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.osgi.util.NLS; import org.eclipse.osgi.util.NLS;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.services.clientserver.messages.CommonMessages;
import org.eclipse.rse.services.search.IHostSearchResultSet; import org.eclipse.rse.services.search.IHostSearchResultSet;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
@ -106,16 +107,16 @@ public class SystemViewRemoteSearchResultSetAdapter extends AbstractSystemViewAd
String msg = null; String msg = null;
if (set.isRunning()) { if (set.isRunning()) {
msg = FileResources.MSG_OPERATION_RUNNING; msg = CommonMessages.MSG_OPERATION_RUNNING;
} }
else if (set.isFinished()) { else if (set.isFinished()) {
msg = FileResources.MSG_OPERATION_FINISHED; msg = CommonMessages.MSG_OPERATION_FINISHED;
} }
else if (set.isCancelled()) { else if (set.isCancelled()) {
msg = FileResources.MSG_OPERTION_STOPPED; msg = CommonMessages.MSG_OPERTION_STOPPED;
} }
else if (set.isDisconnected()) { else if (set.isDisconnected()) {
msg = FileResources.MSG_OPERATION_DISCONNECTED; msg = CommonMessages.MSG_OPERATION_DISCONNECTED;
} }
if (msg != null) if (msg != null)

View file

@ -16,6 +16,7 @@
* Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
* Xuan Chen (IBM) - [209828] Need to move the Create operation to a job. * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.wizards; package org.eclipse.rse.internal.files.ui.wizards;
@ -40,6 +41,7 @@ import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.subsystems.ISubSystem; import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager; import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
@ -111,7 +113,9 @@ public class SystemNewFileWizard
String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED; String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED;
String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS, absName); String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS, absName);
msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(null, msg); SystemMessageDialog.displayErrorMessage(null, msg);
} }
catch (RemoteFileSecurityException e) catch (RemoteFileSecurityException e)
@ -120,7 +124,9 @@ public class SystemNewFileWizard
String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED; String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED;
String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS, absName); String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS, absName);
msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_COPY_FILE_FAILED,
IStatus.ERROR, msgTxt, msgDetails);
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@ -242,7 +248,9 @@ public class SystemNewFileWizard
*/ */
{ {
String msgTxt = NLS.bind(FileResources.FILEMSG_FOLDER_NOTFOUND, parentFolder.getAbsolutePath()); String msgTxt = NLS.bind(FileResources.FILEMSG_FOLDER_NOTFOUND, parentFolder.getAbsolutePath());
msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
msg.makeSubstitution(parentFolder.getAbsolutePath()); msg.makeSubstitution(parentFolder.getAbsolutePath());
mainPage.setMessage(msg); mainPage.setMessage(msg);
return false; return false;
@ -326,7 +334,9 @@ public class SystemNewFileWizard
String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE; String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS; String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_CREATE_RESOURCE_NOTVISIBLE,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
if (msgDlg.openQuestionNoException()) // ask user if they want to proceed if (msgDlg.openQuestionNoException()) // ask user if they want to proceed
meets = true; // they do, so pretend it meets the criteria meets = true; // they do, so pretend it meets the criteria

View file

@ -15,6 +15,7 @@
* David Dykstal (IBM) - [188718] fix error messages showing up as info messages on wizard page * David Dykstal (IBM) - [188718] fix error messages showing up as info messages on wizard page
* Xuan Chen (IBM) - [209828] Need to move the Create operation to a job. * Xuan Chen (IBM) - [209828] Need to move the Create operation to a job.
* David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible * David McKnight (IBM) - [216252] [api][nls] Resource Strings specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
* David McKnight (IBM) - [220547] [api][breaking] SimpleSystemMessage needs to specify a message id and some messages should be shared
********************************************************************************/ ********************************************************************************/
package org.eclipse.rse.internal.files.ui.wizards; package org.eclipse.rse.internal.files.ui.wizards;
@ -28,6 +29,7 @@ import org.eclipse.rse.core.filters.ISystemFilter;
import org.eclipse.rse.core.filters.ISystemFilterReference; import org.eclipse.rse.core.filters.ISystemFilterReference;
import org.eclipse.rse.internal.files.ui.Activator; import org.eclipse.rse.internal.files.ui.Activator;
import org.eclipse.rse.internal.files.ui.FileResources; import org.eclipse.rse.internal.files.ui.FileResources;
import org.eclipse.rse.internal.files.ui.ISystemFileConstants;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage; import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage; import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException; import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
@ -93,7 +95,9 @@ public class SystemNewFolderWizard
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST; String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST;
String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS, absName); String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS, absName);
msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_CREATE_FILE_FAILED_EXIST,
IStatus.ERROR, msgTxt, msgDetails);
SystemMessageDialog.displayErrorMessage(null, msg); SystemMessageDialog.displayErrorMessage(null, msg);
} }
catch (RemoteFileSecurityException e) catch (RemoteFileSecurityException e)
@ -101,7 +105,9 @@ public class SystemNewFolderWizard
ok = false; ok = false;
String msgTxt = FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST; String msgTxt = FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST;
String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS, absName); String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS, absName);
msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails); msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_CREATE_FOLDER_FAILED_EXIST,
IStatus.ERROR, msgTxt, msgDetails);
SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
SystemMessageDialog.displayErrorMessage(null, msg); SystemMessageDialog.displayErrorMessage(null, msg);
} }
@ -220,7 +226,9 @@ public class SystemNewFolderWizard
*/ */
{ {
String msgTxt = NLS.bind(FileResources.FILEMSG_FILE_NOTFOUND, parentFolder.getAbsolutePath()); String msgTxt = NLS.bind(FileResources.FILEMSG_FILE_NOTFOUND, parentFolder.getAbsolutePath());
msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_FILE_NOTFOUND,
IStatus.ERROR, msgTxt);
mainPage.setMessage(msg); mainPage.setMessage(msg);
return false; return false;
@ -284,7 +292,9 @@ public class SystemNewFolderWizard
String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE; String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS; String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails); SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID,
ISystemFileConstants.FILEMSG_CREATE_RESOURCE_NOTVISIBLE,
IStatus.WARNING, msgTxt, msgDetails);
SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg); SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
if (msgDlg.openQuestionNoException()) // ask user if they want to proceed if (msgDlg.openQuestionNoException()) // ask user if they want to proceed
meets = true; // they do, so pretend it meets the criteria meets = true; // they do, so pretend it meets the criteria