GWT 1.5 targets Java 1.5. @Override when implementing an interface is
an error in Java 1.5. If Eclipse is suggesting @Override in those
cases then it is probably set to use a 1.6 JRE instead of 1.5. In 1.6
@Override is acceptable for either implementing interfaces or
overriding methods in parent classes.
On Tue, Nov 25, 2008 at 6:12 AM, Jason Morris <[EMAIL PROTECTED]> wrote:
>
> The GWT Compiler doesn't like to have @Override on an interface method, if
> the method definition
> comes from a class it's happy, but if the direct parent declaration is in an
> interface it won't compile.
>
> [EMAIL PROTECTED] wrote:
>> I get the error message in the development shell:
>>
>> The method onClick(Widget) of type new ClickListener(){} must
>> override a superclass method
>>
>> When I do
>>
>> addClickListener(new ClickListener() {
>>
>> @Override
>> public void onClick(Widget sender) { ...
>>
>> but all is fine if I have
>>
>> addClickListener(new ClickListener() {
>>
>> public void onClick(Widget sender) { ...
>>
>>
>> Why is it wrong to include "@Override"? Eclipse quick fix puts it
>> there for me.
>>
>> Best,
>>
>> -ken
>> >
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---