boolean verifyAttributes()

in remoting/ide/downloadable/src/org/netbeans/modules/jackpot30/remoting/downloadable/DownloadedIndexPatcherImpl.java [126:168]


    boolean verifyAttributes(FileObject root, URL cache, boolean checkOnly) {
        if (root == null)
            return false;
        boolean vote = false;
        try {
            if (ensureAttributeValue(cache, SOURCE_LEVEL_ROOT, SourceLevelQuery.getSourceLevel(root), checkOnly)) {
                vote = true;
                if (checkOnly) {
                    return vote;
                }
            }
            Result aptOptions = AnnotationProcessingQuery.getAnnotationProcessingOptions(root);
            boolean apEnabledOnScan = aptOptions.annotationProcessingEnabled().contains(AnnotationProcessingQuery.Trigger.ON_SCAN);
            if (ensureAttributeValue(cache, APT_ENABLED, apEnabledOnScan ? Boolean.TRUE.toString() : null, checkOnly)) {
                vote = true;
                if (checkOnly) {
                    return vote;
                }
            }
            if (!apEnabledOnScan) {
                //no need to check further:
                return vote;
            }
            ClassPath processorPath = ClassPath.getClassPath(root, JavaClassPathConstants.PROCESSOR_PATH);
            if (processorPath != null && ensureAttributeValue(cache, PROCESSOR_PATH, processorPath.toString(), checkOnly)) {
                vote = true;
                if (checkOnly) {
                    return vote;
                }
            }
            if (ensureAttributeValue(cache, ANNOTATION_PROCESSORS, encodeToStirng(aptOptions.annotationProcessorsToRun()), checkOnly)) {
                vote = true;
                if (checkOnly) {
                    return vote;
                }
            }
        } catch (URISyntaxException ex) {
            Exceptions.printStackTrace(ex);
        } catch (IOException ioe) {
            Exceptions.printStackTrace(ioe);
        }
        return vote;
    }