JSR 269 Annotation processor and eclipse [message #243458] |
Sat, 05 May 2007 18:08  |
Eclipse User |
|
|
|
I have tried to get the annotation processor going in 3.3M7 but without
success. I have configured an annotation processor in a jar file that I can
run with the java6 compiler. I have set the factory path and enabled
annotation processing. When pressing the advanced setting under factory path
i can see that eclipse can se my processors. What is the status of the
processor?
Regards
Freddie
|
|
|
Re: JSR 269 Annotation processor and eclipse [message #243469 is a reply to message #243458] |
Mon, 07 May 2007 12:17   |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Fredde" <fredde636@yahoo.se> wrote in message
news:f1iv97$h3s$1@build.eclipse.org...
>I have tried to get the annotation processor going in 3.3M7 but without
>success. I have configured an annotation processor in a jar file that I can
>run with the java6 compiler. I have set the factory path and enabled
>annotation processing. When pressing the advanced setting under factory
>path i can see that eclipse can se my processors. What is the status of the
>processor?
Hi, Freddie. In M7, JSR269 annotation processors are fully supported in the
batch compiler (that is, the compiler accessible through ecj.jar or through
the JSR199 javax.tools.JavaCompiler interface). If you have a processor
that is not behaving correctly when used that way, please file a bug against
JDT (APT component), including the processor if possible.
In the IDE in M7, the support is not yet very solid. Your processor should
get dispatched properly, and it should be able to generate new types and
report errors via the Messager interface. However, the errors get logged to
the error log rather than showing up as problem markers, and you need to do
a "clean" to get rid of generated files. This situation should be greatly
improved by RC1.
Is it possible that your processor is running, but sending its output
somewhere that you're not expecting (e.g., the error log instead of the
Problems view)? Is there any other information in the error log that might
be relevant?
Thanks,
-Walter Harley
JDT APT team
|
|
|
Re: JSR 269 Annotation processor and eclipse [message #243498 is a reply to message #243469] |
Tue, 08 May 2007 11:03   |
Eclipse User |
|
|
|
I have looked for the output but I cannot find it :) I can jun my processor
with the SUN javac compiler using the following:
javac -processorpath ${project_loc}/aprocessor.jar -proc:only -sourcepath
src src/*.java -s gen-src
and it works.
In the IDE select project -> properties -> Java compiler -> Annotation
Processor
I check Enable project specific settings and Enable annotation processing. I
then change the generated source directory to gen-src. After that I select
factory path and add jar. I select my processor jar file and checks enable
project specific settings. When selecting advanced my processors gets
visible in the dialog. I have tried to check run in batch mod on the dialog,
but nothing happens.
Regards
Fredde
"Walter Harley" <wharley@bea.com> skrev i meddelandet
news:f1njch$q09$1@build.eclipse.org...
> "Fredde" <fredde636@yahoo.se> wrote in message
> news:f1iv97$h3s$1@build.eclipse.org...
>>I have tried to get the annotation processor going in 3.3M7 but without
>>success. I have configured an annotation processor in a jar file that I
>>can run with the java6 compiler. I have set the factory path and enabled
>>annotation processing. When pressing the advanced setting under factory
>>path i can see that eclipse can se my processors. What is the status of
>>the processor?
>
> Hi, Freddie. In M7, JSR269 annotation processors are fully supported in
> the batch compiler (that is, the compiler accessible through ecj.jar or
> through the JSR199 javax.tools.JavaCompiler interface). If you have a
> processor that is not behaving correctly when used that way, please file a
> bug against JDT (APT component), including the processor if possible.
>
> In the IDE in M7, the support is not yet very solid. Your processor
> should get dispatched properly, and it should be able to generate new
> types and report errors via the Messager interface. However, the errors
> get logged to the error log rather than showing up as problem markers, and
> you need to do a "clean" to get rid of generated files. This situation
> should be greatly improved by RC1.
>
> Is it possible that your processor is running, but sending its output
> somewhere that you're not expecting (e.g., the error log instead of the
> Problems view)? Is there any other information in the error log that
> might be relevant?
>
> Thanks,
> -Walter Harley
> JDT APT team
>
|
|
|
|
|
|
Re: JSR 269 Annotation processor and eclipse [message #243616 is a reply to message #243524] |
Thu, 10 May 2007 09:56  |
Eclipse User |
|
|
|
I have submitted Bug#: 186301
Fredrik
"Walter Harley" <wharley@bea.com> skrev i meddelandet
news:f1qj1c$trf$1@build.eclipse.org...
> "Fredde" <fredde636@yahoo.se> wrote in message
> news:f1qfmm$263$1@build.eclipse.org...
>> Japp that is what I am trying and yes I am having Java 6 compliance and
>> jdk 1.6.0_01. I guess default the jre1.6.0_01 is used to run eclipse on
>> Windows XP. The plugin creates the gen-src directory for me though :)
>> .metadata/log is empty, Error Log is empty and Problems is empty...
>>
>> When creating a builder (program) with:
>>
>> Location: ${env_var:JAVA_HOME}/bin/javac.exe
>> Working Directory: ${workspace_loc:/TestProcessor}
>> Arguments: -processorpath
>> ../Processor/processor.jar -proc:only -sourcepath src
>> src/com/test/*.java -s gen-src
>>
>> it works.
>
> Can you submit a Bugzilla report, including your test processor jar and
> the annotated code you're trying to build? Also include your processor's
> source code, if possible. Report it against JDT component, APT
> subcomponent.
>
> Thanks,
> -Walter Harley
> JDT APT team
>
|
|
|
Powered by
FUDForum. Page generated in 0.04542 seconds