mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-17 21:25:58 +02:00
[284420] nullprogressmonitor is needed
This commit is contained in:
parent
4517ec1740
commit
4daf537c36
2 changed files with 12 additions and 6 deletions
|
@ -37,6 +37,7 @@
|
||||||
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
|
* David McKnight (IBM) - [249544] Save conflict dialog appears when saving files in the editor
|
||||||
* David McKnight (IBM) - [267247] Wrong encoding
|
* David McKnight (IBM) - [267247] Wrong encoding
|
||||||
* David McKnight (IBM) - [272772] Exception handling in SystemEditableRemoteFile
|
* David McKnight (IBM) - [272772] Exception handling in SystemEditableRemoteFile
|
||||||
|
* David McKnight (IBM) - [284420] nullprogressmonitor is needed
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.resources;
|
package org.eclipse.rse.files.ui.resources;
|
||||||
|
@ -723,7 +724,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
/**
|
/**
|
||||||
* Upload the file
|
* Upload the file
|
||||||
*/
|
*/
|
||||||
private void upload() throws Exception
|
private void upload(IProgressMonitor monitor) throws Exception
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!subsystem.isConnected())
|
if (!subsystem.isConnected())
|
||||||
|
@ -738,13 +739,13 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
IFile file = getLocalResource();
|
IFile file = getLocalResource();
|
||||||
String srcEncoding = RemoteFileUtility.getSourceEncoding(file);
|
String srcEncoding = RemoteFileUtility.getSourceEncoding(file);
|
||||||
|
|
||||||
subsystem.upload(localPath, remoteFile, srcEncoding, null);
|
subsystem.upload(localPath, remoteFile, srcEncoding, monitor);
|
||||||
|
|
||||||
// update timestamp
|
// update timestamp
|
||||||
SystemIFileProperties properties = new SystemIFileProperties(file);
|
SystemIFileProperties properties = new SystemIFileProperties(file);
|
||||||
|
|
||||||
//DKM- saveAS fix
|
//DKM- saveAS fix
|
||||||
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), new NullProgressMonitor());
|
remoteFile = subsystem.getRemoteFileObject(remoteFile.getAbsolutePath(), monitor);
|
||||||
properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
|
properties.setRemoteFileTimeStamp(remoteFile.getLastModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1810,7 +1811,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
|
|
||||||
if (resource.getLocation().equals(getLocalResource().getLocation()))
|
if (resource.getLocation().equals(getLocalResource().getLocation()))
|
||||||
{
|
{
|
||||||
upload();
|
upload(new NullProgressMonitor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -1924,7 +1925,7 @@ public class SystemEditableRemoteFile implements ISystemEditableRemoteObject, IP
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
this.setLocalResourceProperties();
|
this.setLocalResourceProperties();
|
||||||
this.upload();
|
this.upload(progressMonitor);
|
||||||
} catch (SystemMessageException e) {
|
} catch (SystemMessageException e) {
|
||||||
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), e.getSystemMessage());
|
SystemMessageDialog dialog = new SystemMessageDialog(SystemBasePlugin.getActiveWorkbenchShell(), e.getSystemMessage());
|
||||||
dialog.open();
|
dialog.open();
|
||||||
|
|
|
@ -59,6 +59,8 @@
|
||||||
* David McKnight (IBM) - [279014] [dstore][encoding] text file corruption can occur when downloading from UTF8 to cp1252
|
* David McKnight (IBM) - [279014] [dstore][encoding] text file corruption can occur when downloading from UTF8 to cp1252
|
||||||
* David McKnight (IBM) - [279695] [dstore] Connection file encoding is not refreshed from the host
|
* David McKnight (IBM) - [279695] [dstore] Connection file encoding is not refreshed from the host
|
||||||
* David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
|
* David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
|
||||||
|
* David McKnight (IBM) - [284056] Sychronize Cache causes the UI to hang with no way out
|
||||||
|
* David McKnight (IBM) - [284420] nullprogressmonitor is needed
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.dstore.files;
|
package org.eclipse.rse.internal.services.dstore.files;
|
||||||
|
@ -716,7 +718,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
|
|
||||||
resultStr = result.getSource();
|
resultStr = result.getSource();
|
||||||
|
|
||||||
if (resultStr.equals("failed") || monitor.isCanceled()){ //$NON-NLS-1$
|
if (resultStr.equals("failed") || (monitor != null && monitor.isCanceled())){ //$NON-NLS-1$
|
||||||
String msgTxt = NLS.bind(ServiceResources.FILEMSG_COPY_FILE_FAILED, remotePath);
|
String msgTxt = NLS.bind(ServiceResources.FILEMSG_COPY_FILE_FAILED, remotePath);
|
||||||
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
|
SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt);
|
||||||
throw new SystemMessageException(msg);
|
throw new SystemMessageException(msg);
|
||||||
|
@ -1041,6 +1043,9 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
//InterruptedException is used to report user cancellation, so no need to log
|
//InterruptedException is used to report user cancellation, so no need to log
|
||||||
//This should be reviewed (use OperationCanceledException) with bug #190750
|
//This should be reviewed (use OperationCanceledException) with bug #190750
|
||||||
}
|
}
|
||||||
|
if (monitor.isCanceled()){
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
Loading…
Add table
Reference in a new issue