View | Details | Raw Unified | Return to bug 216252 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteSearchResultSetAdapter.java (-9 / +10 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
14
 * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
15
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
15
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
16
 * 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
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.files.ui.view;
19
package org.eclipse.rse.internal.files.ui.view;
Lines 23-36 Link Here
23
import org.eclipse.core.runtime.IProgressMonitor;
24
import org.eclipse.core.runtime.IProgressMonitor;
24
import org.eclipse.jface.resource.ImageDescriptor;
25
import org.eclipse.jface.resource.ImageDescriptor;
25
import org.eclipse.jface.viewers.IStructuredSelection;
26
import org.eclipse.jface.viewers.IStructuredSelection;
27
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.rse.core.subsystems.ISubSystem;
28
import org.eclipse.rse.core.subsystems.ISubSystem;
27
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
29
import org.eclipse.rse.internal.files.ui.FileResources;
28
import org.eclipse.rse.services.search.IHostSearchResultSet;
30
import org.eclipse.rse.services.search.IHostSearchResultSet;
29
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
31
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
30
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
32
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteSearchResult;
31
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
33
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteSearchResultsContentsType;
32
import org.eclipse.rse.ui.ISystemIconConstants;
34
import org.eclipse.rse.ui.ISystemIconConstants;
33
import org.eclipse.rse.ui.ISystemMessages;
34
import org.eclipse.rse.ui.RSEUIPlugin;
35
import org.eclipse.rse.ui.RSEUIPlugin;
35
import org.eclipse.rse.ui.SystemMenuManager;
36
import org.eclipse.rse.ui.SystemMenuManager;
36
import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
37
import org.eclipse.rse.ui.view.AbstractSystemViewAdapter;
Lines 102-126 Link Here
102
			
103
			
103
			IHostSearchResultSet set = (IHostSearchResultSet)element;
104
			IHostSearchResultSet set = (IHostSearchResultSet)element;
104
			String name = set.getName();
105
			String name = set.getName();
105
			SystemMessage msg = null;
106
			String msg = null;
106
				
107
				
107
			if (set.isRunning()) {
108
			if (set.isRunning()) {
108
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_RUNNING);
109
				msg = FileResources.MSG_OPERATION_RUNNING;
109
			}
110
			}
110
			else if (set.isFinished()) {
111
			else if (set.isFinished()) {
111
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FINISHED);
112
				msg = FileResources.MSG_OPERATION_FINISHED;
112
			}
113
			}
113
			else if (set.isCancelled()) {
114
			else if (set.isCancelled()) {
114
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERTION_STOPPED);
115
				msg = FileResources.MSG_OPERTION_STOPPED;
115
			}
116
			}
116
			else if (set.isDisconnected()) {
117
			else if (set.isDisconnected()) {
117
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_DISCONNECTED);
118
				msg = FileResources.MSG_OPERATION_DISCONNECTED;
118
			}
119
			}
119
			
120
			
120
			if (msg != null)
121
			if (msg != null)
121
			{
122
			{
122
				msg.makeSubstitution(name);
123
				msg = NLS.bind(msg, name);
123
				return msg.getLevelOneText();
124
				return msg;
124
			}
125
			}
125
		}
126
		}
126
		
127
		
(-)src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java (-31 / +66 lines)
Lines 74-79 Link Here
74
import org.eclipse.jface.viewers.AbstractTreeViewer;
74
import org.eclipse.jface.viewers.AbstractTreeViewer;
75
import org.eclipse.jface.viewers.IStructuredSelection;
75
import org.eclipse.jface.viewers.IStructuredSelection;
76
import org.eclipse.jface.viewers.Viewer;
76
import org.eclipse.jface.viewers.Viewer;
77
import org.eclipse.osgi.util.NLS;
77
import org.eclipse.rse.core.RSECorePlugin;
78
import org.eclipse.rse.core.RSECorePlugin;
78
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
79
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
79
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
80
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
Lines 94-99 Link Here
94
import org.eclipse.rse.core.subsystems.SubSystem;
95
import org.eclipse.rse.core.subsystems.SubSystem;
95
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
96
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
96
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
97
import org.eclipse.rse.files.ui.resources.UniversalFileTransferUtility;
98
import org.eclipse.rse.internal.files.ui.Activator;
97
import org.eclipse.rse.internal.files.ui.FileResources;
99
import org.eclipse.rse.internal.files.ui.FileResources;
98
import org.eclipse.rse.internal.files.ui.actions.SystemCompareFilesAction;
100
import org.eclipse.rse.internal.files.ui.actions.SystemCompareFilesAction;
99
import org.eclipse.rse.internal.files.ui.actions.SystemCompareWithEditionAction;
101
import org.eclipse.rse.internal.files.ui.actions.SystemCompareWithEditionAction;
Lines 117-122 Link Here
117
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
119
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
118
import org.eclipse.rse.services.clientserver.SystemSearchString;
120
import org.eclipse.rse.services.clientserver.SystemSearchString;
119
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
121
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
122
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
120
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
123
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
121
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
124
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
122
import org.eclipse.rse.services.files.IFilePermissionsService;
125
import org.eclipse.rse.services.files.IFilePermissionsService;
Lines 143-149 Link Here
143
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
146
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
144
import org.eclipse.rse.ui.ISystemContextMenuConstants;
147
import org.eclipse.rse.ui.ISystemContextMenuConstants;
145
import org.eclipse.rse.ui.ISystemIconConstants;
148
import org.eclipse.rse.ui.ISystemIconConstants;
146
import org.eclipse.rse.ui.ISystemMessages;
147
import org.eclipse.rse.ui.RSEUIPlugin;
149
import org.eclipse.rse.ui.RSEUIPlugin;
148
import org.eclipse.rse.ui.SystemBasePlugin;
150
import org.eclipse.rse.ui.SystemBasePlugin;
149
import org.eclipse.rse.ui.SystemMenuManager;
151
import org.eclipse.rse.ui.SystemMenuManager;
Lines 226-233 Link Here
226
	private static PropertyDescriptor[] archiveDescriptorArray = null;
228
	private static PropertyDescriptor[] archiveDescriptorArray = null;
227
	private static PropertyDescriptor[] virtualDescriptorArray = null;
229
	private static PropertyDescriptor[] virtualDescriptorArray = null;
228
230
229
	static final SystemMessage _uploadMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOADING_PROGRESS);
231
	static final String _uploadMessage = FileResources.MSG_UPLOADING_PROGRESS;
230
	static final SystemMessage _downloadMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOADING_PROGRESS);
232
	static final String _downloadMessage = FileResources.MSG_DOWNLOADING_PROGRESS;
231
	
233
	
232
	/**
234
	/**
233
	 * Constructor
235
	 * Constructor
Lines 748-760 Link Here
748
			catch (InterruptedException exc)
750
			catch (InterruptedException exc)
749
			{
751
			{
750
				children = new SystemMessageObject[1];
752
				children = new SystemMessageObject[1];
751
				children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_CANCELLED), ISystemMessageObject.MSGTYPE_CANCEL, element);
753
				SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL, FileResources.MSG_EXPAND_CANCELLED);
752
				//System.out.println("Canceled.");
754
				children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_CANCEL, element);
753
			}
755
			}
754
			catch (Exception exc)
756
			catch (Exception exc)
755
			{
757
			{
756
				children = new SystemMessageObject[1];
758
				children = new SystemMessageObject[1];
757
				children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
759
				
760
				SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_EXPAND_FAILED);
761
				children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element);
758
				SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
762
				SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
759
			} // message already issued        
763
			} // message already issued        
760
		}
764
		}
Lines 1636-1642 Link Here
1636
			
1640
			
1637
			if (monitor != null)
1641
			if (monitor != null)
1638
			{	
1642
			{	
1639
			    monitor.beginTask(_downloadMessage.getLevelOneText(),  (int)totalByteSize);
1643
			    monitor.beginTask(_downloadMessage,  (int)totalByteSize);
1640
			    //monitor.done();
1644
			    //monitor.done();
1641
			}
1645
			}
1642
			
1646
			
Lines 1950-1958 Link Here
1950
1954
1951
			if (!targetFolder.canWrite())
1955
			if (!targetFolder.canWrite())
1952
			{
1956
			{
1953
				SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
1957
				String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
1954
				errorMsg.makeSubstitution(targetFS.getHostAliasName());
1958
				String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
1959
				SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
1955
				resultSet.setMessage(errorMsg);
1960
				resultSet.setMessage(errorMsg);
1961
1956
				return resultSet;
1962
				return resultSet;
1957
			}
1963
			}
1958
1964
Lines 1975-1981 Link Here
1975
					    if (monitor != null)
1981
					    if (monitor != null)
1976
						{		
1982
						{		
1977
					    	int size = (int)totalByteSize;
1983
					    	int size = (int)totalByteSize;
1978
						    monitor.beginTask(_uploadMessage.getLevelOneText(), size);
1984
						    monitor.beginTask(_uploadMessage, size);
1979
						}  
1985
						}  
1980
						// back to hierarchy
1986
						// back to hierarchy
1981
						resultSet = UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)fromSet, targetFolder, monitor, true);
1987
						resultSet = UniversalFileTransferUtility.uploadResourcesFromWorkspace((SystemWorkspaceResourceSet)fromSet, targetFolder, monitor, true);
Lines 2003-2015 Link Here
2003
									}
2009
									}
2004
								}
2010
								}
2005
							}
2011
							}
2006
							//getMessage("RSEG1125").makeSubstitution(movedFileName));
2012
2007
							if (copiedFileNames != null)
2013
							if (copiedFileNames != null)
2008
							{
2014
							{
2009
								SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_INTERRUPTED);
2015
								String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
2010
								thisMessage.makeSubstitution(copiedFileNames);
2016
								String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
2017
2018
								SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2011
								resultSet.setMessage(thisMessage);
2019
								resultSet.setMessage(thisMessage);
2012
								//SystemMessageDialog.displayErrorMessage(shell, thisMessage);
2013
							}
2020
							}
2014
						}
2021
						}
2015
					}
2022
					}
Lines 2084-2091 Link Here
2084
							IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);																									
2091
							IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);																									
2085
							if (!srcFileOrFolder.exists())
2092
							if (!srcFileOrFolder.exists())
2086
							{
2093
							{
2087
								SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
2094
								String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, 
2088
								errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getSystemConnection().getAliasName());
2095
										srcFileOrFolder.getAbsolutePath(), 
2096
										srcFileOrFolder.getSystemConnection().getAliasName());
2097
								
2098
								SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
2089
								resultSet.setMessage(errorMessage);
2099
								resultSet.setMessage(errorMessage);
2090
								return resultSet;
2100
								return resultSet;
2091
							}
2101
							}
Lines 2165-2172 Link Here
2165
								else
2175
								else
2166
								{
2176
								{
2167
									// need a failed message here
2177
									// need a failed message here
2168
									SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED);
2178
									String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, srcFileOrFolder.getAbsolutePath());
2169
									msg.makeSubstitution(srcFileOrFolder.getAbsolutePath());
2179
									String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
2180
									
2181
									SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2170
									resultSet.setMessage(msg);
2182
									resultSet.setMessage(msg);
2171
								}
2183
								}
2172
							}
2184
							}
Lines 2191-2198 Link Here
2191
									//getMessage("RSEG1125").makeSubstitution(movedFileName));
2203
									//getMessage("RSEG1125").makeSubstitution(movedFileName));
2192
									if (copiedFileNames != null)
2204
									if (copiedFileNames != null)
2193
									{
2205
									{
2194
										SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_INTERRUPTED);
2206
										String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
2195
										thisMessage.makeSubstitution(copiedFileNames);
2207
										String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
2208
2209
										SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2196
										SystemMessageDialog.displayErrorMessage(shell, thisMessage);
2210
										SystemMessageDialog.displayErrorMessage(shell, thisMessage);
2197
									}
2211
									}
2198
									else
2212
									else
Lines 2264-2272 Link Here
2264
											thisObject = resultSet.get(i);
2278
											thisObject = resultSet.get(i);
2265
											copiedFileNames = copiedFileNames + "\n" + ((IRemoteFile)resultSet.get(i)).getName(); //$NON-NLS-1$
2279
											copiedFileNames = copiedFileNames + "\n" + ((IRemoteFile)resultSet.get(i)).getName(); //$NON-NLS-1$
2266
										}
2280
										}
2267
										SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_INTERRUPTED); 
2281
										
2268
										thisMessage.makeSubstitution(copiedFileNames);
2282
										String msgTxt = FileResources.FILEMSG_COPY_INTERRUPTED;
2283
										String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_INTERRUPTED_DETAILS, copiedFileNames);
2284
																				
2285
										SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2269
										SystemMessageDialog.displayErrorMessage(shell, thisMessage);
2286
										SystemMessageDialog.displayErrorMessage(shell, thisMessage);
2287
										
2270
									}
2288
									}
2271
									else
2289
									else
2272
									{
2290
									{
Lines 2329-2336 Link Here
2329
2347
2330
			if (!targetFolder.canWrite())
2348
			if (!targetFolder.canWrite())
2331
			{
2349
			{
2332
				SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
2350
				String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
2333
				errorMsg.makeSubstitution(targetFS.getHostAliasName());
2351
				String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
2352
				SystemMessage errorMsg = null;
2353
				
2354
				errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2355
			
2334
				return errorMsg;
2356
				return errorMsg;
2335
			}
2357
			}
2336
2358
Lines 2437-2449 Link Here
2437
						IRemoteFile srcFileOrFolder = (IRemoteFile) src;
2459
						IRemoteFile srcFileOrFolder = (IRemoteFile) src;
2438
						if (!srcFileOrFolder.exists())
2460
						if (!srcFileOrFolder.exists())
2439
						{
2461
						{
2440
							SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
2462
							String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, 
2441
							errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFileOrFolder.getSystemConnection().getAliasName());
2463
									srcFileOrFolder.getAbsolutePath(), 
2442
							return errorMessage;
2464
									srcFileOrFolder.getSystemConnection().getAliasName());
2465
							
2466
							SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
2467
							return errorMessage;							
2443
						}
2468
						}
2444
2469
2445
						SystemMessage copyMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COPY_PROGRESS);
2470
						String msgTxt = NLS.bind(FileResources.MSG_COPY_PROGRESS, srcFileOrFolder.getName(), targetFolder.getAbsolutePath());
2446
						copyMessage.makeSubstitution(srcFileOrFolder.getName(), targetFolder.getAbsolutePath());
2471
						SystemMessage copyMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.INFO, msgTxt);
2472
					
2447
2473
2448
						IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem();
2474
						IRemoteFileSubSystem localFS = srcFileOrFolder.getParentRemoteFileSubSystem();
2449
2475
Lines 2678-2684 Link Here
2678
		catch (Exception exc)
2704
		catch (Exception exc)
2679
		{
2705
		{
2680
			ok = false;
2706
			ok = false;
2681
			SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString()));
2707
			String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString());
2708
			String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
2709
	
2710
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2711
			SystemMessageDialog.displayErrorMessage(shell, msg);
2682
		}
2712
		}
2683
		return ok;
2713
		return ok;
2684
	}
2714
	}
Lines 2717-2723 Link Here
2717
			catch (Exception exc)
2747
			catch (Exception exc)
2718
			{
2748
			{
2719
				ok = false;
2749
				ok = false;
2720
				SystemMessageDialog.displayErrorMessage(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DELETE_FILE_FAILED).makeSubstitution(file.toString()));
2750
				ok = false;
2751
				String msgTxt = NLS.bind(FileResources.FILEMSG_DELETE_FILE_FAILED, file.toString());
2752
				String msgDetails = FileResources.FILEMSG_DELETE_FILE_FAILED_DETAILS;
2753
				
2754
				SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
2755
				SystemMessageDialog.displayErrorMessage(shell, msg);
2721
			}
2756
			}
2722
		}
2757
		}
2723
		if (ss != null)
2758
		if (ss != null)
(-)src/org/eclipse/rse/internal/files/ui/Activator.java (+3 lines)
Lines 13-18 Link Here
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
14
 * Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
15
 * David McKnight   (IBM)        - [205820] create the temp files project (if not there) when files.ui is loaded
15
 * David McKnight   (IBM)        - [205820] create the temp files project (if not there) when files.ui is loaded
16
 * 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
16
 ********************************************************************************/
17
 ********************************************************************************/
17
18
18
package org.eclipse.rse.internal.files.ui;
19
package org.eclipse.rse.internal.files.ui;
Lines 42-47 Link Here
42
	
43
	
43
	private static SystemUniversalTempFileListener _tempFileListener;
44
	private static SystemUniversalTempFileListener _tempFileListener;
44
	
45
	
46
	public final static String PLUGIN_ID = "org.eclipse.rse.files.ui"; //$NON-NLS-1$
47
	
45
	/**
48
	/**
46
	 * The constructor.
49
	 * The constructor.
47
	 */
50
	 */
(-)src/org/eclipse/rse/internal/files/ui/FileResources.properties (-13 / +174 lines)
Lines 15-21 Link Here
15
# David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
15
# David Dykstal (IBM) - 176488: adding some text for the cache limit checkbox
16
# David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button
16
# David McKnight(IBM) - [210142] for accessibility need transfer mode toggle button
17
# David McKnight(IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
17
# David McKnight(IBM) - [209593] [api] add support for "file permissions" and "owner" properties for unix files
18
# 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
18
# David McKnight (IBM)- [216252] [nls] Resource s specific to subsystems should be moved from rse.ui into files.ui / shells.ui / processes.ui where possible
19
###############################################################################
19
###############################################################################
20
20
21
# NLS_MESSAGEFORMAT_VAR
21
# NLS_MESSAGEFORMAT_VAR
Lines 46-52 Link Here
46
FileEditorPreference_contentTypesRelatedLink = See <a>''{0}''</a> for content-type based file associations.
46
FileEditorPreference_contentTypesRelatedLink = See <a>''{0}''</a> for content-type based file associations.
47
FileEditorPreference_isLocked = {0} (locked by ''{1}'' content type)
47
FileEditorPreference_isLocked = {0} (locked by ''{1}'' content type)
48
48
49
FileExtension_fileTypeMessage =  Enter file type to add: (*.doc or report.doc for example)
49
FileExtension_fileTypeMessage =Enter file type to add: (*.doc or report.doc for example)
50
FileExtension_fileTypeLabel = File &type:
50
FileExtension_fileTypeLabel = File &type:
51
FileExtension_shellTitle = New File Type
51
FileExtension_shellTitle = New File Type
52
FileExtension_dialogTitle = Define a New File Type
52
FileExtension_dialogTitle = Define a New File Type
Lines 116-125 Link Here
116
RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_TOOLTIP=Default mode of file transfer for unspecified file types
116
RESID_PREF_UNIVERSAL_FILES_FILETYPES_DEFAULT_MODE_TOOLTIP=Default mode of file transfer for unspecified file types
117
117
118
###################################################################################
118
###################################################################################
119
############################      Remote Search      ##############################
119
############################Remote Search##############################
120
###################################################################################
120
###################################################################################
121
RESID_SEARCH_STRING_LABEL_LABEL= Search string (leave empty for file search):
121
RESID_SEARCH_STRING_LABEL_LABEL= Search string (leave empty for file search):
122
RESID_SEARCH_STRING_LABEL_TOOLTIP= String to be searched
122
RESID_SEARCH_STRING_LABEL_TOOLTIP=to be searched
123
RESID_SEARCH_STRING_COMBO_TOOLTIP= Enter or select search string
123
RESID_SEARCH_STRING_COMBO_TOOLTIP= Enter or select search string
124
RESID_SEARCH_CASE_BUTTON_LABEL= Case sensitive
124
RESID_SEARCH_CASE_BUTTON_LABEL= Case sensitive
125
RESID_SEARCH_CASE_BUTTON_TOOLTIP= Specify whether case should be considered during search
125
RESID_SEARCH_CASE_BUTTON_TOOLTIP= Specify whether case should be considered during search
Lines 138-144 Link Here
138
RESID_SEARCH_FILENAME_REGEX_TOOLTIP= Specify whether file name pattern is a regular expression
138
RESID_SEARCH_FILENAME_REGEX_TOOLTIP= Specify whether file name pattern is a regular expression
139
RESID_SEARCH_FOLDERNAME_LABEL_LABEL= Folder:
139
RESID_SEARCH_FOLDERNAME_LABEL_LABEL= Folder:
140
RESID_SEARCH_FOLDERNAME_LABEL_TOOLTIP= Folder path
140
RESID_SEARCH_FOLDERNAME_LABEL_TOOLTIP= Folder path
141
RESID_SEARCH_FOLDERNAME_COMBO_TOOLTIP= Identifies the folder in which to search. It is fully qualified including the connection name, as in connection:/path/folder  
141
RESID_SEARCH_FOLDERNAME_COMBO_TOOLTIP= Identifies the folder in which to search. It is fully qualified including the connection name, as in connection:/path/folder
142
RESID_SEARCH_FOLDERNAME_BROWSE_LABEL= Browse...
142
RESID_SEARCH_FOLDERNAME_BROWSE_LABEL= Browse...
143
RESID_SEARCH_FOLDERNAME_BROWSE_TOOLTIP= Opens a dialog to select a folder
143
RESID_SEARCH_FOLDERNAME_BROWSE_TOOLTIP= Opens a dialog to select a folder
144
RESID_SEARCH_INCLUDE_ARCHIVES_LABEL= Search archive files
144
RESID_SEARCH_INCLUDE_ARCHIVES_LABEL= Search archive files
Lines 163-178 Link Here
163
163
164
# Search dialog
164
# Search dialog
165
RESID_SEARCH_MESSAGE_SEARCHING= Searching...
165
RESID_SEARCH_MESSAGE_SEARCHING= Searching...
166
RESID_SEARCH_MESSAGE_ONEMATCH= %1 match
166
RESID_SEARCH_MESSAGE_ONEMATCH= {0} match
167
RESID_SEARCH_MESSAGE_MULTIPLEMATCHES= %1 matches
167
RESID_SEARCH_MESSAGE_MULTIPLEMATCHES= {0} matches
168
168
169
##################################################################################
169
##################################################################################
170
############################    Resource Conflict Dlgs   #########################
170
############################Resource Conflict Dlgs #########################
171
##################################################################################
171
##################################################################################
172
RESID_CONFLICT_SAVE_TITLE= Save Conflict
172
RESID_CONFLICT_SAVE_TITLE= Save Conflict
173
RESID_CONFLICT_SAVE_MESSAGE= This file has changed on the remote system since it was opened.
173
RESID_CONFLICT_SAVE_MESSAGE= This file has changed on the remote system since it was opened.
174
RESID_CONFLICT_SAVE_OVERWRITEREMOTE= Overwrite the remote file.
174
RESID_CONFLICT_SAVE_OVERWRITEREMOTE= Overwrite the remote file.
175
RESID_CONFLICT_SAVE_REPLACELOCAL= Replace contents of editor with remote file.  Pending changes will be lost.  
175
RESID_CONFLICT_SAVE_REPLACELOCAL= Replace contents of editor with remote file.Pending changes will be lost.
176
RESID_CONFLICT_SAVE_SAVETODIFFERENT= Save the contents of the editor to a different remote file.
176
RESID_CONFLICT_SAVE_SAVETODIFFERENT= Save the contents of the editor to a different remote file.
177
177
178
RESID_CONFLICT_DOWNLOAD_TITLE= Local Changes Pending
178
RESID_CONFLICT_DOWNLOAD_TITLE= Local Changes Pending
Lines 184-190 Link Here
184
#==============================================================
184
#==============================================================
185
# REMOTE FILE SYSTEM CACHE PREFERENCE PAGE
185
# REMOTE FILE SYSTEM CACHE PREFERENCE PAGE
186
#=============================================================
186
#=============================================================
187
RESID_PREF_CACHE_DESCRIPTION=When RSE is used for editing, the remote files are cached.  Use this page to clear or limit the size of the file cache.
187
RESID_PREF_CACHE_DESCRIPTION=When RSE is used for editing, the remote files are cached.Use this page to clear or limit the size of the file cache.
188
RESID_PREF_CACHE_CLEAR=Clear Cached Files
188
RESID_PREF_CACHE_CLEAR=Clear Cached Files
189
RESID_PREF_CACHE_CLEAR_LABEL=&Clear cached files
189
RESID_PREF_CACHE_CLEAR_LABEL=&Clear cached files
190
RESID_PREF_CACHE_CLEAR_TOOLTIP=Delete remote files that have been cached in the local workspace
190
RESID_PREF_CACHE_CLEAR_TOOLTIP=Delete remote files that have been cached in the local workspace
Lines 214-220 Link Here
214
RESID_SUPERTRANSFER_PREFS_TYPE_TOOLTIP=Select an archive type to use for the transfer
214
RESID_SUPERTRANSFER_PREFS_TYPE_TOOLTIP=Select an archive type to use for the transfer
215
215
216
##################################################################################
216
##################################################################################
217
############################    Compare menu item    #############################
217
############################Compare menu item#############################
218
##################################################################################
218
##################################################################################
219
ACTION_COMPAREWITH_EACH_LABEL= Each Other
219
ACTION_COMPAREWITH_EACH_LABEL= Each Other
220
ACTION_COMPAREWITH_EACH_TOOLTIP= Compare remote resources to each other
220
ACTION_COMPAREWITH_EACH_TOOLTIP= Compare remote resources to each other
Lines 222-228 Link Here
222
ACTION_COMPAREWITH_HISTORY_TOOLTIP= Compare the local edition history of this resource
222
ACTION_COMPAREWITH_HISTORY_TOOLTIP= Compare the local edition history of this resource
223
223
224
##################################################################################
224
##################################################################################
225
############################    Replace menu item    #############################
225
############################Replace menu item#############################
226
##################################################################################
226
##################################################################################
227
ACTION_REPLACEWITH_HISTORY_LABEL= Local History...
227
ACTION_REPLACEWITH_HISTORY_LABEL= Local History...
228
ACTION_REPLACEWITH_HISTORY_TOOLTIP= Replace the remote file with a previous edition from it's local history
228
ACTION_REPLACEWITH_HISTORY_TOOLTIP= Replace the remote file with a previous edition from it's local history
Lines 230-236 Link Here
230
230
231
231
232
##################################################################################
232
##################################################################################
233
############################    Project menu item    #############################
233
############################Project menu item#############################
234
##################################################################################
234
##################################################################################
235
RESID_OPEN_FROM_ASSOCIATED_PROJECT=Open from Associated Project (&1)
235
RESID_OPEN_FROM_ASSOCIATED_PROJECT=Open from Associated Project (&1)
236
236
Lines 343-345 Link Here
343
343
344
RESID_PROPERTY_SEARCH_STATUS_ACTIVE_VALUE=Running
344
RESID_PROPERTY_SEARCH_STATUS_ACTIVE_VALUE=Running
345
RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE=Finished
345
RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE=Finished
346
347
348
#MESSAGES
349
MSG_ERROR_UNEXPECTED=An unexpected error occurred.
350
351
MSG_ERROR_FOLDER_NOTFOUND=Folder {0} not found on host {1}
352
MSG_ERROR_FILE_NOTFOUND=File {0} not found on host {1}
353
MSG_ERROR_FOLDERORFILE_NOTFOUND=File or folder {0} not found on host {1}
354
MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED=Archive Management is not supported by the current File subsystem's configuration.
355
MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED_DETAILS=In the properties for the File subsystem, choose a configuration that supports Archive Management.
356
357
MSG_DOWNLOAD_NO_WRITE=You do not have write access to file {0} on {1}. Do you want to open the file in browse mode?
358
MSG_DOWNLOAD_NO_WRITE_DETAILS=You do not have write permission to the file {0} on {1}. You can open the file in browse (read-only) mode. If you want to edit the file, change file permissions to allow write access to the file.
359
MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR=You are currently editing file {0} on {1}. Do you want to open the file in browse mode?
360
MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS=You are allowed to edit a file in one editor only. You can, however, open the file in another editor for browsing. Browsing lets you view the file but does not allow you to edit its contents.
361
MSG_UPLOAD_FILE_EXISTS=File {0} already exists. Do you want to replace it?
362
363
MSG_DOWNLOAD_PROGRESS=Downloading {0}
364
MSG_UPLOAD_PROGRESS=Uploading {0}
365
MSG_SYNCHRONIZE_PROGRESS=Synchronizing Resources...
366
MSG_EXTRACT_PROGRESS=Extracting {0}
367
MSG_PERCENT_DONE={0} of {1} complete ({2})
368
MSG_DOWNLOADING_PROGRESS=Downloading resources...
369
MSG_UPLOADING_PROGRESS=Uploading resources...
370
371
# REMOTE FILE SYSTEM EXCEPTION ERROR MESSAGES 
372
FILEMSG_SECURITY_ERROR=Operation failed. Security violation
373
FILEMSG_SECURITY_ERROR_DETAILS=Message reported from file system: {0}
374
375
FILEMSG_IO_ERROR=Operation failed. File system input or output error
376
FILEMSG_IO_ERROR_DETAILS=Message reported from file system: {0}
377
	
378
FILEMSG_FOLDER_NOTEMPTY=Folder is not empty. Cannot delete
379
FILEMSG_FOLDER_NOTEMPTY_DETAILS=The operation failed. One possible reason is that the folder is not empty
380
381
FILEMSG_FOLDER_NOTFOUND=Folder '{0}' not found
382
383
FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE=Folder '{0}' not found. Would you like to create it?
384
FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE_DETAILS=The folder you specified does not exist. Select Yes to create it, No to cancel the operation
385
FILEMSG_FILE_NOTFOUND=File '{0}' not found
386
387
# PATH VALIDATION
388
MSG_VALIDATE_PATH_EMPTY=Enter path
389
MSG_VALIDATE_PATH_EMPTY_DETAILS=You must specify a file system path.
390
MSG_VALIDATE_PATH_NOTUNIQUE=Path is not unique
391
MSG_VALIDATE_PATH_NOTUNIQUE_DETAILS=The path you specified is already in use.
392
MSG_VALIDATE_PATH_NOTVALID= Path syntax is not valid
393
MSG_VALIDATE_PATH_NOTVALID_DETAILS=The syntax of the path you specified is not valid. Enter a file system path that is valid for the remote operating system.
394
395
# Universal File Messages
396
FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY=Enter file name pattern
397
FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE=Filter string '{0}' already exists in this filter
398
FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID =Filter string name pattern not valid
399
FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES =You must include files or folders or both
400
401
FILEMSG_DELETE_FILE_FAILED=Deletion of the object {0} failed
402
FILEMSG_DELETE_FILE_FAILED_DETAILS=Either the object does not exist or you do not have enough authority to delete the object. If this is a folder, the folder may not be empty
403
404
FILEMSG_RENAME_FILE_FAILED=Renaming of the object {0} failed
405
FILEMSG_RENAME_FILE_FAILED_DETAILS=Rename operation failed because, the object to rename does not exist, or the object with new object name already exists, or the user does not have enough authority to rename the object
406
407
FILEMSG_CREATE_FILE_FAILED=No authority or file name not valid
408
FILEMSG_CREATE_FILE_FAILED_DETAILS=The file could not be created because of one of the following reasons:
409
- the user does not have enough authority to create the file
410
- the file name is not valid 
411
412
FILEMSG_CREATE_FILE_FAILED_EXIST=File already exists
413
FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS=The new file {0} already exists
414
415
FILEMSG_CREATE_FOLDER_FAILED=Creation of the folder failed
416
FILEMSG_CREATE_FOLDER_FAILED_DETAILS=The folder {0} could not be created because of one of the following reasons:
417
- the user does not have enough authority to create the folder
418
- the folder name is not valid 
419
420
FILEMSG_CREATE_FOLDER_FAILED_EXIST= Folder already exists
421
FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS=The new folder {0} already exists
422
423
FILEMSG_CREATE_RESOURCE_NOTVISIBLE=New resource will not be visible due to subsetting. Create it anyway?
424
FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS=The name of the resource you are creating does not match the current filter criteria. If you select Yes to create the resource, it will not be visible within the current filter.
425
426
FILEMSG_RENAME_RESOURCE_NOTVISIBLE=Resource will not be visible due to subsetting. Rename it anyway?
427
FILEMSG_RENAME_RESOURCE_NOTVISIBLE_DETAILS=The new name of the resource does not match the current filter criteria. If you select Yes to rename the resource, it will not be visible within the current filter.
428
429
FILEMSG_ERROR_NOFILETYPES =No file types specified
430
FILEMSG_ERROR_NOFILETYPES_DETAILS=Either specify one or more file types, or select to subset by file name
431
432
FILEMSG_COPY_FILE_FAILED=Copy of the file or folder {0} failed
433
FILEMSG_COPY_FILE_FAILED_DETAILS=The file system reported the copy operation failed. You may not have authority to the target folder, or it may be in use
434
435
FILEMSG_MOVE_FILE_FAILED=Move of the file or folder {0} failed
436
FILEMSG_MOVE_FILE_FAILED_DETAILS=The file system reported the move operation failed. You may not have authority to the source folder or file, or you may not have authority to the target folder, or it may be in use
437
 
438
FILEMSG_MOVE_TARGET_EQUALS_SOURCE=Target folder cannot equal source folder
439
FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS=It is impossible to move a folder to itself.
440
441
FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE = Target folder cannot equal parent of source file/folder.
442
FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS =A file or folder cannot be moved into the directory in which it exists. If you wish to rename the file, use the rename action.
443
444
FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE =Target folder cannot descend from source folder
445
FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS=It is impossible to move a folder to one of its subfolders.
446
447
FILEMSG_MOVE_FILTER_NOT_VALID = Selected filter is not a valid destination.
448
FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS=Some filters, such as the Root or Drives filter, do not designate locations on the remote file system and cannot have files moved into them.
449
450
FILEMSG_DELETING =Deleting {0}...
451
452
MSG_ERROR_CONNECTION_NOTFOUND = Connection {0} not found
453
MSG_ERROR_CONNECTION_NOTFOUND_DETAILS=No connection named {0} currently exists<
454
455
MSG_ERROR_PROFILE_NOTFOUND =Profile {0} not found
456
MSG_ERROR_PROFILE_NOTFOUND_DETAILS=No profile named {0} currently exists
457
458
MSG_CONNECT_FAILED      = Connect to {0} failed with an unexpected exception
459
MSG_CONNECT_UNKNOWNHOST = Connect failed. Host {0} not found or not responding
460
MSG_CONNECT_CANCELLED   =Connect to {0} was canceled
461
462
MSG_EXCEPTION_OCCURRED = An unexpected exception has occurred
463
464
FILEMSG_MOVE_INTERRUPTED = Operation interrupted. Some objects have been moved.
465
FILEMSG_MOVE_INTERRUPTED_DETAILS = The following objects have been moved:
466
{0}
467
FILEMSG_RENAME_INTERRUPTED =Operation interrupted. Some objects have been renamed.
468
FILEMSG_RENAME_INTERRUPTED_DETAILS= The following objects have been renamed:
469
{0}
470
FILEMSG_DELETE_INTERRUPTED =Operation interrupted. Some objects have been deleted.
471
FILEMSG_DELETE_INTERRUPTED_DETAILS = The following objects have been deleted:
472
{0}
473
FILEMSG_COPY_INTERRUPTED = Operation interrupted. Some objects have been copied to the destination.
474
FILEMSG_COPY_INTERRUPTED_DETAILS=The following objects have been copied:
475
{0}
476
477
# cache preferences
478
MSG_CACHE_UPLOAD_BEFORE_DELETE = One or more cached files have changes that have not been saved on the host.
479
MSG_CACHE_UNABLE_TO_SYNCH = Unable to synchronize cache changes to host. Operation canceled.
480
481
# remote search messages
482
MSG_REMOTE_SEARCH_INVALID_REGEX = Regular expression is not valid.
483
MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS=The value {0} you entered is not a valid regular expression.
484
             
485
MSG_COPY_PROGRESS = Copying '{0}' to '{1}'                
486
              
487
MSG_EXPAND_FAILED    = Expand failed. Try again
488
MSG_EXPAND_CANCELLED = Expand canceled. Try again
489
              
490
# operation status
491
MSG_OPERATION_RUNNING		= {0} - Running
492
MSG_OPERATION_FINISHED		= {0} - Finished
493
MSG_OPERTION_STOPPED		= {0} - Canceled
494
MSG_OPERATION_DISCONNECTED	= {0} - Disconnected
495
              
496
497
MSG_CREATEFILEGENERIC_PROGRESS = Creating file {0}...
498
MSG_CREATEFOLDERGENERIC_PROGRESS =Creating folder {0}...            
499
500
# universal commands
501
MSG_UCMD_INVOCATION_EMPTY      = The invocation may not be blank
502
503
504
505
506
     
(-)src/org/eclipse/rse/internal/files/ui/FileResources.java (+133 lines)
Lines 355-360 Link Here
355
	public static String	RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE;
355
	public static String	RESID_PROPERTY_SEARCH_STATUS_INACTIVE_VALUE;
356
356
357
	
357
	
358
	// messages
359
	public static String MSG_ERROR_UNEXPECTED;
360
	
361
	public static String MSG_ERROR_FOLDER_NOTFOUND;
362
	public static String MSG_ERROR_FILE_NOTFOUND; 
363
	public static String MSG_ERROR_FOLDERORFILE_NOTFOUND;
364
	public static String MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED;
365
	public static String MSG_ERROR_ARCHIVEMANAGEMENT_NOTSUPPORTED_DETAILS;
366
	
367
	// Remote editing messages
368
	public static String MSG_DOWNLOAD_NO_WRITE;
369
	public static String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR;
370
	public static String MSG_UPLOAD_FILE_EXISTS;	
371
	public static String MSG_DOWNLOAD_NO_WRITE_DETAILS;
372
	public static String MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS;
373
374
	// file transfer messages
375
	public static String MSG_DOWNLOAD_PROGRESS;
376
	public static String MSG_UPLOAD_PROGRESS;
377
	public static String MSG_SYNCHRONIZE_PROGRESS;
378
	public static String MSG_EXTRACT_PROGRESS;
379
	public static String MSG_PERCENT_DONE;
380
	public static String MSG_DOWNLOADING_PROGRESS;
381
	public static String MSG_UPLOADING_PROGRESS;
382
	
383
    // Remote File Exception Messages
384
  	public static String FILEMSG_SECURITY_ERROR;
385
  	public static String FILEMSG_IO_ERROR;
386
  	public static String FILEMSG_FOLDER_NOTEMPTY;
387
  	public static String FILEMSG_FOLDER_NOTFOUND;
388
  	public static String FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE;
389
  	public static String FILEMSG_FILE_NOTFOUND;
390
		
391
  	public static String FILEMSG_SECURITY_ERROR_DETAILS;
392
  	public static String FILEMSG_IO_ERROR_DETAILS;
393
  	public static String FILEMSG_FOLDER_NOTEMPTY_DETAILS;
394
  	public static String FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE_DETAILS;
395
396
  	
397
    // --------------------------
398
    // UNIVERSAL FILE MESSAGES...
399
    // --------------------------	
400
	public static  String FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY;
401
	public static  String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE;
402
	public static  String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID;
403
	public static  String FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES;
404
	
405
    public static  String FILEMSG_DELETE_FILE_FAILED;
406
    public static  String FILEMSG_RENAME_FILE_FAILED;
407
    public static  String FILEMSG_CREATE_FILE_FAILED;
408
    public static  String FILEMSG_CREATE_FILE_FAILED_EXIST;
409
    public static  String FILEMSG_CREATE_FOLDER_FAILED;
410
    public static  String FILEMSG_CREATE_FOLDER_FAILED_EXIST;
411
    public static  String FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
412
    public static  String FILEMSG_RENAME_RESOURCE_NOTVISIBLE;
413
	public static  String FILEMSG_ERROR_NOFILETYPES;
414
    public static  String FILEMSG_COPY_FILE_FAILED;
415
    public static  String FILEMSG_MOVE_FILE_FAILED;
416
    public static  String FILEMSG_MOVE_TARGET_EQUALS_SOURCE;
417
    public static  String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE;
418
	public static  String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE;
419
	public static  String FILEMSG_MOVE_FILTER_NOT_VALID;
420
421
    public static  String FILEMSG_DELETE_FILE_FAILED_DETAILS;
422
    public static  String FILEMSG_RENAME_FILE_FAILED_DETAILS;
423
    public static  String FILEMSG_CREATE_FILE_FAILED_DETAILS;
424
    public static  String FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS;
425
    public static  String FILEMSG_CREATE_FOLDER_FAILED_DETAILS;
426
    public static  String FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS;
427
    public static  String FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
428
    public static  String FILEMSG_RENAME_RESOURCE_NOTVISIBLE_DETAILS;
429
	public static  String FILEMSG_ERROR_NOFILETYPES_DETAILS;
430
    public static  String FILEMSG_COPY_FILE_FAILED_DETAILS;
431
    public static  String FILEMSG_MOVE_FILE_FAILED_DETAILS;
432
    public static  String FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS;
433
    public static  String FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS;
434
	public static  String FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS;
435
	public static  String FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS;
436
	
437
	public static String FILEMSG_MOVE_INTERRUPTED;
438
	public static String FILEMSG_RENAME_INTERRUPTED;	
439
	public static String FILEMSG_DELETE_INTERRUPTED;
440
	public static String FILEMSG_COPY_INTERRUPTED;
441
	public static String FILEMSG_MOVE_INTERRUPTED_DETAILS;
442
	public static String FILEMSG_RENAME_INTERRUPTED_DETAILS;	
443
	public static String FILEMSG_DELETE_INTERRUPTED_DETAILS;
444
	public static String FILEMSG_COPY_INTERRUPTED_DETAILS;
445
	
446
	// cache preferences
447
	public static String MSG_CACHE_UPLOAD_BEFORE_DELETE;
448
	public static String MSG_CACHE_UNABLE_TO_SYNCH;
449
	
450
	public static  String FILEMSG_DELETING;
451
452
	public static String MSG_ERROR_CONNECTION_NOTFOUND;
453
	public static String MSG_ERROR_PROFILE_NOTFOUND;
454
	public static String MSG_ERROR_CONNECTION_NOTFOUND_DETAILS;
455
	public static String MSG_ERROR_PROFILE_NOTFOUND_DETAILS;
456
  	
457
	public static String MSG_VALIDATE_PATH_EMPTY;
458
	public static String MSG_VALIDATE_PATH_NOTUNIQUE;
459
	public static String MSG_VALIDATE_PATH_NOTVALID;
460
	public static String MSG_VALIDATE_PATH_EMPTY_DETAILS;
461
	public static String MSG_VALIDATE_PATH_NOTUNIQUE_DETAILS;
462
	public static String MSG_VALIDATE_PATH_NOTVALID_DETAILS;
463
	
464
	public static String MSG_CONNECT_FAILED; 
465
	public static String MSG_CONNECT_UNKNOWNHOST;
466
	public static String MSG_CONNECT_CANCELLED; 
467
	
468
	public static String MSG_EXCEPTION_OCCURRED;
469
470
	// remote search messages
471
	public static String MSG_REMOTE_SEARCH_INVALID_REGEX;
472
	public static String MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS;
473
	
474
	public static String MSG_COPY_PROGRESS;
475
	
476
	public static String MSG_EXPAND_FAILED;
477
	public static String MSG_EXPAND_CANCELLED;
478
	
479
	// operation status
480
	public static String MSG_OPERATION_RUNNING;
481
	public static String MSG_OPERATION_FINISHED;
482
	public static String MSG_OPERTION_STOPPED;
483
	public static String MSG_OPERATION_DISCONNECTED;	
484
	
485
	public static String MSG_CREATEFILEGENERIC_PROGRESS;
486
	public static String MSG_CREATEFOLDERGENERIC_PROGRESS;
487
  	
488
	// universal commands
489
	public static String MSG_UCMD_INVOCATION_EMPTY;
490
	
358
	static 
491
	static 
359
	{
492
	{
360
		// load message values from bundle file
493
		// load message values from bundle file
(-)src/org/eclipse/rse/internal/files/ui/propertypages/SystemFilePropertyPage.java (-4 / +11 lines)
Lines 22-27 Link Here
22
 * Kevin Doyle (IBM) - [186125] Changing encoding of a file is not reflected when it was opened before
22
 * Kevin Doyle (IBM) - [186125] Changing encoding of a file is not reflected when it was opened before
23
 * David McKnight   (IBM)        - [209660] use parent encoding as default, rather than system encoding
23
 * David McKnight   (IBM)        - [209660] use parent encoding as default, rather than system encoding
24
 * David McKnight   (IBM)        - [209703] apply encoding and updating remote file when apply on property page
24
 * David McKnight   (IBM)        - [209703] apply encoding and updating remote file when apply on property page
25
 * 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
25
 *******************************************************************************/
26
 *******************************************************************************/
26
27
27
package org.eclipse.rse.internal.files.ui.propertypages;
28
package org.eclipse.rse.internal.files.ui.propertypages;
Lines 33-46 Link Here
33
import org.eclipse.core.resources.IFile;
34
import org.eclipse.core.resources.IFile;
34
import org.eclipse.core.runtime.CoreException;
35
import org.eclipse.core.runtime.CoreException;
35
import org.eclipse.core.runtime.IAdaptable;
36
import org.eclipse.core.runtime.IAdaptable;
37
import org.eclipse.core.runtime.IStatus;
36
import org.eclipse.core.runtime.NullProgressMonitor;
38
import org.eclipse.core.runtime.NullProgressMonitor;
39
import org.eclipse.osgi.util.NLS;
37
import org.eclipse.rse.core.RSECorePlugin;
40
import org.eclipse.rse.core.RSECorePlugin;
38
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
41
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
39
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
42
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
40
import org.eclipse.rse.core.model.ISystemRegistry;
43
import org.eclipse.rse.core.model.ISystemRegistry;
41
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
44
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
45
import org.eclipse.rse.internal.files.ui.Activator;
42
import org.eclipse.rse.internal.files.ui.FileResources;
46
import org.eclipse.rse.internal.files.ui.FileResources;
43
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
47
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
48
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
44
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
49
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
45
import org.eclipse.rse.services.files.RemoteFileIOException;
50
import org.eclipse.rse.services.files.RemoteFileIOException;
46
import org.eclipse.rse.services.files.RemoteFileSecurityException;
51
import org.eclipse.rse.services.files.RemoteFileSecurityException;
Lines 48-55 Link Here
48
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
53
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
49
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
54
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
50
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEncodingManager;
55
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileEncodingManager;
51
import org.eclipse.rse.ui.ISystemMessages;
52
import org.eclipse.rse.ui.RSEUIPlugin;
53
import org.eclipse.rse.ui.SystemWidgetHelpers;
56
import org.eclipse.rse.ui.SystemWidgetHelpers;
54
import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
57
import org.eclipse.rse.ui.propertypages.SystemBasePropertyPage;
55
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
58
import org.eclipse.rse.ui.view.ISystemEditableRemoteObject;
Lines 543-552 Link Here
543
           }
546
           }
544
    	  }
547
    	  }
545
   		  catch (RemoteFileIOException exc) {
548
   		  catch (RemoteFileIOException exc) {
546
             setMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IO_ERROR));
549
   			  String msgDetails = NLS.bind(FileResources.FILEMSG_IO_ERROR_DETAILS, exc.getMessage());
550
   			  setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.FILEMSG_IO_ERROR, msgDetails));
551
547
    	  }
552
    	  }
548
   		  catch (RemoteFileSecurityException exc) {
553
   		  catch (RemoteFileSecurityException exc) {
549
             setMessage(RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR));
554
   			  String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, exc.getMessage());
555
   			  setMessage(new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.FILEMSG_SECURITY_ERROR, msgDetails));
556
   			  
550
    	  }
557
    	  }
551
   		  catch (SystemMessageException e) {
558
   		  catch (SystemMessageException e) {
552
   			  setMessage(e.getSystemMessage());
559
   			  setMessage(e.getSystemMessage());
(-)src/org/eclipse/rse/internal/files/ui/propertypages/SystemCachePreferencePage.java (-4 / +8 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
15
 * Martin Oberhuber (Wind River) - [177523] Unify singleton getter methods
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
17
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
18
 * 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
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.files.ui.propertypages;
21
package org.eclipse.rse.internal.files.ui.propertypages;
Lines 28-33 Link Here
28
import org.eclipse.core.resources.IResource;
29
import org.eclipse.core.resources.IResource;
29
import org.eclipse.core.runtime.IAdaptable;
30
import org.eclipse.core.runtime.IAdaptable;
30
import org.eclipse.core.runtime.IProgressMonitor;
31
import org.eclipse.core.runtime.IProgressMonitor;
32
import org.eclipse.core.runtime.IStatus;
31
import org.eclipse.jface.dialogs.IDialogConstants;
33
import org.eclipse.jface.dialogs.IDialogConstants;
32
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
34
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
33
import org.eclipse.jface.operation.IRunnableContext;
35
import org.eclipse.jface.operation.IRunnableContext;
Lines 38-51 Link Here
38
import org.eclipse.rse.core.RSECorePlugin;
40
import org.eclipse.rse.core.RSECorePlugin;
39
import org.eclipse.rse.core.model.ISystemRegistry;
41
import org.eclipse.rse.core.model.ISystemRegistry;
40
import org.eclipse.rse.core.subsystems.ISubSystem;
42
import org.eclipse.rse.core.subsystems.ISubSystem;
43
import org.eclipse.rse.internal.files.ui.Activator;
41
import org.eclipse.rse.internal.files.ui.FileResources;
44
import org.eclipse.rse.internal.files.ui.FileResources;
42
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
45
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
43
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
46
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
44
import org.eclipse.rse.internal.ui.GenericMessages;
47
import org.eclipse.rse.internal.ui.GenericMessages;
45
import org.eclipse.rse.internal.ui.view.SystemTableViewProvider;
48
import org.eclipse.rse.internal.ui.view.SystemTableViewProvider;
49
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
46
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
50
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
47
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
51
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
48
import org.eclipse.rse.ui.ISystemMessages;
49
import org.eclipse.rse.ui.Mnemonics;
52
import org.eclipse.rse.ui.Mnemonics;
50
import org.eclipse.rse.ui.RSEUIPlugin;
53
import org.eclipse.rse.ui.RSEUIPlugin;
51
import org.eclipse.rse.ui.SystemBasePlugin;
54
import org.eclipse.rse.ui.SystemBasePlugin;
Lines 607-622 Link Here
607
		List dirtyEditors = new ArrayList();
610
		List dirtyEditors = new ArrayList();
608
		if (!getDirtyReplicas(dirtyEditors))
611
		if (!getDirtyReplicas(dirtyEditors))
609
		{
612
		{
610
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UNABLE_TO_SYNCH);
613
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_CACHE_UNABLE_TO_SYNCH);
611
			SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
614
			SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
612
			dlg.open();
615
			dlg.open();
613
616
617
614
			return false;
618
			return false;
615
		}
619
		}
616
		if (dirtyEditors.size() > 0)
620
		if (dirtyEditors.size() > 0)
617
		{
621
		{
618
			AdaptableList input = new AdaptableList();
622
			AdaptableList input = new AdaptableList();
619
			for (int i = 0; i < dirtyEditors.size(); i++)
623
			for (int i = 0; i < dirtyEditors.size(); i++) 
620
			{
624
			{
621
				ISystemEditableRemoteObject rmtObj = (ISystemEditableRemoteObject) dirtyEditors.get(i);
625
				ISystemEditableRemoteObject rmtObj = (ISystemEditableRemoteObject) dirtyEditors.get(i);
622
				input.add(rmtObj.getRemoteObject());
626
				input.add(rmtObj.getRemoteObject());
Lines 625-631 Link Here
625
			WorkbenchContentProvider cprovider = new WorkbenchContentProvider();
629
			WorkbenchContentProvider cprovider = new WorkbenchContentProvider();
626
			SystemTableViewProvider lprovider = new SystemTableViewProvider();
630
			SystemTableViewProvider lprovider = new SystemTableViewProvider();
627
631
628
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CACHE_UPLOAD_BEFORE_DELETE);
632
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_CACHE_UPLOAD_BEFORE_DELETE);
629
633
630
			ListSelectionDialog dlg =
634
			ListSelectionDialog dlg =
631
				new ListSelectionDialog(getShell(), input, cprovider, lprovider, msg.getLevelOneText());
635
				new ListSelectionDialog(getShell(), input, cprovider, lprovider, msg.getLevelOneText());
(-)src/org/eclipse/rse/internal/files/ui/actions/SystemUploadConflictAction.java (-4 / +11 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
15
 * Martin Oberhuber (Wind River) - [183824] Forward SystemMessageException from IRemoteFileSubsystem
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
17
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
18
 * 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
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.files.ui.actions;
21
package org.eclipse.rse.internal.files.ui.actions;
Lines 34-42 Link Here
34
import org.eclipse.rse.files.ui.dialogs.ISaveAsDialog;
35
import org.eclipse.rse.files.ui.dialogs.ISaveAsDialog;
35
import org.eclipse.rse.files.ui.dialogs.SaveAsDialog;
36
import org.eclipse.rse.files.ui.dialogs.SaveAsDialog;
36
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
37
import org.eclipse.rse.files.ui.resources.SystemEditableRemoteFile;
38
import org.eclipse.rse.internal.files.ui.Activator;
37
import org.eclipse.rse.internal.files.ui.FileResources;
39
import org.eclipse.rse.internal.files.ui.FileResources;
38
import org.eclipse.rse.internal.ui.SystemResources;
40
import org.eclipse.rse.internal.ui.SystemResources;
39
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
41
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
42
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
40
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
43
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
41
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
44
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
42
import org.eclipse.rse.services.files.RemoteFileIOException;
45
import org.eclipse.rse.services.files.RemoteFileIOException;
Lines 44-50 Link Here
44
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
47
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
45
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
48
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
46
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
49
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
47
import org.eclipse.rse.ui.ISystemMessages;
48
import org.eclipse.rse.ui.RSEUIPlugin;
50
import org.eclipse.rse.ui.RSEUIPlugin;
49
import org.eclipse.rse.ui.SystemBasePlugin;
51
import org.eclipse.rse.ui.SystemBasePlugin;
50
import org.eclipse.rse.ui.actions.SystemBaseAction;
52
import org.eclipse.rse.ui.actions.SystemBaseAction;
Lines 99-110 Link Here
99
                catch (SystemMessageException e)
101
                catch (SystemMessageException e)
100
                {
102
                {
101
                    SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
103
                    SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
102
                    SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
104
105
                    SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_ERROR_UNEXPECTED);
103
                    SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
106
                    SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
104
                    SystemMessageDialogRunnable runnable = ((SubSystem)fs).new SystemMessageDialogRunnable(dialog);
107
                    SystemMessageDialogRunnable runnable = ((SubSystem)fs).new SystemMessageDialogRunnable(dialog);
105
                    Display.getDefault().asyncExec(runnable);
108
                    Display.getDefault().asyncExec(runnable);
106
                }
109
                }
107
110
 
108
                try
111
                try
109
                {                    	
112
                {                    	
110
                    // copy temp file to remote system
113
                    // copy temp file to remote system
Lines 372-379 Link Here
372
                else
375
                else
373
                {
376
                {
374
                    enableOkButton(false);
377
                    enableOkButton(false);
375
                    _errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
378
                    _errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR,
379
                    		FileResources.MSG_VALIDATE_PATH_EMPTY, 
380
                    		FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
381
376
                    setErrorMessage(_errorMessage);
382
                    setErrorMessage(_errorMessage);
383
377
                }
384
                }
378
            }
385
            }
379
            else
386
            else
(-)src/org/eclipse/rse/internal/files/ui/actions/SystemCopyRemoteFileAction.java (-3 / +9 lines)
Lines 18-23 Link Here
18
 * Kevin Doyle (IBM) - [196588] Move Dialog doesn't show Archives
18
 * Kevin Doyle (IBM) - [196588] Move Dialog doesn't show Archives
19
 * David McKnight   (IBM)        - [207178] changing list APIs for file service and subsystems
19
 * David McKnight   (IBM)        - [207178] changing list APIs for file service and subsystems
20
 * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
20
 * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
21
 * 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
21
 ********************************************************************************/
22
 ********************************************************************************/
22
23
23
package org.eclipse.rse.internal.files.ui.actions;
24
package org.eclipse.rse.internal.files.ui.actions;
Lines 26-35 Link Here
26
27
27
import org.eclipse.core.runtime.IPath;
28
import org.eclipse.core.runtime.IPath;
28
import org.eclipse.core.runtime.IProgressMonitor;
29
import org.eclipse.core.runtime.IProgressMonitor;
30
import org.eclipse.core.runtime.IStatus;
29
import org.eclipse.core.runtime.NullProgressMonitor;
31
import org.eclipse.core.runtime.NullProgressMonitor;
30
import org.eclipse.jface.dialogs.Dialog;
32
import org.eclipse.jface.dialogs.Dialog;
31
import org.eclipse.jface.viewers.IStructuredSelection;
33
import org.eclipse.jface.viewers.IStructuredSelection;
32
import org.eclipse.jface.viewers.Viewer;
34
import org.eclipse.jface.viewers.Viewer;
35
import org.eclipse.osgi.util.NLS;
33
import org.eclipse.rse.core.RSECorePlugin;
36
import org.eclipse.rse.core.RSECorePlugin;
34
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
37
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
35
import org.eclipse.rse.core.filters.ISystemFilter;
38
import org.eclipse.rse.core.filters.ISystemFilter;
Lines 40-55 Link Here
40
import org.eclipse.rse.core.subsystems.ISubSystem;
43
import org.eclipse.rse.core.subsystems.ISubSystem;
41
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
44
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
42
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
45
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
46
import org.eclipse.rse.internal.files.ui.Activator;
47
import org.eclipse.rse.internal.files.ui.FileResources;
43
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
48
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
44
import org.eclipse.rse.internal.ui.SystemResources;
49
import org.eclipse.rse.internal.ui.SystemResources;
45
import org.eclipse.rse.internal.ui.view.SystemView;
50
import org.eclipse.rse.internal.ui.view.SystemView;
46
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
51
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
52
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
47
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
53
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
48
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
54
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
49
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
55
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
50
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
56
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
51
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
57
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
52
import org.eclipse.rse.ui.ISystemMessages;
53
import org.eclipse.rse.ui.RSEUIPlugin;
58
import org.eclipse.rse.ui.RSEUIPlugin;
54
import org.eclipse.rse.ui.SystemActionViewerFilter;
59
import org.eclipse.rse.ui.SystemActionViewerFilter;
55
import org.eclipse.rse.ui.SystemBasePlugin;
60
import org.eclipse.rse.ui.SystemBasePlugin;
Lines 229-236 Link Here
229
			ok = ss.copy(srcFileOrFolder, targetFolder, newName, null);
234
			ok = ss.copy(srcFileOrFolder, targetFolder, newName, null);
230
			if (!ok)
235
			if (!ok)
231
			{
236
			{
232
			  SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_FILE_FAILED);
237
				String msgTxt = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED, srcFileOrFolder.getName());
233
			  msg.makeSubstitution(srcFileOrFolder.getName());
238
				String msgDetails = FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS;
239
			  SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
234
			  throw new SystemMessageException(msg); 
240
			  throw new SystemMessageException(msg); 
235
			}
241
			}
236
			else
242
			else
(-)src/org/eclipse/rse/internal/files/ui/actions/SystemMoveRemoteFileAction.java (-12 / +36 lines)
Lines 19-24 Link Here
19
 * Kevin Doyle (IBM) - [199324] [nls] Move dialog SystemMessages should be added/updated
19
 * Kevin Doyle (IBM) - [199324] [nls] Move dialog SystemMessages should be added/updated
20
 * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
20
 * Xuan Chen (IBM) - [160775] [api] rename (at least within a zip) blocks UI thread
21
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
21
 * Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations
22
 * 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
22
 ********************************************************************************/
23
 ********************************************************************************/
23
24
24
package org.eclipse.rse.internal.files.ui.actions;
25
package org.eclipse.rse.internal.files.ui.actions;
Lines 29-44 Link Here
29
import org.eclipse.core.runtime.IStatus;
30
import org.eclipse.core.runtime.IStatus;
30
import org.eclipse.core.runtime.Status;
31
import org.eclipse.core.runtime.Status;
31
import org.eclipse.jface.viewers.Viewer;
32
import org.eclipse.jface.viewers.Viewer;
33
import org.eclipse.osgi.util.NLS;
32
import org.eclipse.rse.core.RSECorePlugin;
34
import org.eclipse.rse.core.RSECorePlugin;
33
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
35
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
34
import org.eclipse.rse.core.filters.ISystemFilterReference;
36
import org.eclipse.rse.core.filters.ISystemFilterReference;
35
import org.eclipse.rse.core.model.IHost;
37
import org.eclipse.rse.core.model.IHost;
36
import org.eclipse.rse.core.subsystems.ISubSystem;
38
import org.eclipse.rse.core.subsystems.ISubSystem;
39
import org.eclipse.rse.internal.files.ui.Activator;
40
import org.eclipse.rse.internal.files.ui.FileResources;
41
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
37
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
42
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
38
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
43
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
39
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
44
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
40
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
45
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
41
import org.eclipse.rse.ui.ISystemMessages;
42
import org.eclipse.rse.ui.RSEUIPlugin;
46
import org.eclipse.rse.ui.RSEUIPlugin;
43
import org.eclipse.rse.ui.actions.SystemBaseCopyAction;
47
import org.eclipse.rse.ui.actions.SystemBaseCopyAction;
44
import org.eclipse.rse.ui.messages.SystemMessageDialog;
48
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 115-123 Link Here
115
					{
119
					{
116
						movedFileNamesList = movedFileNamesList + "\n" + (String)(movedFileNames.get(i)); //$NON-NLS-1$
120
						movedFileNamesList = movedFileNamesList + "\n" + (String)(movedFileNames.get(i)); //$NON-NLS-1$
117
					}
121
					}
118
					SystemMessage thisMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_INTERRUPTED);
122
					
119
					thisMessage.makeSubstitution(movedFileNamesList);
123
					String msgTxt = FileResources.FILEMSG_MOVE_INTERRUPTED;
124
					String msgDetails = NLS.bind(FileResources.FILEMSG_MOVE_INTERRUPTED_DETAILS, movedFileNamesList);
125
									
126
					SystemMessage thisMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
120
					SystemMessageDialog.displayErrorMessage(shell, thisMessage);
127
					SystemMessageDialog.displayErrorMessage(shell, thisMessage);
128
				
121
					status = Status.CANCEL_STATUS;
129
					status = Status.CANCEL_STATUS;
122
				}
130
				}
123
				else
131
				else
Lines 194-201 Link Here
194
		ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor);
202
		ok = ss.move(srcFileOrFolder, targetFolder, newName, monitor);
195
		if (!ok)
203
		if (!ok)
196
		{
204
		{
197
		  SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_FILE_FAILED);
205
			String msgTxt = NLS.bind(FileResources.FILEMSG_MOVE_FILE_FAILED, srcFileOrFolder.getName());
198
		  msg.makeSubstitution(srcFileOrFolder.getName());
206
			String msgDetails = FileResources.FILEMSG_MOVE_FILE_FAILED_DETAILS;
207
		   SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);		
199
		  throw new SystemMessageException(msg); 
208
		  throw new SystemMessageException(msg); 
200
		}
209
		}
201
		else
210
		else
Lines 240-259 Link Here
240
					
249
					
241
			        if (selectedFolderPath.equals(selectedParentFile.getAbsolutePath()))
250
			        if (selectedFolderPath.equals(selectedParentFile.getAbsolutePath()))
242
			        {
251
			        {
243
			        	if (targetEqualsParentSrcMsg == null)
252
			        	if (targetEqualsParentSrcMsg == null){
244
			              targetEqualsParentSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE);
253
			        		targetEqualsParentSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, 
254
			        				FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE, 
255
			        				FileResources.FILEMSG_MOVE_TARGET_EQUALS_PARENT_OF_SOURCE_DETAILS);
256
257
			        	
258
			        	}
245
			            return targetEqualsParentSrcMsg;
259
			            return targetEqualsParentSrcMsg;
246
			        }
260
			        }
247
			        else if (selectedFolderPath.equals(selectedFile.getAbsolutePath()))
261
			        else if (selectedFolderPath.equals(selectedFile.getAbsolutePath()))
248
			        {
262
			        {
249
			        	if (targetEqualsSrcMsg == null)
263
			        	if (targetEqualsSrcMsg == null){
250
			              targetEqualsSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_EQUALS_SOURCE); // todo: different msg
264
			        		targetEqualsSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, 
265
			        				FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE, 
266
			        				FileResources.FILEMSG_MOVE_TARGET_EQUALS_SOURCE_DETAILS);
267
			        	}
251
			            return targetEqualsSrcMsg;
268
			            return targetEqualsSrcMsg;
252
			        }
269
			        }
253
			        else if (selectedFolder.isDescendantOf(selectedFile))
270
			        else if (selectedFolder.isDescendantOf(selectedFile))
254
			        {
271
			        {
255
			        	if (targetDescendsFromSrcMsg == null)
272
			        	if (targetDescendsFromSrcMsg == null){
256
			        	 targetDescendsFromSrcMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE);
273
				        		targetDescendsFromSrcMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, 
274
				        				FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE, 
275
				        				FileResources.FILEMSG_MOVE_TARGET_DESCENDS_FROM_SOURCE_DETAILS);
276
			        		
277
			        	}
257
			        	return targetDescendsFromSrcMsg;
278
			        	return targetDescendsFromSrcMsg;
258
			        }
279
			        }
259
				}
280
				}
Lines 267-273 Link Here
267
			// Drives and Root Filters which we can't Move files to.
288
			// Drives and Root Filters which we can't Move files to.
268
			if (firstFilterString.equals("*") || firstFilterString.equals("/*")) { //$NON-NLS-1$ //$NON-NLS-2$
289
			if (firstFilterString.equals("*") || firstFilterString.equals("/*")) { //$NON-NLS-1$ //$NON-NLS-2$
269
				if (invalidFilterMsg == null) {
290
				if (invalidFilterMsg == null) {
270
					invalidFilterMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_MOVE_FILTER_NOT_VALID);
291
		        		invalidFilterMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, 
292
		        				FileResources.FILEMSG_MOVE_FILTER_NOT_VALID, 
293
		        				FileResources.FILEMSG_MOVE_FILTER_NOT_VALID_DETAILS);
294
271
				}
295
				}
272
				return invalidFilterMsg;
296
				return invalidFilterMsg;
273
			}
297
			}
(-)src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFileWizard.java (-8 / +23 lines)
Lines 15-20 Link Here
15
 * Rupen Mardirossian	(IBM) - [187530] Commented out line 192, in order to stop logging of SystemMessageException
15
 * Rupen Mardirossian	(IBM) - [187530] Commented out line 192, in order to stop logging of SystemMessageException
16
 * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
16
 * Martin Oberhuber (Wind River) - [204669] Fix ftp path concatenation on systems using backslash separator
17
 * Xuan Chen        (IBM)        - [209828] Need to move the Create operation to a job.
17
 * Xuan Chen        (IBM)        - [209828] Need to move the Create operation to a job.
18
 * 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
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.files.ui.wizards;
21
package org.eclipse.rse.internal.files.ui.wizards;
Lines 27-32 Link Here
27
import org.eclipse.core.runtime.NullProgressMonitor;
28
import org.eclipse.core.runtime.NullProgressMonitor;
28
import org.eclipse.core.runtime.Status;
29
import org.eclipse.core.runtime.Status;
29
import org.eclipse.jface.viewers.Viewer;
30
import org.eclipse.jface.viewers.Viewer;
31
import org.eclipse.osgi.util.NLS;
30
import org.eclipse.rse.core.RSECorePlugin;
32
import org.eclipse.rse.core.RSECorePlugin;
31
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
33
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
32
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
34
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
Lines 36-43 Link Here
36
import org.eclipse.rse.core.filters.ISystemFilterReference;
38
import org.eclipse.rse.core.filters.ISystemFilterReference;
37
import org.eclipse.rse.core.model.ISystemRegistry;
39
import org.eclipse.rse.core.model.ISystemRegistry;
38
import org.eclipse.rse.core.subsystems.ISubSystem;
40
import org.eclipse.rse.core.subsystems.ISubSystem;
41
import org.eclipse.rse.internal.files.ui.Activator;
39
import org.eclipse.rse.internal.files.ui.FileResources;
42
import org.eclipse.rse.internal.files.ui.FileResources;
40
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
43
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
44
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
41
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
45
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
42
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
46
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
43
import org.eclipse.rse.services.files.RemoteFileIOException;
47
import org.eclipse.rse.services.files.RemoteFileIOException;
Lines 48-54 Link Here
48
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
52
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
49
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
53
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
50
import org.eclipse.rse.ui.ISystemIconConstants;
54
import org.eclipse.rse.ui.ISystemIconConstants;
51
import org.eclipse.rse.ui.ISystemMessages;
52
import org.eclipse.rse.ui.RSEUIPlugin;
55
import org.eclipse.rse.ui.RSEUIPlugin;
53
import org.eclipse.rse.ui.SystemBasePlugin;
56
import org.eclipse.rse.ui.SystemBasePlugin;
54
import org.eclipse.rse.ui.messages.SystemMessageDialog;
57
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 105-117 Link Here
105
            {	
108
            {	
106
            	ok = false;
109
            	ok = false;
107
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " );  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
110
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " );  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
108
            	msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED_EXIST)).makeSubstitution(absName);
111
            	String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED;
112
            	String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS, absName);
113
            	
114
            	msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
109
            	SystemMessageDialog.displayErrorMessage(null, msg);
115
            	SystemMessageDialog.displayErrorMessage(null, msg);
110
            } 
116
            } 
111
            catch (RemoteFileSecurityException e)  
117
            catch (RemoteFileSecurityException e)  
112
            {
118
            {
113
            	ok = false;
119
            	ok = false;
114
            	msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FILE_FAILED)).makeSubstitution(absName);
120
            	String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED;
121
            	String msgDetails = NLS.bind(FileResources.FILEMSG_COPY_FILE_FAILED_DETAILS, absName);
122
            	
123
            	msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
124
            	
125
115
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException ");  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
126
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileSecurityException ");  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
116
            	SystemMessageDialog.displayErrorMessage(null, msg);                                               
127
            	SystemMessageDialog.displayErrorMessage(null, msg);                                               
117
            } 
128
            } 
Lines 230-236 Link Here
230
			    else
241
			    else
231
			    */
242
			    */
232
			    {
243
			    {
233
			  	   msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
244
			       String msgTxt = NLS.bind(FileResources.FILEMSG_FOLDER_NOTFOUND, parentFolder.getAbsolutePath());			    	
245
			  	   msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
234
			       msg.makeSubstitution(parentFolder.getAbsolutePath());            	
246
			       msg.makeSubstitution(parentFolder.getAbsolutePath());            	
235
			       mainPage.setMessage(msg);
247
			       mainPage.setMessage(msg);
236
			       return false;
248
			       return false;
Lines 244-252 Link Here
244
            	  return false;
256
            	  return false;
245
            }
257
            }
246
            // ok, proceed with actual creation...
258
            // ok, proceed with actual creation...
247
            SystemMessage createMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CREATEFILEGENERIC_PROGRESS); 
259
            
248
            createMessage.makeSubstitution(name); 
260
            String msgTxt = NLS.bind(FileResources.MSG_CREATEFILEGENERIC_PROGRESS, name);
249
            CreateNewFileJob createNewFileJob = new CreateNewFileJob(parentFolder, name, absName,  createMessage.getLevelOneText());
261
            CreateNewFileJob createNewFileJob = new CreateNewFileJob(parentFolder, name, absName,  msgTxt);
250
            createNewFileJob.schedule();
262
            createNewFileJob.schedule();
251
		}
263
		}
252
		return ok;
264
		return ok;
Lines 311-317 Link Here
311
323
312
		if (!meets)
324
		if (!meets)
313
		{
325
		{
314
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_RESOURCE_NOTVISIBLE);
326
			String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
327
			String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
328
			
329
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
315
			SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
330
			SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
316
			if (msgDlg.openQuestionNoException()) // ask user if they want to proceed
331
			if (msgDlg.openQuestionNoException()) // ask user if they want to proceed
317
			  meets = true; // they do, so pretend it meets the criteria
332
			  meets = true; // they do, so pretend it meets the criteria
(-)src/org/eclipse/rse/internal/files/ui/wizards/SystemNewFolderWizard.java (-9 / +20 lines)
Lines 14-19 Link Here
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
15
 * David Dykstal (IBM) - [188718] fix error messages showing up as info messages on wizard page
15
 * David Dykstal (IBM) - [188718] fix error messages showing up as info messages on wizard page
16
 * Xuan Chen        (IBM)        - [209828] Need to move the Create operation to a job.
16
 * Xuan Chen        (IBM)        - [209828] Need to move the Create operation to a job.
17
 * 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
17
 ********************************************************************************/
18
 ********************************************************************************/
18
19
19
package org.eclipse.rse.internal.files.ui.wizards;
20
package org.eclipse.rse.internal.files.ui.wizards;
Lines 22-30 Link Here
22
import org.eclipse.core.runtime.IProgressMonitor;
23
import org.eclipse.core.runtime.IProgressMonitor;
23
import org.eclipse.core.runtime.IStatus;
24
import org.eclipse.core.runtime.IStatus;
24
import org.eclipse.core.runtime.Status;
25
import org.eclipse.core.runtime.Status;
26
import org.eclipse.osgi.util.NLS;
25
import org.eclipse.rse.core.filters.ISystemFilter;
27
import org.eclipse.rse.core.filters.ISystemFilter;
26
import org.eclipse.rse.core.filters.ISystemFilterReference;
28
import org.eclipse.rse.core.filters.ISystemFilterReference;
29
import org.eclipse.rse.internal.files.ui.Activator;
27
import org.eclipse.rse.internal.files.ui.FileResources;
30
import org.eclipse.rse.internal.files.ui.FileResources;
31
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
28
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
32
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
29
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
33
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
30
import org.eclipse.rse.services.files.RemoteFileIOException;
34
import org.eclipse.rse.services.files.RemoteFileIOException;
Lines 32-38 Link Here
32
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
36
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
33
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
37
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
34
import org.eclipse.rse.ui.ISystemIconConstants;
38
import org.eclipse.rse.ui.ISystemIconConstants;
35
import org.eclipse.rse.ui.ISystemMessages;
36
import org.eclipse.rse.ui.RSEUIPlugin;
39
import org.eclipse.rse.ui.RSEUIPlugin;
37
import org.eclipse.rse.ui.SystemBasePlugin;
40
import org.eclipse.rse.ui.SystemBasePlugin;
38
import org.eclipse.rse.ui.messages.SystemMessageDialog;
41
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 88-100 Link Here
88
            {	
91
            {	
89
            	ok = false;
92
            	ok = false;
90
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " );  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
93
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote file "+ absName + " failed with RemoteFileIOException " );  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
91
            	msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED_EXIST)).makeSubstitution(absName);
94
            	String msgTxt = FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST;
95
            	String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FILE_FAILED_EXIST_DETAILS, absName);            	
96
            	msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
92
            	SystemMessageDialog.displayErrorMessage(null, msg);
97
            	SystemMessageDialog.displayErrorMessage(null, msg);
93
            } 
98
            } 
94
            catch (RemoteFileSecurityException e)  
99
            catch (RemoteFileSecurityException e)  
95
            {
100
            {
96
            	ok = false;
101
            	ok = false;
97
            	msg = (RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED)).makeSubstitution(absName);
102
            	String msgTxt = FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST;
103
            	String msgDetails = NLS.bind(FileResources.FILEMSG_CREATE_FOLDER_FAILED_EXIST_DETAILS, absName);            	
104
            	msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);            	
98
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException ");  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
105
            	SystemBasePlugin.logDebugMessage(CLASSNAME+ ":", " Creating remote folder "+ absName + " failed with RemoteFileSecurityException ");  	 //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
99
            	SystemMessageDialog.displayErrorMessage(null, msg);                                               
106
            	SystemMessageDialog.displayErrorMessage(null, msg);                                               
100
            } 
107
            } 
Lines 212-219 Link Here
212
			    else
219
			    else
213
			    */
220
			    */
214
			    {
221
			    {
215
			  	   msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
222
			      String msgTxt = NLS.bind(FileResources.FILEMSG_FILE_NOTFOUND, parentFolder.getAbsolutePath());			    				    	
216
			       msg.makeSubstitution(parentFolder.getAbsolutePath());            	
223
			  	   msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
224
      	
217
			       mainPage.setMessage(msg);
225
			       mainPage.setMessage(msg);
218
			       return false;
226
			       return false;
219
			    }
227
			    }
Lines 227-235 Link Here
227
            }
235
            }
228
            
236
            
229
            // ok, proceed with actual creation...
237
            // ok, proceed with actual creation...
230
            SystemMessage createMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CREATEFOLDERGENERIC_PROGRESS); 
238
            String msgTxt = NLS.bind(FileResources.MSG_CREATEFOLDERGENERIC_PROGRESS, name);
231
            createMessage.makeSubstitution(name); 
239
232
            CreateNewFolderJob createNewFolderJob = new CreateNewFolderJob(parentFolder, name, absName,  createMessage.getLevelOneText());
240
            CreateNewFolderJob createNewFolderJob = new CreateNewFolderJob(parentFolder, name, absName,  msgTxt);
233
            createNewFolderJob.schedule();
241
            createNewFolderJob.schedule();
234
            
242
            
235
		}
243
		}
Lines 273-279 Link Here
273
    	}
281
    	}
274
		if (!meets)
282
		if (!meets)
275
		{
283
		{
276
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_RESOURCE_NOTVISIBLE);
284
			String msgTxt = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE;
285
			String msgDetails = FileResources.FILEMSG_CREATE_RESOURCE_NOTVISIBLE_DETAILS;
286
			
287
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails);
277
			SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
288
			SystemMessageDialog msgDlg = new SystemMessageDialog(getShell(), msg);
278
			if (msgDlg.openQuestionNoException()) // ask user if they want to proceed
289
			if (msgDlg.openQuestionNoException()) // ask user if they want to proceed
279
			  meets = true; // they do, so pretend it meets the criteria
290
			  meets = true; // they do, so pretend it meets the criteria
(-)src/org/eclipse/rse/internal/files/ui/search/SystemSearchPage.java (-6 / +17 lines)
Lines 16-21 Link Here
16
 * Kevin Doyle (IBM) - [189430] Limited System Types displayed in Folder Dialog
16
 * Kevin Doyle (IBM) - [189430] Limited System Types displayed in Folder Dialog
17
 * Kevin Doyle (IBM) - [187427] Selecting an Archive will check Search Archives checkbox
17
 * Kevin Doyle (IBM) - [187427] Selecting an Archive will check Search Archives checkbox
18
 * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
18
 * Martin Oberhuber (Wind River) - [196936] Hide disabled system types
19
 * 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
19
 ********************************************************************************/
20
 ********************************************************************************/
20
21
21
package org.eclipse.rse.internal.files.ui.search;
22
package org.eclipse.rse.internal.files.ui.search;
Lines 28-49 Link Here
28
import java.util.List;
29
import java.util.List;
29
30
30
import org.eclipse.core.runtime.IAdaptable;
31
import org.eclipse.core.runtime.IAdaptable;
32
import org.eclipse.core.runtime.IStatus;
31
import org.eclipse.core.runtime.NullProgressMonitor;
33
import org.eclipse.core.runtime.NullProgressMonitor;
32
import org.eclipse.jface.dialogs.DialogPage;
34
import org.eclipse.jface.dialogs.DialogPage;
33
import org.eclipse.jface.dialogs.IDialogSettings;
35
import org.eclipse.jface.dialogs.IDialogSettings;
34
import org.eclipse.jface.text.ITextSelection;
36
import org.eclipse.jface.text.ITextSelection;
35
import org.eclipse.jface.viewers.ISelection;
37
import org.eclipse.jface.viewers.ISelection;
36
import org.eclipse.jface.viewers.IStructuredSelection;
38
import org.eclipse.jface.viewers.IStructuredSelection;
39
import org.eclipse.osgi.util.NLS;
37
import org.eclipse.rse.core.IRSESystemType;
40
import org.eclipse.rse.core.IRSESystemType;
38
import org.eclipse.rse.core.RSECorePlugin;
41
import org.eclipse.rse.core.RSECorePlugin;
39
import org.eclipse.rse.core.model.IHost;
42
import org.eclipse.rse.core.model.IHost;
40
import org.eclipse.rse.core.model.ISystemProfile;
43
import org.eclipse.rse.core.model.ISystemProfile;
41
import org.eclipse.rse.core.model.ISystemRegistry;
44
import org.eclipse.rse.core.model.ISystemRegistry;
45
import org.eclipse.rse.internal.files.ui.Activator;
42
import org.eclipse.rse.internal.files.ui.FileResources;
46
import org.eclipse.rse.internal.files.ui.FileResources;
43
import org.eclipse.rse.internal.ui.view.search.SystemSearchUI;
47
import org.eclipse.rse.internal.ui.view.search.SystemSearchUI;
44
import org.eclipse.rse.internal.ui.view.search.SystemSearchViewPart;
48
import org.eclipse.rse.internal.ui.view.search.SystemSearchViewPart;
45
import org.eclipse.rse.services.clientserver.SystemSearchString;
49
import org.eclipse.rse.services.clientserver.SystemSearchString;
46
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
50
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
51
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
47
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
52
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
48
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
53
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
49
import org.eclipse.rse.services.clientserver.search.SystemSearchUtil;
54
import org.eclipse.rse.services.clientserver.search.SystemSearchUtil;
Lines 55-61 Link Here
55
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
60
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
56
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
61
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
57
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
62
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
58
import org.eclipse.rse.ui.ISystemMessages;
59
import org.eclipse.rse.ui.Mnemonics;
63
import org.eclipse.rse.ui.Mnemonics;
60
import org.eclipse.rse.ui.RSEUIPlugin;
64
import org.eclipse.rse.ui.RSEUIPlugin;
61
import org.eclipse.rse.ui.SystemBasePlugin;
65
import org.eclipse.rse.ui.SystemBasePlugin;
Lines 671-679 Link Here
671
			if (searchString != null && searchString.length() != 0) {
675
			if (searchString != null && searchString.length() != 0) {
672
				
676
				
673
				if (!util.isValidRegex(searchString)) {
677
				if (!util.isValidRegex(searchString)) {
674
					SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX);
678
					
675
					message.makeSubstitution(searchString);
679
					String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX;
680
					String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, searchString);
681
682
					SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
676
					SystemMessageDialog.displayErrorMessage(getShell(), message);
683
					SystemMessageDialog.displayErrorMessage(getShell(), message);
684
677
					stringCombo.setFocus();
685
					stringCombo.setFocus();
678
					return false;
686
					return false;
679
				}
687
				}
Lines 688-696 Link Here
688
			if (fileNameString != null && fileNameString.length() != 0) {
696
			if (fileNameString != null && fileNameString.length() != 0) {
689
				
697
				
690
				if (!util.isValidRegex(fileNameString)) {
698
				if (!util.isValidRegex(fileNameString)) {
691
					SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_REMOTE_SEARCH_INVALID_REGEX);
699
					String msgTxt = FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX;
692
					message.makeSubstitution(fileNameString);
700
					String msgDetails = NLS.bind(FileResources.MSG_REMOTE_SEARCH_INVALID_REGEX_DETAILS, fileNameString);
693
					SystemMessageDialog.displayErrorMessage(getShell(), message);
701
					
702
					SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
703
					SystemMessageDialog.displayErrorMessage(getShell(), message);				
704
694
					fileNameCombo.setFocus();
705
					fileNameCombo.setFocus();
695
					return false;
706
					return false;
696
				}
707
				}
(-)src/org/eclipse/rse/files/ui/widgets/SystemFileFilterStringEditPane.java (-5 / +11 lines)
Lines 12-37 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.files.ui.widgets;
18
package org.eclipse.rse.files.ui.widgets;
18
19
19
import java.util.Vector;
20
import java.util.Vector;
20
21
22
import org.eclipse.core.runtime.IStatus;
23
import org.eclipse.osgi.util.NLS;
21
import org.eclipse.rse.core.filters.ISystemFilter;
24
import org.eclipse.rse.core.filters.ISystemFilter;
22
import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
25
import org.eclipse.rse.core.filters.ISystemFilterPoolManagerProvider;
23
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
26
import org.eclipse.rse.core.filters.ISystemFilterPoolReferenceManagerProvider;
24
import org.eclipse.rse.core.subsystems.ISubSystem;
27
import org.eclipse.rse.core.subsystems.ISubSystem;
25
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
28
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
29
import org.eclipse.rse.internal.files.ui.Activator;
30
import org.eclipse.rse.internal.files.ui.FileResources;
26
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
31
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
27
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
32
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
33
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
28
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
34
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
29
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
35
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
30
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
36
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
31
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
37
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
32
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration;
38
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystemConfiguration;
33
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString;
39
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileFilterString;
34
import org.eclipse.rse.ui.ISystemMessages;
35
import org.eclipse.rse.ui.RSEUIPlugin;
40
import org.eclipse.rse.ui.RSEUIPlugin;
36
import org.eclipse.rse.ui.SystemBasePlugin;
41
import org.eclipse.rse.ui.SystemBasePlugin;
37
import org.eclipse.rse.ui.SystemWidgetHelpers;
42
import org.eclipse.rse.ui.SystemWidgetHelpers;
Lines 502-508 Link Here
502
			{
507
			{
503
				if (textTypes.getText().trim().length() == 0)
508
				if (textTypes.getText().trim().length() == 0)
504
				{
509
				{
505
				  errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_ERROR_NOFILETYPES);
510
					errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.FILEMSG_ERROR_NOFILETYPES, FileResources.FILEMSG_ERROR_NOFILETYPES_DETAILS);
506
				}
511
				}
507
			}
512
			}
508
			controlInError = textFile;
513
			controlInError = textFile;
Lines 515-521 Link Here
515
			  notUnique = true;
520
			  notUnique = true;
516
			if (notUnique)
521
			if (notUnique)
517
			{
522
			{
518
			  errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString);
523
				String msgTxt = NLS.bind(FileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, currFilterString);
524
				errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
519
			}
525
			}
520
			controlInError = textFile;
526
			controlInError = textFile;
521
		}		  
527
		}		  
Lines 633-639 Link Here
633
					}
639
					}
634
					// no path validator, so just use default path empty message
640
					// no path validator, so just use default path empty message
635
					else {
641
					else {
636
						errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
642
						errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
637
					}
643
					}
638
				}
644
				}
639
				// KM: defect 53210
645
				// KM: defect 53210
Lines 649-655 Link Here
649
						}
655
						}
650
						// no path validator, so just use default path empty message
656
						// no path validator, so just use default path empty message
651
						else {
657
						else {
652
							errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_PATH_EMPTY);
658
							errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_VALIDATE_PATH_EMPTY, FileResources.MSG_VALIDATE_PATH_EMPTY_DETAILS);
653
						}						
659
						}						
654
					}
660
					}
655
				}
661
				}
(-)src/org/eclipse/rse/files/ui/widgets/SaveAsForm.java (-4 / +9 lines)
Lines 12-28 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.files.ui.widgets;
18
package org.eclipse.rse.files.ui.widgets;
18
19
20
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.core.runtime.NullProgressMonitor;
21
import org.eclipse.core.runtime.NullProgressMonitor;
20
import org.eclipse.jface.viewers.SelectionChangedEvent;
22
import org.eclipse.jface.viewers.SelectionChangedEvent;
23
import org.eclipse.osgi.util.NLS;
24
import org.eclipse.rse.internal.files.ui.Activator;
21
import org.eclipse.rse.internal.files.ui.FileResources;
25
import org.eclipse.rse.internal.files.ui.FileResources;
26
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
22
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
27
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
23
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
28
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
24
import org.eclipse.rse.ui.ISystemMessages;
25
import org.eclipse.rse.ui.RSEUIPlugin;
26
import org.eclipse.rse.ui.SystemWidgetHelpers;
29
import org.eclipse.rse.ui.SystemWidgetHelpers;
27
import org.eclipse.rse.ui.messages.ISystemMessageLine;
30
import org.eclipse.rse.ui.messages.ISystemMessageLine;
28
import org.eclipse.rse.ui.messages.SystemMessageDialog;
31
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 110-119 Link Here
110
		    //System.out.println("...saveasMbr null? "+ (saveasMbr==null));
113
		    //System.out.println("...saveasMbr null? "+ (saveasMbr==null));
111
			if (saveasFile != null && saveasFile.exists())
114
			if (saveasFile != null && saveasFile.exists())
112
			{
115
			{
113
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UPLOAD_FILE_EXISTS);
116
				String msgTxt = NLS.bind(FileResources.MSG_UPLOAD_FILE_EXISTS, fileName);
114
				msg.makeSubstitution(fileName);
117
118
				SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt);
115
				SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
119
				SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
116
				ok = dlg.openQuestionNoException();
120
				ok = dlg.openQuestionNoException();
121
117
			}
122
			}
118
		}
123
		}
119
		return ok;
124
		return ok;
(-)src/org/eclipse/rse/files/ui/widgets/SystemQualifiedRemoteFolderCombo.java (-17 / +13 lines)
Lines 16-21 Link Here
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
17
 * Martin Oberhuber (Wind River) - [175680] Deprecate obsolete ISystemRegistry methods
18
 * David McKnight   (IBM)        - [186363] get rid of obsolete calls to ISubSystem.connect()
18
 * David McKnight   (IBM)        - [186363] get rid of obsolete calls to ISubSystem.connect()
19
 * 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
19
 ********************************************************************************/
20
 ********************************************************************************/
20
21
21
package org.eclipse.rse.files.ui.widgets;
22
package org.eclipse.rse.files.ui.widgets;
Lines 23-28 Link Here
23
import java.util.ResourceBundle;
24
import java.util.ResourceBundle;
24
25
25
import org.eclipse.core.runtime.NullProgressMonitor;
26
import org.eclipse.core.runtime.NullProgressMonitor;
27
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.rse.core.IRSESystemType;
28
import org.eclipse.rse.core.IRSESystemType;
27
import org.eclipse.rse.core.RSECorePlugin;
29
import org.eclipse.rse.core.RSECorePlugin;
28
import org.eclipse.rse.core.model.IHost;
30
import org.eclipse.rse.core.model.IHost;
Lines 30-43 Link Here
30
import org.eclipse.rse.core.model.ISystemRegistry;
32
import org.eclipse.rse.core.model.ISystemRegistry;
31
import org.eclipse.rse.core.subsystems.ISubSystem;
33
import org.eclipse.rse.core.subsystems.ISubSystem;
32
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
34
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
35
import org.eclipse.rse.internal.files.ui.FileResources;
33
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
36
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
34
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
37
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
35
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
38
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
36
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
39
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
37
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
40
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
38
import org.eclipse.rse.ui.ISystemMessages;
39
import org.eclipse.rse.ui.ISystemPreferencesConstants;
41
import org.eclipse.rse.ui.ISystemPreferencesConstants;
40
import org.eclipse.rse.ui.RSEUIPlugin;
41
import org.eclipse.rse.ui.SystemPreferencesManager;
42
import org.eclipse.rse.ui.SystemPreferencesManager;
42
import org.eclipse.rse.ui.SystemWidgetHelpers;
43
import org.eclipse.rse.ui.SystemWidgetHelpers;
43
import org.eclipse.rse.ui.widgets.ISystemCombo;
44
import org.eclipse.rse.ui.widgets.ISystemCombo;
Lines 580-597 Link Here
580
    	ISystemProfile profile = sr.getSystemProfile(profileName);
581
    	ISystemProfile profile = sr.getSystemProfile(profileName);
581
    	if (profile == null)
582
    	if (profile == null)
582
    	{
583
    	{
583
    	  msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_PROFILE_NOTFOUND);
584
    		String msgTxt = NLS.bind(FileResources.MSG_ERROR_PROFILE_NOTFOUND, profileName);
584
    	  msg.makeSubstitution(profileName);
585
    	  throw new Exception(msgTxt);
585
    	  throw new Exception(msg.getLevelOneText());
586
    	}
586
    	}
587
    	
587
    	
588
		// turn connection name into connection object...
588
		// turn connection name into connection object...
589
    	IHost conn = RSECorePlugin.getTheSystemRegistry().getHost(profile,connName);
589
    	IHost conn = RSECorePlugin.getTheSystemRegistry().getHost(profile,connName);
590
    	if (conn == null)
590
    	if (conn == null)
591
    	{
591
    	{
592
    	  msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);
592
    		String msgTxt = NLS.bind(FileResources.MSG_ERROR_CONNECTION_NOTFOUND, connName);
593
    	  msg.makeSubstitution(connName);
593
    	  throw new Exception(msgTxt);
594
    	  throw new Exception(msg.getLevelOneText());
595
    	}
594
    	}
596
    	
595
    	
597
    	// turn folder name into folder object...
596
    	// turn folder name into folder object...
Lines 604-612 Link Here
604
    	
603
    	
605
    	if (filesubsystems.length == 0)
604
    	if (filesubsystems.length == 0)
606
    	{
605
    	{
607
    	  msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_CONNECTION_NOTFOUND);// hmm, what else to say?
606
    		String msgTxt = NLS.bind(FileResources.MSG_ERROR_CONNECTION_NOTFOUND, connName);
608
    	  msg.makeSubstitution(connName);
607
    	  throw new Exception(msgTxt);
609
    	  throw new Exception(msg.getLevelOneText());
610
    	}
608
    	}
611
    	IRemoteFileSubSystem ss = (IRemoteFileSubSystem)filesubsystems[0]; // what else to do?
609
    	IRemoteFileSubSystem ss = (IRemoteFileSubSystem)filesubsystems[0]; // what else to do?
612
    	if (!ss.isConnected())
610
    	if (!ss.isConnected())
Lines 620-633 Link Here
620
			}
618
			}
621
    	   } catch (InterruptedException exc)
619
    	   } catch (InterruptedException exc)
622
    	   {
620
    	   {
623
    	     msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
621
    		   String msgTxt = NLS.bind(FileResources.MSG_CONNECT_CANCELLED, conn.getHostName());
624
    	     msg.makeSubstitution(conn.getHostName());
622
    	     throw new Exception(msgTxt);    	   	 
625
    	     throw new Exception(msg.getLevelOneText());    	   	 
626
    	   } catch (Exception exc)
623
    	   } catch (Exception exc)
627
    	   {
624
    	   {
628
    	     msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
625
    		   String msgTxt = NLS.bind(FileResources.MSG_CONNECT_FAILED, conn.getHostName());
629
    	     msg.makeSubstitution(conn.getHostName());
626
      	     throw new Exception(msgTxt);    	     	   	 
630
    	     throw new Exception(msg.getLevelOneText());    	   	 
631
    	   }     	   
627
    	   }     	   
632
    	}
628
    	}
633
    	if (ss.isConnected())    	  
629
    	if (ss.isConnected())    	  
(-)src/org/eclipse/rse/files/ui/widgets/SystemSelectRemoteFilesForm.java (-5 / +7 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
14
 * Martin Oberhuber (Wind River) - [184095] Replace systemTypeName by IRSESystemType
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.files.ui.widgets;
18
package org.eclipse.rse.files.ui.widgets;
Lines 20-35 Link Here
20
import java.util.Iterator;
21
import java.util.Iterator;
21
import java.util.Map;
22
import java.util.Map;
22
23
24
import org.eclipse.core.runtime.IStatus;
23
import org.eclipse.jface.viewers.ICheckStateListener;
25
import org.eclipse.jface.viewers.ICheckStateListener;
24
import org.eclipse.rse.core.IRSESystemType;
26
import org.eclipse.rse.core.IRSESystemType;
27
import org.eclipse.rse.internal.files.ui.Activator;
28
import org.eclipse.rse.internal.files.ui.FileResources;
25
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
29
import org.eclipse.rse.internal.files.ui.actions.SystemSelectFileTypesAction;
26
import org.eclipse.rse.internal.ui.SystemResources;
30
import org.eclipse.rse.internal.ui.SystemResources;
27
import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider;
31
import org.eclipse.rse.internal.ui.view.SystemViewLabelAndContentProvider;
32
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
28
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
33
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
29
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
34
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
30
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileRoot;
35
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileRoot;
31
import org.eclipse.rse.ui.ISystemMessages;
32
import org.eclipse.rse.ui.RSEUIPlugin;
33
import org.eclipse.rse.ui.messages.ISystemMessageLine;
36
import org.eclipse.rse.ui.messages.ISystemMessageLine;
34
import org.eclipse.rse.ui.messages.SystemMessageDialog;
37
import org.eclipse.rse.ui.messages.SystemMessageDialog;
35
import org.eclipse.swt.SWT;
38
import org.eclipse.swt.SWT;
Lines 604-612 Link Here
604
	{				
607
	{				
605
		if (msgLine != null)
608
		if (msgLine != null)
606
		{
609
		{
607
    	  SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
610
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, FileResources.MSG_EXCEPTION_OCCURRED, exc);
608
    	  msg.makeSubstitution(exc);
611
			msgLine.setErrorMessage(msg);
609
		  msgLine.setErrorMessage(msg);
610
		}
612
		}
611
		else
613
		else
612
		  SystemMessageDialog.displayExceptionMessage(getShell(), exc);
614
		  SystemMessageDialog.displayExceptionMessage(getShell(), exc);
(-)src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java (-23 / +28 lines)
Lines 39-44 Link Here
39
 * David McKnight     (IBM)      - [143503] encoding and isBinary needs to be stored in the IFile properties
39
 * David McKnight     (IBM)      - [143503] encoding and isBinary needs to be stored in the IFile properties
40
 * Xuan Chen          (IBM)        - [191370] [dstore] supertransfer zip not deleted when cancelling copy
40
 * Xuan Chen          (IBM)        - [191370] [dstore] supertransfer zip not deleted when cancelling copy
41
 * Xuan Chen          (IBM)      - [210816] Archive testcases throw ResourceException if they are run in batch
41
 * Xuan Chen          (IBM)      - [210816] Archive testcases throw ResourceException if they are run in batch
42
 * 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
42
 ********************************************************************************/
43
 ********************************************************************************/
43
44
44
package org.eclipse.rse.files.ui.resources;
45
package org.eclipse.rse.files.ui.resources;
Lines 70-75 Link Here
70
import org.eclipse.core.runtime.Path;
71
import org.eclipse.core.runtime.Path;
71
import org.eclipse.core.runtime.Status;
72
import org.eclipse.core.runtime.Status;
72
import org.eclipse.jface.preference.IPreferenceStore;
73
import org.eclipse.jface.preference.IPreferenceStore;
74
import org.eclipse.osgi.util.NLS;
73
import org.eclipse.rse.core.RSECorePlugin;
75
import org.eclipse.rse.core.RSECorePlugin;
74
import org.eclipse.rse.core.model.IHost;
76
import org.eclipse.rse.core.model.IHost;
75
import org.eclipse.rse.core.model.ISystemRegistry;
77
import org.eclipse.rse.core.model.ISystemRegistry;
Lines 85-90 Link Here
85
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
87
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
86
import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
88
import org.eclipse.rse.services.clientserver.archiveutils.ISystemArchiveHandler;
87
import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
89
import org.eclipse.rse.services.clientserver.archiveutils.VirtualChild;
90
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
88
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
91
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
89
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
92
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
90
import org.eclipse.rse.services.files.IFileService;
93
import org.eclipse.rse.services.files.IFileService;
Lines 100-106 Link Here
100
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
103
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
101
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
104
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
102
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
105
import org.eclipse.rse.subsystems.files.core.util.ValidatorFileUniqueName;
103
import org.eclipse.rse.ui.ISystemMessages;
104
import org.eclipse.rse.ui.RSEUIPlugin;
106
import org.eclipse.rse.ui.RSEUIPlugin;
105
import org.eclipse.rse.ui.SystemBasePlugin;
107
import org.eclipse.rse.ui.SystemBasePlugin;
106
import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
108
import org.eclipse.rse.ui.dialogs.SystemRenameSingleDialog;
Lines 398-407 Link Here
398
			
400
			
399
			IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
401
			IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
400
			// first check for existence
402
			// first check for existence
401
			if (!srcFileOrFolder.exists()){
403
			if (!srcFileOrFolder.exists()){				
402
				SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
404
				String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
403
				errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
405
				
406
				SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
404
				resultSet.setMessage(errorMessage);
407
				resultSet.setMessage(errorMessage);
408
				
405
			}
409
			}
406
			else
410
			else
407
			{
411
			{
Lines 586-594 Link Here
586
			IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
590
			IRemoteFile srcFileOrFolder = (IRemoteFile)set.get(i);
587
			if (!srcFileOrFolder.exists())
591
			if (!srcFileOrFolder.exists())
588
			{
592
			{
589
				SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
593
				String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
590
				errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
594
				
595
				SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
591
				resultSet.setMessage(errorMessage);
596
				resultSet.setMessage(errorMessage);
597
				
592
			}
598
			}
593
			else
599
			else
594
			{
600
			{
Lines 743-750 Link Here
743
	public static Object downloadResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
749
	public static Object downloadResourceToWorkspace(File srcFileOrFolder, IProgressMonitor monitor) {
744
		
750
		
745
		if (!srcFileOrFolder.exists()) {
751
		if (!srcFileOrFolder.exists()) {
746
			SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
752
			String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), "LOCALHOST");
747
			errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), "LOCALHOST"); //$NON-NLS-1$
753
754
			SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
748
			return errorMessage;
755
			return errorMessage;
749
		}
756
		}
750
		
757
		
Lines 1023-1030 Link Here
1023
		}
1030
		}
1024
		if (!srcFileOrFolder.exists())
1031
		if (!srcFileOrFolder.exists())
1025
		{
1032
		{
1026
			SystemMessage errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
1033
			String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
1027
			errorMessage.makeSubstitution(srcFileOrFolder.getAbsolutePath(), srcFS.getHostAliasName());
1034
			
1035
			SystemMessage errorMessage = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
1028
			return errorMessage;
1036
			return errorMessage;
1029
		}
1037
		}
1030
1038
Lines 1232-1240 Link Here
1232
1240
1233
		if (!targetFolder.canWrite())
1241
		if (!targetFolder.canWrite())
1234
		{
1242
		{
1235
			SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
1243
			String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
1236
			errorMsg.makeSubstitution(targetFS.getHostAliasName());
1244
			String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
1245
1246
			SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
1237
			resultSet.setMessage(errorMsg);
1247
			resultSet.setMessage(errorMsg);
1248
1238
			return resultSet;
1249
			return resultSet;
1239
		}
1250
		}
1240
1251
Lines 1535-1542 Link Here
1535
1546
1536
		if (!targetFolder.canWrite())
1547
		if (!targetFolder.canWrite())
1537
		{
1548
		{
1538
			SystemMessage errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SECURITY_ERROR);
1549
			String msgTxt = FileResources.FILEMSG_SECURITY_ERROR;
1539
			errorMsg.makeSubstitution(targetFS.getHostAliasName());
1550
			String msgDetails = NLS.bind(FileResources.FILEMSG_SECURITY_ERROR_DETAILS, targetFS.getHostAliasName());
1551
			SystemMessage errorMsg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
1540
			return errorMsg;
1552
			return errorMsg;
1541
		}
1553
		}
1542
1554
Lines 2043-2059 Link Here
2043
						
2055
						
2044
						if (shouldExtract)
2056
						if (shouldExtract)
2045
						{
2057
						{
2046
							SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXTRACT_PROGRESS);
2058
							String msgTxt = NLS.bind(FileResources.MSG_EXTRACT_PROGRESS, currentSource.getName());
2047
							msg.makeSubstitution(currentSource.getName());
2059
							monitor.subTask(msgTxt);
2048
							monitor.subTask(msg.getLevelOneText());
2049
2060
2050
							
2061
							
2051
							/* DKM - should not be calling this
2052
							while (display.readAndDispatch()) {
2053
								//Process everything on event queue
2054
							}
2055
							*/
2056
							
2057
							boolean canWrite = true;
2062
							boolean canWrite = true;
2058
							if (currentTarget != null)
2063
							if (currentTarget != null)
2059
							{
2064
							{
(-)src/org/eclipse/rse/files/ui/resources/SystemTempFileListener.java (-10 / +7 lines)
Lines 19-24 Link Here
19
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
19
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
20
 * Martin Oberhuber (Wind River) - [199573] Fix potential threading issues in SystemTempFileListener
20
 * Martin Oberhuber (Wind River) - [199573] Fix potential threading issues in SystemTempFileListener
21
 * David McKnight   (IBM)        - [205297] Editor upload should not be on main thread
21
 * David McKnight   (IBM)        - [205297] Editor upload should not be on main thread
22
 * 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
22
 ********************************************************************************/
23
 ********************************************************************************/
23
24
24
package org.eclipse.rse.files.ui.resources;
25
package org.eclipse.rse.files.ui.resources;
Lines 48-60 Link Here
48
import org.eclipse.rse.core.subsystems.ISubSystem;
49
import org.eclipse.rse.core.subsystems.ISubSystem;
49
import org.eclipse.rse.internal.files.ui.FileResources;
50
import org.eclipse.rse.internal.files.ui.FileResources;
50
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
51
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
51
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
52
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
52
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
53
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
53
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
54
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
54
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
55
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
55
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
56
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
56
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
57
import org.eclipse.rse.ui.ISystemMessages;
58
import org.eclipse.rse.ui.RSEUIPlugin;
57
import org.eclipse.rse.ui.RSEUIPlugin;
59
import org.eclipse.rse.ui.SystemBasePlugin;
58
import org.eclipse.rse.ui.SystemBasePlugin;
60
import org.eclipse.swt.widgets.Shell;
59
import org.eclipse.swt.widgets.Shell;
Lines 164-171 Link Here
164
		
163
		
165
		public IStatus runInUIThread(IProgressMonitor monitor)
164
		public IStatus runInUIThread(IProgressMonitor monitor)
166
		{
165
		{
167
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS);
166
			monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, _resources.size());
168
			monitor.beginTask(msg.getLevelOneText(), _resources.size());
169
			for (int i = 0; i < _resources.size(); i++)
167
			for (int i = 0; i < _resources.size(); i++)
170
			{
168
			{
171
				Object resource = _resources.get(i);
169
				Object resource = _resources.get(i);
Lines 198-206 Link Here
198
					filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
196
					filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
199
					_changedResources.clear();
197
					_changedResources.clear();
200
				}
198
				}
201
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS);
199
				monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, IProgressMonitor.UNKNOWN);
202
				monitor.beginTask(msg.getLevelOneText(), IProgressMonitor.UNKNOWN);
200
				setName(FileResources.MSG_SYNCHRONIZE_PROGRESS);
203
				setName(msg.getLevelOneText());
204
				for (int i = 0; i < filesToSync.length; i++)
201
				for (int i = 0; i < filesToSync.length; i++)
205
				{
202
				{
206
					synchronizeTempWithRemote(filesToSync[i], monitor);
203
					synchronizeTempWithRemote(filesToSync[i], monitor);
Lines 234-242 Link Here
234
					filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
231
					filesToSync = (IFile[])_changedResources.toArray(new IFile[_changedResources.size()]);
235
					_changedResources.clear();
232
					_changedResources.clear();
236
				}
233
				}
237
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_SYNCHRONIZE_PROGRESS);
234
				
238
				monitor.beginTask(msg.getLevelOneText(), IProgressMonitor.UNKNOWN);
235
				monitor.beginTask(FileResources.MSG_SYNCHRONIZE_PROGRESS, IProgressMonitor.UNKNOWN);
239
				setName(msg.getLevelOneText());
236
				setName(FileResources.MSG_SYNCHRONIZE_PROGRESS);
240
				for (int i = 0; i < filesToSync.length; i++)
237
				for (int i = 0; i < filesToSync.length; i++)
241
				{
238
				{
242
					synchronizeTempWithRemote(filesToSync[i], monitor);
239
					synchronizeTempWithRemote(filesToSync[i], monitor);
(-)src/org/eclipse/rse/files/ui/resources/SystemEditableRemoteFile.java (-15 / +29 lines)
Lines 25-30 Link Here
25
 * David McKnight   (IBM)        - [209660] check for changed encoding before using cached file
25
 * David McKnight   (IBM)        - [209660] check for changed encoding before using cached file
26
 * David McKnight   (IBM)        - [210812] for text transfer, need to tell editor to use local encoding
26
 * David McKnight   (IBM)        - [210812] for text transfer, need to tell editor to use local encoding
27
 * Xuan Chen        (IBM)        - [210816] Archive testcases throw ResourceException if they are run in batch
27
 * Xuan Chen        (IBM)        - [210816] Archive testcases throw ResourceException if they are run in batch
28
 * 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
28
 *******************************************************************************/
29
 *******************************************************************************/
29
30
30
package org.eclipse.rse.files.ui.resources;
31
package org.eclipse.rse.files.ui.resources;
Lines 51-64 Link Here
51
import org.eclipse.core.runtime.Status;
52
import org.eclipse.core.runtime.Status;
52
import org.eclipse.core.runtime.jobs.Job;
53
import org.eclipse.core.runtime.jobs.Job;
53
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
54
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
55
import org.eclipse.osgi.util.NLS;
54
import org.eclipse.rse.core.IRSESystemType;
56
import org.eclipse.rse.core.IRSESystemType;
55
import org.eclipse.rse.core.RSECorePlugin;
57
import org.eclipse.rse.core.RSECorePlugin;
56
import org.eclipse.rse.core.model.ISystemRegistry;
58
import org.eclipse.rse.core.model.ISystemRegistry;
57
import org.eclipse.rse.core.subsystems.ISubSystem;
59
import org.eclipse.rse.core.subsystems.ISubSystem;
60
import org.eclipse.rse.internal.files.ui.Activator;
61
import org.eclipse.rse.internal.files.ui.FileResources;
58
import org.eclipse.rse.internal.files.ui.actions.SystemDownloadConflictAction;
62
import org.eclipse.rse.internal.files.ui.actions.SystemDownloadConflictAction;
59
import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
63
import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
60
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
64
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
61
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
65
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
66
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
62
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
67
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
63
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
68
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
64
import org.eclipse.rse.services.files.RemoteFileIOException;
69
import org.eclipse.rse.services.files.RemoteFileIOException;
Lines 66-72 Link Here
66
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
71
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
67
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
72
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
68
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
73
import org.eclipse.rse.subsystems.files.core.subsystems.IVirtualRemoteFile;
69
import org.eclipse.rse.ui.ISystemMessages;
70
import org.eclipse.rse.ui.RSEUIPlugin;
74
import org.eclipse.rse.ui.RSEUIPlugin;
71
import org.eclipse.rse.ui.SystemBasePlugin;
75
import org.eclipse.rse.ui.SystemBasePlugin;
72
import org.eclipse.rse.ui.messages.SystemMessageDialog;
76
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 1103-1110 Link Here
1103
			
1107
			
1104
			if (!remoteFile.exists())
1108
			if (!remoteFile.exists())
1105
			{
1109
			{
1106
				SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
1110
				String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
1107
				message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
1111
				SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);		
1112
				
1108
				SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
1113
				SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
1109
				dialog.open();
1114
				dialog.open();
1110
				return;
1115
				return;
Lines 1139-1146 Link Here
1139
						download(shell);
1144
						download(shell);
1140
					}
1145
					}
1141
1146
1142
					SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_NO_WRITE);
1147
					String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
1143
					message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
1148
					String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
1149
					SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails);		
1144
					SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
1150
					SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
1145
1151
1146
					boolean answer = dialog.openQuestion();
1152
					boolean answer = dialog.openQuestion();
Lines 1163-1170 Link Here
1163
			}
1169
			}
1164
			else if (result == OPEN_IN_DIFFERENT_PERSPECTIVE)
1170
			else if (result == OPEN_IN_DIFFERENT_PERSPECTIVE)
1165
			{
1171
			{
1166
				SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR);
1172
				String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR, remotePath, subsystem.getHost().getHostName());
1167
				message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
1173
				String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_ALREADY_OPEN_IN_EDITOR_DETAILS, remotePath, subsystem.getHost().getHostName());
1174
				SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails);		
1175
1168
				SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
1176
				SystemMessageDialog dialog = new SystemMessageDialog(shell, message);
1169
1177
1170
				boolean answer = dialog.openQuestion();
1178
				boolean answer = dialog.openQuestion();
Lines 1223-1231 Link Here
1223
			
1231
			
1224
			if (!remoteFile.exists())
1232
			if (!remoteFile.exists())
1225
			{
1233
			{
1226
				SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_FILE_NOTFOUND);
1234
				String msgTxt = NLS.bind(FileResources.MSG_ERROR_FILE_NOTFOUND, remotePath, subsystem.getHost().getHostName());
1227
				message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
1235
				SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);		
1228
		
1229
				
1236
				
1230
				DisplayMessageDialog dd = new DisplayMessageDialog(message);
1237
				DisplayMessageDialog dd = new DisplayMessageDialog(message);
1231
				Display.getDefault().syncExec(dd);
1238
				Display.getDefault().syncExec(dd);
Lines 1260-1268 Link Here
1260
					{ // this could be because file doesn't exist
1267
					{ // this could be because file doesn't exist
1261
						download(monitor);
1268
						download(monitor);
1262
					}
1269
					}
1263
1270
					
1264
					SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DOWNLOAD_NO_WRITE);
1271
					String msgTxt = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE, remotePath, subsystem.getHost().getHostName());
1265
					message.makeSubstitution(remotePath, subsystem.getHost().getHostName());
1272
					String msgDetails = NLS.bind(FileResources.MSG_DOWNLOAD_NO_WRITE_DETAILS, remotePath, subsystem.getHost().getHostName());
1273
					SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.WARNING, msgTxt, msgDetails);
1266
1274
1267
					DisplayQuestionDialog dd = new DisplayQuestionDialog(message);
1275
					DisplayQuestionDialog dd = new DisplayQuestionDialog(message);
1268
					Display.getDefault().syncExec(dd);
1276
					Display.getDefault().syncExec(dd);
Lines 1832-1840 Link Here
1832
			catch (InvocationTargetException e)
1840
			catch (InvocationTargetException e)
1833
			{
1841
			{
1834
				SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
1842
				SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
1835
				SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
1843
				String msgTxt = FileResources.MSG_ERROR_UNEXPECTED;
1844
				
1845
				SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
1836
				SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
1846
				SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
1837
				dialog.open();
1847
				dialog.open();
1848
				
1838
				return true;
1849
				return true;
1839
			}
1850
			}
1840
			finally
1851
			finally
Lines 1859-1867 Link Here
1859
					catch (Exception e)
1870
					catch (Exception e)
1860
					{
1871
					{
1861
						SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
1872
						SystemBasePlugin.logError("Error in performSaveAs", e); //$NON-NLS-1$
1862
						SystemMessage message = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
1873
						String msgTxt = FileResources.MSG_ERROR_UNEXPECTED;
1874
						
1875
						SystemMessage message = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
1863
						SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
1876
						SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), message);
1864
						dialog.open();
1877
						dialog.open();
1878
						
1865
						return true;
1879
						return true;
1866
					}
1880
					}
1867
				}
1881
				}
(-)src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.properties (+13 lines)
Lines 9-14 Link Here
9
# Martin Oberhuber (Wind River) - initial API and implementation 
9
# Martin Oberhuber (Wind River) - initial API and implementation 
10
# Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
10
# Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
11
# Sheldon D'souza (Celunite) - adapted from SshConnectorResources.properties
11
# Sheldon D'souza (Celunite) - adapted from SshConnectorResources.properties
12
# 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
12
################################################################################
13
################################################################################
13
14
14
# NLS_MESSAGEFORMAT_VAR
15
# NLS_MESSAGEFORMAT_VAR
Lines 20-22 Link Here
20
PropertySet_Description=Telnet login properties. Set these according to your remote system's login prompts.
21
PropertySet_Description=Telnet login properties. Set these according to your remote system's login prompts.
21
22
22
TelnetConnectorService_ErrorDisconnecting=ConnectionStatusListener:  Error disconnecting
23
TelnetConnectorService_ErrorDisconnecting=ConnectionStatusListener:  Error disconnecting
24
25
MSG_EXCEPTION_OCCURRED = An unexpected exception has occurred
26
27
MSG_COMM_AUTH_FAILED 		= Invalid password or user ID
28
MSG_COMM_AUTH_FAILED_DETAILS = Authentication with {0} failed because the password or user ID is not correct.
29
30
31
MSG_CONNECT_CANCELLED   = Connect to {0} was canceled
32
33
34
MSG_DISCONNECT_FAILED      = Disconnect from {0} failed with exception
35
MSG_DISCONNECT_CANCELLED   = Disconnect from {0} was canceled              
(-)src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorResources.java (+9 lines)
Lines 9-14 Link Here
9
 * Martin Oberhuber (Wind River) - initial API and implementation 
9
 * Martin Oberhuber (Wind River) - initial API and implementation 
10
 * Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
10
 * Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
11
 * Sheldon D'souza  (Celunite) - adapted from SshConnectorResources
11
 * Sheldon D'souza  (Celunite) - adapted from SshConnectorResources
12
 * 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
12
 *******************************************************************************/
13
 *******************************************************************************/
13
package org.eclipse.rse.internal.connectorservice.telnet;
14
package org.eclipse.rse.internal.connectorservice.telnet;
14
15
Lines 31-35 Link Here
31
	public static String PropertySet_Description;	
32
	public static String PropertySet_Description;	
32
	
33
	
33
	public static String TelnetConnectorService_ErrorDisconnecting;
34
	public static String TelnetConnectorService_ErrorDisconnecting;
35
	
36
	public static String MSG_EXCEPTION_OCCURRED;
37
	public static String MSG_COMM_AUTH_FAILED;
38
	public static String MSG_COMM_AUTH_FAILED_DETAILS;
39
34
40
41
	public static String MSG_CONNECT_CANCELLED;
42
	public static String MSG_DISCONNECT_FAILED;
43
	public static String MSG_DISCONNECT_CANCELLED;
35
}
44
}
(-)src/org/eclipse/rse/internal/connectorservice/telnet/TelnetConnectorService.java (-13 / +20 lines)
Lines 17-22 Link Here
17
 * Sheldon D'souza (Celunite) - [187301] support multiple telnet shells
17
 * Sheldon D'souza (Celunite) - [187301] support multiple telnet shells
18
 * Sheldon D'souza (Celunite) - [194464] fix create multiple telnet shells quickly
18
 * Sheldon D'souza (Celunite) - [194464] fix create multiple telnet shells quickly
19
 * Martin Oberhuber (Wind River) - [186761] make the port setting configurable
19
 * Martin Oberhuber (Wind River) - [186761] make the port setting configurable
20
 * 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
20
 *******************************************************************************/
21
 *******************************************************************************/
21
package org.eclipse.rse.internal.connectorservice.telnet;
22
package org.eclipse.rse.internal.connectorservice.telnet;
22
23
Lines 30-39 Link Here
30
31
31
import org.apache.commons.net.telnet.TelnetClient;
32
import org.apache.commons.net.telnet.TelnetClient;
32
import org.eclipse.core.runtime.IProgressMonitor;
33
import org.eclipse.core.runtime.IProgressMonitor;
34
import org.eclipse.core.runtime.IStatus;
33
import org.eclipse.core.runtime.OperationCanceledException;
35
import org.eclipse.core.runtime.OperationCanceledException;
34
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
36
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
35
import org.eclipse.jface.operation.IRunnableContext;
37
import org.eclipse.jface.operation.IRunnableContext;
36
import org.eclipse.jface.operation.IRunnableWithProgress;
38
import org.eclipse.jface.operation.IRunnableWithProgress;
39
import org.eclipse.osgi.util.NLS;
37
import org.eclipse.rse.core.RSECorePlugin;
40
import org.eclipse.rse.core.RSECorePlugin;
38
import org.eclipse.rse.core.model.IHost;
41
import org.eclipse.rse.core.model.IHost;
39
import org.eclipse.rse.core.model.IPropertySet;
42
import org.eclipse.rse.core.model.IPropertySet;
Lines 44-52 Link Here
44
import org.eclipse.rse.core.subsystems.IConnectorService;
47
import org.eclipse.rse.core.subsystems.IConnectorService;
45
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
48
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
46
import org.eclipse.rse.internal.services.telnet.ITelnetSessionProvider;
49
import org.eclipse.rse.internal.services.telnet.ITelnetSessionProvider;
50
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
47
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
51
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
48
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
52
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
49
import org.eclipse.rse.ui.ISystemMessages;
50
import org.eclipse.rse.ui.RSEUIPlugin;
53
import org.eclipse.rse.ui.RSEUIPlugin;
51
import org.eclipse.rse.ui.SystemBasePlugin;
54
import org.eclipse.rse.ui.SystemBasePlugin;
52
import org.eclipse.rse.ui.messages.SystemMessageDialog;
55
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 202-211 Link Here
202
				//from the remote side with the SystemMessageException for user diagnostics
205
				//from the remote side with the SystemMessageException for user diagnostics
203
				SystemMessage msg;
206
				SystemMessage msg;
204
				if (nestedException!=null) {
207
				if (nestedException!=null) {
205
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXCEPTION_OCCURRED);
208
					msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, TelnetConnectorResources.MSG_EXCEPTION_OCCURRED, nestedException);
206
					msg.makeSubstitution(nestedException);
207
				} else {
209
				} else {
208
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_AUTH_FAILED);
210
					msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, 
211
							TelnetConnectorResources.MSG_COMM_AUTH_FAILED,
212
							NLS.bind(TelnetConnectorResources.MSG_COMM_AUTH_FAILED_DETAILS, getHost().getAliasName()));
213
209
					msg.makeSubstitution(getHost().getAliasName());
214
					msg.makeSubstitution(getHost().getAliasName());
210
				}
215
				}
211
				throw new SystemMessageException(msg);
216
				throw new SystemMessageException(msg);
Lines 352-359 Link Here
352
			// TODO need a more correct message for "session lost"
357
			// TODO need a more correct message for "session lost"
353
			// TODO allow users to reconnect from this dialog
358
			// TODO allow users to reconnect from this dialog
354
			// SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
359
			// SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
355
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
360
356
			msg.makeSubstitution(_connection.getPrimarySubSystem().getHost().getAliasName());
361
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL, 
362
					NLS.bind(TelnetConnectorResources.MSG_CONNECT_CANCELLED, _connection.getHost().getAliasName()));
363
	
357
			SystemMessageDialog dialog = new SystemMessageDialog(getShell(), msg);
364
			SystemMessageDialog dialog = new SystemMessageDialog(getShell(), msg);
358
			dialog.open();
365
			dialog.open();
359
			try {
366
			try {
Lines 471-479 Link Here
471
			// ISystemMessages.MSG_DISCONNECT_FAILED,
478
			// ISystemMessages.MSG_DISCONNECT_FAILED,
472
			// hostName, exc.getMessage());
479
			// hostName, exc.getMessage());
473
			// RSEUIPlugin.logError("Disconnect failed",exc); // temporary
480
			// RSEUIPlugin.logError("Disconnect failed",exc); // temporary
474
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
481
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR,
475
					RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED)
482
					NLS.bind(TelnetConnectorResources.MSG_DISCONNECT_FAILED, hostName), exc);
476
							.makeSubstitution(hostName, exc));
483
			
484
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
477
			msgDlg.setException(exc);
485
			msgDlg.setException(exc);
478
			msgDlg.open();
486
			msgDlg.open();
479
		}
487
		}
Lines 487-496 Link Here
487
			// SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell,
495
			// SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell,
488
			// RSEUIPlugin.getResourceBundle(),
496
			// RSEUIPlugin.getResourceBundle(),
489
			// ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
497
			// ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
490
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
498
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL,
491
					RSEUIPlugin.getPluginMessage(
499
					NLS.bind(TelnetConnectorResources.MSG_DISCONNECT_CANCELLED, hostName));
492
							ISystemMessages.MSG_DISCONNECT_CANCELLED)
500
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
493
							.makeSubstitution(hostName));
494
			msgDlg.open();
501
			msgDlg.open();
495
		}
502
		}
496
	}
503
	}
(-)src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileFilterString.java (-5 / +8 lines)
Lines 13-18 Link Here
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * Martin Oberhuber (Wind River) - [cleanup] fix javadoc.
15
 * Martin Oberhuber (Wind River) - [cleanup] fix javadoc.
16
 * 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
16
 *******************************************************************************/
17
 *******************************************************************************/
17
18
18
package org.eclipse.rse.subsystems.files.core.util;
19
package org.eclipse.rse.subsystems.files.core.util;
Lines 20-30 Link Here
20
21
21
import org.eclipse.core.resources.IWorkspace;
22
import org.eclipse.core.resources.IWorkspace;
22
import org.eclipse.core.resources.ResourcesPlugin;
23
import org.eclipse.core.resources.ResourcesPlugin;
24
import org.eclipse.core.runtime.IStatus;
25
import org.eclipse.rse.internal.subsystems.files.core.Activator;
26
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
23
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
27
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
28
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
24
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
29
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
25
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
30
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystemConfiguration;
26
import org.eclipse.rse.ui.ISystemMessages;
27
import org.eclipse.rse.ui.RSEUIPlugin;
28
import org.eclipse.rse.ui.validators.ValidatorFileName;
31
import org.eclipse.rse.ui.validators.ValidatorFileName;
29
import org.eclipse.rse.ui.validators.ValidatorFolderName;
32
import org.eclipse.rse.ui.validators.ValidatorFolderName;
30
import org.eclipse.rse.ui.validators.ValidatorUniqueString;
33
import org.eclipse.rse.ui.validators.ValidatorUniqueString;
Lines 98-106 Link Here
98
    private void init()
101
    private void init()
99
    {
102
    {
100
		//setErrorMessages(RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY),
103
		//setErrorMessages(RSEUIPlugin.getPluginMessage(FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY),
101
		setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
104
		setErrorMessages(new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.MSG_VALIDATE_NAME_EMPTY),
102
		                 RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE),
105
				new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE),
103
		                 RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID));  
106
				new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID));  
104
		isFileName = isFolderName = true;
107
		isFileName = isFolderName = true;
105
    }
108
    }
106
    
109
    
(-)src/org/eclipse/rse/subsystems/files/core/util/ValidatorFileUniqueName.java (-7 / +10 lines)
Lines 13-28 Link Here
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * David McKnight   (IBM)        - [207178] changing list APIs for file service and subsystems
15
 * David McKnight   (IBM)        - [207178] changing list APIs for file service and subsystems
16
 * 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
16
 *******************************************************************************/
17
 *******************************************************************************/
17
18
18
package org.eclipse.rse.subsystems.files.core.util;
19
package org.eclipse.rse.subsystems.files.core.util;
19
import java.util.Vector;
20
import java.util.Vector;
20
21
22
import org.eclipse.core.runtime.IStatus;
23
import org.eclipse.rse.internal.subsystems.files.core.Activator;
24
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
25
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
21
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
26
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
22
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
27
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
23
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
28
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
24
import org.eclipse.rse.ui.ISystemMessages;
25
import org.eclipse.rse.ui.RSEUIPlugin;
26
import org.eclipse.rse.ui.validators.ValidatorFileName;
29
import org.eclipse.rse.ui.validators.ValidatorFileName;
27
import org.eclipse.rse.ui.validators.ValidatorFolderName;
30
import org.eclipse.rse.ui.validators.ValidatorFolderName;
28
import org.eclipse.rse.ui.validators.ValidatorUniqueString;
31
import org.eclipse.rse.ui.validators.ValidatorUniqueString;
Lines 75-85 Link Here
75
	    //shell.setCursor(busyCursor);
78
	    //shell.setCursor(busyCursor);
76
        org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(shell, busyCursor);	    
79
        org.eclipse.rse.ui.dialogs.SystemPromptDialog.setDisplayCursor(shell, busyCursor);	    
77
80
78
		setErrorMessages(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_EMPTY),
81
		setErrorMessages(new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.MSG_VALIDATE_NAME_EMPTY),
79
		                 RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_NAME_NOTUNIQUE),
82
				new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.MSG_VALIDATE_NAME_NOTUNIQUE),
80
		                 isFolder ? RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FOLDERNAME_NOTVALID) :
83
				isFolder ? new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE) :
81
		                            RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_VALIDATE_FILENAME_NOTVALID)
84
						new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID));  
82
		                );  
85
83
		try
86
		try
84
		{
87
		{
85
		IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().list(parentFolder, null);
88
		IRemoteFile[] contents = parentFolder.getParentRemoteFileSubSystem().list(parentFolder, null);
(-)src/org/eclipse/rse/internal/subsystems/files/core/Activator.java (+3 lines)
Lines 14-19 Link Here
14
 * Contributors:
14
 * Contributors:
15
 * Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
15
 * Martin Oberhuber (Wind River) - [180519][api] declaratively register adapter factories
16
 * Martin Oberhuber (wind River) - [203105] Decouple recursive plugin activation of UI adapters
16
 * Martin Oberhuber (wind River) - [203105] Decouple recursive plugin activation of UI adapters
17
 * 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
17
 *******************************************************************************/
18
 *******************************************************************************/
18
19
19
package org.eclipse.rse.internal.subsystems.files.core;
20
package org.eclipse.rse.internal.subsystems.files.core;
Lines 32-37 Link Here
32
	//The shared instance.
33
	//The shared instance.
33
	private static Activator plugin;
34
	private static Activator plugin;
34
	
35
	
36
	public static final String PLUGIN_ID = "org.eclipse.rse.subsystems.files";
37
	
35
	/**
38
	/**
36
	 * The constructor.
39
	 * The constructor.
37
	 */
40
	 */
(-)src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.java (-1 / +27 lines)
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.internal.subsystems.files.core;
18
package org.eclipse.rse.internal.subsystems.files.core;
Lines 175-180 Link Here
175
	public static String	RESID_JOB_SEARCH_NAME;
175
	public static String	RESID_JOB_SEARCH_NAME;
176
	public static String	RESID_JOB_DECORATEFILES_NAME;
176
	public static String	RESID_JOB_DECORATEFILES_NAME;
177
	
177
	
178
179
	public static String FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY;
180
	public static String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE;
181
	public static String FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID;
182
	public static String FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES;
183
	public static String MSG_VALIDATE_NAME_EMPTY;
184
	public static String MSG_VALIDATE_NAME_NOTUNIQUE;
185
	public static String MSG_VALIDATE_NAME_NOTVALID;
186
	
187
	public static String MSG_CONNECT_FAILED;	
188
	public static String MSG_OPERATION_CANCELLED;
189
	
190
	public static String FILEMSG_FOLDER_NOTEMPTY;
191
	public static String FILEMSG_FOLDER_NOTEMPTY_DETAILS;
192
  	public static String FILEMSG_FOLDER_NOTFOUND;
193
  	public static String FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE;  
194
  	public static String FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE_DETAILS;  
195
  	public static String FILEMSG_FILE_NOTFOUND;
196
  	
197
	public static String MSG_ERROR_UNEXPECTED;
198
	
199
	public static String MSG_FOLDER_UNREADABLE;
200
	
201
	public static String MSG_FILE_CANNOT_BE_SAVED;
202
	public static String MSG_FILE_CANNOT_BE_SAVED_DETAILS;	
203
	
178
	static {
204
	static {
179
		// load message values from bundle file
205
		// load message values from bundle file
180
		NLS.initializeMessages(BUNDLE_NAME, SystemFileResources.class);
206
		NLS.initializeMessages(BUNDLE_NAME, SystemFileResources.class);
(-)src/org/eclipse/rse/internal/subsystems/files/core/SystemFileResources.properties (-1 / +36 lines)
Lines 12-18 Link Here
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
# 
13
# 
14
# Contributors:
14
# Contributors:
15
# {Name} (company) - description of contribution.
15
# 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
16
###############################################################################
16
###############################################################################
17
17
18
# NLS_MESSAGEFORMAT_VAR
18
# NLS_MESSAGEFORMAT_VAR
Lines 214-216 Link Here
214
214
215
RESID_JOB_SEARCH_NAME=Search
215
RESID_JOB_SEARCH_NAME=Search
216
RESID_JOB_DECORATEFILES_NAME=Decorate Files
216
RESID_JOB_DECORATEFILES_NAME=Decorate Files
217
218
219
FILEMSG_VALIDATE_FILEFILTERSTRING_EMPTY    = Enter file name pattern
220
FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= Filter string '{0}' already exists in this filter
221
FILEMSG_VALIDATE_FILEFILTERSTRING_NOTVALID = Filter string name pattern not valid
222
FILEMSG_VALIDATE_FILEFILTERSTRING_NOINCLUDES = You must include files or folders or both
223
	
224
MSG_VALIDATE_NAME_EMPTY    = Enter name
225
MSG_VALIDATE_NAME_EMPTY_DETAILS = You must enter a name in the field where the cursor is positioned.
226
MSG_VALIDATE_NAME_NOTUNIQUE= Name in use
227
MSG_VALIDATE_NAME_NOTUNIQUE_DETAILS = This name is already used by another resource. Enter a unique name.
228
229
MSG_VALIDATE_NAME_NOTVALID = Name not valid
230
MSG_VALIDATE_NAME_NOTVALID_DETAILS =The name entered does not have valid syntax
231
	
232
MSG_CONNECT_FAILED      = Connect to {0} failed with an unexpected exception
233
MSG_OPERATION_CANCELLED   = Operation canceled.
234
235
FILEMSG_FOLDER_NOTEMPTY = Folder is not empty. Cannot delete
236
FILEMSG_FOLDER_NOTEMPTY_DETAILS =The operation failed. One possible reason is that the folder is not empty
237
238
FILEMSG_FOLDER_NOTFOUND = Folder '{0}' not found
239
FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE = Folder '{0}' not found. Would you like to create it?
240
FILEMSG_FOLDER_NOTFOUND_WANTTOCREATE_DETAILS = The folder you specified does not exist. Select Yes to create it, No to cancel the operation
241
FILEMSG_FILE_NOTFOUND   = File '{0}' not found
242
243
244
MSG_ERROR_UNEXPECTED = An unexpected error occurred.
245
246
MSG_FOLDER_UNREADABLE = Folder {0} is not readable. Cannot expand
247
248
MSG_FILE_CANNOT_BE_SAVED= File {0} can not be saved on {1}. You do not have write access to the file.>
249
MSG_FILE_CANNOT_BE_SAVED_DETAILS= Change file permissions to ensure you have write access to the file.
250
251
(-)src/org/eclipse/rse/subsystems/files/core/subsystems/RemoteFileSubSystem.java (-4 / +8 lines)
Lines 23-28 Link Here
23
 * David McKnight   (IBM)        - [207178] changing list APIs for file service and subsystems
23
 * David McKnight   (IBM)        - [207178] changing list APIs for file service and subsystems
24
 * David McKnight   (IBM)        - [210109] store constants in IFileService rather than IFileServiceConstants
24
 * David McKnight   (IBM)        - [210109] store constants in IFileService rather than IFileServiceConstants
25
 * David McKnight   (IBM)        - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
25
 * David McKnight   (IBM)        - [211472] [api][breaking] IRemoteObjectResolver.getObjectWithAbsoluteName() needs a progress monitor
26
 * 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
26
 *******************************************************************************/
27
 *******************************************************************************/
27
28
28
package org.eclipse.rse.subsystems.files.core.subsystems;
29
package org.eclipse.rse.subsystems.files.core.subsystems;
Lines 44-51 Link Here
44
45
45
import org.eclipse.core.runtime.IPath;
46
import org.eclipse.core.runtime.IPath;
46
import org.eclipse.core.runtime.IProgressMonitor;
47
import org.eclipse.core.runtime.IProgressMonitor;
48
import org.eclipse.core.runtime.IStatus;
47
import org.eclipse.core.runtime.NullProgressMonitor;
49
import org.eclipse.core.runtime.NullProgressMonitor;
48
import org.eclipse.core.runtime.Path;
50
import org.eclipse.core.runtime.Path;
51
import org.eclipse.osgi.util.NLS;
49
import org.eclipse.rse.core.filters.ISystemFilter;
52
import org.eclipse.rse.core.filters.ISystemFilter;
50
import org.eclipse.rse.core.filters.ISystemFilterReference;
53
import org.eclipse.rse.core.filters.ISystemFilterReference;
51
import org.eclipse.rse.core.filters.ISystemFilterString;
54
import org.eclipse.rse.core.filters.ISystemFilterString;
Lines 60-69 Link Here
60
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
63
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
61
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
64
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
62
import org.eclipse.rse.core.subsystems.SubSystem;
65
import org.eclipse.rse.core.subsystems.SubSystem;
66
import org.eclipse.rse.internal.subsystems.files.core.Activator;
67
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
63
import org.eclipse.rse.services.clientserver.FileTypeMatcher;
68
import org.eclipse.rse.services.clientserver.FileTypeMatcher;
64
import org.eclipse.rse.services.clientserver.IClientServerConstants;
69
import org.eclipse.rse.services.clientserver.IClientServerConstants;
65
import org.eclipse.rse.services.clientserver.IMatcher;
70
import org.eclipse.rse.services.clientserver.IMatcher;
66
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
71
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
72
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
67
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
73
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
68
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
74
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
69
import org.eclipse.rse.services.files.IFileService;
75
import org.eclipse.rse.services.files.IFileService;
Lines 71-78 Link Here
71
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
77
import org.eclipse.rse.services.search.IHostSearchResultConfiguration;
72
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
78
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
73
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
79
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
74
import org.eclipse.rse.ui.ISystemMessages;
75
import org.eclipse.rse.ui.RSEUIPlugin;
76
import org.eclipse.rse.ui.SystemBasePlugin;
80
import org.eclipse.rse.ui.SystemBasePlugin;
77
import org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCore;
81
import org.eclipse.rse.ui.propertypages.SystemSubSystemPropertyPageCore;
78
import org.eclipse.swt.widgets.Composite;
82
import org.eclipse.swt.widgets.Composite;
Lines 702-709 Link Here
702
				// otherwise return message saying parent could not be found
706
				// otherwise return message saying parent could not be found
703
				else if (parent != null && !parentExists) {
707
				else if (parent != null && !parentExists) {
704
					children = new SystemMessageObject[1];
708
					children = new SystemMessageObject[1];
705
					SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_NOTFOUND);
709
					String msgTxt = NLS.bind(SystemFileResources.FILEMSG_FILE_NOTFOUND, parent.getAbsolutePath());
706
					msg.makeSubstitution(parent.getAbsolutePath());
710
					SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
707
					children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, null);
711
					children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, null);
708
				}
712
				}
709
			}
713
			}
(-)src/org/eclipse/rse/subsystems/files/core/servicesubsystem/FileServiceSubSystem.java (-6 / +17 lines)
Lines 30-35 Link Here
30
 * David Dykstal (IBM) - [197036] pulling up subsystem switch logic
30
 * David Dykstal (IBM) - [197036] pulling up subsystem switch logic
31
 * David Dykstal (IBM) - [217556] remove service subsystem types
31
 * David Dykstal (IBM) - [217556] remove service subsystem types
32
 * Martin Oberhuber (Wind River) - [219098][api] FileServiceSubSystem should not be final 
32
 * Martin Oberhuber (Wind River) - [219098][api] FileServiceSubSystem should not be final 
33
 * 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
33
 *******************************************************************************/
34
 *******************************************************************************/
34
35
35
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
36
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
Lines 41-47 Link Here
41
import java.util.List;
42
import java.util.List;
42
43
43
import org.eclipse.core.runtime.IProgressMonitor;
44
import org.eclipse.core.runtime.IProgressMonitor;
45
import org.eclipse.core.runtime.IStatus;
44
import org.eclipse.core.runtime.NullProgressMonitor;
46
import org.eclipse.core.runtime.NullProgressMonitor;
47
import org.eclipse.osgi.util.NLS;
45
import org.eclipse.rse.core.RSECorePlugin;
48
import org.eclipse.rse.core.RSECorePlugin;
46
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
49
import org.eclipse.rse.core.events.ISystemRemoteChangeEvents;
47
import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
50
import org.eclipse.rse.core.events.SystemRemoteChangeEvent;
Lines 50-59 Link Here
50
import org.eclipse.rse.core.subsystems.IConnectorService;
53
import org.eclipse.rse.core.subsystems.IConnectorService;
51
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
54
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
52
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
55
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
56
import org.eclipse.rse.internal.subsystems.files.core.Activator;
57
import org.eclipse.rse.internal.subsystems.files.core.SystemFileResources;
53
import org.eclipse.rse.services.clientserver.PathUtility;
58
import org.eclipse.rse.services.clientserver.PathUtility;
54
import org.eclipse.rse.services.clientserver.SystemSearchString;
59
import org.eclipse.rse.services.clientserver.SystemSearchString;
55
import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
60
import org.eclipse.rse.services.clientserver.archiveutils.AbsoluteVirtualPath;
56
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
61
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
62
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
57
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
63
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
58
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
64
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
59
import org.eclipse.rse.services.files.IFileService;
65
import org.eclipse.rse.services.files.IFileService;
Lines 68-75 Link Here
68
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
74
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileContext;
69
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileContext;
75
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileContext;
70
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
76
import org.eclipse.rse.subsystems.files.core.subsystems.RemoteFileSubSystem;
71
import org.eclipse.rse.ui.ISystemMessages;
72
import org.eclipse.rse.ui.RSEUIPlugin;
73
import org.eclipse.rse.ui.SystemBasePlugin;
77
import org.eclipse.rse.ui.SystemBasePlugin;
74
78
75
/**
79
/**
Lines 221-227 Link Here
221
				if (userHome == null){
225
				if (userHome == null){
222
					
226
					
223
					// with 207095, it's possible that we could be trying to get user home when not connected	
227
					// with 207095, it's possible that we could be trying to get user home when not connected	
224
					SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
228
					SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, SystemFileResources.MSG_ERROR_UNEXPECTED);
225
					throw new SystemMessageException(msg);
229
					throw new SystemMessageException(msg);
226
				}
230
				}
227
				return userHome;
231
				return userHome;
Lines 500-506 Link Here
500
		
504
		
501
		if (parent != null && !parent.canRead())
505
		if (parent != null && !parent.canRead())
502
		{
506
		{
503
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
507
			String msgTxt = NLS.bind(SystemFileResources.MSG_FOLDER_UNREADABLE, parentPath);
508
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.INFO, msgTxt);
504
			throw new SystemMessageException(msg);
509
			throw new SystemMessageException(msg);
505
		}
510
		}
506
		
511
		
Lines 577-583 Link Here
577
582
578
		if (!destination.canWrite())
583
		if (!destination.canWrite())
579
		{
584
		{
580
			SystemMessage msg = RSEUIPlugin.getPluginMessage("RSEF5003").makeSubstitution(remoteFileName, getHostName()); //$NON-NLS-1$
585
			String msgTxt = NLS.bind(SystemFileResources.MSG_FILE_CANNOT_BE_SAVED, remoteFileName, getHostName());
586
			String msgDetails = SystemFileResources.MSG_FILE_CANNOT_BE_SAVED_DETAILS;
587
			
588
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
581
			throw new SystemMessageException(msg);
589
			throw new SystemMessageException(msg);
582
		}
590
		}
583
		getFileService().upload(new File(source), remoteParentPath, remoteFileName, isBinary, encoding, hostEncoding, monitor);
591
		getFileService().upload(new File(source), remoteParentPath, remoteFileName, isBinary, encoding, hostEncoding, monitor);
Lines 658-664 Link Here
658
			
666
			
659
			if (!destination.canWrite())
667
			if (!destination.canWrite())
660
			{
668
			{
661
				SystemMessage msg = RSEUIPlugin.getPluginMessage("RSEF5003").makeSubstitution(remoteFileNames[i], getHostName()); //$NON-NLS-1$
669
				String msgTxt = NLS.bind(SystemFileResources.MSG_FILE_CANNOT_BE_SAVED, remoteFileNames[i], getHostName());
670
				String msgDetails = SystemFileResources.MSG_FILE_CANNOT_BE_SAVED_DETAILS;
671
				
672
				SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
662
				throw new SystemMessageException(msg);
673
				throw new SystemMessageException(msg);
663
			}
674
			}
664
			
675
			
(-)src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.properties (-1 / +71 lines)
Lines 12-18 Link Here
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
# 
13
# 
14
# Contributors:
14
# Contributors:
15
# {Name} (company) - description of contribution.
15
# 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
16
###############################################################################
16
###############################################################################
17
17
18
# NLS_MESSAGEFORMAT_NONE
18
# NLS_MESSAGEFORMAT_NONE
Lines 20-22 Link Here
20
20
21
DStore_ConnectorService_Label=DStore Connector Service
21
DStore_ConnectorService_Label=DStore Connector Service
22
DStore_ConnectorService_Description=The DStore Connector Service uses RSE's DataStore protocol to connect to the host. You must have a DataStore daemon or server running on the remote machine.
22
DStore_ConnectorService_Description=The DStore Connector Service uses RSE's DataStore protocol to connect to the host. You must have a DataStore daemon or server running on the remote machine.
23
24
MSG_CONNECT_UNKNOWNHOST=Connect failed. Host {0} not found or not responding
25
26
MSG_DISCONNECT_FAILED=Disconnect from {0} failed with exception
27
28
MSG_DISCONNECT_CANCELLED=Disconnect from {0} was canceled
29
30
MSG_COMM_CONNECT_FAILED=Connection to {0} could not be established.
31
MSG_COMM_CONNECT_FAILED_DETAILS=A socket connection to {0} could not be established.  If you are connecting via the communications daemon make sure the daemon is running on the remote system.  If you are connecting directly to the communications server make sure the server is started on the remote system.  If you are connecting using REXEC, make sure that the server is installed on the remote system and that the REXEC service is running on that system.
32
 
33
34
MSG_CONNECT_SSL_EXCEPTION = Unable to establish a secure connection with the Remote System Explorer host server.
35
MSG_CONNECT_SSL_EXCEPTION_DETAILS = Make sure both the client and server are configured to use SSL.  The SSL handshake between client and server failed with the following exception: {0}
36
37
MSG_STARTING_SERVER_VIA_REXEC = Remote System Explorer host server using REXEC
38
39
MSG_STARTING_SERVER_VIA_DAEMON = Starting Remote System Explorer host server using daemon
40
41
MSG_CONNECTING_TO_SERVER= Connecting to Remote System Explorer host server on port {0}
42
MSG_INITIALIZING_SERVER= Initializing Remote System Explorer host server
43
MSG_PORT_OUT_RANGE = The specified server port is out of the allowed range: {0}
44
45
MSG_VALIDATE_PASSWORD_EMPTY=Enter password
46
MSG_VALIDATE_PASSWORD_EMPTY_DETAILS=You must specify your password.
47
48
MSG_VALIDATE_PASSWORD_EXPIRED=Password has expired
49
MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS=Your password has expired, and must be reset before continuing.
50
51
MSG_VALIDATE_PASSWORD_INVALID=The new password is invalid.
52
MSG_VALIDATE_PASSWORD_INVALID_DETAILS=The remote system indicated that the new password is unacceptable. Please ensure the new password follows all password rules for the remote system.
53
54
MSG_COMM_USING_SSL=Communication with the remote system {0} has been secured using SSL. Continue?
55
MSG_COMM_NOT_USING_SSL=Connection {0} has not been secured using SSL. Proceed anyway?
56
57
MSG_COMM_SERVER_OLDER_WARNING=The host server running on remote system {0} is an older version than the RSE client.
58
MSG_COMM_SERVER_OLDER_WARNING_DETAILS=It is recommended that the client and server versions match.
59
MSG_COMM_CLIENT_OLDER_WARNING=The host server running on remote system {0} is a newer version than the RSE client.
60
MSG_COMM_CLIENT_OLDER_WARNING_DETAILS=It is recommended that the client and server versions match.
61
62
63
MSG_CONNECT_DAEMON_FAILED=Daemon failed to launch server on {0} using port {1}
64
MSG_CONNECT_DAEMON_FAILED_EXCEPTION=Failed to connect to the daemon on {0} using port %2 with an unexpected exception
65
66
MSG_COMM_AUTH_FAILED=Invalid password or user ID
67
MSG_COMM_AUTH_FAILED_DETAILS=Authentication with {0} failed because the password or user ID is not correct.
68
69
MSG_COMM_PWD_INVALID=The saved password is not correct.
70
MSG_COMM_PWD_INVALID_DETAILS=The saved password for user ID {0} on host {1} is not correct.  Please enter the password and try again.
71
72
	
73
MSG_COMM_INCOMPATIBLE_PROTOCOL=Incompatible host server running on remote system {0}.
74
MSG_COMM_INCOMPATIBLE_PROTOCOL_DETAILS=The host server is not a Remote System Explorer server.
75
76
MSG_COMM_INCOMPATIBLE_UPDATE=Incompatible Remote System Explorer host server running on remote system {0}.
77
MSG_COMM_INCOMPATIBLE_UPDATE_DETAILS=The host server needs to be updated to work with the current client.
78
79
MSG_CONNECT_FAILED=Connect to {0} failed with an unexpected exception
80
81
MSG_OPERATION_CANCELLED=Operation canceled.
82
	
83
MSG_COMM_INVALID_LOGIN=Invalid password or user ID for {0}.
84
MSG_COMM_INVALID_LOGIN_DETAILS=Message from host: {0}
85
86
MSG_COMM_REXEC_NOTSTARTED=Unable to connect to REXEC host service on port {0} of host {1}
87
MSG_COMM_REXEC_NOTSTARTED_DETAILS=Message from host: {0}
88
                    
89
                    
90
91
                    
92
            
(-)src/org/eclipse/rse/internal/connectorservice/dstore/RexecDstoreServer.java (-11 / +17 lines)
Lines 22-29 Link Here
22
import java.io.DataOutputStream;
22
import java.io.DataOutputStream;
23
import java.io.EOFException;
23
import java.io.EOFException;
24
import java.net.Socket;
24
import java.net.Socket;
25
import java.text.MessageFormat;
25
26
26
import org.eclipse.core.runtime.IProgressMonitor;
27
import org.eclipse.core.runtime.IProgressMonitor;
28
import org.eclipse.core.runtime.IStatus;
27
import org.eclipse.dstore.core.client.ClientConnection;
29
import org.eclipse.dstore.core.client.ClientConnection;
28
import org.eclipse.dstore.core.client.ConnectionStatus;
30
import org.eclipse.dstore.core.client.ConnectionStatus;
29
import org.eclipse.rse.connectorservice.dstore.IUniversalDStoreConstants;
31
import org.eclipse.rse.connectorservice.dstore.IUniversalDStoreConstants;
Lines 31-39 Link Here
31
import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
33
import org.eclipse.rse.core.subsystems.IRemoteServerLauncher;
32
import org.eclipse.rse.core.subsystems.IServerLauncher;
34
import org.eclipse.rse.core.subsystems.IServerLauncher;
33
import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
35
import org.eclipse.rse.core.subsystems.IServerLauncherProperties;
36
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
34
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
37
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
35
import org.eclipse.rse.ui.ISystemMessages;
36
import org.eclipse.rse.ui.RSEUIPlugin;
37
import org.eclipse.rse.ui.SystemBasePlugin;
38
import org.eclipse.rse.ui.SystemBasePlugin;
38
39
39
/**
40
/**
Lines 480-487 Link Here
480
			}
481
			}
481
			
482
			
482
			if (timeout == 0) {
483
			if (timeout == 0) {
483
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
484
				String msgTxt = MessageFormat.format(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN, new Object[] {signonInfo.getHostname()});
484
				msg.makeSubstitution(signonInfo.getHostname(), ""); //$NON-NLS-1$
485
				String msgDetails = MessageFormat.format(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN_DETAILS, new Object[] {""});
486
				
487
				SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
485
				_errorMessage = msg;
488
				_errorMessage = msg;
486
				return port;
489
				return port;
487
			}
490
			}
Lines 561-572 Link Here
561
		if (index > -1)  // remove the embedded ASCII_TEST_STRING
564
		if (index > -1)  // remove the embedded ASCII_TEST_STRING
562
			hostMessage = hostMessage.substring(0,index) + hostMessage.substring(index+1+ASCII_TEST_STRING.length());
565
			hostMessage = hostMessage.substring(0,index) + hostMessage.substring(index+1+ASCII_TEST_STRING.length());
563
		if (hostMessage.indexOf(EZYRD11E) >0 ){
566
		if (hostMessage.indexOf(EZYRD11E) >0 ){
564
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INVALID_LOGIN);
567
			String msgTxt = MessageFormat.format(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN, new Object[] {signonInfo.getHostname()});
565
			msg.makeSubstitution(signonInfo.getHostname(), hostMessage);
568
			String msgDetails = MessageFormat.format(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN_DETAILS, new Object[] {hostMessage});
569
			
570
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
566
			_errorMessage = msg;
571
			_errorMessage = msg;
567
		} else {
572
		} else {
568
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_REXEC_NOTSTARTED);
573
			String msgTxt = MessageFormat.format(ConnectorServiceResources.MSG_COMM_REXEC_NOTSTARTED, new Object[] {""+rexecPort, signonInfo.getHostname()});
569
			msg.makeSubstitution(""+rexecPort, signonInfo.getHostname(), hostMessage); //$NON-NLS-1$
574
			String msgDetails = MessageFormat.format(ConnectorServiceResources.MSG_COMM_REXEC_NOTSTARTED_DETAILS, new Object[] {hostMessage});
575
			
576
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
570
			_errorMessage = msg;
577
			_errorMessage = msg;
571
			
578
			
572
		}
579
		}
Lines 835-843 Link Here
835
				
842
				
836
		if (monitor != null)
843
		if (monitor != null)
837
		{
844
		{
838
			SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
845
			String cmsg = MessageFormat.format(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, new Object[] {clientConnection.getPort()});
839
			cmsg.makeSubstitution(clientConnection.getPort());
846
			monitor.subTask(cmsg);
840
			monitor.subTask(cmsg.getLevelOneText());
841
		}
847
		}
842
				
848
				
843
		// connect to launched server
849
		// connect to launched server
(-)src/org/eclipse/rse/internal/connectorservice/dstore/ConnectorServiceResources.java (-1 / +58 lines)
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.internal.connectorservice.dstore;
18
package org.eclipse.rse.internal.connectorservice.dstore;
Lines 26-31 Link Here
26
	public static String DStore_ConnectorService_Label;
26
	public static String DStore_ConnectorService_Label;
27
	public static String DStore_ConnectorService_Description;
27
	public static String DStore_ConnectorService_Description;
28
	
28
	
29
	public static String MSG_CONNECT_UNKNOWNHOST;
30
	
31
	public static String MSG_DISCONNECT_FAILED; 
32
	public static String MSG_DISCONNECT_CANCELLED;
33
	
34
	public static String MSG_CONNECT_SSL_EXCEPTION;
35
	public static String MSG_CONNECT_SSL_EXCEPTION_DETAILS;
36
	public static String MSG_STARTING_SERVER_VIA_REXEC;
37
	public static String MSG_STARTING_SERVER_VIA_DAEMON;
38
39
	public static String MSG_CONNECTING_TO_SERVER;
40
	public static String MSG_INITIALIZING_SERVER;
41
	public static String MSG_PORT_OUT_RANGE;
42
	
43
	public static String MSG_COMM_CONNECT_FAILED;
44
	public static String MSG_COMM_CONNECT_FAILED_DETAILS;
45
	
46
	public static String MSG_VALIDATE_PASSWORD_EMPTY;
47
	public static String MSG_VALIDATE_PASSWORD_EXPIRED;
48
	public static String MSG_VALIDATE_PASSWORD_INVALID;
49
	
50
	public static String MSG_VALIDATE_PASSWORD_EMPTY_DETAILS;
51
	public static String MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS;
52
	public static String MSG_VALIDATE_PASSWORD_INVALID_DETAILS;
53
	
54
	public static String MSG_COMM_USING_SSL;
55
	public static String MSG_COMM_NOT_USING_SSL;
56
	
57
	public static String MSG_COMM_SERVER_OLDER_WARNING;
58
	public static String MSG_COMM_CLIENT_OLDER_WARNING;
59
	public static String MSG_COMM_SERVER_OLDER_WARNING_DETAILS;
60
	public static String MSG_COMM_CLIENT_OLDER_WARNING_DETAILS;
61
	
62
	public static String MSG_CONNECT_DAEMON_FAILED;
63
	public static String MSG_CONNECT_DAEMON_FAILED_EXCEPTION;
64
	
65
	public static String MSG_COMM_AUTH_FAILED;
66
	public static String MSG_COMM_PWD_INVALID;
67
	public static String MSG_COMM_AUTH_FAILED_DETAILS;
68
	public static String MSG_COMM_PWD_INVALID_DETAILS;
69
	
70
	public static String MSG_COMM_INCOMPATIBLE_PROTOCOL;
71
	public static String MSG_COMM_INCOMPATIBLE_UPDATE;
72
	public static String MSG_COMM_INCOMPATIBLE_PROTOCOL_DETAILS;
73
	public static String MSG_COMM_INCOMPATIBLE_UPDATE_DETAILS;
74
	
75
	public static String MSG_CONNECT_FAILED;
76
	
77
	public static String MSG_OPERATION_CANCELLED;
78
79
	public static String MSG_COMM_INVALID_LOGIN; 
80
	public static String MSG_COMM_INVALID_LOGIN_DETAILS;
81
	
82
	
83
	public static String MSG_COMM_REXEC_NOTSTARTED;
84
	public static String MSG_COMM_REXEC_NOTSTARTED_DETAILS;
85
	
29
	static {
86
	static {
30
		// load message values from bundle file
87
		// load message values from bundle file
31
		NLS.initializeMessages(BUNDLE_NAME, ConnectorServiceResources.class);
88
		NLS.initializeMessages(BUNDLE_NAME, ConnectorServiceResources.class);
(-)src/org/eclipse/rse/internal/connectorservice/dstore/Activator.java (+3 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.internal.connectorservice.dstore;
18
package org.eclipse.rse.internal.connectorservice.dstore;
Lines 32-37 Link Here
32
	//The shared instance.
33
	//The shared instance.
33
	private static Activator plugin;
34
	private static Activator plugin;
34
	
35
	
36
	public final static String PLUGIN_ID = "org.eclipse.rse.connectorservice.dstore"; //$NON-NLS-1$
37
	
35
	/**
38
	/**
36
	 * The constructor.
39
	 * The constructor.
37
	 */
40
	 */
(-)src/org/eclipse/rse/connectorservice/dstore/DStoreConnectorService.java (-60 / +113 lines)
Lines 22-27 Link Here
22
 * David McKnight   (IBM)        - [186363] get rid of obsolete calls to SubSystem.connect()
22
 * David McKnight   (IBM)        - [186363] get rid of obsolete calls to SubSystem.connect()
23
 * David McKnight   (IBM)        - [196624] dstore miner IDs should be String constants rather than dynamic lookup
23
 * David McKnight   (IBM)        - [196624] dstore miner IDs should be String constants rather than dynamic lookup
24
 * David McKnight   (IBM)        - [216596] dstore preferences (timeout, and others)
24
 * David McKnight   (IBM)        - [216596] dstore preferences (timeout, and others)
25
 * 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
25
 *******************************************************************************/
26
 *******************************************************************************/
26
27
27
package org.eclipse.rse.connectorservice.dstore;
28
package org.eclipse.rse.connectorservice.dstore;
Lines 37-42 Link Here
37
38
38
import org.eclipse.core.runtime.FileLocator;
39
import org.eclipse.core.runtime.FileLocator;
39
import org.eclipse.core.runtime.IProgressMonitor;
40
import org.eclipse.core.runtime.IProgressMonitor;
41
import org.eclipse.core.runtime.IStatus;
40
import org.eclipse.core.runtime.NullProgressMonitor;
42
import org.eclipse.core.runtime.NullProgressMonitor;
41
import org.eclipse.dstore.core.client.ClientConnection;
43
import org.eclipse.dstore.core.client.ClientConnection;
42
import org.eclipse.dstore.core.client.ConnectionStatus;
44
import org.eclipse.dstore.core.client.ConnectionStatus;
Lines 51-56 Link Here
51
import org.eclipse.dstore.internal.core.client.ClientSSLProperties;
53
import org.eclipse.dstore.internal.core.client.ClientSSLProperties;
52
import org.eclipse.jface.dialogs.IDialogConstants;
54
import org.eclipse.jface.dialogs.IDialogConstants;
53
import org.eclipse.jface.preference.IPreferenceStore;
55
import org.eclipse.jface.preference.IPreferenceStore;
56
import org.eclipse.osgi.util.NLS;
54
import org.eclipse.rse.connectorservice.dstore.util.ConnectionStatusListener;
57
import org.eclipse.rse.connectorservice.dstore.util.ConnectionStatusListener;
55
import org.eclipse.rse.connectorservice.dstore.util.StatusMonitor;
58
import org.eclipse.rse.connectorservice.dstore.util.StatusMonitor;
56
import org.eclipse.rse.connectorservice.dstore.util.StatusMonitorFactory;
59
import org.eclipse.rse.connectorservice.dstore.util.StatusMonitorFactory;
Lines 67-77 Link Here
67
import org.eclipse.rse.core.subsystems.ServerLaunchType;
70
import org.eclipse.rse.core.subsystems.ServerLaunchType;
68
import org.eclipse.rse.core.subsystems.SubSystem;
71
import org.eclipse.rse.core.subsystems.SubSystem;
69
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
72
import org.eclipse.rse.dstore.universal.miners.IUniversalDataStoreConstants;
73
import org.eclipse.rse.internal.connectorservice.dstore.Activator;
74
import org.eclipse.rse.internal.connectorservice.dstore.ConnectorServiceResources;
70
import org.eclipse.rse.internal.connectorservice.dstore.RexecDstoreServer;
75
import org.eclipse.rse.internal.connectorservice.dstore.RexecDstoreServer;
71
import org.eclipse.rse.internal.ui.SystemPropertyResources;
76
import org.eclipse.rse.internal.ui.SystemPropertyResources;
77
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
72
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
78
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
73
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
79
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
74
import org.eclipse.rse.ui.ISystemMessages;
75
import org.eclipse.rse.ui.ISystemPreferencesConstants;
80
import org.eclipse.rse.ui.ISystemPreferencesConstants;
76
import org.eclipse.rse.ui.RSEUIPlugin;
81
import org.eclipse.rse.ui.RSEUIPlugin;
77
import org.eclipse.rse.ui.SystemBasePlugin;
82
import org.eclipse.rse.ui.SystemBasePlugin;
Lines 356-361 Link Here
356
				
361
				
357
//				 Fire comm event to signal state changed
362
//				 Fire comm event to signal state changed
358
				notifyDisconnection();
363
				notifyDisconnection();
364
				
359
				clientConnection = null;
365
				clientConnection = null;
360
				// DKM - no need to clear uid cache
366
				// DKM - no need to clear uid cache
361
				clearPassword(false, true); // clear in-memory password
367
				clearPassword(false, true); // clear in-memory password
Lines 503-509 Link Here
503
	/**
509
	/**
504
	 * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(IProgressMonitor)
510
	 * @see org.eclipse.rse.core.subsystems.IConnectorService#connect(IProgressMonitor)
505
	 */
511
	 */
506
	protected void internalConnect(IProgressMonitor monitor) throws Exception
512
	protected synchronized void internalConnect(IProgressMonitor monitor) throws Exception
507
	{
513
	{
508
	    if (isConnected()) {
514
	    if (isConnected()) {
509
	        return;
515
	        return;
Lines 550-557 Link Here
550
		{	
556
		{	
551
			if (monitor != null)
557
			if (monitor != null)
552
			{
558
			{
553
				SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_REXEC);
559
				String cmsg = ConnectorServiceResources.MSG_STARTING_SERVER_VIA_REXEC;
554
				monitor.subTask(cmsg.getLevelOneText());	
560
				monitor.subTask(cmsg);	
555
			}
561
			}
556
			
562
			
557
			SystemSignonInformation info = getSignonInformation();
563
			SystemSignonInformation info = getSignonInformation();
Lines 572-580 Link Here
572
				
578
				
573
				if (monitor != null)
579
				if (monitor != null)
574
				{
580
				{
575
					SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
581
					String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
576
					cmsg.makeSubstitution(clientConnection.getPort());
582
					monitor.subTask(cmsg);
577
					monitor.subTask(cmsg.getLevelOneText());
578
				}
583
				}
579
				
584
				
580
				// connect to launched server
585
				// connect to launched server
Lines 600-606 Link Here
600
				String errorMsg = null;
605
				String errorMsg = null;
601
				if (msg == null)
606
				if (msg == null)
602
				{
607
				{
603
					errorMsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText();
608
					errorMsg = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
604
				}
609
				}
605
				else
610
				else
606
				{
611
				{
Lines 614-621 Link Here
614
		{
619
		{
615
			if (monitor != null)
620
			if (monitor != null)
616
			{
621
			{
617
				SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_STARTING_SERVER_VIA_DAEMON);
622
				String cmsg = ConnectorServiceResources.MSG_STARTING_SERVER_VIA_DAEMON;
618
				monitor.subTask(cmsg.getLevelOneText());		
623
				monitor.subTask(cmsg);		
619
			}
624
			}
620
625
621
			// DY:  getLocalUserId() may return null for Windows connections because
626
			// DY:  getLocalUserId() may return null for Windows connections because
Lines 686-693 Link Here
686
					SystemSignonInformation newCredentials = null;
691
					SystemSignonInformation newCredentials = null;
687
					while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
692
					while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
688
					{
693
					{
689
						String messageId = isPasswordExpired(launchMsg) ? ISystemMessages.MSG_VALIDATE_PASSWORD_EXPIRED : ISystemMessages.MSG_VALIDATE_PASSWORD_INVALID;
694
						String pmsg = null;
690
						SystemMessage message = RSEUIPlugin.getPluginMessage(messageId);
695
						String pmsgDetails = null;
696
						boolean expired = isPasswordExpired(launchMsg);
697
						if (expired){
698
							pmsg = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED;
699
							pmsgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS;
700
						}
701
						else {
702
							pmsg = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID;
703
							pmsgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID_DETAILS;
704
						}
705
						
706
						SystemMessage message = createSystemMessage(IStatus.ERROR, pmsg, pmsgDetails);
691
						getCredentialsProvider().repairCredentials(message);
707
						getCredentialsProvider().repairCredentials(message);
692
						newCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
708
						newCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
693
						launchStatus = changePassword(clientConnection, oldCredentials, serverLauncher, monitor, newCredentials.getPassword());
709
						launchStatus = changePassword(clientConnection, oldCredentials, serverLauncher, monitor, newCredentials.getPassword());
Lines 707-718 Link Here
707
				{
723
				{
708
					launchFailed = true;
724
					launchFailed = true;
709
					
725
					
710
					SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_PORT_OUT_RANGE);
726
711
					int colonIndex = launchMsg.indexOf(':');
727
					int colonIndex = launchMsg.indexOf(':');
712
					String portRange = launchMsg.substring(colonIndex + 1);
728
					String portRange = launchMsg.substring(colonIndex + 1);
713
					cmsg.makeSubstitution(portRange);
714
					
729
					
715
					ShowConnectMessage msgAction = new ShowConnectMessage(cmsg);
730
					String pmsg =NLS.bind(ConnectorServiceResources.MSG_PORT_OUT_RANGE, portRange);		
731
					SystemMessage message = createSystemMessage(IStatus.ERROR, pmsg);
732
733
					ShowConnectMessage msgAction = new ShowConnectMessage(message);
716
					Display.getDefault().asyncExec(msgAction);
734
					Display.getDefault().asyncExec(msgAction);
717
					return;
735
					return;
718
				}
736
				}
Lines 726-734 Link Here
726
			{
744
			{
727
				if (monitor != null)
745
				if (monitor != null)
728
				{
746
				{
729
					SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
747
					if (clientConnection == null){
730
					cmsg.makeSubstitution(clientConnection.getPort());
748
						System.out.println("client connection is null!");
731
					monitor.subTask(cmsg.getLevelOneText());
749
					}
750
					String pmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort());
751
					monitor.subTask(pmsg);
732
				}
752
				}
733
				// connect to launched server
753
				// connect to launched server
734
				connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
754
				connectStatus = clientConnection.connect(launchStatus.getTicket(), timeout);
Lines 790-806 Link Here
790
			else
810
			else
791
			{
811
			{
792
				connectStatus = new ConnectionStatus(false);
812
				connectStatus = new ConnectionStatus(false);
793
				connectStatus.setMessage(
813
				
794
					RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED).getLevelOneText());
814
				String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
815
				connectStatus.setMessage(cmsg);
795
			}
816
			}
796
		}
817
		}
797
		else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL)
818
		else if (serverLauncherType == ServerLaunchType.RUNNING_LITERAL)
798
		{
819
		{
799
			if (monitor != null)
820
			if (monitor != null)
800
			{
821
			{
801
				SystemMessage cmsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECTING_TO_SERVER);
822
				String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECTING_TO_SERVER, clientConnection.getPort()); 
802
				cmsg.makeSubstitution(clientConnection.getPort());
823
				monitor.subTask(cmsg);
803
				monitor.subTask(cmsg.getLevelOneText());
804
			}
824
			}
805
			// connection directly
825
			// connection directly
806
			boolean useSSL = isUsingSSL();
826
			boolean useSSL = isUsingSSL();
Lines 833-840 Link Here
833
			IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
853
			IPreferenceStore store = RSEUIPlugin.getDefault().getPreferenceStore();
834
			if (clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_SSL))
854
			if (clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_SSL))
835
			{
855
			{
836
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_USING_SSL);
856
				String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_USING_SSL, getHostName());
837
				msg.makeSubstitution(getHostName());
857
				msg = createSystemMessage(IStatus.INFO, cmsg);
858
				
838
				DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_SSL);
859
				DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_SSL);
839
				Display.getDefault().syncExec(msgAction);
860
				Display.getDefault().syncExec(msgAction);
840
				if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
861
				if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
Lines 845-852 Link Here
845
			}
866
			}
846
			else if (!clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL))
867
			else if (!clientConnection.getDataStore().usingSSL() && store.getBoolean(ISystemPreferencesConstants.ALERT_NONSSL))
847
			{
868
			{
848
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_NOT_USING_SSL);
869
				String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_NOT_USING_SSL, getHostName());
849
				msg.makeSubstitution(getHostName());
870
				msg = createSystemMessage(IStatus.INFO, cmsg);			
871
			
850
				DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_NONSSL);
872
				DisplayHidableSystemMessageAction msgAction = new DisplayHidableSystemMessageAction(msg, store, ISystemPreferencesConstants.ALERT_NONSSL);
851
				Display.getDefault().syncExec(msgAction);
873
				Display.getDefault().syncExec(msgAction);
852
				if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
874
				if (msgAction.getReturnCode() != IDialogConstants.YES_ID)
Lines 901-914 Link Here
901
			{
923
			{
902
				if (message.startsWith(ClientConnection.CLIENT_OLDER))
924
				if (message.startsWith(ClientConnection.CLIENT_OLDER))
903
				{
925
				{
926
					String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_CLIENT_OLDER_WARNING, getHostName());
927
					String cmsgDetail = ConnectorServiceResources.MSG_COMM_CLIENT_OLDER_WARNING_DETAILS;
904
					
928
					
905
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CLIENT_OLDER_WARNING);
929
					msg = createSystemMessage(IStatus.WARNING, cmsg, cmsgDetail);
906
					msg.makeSubstitution(getHostName());
930
907
				}
931
				}
908
				else if (message.startsWith(ClientConnection.SERVER_OLDER))
932
				else if (message.startsWith(ClientConnection.SERVER_OLDER))
909
				{
933
				{
910
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_SERVER_OLDER_WARNING);
934
					String cmsg = NLS.bind(ConnectorServiceResources.MSG_COMM_SERVER_OLDER_WARNING, getHostName());
911
					msg.makeSubstitution(getHostName());
935
					String cmsgDetail = ConnectorServiceResources.MSG_COMM_SERVER_OLDER_WARNING_DETAILS;
936
					
937
					msg = createSystemMessage(IStatus.WARNING, cmsg, cmsgDetail);
912
				}
938
				}
913
				
939
				
914
				if (store.getBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER)){
940
				if (store.getBoolean(IUniversalDStoreConstants.ALERT_MISMATCHED_SERVER)){
Lines 933-948 Link Here
933
			{						
959
			{						
934
				dataStore.addMinersLocation("."); //$NON-NLS-1$
960
				dataStore.addMinersLocation("."); //$NON-NLS-1$
935
				// older servers initialized in one shot
961
				// older servers initialized in one shot
936
				DataElement schemaStatus = dataStore.getSchema();
962
				dataStore.getSchema();
937
		 
963
		 
938
		         // Initialzie the miners
964
		         // Initialzie the miners
939
		         if (monitor != null)
965
		         if (monitor != null)
940
		         {
966
		         {
941
		            SystemMessage imsg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_INITIALIZING_SERVER);
967
		        	 String imsg = ConnectorServiceResources.MSG_INITIALIZING_SERVER;
942
		            monitor.subTask(imsg.getLevelOneText());
968
		            monitor.subTask(imsg);
943
		         }
969
		         }
944
		         DataElement initStatus = dataStore.initMiners();	         
970
		         DataElement initStatus = dataStore.initMiners();	         
945
		         //statusMonitor.waitForUpdate(schemaStatus);
946
		         statusMonitor.waitForUpdate(initStatus);
971
		         statusMonitor.waitForUpdate(initStatus);
947
			}
972
			}
948
			//long t2 = System.currentTimeMillis();
973
			//long t2 = System.currentTimeMillis();
Lines 972-980 Link Here
972
					}
997
					}
973
					else
998
					else
974
					{
999
					{
975
					
1000
						String cmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECT_SSL_EXCEPTION, launchStatus.getMessage());
976
						msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_SSL_EXCEPTION);
1001
						msg = createSystemMessage(IStatus.ERROR, cmsg);
977
						msg.makeSubstitution(launchStatus.getMessage());
978
					}
1002
					}
979
				} 	
1003
				} 	
980
		    }
1004
		    }
Lines 986-993 Link Here
986
				if (launchStatus.getException() != null && serverLauncher != null)
1010
				if (launchStatus.getException() != null && serverLauncher != null)
987
				{
1011
				{
988
					Throwable exception = launchStatus.getException();
1012
					Throwable exception = launchStatus.getException();
989
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED_EXCEPTION);
1013
					String fmsg = NLS.bind(ConnectorServiceResources.MSG_CONNECT_DAEMON_FAILED_EXCEPTION, getHostName(), ""+serverLauncher.getDaemonPort()); //$NON-NLS-1$
990
					msg.makeSubstitution(getHostName(), ""+serverLauncher.getDaemonPort(), exception); //$NON-NLS-1$
1014
										
1015
					msg = createSystemMessage(IStatus.ERROR, fmsg, exception);
991
				}
1016
				}
992
				else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1)
1017
				else if (launchMsg != null && launchMsg.indexOf(IDataStoreConstants.AUTHENTICATION_FAILED) != -1)
993
				{
1018
				{
Lines 997-1004 Link Here
997
				    }
1022
				    }
998
				
1023
				
999
					// Display error message
1024
					// Display error message
1000
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_AUTH_FAILED);
1025
					String msgTxt = ConnectorServiceResources.MSG_COMM_AUTH_FAILED;
1001
					msg.makeSubstitution(getHostName());
1026
					String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_AUTH_FAILED_DETAILS, getHostName());
1027
					
1028
					msg = createSystemMessage(IStatus.ERROR, msgTxt, msgDetails);
1029
1002
					DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(msg);
1030
					DisplaySystemMessageAction msgAction = new DisplaySystemMessageAction(msg);
1003
					Display.getDefault().syncExec(msgAction);
1031
					Display.getDefault().syncExec(msgAction);
1004
1032
Lines 1040-1047 Link Here
1040
					SystemSignonInformation newCredentials = null;
1068
					SystemSignonInformation newCredentials = null;
1041
					while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
1069
					while (launchMsg != null && (isPasswordExpired(launchMsg) || isNewPasswordInvalid(launchMsg)))
1042
					{
1070
					{
1043
						String messageId = isPasswordExpired(launchMsg) ? ISystemMessages.MSG_VALIDATE_PASSWORD_EXPIRED : ISystemMessages.MSG_VALIDATE_PASSWORD_INVALID;
1071
						String msgTxt = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID;
1044
						SystemMessage message = RSEUIPlugin.getPluginMessage(messageId);
1072
						String msgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_INVALID_DETAILS;
1073
						if (isPasswordExpired(launchMsg)){
1074
							msgTxt = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED;
1075
							msgDetails = ConnectorServiceResources.MSG_VALIDATE_PASSWORD_EXPIRED_DETAILS;
1076
						}
1077
					
1078
						SystemMessage message = createSystemMessage(IStatus.ERROR, msgTxt, msgDetails);
1079
						
1045
						getCredentialsProvider().repairCredentials(message);
1080
						getCredentialsProvider().repairCredentials(message);
1046
						newCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
1081
						newCredentials = (SystemSignonInformation) getCredentialsProvider().getCredentials();
1047
						launchStatus = changePassword(clientConnection, oldCredentials, serverLauncher, monitor, newCredentials.getPassword());
1082
						launchStatus = changePassword(clientConnection, oldCredentials, serverLauncher, monitor, newCredentials.getPassword());
Lines 1071-1078 Link Here
1071
				}
1106
				}
1072
				else if (launchMsg != null)
1107
				else if (launchMsg != null)
1073
				{					
1108
				{					
1074
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_DAEMON_FAILED);
1109
					String msgTxt = NLS.bind(ConnectorServiceResources.MSG_CONNECT_DAEMON_FAILED, getHostName(), clientConnection.getPort());
1075
					msg.makeSubstitution(getHostName(), clientConnection.getPort(), launchMsg);
1110
					msg = createSystemMessage(IStatus.ERROR, msgTxt, launchMsg);
1076
				}
1111
				}
1077
			}
1112
			}
1078
			
1113
			
Lines 1081-1101 Link Here
1081
			{
1116
			{
1082
				if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_SERVER_UPDATE))
1117
				if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_SERVER_UPDATE))
1083
				{
1118
				{
1084
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_UPDATE);
1119
					String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_UPDATE, getHostName());	
1085
					msg.makeSubstitution(getHostName());
1120
					String msgDetails = ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_UPDATE_DETAILS;
1121
					
1122
					msg = createSystemMessage(IStatus.ERROR, msgTxt, msgDetails);
1086
				}
1123
				}
1087
				else if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_PROTOCOL))
1124
				else if (connectStatus.getMessage().startsWith(ClientConnection.INCOMPATIBLE_PROTOCOL))
1088
				{
1125
				{
1089
					msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_INCOMPATIBLE_PROTOCOL);
1126
					String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_PROTOCOL, getHostName());	
1090
					msg.makeSubstitution(getHostName());
1127
					String msgDetails = ConnectorServiceResources.MSG_COMM_INCOMPATIBLE_PROTOCOL_DETAILS;
1128
					
1129
					msg = createSystemMessage(IStatus.ERROR, msgTxt, msgDetails);
1091
				}
1130
				}
1092
				else
1131
				else
1093
				{
1132
				{
1094
					Throwable exception = connectStatus.getException();
1133
					Throwable exception = connectStatus.getException();
1095
					if (exception != null)
1134
					if (exception != null)
1096
					{
1135
					{
1097
						msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED);
1136
						String msgTxt = NLS.bind(ConnectorServiceResources.MSG_CONNECT_FAILED, getHostName());
1098
						msg.makeSubstitution(getHostName(), exception);
1137
						msg = createSystemMessage(IStatus.ERROR, msgTxt, exception);
1099
					}
1138
					}
1100
				}
1139
				}
1101
			}
1140
			}
Lines 1104-1126 Link Here
1104
			else if (connectStatus == null)
1143
			else if (connectStatus == null)
1105
			{
1144
			{
1106
				SystemBasePlugin.logError("Failed to connect to remote system", null); //$NON-NLS-1$
1145
				SystemBasePlugin.logError("Failed to connect to remote system", null); //$NON-NLS-1$
1107
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
1146
				String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
1108
				msg.makeSubstitution(getHostName());
1147
				String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED_DETAILS, getHostName());
1148
				msg = createSystemMessage(IStatus.ERROR, msgTxt, msgDetails);
1109
			}
1149
			}
1110
1150
1111
			// if, for some reason, we don't have a message
1151
			// if, for some reason, we don't have a message
1112
			if (msg == null && connectStatus != null)
1152
			if (msg == null && connectStatus != null)
1113
			{
1153
			{
1114
				SystemBasePlugin.logError("Failed to connect to remote system" + connectStatus.getMessage(), null); //$NON-NLS-1$
1154
				SystemBasePlugin.logError("Failed to connect to remote system" + connectStatus.getMessage(), null); //$NON-NLS-1$
1115
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_COMM_CONNECT_FAILED);
1155
				String msgTxt = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED, getHostName());
1116
				msg.makeSubstitution(getHostName());
1156
				String msgDetails = NLS.bind(ConnectorServiceResources.MSG_COMM_CONNECT_FAILED_DETAILS, getHostName());
1157
				msg = createSystemMessage(IStatus.ERROR, msgTxt, msgDetails);
1117
			}
1158
			}
1118
1159
1119
			clientConnection.disconnect();
1160
			clientConnection.disconnect();
1120
			clientConnection = null;
1161
			clientConnection = null;
1121
			
1162
			
1122
			// yantzi: artemis 6.0, check for invalid login (user ID / pwd) and reprompt for signon information
1163
			// yantzi: artemis 6.0, check for invalid login (user ID / pwd) and reprompt for signon information
1123
			if (msg != null && msg.getFullMessageID().startsWith(ISystemMessages.MSG_COMM_INVALID_LOGIN))
1164
			if (msg != null && msg.getLevelOneText().startsWith(NLS.bind(ConnectorServiceResources.MSG_COMM_INVALID_LOGIN, getHostName())))
1124
			{
1165
			{
1125
				if (launchFailed)
1166
				if (launchFailed)
1126
			    {
1167
			    {
Lines 1211-1217 Link Here
1211
		String serverPort = (String)starter.launch(monitor);	
1252
		String serverPort = (String)starter.launch(monitor);	
1212
		if (monitor.isCanceled())
1253
		if (monitor.isCanceled())
1213
		{
1254
		{
1214
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED);
1255
			SystemMessage msg = createSystemMessage(IStatus.CANCEL, ConnectorServiceResources.MSG_OPERATION_CANCELLED);
1215
			throw new SystemMessageException(msg);
1256
			throw new SystemMessageException(msg);
1216
		}
1257
		}
1217
		
1258
		
Lines 1329-1336 Link Here
1329
	{
1370
	{
1330
		for (int idx = 0; idx < warnings.size(); idx++)
1371
		for (int idx = 0; idx < warnings.size(); idx++)
1331
		{
1372
		{
1332
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_GENERIC_W);
1373
			SystemMessage msg = createSystemMessage(IStatus.WARNING, warnings.elementAt(idx).toString());
1333
			msg.makeSubstitution((warnings.elementAt(idx)).toString());
1334
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
1374
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
1335
			msgDlg.open();
1375
			msgDlg.open();
1336
		}
1376
		}
Lines 1384-1387 Link Here
1384
		return result;
1424
		return result;
1385
	}
1425
	}
1386
	
1426
	
1427
1428
	protected SystemMessage createSystemMessage(int severity, String msg) {
1429
		return createSystemMessage(severity, msg, (String)null);
1430
	}
1431
	
1432
	protected SystemMessage createSystemMessage(int severity, String msg, Throwable e) {
1433
		return new SimpleSystemMessage(Activator.PLUGIN_ID, severity, msg, e);
1434
	}
1435
	
1436
	protected SystemMessage createSystemMessage(int severity, String msg, String msgDetails) {
1437
		return new SimpleSystemMessage(Activator.PLUGIN_ID, severity, msg, msgDetails);
1438
	}	
1387
}
1439
}
1440
(-)src/org/eclipse/rse/connectorservice/dstore/util/ConnectionStatusListener.java (-16 / +34 lines)
Lines 12-36 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
14
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
15
 * David McKnight   (IBM)        - [216252] SystemMessages using RSEStatus
16
 * 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
15
 ********************************************************************************/
17
 ********************************************************************************/
16
18
17
package org.eclipse.rse.connectorservice.dstore.util;
19
package org.eclipse.rse.connectorservice.dstore.util;
18
20
21
import java.io.PrintWriter;
22
import java.io.StringWriter;
19
import java.lang.reflect.InvocationTargetException;
23
import java.lang.reflect.InvocationTargetException;
20
24
21
import org.eclipse.core.runtime.IProgressMonitor;
25
import org.eclipse.core.runtime.IProgressMonitor;
26
import org.eclipse.core.runtime.IStatus;
22
import org.eclipse.dstore.core.model.DataElement;
27
import org.eclipse.dstore.core.model.DataElement;
23
import org.eclipse.dstore.extra.DomainEvent;
28
import org.eclipse.dstore.extra.DomainEvent;
24
import org.eclipse.dstore.extra.IDomainListener;
29
import org.eclipse.dstore.extra.IDomainListener;
25
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
30
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
26
import org.eclipse.jface.operation.IRunnableContext;
31
import org.eclipse.jface.operation.IRunnableContext;
27
import org.eclipse.jface.operation.IRunnableWithProgress;
32
import org.eclipse.jface.operation.IRunnableWithProgress;
33
import org.eclipse.osgi.util.NLS;
28
import org.eclipse.rse.core.RSECorePlugin;
34
import org.eclipse.rse.core.RSECorePlugin;
29
import org.eclipse.rse.core.model.ISystemRegistry;
35
import org.eclipse.rse.core.model.ISystemRegistry;
30
import org.eclipse.rse.core.subsystems.IConnectorService;
36
import org.eclipse.rse.core.subsystems.IConnectorService;
31
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
37
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
38
import org.eclipse.rse.internal.connectorservice.dstore.Activator;
39
import org.eclipse.rse.internal.connectorservice.dstore.ConnectorServiceResources;
40
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
32
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
41
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
33
import org.eclipse.rse.ui.ISystemMessages;
34
import org.eclipse.rse.ui.RSEUIPlugin;
42
import org.eclipse.rse.ui.RSEUIPlugin;
35
import org.eclipse.rse.ui.SystemBasePlugin;
43
import org.eclipse.rse.ui.SystemBasePlugin;
36
import org.eclipse.rse.ui.messages.SystemMessageDialog;
44
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 113-122 Link Here
113
		{
121
		{
114
			Shell shell = getShell();
122
			Shell shell = getShell();
115
			_connectionDown = true;
123
			_connectionDown = true;
116
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
124
			
117
			msg.makeSubstitution(_connection.getPrimarySubSystem().getHost().getAliasName());
125
			String fmsgStr = NLS.bind(ConnectorServiceResources.MSG_CONNECT_UNKNOWNHOST, _connection.getPrimarySubSystem().getHost().getAliasName());
126
127
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, fmsgStr);
118
			SystemMessageDialog dialog = new SystemMessageDialog(internalGetShell(), msg);
128
			SystemMessageDialog dialog = new SystemMessageDialog(internalGetShell(), msg);
119
			dialog.open();
129
			dialog.open();
130
120
			try
131
			try
121
			{
132
			{
122
				IRunnableContext runnableContext = getRunnableContext(getShell());
133
				IRunnableContext runnableContext = getRunnableContext(getShell());
Lines 245-258 Link Here
245
     */
256
     */
246
    protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
257
    protected void showDisconnectErrorMessage(Shell shell, String hostName, int port, Exception exc)
247
    {
258
    {
248
         //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR,shell,RSEUIPlugin.getResourceBundle(),
259
    	String dfailedMsg = NLS.bind(ConnectorServiceResources.MSG_DISCONNECT_FAILED, hostName);
249
         //                             ISystemMessages.MSG_DISCONNECT_FAILED,
260
250
         //                             hostName, exc.getMessage()); 	
261
		StringWriter excWriter = new StringWriter();
251
         //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
262
		exc.printStackTrace(new PrintWriter(excWriter));
252
    	 SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
263
		String dmsg = exc.toString();
253
    	            RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc));
264
		if ((dmsg == null) || (exc instanceof ClassCastException)) dmsg = exc.getClass().getName();
254
    	 msgDlg.setException(exc);
265
		String details = dmsg + "\n" + excWriter.toString(); //$NON-NLS-1$    	
255
    	 msgDlg.open();
266
		
267
		try{	
268
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, dfailedMsg, details);
269
    	
270
			SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
271
			msgDlg.setException(exc);
272
			msgDlg.open();
273
		}
274
		catch (Exception e){			
275
		}
256
    }	
276
    }	
257
    /**
277
    /**
258
     * Show an error message when the user cancels the disconnection.
278
     * Show an error message when the user cancels the disconnection.
Lines 261-270 Link Here
261
     */
281
     */
262
    protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
282
    protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
263
    {
283
    {
264
         //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
284
    	String msg = NLS.bind(ConnectorServiceResources.MSG_DISCONNECT_CANCELLED, hostName);
265
         //                             ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
285
    	SystemMessageDialog msgDlg = new SystemMessageDialog(shell, new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL, msg));
266
    	 SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
286
    	msgDlg.open();
267
    	            RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName));
268
    	 msgDlg.open();
269
    }
287
    }
270
}
288
}
(-)src/org/eclipse/rse/internal/shells/ui/actions/SystemCommandAction.java (-3 / +5 lines)
Lines 16-22 Link Here
16
 * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
16
 * Martin Oberhuber (Wind River) - [174945] Remove obsolete icons from rse.shells.ui
17
 * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() 
17
 * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() 
18
 * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
18
 * Martin Oberhuber (Wind River) - [187218] Fix error reporting for connect()
19
 * Kevin Doyle (IBM)			 - [187083] Launch Shell action available on folders inside virtual files  
19
 * Kevin Doyle (IBM)			 - [187083] Launch Shell action available on folders inside virtual files 
20
 * 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 
20
 ********************************************************************************/
21
 ********************************************************************************/
21
22
22
package org.eclipse.rse.internal.shells.ui.actions;
23
package org.eclipse.rse.internal.shells.ui.actions;
Lines 44-49 Link Here
44
import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart;
45
import org.eclipse.rse.internal.shells.ui.view.SystemCommandsViewPart;
45
import org.eclipse.rse.services.clientserver.PathUtility;
46
import org.eclipse.rse.services.clientserver.PathUtility;
46
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
47
import org.eclipse.rse.services.clientserver.archiveutils.ArchiveHandlerManager;
48
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
47
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
49
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
48
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
50
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
49
import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
51
import org.eclipse.rse.shells.ui.RemoteCommandHelpers;
Lines 52-58 Link Here
52
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
54
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
53
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
55
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
54
import org.eclipse.rse.ui.ISystemIconConstants;
56
import org.eclipse.rse.ui.ISystemIconConstants;
55
import org.eclipse.rse.ui.ISystemMessages;
56
import org.eclipse.rse.ui.RSEUIPlugin;
57
import org.eclipse.rse.ui.RSEUIPlugin;
57
import org.eclipse.rse.ui.SystemBasePlugin;
58
import org.eclipse.rse.ui.SystemBasePlugin;
58
import org.eclipse.rse.ui.actions.SystemBaseAction;
59
import org.eclipse.rse.ui.actions.SystemBaseAction;
Lines 296-302 Link Here
296
297
297
			if (theNewName.length() == 0)
298
			if (theNewName.length() == 0)
298
			{
299
			{
299
				_errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_UCMD_INVOCATION_EMPTY);
300
				String msgTxt = ShellResources.MSG_UCMD_INVOCATION_EMPTY;
301
				_errorMessage = new SimpleSystemMessage(ShellsUIPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt);
300
			}
302
			}
301
303
302
			if (_errorMessage != null)
304
			if (_errorMessage != null)
(-)src/org/eclipse/rse/internal/shells/ui/ShellResources.properties (+7 lines)
Lines 89-91 Link Here
89
RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE=Running
89
RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE=Running
90
RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE=Finished
90
RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE=Finished
91
91
92
# universal commands
93
MSG_UCMD_INVOCATION_EMPTY      = The invocation may not be blank
94
95
MSG_OPERATION_RUNNING		= {0} - Running
96
MSG_OPERATION_FINISHED		= {0} - Finished
97
98
(-)src/org/eclipse/rse/internal/shells/ui/ShellResources.java (+6 lines)
Lines 87-92 Link Here
87
	public static String	RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE;
87
	public static String	RESID_PROPERTY_SHELL_STATUS_ACTIVE_VALUE;
88
	public static String	RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE;
88
	public static String	RESID_PROPERTY_SHELL_STATUS_INACTIVE_VALUE;
89
89
90
	// universal commands
91
	public static String MSG_UCMD_INVOCATION_EMPTY;
92
	
93
	public static String MSG_OPERATION_RUNNING;
94
	public static String MSG_OPERATION_FINISHED;
95
90
96
91
	static 
97
	static 
92
	{
98
	{
(-)src/org/eclipse/rse/internal/shells/ui/view/CommandsViewPage.java (-9 / +7 lines)
Lines 19-24 Link Here
19
 * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() 
19
 * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() 
20
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
20
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
21
 * Kevin Doyle		(IBM)		 - [212940] Duplicate Help Context Identifiers
21
 * Kevin Doyle		(IBM)		 - [212940] Duplicate Help Context Identifiers
22
 * 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
22
 ********************************************************************************/
23
 ********************************************************************************/
23
24
24
package org.eclipse.rse.internal.shells.ui.view;
25
package org.eclipse.rse.internal.shells.ui.view;
Lines 35-46 Link Here
35
import org.eclipse.jface.viewers.IStructuredSelection;
36
import org.eclipse.jface.viewers.IStructuredSelection;
36
import org.eclipse.jface.viewers.SelectionChangedEvent;
37
import org.eclipse.jface.viewers.SelectionChangedEvent;
37
import org.eclipse.jface.viewers.TableLayout;
38
import org.eclipse.jface.viewers.TableLayout;
39
import org.eclipse.osgi.util.NLS;
38
import org.eclipse.rse.core.subsystems.ISubSystem;
40
import org.eclipse.rse.core.subsystems.ISubSystem;
39
import org.eclipse.rse.internal.shells.ui.ShellResources;
41
import org.eclipse.rse.internal.shells.ui.ShellResources;
40
import org.eclipse.rse.internal.ui.SystemResources;
42
import org.eclipse.rse.internal.ui.SystemResources;
41
import org.eclipse.rse.internal.ui.view.SystemTableViewProvider;
43
import org.eclipse.rse.internal.ui.view.SystemTableViewProvider;
42
import org.eclipse.rse.services.clientserver.PathUtility;
44
import org.eclipse.rse.services.clientserver.PathUtility;
43
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
44
import org.eclipse.rse.shells.ui.view.CommandEntryViewerConfiguration;
45
import org.eclipse.rse.shells.ui.view.CommandEntryViewerConfiguration;
45
import org.eclipse.rse.shells.ui.view.SystemCommandEditor;
46
import org.eclipse.rse.shells.ui.view.SystemCommandEditor;
46
import org.eclipse.rse.shells.ui.view.SystemCommandsView;
47
import org.eclipse.rse.shells.ui.view.SystemCommandsView;
Lines 49-58 Link Here
49
import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
50
import org.eclipse.rse.subsystems.shells.core.model.RemoteOutput;
50
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
51
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
51
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
52
import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCommandShell;
52
import org.eclipse.rse.ui.ISystemMessages;
53
import org.eclipse.rse.ui.ISystemThemeConstants;
53
import org.eclipse.rse.ui.ISystemThemeConstants;
54
import org.eclipse.rse.ui.RSEUIPlugin;
54
import org.eclipse.rse.ui.RSEUIPlugin;
55
import org.eclipse.rse.ui.SystemWidgetHelpers;
56
import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
55
import org.eclipse.rse.ui.actions.SystemCopyToClipboardAction;
57
import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
56
import org.eclipse.rse.ui.actions.SystemPasteFromClipboardAction;
58
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
57
import org.eclipse.rse.ui.view.ISystemViewElementAdapter;
Lines 494-512 Link Here
494
			IRemoteCommandShell command = (IRemoteCommandShell) object;
493
			IRemoteCommandShell command = (IRemoteCommandShell) object;
495
			String title = command.getType();
494
			String title = command.getType();
496
495
497
			SystemMessage msg = null;
496
			String msgTxt = null;
498
			if (!command.isActive())
497
			if (!command.isActive())
499
			{
498
			{
500
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FINISHED);
499
				msgTxt = NLS.bind(ShellResources.MSG_OPERATION_FINISHED, title);
501
			}
500
			}
502
			else
501
			else
503
			{
502
			{
504
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_RUNNING);
503
				msgTxt = NLS.bind(ShellResources.MSG_OPERATION_RUNNING, title);
505
			}
504
			}
506
505
507
			msg.makeSubstitution(title);
506
			_title = msgTxt;
508
			_title = msg.getLevelOneText();
507
509
//			_tabFolderPage.setText(_title);
510
		}
508
		}
511
	}
509
	}
512
510
(-)src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.properties (+9 lines)
Lines 8-13 Link Here
8
# Contributors: 
8
# Contributors: 
9
# Martin Oberhuber (Wind River) - initial API and implementation 
9
# Martin Oberhuber (Wind River) - initial API and implementation 
10
# Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
10
# Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
11
# 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
11
################################################################################
12
################################################################################
12
13
13
# NLS_MESSAGEFORMAT_VAR
14
# NLS_MESSAGEFORMAT_VAR
Lines 32-34 Link Here
32
33
33
KeyboardInteractiveDialog_message=Keyboard Interactive authentication for {0}
34
KeyboardInteractiveDialog_message=Keyboard Interactive authentication for {0}
34
KeyboardInteractiveDialog_labelConnection=Enter values for the following connection: {0}
35
KeyboardInteractiveDialog_labelConnection=Enter values for the following connection: {0}
36
37
38
MSG_CONNECT_CANCELLED   = Connect to {0} was canceled
39
40
MSG_DISCONNECT_FAILED      = Disconnect from {0} failed with exception
41
MSG_DISCONNECT_CANCELLED   = Disconnect from {0} was canceled
42
43
	
(-)src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorResources.java (+6 lines)
Lines 8-13 Link Here
8
 * Contributors: 
8
 * Contributors: 
9
 * Martin Oberhuber (Wind River) - initial API and implementation 
9
 * Martin Oberhuber (Wind River) - initial API and implementation 
10
 * Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
10
 * Martin Oberhuber (Wind River) - copy dialogs from team.cvs.ui 
11
 * 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
11
 *******************************************************************************/
12
 *******************************************************************************/
12
13
13
package org.eclipse.rse.internal.connectorservice.ssh;
14
package org.eclipse.rse.internal.connectorservice.ssh;
Lines 42-45 Link Here
42
	public static String KeyboardInteractiveDialog_message;
43
	public static String KeyboardInteractiveDialog_message;
43
	public static String KeyboardInteractiveDialog_labelConnection;
44
	public static String KeyboardInteractiveDialog_labelConnection;
44
45
46
	public static String MSG_CONNECT_CANCELLED;
47
	
48
	public static String MSG_DISCONNECT_FAILED;
49
	public static String MSG_DISCONNECT_CANCELLED;
50
	
45
}
51
}
(-)src/org/eclipse/rse/internal/connectorservice/ssh/SshConnectorService.java (-8 / +13 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
15
 * Martin Oberhuber (Wind River) - [198790] make SSH createSession() protected
16
 * Martin Oberhuber (Wind River) - [203500] Support encodings for SSH Sftp paths
16
 * Martin Oberhuber (Wind River) - [203500] Support encodings for SSH Sftp paths
17
 * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection
17
 * Martin Oberhuber (Wind River) - [155026] Add keepalives for SSH connection
18
 * 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
18
 *******************************************************************************/
19
 *******************************************************************************/
19
20
20
package org.eclipse.rse.internal.connectorservice.ssh;
21
package org.eclipse.rse.internal.connectorservice.ssh;
Lines 22-27 Link Here
22
import java.lang.reflect.InvocationTargetException;
23
import java.lang.reflect.InvocationTargetException;
23
24
24
import org.eclipse.core.runtime.IProgressMonitor;
25
import org.eclipse.core.runtime.IProgressMonitor;
26
import org.eclipse.core.runtime.IStatus;
25
import org.eclipse.core.runtime.OperationCanceledException;
27
import org.eclipse.core.runtime.OperationCanceledException;
26
import org.eclipse.jface.dialogs.MessageDialog;
28
import org.eclipse.jface.dialogs.MessageDialog;
27
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
29
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
Lines 29-34 Link Here
29
import org.eclipse.jface.operation.IRunnableWithProgress;
31
import org.eclipse.jface.operation.IRunnableWithProgress;
30
import org.eclipse.jface.window.Window;
32
import org.eclipse.jface.window.Window;
31
import org.eclipse.jsch.core.IJSchService;
33
import org.eclipse.jsch.core.IJSchService;
34
import org.eclipse.osgi.util.NLS;
32
import org.eclipse.swt.widgets.Display;
35
import org.eclipse.swt.widgets.Display;
33
import org.eclipse.swt.widgets.Shell;
36
import org.eclipse.swt.widgets.Shell;
34
import org.eclipse.ui.IWorkbenchWindow;
37
import org.eclipse.ui.IWorkbenchWindow;
Lines 47-54 Link Here
47
import org.eclipse.rse.core.subsystems.IConnectorService;
50
import org.eclipse.rse.core.subsystems.IConnectorService;
48
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
51
import org.eclipse.rse.core.subsystems.SubSystemConfiguration;
49
import org.eclipse.rse.internal.services.ssh.ISshSessionProvider;
52
import org.eclipse.rse.internal.services.ssh.ISshSessionProvider;
53
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
50
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
54
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
51
import org.eclipse.rse.ui.ISystemMessages;
52
import org.eclipse.rse.ui.RSEUIPlugin;
55
import org.eclipse.rse.ui.RSEUIPlugin;
53
import org.eclipse.rse.ui.SystemBasePlugin;
56
import org.eclipse.rse.ui.SystemBasePlugin;
54
import org.eclipse.rse.ui.messages.SystemMessageDialog;
57
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 276-283 Link Here
276
			//TODO need a more correct message for "session lost"
279
			//TODO need a more correct message for "session lost"
277
			//TODO allow users to reconnect from this dialog
280
			//TODO allow users to reconnect from this dialog
278
			//SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
281
			//SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_UNKNOWNHOST);
279
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_CANCELLED);
282
280
			msg.makeSubstitution(_connection.getPrimarySubSystem().getHost().getAliasName());
283
			SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL, 
284
					NLS.bind(SshConnectorResources.MSG_CONNECT_CANCELLED, _connection.getHost().getAliasName()));
285
281
			SystemMessageDialog dialog = new SystemMessageDialog(getShell(), msg);
286
			SystemMessageDialog dialog = new SystemMessageDialog(getShell(), msg);
282
			dialog.open();
287
			dialog.open();
283
			try
288
			try
Lines 395-402 Link Here
395
	         //                             ISystemMessages.MSG_DISCONNECT_FAILED,
400
	         //                             ISystemMessages.MSG_DISCONNECT_FAILED,
396
	         //                             hostName, exc.getMessage()); 	
401
	         //                             hostName, exc.getMessage()); 	
397
	         //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
402
	         //RSEUIPlugin.logError("Disconnect failed",exc); // temporary
398
	    	 SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
403
	    	SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, NLS.bind(SshConnectorResources.MSG_DISCONNECT_FAILED, hostName), exc);
399
	    	            RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_FAILED).makeSubstitution(hostName,exc));
404
	    	 SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
400
	    	 msgDlg.setException(exc);
405
	    	 msgDlg.setException(exc);
401
	    	 msgDlg.open();
406
	    	 msgDlg.open();
402
	    }	
407
	    }	
Lines 409-417 Link Here
409
	    protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
414
	    protected void showDisconnectCancelledMessage(Shell shell, String hostName, int port)
410
	    {
415
	    {
411
	         //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
416
	         //SystemMessage.displayMessage(SystemMessage.MSGTYPE_ERROR, shell, RSEUIPlugin.getResourceBundle(),
412
	         //                             ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName);
417
	         //                             ISystemMessages.MSG_DISCONNECT_CANCELLED, hostName)
413
	    	 SystemMessageDialog msgDlg = new SystemMessageDialog(shell,
418
	    	SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.CANCEL, NLS.bind(SshConnectorResources.MSG_DISCONNECT_CANCELLED, hostName));
414
	    	            RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_DISCONNECT_CANCELLED).makeSubstitution(hostName));
419
	    	 SystemMessageDialog msgDlg = new SystemMessageDialog(shell,msg);
415
	    	 msgDlg.open();
420
	    	 msgDlg.open();
416
	    }
421
	    }
417
	}
422
	}
(-)src/org/eclipse/rse/internal/services/files/ftp/FTPService.java (-9 / +4 lines)
Lines 70-75 Link Here
70
 * Kevin Doyle		(IBM)		 - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
70
 * Kevin Doyle		(IBM)		 - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
71
 * David McKnight   (IBM)        - [209593] [api] add support for "file permissions" and "owner" properties for unix files
71
 * David McKnight   (IBM)        - [209593] [api] add support for "file permissions" and "owner" properties for unix files
72
 * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
72
 * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
73
 * 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
73
 ********************************************************************************/
74
 ********************************************************************************/
74
75
75
package org.eclipse.rse.internal.services.files.ftp;
76
package org.eclipse.rse.internal.services.files.ftp;
Lines 106-112 Link Here
106
import org.eclipse.rse.services.clientserver.IMatcher;
107
import org.eclipse.rse.services.clientserver.IMatcher;
107
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
108
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
108
import org.eclipse.rse.services.clientserver.PathUtility;
109
import org.eclipse.rse.services.clientserver.PathUtility;
109
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
110
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
110
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
111
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
111
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
112
import org.eclipse.rse.services.files.AbstractFileService;
112
import org.eclipse.rse.services.files.AbstractFileService;
Lines 331-344 Link Here
331
			}
331
			}
332
			return s;
332
			return s;
333
		} catch(UnsupportedEncodingException e) {
333
		} catch(UnsupportedEncodingException e) {
334
			try {
334
			SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
335
				//SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),"Please specify a different encoding in host properties."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
335
			throw new SystemMessageException(msg);
336
				SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
336
			
337
				//throw new RemoteFileIOException(new SystemMessageException(msg));
338
				throw new SystemMessageException(msg);
339
			} catch(IndicatorException ind) {
340
				throw new RemoteFileIOException(e);
341
			}
342
		}
337
		}
343
	}
338
	}
344
	
339
	
(-)src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.java (+5 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [181066] NLS missing messages with DAEMON and Shells
14
 * Martin Oberhuber (Wind River) - [181066] NLS missing messages with DAEMON and Shells
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.internal.subsystems.shells.core;
18
package org.eclipse.rse.internal.subsystems.shells.core;
Lines 30-35 Link Here
30
	public static String RSESubSystemOperation_Send_command_to_Shell_message;
31
	public static String RSESubSystemOperation_Send_command_to_Shell_message;
31
	public static String RSESubSystemOperation_Refresh_Output;
32
	public static String RSESubSystemOperation_Refresh_Output;
32
	
33
	
34
	public static String MSG_CONNECT_FAILED;	
35
	public static String MSG_OPERATION_CANCELLED;
36
37
	
33
	static 
38
	static 
34
	{
39
	{
35
		// load message values from bundle file
40
		// load message values from bundle file
(-)src/org/eclipse/rse/internal/subsystems/shells/core/ShellStrings.properties (-1 / +5 lines)
Lines 12-18 Link Here
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
# 
13
# 
14
# Contributors:
14
# Contributors:
15
# {Name} (company) - description of contribution.
15
# 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
16
###############################################################################
16
###############################################################################
17
17
18
# NLS_MESSAGEFORMAT_VAR
18
# NLS_MESSAGEFORMAT_VAR
Lines 25-27 Link Here
25
RSESubSystemOperation_Run_Shell_message = Run Shell
25
RSESubSystemOperation_Run_Shell_message = Run Shell
26
RSESubSystemOperation_Send_command_to_Shell_message = Send command to Shell
26
RSESubSystemOperation_Send_command_to_Shell_message = Send command to Shell
27
RSESubSystemOperation_Refresh_Output = Refresh Output
27
RSESubSystemOperation_Refresh_Output = Refresh Output
28
29
MSG_CONNECT_FAILED      = Connect to {0} failed with an unexpected exception
30
MSG_OPERATION_CANCELLED   = Operation canceled.
31
(-)src/org/eclipse/rse/subsystems/shells/core/subsystems/RemoteCmdSubSystem.java (-17 / +31 lines)
Lines 16-21 Link Here
16
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
16
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
17
 * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() 
17
 * Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty() 
18
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
18
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
19
 * 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
19
 ********************************************************************************/
20
 ********************************************************************************/
20
21
21
package org.eclipse.rse.subsystems.shells.core.subsystems;
22
package org.eclipse.rse.subsystems.shells.core.subsystems;
Lines 28-33 Link Here
28
import org.eclipse.core.runtime.IProgressMonitor;
29
import org.eclipse.core.runtime.IProgressMonitor;
29
import org.eclipse.core.runtime.NullProgressMonitor;
30
import org.eclipse.core.runtime.NullProgressMonitor;
30
import org.eclipse.core.runtime.OperationCanceledException;
31
import org.eclipse.core.runtime.OperationCanceledException;
32
import org.eclipse.osgi.util.NLS;
31
import org.eclipse.rse.core.RSECorePlugin;
33
import org.eclipse.rse.core.RSECorePlugin;
32
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
34
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
33
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
35
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
Lines 47-54 Link Here
47
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
49
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
48
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
50
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
49
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
51
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
50
import org.eclipse.rse.ui.ISystemMessages;
51
import org.eclipse.rse.ui.RSEUIPlugin;
52
import org.eclipse.rse.ui.SystemBasePlugin;
52
import org.eclipse.rse.ui.SystemBasePlugin;
53
import org.eclipse.swt.widgets.Display;
53
import org.eclipse.swt.widgets.Display;
54
import org.eclipse.swt.widgets.Shell;
54
import org.eclipse.swt.widgets.Shell;
Lines 92-99 Link Here
92
	public boolean checkForCancel(IProgressMonitor monitor)
92
	public boolean checkForCancel(IProgressMonitor monitor)
93
	{
93
	{
94
		if ((monitor != null) && monitor.isCanceled())
94
		if ((monitor != null) && monitor.isCanceled())
95
			throw new OperationCanceledException(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED)
95
		{
96
					.getLevelOneText());
96
			String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
97
		
98
			throw new OperationCanceledException(msgTxt);
99
		}
97
		return false;
100
		return false;
98
	}
101
	}
99
102
Lines 1010-1017 Link Here
1010
			msg = getRunningMessage(_cmd);
1013
			msg = getRunningMessage(_cmd);
1011
1014
1012
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1015
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1013
				throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
1016
			{
1014
						getHostName()).getLevelOneText());
1017
				String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
1018
1019
				throw new Exception(msgTxt);
1020
			}
1015
			runOutputs = internalRunCommand(_cmd, _runContext, _runInterpret, mon);
1021
			runOutputs = internalRunCommand(_cmd, _runContext, _runInterpret, mon);
1016
		}
1022
		}
1017
	}
1023
	}
Lines 1041-1049 Link Here
1041
			String msg = null;
1047
			String msg = null;
1042
			int totalWorkUnits = IProgressMonitor.UNKNOWN;
1048
			int totalWorkUnits = IProgressMonitor.UNKNOWN;
1043
1049
1044
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1050
			if (!implicitConnect(false, mon, msg, totalWorkUnits)){
1045
				throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
1051
				
1046
						getHostName()).getLevelOneText());
1052
				String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
1053
				throw new Exception(msgTxt);
1054
			}
1047
			runOutputs = new Object[]
1055
			runOutputs = new Object[]
1048
			{
1056
			{
1049
				internalRunShell(_runContext, mon)
1057
				internalRunShell(_runContext, mon)
Lines 1077-1084 Link Here
1077
			int totalWorkUnits = IProgressMonitor.UNKNOWN;
1085
			int totalWorkUnits = IProgressMonitor.UNKNOWN;
1078
1086
1079
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1087
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1080
				throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
1088
			{
1081
						getHostName()).getLevelOneText());
1089
				String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
1090
1091
				throw new Exception(msgTxt);
1092
			}
1082
			internalCancelShell(_runContext, mon);
1093
			internalCancelShell(_runContext, mon);
1083
		}
1094
		}
1084
	}
1095
	}
Lines 1116-1124 Link Here
1116
1127
1117
			msg = getRunningMessage(_cmd);
1128
			msg = getRunningMessage(_cmd);
1118
1129
1119
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1130
			if (!implicitConnect(false, mon, msg, totalWorkUnits)){
1120
				throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
1131
				String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
1121
						getHostName()).getLevelOneText());
1132
				
1133
				throw new Exception(msgTxt);
1134
			}
1122
			internalSendCommandToShell(_cmd, _runContext, mon);
1135
			internalSendCommandToShell(_cmd, _runContext, mon);
1123
		}
1136
		}
1124
	}
1137
	}
Lines 1149-1157 Link Here
1149
			String msg = null;
1162
			String msg = null;
1150
			int totalWorkUnits = IProgressMonitor.UNKNOWN;
1163
			int totalWorkUnits = IProgressMonitor.UNKNOWN;
1151
1164
1152
			if (!implicitConnect(false, mon, msg, totalWorkUnits))
1165
			if (!implicitConnect(false, mon, msg, totalWorkUnits)){
1153
				throw new Exception(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_CONNECT_FAILED).makeSubstitution(
1166
				String msgTxt = NLS.bind(ShellStrings.MSG_CONNECT_FAILED, getHostName());
1154
						getHostName()).getLevelOneText());
1167
				throw new Exception(msgTxt);
1168
			}
1155
			internalRemoveShell(_runContext);
1169
			internalRemoveShell(_runContext);
1156
		}
1170
		}
1157
	}
1171
	}
(-)src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java (-5 / +3 lines)
Lines 22-27 Link Here
22
 * Kevin Doyle		(IBM)		 - [211374] [ssh] New File on SSH has unnecessary space in its contents
22
 * Kevin Doyle		(IBM)		 - [211374] [ssh] New File on SSH has unnecessary space in its contents
23
 * David McKnight   (IBM)        - [209593] [api] add support for "file permissions" and "owner" properties for unix files
23
 * David McKnight   (IBM)        - [209593] [api] add support for "file permissions" and "owner" properties for unix files
24
 * Martin Oberhuber (Wind River) - [216343] immediate link targets and canonical paths for Sftp
24
 * Martin Oberhuber (Wind River) - [216343] immediate link targets and canonical paths for Sftp
25
 * 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
25
 *******************************************************************************/
26
 *******************************************************************************/
26
27
27
package org.eclipse.rse.internal.services.ssh.files;
28
package org.eclipse.rse.internal.services.ssh.files;
Lines 64-70 Link Here
64
import org.eclipse.rse.services.clientserver.IMatcher;
65
import org.eclipse.rse.services.clientserver.IMatcher;
65
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
66
import org.eclipse.rse.services.clientserver.NamePatternMatcher;
66
import org.eclipse.rse.services.clientserver.PathUtility;
67
import org.eclipse.rse.services.clientserver.PathUtility;
67
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
68
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
68
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
69
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
69
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
70
import org.eclipse.rse.services.files.AbstractFileService;
70
import org.eclipse.rse.services.files.AbstractFileService;
Lines 229-242 Link Here
229
			//FIXME bug 204705: this does not work properly for commands like ls(), due to a Jsch bug 
229
			//FIXME bug 204705: this does not work properly for commands like ls(), due to a Jsch bug 
230
			return quoteForJsch(recoded);
230
			return quoteForJsch(recoded);
231
		} catch(UnsupportedEncodingException e) {
231
		} catch(UnsupportedEncodingException e) {
232
			try {
232
233
				//SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),"Please specify a different encoding in host properties."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
233
				//SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),"Please specify a different encoding in host properties."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
234
				SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
234
				SystemMessage msg = new SystemMessage("RSE","F","9999",'E',e.getMessage(),""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
235
				//throw new RemoteFileIOException(new SystemMessageException(msg));
235
				//throw new RemoteFileIOException(new SystemMessageException(msg));
236
				throw new SystemMessageException(msg);
236
				throw new SystemMessageException(msg);
237
			} catch(IndicatorException ind) {
237
238
				throw makeSystemMessageException(e);
239
			}
240
		}
238
		}
241
	}
239
	}
242
	
240
	
(-)src/org/eclipse/rse/internal/importexport/files/RemoteImportWizardPage1.java (-12 / +25 lines)
Lines 9-14 Link Here
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
11
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
12
 * 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
12
 *******************************************************************************/
13
 *******************************************************************************/
13
package org.eclipse.rse.internal.importexport.files;
14
package org.eclipse.rse.internal.importexport.files;
14
15
Lines 37-52 Link Here
37
import org.eclipse.jface.viewers.IStructuredSelection;
38
import org.eclipse.jface.viewers.IStructuredSelection;
38
import org.eclipse.jface.viewers.ITreeContentProvider;
39
import org.eclipse.jface.viewers.ITreeContentProvider;
39
import org.eclipse.jface.window.Window;
40
import org.eclipse.jface.window.Window;
41
import org.eclipse.osgi.util.NLS;
40
import org.eclipse.rse.core.model.IHost;
42
import org.eclipse.rse.core.model.IHost;
41
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
43
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
42
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
44
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
43
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
45
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
44
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
46
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
45
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
47
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
48
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
46
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
49
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
47
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
50
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
48
import org.eclipse.rse.ui.ISystemMessages;
49
import org.eclipse.rse.ui.RSEUIPlugin;
50
import org.eclipse.rse.ui.SystemBasePlugin;
51
import org.eclipse.rse.ui.SystemBasePlugin;
51
import org.eclipse.rse.ui.SystemWidgetHelpers;
52
import org.eclipse.rse.ui.SystemWidgetHelpers;
52
import org.eclipse.rse.ui.messages.SystemMessageDialog;
53
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 114-120 Link Here
114
	private static final String STORE_CREATE_DESCRIPTION_FILE_ID = "RemoteImportWizardPage1.STORE_CREATE_DESCRIPTION_FILE_ID"; //$NON-NLS-1$
115
	private static final String STORE_CREATE_DESCRIPTION_FILE_ID = "RemoteImportWizardPage1.STORE_CREATE_DESCRIPTION_FILE_ID"; //$NON-NLS-1$
115
	private static final String STORE_DESCRIPTION_FILE_NAME_ID = "RemoteImportWizardPage1.STORE_DESCRIPTION_FILE_NAME_ID"; //$NON-NLS-1$
116
	private static final String STORE_DESCRIPTION_FILE_NAME_ID = "RemoteImportWizardPage1.STORE_DESCRIPTION_FILE_NAME_ID"; //$NON-NLS-1$
116
	// messages
117
	// messages
117
	protected static final SystemMessage SOURCE_EMPTY_MESSAGE = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SOURCE_EMPTY);
118
	protected static final SystemMessage SOURCE_EMPTY_MESSAGE = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID,
119
			IStatus.ERROR,
120
			RemoteImportExportResources.FILEMSG_SOURCE_EMPTY,
121
			RemoteImportExportResources.FILEMSG_SOURCE_EMPTY_DETAILS);
122
118
123
119
	/**
124
	/**
120
	 *	Creates an instance of this class
125
	 *	Creates an instance of this class
Lines 411-418 Link Here
411
	 */
416
	 */
412
	protected boolean ensureSourceIsValid() {
417
	protected boolean ensureSourceIsValid() {
413
		if (((File) sourceDirectory).isDirectory()) return true;
418
		if (((File) sourceDirectory).isDirectory()) return true;
414
		SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_FOLDER_IS_FILE);
419
		String msgTxt = RemoteImportExportResources.FILEMSG_FOLDER_IS_FILE;
415
		msg.makeSubstitution(((File) sourceDirectory).getAbsolutePath());
420
		String msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_FOLDER_IS_FILE_DETAILS, ((File)sourceDirectory).getAbsolutePath());
421
		
422
		SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
416
		setErrorMessage(msg);
423
		setErrorMessage(msg);
417
		sourceNameField.setFocus();
424
		sourceNameField.setFocus();
418
		return false;
425
		return false;
Lines 432-439 Link Here
432
		}
439
		}
433
		IStatus status = op.getStatus();
440
		IStatus status = op.getStatus();
434
		if (!status.isOK()) {
441
		if (!status.isOK()) {
435
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IMPORT_FAILED);
442
			String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_FAILED, status);
436
			msg.makeSubstitution(status);
443
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt);
444
437
			SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
445
			SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
438
			dlg.openWithDetails();
446
			dlg.openWithDetails();
439
			return false;
447
			return false;
Lines 481-487 Link Here
481
			boolean ret = executeImportOperation(new RemoteFileImportOperation(data, FileSystemStructureProvider.INSTANCE, this));
489
			boolean ret = executeImportOperation(new RemoteFileImportOperation(data, FileSystemStructureProvider.INSTANCE, this));
482
			return ret;
490
			return ret;
483
		}
491
		}
484
		SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IMPORT_NONE_SELECTED);
492
		String msgTxt = RemoteImportExportResources.FILEMSG_IMPORT_NONE_SELECTED;
493
		String msgDetails = RemoteImportExportResources.FILEMSG_IMPORT_NONE_SELECTED_DETAILS;
494
		
495
		SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
485
		setErrorMessage(msg);
496
		setErrorMessage(msg);
486
		return false;
497
		return false;
487
	}
498
	}
Lines 956-962 Link Here
956
		};
967
		};
957
		IRunnableWithProgress runnable = new IRunnableWithProgress() {
968
		IRunnableWithProgress runnable = new IRunnableWithProgress() {
958
			public void run(final IProgressMonitor monitor) throws InterruptedException {
969
			public void run(final IProgressMonitor monitor) throws InterruptedException {
959
				String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IMPORT_FILTERING).getLevelOneText();
970
				
971
				String msg = RemoteImportExportResources.FILEMSG_IMPORT_FILTERING;
960
				monitor.beginTask(msg, IProgressMonitor.UNKNOWN);
972
				monitor.beginTask(msg, IProgressMonitor.UNKNOWN);
961
				getSelectedResources(filter, monitor);
973
				getSelectedResources(filter, monitor);
962
			}
974
			}
Lines 1028-1034 Link Here
1028
		};
1040
		};
1029
		IRunnableWithProgress runnable = new IRunnableWithProgress() {
1041
		IRunnableWithProgress runnable = new IRunnableWithProgress() {
1030
			public void run(final IProgressMonitor monitor) throws InterruptedException {
1042
			public void run(final IProgressMonitor monitor) throws InterruptedException {
1031
				String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IMPORT_FILTERING).getLevelOneText();
1043
				String msg = RemoteImportExportResources.FILEMSG_IMPORT_FILTERING;
1032
				monitor.beginTask(msg, IProgressMonitor.UNKNOWN);
1044
				monitor.beginTask(msg, IProgressMonitor.UNKNOWN);
1033
				getSelectedResources(filter, monitor);
1045
				getSelectedResources(filter, monitor);
1034
			}
1046
			}
Lines 1318-1325 Link Here
1318
		if (msgLine != null)
1330
		if (msgLine != null)
1319
			msgLine.setErrorMessage(exc);
1331
			msgLine.setErrorMessage(exc);
1320
		else {
1332
		else {
1321
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
1333
			
1322
			msg.makeSubstitution(exc);
1334
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, 
1335
					RemoteImportExportResources.MSG_ERROR_UNEXPECTED, exc);
1323
			pendingErrorMessage = msg;
1336
			pendingErrorMessage = msg;
1324
		}
1337
		}
1325
	}
1338
	}
(-)src/org/eclipse/rse/internal/importexport/files/RemoteFileImportOperation.java (-2 / +4 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * 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
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.rse.internal.importexport.files;
13
package org.eclipse.rse.internal.importexport.files;
13
14
Lines 35-40 Link Here
35
import org.eclipse.core.runtime.Status;
36
import org.eclipse.core.runtime.Status;
36
import org.eclipse.core.runtime.SubProgressMonitor;
37
import org.eclipse.core.runtime.SubProgressMonitor;
37
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
38
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
39
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
38
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
40
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
39
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
41
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
40
import org.eclipse.rse.services.files.RemoteFileIOException;
42
import org.eclipse.rse.services.files.RemoteFileIOException;
Lines 416-422 Link Here
416
		IStatus[] errors = new IStatus[errorTable.size()];
418
		IStatus[] errors = new IStatus[errorTable.size()];
417
		errorTable.toArray(errors);
419
		errorTable.toArray(errors);
418
		// IFS:
420
		// IFS:
419
		String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IMPORT_PROBLEMS).getLevelOneText();
421
		String msg = RemoteImportExportResources.FILEMSG_IMPORT_PROBLEMS;
420
		return new MultiStatus(RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, errors, msg, null);
422
		return new MultiStatus(RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), IStatus.OK, errors, msg, null);
421
	}
423
	}
422
424
Lines 509-515 Link Here
509
					// If we don't have a parent then we have selected the
511
					// If we don't have a parent then we have selected the
510
					// file systems root. Roots can't copied (at least not
512
					// file systems root. Roots can't copied (at least not
511
					// under windows).
513
					// under windows).
512
					String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_COPY_ROOT).toString();
514
					String msg = RemoteImportExportResources.FILEMSG_COPY_ROOT;
513
					errorTable.add(new Status(IStatus.INFO, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, null));
515
					errorTable.add(new Status(IStatus.INFO, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, null));
514
					continue;
516
					continue;
515
				}
517
				}
(-)src/org/eclipse/rse/internal/importexport/files/Utilities.java (-16 / +18 lines)
Lines 9-28 Link Here
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [180562][api] dont implement IRemoteImportExportConstants
10
 * Martin Oberhuber (Wind River) - [180562][api] dont implement IRemoteImportExportConstants
11
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
12
 * 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
12
 *******************************************************************************/
13
 *******************************************************************************/
13
package org.eclipse.rse.internal.importexport.files;
14
package org.eclipse.rse.internal.importexport.files;
14
15
16
import org.eclipse.core.runtime.IStatus;
15
import org.eclipse.core.runtime.NullProgressMonitor;
17
import org.eclipse.core.runtime.NullProgressMonitor;
18
import org.eclipse.osgi.util.NLS;
16
import org.eclipse.rse.core.RSECorePlugin;
19
import org.eclipse.rse.core.RSECorePlugin;
17
import org.eclipse.rse.core.model.IHost;
20
import org.eclipse.rse.core.model.IHost;
18
import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
21
import org.eclipse.rse.internal.importexport.IRemoteImportExportConstants;
22
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
23
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
24
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
19
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
25
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
20
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
26
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
21
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
27
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
22
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
28
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
23
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
29
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
24
import org.eclipse.rse.ui.ISystemMessages;
25
import org.eclipse.rse.ui.RSEUIPlugin;
26
import org.eclipse.rse.ui.SystemBasePlugin;
30
import org.eclipse.rse.ui.SystemBasePlugin;
27
import org.eclipse.rse.ui.messages.SystemMessageDialog;
31
import org.eclipse.rse.ui.messages.SystemMessageDialog;
28
import org.eclipse.swt.widgets.Shell;
32
import org.eclipse.swt.widgets.Shell;
Lines 89-95 Link Here
89
		if (sc == null) {
93
		if (sc == null) {
90
			// invalid connection
94
			// invalid connection
91
			ret = false;
95
			ret = false;
92
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION);
96
			
97
			String msgTxt = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION;
98
			String msgDetails = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS;
99
			
100
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
93
			SystemMessageDialog.show(s, msg);
101
			SystemMessageDialog.show(s, msg);
94
			//displayMessage(s, ISystemMessages.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION, true);
102
			//displayMessage(s, ISystemMessages.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION, true);
95
		}
103
		}
Lines 204-214 Link Here
204
			}
212
			}
205
		} else {
213
		} else {
206
			o = new Object[] { e.getLocalizedMessage() == null ? e.toString() : e.getLocalizedMessage() };
214
			o = new Object[] { e.getLocalizedMessage() == null ? e.toString() : e.getLocalizedMessage() };
207
			logExceptionError(ISystemMessages.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, o, e);
215
			logExceptionError(NLS.bind(RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, o), e);
208
			if (s != null) {
216
			if (s != null) {
209
				//displayMessage(s, ISystemMessages.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, o, false);
217
				String msgTxt = NLS.bind(RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, o[0]);
210
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION);
218
				String msgDetails = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION_DETAILS;
211
				msg.makeSubstitution(o[0]);
219
				SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
212
				SystemMessageDialog.show(s, msg);
220
				SystemMessageDialog.show(s, msg);
213
			}
221
			}
214
		}
222
		}
Lines 224-238 Link Here
224
		return s;
232
		return s;
225
	}
233
	}
226
234
227
	public static void logExceptionError(String msgId, Throwable exception) {
235
	public static void logExceptionError(String msgTxt, Throwable exception) {
228
		String msg = msgId + " " + RSEUIPlugin.getPluginMessage(msgId).getLevelOneText(); //$NON-NLS-1$
236
		SystemBasePlugin.logError(msgTxt, exception);
229
		SystemBasePlugin.logError(msg, exception);
230
	}
237
	}
231
238
232
	public static void logExceptionError(String msgId, Object[] subs, Throwable exception) {
239
233
		SystemMessage sysMsg = RSEUIPlugin.getPluginMessage(msgId);
234
		sysMsg.makeSubstitution(subs);
235
		String msg = msgId + " " + sysMsg.getLevelOneText(); //$NON-NLS-1$
236
		SystemBasePlugin.logError(msg, exception);
237
	}
238
}
240
}
(-)src/org/eclipse/rse/internal/importexport/files/RemoteFileImportActionDelegate.java (-4 / +5 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * 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
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.rse.internal.importexport.files;
13
package org.eclipse.rse.internal.importexport.files;
13
14
Lines 23-34 Link Here
23
import org.eclipse.core.runtime.MultiStatus;
24
import org.eclipse.core.runtime.MultiStatus;
24
import org.eclipse.core.runtime.Status;
25
import org.eclipse.core.runtime.Status;
25
import org.eclipse.jface.action.IAction;
26
import org.eclipse.jface.action.IAction;
27
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
28
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
27
import org.eclipse.rse.internal.importexport.RemoteImportExportProblemDialog;
29
import org.eclipse.rse.internal.importexport.RemoteImportExportProblemDialog;
28
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
30
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
31
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
29
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
32
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
30
import org.eclipse.rse.ui.ISystemMessages;
31
import org.eclipse.rse.ui.RSEUIPlugin;
32
import org.eclipse.rse.ui.SystemBasePlugin;
33
import org.eclipse.rse.ui.SystemBasePlugin;
33
import org.eclipse.rse.ui.messages.SystemMessageDialog;
34
import org.eclipse.rse.ui.messages.SystemMessageDialog;
34
import org.eclipse.ui.PlatformUI;
35
import org.eclipse.ui.PlatformUI;
Lines 138-145 Link Here
138
				status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
139
				status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
139
			}
140
			}
140
			if (!status.isOK()) {
141
			if (!status.isOK()) {
141
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_IMPORT_FAILED);
142
				String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_FAILED, status);
142
				msg.makeSubstitution(status);
143
				SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt);
143
				SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
144
				SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
144
				dlg.openWithDetails();
145
				dlg.openWithDetails();
145
				return null;
146
				return null;
(-)src/org/eclipse/rse/internal/importexport/files/RemoteFileExportActionDelegate.java (-4 / +7 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * 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
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.rse.internal.importexport.files;
13
package org.eclipse.rse.internal.importexport.files;
13
14
Lines 23-34 Link Here
23
import org.eclipse.core.runtime.MultiStatus;
24
import org.eclipse.core.runtime.MultiStatus;
24
import org.eclipse.core.runtime.Status;
25
import org.eclipse.core.runtime.Status;
25
import org.eclipse.jface.action.IAction;
26
import org.eclipse.jface.action.IAction;
27
import org.eclipse.osgi.util.NLS;
26
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
28
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
27
import org.eclipse.rse.internal.importexport.RemoteImportExportProblemDialog;
29
import org.eclipse.rse.internal.importexport.RemoteImportExportProblemDialog;
28
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
30
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
31
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
29
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
32
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
30
import org.eclipse.rse.ui.ISystemMessages;
31
import org.eclipse.rse.ui.RSEUIPlugin;
32
import org.eclipse.rse.ui.SystemBasePlugin;
33
import org.eclipse.rse.ui.SystemBasePlugin;
33
import org.eclipse.rse.ui.messages.SystemMessageDialog;
34
import org.eclipse.rse.ui.messages.SystemMessageDialog;
34
import org.eclipse.ui.PlatformUI;
35
import org.eclipse.ui.PlatformUI;
Lines 138-145 Link Here
138
				status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
139
				status = new Status(IStatus.OK, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, "", e); //$NON-NLS-1$
139
			}
140
			}
140
			if (!status.isOK()) {
141
			if (!status.isOK()) {
141
				SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_EXPORT_FAILED);
142
				String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_FAILED, status);
142
				msg.makeSubstitution(status);
143
				
144
				SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt);
145
143
				SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
146
				SystemMessageDialog dlg = new SystemMessageDialog(getShell(), msg);
144
				dlg.openWithDetails();
147
				dlg.openWithDetails();
145
				return null;
148
				return null;
(-)src/org/eclipse/rse/internal/importexport/files/RemoteFileExportOperation.java (-4 / +7 lines)
Lines 10-15 Link Here
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
11
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
12
 * David McKnight   (IBM)        - [191479] refreshing destination directory after export
12
 * David McKnight   (IBM)        - [191479] refreshing destination directory after export
13
 * 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
13
 *******************************************************************************/
14
 *******************************************************************************/
14
package org.eclipse.rse.internal.importexport.files;
15
package org.eclipse.rse.internal.importexport.files;
15
16
Lines 33-44 Link Here
33
import org.eclipse.core.runtime.Status;
34
import org.eclipse.core.runtime.Status;
34
import org.eclipse.jface.operation.IRunnableWithProgress;
35
import org.eclipse.jface.operation.IRunnableWithProgress;
35
import org.eclipse.jface.operation.ModalContext;
36
import org.eclipse.jface.operation.ModalContext;
37
import org.eclipse.osgi.util.NLS;
36
import org.eclipse.rse.core.RSECorePlugin;
38
import org.eclipse.rse.core.RSECorePlugin;
37
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
39
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
38
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
40
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
39
import org.eclipse.rse.core.model.IHost;
41
import org.eclipse.rse.core.model.IHost;
40
import org.eclipse.rse.core.model.ISystemRegistry;
42
import org.eclipse.rse.core.model.ISystemRegistry;
41
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
43
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
44
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
42
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
45
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
43
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
46
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
44
import org.eclipse.rse.services.files.RemoteFileIOException;
47
import org.eclipse.rse.services.files.RemoteFileIOException;
Lines 224-232 Link Here
224
			try {
227
			try {
225
				targetFile = new UniFilePlus(Utilities.getIRemoteFile(conn, fullPath.toString()));
228
				targetFile = new UniFilePlus(Utilities.getIRemoteFile(conn, fullPath.toString()));
226
			} catch (NullPointerException e) {
229
			} catch (NullPointerException e) {
230
				String msg = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_ERROR, fullPath, RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION);
231
				
227
				// Assume that communication has failed.  
232
				// Assume that communication has failed.  
228
				String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_EXPORT_ERROR,
229
						new Object[] { fullPath, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION).getLevelOneText(), e }).toString();
230
				errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
233
				errorTable.add(new Status(IStatus.ERROR, RemoteImportExportPlugin.getDefault().getBundle().getSymbolicName(), 0, msg, e));
231
				throw e;
234
				throw e;
232
			}
235
			}
Lines 238-244 Link Here
238
				return;
241
				return;
239
			}
242
			}
240
			if (!targetFile.canWrite()) {
243
			if (!targetFile.canWrite()) {
241
				String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_NOT_WRITABLE, targetFile.getAbsolutePath()).toString();
244
				String msg = NLS.bind(RemoteImportExportResources.FILEMSG_NOT_WRITABLE, targetFile.getAbsolutePath());
242
				errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, null));
245
				errorTable.add(new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, 0, msg, null));
243
				monitor.worked(1);
246
				monitor.worked(1);
244
				return;
247
				return;
Lines 378-384 Link Here
378
	public IStatus getStatus() {
381
	public IStatus getStatus() {
379
		IStatus[] errors = new IStatus[errorTable.size()];
382
		IStatus[] errors = new IStatus[errorTable.size()];
380
		errorTable.toArray(errors);
383
		errorTable.toArray(errors);
381
		String msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_EXPORT_PROBLEMS).getLevelOneText();
384
		String msg = RemoteImportExportResources.FILEMSG_EXPORT_PROBLEMS;
382
		return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, msg, null);
385
		return new MultiStatus(PlatformUI.PLUGIN_ID, IStatus.OK, errors, msg, null);
383
	}
386
	}
384
387
(-)src/org/eclipse/rse/internal/importexport/files/RemoteExportWizardPage1.java (-16 / +38 lines)
Lines 8-13 Link Here
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *     IBM Corporation - initial API and implementation
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
10
 * Martin Oberhuber (Wind River) - [174945] split importexport icons from rse.ui
11
 * 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
11
 *******************************************************************************/
12
 *******************************************************************************/
12
package org.eclipse.rse.internal.importexport.files;
13
package org.eclipse.rse.internal.importexport.files;
13
14
Lines 29-44 Link Here
29
import org.eclipse.jface.dialogs.IDialogSettings;
30
import org.eclipse.jface.dialogs.IDialogSettings;
30
import org.eclipse.jface.viewers.IStructuredSelection;
31
import org.eclipse.jface.viewers.IStructuredSelection;
31
import org.eclipse.jface.window.Window;
32
import org.eclipse.jface.window.Window;
33
import org.eclipse.osgi.util.NLS;
32
import org.eclipse.rse.core.model.IHost;
34
import org.eclipse.rse.core.model.IHost;
33
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
35
import org.eclipse.rse.files.ui.actions.SystemSelectRemoteFolderAction;
34
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
36
import org.eclipse.rse.internal.importexport.RemoteImportExportPlugin;
35
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
37
import org.eclipse.rse.internal.importexport.RemoteImportExportResources;
36
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
38
import org.eclipse.rse.internal.importexport.RemoteImportExportUtil;
37
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
39
import org.eclipse.rse.internal.importexport.SystemImportExportResources;
40
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
38
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
41
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
39
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
42
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
40
import org.eclipse.rse.ui.ISystemMessages;
41
import org.eclipse.rse.ui.RSEUIPlugin;
42
import org.eclipse.rse.ui.SystemBasePlugin;
43
import org.eclipse.rse.ui.SystemBasePlugin;
43
import org.eclipse.rse.ui.SystemWidgetHelpers;
44
import org.eclipse.rse.ui.SystemWidgetHelpers;
44
import org.eclipse.rse.ui.messages.SystemMessageDialog;
45
import org.eclipse.rse.ui.messages.SystemMessageDialog;
Lines 93-99 Link Here
93
	private static final String STORE_CREATE_DESCRIPTION_FILE_ID = "RemoteExportWizard.STORE_CREATE_DESCRIPTION_FILE_ID"; //$NON-NLS-1$
94
	private static final String STORE_CREATE_DESCRIPTION_FILE_ID = "RemoteExportWizard.STORE_CREATE_DESCRIPTION_FILE_ID"; //$NON-NLS-1$
94
	private static final String STORE_DESCRIPTION_FILE_NAME_ID = "RemoteExportWizard.STORE_DESCRIPTION_FILE_NAME_ID"; //$NON-NLS-1$
95
	private static final String STORE_DESCRIPTION_FILE_NAME_ID = "RemoteExportWizard.STORE_DESCRIPTION_FILE_NAME_ID"; //$NON-NLS-1$
95
	//messages
96
	//messages
96
	private static final SystemMessage DESTINATION_EMPTY_MESSAGE = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DESTINATION_EMPTY); //UniversalSystemPlugin.getString("IFSexport.destinationEmpty"); 
97
	private static final SystemMessage DESTINATION_EMPTY_MESSAGE = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, 
98
			RemoteImportExportResources.FILEMSG_DESTINATION_EMPTY,
99
			RemoteImportExportResources.FILEMSG_DESTINATION_EMPTY_DETAILS);
100
97
101
98
	/**
102
	/**
99
	 *	Create an instance of this class
103
	 *	Create an instance of this class
Lines 271-282 Link Here
271
	 */
275
	 */
272
	protected boolean ensureDirectoryExists(File directory) {
276
	protected boolean ensureDirectoryExists(File directory) {
273
		if (!directory.exists()) {
277
		if (!directory.exists()) {
274
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_TARGET_EXISTS);
278
			
275
			msg.makeSubstitution(directory.getAbsolutePath());
279
			String msgTxt = RemoteImportExportResources.FILEMSG_TARGET_EXISTS;
280
			String msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_TARGET_EXISTS_DETAILS, directory.getAbsolutePath());
281
			
282
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
276
			SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
283
			SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
277
			if (!dlg.openQuestionNoException()) return false;
284
			if (!dlg.openQuestionNoException()) return false;
278
			if (!directory.mkdirs()) {
285
			if (!directory.mkdirs()) {
279
				msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_CREATE_FOLDER_FAILED);
286
				msgTxt = RemoteImportExportResources.FILEMSG_CREATE_FOLDER_FAILED;
287
				msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_CREATE_FOLDER_FAILED_DETAILS, directory.getAbsolutePath());
288
				
289
				msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
280
				msg.makeSubstitution(directory.getAbsolutePath());
290
				msg.makeSubstitution(directory.getAbsolutePath());
281
				setErrorMessage(msg);
291
				setErrorMessage(msg);
282
				giveFocusToDestination();
292
				giveFocusToDestination();
Lines 295-302 Link Here
295
	 */
305
	 */
296
	protected boolean ensureTargetIsValid(File targetDirectory) {
306
	protected boolean ensureTargetIsValid(File targetDirectory) {
297
		if (targetDirectory.exists() && !targetDirectory.isDirectory()) {
307
		if (targetDirectory.exists() && !targetDirectory.isDirectory()) {
298
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_SOURCE_IS_FILE);
308
			String msgTxt = RemoteImportExportResources.FILEMSG_SOURCE_IS_FILE;
299
			msg.makeSubstitution(targetDirectory.getAbsolutePath());
309
			String msgDetails = NLS.bind(RemoteImportExportResources.FILEMSG_SOURCE_IS_FILE_DETAILS, targetDirectory.getAbsolutePath());
310
						
311
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
312
300
			setErrorMessage(msg);
313
			setErrorMessage(msg);
301
			giveFocusToDestination();
314
			giveFocusToDestination();
302
			return false;
315
			return false;
Lines 326-333 Link Here
326
		}
339
		}
327
		IStatus status = op.getStatus();
340
		IStatus status = op.getStatus();
328
		if (!status.isOK()) {
341
		if (!status.isOK()) {
329
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_EXPORT_FAILED);
342
			String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_EXPORT_FAILED, status);
330
			msg.makeSubstitution(status);
343
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt);
331
			SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
344
			SystemMessageDialog dlg = new SystemMessageDialog(getContainer().getShell(), msg);
332
			dlg.openWithDetails();
345
			dlg.openWithDetails();
333
			return false;
346
			return false;
Lines 368-374 Link Here
368
				ret = executeExportOperation(new RemoteFileExportOperation(data, this));
381
				ret = executeExportOperation(new RemoteFileExportOperation(data, this));
369
				return ret;
382
				return ret;
370
			}
383
			}
371
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_EXPORT_NONE_SELECTED);
384
			
385
			String msgTxt = RemoteImportExportResources.FILEMSG_EXPORT_NONE_SELECTED;
386
			String msgDetails = RemoteImportExportResources.FILEMSG_EXPORT_NONE_SELECTED_DETAILS;
387
			
388
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
372
			setErrorMessage(msg);
389
			setErrorMessage(msg);
373
			return false;
390
			return false;
374
		}
391
		}
Lines 508-514 Link Here
508
	protected boolean isDestinationFolder() {
525
	protected boolean isDestinationFolder() {
509
		boolean ret = destinationFolder != null;
526
		boolean ret = destinationFolder != null;
510
		if (!ret) {
527
		if (!ret) {
511
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION);
528
			String msgTxt = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION;
529
			String msgDetails = RemoteImportExportResources.MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS;
530
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
512
			SystemMessageDialog.show(getShell(), msg);
531
			SystemMessageDialog.show(getShell(), msg);
513
		}
532
		}
514
		return ret;
533
		return ret;
Lines 637-644 Link Here
637
		}
656
		}
638
		String conflictingContainer = getConflictingContainerNameFor(destinationValue);
657
		String conflictingContainer = getConflictingContainerNameFor(destinationValue);
639
		if (conflictingContainer != null) {
658
		if (conflictingContainer != null) {
640
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_DESTINATION_CONFLICTING);
659
			String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_DESTINATION_CONFLICTING, conflictingContainer);
641
			msg.makeSubstitution(conflictingContainer);
660
			String msgDetails = RemoteImportExportResources.FILEMSG_DESTINATION_CONFLICTING_DETAILS;
661
			
662
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, msgDetails);
642
			setErrorMessage(msg);
663
			setErrorMessage(msg);
643
			giveFocusToDestination();
664
			giveFocusToDestination();
644
			return false;
665
			return false;
Lines 836-843 Link Here
836
		if (msgLine != null)
857
		if (msgLine != null)
837
			msgLine.setErrorMessage(exc);
858
			msgLine.setErrorMessage(exc);
838
		else {
859
		else {
839
			SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_ERROR_UNEXPECTED);
860
			String msgTxt = RemoteImportExportResources.MSG_ERROR_UNEXPECTED;			
840
			msg.makeSubstitution(exc);
861
			SystemMessage msg = new SimpleSystemMessage(RemoteImportExportPlugin.PLUGIN_ID, IStatus.ERROR, msgTxt, exc);
862
841
			pendingErrorMessage = msg;
863
			pendingErrorMessage = msg;
842
			super.setErrorMessage(msg.getLevelOneText());
864
			super.setErrorMessage(msg.getLevelOneText());
843
		}
865
		}
(-)src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.java (-1 / +48 lines)
Lines 6-12 Link Here
6
 * http://www.eclipse.org/legal/epl-v10.html
6
 * http://www.eclipse.org/legal/epl-v10.html
7
 * 
7
 * 
8
 * Contributors:
8
 * Contributors:
9
 *     IBM Corporation - initial API and implementation
9
 *  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
10
 *******************************************************************************/
10
 *******************************************************************************/
11
package org.eclipse.rse.internal.importexport;
11
package org.eclipse.rse.internal.importexport;
12
12
Lines 30-35 Link Here
30
	public static String WizardDataTransfer_overwriteNameAndPathQuestion;
30
	public static String WizardDataTransfer_overwriteNameAndPathQuestion;
31
	public static String WizardDataTransfer_exceptionMessage;
31
	public static String WizardDataTransfer_exceptionMessage;
32
	public static String Question;
32
	public static String Question;
33
	
34
	
35
	public static  String FILEMSG_COPY_ROOT;
36
	public static  String FILEMSG_COPY_ROOT_DETAILS;
37
	
38
	public static  String FILEMSG_IMPORT_ERROR;
39
	public static  String FILEMSG_IMPORT_PROBLEMS;
40
	public static  String FILEMSG_IMPORT_SELF;
41
	public static  String FILEMSG_IMPORT_SELF_DETAILS;
42
	public static  String FILEMSG_EXPORT_ERROR;
43
	public static  String FILEMSG_EXPORT_PROBLEMS;
44
	public static  String FILEMSG_NOT_WRITABLE;
45
	public static  String FILEMSG_NOT_WRITABLE_DETAILS;
46
		
47
	public static  String FILEMSG_TARGET_EXISTS;
48
	public static  String FILEMSG_TARGET_EXISTS_DETAILS;
49
	public static  String FILEMSG_FOLDER_IS_FILE;
50
	public static  String FILEMSG_FOLDER_IS_FILE_DETAILS;
51
	public static  String FILEMSG_DESTINATION_CONFLICTING;
52
	public static  String FILEMSG_DESTINATION_CONFLICTING_DETAILS;
53
	public static  String FILEMSG_SOURCE_IS_FILE;
54
	public static  String FILEMSG_SOURCE_IS_FILE_DETAILS;
55
	public static  String FILEMSG_SOURCE_EMPTY;
56
	public static  String FILEMSG_SOURCE_EMPTY_DETAILS;
57
	public static  String FILEMSG_EXPORT_FAILED;
58
	public static  String FILEMSG_EXPORT_NONE_SELECTED;
59
	public static  String FILEMSG_EXPORT_NONE_SELECTED_DETAILS;
60
	public static  String FILEMSG_DESTINATION_EMPTY;
61
	public static  String FILEMSG_DESTINATION_EMPTY_DETAILS;
62
	public static  String FILEMSG_IMPORT_FAILED;
63
	public static  String FILEMSG_IMPORT_NONE_SELECTED;
64
	public static  String FILEMSG_IMPORT_NONE_SELECTED_DETAILS;
65
	public static  String FILEMSG_IMPORT_FILTERING;
66
	
67
    public static String FILEMSG_CREATE_FOLDER_FAILED;
68
    public static String FILEMSG_CREATE_FOLDER_FAILED_DETAILS;
69
    
70
	// file import/export messages
71
	public static String MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION;
72
	public static String MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION;
73
	public static String MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS;
74
	public static String MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION_DETAILS;
75
76
	// Unexpected error message
77
	public static String MSG_ERROR_UNEXPECTED;
78
    
79
	
33
	static {
80
	static {
34
		// load message values from bundle file
81
		// load message values from bundle file
35
		NLS.initializeMessages(BUNDLE_NAME, RemoteImportExportResources.class);
82
		NLS.initializeMessages(BUNDLE_NAME, RemoteImportExportResources.class);
(-)src/org/eclipse/rse/internal/importexport/RemoteImportExportResources.properties (-1 / +57 lines)
Lines 6-12 Link Here
6
# http://www.eclipse.org/legal/epl-v10.html
6
# http://www.eclipse.org/legal/epl-v10.html
7
# 
7
# 
8
# Contributors:
8
# Contributors:
9
#     IBM Corporation - initial API and implementation
9
#  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
10
###############################################################################
10
###############################################################################
11
11
12
# NLS_MESSAGEFORMAT_VAR
12
# NLS_MESSAGEFORMAT_VAR
Lines 37-39 Link Here
37
WizardDataTransfer_overwriteNameAndPathQuestion = Overwrite ''{0}'' in folder ''{1}''?
37
WizardDataTransfer_overwriteNameAndPathQuestion = Overwrite ''{0}'' in folder ''{1}''?
38
WizardDataTransfer_exceptionMessage =  Error occurred during operation: {0}
38
WizardDataTransfer_exceptionMessage =  Error occurred during operation: {0}
39
Question = Question
39
Question = Question
40
41
42
FILEMSG_COPY_ROOT = Can not copy root file system
43
FILEMSG_COPY_ROOT_DETAILS=The root is not something that can be copied
44
45
FILEMSG_IMPORT_ERROR = Unable to import {0}: {1}
46
FILEMSG_IMPORT_PROBLEMS = Problems were encountered during import
47
48
FILEMSG_IMPORT_SELF = Unable to import {0}
49
FILEMSG_IMPORT_SELF_DETAILS=The file cannot be copied onto itself
50
FILEMSG_EXPORT_ERROR = Error occurred while exporting {0}: {1}
51
FILEMSG_EXPORT_PROBLEMS = Problems were encountered during export
52
FILEMSG_NOT_WRITABLE = Cannot overwrite file {0}
53
FILEMSG_NOT_WRITABLE_DETAILS =	The file does not have its write attribute set, so it cannot be written to	
54
		
55
FILEMSG_TARGET_EXISTS = Target folder does not exist. Would you like to create it?
56
FILEMSG_TARGET_EXISTS_DETAILS =Press Yes to create the folder {0}, No to cancel
57
58
FILEMSG_FOLDER_IS_FILE =Target folder already exists, as a file
59
FILEMSG_FOLDER_IS_FILE_DETAILS=The remote resource {0} already exists, but as a file, not a folder
60
61
FILEMSG_DESTINATION_CONFLICTING = Destination folder conflicts with location of {0}
62
FILEMSG_DESTINATION_CONFLICTING_DETAILS =You are attempting to export to the local file system, to a location that overlaps the resources being exported. 
63
64
FILEMSG_SOURCE_IS_FILE = Source is a file, not a folder
65
FILEMSG_SOURCE_IS_FILE_DETAILS=The remote resource {0} is a file, but a folder is required<
66
67
FILEMSG_SOURCE_EMPTY = Enter or select a source folder
68
FILEMSG_SOURCE_EMPTY_DETAILS =You have left the source folder empty, but it must be set to continue. 
69
70
FILEMSG_EXPORT_FAILED =Export problems
71
FILEMSG_EXPORT_NONE_SELECTED = There are no resources currently selected for export
72
FILEMSG_EXPORT_NONE_SELECTED_DETAILS =Select resources to be exported and try again
73
74
FILEMSG_DESTINATION_EMPTY = Please enter a destination folder
75
FILEMSG_DESTINATION_EMPTY_DETAILS = The destination folder is empty. You must select a destination folder.
76
77
FILEMSG_IMPORT_FAILED = Import problems
78
FILEMSG_IMPORT_NONE_SELECTED = There are no resources currently selected for import
79
FILEMSG_IMPORT_NONE_SELECTED_DETAILS = Select resources to be imported and try again
80
81
FILEMSG_IMPORT_FILTERING = Filtering selection...;
82
83
FILEMSG_CREATE_FOLDER_FAILED  = Creation of the folder failed
84
FILEMSG_CREATE_FOLDER_FAILED_DETAILS = The folder {0} could not be created because of one of the following reasons:
85
                        - the user does not have enough authority to create the folder
86
                        - the folder name is not valid
87
88
89
MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION = Unable to use connection.
90
MSG_IMPORT_EXPORT_UNABLE_TO_USE_CONNECTION_DETAILS = Please correct, or select alternate connection.
91
92
MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION =Unexpected exception received: {0}.
93
MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION_DETAILS =Please see error log for details. 
94
	
95
MSG_ERROR_UNEXPECTED = An unexpected error occurred.
(-)src/org/eclipse/rse/services/files/RemoteFileIOException.java (-6 / +3 lines)
Lines 12-23 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.services.files;
18
package org.eclipse.rse.services.files;
19
19
20
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
21
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
20
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
22
21
23
/**
22
/**
Lines 62-71 Link Here
62
	private static SystemMessage getMyMessage() {
61
	private static SystemMessage getMyMessage() {
63
        String l1 = "Operation failed. File system input or output error"; //$NON-NLS-1$
62
        String l1 = "Operation failed. File system input or output error"; //$NON-NLS-1$
64
        String l2 = "Message reported from file system: %1"; //$NON-NLS-1$
63
        String l2 = "Message reported from file system: %1"; //$NON-NLS-1$
65
		try {
64
		myMessage = new SystemMessage("RSE", "F", "1002", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
66
			myMessage = new SystemMessage("RSE", "F", "1002", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
65
67
		} catch (IndicatorException e) {
68
		}
69
		return myMessage;
66
		return myMessage;
70
	}
67
	}
71
68
(-)src/org/eclipse/rse/services/files/RemoteFolderNotEmptyException.java (-6 / +3 lines)
Lines 12-23 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.services.files;
18
package org.eclipse.rse.services.files;
19
19
20
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
21
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
20
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
22
21
23
/**
22
/**
Lines 61-70 Link Here
61
		if (myMessage == null) {
60
		if (myMessage == null) {
62
			String l1 = "Folder is not empty. Cannot delete"; //$NON-NLS-1$
61
			String l1 = "Folder is not empty. Cannot delete"; //$NON-NLS-1$
63
			String l2 = "The operation failed. One possible reason is that the folder is not empty"; //$NON-NLS-1$
62
			String l2 = "The operation failed. One possible reason is that the folder is not empty"; //$NON-NLS-1$
64
			try {
63
			myMessage = new SystemMessage("RSE", "F", "1003", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
65
				myMessage = new SystemMessage("RSE", "F", "1003", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
64
66
			} catch (IndicatorException e) {
67
			}
68
		}
65
		}
69
		return myMessage;
66
		return myMessage;
70
	}
67
	}
(-)src/org/eclipse/rse/services/files/RemoteFileSecurityException.java (-6 / +3 lines)
Lines 12-23 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.services.files;
18
package org.eclipse.rse.services.files;
19
19
20
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
21
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
20
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
22
21
23
/**
22
/**
Lines 61-70 Link Here
61
		if (myMessage == null) {
60
		if (myMessage == null) {
62
			String l1 = "Operation failed. Security violation"; //$NON-NLS-1$
61
			String l1 = "Operation failed. Security violation"; //$NON-NLS-1$
63
			String l2 = "Message reported from file system: %1"; //$NON-NLS-1$
62
			String l2 = "Message reported from file system: %1"; //$NON-NLS-1$
64
			try {
63
			myMessage = new SystemMessage("RSE", "F", "1001", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
65
				myMessage = new SystemMessage("RSE", "F", "1001", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
64
66
			} catch (IndicatorException e) {
67
			}
68
		}
65
		}
69
		return myMessage;
66
		return myMessage;
70
	}
67
	}
(-)src/org/eclipse/rse/services/files/RemoteFileCancelledException.java (-5 / +3 lines)
Lines 13-23 Link Here
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
15
 * Martin Oberhuber (Wind River) - [216351] Improve cancellation of SystemFetchOperation for files
16
 * 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
16
 *******************************************************************************/
17
 *******************************************************************************/
17
18
18
package org.eclipse.rse.services.files;
19
package org.eclipse.rse.services.files;
19
20
20
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
21
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
21
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
22
22
23
/**
23
/**
Lines 53-62 Link Here
53
	private static SystemMessage getMyMessage() {
53
	private static SystemMessage getMyMessage() {
54
		String l1 = "Operation cancelled."; //$NON-NLS-1$
54
		String l1 = "Operation cancelled."; //$NON-NLS-1$
55
		String l2 = ""; //$NON-NLS-1$
55
		String l2 = ""; //$NON-NLS-1$
56
		try {
56
		myMessage = new SystemMessage("RSE", "G", "1067", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
57
			myMessage = new SystemMessage("RSE", "G", "1067", SystemMessage.ERROR, l1, l2); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
57
58
		} catch (IndicatorException e) {
59
		}
60
		return myMessage;
58
		return myMessage;
61
	}
59
	}
62
60
(-)clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessageException.java (-10 / +1 lines)
Lines 11-17 Link Here
11
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
11
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * {Name} (company) - description of contribution.
14
 * 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
15
 ********************************************************************************/
15
 ********************************************************************************/
16
16
17
package org.eclipse.rse.services.clientserver.messages;
17
package org.eclipse.rse.services.clientserver.messages;
Lines 56-70 Link Here
56
    	return msg;
56
    	return msg;
57
    }
57
    }
58
    
58
    
59
    /**
60
     * Tests if the SystemMessage encapsulated by this exception has a long id equal to the
61
     * argument.
62
     * @param longMessageID the String containing the message id to test.
63
     * @return true if the long message id of the message is equal to the supplied message id.
64
     */
65
    public boolean hasLongID(String longMessageID) {
66
    	return getSystemMessage().hasLongID(longMessageID);
67
    }
68
    
59
    
69
    /**
60
    /**
70
     * Set the SystemMessage being wrapped
61
     * Set the SystemMessage being wrapped
(-)clientserver/org/eclipse/rse/services/clientserver/messages/SystemMessage.java (-56 / +28 lines)
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * David McKnight   (IBM)        - [216252] SystemMessages using RSEStatus
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.services.clientserver.messages;
18
package org.eclipse.rse.services.clientserver.messages;
Lines 51-56 Link Here
51
	 * Unexpected message indicator (same as warning but will log exception & stack in message log)
51
	 * Unexpected message indicator (same as warning but will log exception & stack in message log)
52
	 */
52
	 */
53
	public static final char UNEXPECTED = 'U';
53
	public static final char UNEXPECTED = 'U';
54
	
55
56
	
54
57
55
	// Private variables
58
	// Private variables
56
	private char subPrefix = '%';
59
	private char subPrefix = '%';
Lines 58-64 Link Here
58
	private String level1NS, level2NS; // level 1 & 2 with NO substitution made
61
	private String level1NS, level2NS; // level 1 & 2 with NO substitution made
59
	private String level1WS, level2WS; // level 1 & 2 with substitutions made.
62
	private String level1WS, level2WS; // level 1 & 2 with substitutions made.
60
	private String component, subComponent;
63
	private String component, subComponent;
61
	private String messageNumber;
64
	
65
	
66
	private String messageNumber;	
67
	
62
	private int numSubs = -1;
68
	private int numSubs = -1;
63
	private Object[] subs = null;
69
	private Object[] subs = null;
64
70
Lines 73-92 Link Here
73
	 * @param number a string that gives the 4 digit message number
79
	 * @param number a string that gives the 4 digit message number
74
	 * @param l1 Level 1 text that describes the error
80
	 * @param l1 Level 1 text that describes the error
75
	 * @param l2 Level 2 text that describes any recovery actions or further details
81
	 * @param l2 Level 2 text that describes any recovery actions or further details
76
	 * @throws IndicatorException if a message is attempted to be constructed with an invalid indicator. 
77
	 */
82
	 */
78
	public SystemMessage(String comp, String sub, String number, char ind, String l1, String l2) throws IndicatorException {
83
	public SystemMessage(String comp, String sub, String number, char ind, String l1, String l2) {
79
		component = comp.toUpperCase();
84
		component = comp.toUpperCase();
80
		subComponent = sub.toUpperCase();
85
		subComponent = sub.toUpperCase();
81
		messageNumber = number.toUpperCase();
86
		messageNumber = number.toUpperCase();
82
		setIndicator(ind);
87
		try {
83
		level1NS = l1.trim();
88
			setIndicator(ind);
84
		level2NS = l2.trim();
89
		}
85
		level1WS = l1.trim();
90
		catch (IndicatorException e)
86
		level2WS = l2.trim();
91
		{
87
92
			indicator = UNEXPECTED;
93
		}
94
		if (l1 != null){
95
			level1NS = l1.trim();
96
			level1WS = l1.trim();
97
		}
98
		if (l2 != null){
99
			level2NS = l2.trim();
100
			level2WS = l2.trim();
101
		}
88
	}
102
	}
103
	
89
104
105
	
90
	/**
106
	/**
91
	 * Use this method to override the default indicator of the message
107
	 * Use this method to override the default indicator of the message
92
	 * @param ind the new indicator. See constants for values.
108
	 * @param ind the new indicator. See constants for values.
Lines 122-140 Link Here
122
		return messageNumber;
138
		return messageNumber;
123
	}
139
	}
124
140
125
	/**
126
	 * @return the component of this message.
127
	 */
128
	public String getComponent() {
129
		return component;
130
	}
131
132
	/**
133
	 * @return the subcomponent of this message.
134
	 */
135
	public String getSubComponent() {
136
		return subComponent;
137
	}
138
141
139
	/**
142
	/**
140
	 * Use this method to retrieve the unique number of substitution variables 
143
	 * Use this method to retrieve the unique number of substitution variables 
Lines 190-223 Link Here
190
		return component + subComponent + messageNumber + indicator;
193
		return component + subComponent + messageNumber + indicator;
191
	}
194
	}
192
195
193
	/**
194
	 * Use this method to retrieve 'long' message ID format:
195
	 * 		Component + SubComponent + Number.
196
	 * The long message ID is used for retrieving messages from a message file.
197
	 * @return String - the long message ID 
198
	 **/
199
	public String getLongMessageID() {
200
		return component + subComponent + messageNumber;
201
	}
202
203
	/**
204
	 * Use this method to retrieve 'standard' message ID format:
205
	 * 		Component + Number
206
	 * @return String - the full message ID 
207
	 **/
208
	public String getMessageID() {
209
		return component + messageNumber;
210
	}
211
212
	/**
213
	 * Tests if this message has a long id equal to the one supplied in the argument.
214
	 * @param messageId the long message id to compare against.
215
	 * @return a boolean indicating if the message ids are equal.
216
	 */
217
	public boolean hasLongID(String messageId) {
218
		return getLongMessageID().equals(messageId);
219
	}
220
196
197
	
221
	/**
198
	/**
222
	 * Use this method to set substitution value %1.
199
	 * Use this method to set substitution value %1.
223
	 * <br>Generally toString() is used on the substitution objects, but there is 
200
	 * <br>Generally toString() is used on the substitution objects, but there is 
Lines 481-491 Link Here
481
	 */
458
	 */
482
	protected Object clone() throws CloneNotSupportedException {
459
	protected Object clone() throws CloneNotSupportedException {
483
		
460
		
484
		try {
461
		return new SystemMessage(component, subComponent, messageNumber, indicator, level1NS, level2NS);
485
			return new SystemMessage(component, subComponent, messageNumber, indicator, level1NS, level2NS);
486
		}
487
		catch (IndicatorException e) {
488
			return null;
489
		}
490
	}
462
	}
491
}
463
}
(-)clientserver/org/eclipse/rse/services/clientserver/messages/SimpleSystemMessage.java (+107 lines)
Added Link Here
1
/********************************************************************************
2
 * Copyright (c) 2008 IBM Corporation. All rights reserved.
3
 * This program and the accompanying materials are made available under the terms
4
 * of the Eclipse Public License v1.0 which accompanies this distribution, and is 
5
 * available at http://www.eclipse.org/legal/epl-v10.html
6
 * 
7
 * Initial Contributors:
8
 * The following IBM employees contributed to the Remote System Explorer
9
 * component that contains this file: David McKnight.
10
 * 
11
 * Contributors:
12
 * 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
13
 ********************************************************************************/
14
package org.eclipse.rse.services.clientserver.messages;
15
16
import java.io.PrintWriter;
17
import java.io.StringWriter;
18
19
import org.eclipse.core.runtime.IStatus;
20
21
public class SimpleSystemMessage extends SystemMessage {
22
23
	/**
24
	 * alternative to message number for ids?
25
	 */
26
	private String _pluginId;
27
	
28
	/**
29
	 * Constructor for messages that use explicit strings and severities rather than
30
	 * parsing a message file.  This is part of the work to migrate away from the message
31
	 * file stuff.
32
	 * 
33
	 * @param pluginId the id of the originating plugin
34
	 * @param severity using IStatus severities
35
	 * @param msg the message text
36
	 */
37
	public SimpleSystemMessage(String pluginId, int severity, String msg) {
38
		this(pluginId, severity, msg, (String)null);
39
	}
40
	
41
	/**
42
	 * Constructor for messages that use explicit strings and severities rather than
43
	 * parsing a message file.  This is part of the work to migrate away from the message
44
	 * file stuff.
45
	 * 
46
	 * @param pluginId the id of the originating plugin
47
	 * @param severity using IStatus severities
48
	 * @param msg the message text
49
	 * @param msgDetails the message details
50
	 */
51
	public SimpleSystemMessage(String pluginId, int severity, String msg, String msgDetails) {
52
		super("RSE", "G", "-", severityToIndicator(severity), msg, msgDetails);  //$NON-NLS-1$ //$NON-NLS-2$//$NON-NLS-3$
53
	
54
		_pluginId = pluginId;
55
	}
56
		
57
	/**
58
	 * Constructor for messages that use explicit strings and severities rather than
59
	 * parsing a message file.  This is part of the work to migrate away from the message
60
	 * file stuff.
61
	 * 
62
	 * @param pluginId the id of the originating plugin
63
	 * @param severity using IStatus severities
64
	 * @param msg the message text
65
	 * @param e an exception to convert into details
66
	 */
67
	public SimpleSystemMessage(String pluginId, int severity, String msg, Throwable e) {
68
		super("RSE", "G", "-", severityToIndicator(severity), msg, throwableToDetails(e)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
69
		_pluginId = pluginId;
70
71
	}
72
	
73
	private static String throwableToDetails(Throwable e){	
74
		// transform exception stack into a string
75
		StringWriter excWriter = new StringWriter();
76
		e.printStackTrace(new PrintWriter(excWriter));
77
		String dmsg = e.toString();
78
		if ((dmsg == null) || (e instanceof ClassCastException)) dmsg = e.getClass().getName();
79
		String msgDetails = dmsg + "\n" + excWriter.toString(); //$NON-NLS-1$  
80
		return msgDetails;
81
	}
82
	
83
	private static char severityToIndicator(int severity){
84
		char ind = COMPLETION;
85
		if ((severity & IStatus.CANCEL) != 0){
86
			ind = UNEXPECTED;
87
		}
88
		else if ((severity & IStatus.ERROR) != 0){
89
			ind = ERROR;
90
		}
91
		else if ((severity & IStatus.INFO) != 0){
92
			ind = INFORMATION;
93
		}
94
		else if ((severity & IStatus.OK) != 0){
95
			ind = COMPLETION;
96
		}
97
		else if ((severity & IStatus.WARNING) != 0){
98
			ind = WARNING;
99
		}
100
		return ind;
101
	}
102
103
	public String getFullMessageID() {
104
		return _pluginId + ":" + getIndicator();
105
	}
106
	
107
}
(-)UI/org/eclipse/rse/ui/messages/SystemMessageDialog.java (-1 / +22 lines)
Lines 16-21 Link Here
16
 * Martin Oberhuber (Wind River) - [187115] force SystemMessageDialog always into Display thread
16
 * Martin Oberhuber (Wind River) - [187115] force SystemMessageDialog always into Display thread
17
 * Martin Oberhuber (Wind River) - [189272] exception when canceling ssh connect
17
 * Martin Oberhuber (Wind River) - [189272] exception when canceling ssh connect
18
 * David McKnight   (IBM)        - [216596] determine whether to show yes/no or just okay
18
 * David McKnight   (IBM)        - [216596] determine whether to show yes/no or just okay
19
 * 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
19
 *******************************************************************************/
20
 *******************************************************************************/
20
21
21
package org.eclipse.rse.ui.messages;
22
package org.eclipse.rse.ui.messages;
Lines 30-37 Link Here
30
import org.eclipse.jface.dialogs.IDialogConstants;
31
import org.eclipse.jface.dialogs.IDialogConstants;
31
import org.eclipse.jface.preference.IPreferenceStore;
32
import org.eclipse.jface.preference.IPreferenceStore;
32
import org.eclipse.jface.window.Window;
33
import org.eclipse.jface.window.Window;
34
import org.eclipse.rse.internal.ui.GenericMessages;
33
import org.eclipse.rse.internal.ui.SystemResources;
35
import org.eclipse.rse.internal.ui.SystemResources;
34
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
36
import org.eclipse.rse.services.clientserver.messages.IndicatorException;
37
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
35
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
38
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
36
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
39
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
37
import org.eclipse.rse.ui.ISystemMessages;
40
import org.eclipse.rse.ui.ISystemMessages;
Lines 168-174 Link Here
168
	public SystemMessageDialog(Shell parentShell, SystemMessage message) 
171
	public SystemMessageDialog(Shell parentShell, SystemMessage message) 
169
	{
172
	{
170
		this(parentShell,
173
		this(parentShell,
171
			message.getFullMessageID(),
174
			(message instanceof SimpleSystemMessage) ?  getStatusTitle(message) : message.getFullMessageID(),
172
			message.getLevelOneText(),
175
			message.getLevelOneText(),
173
			(new MultiStatus(SystemBasePlugin.getBaseDefault().getSymbolicName(), IStatus.OK, "", new Exception(""))), //$NON-NLS-1$ //$NON-NLS-2$
176
			(new MultiStatus(SystemBasePlugin.getBaseDefault().getSymbolicName(), IStatus.OK, "", new Exception(""))), //$NON-NLS-1$ //$NON-NLS-2$
174
			 		0xFFFFF);
177
			 		0xFFFFF);
Lines 187-192 Link Here
187
		this.displayMask = displayMask;
190
		this.displayMask = displayMask;
188
		setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
191
		setShellStyle(SWT.DIALOG_TRIM | SWT.RESIZE | SWT.APPLICATION_MODAL);
189
	}
192
	}
193
	
194
	private static String getStatusTitle(SystemMessage message) {
195
		String title = null;
196
		// setup image
197
		if (message.getIndicator()==SystemMessage.INFORMATION ||
198
				message.getIndicator()==SystemMessage.COMPLETION)
199
			title = GenericMessages.Information;
200
		else if (message.getIndicator()==SystemMessage.INQUIRY)
201
			//imageName=DLG_IMG_QUESTION;
202
		    title = GenericMessages.Question;
203
		else if (message.getIndicator()==SystemMessage.ERROR ||
204
				 message.getIndicator()==SystemMessage.UNEXPECTED)
205
			title = GenericMessages.Error;
206
		else if (message.getIndicator()==SystemMessage.WARNING)
207
			title = GenericMessages.Warning;
208
		return title;
209
	}
210
	
190
211
191
    private void initImage(SystemMessage message)
212
    private void initImage(SystemMessage message)
192
    {
213
    {
(-)UI/org/eclipse/rse/internal/ui/GenericMessages.java (-1 / +7 lines)
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.internal.ui;
18
package org.eclipse.rse.internal.ui;
Lines 68-73 Link Here
68
	public static String FilteredPreferenceDialog_PreferenceSaveFailed;
68
	public static String FilteredPreferenceDialog_PreferenceSaveFailed;
69
	
69
	
70
	public static String RSEQuery_task;
70
	public static String RSEQuery_task;
71
	
72
	public static String Error;
73
	public static String Question;
74
	public static String Warning;
75
	public static String Information;
76
	
71
		
77
		
72
	static {
78
	static {
73
		// load message values from bundle file
79
		// load message values from bundle file
(-)UI/org/eclipse/rse/internal/ui/GenericMessages.properties (-1 / +6 lines)
Lines 12-18 Link Here
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
# 
13
# 
14
# Contributors:
14
# Contributors:
15
# {Name} (company) - description of contribution.
15
# 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
16
###############################################################################
16
###############################################################################
17
17
18
# NLS_MESSAGEFORMAT_VAR
18
# NLS_MESSAGEFORMAT_VAR
Lines 60-62 Link Here
60
PropertyDialog_propertyMessage = Properties for {0}
60
PropertyDialog_propertyMessage = Properties for {0}
61
61
62
RSEQuery_task = RSE Query
62
RSEQuery_task = RSE Query
63
64
Error=Error
65
Question=Question
66
Warning=Warning
67
Information=Information
(-)src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.java (-1 / +8 lines)
Lines 12-18 Link Here
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
 * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * 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
16
 *******************************************************************************/
16
 *******************************************************************************/
17
17
18
package org.eclipse.rse.internal.processes.ui;
18
package org.eclipse.rse.internal.processes.ui;
Lines 84-89 Link Here
84
	public static String	RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL;
84
	public static String	RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL;
85
	public static String	RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP;
85
	public static String	RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP;
86
	
86
	
87
	public static String MSG_OPERATION_FAILED;
88
	public static String MSG_OPERATION_CANCELLED;
89
	public static String MSG_EXPAND_FAILED;
90
	
91
	public static String MSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE;
92
93
	
87
	static {
94
	static {
88
		// load message values from bundle file
95
		// load message values from bundle file
89
		NLS.initializeMessages(BUNDLE_NAME, SystemProcessesResources.class);
96
		NLS.initializeMessages(BUNDLE_NAME, SystemProcessesResources.class);
(-)src/org/eclipse/rse/internal/processes/ui/ProcessesPlugin.java (+4 lines)
Lines 12-17 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [180519][api] declaratively register rse.processes.ui adapter factories
14
 * Martin Oberhuber (Wind River) - [180519][api] declaratively register rse.processes.ui adapter factories
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.internal.processes.ui;
18
package org.eclipse.rse.internal.processes.ui;
Lines 31-36 Link Here
31
 * The main plugin class to be used in the desktop.
32
 * The main plugin class to be used in the desktop.
32
 */
33
 */
33
public class ProcessesPlugin extends SystemBasePlugin {
34
public class ProcessesPlugin extends SystemBasePlugin {
35
36
	public static final String PLUGIN_ID = "org.eclipse.rse.processes.ui";
37
	
34
	//The shared instance.
38
	//The shared instance.
35
	private static ProcessesPlugin plugin;
39
	private static ProcessesPlugin plugin;
36
	//Resource bundle.
40
	//Resource bundle.
(-)src/org/eclipse/rse/internal/processes/ui/SystemProcessesResources.properties (-1 / +9 lines)
Lines 12-18 Link Here
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
12
# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
13
# 
13
# 
14
# Contributors:
14
# Contributors:
15
# {Name} (company) - description of contribution.
15
# 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
16
###############################################################################
16
###############################################################################
17
17
18
# NLS_MESSAGEFORMAT_VAR
18
# NLS_MESSAGEFORMAT_VAR
Lines 80-82 Link Here
80
#=============================================================
80
#=============================================================
81
RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL=Executable
81
RESID_REMOTE_PROCESSES_EXECUTABLE_LABEL=Executable
82
RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP=Name of executable
82
RESID_REMOTE_PROCESSES_EXECUTABLE_TOOLTIP=Name of executable
83
84
# generic messages
85
MSG_OPERATION_FAILED      = Operation failed with exception '{0}'
86
MSG_OPERATION_CANCELLED   = Operation canceled.
87
MSG_EXPAND_FAILED    = Expand failed. Try again
88
89
MSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE= Filter string '{0}' already exists in this filter
90
(-)src/org/eclipse/rse/processes/ui/SystemProcessFilterStringEditPane.java (-3 / +6 lines)
Lines 12-35 Link Here
12
 * 
12
 * 
13
 * Contributors:
13
 * Contributors:
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
14
 * Martin Oberhuber (Wind River) - [168870] refactor org.eclipse.rse.core package of the UI plugin
15
 * 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
15
 ********************************************************************************/
16
 ********************************************************************************/
16
17
17
package org.eclipse.rse.processes.ui;
18
package org.eclipse.rse.processes.ui;
18
19
20
import org.eclipse.core.runtime.IStatus;
19
import org.eclipse.jface.viewers.CheckboxTableViewer;
21
import org.eclipse.jface.viewers.CheckboxTableViewer;
20
import org.eclipse.jface.viewers.IStructuredContentProvider;
22
import org.eclipse.jface.viewers.IStructuredContentProvider;
21
import org.eclipse.jface.viewers.LabelProvider;
23
import org.eclipse.jface.viewers.LabelProvider;
24
import org.eclipse.osgi.util.NLS;
22
import org.eclipse.rse.core.subsystems.ISubSystem;
25
import org.eclipse.rse.core.subsystems.ISubSystem;
23
import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
26
import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
24
import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
27
import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
25
import org.eclipse.rse.internal.processes.ui.view.SystemProcessStatesContentProvider;
28
import org.eclipse.rse.internal.processes.ui.view.SystemProcessStatesContentProvider;
26
import org.eclipse.rse.internal.ui.SystemResources;
29
import org.eclipse.rse.internal.ui.SystemResources;
30
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
27
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
31
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
28
import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
32
import org.eclipse.rse.services.clientserver.processes.HostProcessFilterImpl;
29
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
33
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
30
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
34
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystemConfiguration;
31
import org.eclipse.rse.ui.ISystemMessages;
32
import org.eclipse.rse.ui.RSEUIPlugin;
33
import org.eclipse.rse.ui.SystemBasePlugin;
35
import org.eclipse.rse.ui.SystemBasePlugin;
34
import org.eclipse.rse.ui.SystemWidgetHelpers;
36
import org.eclipse.rse.ui.SystemWidgetHelpers;
35
import org.eclipse.rse.ui.actions.SystemTestFilterStringAction;
37
import org.eclipse.rse.ui.actions.SystemTestFilterStringAction;
Lines 495-501 Link Here
495
			  notUnique = true;
497
			  notUnique = true;
496
			if (notUnique)
498
			if (notUnique)
497
			{
499
			{
498
			  errorMessage = RSEUIPlugin.getPluginMessage(ISystemMessages.FILEMSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE).makeSubstitution(currFilterString);
500
				
501
			  errorMessage = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID, IStatus.ERROR, NLS.bind(SystemProcessesResources.MSG_VALIDATE_FILEFILTERSTRING_NOTUNIQUE, currFilterString));
499
			}
502
			}
500
			controlInError = txtExeName;
503
			controlInError = txtExeName;
501
		}
504
		}
(-)src/org/eclipse/rse/internal/processes/ui/view/SystemViewRemoteProcessAdapter.java (-2 / +7 lines)
Lines 15-20 Link Here
15
 * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
15
 * Martin Oberhuber (Wind River) - [182454] improve getAbsoluteName() documentation
16
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
16
 * Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
17
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
18
 * 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
18
 ********************************************************************************/
19
 ********************************************************************************/
19
20
20
package org.eclipse.rse.internal.processes.ui.view;
21
package org.eclipse.rse.internal.processes.ui.view;
Lines 22-27 Link Here
22
23
23
import org.eclipse.core.runtime.IAdaptable;
24
import org.eclipse.core.runtime.IAdaptable;
24
import org.eclipse.core.runtime.IProgressMonitor;
25
import org.eclipse.core.runtime.IProgressMonitor;
26
import org.eclipse.core.runtime.IStatus;
25
import org.eclipse.jface.resource.ImageDescriptor;
27
import org.eclipse.jface.resource.ImageDescriptor;
26
import org.eclipse.jface.viewers.IStructuredSelection;
28
import org.eclipse.jface.viewers.IStructuredSelection;
27
import org.eclipse.rse.core.model.ISystemMessageObject;
29
import org.eclipse.rse.core.model.ISystemMessageObject;
Lines 30-43 Link Here
30
import org.eclipse.rse.core.model.SystemRemoteResourceSet;
32
import org.eclipse.rse.core.model.SystemRemoteResourceSet;
31
import org.eclipse.rse.core.subsystems.ISubSystem;
33
import org.eclipse.rse.core.subsystems.ISubSystem;
32
import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
34
import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
35
import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
33
import org.eclipse.rse.internal.processes.ui.actions.SystemKillProcessAction;
36
import org.eclipse.rse.internal.processes.ui.actions.SystemKillProcessAction;
37
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
38
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
34
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
39
import org.eclipse.rse.services.clientserver.processes.IHostProcessFilter;
35
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
40
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
36
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteTypes;
41
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteTypes;
37
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
42
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
38
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
43
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
39
import org.eclipse.rse.ui.ISystemContextMenuConstants;
44
import org.eclipse.rse.ui.ISystemContextMenuConstants;
40
import org.eclipse.rse.ui.ISystemMessages;
41
import org.eclipse.rse.ui.RSEUIPlugin;
45
import org.eclipse.rse.ui.RSEUIPlugin;
42
import org.eclipse.rse.ui.SystemBasePlugin;
46
import org.eclipse.rse.ui.SystemBasePlugin;
43
import org.eclipse.rse.ui.SystemMenuManager;
47
import org.eclipse.rse.ui.SystemMenuManager;
Lines 187-193 Link Here
187
		catch (Exception exc)
191
		catch (Exception exc)
188
		{
192
		{
189
			children = new SystemMessageObject[1];
193
			children = new SystemMessageObject[1];
190
			children[0] = new SystemMessageObject(RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_EXPAND_FAILED), ISystemMessageObject.MSGTYPE_ERROR, element);
194
			SystemMessage msg = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID, IStatus.ERROR, SystemProcessesResources.MSG_EXPAND_FAILED);
195
			children[0] = new SystemMessageObject(msg, ISystemMessageObject.MSGTYPE_ERROR, element);
191
			SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
196
			SystemBasePlugin.logError("Exception resolving file filter strings", exc); //$NON-NLS-1$
192
		}
197
		}
193
		return children;
198
		return children;
(-)src/org/eclipse/rse/internal/processes/ui/actions/SystemKillProcessAction.java (-5 / +9 lines)
Lines 14-19 Link Here
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
14
 * Martin Oberhuber (Wind River) - [168975] Move RSE Events API to Core
15
 * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes 
15
 * Martin Oberhuber (Wind River) - [186128][refactoring] Move IProgressMonitor last in public base classes 
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
16
 * Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
17
 * 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
17
 ********************************************************************************/
18
 ********************************************************************************/
18
19
19
package org.eclipse.rse.internal.processes.ui.actions;
20
package org.eclipse.rse.internal.processes.ui.actions;
Lines 24-34 Link Here
24
import java.util.Vector;
25
import java.util.Vector;
25
26
26
import org.eclipse.core.runtime.IProgressMonitor;
27
import org.eclipse.core.runtime.IProgressMonitor;
28
import org.eclipse.core.runtime.IStatus;
27
import org.eclipse.jface.dialogs.Dialog;
29
import org.eclipse.jface.dialogs.Dialog;
28
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
30
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
29
import org.eclipse.jface.operation.IRunnableContext;
31
import org.eclipse.jface.operation.IRunnableContext;
30
import org.eclipse.jface.operation.IRunnableWithProgress;
32
import org.eclipse.jface.operation.IRunnableWithProgress;
31
import org.eclipse.jface.viewers.IStructuredSelection;
33
import org.eclipse.jface.viewers.IStructuredSelection;
34
import org.eclipse.osgi.util.NLS;
32
import org.eclipse.rse.core.RSECorePlugin;
35
import org.eclipse.rse.core.RSECorePlugin;
33
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
36
import org.eclipse.rse.core.events.ISystemResourceChangeEvents;
34
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
37
import org.eclipse.rse.core.events.SystemResourceChangeEvent;
Lines 38-50 Link Here
38
import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
41
import org.eclipse.rse.internal.processes.ui.ProcessesPlugin;
39
import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
42
import org.eclipse.rse.internal.processes.ui.SystemProcessesResources;
40
import org.eclipse.rse.internal.processes.ui.dialogs.SystemKillDialog;
43
import org.eclipse.rse.internal.processes.ui.dialogs.SystemKillDialog;
44
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
41
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
45
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
42
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
46
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
43
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
47
import org.eclipse.rse.services.clientserver.processes.ISystemProcessRemoteConstants;
44
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
48
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcess;
45
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
49
import org.eclipse.rse.subsystems.processes.core.subsystem.IRemoteProcessSubSystem;
46
import org.eclipse.rse.ui.ISystemContextMenuConstants;
50
import org.eclipse.rse.ui.ISystemContextMenuConstants;
47
import org.eclipse.rse.ui.ISystemMessages;
48
import org.eclipse.rse.ui.RSEUIPlugin;
51
import org.eclipse.rse.ui.RSEUIPlugin;
49
import org.eclipse.rse.ui.actions.SystemBaseAction;
52
import org.eclipse.rse.ui.actions.SystemBaseAction;
50
import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
53
import org.eclipse.rse.ui.actions.SystemBaseDialogAction;
Lines 327-335 Link Here
327
    	  String msg = exc.getMessage();
330
    	  String msg = exc.getMessage();
328
    	  if ((msg == null) || (exc instanceof ClassCastException))
331
    	  if ((msg == null) || (exc instanceof ClassCastException))
329
    	    msg = exc.getClass().getName();
332
    	    msg = exc.getClass().getName();
330
    	  SystemMessageDialog msgDlg = 
333
    		  SystemMessage smsg = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID, IStatus.ERROR,
331
    	    new SystemMessageDialog(shell, 
334
    				  NLS.bind(SystemProcessesResources.MSG_OPERATION_FAILED, msg));
332
    	      RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_FAILED).makeSubstitution(msg));
335
    	  SystemMessageDialog msgDlg = new SystemMessageDialog(shell, smsg);
333
    	  msgDlg.setException(exc);
336
    	  msgDlg.setException(exc);
334
    	  msgDlg.open();
337
    	  msgDlg.open();
335
        }
338
        }
Lines 354-360 Link Here
354
     */
357
     */
355
    protected void showOperationCancelledMessage(Shell shell)
358
    protected void showOperationCancelledMessage(Shell shell)
356
    {
359
    {
357
    	SystemMessageDialog msgDlg = new SystemMessageDialog(shell, RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_OPERATION_CANCELLED));
360
    	SystemMessage msg = new SimpleSystemMessage(ProcessesPlugin.PLUGIN_ID, IStatus.CANCEL, SystemProcessesResources.MSG_OPERATION_CANCELLED);
361
    	SystemMessageDialog msgDlg = new SystemMessageDialog(shell, msg);
358
    	msgDlg.open();
362
    	msgDlg.open();
359
    }	
363
    }	
360
364

Return to bug 216252