Error reporting

1 view
Skip to first unread message

Robert Munteanu

unread,
Jun 30, 2010, 5:00:20 PM6/30/10
to gwt-mpv-apt
Hi,

There are several naming conventions which must be followed
- class name ends in Spec/EventSpec;
- parameter names should be {in,out}{digits}{name}

If these conventions are not used, the user is not notified.

It would be nice to have the processor report warnings using the
Reporter api ( IIRC ). These will be handled by both javac and
Eclipse.

Robert

--
Sent from my (old) computer

Stephen Haberman

unread,
Jun 30, 2010, 5:06:19 PM6/30/10
to gwt-m...@googlegroups.com

Agreed all around.

> - class name ends in Spec/EventSpec;

This one I do output a warning for these:

http://github.com/stephenh/gwt-mpv-apt/blob/master/processor/src/org/gwtmpv/processor/DispatchGenerator.java#L28

But I don't think you see them ever in Eclipse 3.5. Just today I saw a
warning for this in the Error log of Eclipse 3.6. Which is still not
ideal--it should be in the Problems view, I think.

But there really isn't much I can do about this, it is just how the APT
API works.

One possibility is just outputting a `gwt-mpv-warnings.txt` text file
into the `apt` directory. The user would still have to notice it, so it
is not ideal.

Warnings for in/out is a good idea as well, but I'm not hugely inclined
to add it given this whole thing with APT warnings being hardly, if at
all, visible in Eclipse.

- Stephen

Robert Munteanu

unread,
Jun 30, 2010, 5:10:41 PM6/30/10
to gwt-m...@googlegroups.com
On Thu, Jul 1, 2010 at 12:06 AM, Stephen Haberman
<ste...@exigencecorp.com> wrote:
>
> Agreed all around.
>
>> - class name ends in Spec/EventSpec;
>
> This one I do output a warning for these:
>
> http://github.com/stephenh/gwt-mpv-apt/blob/master/processor/src/org/gwtmpv/processor/DispatchGenerator.java#L28
>
> But I don't think you see them ever in Eclipse 3.5. Just today I saw a
> warning for this in the Error log of Eclipse 3.6. Which is still not
> ideal--it should be in the Problems view, I think.

Hm, I'll have to get back to you on this one. I've done this before,
just need to dig up the code. I have definitely added warning/error
markers to the Java editor in Eclipse.

Robert

>
> But there really isn't much I can do about this, it is just how the APT
> API works.
>
> One possibility is just outputting a `gwt-mpv-warnings.txt` text file
> into the `apt` directory. The user would still have to notice it, so it
> is not ideal.
>
> Warnings for in/out is a good idea as well, but I'm not hugely inclined
> to add it given this whole thing with APT warnings being hardly, if at
> all, visible in Eclipse.
>
> - Stephen
>
>

--

Stephen Haberman

unread,
Jun 30, 2010, 5:25:22 PM6/30/10
to gwt-m...@googlegroups.com

> Hm, I'll have to get back to you on this one. I've done this before,
> just need to dig up the code. I have definitely added warning/error
> markers to the Java editor in Eclipse.

That'd be awesome.

Via the vanilla APT API or with Eclipse API code?

I'm somewhat hesitant to add Eclipse API-specific code to an otherwise
APT standard project, but if it's simple enough, and could auto-detect
Eclipse vs. javac, it would definitely be pretty cool.

- Stephen

Robert Munteanu

unread,
Jun 30, 2010, 5:25:48 PM6/30/10
to gwt-m...@googlegroups.com
On Thu, Jul 1, 2010 at 12:25 AM, Stephen Haberman
<ste...@exigencecorp.com> wrote:
>
>> Hm, I'll have to get back to you on this one. I've done this before,
>> just need to dig up the code. I have definitely added warning/error
>> markers to the Java editor in Eclipse.
>
> That'd be awesome.
>
> Via the vanilla APT API or with Eclipse API code?

Vanilla API.

Robert

>
> I'm somewhat hesitant to add Eclipse API-specific code to an otherwise
> APT standard project, but if it's simple enough, and could auto-detect
> Eclipse vs. javac, it would definitely be pretty cool.
>
> - Stephen
>
>

--

Stephen Haberman

unread,
Jun 30, 2010, 5:28:48 PM6/30/10
to gwt-m...@googlegroups.com

> Vanilla API.

Sweet!

- Stephen

Robert Munteanu

unread,
Jun 30, 2010, 5:32:26 PM6/30/10
to gwt-m...@googlegroups.com
Just sent you a pull request via github

http://github.com/rombert/gwt-mpv-apt/commit/6773e116f6e036f3d603e0eeea2a7db709e6bdff

On Thu, Jul 1, 2010 at 12:28 AM, Stephen Haberman
<ste...@exigencecorp.com> wrote:
>
>> Vanilla API.
>
> Sweet!

Stephen Haberman

unread,
Jun 30, 2010, 5:37:10 PM6/30/10
to gwt-m...@googlegroups.com

> http://github.com/rombert/gwt-mpv-apt/commit/6773e116f6e036f3d603e0eeea2a7db709e6bdff

Oh my word--how simple. That's awesome. I'll integrate it shortly.

Thanks!

- Stephen

Robert Munteanu

unread,
Jun 30, 2010, 5:40:37 PM6/30/10
to gwt-m...@googlegroups.com

:-) You're welcome.

Those were my exact thoughts when I stumbled upon it by accident.

Robert

Reply all
Reply to author
Forward
0 new messages