protected boolean isValid(IResource resource) throws CoreException { if (resource instanceof IFile) { IFile file = (IFile) resource; if (!file.isSynchronized(0)) { // In case the resource has been updated, refresh it file.refreshLocal(0, null); } if (file.getContentDescription() != null && file.getContentDescription().getContentType() != null && KickstartFormMemoryModel.KICKSTART_FORM_CONTENT_TYPE.equals( file.getContentDescription().getContentType().getId())) { return true; } } else if (resource instanceof IFolder) { return !resource.isDerived() && !resource.isHidden(); } return false; }