diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java index 450db719420..1e28f8cf4e5 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/actions/SystemEditFileAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2009 IBM Corporation and others. + * Copyright (c) 2002, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -16,6 +16,7 @@ * David McKnight (IBM) - [189873] DownloadJob changed to DownloadAndOpenJob * David McKnight (IBM) - [224377] "open with" menu does not have "other" option * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly + * David McKnight (IBM) - [309813] RSE permits opening of file after access removed *******************************************************************************/ package org.eclipse.rse.internal.files.ui.actions; @@ -133,9 +134,13 @@ public class SystemEditFileAction extends SystemBaseAction { boolean usedBinary = properties.getUsedBinaryTransfer(); boolean isBinary = remoteFile.isBinary(); + boolean usedReadOnly = properties.getReadOnly(); + boolean isReadOnly = !remoteFile.canWrite(); + return (!dirty && !remoteNewer && usedBinary == isBinary && + usedReadOnly == isReadOnly && !encodingChanged); } return false; diff --git a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java index 0ac7364879d..67780242251 100644 --- a/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java +++ b/rse/plugins/org.eclipse.rse.files.ui/src/org/eclipse/rse/internal/files/ui/view/SystemViewRemoteFileAdapter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2002, 2009 IBM Corporation and others. + * Copyright (c) 2002, 2010 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -64,6 +64,7 @@ * David McKnight (IBM) - [276103] Files with names in different cases are not handled properly * David McKnight (IBM) - [276534] Cache Conflict After Synchronization when Browsing Remote System with Case-Differentiated-Only Filenames * David McKnight (IBM) - [280466] File download keeps running in case sensitive case + * David McKnight (IBM) - [309813] RSE permits opening of file after access removed *******************************************************************************/ package org.eclipse.rse.internal.files.ui.view; @@ -200,6 +201,8 @@ import org.eclipse.ui.views.properties.PropertyDescriptor; import com.ibm.icu.text.DateFormat; import com.ibm.icu.text.NumberFormat; +import com.ibm.icu.util.ULocale; + /** * Adapter for displaying remote file system objects in tree views. @@ -1289,8 +1292,9 @@ public class SystemViewRemoteFileAdapter { if (formatted) { - DateFormat datefmt = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM); - String formattedDate = datefmt.format(date); + ULocale locale = ULocale.getDefault(); + DateFormat icufmt = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM, locale); + String formattedDate = icufmt.format(date); return formattedDate; } else @@ -3401,9 +3405,13 @@ public class SystemViewRemoteFileAdapter boolean usedBinary = properties.getUsedBinaryTransfer(); boolean isBinary = remoteFile.isBinary(); + boolean usedReadOnly = properties.getReadOnly(); + boolean isReadOnly = !remoteFile.canWrite(); + return (!dirty && !remoteNewer && usedBinary == isBinary && + usedReadOnly == isReadOnly && !encodingChanged); } return false;