return (resource != null && Resources.isReadOnly(resource));
case IModelElement.SCRIPT_FOLDER:
IResource packResource = ReorgUtils.getResource(modelElement);
if (packResource == null)
return false;
IScriptFolder pack = (IScriptFolder) modelElement;
if (Resources.isReadOnly(packResource))
return true;
Object[] nonScript = pack.getForeignResources();
for (int i = 0; i < nonScript.length; i++) {
Object object = nonScript[i];
if (object instanceof IResource
&& hasReadOnlyResourcesAndSubResources((IResource) object))
return true;
}
return hasReadOnlyResourcesAndSubResources(pack.getChildren());
case IModelElement.PROJECT_FRAGMENT:
IProjectFragment root = (IProjectFragment) modelElement;
if (root.isArchive())
return false;
IResource pfrResource = ReorgUtils.getResource(modelElement);