public static boolean isReadOnly(IResource resource) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) // not supported on this platform for this resource return false; return resourceAttributes.isReadOnly(); }
@Deprecated @Override public boolean isReadOnly() { final ResourceAttributes attributes = getResourceAttributes(); return attributes == null ? false : attributes.isReadOnly(); }
public static boolean isReadOnly(IResource resource) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) // not supported on this platform for this resource return false; return resourceAttributes.isReadOnly(); }
public static boolean isReadOnly(IResource resource) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) // not supported on this platform for this resource return false; return resourceAttributes.isReadOnly(); }
public static boolean isReadOnly(IResource resource) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) // not supported on this platform for this resource return false; return resourceAttributes.isReadOnly(); }
@Deprecated @Override public boolean isReadOnly() { final ResourceAttributes attributes = getResourceAttributes(); return attributes != null && attributes.isReadOnly(); }
public static boolean isReadOnly(IResource resource) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) // not supported on this platform for this resource return false; return resourceAttributes.isReadOnly(); }
@Deprecated @Override public boolean isReadOnly() { final ResourceAttributes attributes = getResourceAttributes(); return attributes == null ? false : attributes.isReadOnly(); }
public static boolean isReadOnly(IResource resource) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) // not supported on this platform for this resource return false; return resourceAttributes.isReadOnly(); }
private static List<IResource> getReadonlyFiles(IResource[] resources) { List<IResource> readOnlyFiles= new ArrayList<>(); for (IResource resource : resources) { ResourceAttributes resourceAttributes= resource.getResourceAttributes(); if (resource.getType() == IResource.FILE && resourceAttributes != null && resourceAttributes.isReadOnly()) readOnlyFiles.add(resource); } return readOnlyFiles; }
private static List getReadonlyFiles(IResource[] resources) { List readOnlyFiles= new ArrayList(); for (int i= 0; i < resources.length; i++) { IResource resource= resources[i]; ResourceAttributes resourceAttributes= resource.getResourceAttributes(); if (resource.getType() == IResource.FILE && resourceAttributes != null && resourceAttributes.isReadOnly()) readOnlyFiles.add(resource); } return readOnlyFiles; }
@Override public boolean isReadOnly() { if (fTextFileBuffer != null) { return fTextFileBuffer.isCommitable(); } ResourceAttributes attributes = fFile.getResourceAttributes(); return attributes != null ? attributes.isReadOnly() : false; }
@Override public boolean isReadOnly() { if (fResource.getType() == IResource.FILE) { ResourceAttributes attrs = fResource.getResourceAttributes(); if (attrs != null) { return attrs.isReadOnly(); } } return false; }
/** * Returns whether the given resource is read-only or not. * @param resource * @return <code>true</code> if the resource is read-only, <code>false</code> if it is not or * if the file system does not support the read-only attribute. */ public static boolean isReadOnly(IResource resource) { if (isReadOnlySupported()) { ResourceAttributes resourceAttributes = resource.getResourceAttributes(); if (resourceAttributes == null) return false; // not supported on this platform for this resource return resourceAttributes.isReadOnly(); } return false; }
@Override public boolean isReadOnly() { if (fTextFileBuffer != null) return !fTextFileBuffer.isCommitable(); IResource resource= getUnderlyingResource(); if (resource == null) return true; final ResourceAttributes attributes= resource.getResourceAttributes(); return attributes == null ? false : attributes.isReadOnly(); }
@Override public boolean isReadOnly() { if (fTextFileBuffer != null) return !fTextFileBuffer.isCommitable(); IResource resource= getUnderlyingResource(); if (resource == null) return true; final ResourceAttributes attributes= resource.getResourceAttributes(); return attributes == null ? false : attributes.isReadOnly(); }
/** * Returns if a CU can be edited. */ public static boolean isEditable(ICompilationUnit cu) { Assert.isNotNull(cu); IResource resource= cu.getPrimary().getResource(); return (resource.exists() && !resource.getResourceAttributes().isReadOnly()); }
/** * Returns if a CU can be edited. * @param cu the compilation unit * @return <code>true</code> if the CU can be edited */ public static boolean isEditable(ICompilationUnit cu) { Assert.isNotNull(cu); IResource resource= cu.getPrimary().getResource(); return (resource.exists() && !resource.getResourceAttributes().isReadOnly()); }
/** * Returns if a CU can be edited. */ public static boolean isEditable(ICompilationUnit cu) { Assert.isNotNull(cu); IResource resource= cu.getPrimary().getResource(); return (resource.exists() && !resource.getResourceAttributes().isReadOnly()); }
public boolean isReadOnly() { if (fTextFileBuffer != null) return !fTextFileBuffer.isCommitable(); IResource resource= getUnderlyingResource(); if (resource == null) return true; final ResourceAttributes attributes= resource.getResourceAttributes(); return attributes == null ? false : attributes.isReadOnly(); }