1
0
Fork 0
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:
David McKnight 2009-05-22 14:18:54 +00:00
parent 3a6d3a4db9
commit 4e9589c931

View file

@ -16,7 +16,7 @@
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
* David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob
* 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;
@ -249,13 +249,18 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
IEditorPart editor = editable.getEditorPart();
boolean editorWasClosed = false;
if (editor.isDirty()){
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
if (editorWasClosed)
editable.doImmediateSaveAndUpload();
if (editor != null){
if (editor.isDirty()){
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
if (editorWasClosed)
editable.doImmediateSaveAndUpload();
}
else {
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
}
}
else {
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
editorWasClosed = true;
}
if (!editorWasClosed){
@ -286,6 +291,7 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
}
catch (Exception e)
{
e.printStackTrace();
}
}
return editable;