本文整理汇总了Java中org.eclipse.core.resources.IEncodedStorage类的典型用法代码示例。如果您正苦于以下问题:Java IEncodedStorage类的具体用法?Java IEncodedStorage怎么用?Java IEncodedStorage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IEncodedStorage类属于org.eclipse.core.resources包,在下文中一共展示了IEncodedStorage类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createBaseResourceVariant
import org.eclipse.core.resources.IEncodedStorage; //导入依赖的package包/类
private static IResourceVariant createBaseResourceVariant(IResource local, LocalResourceStatus baseStatusInfo) {
if( baseStatusInfo == null
|| baseStatusInfo.getLastChangedRevision() == null )
return null;
if( local.getType() == IResource.FILE ) {
String charset = null;
try {
charset = ((IEncodedStorage)local).getCharset();
} catch (CoreException e) {
SVNProviderPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
return new BaseFile(local, baseStatusInfo, charset);
}
else {
return new BaseFolder(local, baseStatusInfo);
}
}
开发者ID:subclipse,项目名称:subclipse,代码行数:19,代码来源:SVNStatusSyncInfo.java
示例2: getEncoding
import org.eclipse.core.resources.IEncodedStorage; //导入依赖的package包/类
@Override
public String getEncoding(Object element) {
String encoding = super.getEncoding(element);
if (encoding == null && element instanceof IStorageEditorInput) {
try {
IStorage storage = ((IStorageEditorInput) element).getStorage();
URI uri = storage2UriMapper.getUri(storage);
if (uri != null) {
encoding = encodingProvider.getEncoding(uri);
} else if (storage instanceof IEncodedStorage) {
encoding = ((IEncodedStorage)storage).getCharset();
}
} catch (CoreException e) {
throw new WrappedException(e);
}
}
return encoding;
}
开发者ID:cplutte,项目名称:bts,代码行数:19,代码来源:XtextDocumentProvider.java
示例3: getPersistedEncoding
import org.eclipse.core.resources.IEncodedStorage; //导入依赖的package包/类
/**
* Returns the persisted encoding for the given element.
*
* @param element
* the element for which to get the persisted encoding
* @return the persisted encoding
*/
protected String getPersistedEncoding( Object element )
{
if ( element instanceof IStorageEditorInput )
{
IStorage storage;
try
{
storage = ( (IStorageEditorInput) element ).getStorage( );
if ( storage instanceof IEncodedStorage )
return ( (IEncodedStorage) storage ).getCharset( );
}
catch ( CoreException e )
{
return null;
}
}
return null;
}
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:StorageDocumentProvider.java
示例4: getPersistedEncoding
import org.eclipse.core.resources.IEncodedStorage; //导入依赖的package包/类
/**
* Returns the persisted encoding for the given element.
*
* @param element
* the element for which to get the persisted encoding
* @return the persisted encoding
*/
protected String getPersistedEncoding( Object element )
{
if ( element instanceof IEncodedStorage )
{
try
{
return ( (IEncodedStorage) element ).getCharset( );
}
catch ( CoreException e )
{
return null;
}
}
return null;
}
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:FileReportDocumentProvider.java
示例5: getCharset
import org.eclipse.core.resources.IEncodedStorage; //导入依赖的package包/类
public static String getCharset(IResource resource) {
if (resource instanceof IEncodedStorage) {
try {
return ((IEncodedStorage)resource).getCharset();
} catch (CoreException ex) {
// fall through
}
}
return ResourcesPlugin.getEncoding();
}
开发者ID:subclipse,项目名称:subclipse,代码行数:11,代码来源:Utilities.java
注:本文中的org.eclipse.core.resources.IEncodedStorage类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论