This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 183793
Collapse All | Expand All

(-)a/api.java/apichanges.xml (+14 lines)
Lines 73-78 Link Here
73
<!-- ACTUAL CHANGES BEGIN HERE: -->
73
<!-- ACTUAL CHANGES BEGIN HERE: -->
74
74
75
<changes>
75
<changes>
76
        <change id="ap-query-enabledineditor">
77
            <api name="classpath"/>
78
            <summary>Introducing AnnotationProcessingQuery.Result.annotationProcessingEnabledInEditor</summary>
79
            <version major="1" minor="27"/>
80
            <date day="9" month="4" year="2010"/>
81
            <author login="dbalek"/>
82
            <compatibility addition="yes" modification="no" semantic="compatible" source="compatible" binary="compatible"/>
83
            <description>
84
                <p>Adding AnnotationProcessingQuery.Result.annotationProcessingEnabledInEditor() to inform whether the annotation processors should be run inside Java editor.
85
                </p>
86
            </description>
87
            <class package="org.netbeans.api.java.queries" name="AnnotationProcessingQuery" />
88
            <issue number="183793"/>
89
        </change>
76
        <change id="ap-query-processoroptions">
90
        <change id="ap-query-processoroptions">
77
            <api name="classpath"/>
91
            <api name="classpath"/>
78
            <summary>Introducing AnnotationProcessingQuery.Result.processorOptions</summary>
92
            <summary>Introducing AnnotationProcessingQuery.Result.processorOptions</summary>
(-)a/api.java/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.api.java/1
2
OpenIDE-Module: org.netbeans.api.java/1
3
OpenIDE-Module-Specification-Version: 1.26
3
OpenIDE-Module-Specification-Version: 1.27
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/api/java/queries/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/api/java/queries/Bundle.properties
5
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
6
6
(-)a/api.java/src/org/netbeans/api/java/queries/AnnotationProcessingQuery.java (-1 / +12 lines)
Lines 85-95 Link Here
85
     */
85
     */
86
    public static interface Result {
86
    public static interface Result {
87
87
88
        /**Whether the annotation processors should be run.
89
         *
90
         * @return true if and only if the annotation processors should be run
91
         */
92
        public boolean annotationProcessingEnabled();
93
88
        /**Whether the annotation processors should be run inside Java editor.
94
        /**Whether the annotation processors should be run inside Java editor.
89
         *
95
         *
90
         * @return true if and only if the annotation processors should be run inside the Java editor
96
         * @return true if and only if the annotation processors should be run inside the Java editor
97
         * @since org.netbeans.api.java/1 1.27
91
         */
98
         */
92
        public boolean annotationProcessingEnabled();
99
        public boolean annotationProcessingEnabledInEditor();
93
100
94
        /**Which annotation processors should be run.
101
        /**Which annotation processors should be run.
95
         *
102
         *
Lines 133-138 Link Here
133
            return false;
140
            return false;
134
        }
141
        }
135
142
143
        public boolean annotationProcessingEnabledInEditor() {
144
            return false;
145
        }
146
136
        public Iterable<? extends String> annotationProcessorsToRun() {
147
        public Iterable<? extends String> annotationProcessorsToRun() {
137
            return null;
148
            return null;
138
        }
149
        }
(-)a/apisupport.project/manifest.mf (-1 / +1 lines)
Lines 6-10 Link Here
6
  org.netbeans.api.javahelp.Help
6
  org.netbeans.api.javahelp.Help
7
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/ui/resources/layer.xml
7
OpenIDE-Module-Layer: org/netbeans/modules/apisupport/project/ui/resources/layer.xml
8
AutoUpdate-Show-In-Client: false
8
AutoUpdate-Show-In-Client: false
9
OpenIDE-Module-Specification-Version: 1.40
9
OpenIDE-Module-Specification-Version: 1.41
10
10
(-)a/apisupport.project/src/org/netbeans/modules/apisupport/project/queries/AnnotationProcessingQueryImpl.java (+5 lines)
Lines 87-92 Link Here
87
        }
87
        }
88
88
89
        @Override
89
        @Override
90
        public boolean annotationProcessingEnabledInEditor() {
91
            return true;
92
        }
93
94
        @Override
90
        public Iterable<? extends String> annotationProcessorsToRun() {
95
        public Iterable<? extends String> annotationProcessorsToRun() {
91
            return null;
96
            return null;
92
        }
97
        }
(-)a/java.api.common/manifest.mf (-1 / +1 lines)
Lines 1-4 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.java.api.common/0
2
OpenIDE-Module: org.netbeans.modules.java.api.common/0
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/api/common/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/api/common/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.15
4
OpenIDE-Module-Specification-Version: 1.16
(-)a/java.api.common/src/org/netbeans/modules/java/api/common/queries/AnnotationProcessingQueryImpl.java (+4 lines)
Lines 114-119 Link Here
114
        }
114
        }
115
115
116
        public boolean annotationProcessingEnabled() {
116
        public boolean annotationProcessingEnabled() {
117
            return TRUE.contains(evaluator.getProperty(annotationProcessingEnabledProperty));
118
        }
119
120
        public boolean annotationProcessingEnabledInEditor() {
117
            return    TRUE.contains(evaluator.getProperty(annotationProcessingEnabledProperty))
121
            return    TRUE.contains(evaluator.getProperty(annotationProcessingEnabledProperty))
118
                   && TRUE.contains(evaluator.getProperty(annotationProcessingEnabledInEditorProperty));
122
                   && TRUE.contains(evaluator.getProperty(annotationProcessingEnabledInEditorProperty));
119
        }
123
        }
(-)a/java.api.common/src/org/netbeans/modules/java/api/common/queries/QuerySupport.java (-1 / +2 lines)
Lines 288-295 Link Here
288
     * @param helper project's AntProjectHelper
288
     * @param helper project's AntProjectHelper
289
     * @param evaluator project's evaluator
289
     * @param evaluator project's evaluator
290
     * @param annotationProcessingEnabledProperty property whose value says whether the annotation processing is enabled for the given project at all
290
     * @param annotationProcessingEnabledProperty property whose value says whether the annotation processing is enabled for the given project at all
291
     *                                                    (will be returned from {@link Result#annotationProcessingEnabled()})
291
     * @param annotationProcessingEnabledInEditorProperty property whose value says whether the annotation processing should be enabled
292
     * @param annotationProcessingEnabledInEditorProperty property whose value says whether the annotation processing should be enabled
292
     *                                                    in the editor (will be returned from {@link Result#annotationProcessingEnabled())}
293
     *                                                    in the editor (will be returned from {@link Result#annotationProcessingEnabledInEditor()})
293
     * @param runAllAnnotationProcessorsProperty when true, {@link Result#annotationProcessorsToRun()} will return null
294
     * @param runAllAnnotationProcessorsProperty when true, {@link Result#annotationProcessorsToRun()} will return null
294
     * @param annotationProcessorsProperty should contain comma separated list of annotation processors to run (will be returned from  {@link Result#annotationProcessorsToRun()})
295
     * @param annotationProcessorsProperty should contain comma separated list of annotation processors to run (will be returned from  {@link Result#annotationProcessorsToRun()})
295
     * @param sourceOutputProperty directory to which the annotation processors generate source files (will be returned from  {@link Result#sourceOutputProperty()})
296
     * @param sourceOutputProperty directory to which the annotation processors generate source files (will be returned from  {@link Result#sourceOutputProperty()})
(-)a/java.freeform/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.java.freeform/1
2
OpenIDE-Module: org.netbeans.modules.java.freeform/1
3
OpenIDE-Module-Specification-Version: 1.18
3
OpenIDE-Module-Specification-Version: 1.19
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/freeform/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/java/freeform/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/modules/java/freeform/resources/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/java/freeform/resources/layer.xml
6
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
(-)a/java.freeform/src/org/netbeans/modules/java/freeform/AnnotationProcessingQueryImpl.java (+3 lines)
Lines 59-64 Link Here
59
            public @Override boolean annotationProcessingEnabled() {
59
            public @Override boolean annotationProcessingEnabled() {
60
                return true;
60
                return true;
61
            }
61
            }
62
            public @Override boolean annotationProcessingEnabledInEditor() {
63
                return false;
64
            }
62
            public @Override Iterable<? extends String> annotationProcessorsToRun() {
65
            public @Override Iterable<? extends String> annotationProcessorsToRun() {
63
                return null;
66
                return null;
64
            }
67
            }
(-)a/java.j2seproject/nbproject/project.properties (-1 / +1 lines)
Lines 39-45 Link Here
39
39
40
javac.compilerargs=-Xlint -Xlint:-serial
40
javac.compilerargs=-Xlint -Xlint:-serial
41
javac.source=1.6
41
javac.source=1.6
42
spec.version.base=1.37.0
42
spec.version.base=1.38.0
43
43
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEPersistenceProvider.java (-2 / +2 lines)
Lines 315-322 Link Here
315
                                changed = true;
315
                                changed = true;
316
                            }
316
                            }
317
                        }
317
                        }
318
                        if (!J2SEProjectUtil.isTrue(prop.getProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED_IN_EDITOR))) {
318
                        if (!J2SEProjectUtil.isTrue(prop.getProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED))) {
319
                            prop.setProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED_IN_EDITOR, "true");    //NOI18N
319
                            prop.setProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED, "true");    //NOI18N
320
                            changed = true;
320
                            changed = true;
321
                        }
321
                        }
322
                        if (changed) {
322
                        if (changed) {
(-)a/java.j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectGenerator.java (-1 / +1 lines)
Lines 248-254 Link Here
248
        data.appendChild (testRoots);
248
        data.appendChild (testRoots);
249
        h.putPrimaryConfigurationData(data, true);
249
        h.putPrimaryConfigurationData(data, true);
250
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED, "true"); // NOI18N
250
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED, "true"); // NOI18N
251
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED_IN_EDITOR, "true"); // NOI18N
251
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_ENABLED_IN_EDITOR, "false"); // NOI18N
252
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_RUN_ALL_PROCESSORS, "true"); // NOI18N
252
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_RUN_ALL_PROCESSORS, "true"); // NOI18N
253
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_PROCESSORS_LIST, ""); // NOI18N
253
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_PROCESSORS_LIST, ""); // NOI18N
254
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_SOURCE_OUTPUT, "${build.generated.sources.dir}/ap-source-output"); // NOI18N
254
        ep.setProperty(ProjectProperties.ANNOTATION_PROCESSING_SOURCE_OUTPUT, "${build.generated.sources.dir}/ap-source-output"); // NOI18N
(-)a/java.source/nbproject/project.properties (-1 / +1 lines)
Lines 43-49 Link Here
43
javadoc.title=Java Source
43
javadoc.title=Java Source
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
46
spec.version.base=0.57.0
46
spec.version.base=0.58.0
47
test.qa-functional.cp.extra=${refactoring.java.dir}/modules/ext/javac-api-nb-7.0-b07.jar
47
test.qa-functional.cp.extra=${refactoring.java.dir}/modules/ext/javac-api-nb-7.0-b07.jar
48
test.unit.run.cp.extra=${o.n.core.dir}/core/core.jar:\
48
test.unit.run.cp.extra=${o.n.core.dir}/core/core.jar:\
49
    ${o.n.core.dir}/lib/boot.jar:\
49
    ${o.n.core.dir}/lib/boot.jar:\
(-)a/java.source/src/org/netbeans/modules/java/source/indexing/APTUtils.java (+4 lines)
Lines 119-124 Link Here
119
        return aptOptions.annotationProcessingEnabled();
119
        return aptOptions.annotationProcessingEnabled();
120
    }
120
    }
121
121
122
    public boolean aptEnabledInEditor() {
123
        return aptOptions.annotationProcessingEnabledInEditor();
124
    }
125
122
    public Collection<? extends Processor> resolveProcessors() {
126
    public Collection<? extends Processor> resolveProcessors() {
123
        List<URL> urls = new LinkedList<URL>();
127
        List<URL> urls = new LinkedList<URL>();
124
        for (Entry e : processorPath.entries()) {
128
        for (Entry e : processorPath.entries()) {
(-)a/java.source/src/org/netbeans/modules/java/source/parsing/JavacParser.java (-1 / +2 lines)
Lines 662-668 Link Here
662
        options.add("-g:vars");  // NOI18N, Make the compiler to maintain local variables table
662
        options.add("-g:vars");  // NOI18N, Make the compiler to maintain local variables table
663
        options.add("-source");  // NOI18N
663
        options.add("-source");  // NOI18N
664
        options.add(validatedSourceLevel.name);
664
        options.add(validatedSourceLevel.name);
665
        boolean aptEnabled = aptUtils != null && aptUtils.aptEnabled() && !ClasspathInfoAccessor.getINSTANCE().getCachedClassPath(cpInfo, PathKind.SOURCE).entries().isEmpty();
665
        boolean aptEnabled = aptUtils != null && (backgroundCompilation ? aptUtils.aptEnabled() : aptUtils.aptEnabledInEditor())
666
                && !ClasspathInfoAccessor.getINSTANCE().getCachedClassPath(cpInfo, PathKind.SOURCE).entries().isEmpty();
666
        if (aptEnabled) {
667
        if (aptEnabled) {
667
            for (Map.Entry<? extends String, ? extends String> entry : aptUtils.processorOptions().entrySet()) {
668
            for (Map.Entry<? extends String, ? extends String> entry : aptUtils.processorOptions().entrySet()) {
668
                StringBuilder sb = new StringBuilder();
669
                StringBuilder sb = new StringBuilder();

Return to bug 183793