/** * Clear the validation properties. * * @param resource */ public void clearValProperty(IResource resource) { if (!resource.isAccessible()) return; try { resource.setSessionProperty(StatusBuild, null); resource.setSessionProperty(StatusManual, null); } catch (CoreException e) { } }
private void putValProperty(ValProperty vp, IResource resource, ValType valType) { try { if (!(resource.isAccessible())) return; if (valType == ValType.Build) resource.setSessionProperty(StatusBuild, vp); else if (valType == ValType.Manual) resource.setSessionProperty(StatusManual, vp); } catch (CoreException e) { // If the resource is not found, it is likely just been deleted // and there is no need to do anything. // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=269022 if (!e.getStatus().equals(IResourceStatus.RESOURCE_NOT_FOUND)) { ValidationPlugin.getPlugin().handleException(e, IStatus.WARNING); } } }