mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 23:55:26 +02:00
[209704] added supportsEncodingConversion()
This commit is contained in:
parent
51a2ca0ee4
commit
47d69ab7aa
5 changed files with 42 additions and 26 deletions
|
@ -30,6 +30,7 @@
|
|||
* David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
|
||||
* Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
|
||||
* David McKnight (IBM) - [196624] dstore miner IDs should be String constants rather than dynamic lookup
|
||||
* David McKnight (IBM) - [209704] added supportsEncodingConversion()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.dstore.files;
|
||||
|
@ -2005,29 +2006,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
|||
this.unixStyle = isUnixStyle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
*/
|
||||
public IHostFile[] getFolders(String remoteParent, String fileFilter, IProgressMonitor monitor)
|
||||
{
|
||||
return fetch(remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FOLDERS, monitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
*/
|
||||
public IHostFile[] getFiles(String remoteParent, String fileFilter, IProgressMonitor monitor)
|
||||
{
|
||||
return fetch(remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_FILES, monitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated
|
||||
*/
|
||||
public IHostFile[] getFilesAndFolders(String remoteParent, String fileFilter, IProgressMonitor monitor)
|
||||
{
|
||||
return fetch(remoteParent, fileFilter, IUniversalDataStoreConstants.C_QUERY_VIEW_ALL, monitor);
|
||||
public boolean supportsEncodingConversion(){
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@
|
|||
* David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
|
||||
* Xuan Chen (IBM) - [210555] [regression] NPE when deleting a file on SSH
|
||||
* Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
|
||||
* David McKnight (IBM) - [209704] added supportsEncodingConversion()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.services.files;
|
||||
|
@ -211,4 +212,12 @@ public abstract class AbstractFileService implements IFileService
|
|||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The default implementation returns false. Clients should override this method if they make use
|
||||
* of IFileServiceCodePageConverter to do conversion during download and upload.
|
||||
*/
|
||||
public boolean supportsEncodingConversion(){
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@
|
|||
* David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
|
||||
* David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
|
||||
* Kevin Doyle (IBM) - [208778] new API getOutputSteam for getting an output stream in append mode
|
||||
* David McKnight (IBM) - [209704] added supportsEncodingConversion()
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.services.files;
|
||||
|
@ -485,5 +486,14 @@ public interface IFileService extends IService
|
|||
* @since 3.0
|
||||
*/
|
||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException;
|
||||
|
||||
|
||||
/**
|
||||
* Indicates whether this file service supports code page conversion using
|
||||
* the IFileServiceCodePageConverter mechanism. Certain extensions, such as
|
||||
* property pages for encoding conversion can determine whether or not to
|
||||
* display or enable themselves based on result of this call.
|
||||
*
|
||||
* @return whether this service supports encoding conversion
|
||||
*/
|
||||
public boolean supportsEncodingConversion();
|
||||
}
|
|
@ -26,6 +26,7 @@
|
|||
* David McKnight (IBM) - [203114] don't treat XML files specially (no hidden prefs for bin vs text)
|
||||
* David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
|
||||
* Kevin Doyle (IBM) - [208778] [efs][api] RSEFileStore#getOutputStream() does not support EFS#APPEND
|
||||
* David McKnight (IBM) - [209704] added supportsEncodingConversion()
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
|
||||
|
@ -1033,4 +1034,11 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
return new FileSubSystemOutputStream(getFileService().getOutputStream(remoteParent, remoteFile, isBinary, options, monitor), remoteParent, remoteFile, this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Defers to the file service.
|
||||
*/
|
||||
public boolean supportsEncodingConversion(){
|
||||
return getFileService().supportsEncodingConversion();
|
||||
}
|
||||
|
||||
}
|
|
@ -19,6 +19,7 @@
|
|||
* David McKnight (IBM) - [162195] new APIs for upload multi and download multi
|
||||
* David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
|
||||
* Kevin Doyle (IBM) - [208778] new API getOutputSteam for getting an output stream in append mode
|
||||
* David McKnight (IBM) - [209704] added supportsEncodingConversion()
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.core.subsystems;
|
||||
|
@ -675,5 +676,14 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
|||
* @since 3.0
|
||||
*/
|
||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException;
|
||||
|
||||
|
||||
/**
|
||||
* Indicates whether this file subsystem supports code page conversion using
|
||||
* the IFileServiceCodePageConverter mechanism. Certain extensions, such as
|
||||
* property pages for encoding conversion can determine whether or not to
|
||||
* display or enable themselves based on result of this call.
|
||||
*
|
||||
* @return whether this service supports encoding conversion
|
||||
*/
|
||||
public boolean supportsEncodingConversion();
|
||||
}
|
Loading…
Add table
Reference in a new issue