Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » JSR 269 Annotation processor and eclipse
JSR 269 Annotation processor and eclipse [message #243458] Sat, 05 May 2007 18:08 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #243514 is a reply to message #243498] Tue, 08 May 2007 12:54 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Fredde" <fredde636@yahoo.se> wrote in message
news:f1q3gu$cus$1@build.eclipse.org...
>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.


So, you see the gen-src directory get created, but you are expecting your
processor to create some files there during a build and that is not
happening. Correct?

Do you have Java 1.6 compliance set in your compiler settings for the
project containing the annotated code?

Are you running Eclipse with a 1.6 JDK? The JSR-269 plugin
(org.eclipse.jdt.apt.pluggable.core) can't load otherwise.

Look in your error log (.metadata/.log) to see if there are any messages
about plugins not getting loaded, or any other error messages.
Re: JSR 269 Annotation processor and eclipse [message #243519 is a reply to message #243514] Tue, 08 May 2007 14:31 Go to previous messageGo to next message
Eclipse UserFriend
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.

"Walter Harley" <wharley@bea.com> skrev i meddelandet
news:f1q9vq$gfd$1@build.eclipse.org...
> "Fredde" <fredde636@yahoo.se> wrote in message
> news:f1q3gu$cus$1@build.eclipse.org...
>>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.
>
>
> So, you see the gen-src directory get created, but you are expecting your
> processor to create some files there during a build and that is not
> happening. Correct?
>
> Do you have Java 1.6 compliance set in your compiler settings for the
> project containing the annotated code?
>
> Are you running Eclipse with a 1.6 JDK? The JSR-269 plugin
> (org.eclipse.jdt.apt.pluggable.core) can't load otherwise.
>
> Look in your error log (.metadata/.log) to see if there are any messages
> about plugins not getting loaded, or any other error messages.
>
Re: JSR 269 Annotation processor and eclipse [message #243524 is a reply to message #243519] Tue, 08 May 2007 15:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"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
Re: JSR 269 Annotation processor and eclipse [message #243616 is a reply to message #243524] Thu, 10 May 2007 09:56 Go to previous message
Eclipse UserFriend
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
>
Previous Topic:Cannot add jre to eclipse 3.3M7
Next Topic:StackOverflowError in Eclipse 3.3M7 in Bindings.java
Goto Forum:
  


Current Time: Thu May 29 03:48:37 EDT 2025

Powered by FUDForum. Page generated in 0.04542 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top