Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » ITDed method refers to missing type
ITDed method refers to missing type [message #73303] Mon, 23 February 2009 16:38 Go to next message
Filip Croes is currently offline Filip CroesFriend
Messages: 14
Registered: July 2009
Junior Member
While playing along with AJDT and AspectJ Inter Type Declarations I came
across the following annoyance:

When I create an Aspect with an ITD method that returns a custom class
object (from an included dependency) and declare the necessary import
statements in my Aspect, those imports are not automatically weaved in. It
gives me the error "The method ... from the type ... refers to the missing
type ..." in my client application, without an Eclipse quick fix
suggestion :|

When I add the imports manually, everything compiles correctly...
but! a CTRL-SHIFT-F will remove the import again :(

Since we have a team rule to always format the code before committing, I
expect a lot of problems here!
Re: ITDed method refers to missing type [message #73340 is a reply to message #73303] Mon, 23 February 2009 18:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: andrew.eisenberg.springsource.com

In the past, there was a bug that if ITDs were not fully qualified *or* the
target type did not import the referenced classes, there would be the editor
error that you mentioned below. I thought that this had been addressed in
recent releases of AJDT, but apparently not.

In the short term, you can try fully-qualifying the ITDs (ie- java.util.List
MyClass.doSomething(java.util.Set set) { ... } ). See if that addresses
your problem.

Can you send the offending ITDs to me. Would be great if you can include
the full aspect and target type. If you don't want to send to the
newsgroup, you can send to me directly.


On 23/02/09 8:38 AM, in article
cf011e0db94ad43550a8e692342f0894$1@www.eclipse.org, "Filip Croes"
<filip.croes@cronos.be> wrote:

> While playing along with AJDT and AspectJ Inter Type Declarations I came
> across the following annoyance:
>
> When I create an Aspect with an ITD method that returns a custom class
> object (from an included dependency) and declare the necessary import
> statements in my Aspect, those imports are not automatically weaved in. It
> gives me the error "The method ... from the type ... refers to the missing
> type ..." in my client application, without an Eclipse quick fix
> suggestion :|
>
> When I add the imports manually, everything compiles correctly...
> but! a CTRL-SHIFT-F will remove the import again :(
>
> Since we have a team rule to always format the code before committing, I
> expect a lot of problems here!
>
>
>
Re: ITDed method refers to missing type [message #73375 is a reply to message #73340] Tue, 24 February 2009 12:48 Go to previous messageGo to next message
Filip Croes is currently offline Filip CroesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

You were right, fully-qualifying the ITDs seems to solve the "missing
type" problem! Thanks.

I've uploaded a testproject where the bug is exposed. The key to
reproducing the problem is the annotation on the IApp interface.
http://www.2shared.com/file/4946991/815703b0/aspects-example 2.html

Also include in the ZIP is a screenshot of another issue I discovered: the
extract local variable refactoring complains about undefined ITDed methods.

Filip
Re: ITDed method refers to missing type [message #73406 is a reply to message #73375] Tue, 24 February 2009 18:08 Go to previous message
Eclipse UserFriend
Originally posted by: andrew.eisenberg.springsource.com

See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265986


On 24/02/09 4:48 AM, in article
bdce88722c83393d7f7606a6aabb3a2f$1@www.eclipse.org, "Filip Croes"
<filip.croes@cronos.be> wrote:

> Hi,
>
> You were right, fully-qualifying the ITDs seems to solve the "missing
> type" problem! Thanks.
>
> I've uploaded a testproject where the bug is exposed. The key to
> reproducing the problem is the annotation on the IApp interface.
> http://www.2shared.com/file/4946991/815703b0/aspects-example 2.html
>
> Also include in the ZIP is a screenshot of another issue I discovered: the
> extract local variable refactoring complains about undefined ITDed methods.
>
> Filip
>
Re: ITDed method refers to missing type [message #599699 is a reply to message #73303] Mon, 23 February 2009 18:56 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 77
Registered: July 2009
Member
In the past, there was a bug that if ITDs were not fully qualified *or* the
target type did not import the referenced classes, there would be the editor
error that you mentioned below. I thought that this had been addressed in
recent releases of AJDT, but apparently not.

In the short term, you can try fully-qualifying the ITDs (ie- java.util.List
MyClass.doSomething(java.util.Set set) { ... } ). See if that addresses
your problem.

Can you send the offending ITDs to me. Would be great if you can include
the full aspect and target type. If you don't want to send to the
newsgroup, you can send to me directly.


On 23/02/09 8:38 AM, in article
cf011e0db94ad43550a8e692342f0894$1@www.eclipse.org, "Filip Croes"
<filip.croes@cronos.be> wrote:

> While playing along with AJDT and AspectJ Inter Type Declarations I came
> across the following annoyance:
>
> When I create an Aspect with an ITD method that returns a custom class
> object (from an included dependency) and declare the necessary import
> statements in my Aspect, those imports are not automatically weaved in. It
> gives me the error "The method ... from the type ... refers to the missing
> type ..." in my client application, without an Eclipse quick fix
> suggestion :|
>
> When I add the imports manually, everything compiles correctly...
> but! a CTRL-SHIFT-F will remove the import again :(
>
> Since we have a team rule to always format the code before committing, I
> expect a lot of problems here!
>
>
>
Re: ITDed method refers to missing type [message #599714 is a reply to message #73340] Tue, 24 February 2009 12:48 Go to previous message
Filip Croes is currently offline Filip CroesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

You were right, fully-qualifying the ITDs seems to solve the "missing
type" problem! Thanks.

I've uploaded a testproject where the bug is exposed. The key to
reproducing the problem is the annotation on the IApp interface.
http://www.2shared.com/file/4946991/815703b0/aspects-example 2.html

Also include in the ZIP is a screenshot of another issue I discovered: the
extract local variable refactoring complains about undefined ITDed methods.

Filip
Re: ITDed method refers to missing type [message #599732 is a reply to message #73375] Tue, 24 February 2009 18:08 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 77
Registered: July 2009
Member
See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=265986


On 24/02/09 4:48 AM, in article
bdce88722c83393d7f7606a6aabb3a2f$1@www.eclipse.org, "Filip Croes"
<filip.croes@cronos.be> wrote:

> Hi,
>
> You were right, fully-qualifying the ITDs seems to solve the "missing
> type" problem! Thanks.
>
> I've uploaded a testproject where the bug is exposed. The key to
> reproducing the problem is the annotation on the IApp interface.
> http://www.2shared.com/file/4946991/815703b0/aspects-example 2.html
>
> Also include in the ZIP is a screenshot of another issue I discovered: the
> extract local variable refactoring complains about undefined ITDed methods.
>
> Filip
>
Previous Topic:'Syntax error on token "class"'-error with special package name
Next Topic:Problema class nested
Goto Forum:
  


Current Time: Thu Apr 25 22:10:41 GMT 2024

Powered by FUDForum. Page generated in 0.09853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top