Exemple #1
0
  static void setReadOnly(IResource resource, boolean readOnly) {
    ResourceAttributes resourceAttributes = resource.getResourceAttributes();
    if (resourceAttributes == null) // not supported on this platform for this resource
    return;

    resourceAttributes.setReadOnly(readOnly);
    try {
      resource.setResourceAttributes(resourceAttributes);
    } catch (CoreException e) {
      DLTKUIPlugin.log(e);
    }
  }