Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [jdt-apt-dev] Only getting RECONCILE calls to process()

Hi, Emanuel.

To access the types in the APT plug-in (such as
EclipseAnnotationEnvironment), your processor needs to be a plug-in,
rather than just a jar file.  That way you can declare a dependency on
the APT plug-in, and your classloader will have access to the Eclipse
classes.  If you need any help making that happen - or if that's already
the way it is and you're still having trouble - let me know.  We don't
mean for the Eclipse-specific classes to be "secret and hidden" -
they're public API - but the nature of the Eclipse OSGi classloader
system is that it only gives access to a plug-in's classes to dependent
plug-ins.

I'm not sure why process() would not be getting called in BUILD on some
projects and not others.   
 - Can you identify any interesting difference between the projects?  
 - What happens if you create a new project and copy your source into
it?  
 - Are you able to create a minimal test case (processor and target
code) that displays the problem?  
 - Does your processor get run if you do a clean and then a build?
 - Does setting "run in batch mode" (on the Advanced dialog, from
Factory Path prefs) change anything?


By the way, you might wish to post questions like this to the JDT
newsgroup, so that the discussion will be archived; as a general rule of
thumb the mailing lists are for discussions among people developing the
feature in question, and the newsgroups are for everything else.  But
I'm happy to answer them over the apt-dev list as well.

  -Walter Harley
   JDT APT team
 

-----Original Message-----
From: jdt-apt-dev-bounces@xxxxxxxxxxx
[mailto:jdt-apt-dev-bounces@xxxxxxxxxxx] On Behalf Of Emanuel Greisen
Sent: Tuesday, August 15, 2006 6:59 AM
To: jdt-apt-dev@xxxxxxxxxxx
Subject: [jdt-apt-dev] Only getting RECONCILE calls to process()

Hi,

I have the wierdest situation. I have created an Annotation-plugin (from
the APTDemo.jar) and it's working like a charm... except on the project
for which it is intended.

The basic problem is that the "process()" method is ONLY called when
doing RECONCILE, never when doing BUILD.

I also think it is annoying that I cannot typecast the _env to
"EclipseAnnotationEnvironment" because its secret and hidden. Hence I
cannot (without doing evil reflection stuff) call the "getPhase()"
method.

I hope someone can give me any hint as to what could be wrong with my
project. I have tried a lot of stuff and looked all the settings over,
there seems to be nothing different there, the project is just never
build with my AnnotationProcessor.

I tried with "3.2" and currently I am running it on "Version: 3.3.0,
Build id: I20060810-1230" with a completely fresh workspace, to make
sure old crazy ".metadata" would not mess things up.

./Emanuel


_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.


Back to the top