Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Custom MessageHandler for static pointcuts

Hi Wes,

Thanks for your quick reply.  Unfortunately, I'm not forking, and I still
can't see what is happening.  Using Maven, I added the -X option to show
debugging output and saw that it was loading my IMessageHolder
implementation.  However, I still see no difference in behavior and I see no
exception.

Anyway, I did some digging through the source, as you suggested.  What I
found is that perhaps IMessageHolder is not used as I suspected.  I looked
at MessageHandler (the default IMessageHolder implementation), and it only
accumulates messages.  I don't know where the messages actually get sent to
output (or wherever they actually get sent -- logger/listener?).  I just
want to be able to capture error messages from 'declare warning'
declarations and write them to a file that I can transform into a report.

Cheers,
Chuck

> -----Original Message-----
> From: aspectj-users-admin@xxxxxxxxxxx
> [mailto:aspectj-users-admin@xxxxxxxxxxx]On Behalf Of Wes Isberg
> Sent: Thursday, September 23, 2004 7:13 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: Re: [aspectj-users] Custom MessageHandler for static pointcuts
>
>
> You're probably forking; there should be a log message saying
> "message holder ignored when forking [...]", but perhaps Ant
> has to be in verbose mode for you to see the log message. It's
> ignored when forking because it's implemented programmatically
> from Ant rather than being supported on the -ajc command line
> (which is what's forked).
>
> The documentation for MessageHandlers is just the mention in
> the iajc docs and the IMessageHandler source code.  See also
> the code for AjcTask (iajc) and org.aspectj.tools.Ajc.
>
> Hope this helps; let us know if it's something else...
>
> Wes
>
> P.S. - If you must fork, you might consider taking the messages
> in XML form from Ant and selecting your messages during the
> transform.  (I haven't done this myself, so I'm just speculating.)
>
> > ------------Original Message------------
> > From: "Charles Daniels" <cjd4@xxxxxxxxx>
> > To: aspectj-users@xxxxxxxxxxx
> > Date: Thu, Sep-23-2004 1:55 PM
> > Subject: [aspectj-users] Custom MessageHandler for static pointcuts
> >
> > Hi All,
> >
> > I am attempting to implement my own MessageHandler for collecting
> > "policy
> > violations" detected by static pointcuts (declare warning and declare
> > error).  I want my handler to generate an XML report that I can then
> > transform into an HTML report.  Unfortunately, when I run iajc, it
> > completely ignores the handler implementation that I specify (no error
> > message either).  I cannot find and documentation on the use of
> > MessageHandlers.  Can anybody shed some light on this topic?
> >
> > Thanks,
> > Chuck
> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > http://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top