mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-16 13:35:22 +02:00
[277141] System Editor Passed Incorrect Cache Information in Presence of Case-Differentiated-Only filenames
This commit is contained in:
parent
3a6d3a4db9
commit
4e9589c931
1 changed files with 13 additions and 7 deletions
|
@ -16,7 +16,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
|
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
|
||||||
* David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
|
* David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
|
||||||
* David McKnight (IBM) - [224377] "open with" menu does not have "other" option
|
* David McKnight (IBM) - [224377] "open with" menu does not have "other" option
|
||||||
*
|
* David McKnight (IBM) - [277141] System Editor Passed Incorrect Cache Information in Presence of Case-Differentiated-Only filenames
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.actions;
|
package org.eclipse.rse.internal.files.ui.actions;
|
||||||
|
@ -247,15 +247,20 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
|
||||||
// first make sure that the correct remote file is referenced (might be difference because of different case)
|
// first make sure that the correct remote file is referenced (might be difference because of different case)
|
||||||
if (!replicaRemotePath.equals(remotePath)){ // for bug 276103
|
if (!replicaRemotePath.equals(remotePath)){ // for bug 276103
|
||||||
|
|
||||||
IEditorPart editor = editable.getEditorPart();
|
IEditorPart editor = editable.getEditorPart();
|
||||||
boolean editorWasClosed = false;
|
boolean editorWasClosed = false;
|
||||||
if (editor.isDirty()){
|
if (editor != null){
|
||||||
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
|
if (editor.isDirty()){
|
||||||
if (editorWasClosed)
|
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
|
||||||
editable.doImmediateSaveAndUpload();
|
if (editorWasClosed)
|
||||||
|
editable.doImmediateSaveAndUpload();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
|
editorWasClosed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!editorWasClosed){
|
if (!editorWasClosed){
|
||||||
|
@ -286,6 +291,7 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return editable;
|
return editable;
|
||||||
|
|
Loading…
Add table
Reference in a new issue