1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-14 03:35:37 +02:00

small bug fixes

This commit is contained in:
David McKnight 2006-06-14 15:53:25 +00:00
parent fdae0fb85b
commit 99f5c1b2bd
3 changed files with 73 additions and 40 deletions

View file

@ -776,7 +776,8 @@ public class UniversalPreferencePage
public boolean performOk() { public boolean performOk() {
super.performOk(); super.performOk();
if (modeMappings != null)
{
// first save the transfer mode registry // first save the transfer mode registry
Object[] array1 = modeMappings.toArray(); Object[] array1 = modeMappings.toArray();
SystemFileTransferModeMapping[] mappingArray1 = new SystemFileTransferModeMapping[array1.length]; SystemFileTransferModeMapping[] mappingArray1 = new SystemFileTransferModeMapping[array1.length];
@ -814,7 +815,7 @@ public class UniversalPreferencePage
setSuperTransferTypePreference(archiveTypeCombo.getText()); setSuperTransferTypePreference(archiveTypeCombo.getText());
setDownloadBufferSize(downloadBufferSize.getText()); setDownloadBufferSize(downloadBufferSize.getText());
setUploadBufferSize(uploadBufferSize.getText()); setUploadBufferSize(uploadBufferSize.getText());
}
return true; return true;
} }

View file

@ -399,13 +399,18 @@ public class UniversalFileTransferUtility
{ {
if (PlatformUI.isWorkbenchRunning()) if (PlatformUI.isWorkbenchRunning())
{ {
tempFile.refreshLocal(IResource.DEPTH_ONE, monitor); if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
tempFile.refreshLocal(IResource.DEPTH_ZERO, monitor);
} }
} }
catch (CoreException e) catch (CoreException e)
{ {
e.printStackTrace(); e.printStackTrace();
} }
catch (Exception e)
{
e.printStackTrace();
}
} }
tempFile = (IFile) getTempFileFor(srcFileOrFolder); tempFile = (IFile) getTempFileFor(srcFileOrFolder);

View file

@ -41,6 +41,7 @@ public class DStoreShellThread
private String[] _envVars; private String[] _envVars;
private DataStore _dataStore; private DataStore _dataStore;
private DataElement _status; private DataElement _status;
private String _invocation;
/** /**
* @param cwd initial working directory * @param cwd initial working directory
@ -56,6 +57,7 @@ public class DStoreShellThread
_encoding = encoding; _encoding = encoding;
_cwd = cwd; _cwd = cwd;
_envVars = envVars; _envVars = envVars;
_invocation = invocation;
init(); init();
} }
@ -65,9 +67,16 @@ public class DStoreShellThread
DataElement contextDir = _dataStore.createObject(null, "directory", (new File(_cwd)).getName(), _cwd); DataElement contextDir = _dataStore.createObject(null, "directory", (new File(_cwd)).getName(), _cwd);
_dataStore.setObject(contextDir); _dataStore.setObject(contextDir);
setRemoteEnvironment(contextDir); setRemoteEnvironment(contextDir);
if (_invocation== null || _invocation.equals(">"))
{
sendShellToMiner(contextDir); sendShellToMiner(contextDir);
} }
else
{
sendCommandToMiner(contextDir, _invocation);
}
}
public DataElement getStatus() public DataElement getStatus()
{ {
@ -93,6 +102,24 @@ public class DStoreShellThread
} }
} }
protected void sendCommandToMiner(DataElement contextDir, String invocation)
{
DataElement cmdD = getRunCommandDescriptor(contextDir);
if (cmdD != null)
{
if (invocation != null && invocation.length() > 0)
{
DataElement arg = _dataStore.createObject(null, "command", invocation);
_status = _dataStore.command(cmdD, arg, contextDir);
}
else
{
_status = _dataStore.command(cmdD, contextDir);
}
}
}
/** /**
* Set the environment variables for this connection. For universal this sets them in the * Set the environment variables for this connection. For universal this sets them in the
* DataStore tree. When a new shell is launched the environment variables are passed to the * DataStore tree. When a new shell is launched the environment variables are passed to the