热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.eclipse.core.resources.ResourceAttributes.setArchive()方法的使用及代码示例

本文整理了Java中org.eclipse.core.resources.ResourceAttributes.setArchive方法的一些代码示例,展示了

本文整理了Java中org.eclipse.core.resources.ResourceAttributes.setArchive方法的一些代码示例,展示了ResourceAttributes.setArchive的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceAttributes.setArchive方法的具体详情如下:
包路径:org.eclipse.core.resources.ResourceAttributes
类名称:ResourceAttributes
方法名:setArchive

ResourceAttributes.setArchive介绍

[英]Sets or unsets whether this ResourceAttributes object is marked archive.

This attribute is used only on file systems supporting EFS#ATTRIBUTE_ARCHIVE.
[中]设置或取消设置此ResourceAttributes对象是否标记为存档。
此属性仅在支持EFS#attribute_ARCHIVE的文件系统上使用。

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

@Override
public void performChange(IResource resource) throws CoreException {
ResourceAttributes attrs = resource.getResourceAttributes();
if (attrs != null) {
if (changedAttrs[0])
attrs.setReadOnly(finalAttrs[0]);
if (changedAttrs[1])
attrs.setExecutable(finalAttrs[1]);
if (changedAttrs[2])
attrs.setArchive(finalAttrs[2]);
resource.setResourceAttributes(attrs);
}
}
};

代码示例来源:origin: org.eclipse.emf/org.eclipse.emf.ecore

resourceAttributes.setArchive(archive);

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.emf.ecore

resourceAttributes.setArchive(archive);

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

attrs.setArchive(archiveBox.getSelection());
finalValues[2] = archiveBox.getSelection();
changedAttrs[2] = true;

代码示例来源:origin: org.eclipse.platform/org.eclipse.core.resources

/**
* Converts an IFileInfo object into a ResourceAttributes object.
* @param fileInfo The file info
* @return The resource attributes
*/
public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) {
ResourceAttributes attributes = new ResourceAttributes();
attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE));
attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN));
attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK));
attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ));
attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE));
attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE));
attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ));
attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE));
attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE));
return attributes;
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.eclipse.core.resources

/**
* Converts an IFileInfo object into a ResourceAttributes object.
* @param fileInfo The file info
* @return The resource attributes
*/
public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) {
ResourceAttributes attributes = new ResourceAttributes();
attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE));
attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN));
attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK));
attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ));
attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE));
attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE));
attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ));
attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE));
attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE));
return attributes;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.core.resources

/**
* Converts an IFileInfo object into a ResourceAttributes object.
* @param fileInfo The file info
* @return The resource attributes
*/
public static ResourceAttributes fileInfoToAttributes(IFileInfo fileInfo) {
ResourceAttributes attributes = new ResourceAttributes();
attributes.setReadOnly(fileInfo.getAttribute(EFS.ATTRIBUTE_READ_ONLY));
attributes.setArchive(fileInfo.getAttribute(EFS.ATTRIBUTE_ARCHIVE));
attributes.setExecutable(fileInfo.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
attributes.setHidden(fileInfo.getAttribute(EFS.ATTRIBUTE_HIDDEN));
attributes.setSymbolicLink(fileInfo.getAttribute(EFS.ATTRIBUTE_SYMLINK));
attributes.set(EFS.ATTRIBUTE_GROUP_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_READ));
attributes.set(EFS.ATTRIBUTE_GROUP_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_WRITE));
attributes.set(EFS.ATTRIBUTE_GROUP_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_GROUP_EXECUTE));
attributes.set(EFS.ATTRIBUTE_OTHER_READ, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_READ));
attributes.set(EFS.ATTRIBUTE_OTHER_WRITE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_WRITE));
attributes.set(EFS.ATTRIBUTE_OTHER_EXECUTE, fileInfo.getAttribute(EFS.ATTRIBUTE_OTHER_EXECUTE));
return attributes;
}

推荐阅读
author-avatar
mobiledu2502854717
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有