mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +02:00
small bug fixes
This commit is contained in:
parent
fdae0fb85b
commit
99f5c1b2bd
3 changed files with 73 additions and 40 deletions
|
@ -776,7 +776,8 @@ public class UniversalPreferencePage
|
|||
public boolean performOk() {
|
||||
|
||||
super.performOk();
|
||||
|
||||
if (modeMappings != null)
|
||||
{
|
||||
// first save the transfer mode registry
|
||||
Object[] array1 = modeMappings.toArray();
|
||||
SystemFileTransferModeMapping[] mappingArray1 = new SystemFileTransferModeMapping[array1.length];
|
||||
|
@ -814,7 +815,7 @@ public class UniversalPreferencePage
|
|||
setSuperTransferTypePreference(archiveTypeCombo.getText());
|
||||
setDownloadBufferSize(downloadBufferSize.getText());
|
||||
setUploadBufferSize(uploadBufferSize.getText());
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -399,13 +399,18 @@ public class UniversalFileTransferUtility
|
|||
{
|
||||
if (PlatformUI.isWorkbenchRunning())
|
||||
{
|
||||
tempFile.refreshLocal(IResource.DEPTH_ONE, monitor);
|
||||
if (!tempFile.isSynchronized(IResource.DEPTH_ZERO))
|
||||
tempFile.refreshLocal(IResource.DEPTH_ZERO, monitor);
|
||||
}
|
||||
}
|
||||
catch (CoreException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
tempFile = (IFile) getTempFileFor(srcFileOrFolder);
|
||||
|
|
|
@ -41,6 +41,7 @@ public class DStoreShellThread
|
|||
private String[] _envVars;
|
||||
private DataStore _dataStore;
|
||||
private DataElement _status;
|
||||
private String _invocation;
|
||||
|
||||
/**
|
||||
* @param cwd initial working directory
|
||||
|
@ -56,6 +57,7 @@ public class DStoreShellThread
|
|||
_encoding = encoding;
|
||||
_cwd = cwd;
|
||||
_envVars = envVars;
|
||||
_invocation = invocation;
|
||||
init();
|
||||
}
|
||||
|
||||
|
@ -65,9 +67,16 @@ public class DStoreShellThread
|
|||
DataElement contextDir = _dataStore.createObject(null, "directory", (new File(_cwd)).getName(), _cwd);
|
||||
_dataStore.setObject(contextDir);
|
||||
setRemoteEnvironment(contextDir);
|
||||
|
||||
if (_invocation== null || _invocation.equals(">"))
|
||||
{
|
||||
sendShellToMiner(contextDir);
|
||||
}
|
||||
else
|
||||
{
|
||||
sendCommandToMiner(contextDir, _invocation);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
* DataStore tree. When a new shell is launched the environment variables are passed to the
|
||||
|
|
Loading…
Add table
Reference in a new issue