1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-17 05:55: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 * 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;
@ -249,6 +249,7 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
IEditorPart editor = editable.getEditorPart(); IEditorPart editor = editable.getEditorPart();
boolean editorWasClosed = false; boolean editorWasClosed = false;
if (editor != null){
if (editor.isDirty()){ if (editor.isDirty()){
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true); editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
if (editorWasClosed) if (editorWasClosed)
@ -257,6 +258,10 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
else { else {
editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true); editorWasClosed = editor.getEditorSite().getPage().closeEditor(editor, true);
} }
}
else {
editorWasClosed = true;
}
if (!editorWasClosed){ if (!editorWasClosed){
// use cancelled operation so we need to get out of here // use cancelled operation so we need to get out of here
@ -286,6 +291,7 @@ private SystemEditableRemoteFile getEditableRemoteObject(Object element, IEditor
} }
catch (Exception e) catch (Exception e)
{ {
e.printStackTrace();
} }
} }
return editable; return editable;