Skip to main content



      Home
Home » Language IDEs » AspectJ » (again) Eclipse doesn't recognize introduced method
(again) Eclipse doesn't recognize introduced method [message #59305] Wed, 14 December 2005 15:56 Go to next message
Eclipse UserFriend
Originally posted by: ad-rocha.uol.com.br

Hi,

I'm posting this message again, because there was no replies...

I'm using intertype declarations in order to make my classes implement a
interface:

package br.com.example.aspectos;
public aspect Persistencia {
declare parents: br.com.example.model.* implements Persistente;
private int Persistente.chave = 0;
public int Persistente.getChave() {
return chave;
}
public void Persistente.setChave(int chave) {
this.chave = chave;
}
}

package br.com.example.aspectos;
public interface Persistente {
public int getChave();
public void setChave(int chave);
}


The compilation works fine, and I can see the method getChave() if I
decompile the "br.com.example.model.Pessoa" class. But when I try to use
this method, eclipse bombs with message: "The method getChave() is undefined
for classe Pessoa".

My current configuration is:

Eclipse Java Development Tools SDK
Version: 3.1.0
Build id: I20050627-1435

Eclipse AspectJ Development Tools
Version: 1.3.0
Build id: 20051208103628
AspectJ version: 1.5.0.20051206103951


What am I doing wrong?

Thanks,

Andr
Re: (again) Eclipse doesn't recognize introduced method [message #59411 is a reply to message #59305] Thu, 15 December 2005 04:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi André,

In what way does Eclipse bomb exactly? Is it just underlined in red in the
editor? If so, then that is because the class calling that method is open
in the Java editor, which isn't aware of the aspect providing the method.
Try opening the class in the AspectJ editor instead.

Regards,

Matt.

André Dantas Rocha wrote:

> Hi,

> I'm posting this message again, because there was no replies...

> I'm using intertype declarations in order to make my classes implement a
> interface:

> package br.com.example.aspectos;
> public aspect Persistencia {
> declare parents: br.com.example.model.* implements Persistente;
> private int Persistente.chave = 0;
> public int Persistente.getChave() {
> return chave;
> }
> public void Persistente.setChave(int chave) {
> this.chave = chave;
> }
> }

> package br.com.example.aspectos;
> public interface Persistente {
> public int getChave();
> public void setChave(int chave);
> }


> The compilation works fine, and I can see the method getChave() if I
> decompile the "br.com.example.model.Pessoa" class. But when I try to use
> this method, eclipse bombs with message: "The method getChave() is undefined
> for classe Pessoa".

> My current configuration is:

> Eclipse Java Development Tools SDK
> Version: 3.1.0
> Build id: I20050627-1435

> Eclipse AspectJ Development Tools
> Version: 1.3.0
> Build id: 20051208103628
> AspectJ version: 1.5.0.20051206103951


> What am I doing wrong?

> Thanks,

> André
Re: (again) Eclipse doesn't recognize introduced method [message #59461 is a reply to message #59411] Thu, 15 December 2005 18:33 Go to previous message
Eclipse UserFriend
Originally posted by: ad-rocha.uol.com.br

Thanks Matt! I opened the class using AspectJ editor and everything works
fine...

"Matt Chapman" <mpchapman@gmail.com> escreveu na mensagem
news:783d3572d370f7da5d705341cd6decfa$1@www.eclipse.org...
> Hi Andr
Re: (again) Eclipse doesn't recognize introduced method [message #591279 is a reply to message #59305] Thu, 15 December 2005 04:04 Go to previous message
Eclipse UserFriend
Hi André,

In what way does Eclipse bomb exactly? Is it just underlined in red in the
editor? If so, then that is because the class calling that method is open
in the Java editor, which isn't aware of the aspect providing the method.
Try opening the class in the AspectJ editor instead.

Regards,

Matt.

André Dantas Rocha wrote:

> Hi,

> I'm posting this message again, because there was no replies...

> I'm using intertype declarations in order to make my classes implement a
> interface:

> package br.com.example.aspectos;
> public aspect Persistencia {
> declare parents: br.com.example.model.* implements Persistente;
> private int Persistente.chave = 0;
> public int Persistente.getChave() {
> return chave;
> }
> public void Persistente.setChave(int chave) {
> this.chave = chave;
> }
> }

> package br.com.example.aspectos;
> public interface Persistente {
> public int getChave();
> public void setChave(int chave);
> }


> The compilation works fine, and I can see the method getChave() if I
> decompile the "br.com.example.model.Pessoa" class. But when I try to use
> this method, eclipse bombs with message: "The method getChave() is undefined
> for classe Pessoa".

> My current configuration is:

> Eclipse Java Development Tools SDK
> Version: 3.1.0
> Build id: I20050627-1435

> Eclipse AspectJ Development Tools
> Version: 1.3.0
> Build id: 20051208103628
> AspectJ version: 1.5.0.20051206103951


> What am I doing wrong?

> Thanks,

> André
Re: (again) Eclipse doesn't recognize introduced method [message #591298 is a reply to message #59411] Thu, 15 December 2005 18:33 Go to previous message
Eclipse UserFriend
Originally posted by: ad-rocha.uol.com.br

Thanks Matt! I opened the class using AspectJ editor and everything works
fine...

"Matt Chapman" <mpchapman@gmail.com> escreveu na mensagem
news:783d3572d370f7da5d705341cd6decfa$1@www.eclipse.org...
> Hi Andr
Previous Topic:AJDT 1.2.1RC1 and 1.3.0RC1 now available
Next Topic:AJDT and workspace JRE
Goto Forum:
  


Current Time: Sun May 04 15:43:07 EDT 2025

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

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

Back to the top