mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-19 14:15:50 +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.
|
* 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
|
* 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) - [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;
|
package org.eclipse.rse.internal.services.dstore.files;
|
||||||
|
@ -2005,29 +2006,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
this.unixStyle = isUnixStyle;
|
this.unixStyle = isUnixStyle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean supportsEncodingConversion(){
|
||||||
|
return true;
|
||||||
/**
|
|
||||||
* 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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -21,6 +21,7 @@
|
||||||
* David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
|
* David McKnight (IBM) - [209704] [api] Ability to override default encoding conversion needed.
|
||||||
* Xuan Chen (IBM) - [210555] [regression] NPE when deleting a file on SSH
|
* 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
|
* 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;
|
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 {
|
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException {
|
||||||
return null;
|
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) - [209552] API changes to use multiple and getting rid of deprecated
|
||||||
* David McKnight (IBM) - [210109] store constants in IFileService rather than IFileServiceConstants
|
* 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
|
* 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;
|
package org.eclipse.rse.services.files;
|
||||||
|
@ -486,4 +487,13 @@ public interface IFileService extends IService
|
||||||
*/
|
*/
|
||||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException;
|
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) - [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
|
* 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
|
* 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;
|
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);
|
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) - [162195] new APIs for upload multi and download multi
|
||||||
* David McKnight (IBM) - [209552] API changes to use multiple and getting rid of deprecated
|
* 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
|
* 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;
|
package org.eclipse.rse.subsystems.files.core.subsystems;
|
||||||
|
@ -676,4 +677,13 @@ public interface IRemoteFileSubSystem extends ISubSystem {
|
||||||
*/
|
*/
|
||||||
public OutputStream getOutputStream(String remoteParent, String remoteFile, boolean isBinary, int options, IProgressMonitor monitor) throws SystemMessageException;
|
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