作者:mobiledu2502854717 | 来源:互联网 | 2023-10-11 20:03
本文整理了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;
}