Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] Generic types and AJDT 1.6.4, problem with completion

Procedure to reproduce the bug :
  • create a new java project
  • add aspectJ nature (right click on project / aspectJ Tools / convert to aspectJ project)
create this class :
package hello;

public class Hello<N extends Number> {
    public void hello(N number, Number otherNumber) {
        number.<caret is here>
    }
}
If I press Ctrl+space, automatic completion should displayed some functions like toString() or byteValue() but instead I see a red error message on bottom : "N cannot be resolved to a type".
If I remove the AspectJ nature, the automatic completion works fine.
If I use the automatic completion with parameter "otherNumber", everything is OK

I have made this test on eclipse 3.3 with AJDT 1.5.3 and the problem is not present.

So, this problem only affect eclipse 3.4 with generics types.

I can send an example project or make other test if it can help you.

Thanks
Jean-Marc


2009/3/25 Andrew Eisenberg <andrew@xxxxxxxxxxxx>
This looks like a bug.  Can you paste in some sample code that is
giving you this problem (and mark where your caret is when content
assist gives you the error)?  I'm having trouble understanding what
you are trying to do.

2009/3/25 Jean-Marc Desprez <jm.desprez@xxxxxxxxx>:
> Hi,
> I have successfully installed AJDT 1.6.4 builds for Eclipse 3.4 with JDT
> weaving (using the update site).
>
> However I have a problem with automatic completion which doesn't work
> anymore with generic types.
> For exemple, in this class :
> public abstract class SaxParserHandler<S extends MyObject....
> ...
> S find = ....
> Completion doesn't work on "find", error message is "S cannot be resolved to
> a type"
>
> If I remove the aspectJ nature from the project, completion works again.
>
> Is this a known issue ? If so is there a fix to get completion back ?
>
> Thanks
>
> Jean-Marc
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>
>
_______________________________________________
ajdt-dev mailing list
ajdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ajdt-dev


Back to the top