Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Inconsistency with AJDT
Inconsistency with AJDT [message #19581] Wed, 16 April 2003 16:34 Go to next message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
thanks a million for AJDT guys for their zeal in helping me with my
problems. Here are some oddities I found building my projects with AJDT.
1. I used "aspect" as my package name. AspectJ compiler does not flag any
errors, but AJDT can't handle it and flag every AspectJ statement in the
included source files as error.
Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.

2. Similarly, I have the following error:
Kind Status Priority Description Resource In Folder Location
Error The type iiop collides with a package iiop.java job/com/ooc/OCI line
13

Both AspectJ and java compiler do not flag this as an error, but AJDT does.
I think this is close to some kind of bug somewhere in Eclipse. But I can't
figure out.

Thanks again.

Charles
Re: Inconsistency with AJDT [message #19824 is a reply to message #19581] Tue, 29 April 2003 19:46 Go to previous messageGo to next message
Julie Waterhouse is currently offline Julie WaterhouseFriend
Messages: 42
Registered: July 2009
Member
Hi Charles,

Re. #1) The problem is occurring because "aspect" is a keyword under
AspectJ. However, the "new package" wizard (which is vanilla Eclipse)
doesn't know about AspectJ's reserved words, so doesn't prevent you from
creating a package using them. If you try to create a package called
"class.foo" you will get an error before you are able to finish the
package creation. You are correct, however, that the ajc compiler doesn't
seem to have any trouble. I was able to compile and run an aspect in a
package called "aspect.foo". Looks like ajc is not making this check
(whereas it does choke on a package called "class.foo"). I have opened a
bug against AspectJ: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069
We'll see what they say!

Re. #2) I experimented a little with this by creating a type with the same
name as a package component. I only ran into a problem when the type in
question was *also* in the package called "aspect.foo". Here's my
scenario. In an ApsectJ project, I have:
-package "aspect.foo" containing class "testname"
-package "testname.aa.bb"
I see the syntax error "The type testname collides with a package."

If I move my "testname" class to a package other than the problem one
("aspect.foo"), then this error goes away, so I think this problem is a
non-issue because you can't/shouldn't use that package name anyway. Note
that this is an unusual situation because naming conventions usually
dictate that class names are capitalised and package names start with a
lower case letter. If I follow this convention, then the error never
appears (even when the class is in the erroneous aspect.foo package).

Regards,

Julie Waterhouse
AJDT Development


Charles Zhang wrote:

> thanks a million for AJDT guys for their zeal in helping me with my
> problems. Here are some oddities I found building my projects with AJDT.
> 1. I used "aspect" as my package name. AspectJ compiler does not flag any
> errors, but AJDT can't handle it and flag every AspectJ statement in the
> included source files as error.
> Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.

> 2. Similarly, I have the following error:
> Kind Status Priority Description Resource In Folder Location
> Error The type iiop collides with a package iiop.java job/com/ooc/OCI line
> 13

> Both AspectJ and java compiler do not flag this as an error, but AJDT does.
> I think this is close to some kind of bug somewhere in Eclipse. But I can't
> figure out.

> Thanks again.

> Charles
Re: Inconsistency with AJDT [message #21221 is a reply to message #19824] Tue, 13 May 2003 22:35 Go to previous messageGo to next message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, Julie, thanks for the clerification. For the second case where class
name collides with the package name, I picked up this error while compiling
the ORBacus source, an open source CORBA implementation from IONA. They
follow the naming conventions very well. I believe there is a reason why
they have to use a package name which is the same as the one of the class
names. I know that Java compiler is OK with it since I compiled the whole
thing under Sun Forte several times. I can't change their program structure.
I still think there is something strange about AJDT or Eclipse build
environment. Thanks for the help.

Charles Zhang
Middleware Systems Research Group
Department of Electrical and Computer Engineering
University of Toronto

"Julie Waterhouse" <juliew@ca.ibm.com> wrote in message
news:b8mkqn$lur$1@rogue.oti.com...
> Hi Charles,
>
> Re. #1) The problem is occurring because "aspect" is a keyword under
> AspectJ. However, the "new package" wizard (which is vanilla Eclipse)
> doesn't know about AspectJ's reserved words, so doesn't prevent you from
> creating a package using them. If you try to create a package called
> "class.foo" you will get an error before you are able to finish the
> package creation. You are correct, however, that the ajc compiler doesn't
> seem to have any trouble. I was able to compile and run an aspect in a
> package called "aspect.foo". Looks like ajc is not making this check
> (whereas it does choke on a package called "class.foo"). I have opened a
> bug against AspectJ: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069
> We'll see what they say!
>
> Re. #2) I experimented a little with this by creating a type with the same
> name as a package component. I only ran into a problem when the type in
> question was *also* in the package called "aspect.foo". Here's my
> scenario. In an ApsectJ project, I have:
> -package "aspect.foo" containing class "testname"
> -package "testname.aa.bb"
> I see the syntax error "The type testname collides with a package."
>
> If I move my "testname" class to a package other than the problem one
> ("aspect.foo"), then this error goes away, so I think this problem is a
> non-issue because you can't/shouldn't use that package name anyway. Note
> that this is an unusual situation because naming conventions usually
> dictate that class names are capitalised and package names start with a
> lower case letter. If I follow this convention, then the error never
> appears (even when the class is in the erroneous aspect.foo package).
>
> Regards,
>
> Julie Waterhouse
> AJDT Development
>
>
> Charles Zhang wrote:
>
> > thanks a million for AJDT guys for their zeal in helping me with my
> > problems. Here are some oddities I found building my projects with AJDT.
> > 1. I used "aspect" as my package name. AspectJ compiler does not flag
any
> > errors, but AJDT can't handle it and flag every AspectJ statement in the
> > included source files as error.
> > Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.
>
> > 2. Similarly, I have the following error:
> > Kind Status Priority Description Resource In Folder Location
> > Error The type iiop collides with a package iiop.java job/com/ooc/OCI
line
> > 13
>
> > Both AspectJ and java compiler do not flag this as an error, but AJDT
does.
> > I think this is close to some kind of bug somewhere in Eclipse. But I
can't
> > figure out.
>
> > Thanks again.
>
> > Charles
>
>
>
>
>
>
Re: Inconsistency with AJDT [message #21721 is a reply to message #21221] Thu, 15 May 2003 15:48 Go to previous message
Julie Waterhouse is currently offline Julie WaterhouseFriend
Messages: 42
Registered: July 2009
Member
You can take a look at Jim's comments in the bug I opened:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069

Julie Waterhouse
AJDT Team

Charles Zhang wrote:

> Hi, Julie, thanks for the clerification. For the second case where class
> name collides with the package name, I picked up this error while compiling
> the ORBacus source, an open source CORBA implementation from IONA. They
> follow the naming conventions very well. I believe there is a reason why
> they have to use a package name which is the same as the one of the class
> names. I know that Java compiler is OK with it since I compiled the whole
> thing under Sun Forte several times. I can't change their program structure.
> I still think there is something strange about AJDT or Eclipse build
> environment. Thanks for the help.

> Charles Zhang
> Middleware Systems Research Group
> Department of Electrical and Computer Engineering
> University of Toronto

> "Julie Waterhouse" <juliew@ca.ibm.com> wrote in message
> news:b8mkqn$lur$1@rogue.oti.com...
> > Hi Charles,
> >
> > Re. #1) The problem is occurring because "aspect" is a keyword under
> > AspectJ. However, the "new package" wizard (which is vanilla Eclipse)
> > doesn't know about AspectJ's reserved words, so doesn't prevent you from
> > creating a package using them. If you try to create a package called
> > "class.foo" you will get an error before you are able to finish the
> > package creation. You are correct, however, that the ajc compiler doesn't
> > seem to have any trouble. I was able to compile and run an aspect in a
> > package called "aspect.foo". Looks like ajc is not making this check
> > (whereas it does choke on a package called "class.foo"). I have opened a
> > bug against AspectJ: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069
> > We'll see what they say!
> >
> > Re. #2) I experimented a little with this by creating a type with the same
> > name as a package component. I only ran into a problem when the type in
> > question was *also* in the package called "aspect.foo". Here's my
> > scenario. In an ApsectJ project, I have:
> > -package "aspect.foo" containing class "testname"
> > -package "testname.aa.bb"
> > I see the syntax error "The type testname collides with a package."
> >
> > If I move my "testname" class to a package other than the problem one
> > ("aspect.foo"), then this error goes away, so I think this problem is a
> > non-issue because you can't/shouldn't use that package name anyway. Note
> > that this is an unusual situation because naming conventions usually
> > dictate that class names are capitalised and package names start with a
> > lower case letter. If I follow this convention, then the error never
> > appears (even when the class is in the erroneous aspect.foo package).
> >
> > Regards,
> >
> > Julie Waterhouse
> > AJDT Development
> >
> >
> > Charles Zhang wrote:
> >
> > > thanks a million for AJDT guys for their zeal in helping me with my
> > > problems. Here are some oddities I found building my projects with AJDT.
> > > 1. I used "aspect" as my package name. AspectJ compiler does not flag
> any
> > > errors, but AJDT can't handle it and flag every AspectJ statement in the
> > > included source files as error.
> > > Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.
> >
> > > 2. Similarly, I have the following error:
> > > Kind Status Priority Description Resource In Folder Location
> > > Error The type iiop collides with a package iiop.java job/com/ooc/OCI
> line
> > > 13
> >
> > > Both AspectJ and java compiler do not flag this as an error, but AJDT
> does.
> > > I think this is close to some kind of bug somewhere in Eclipse. But I
> can't
> > > figure out.
> >
> > > Thanks again.
> >
> > > Charles
> >
> >
> >
> >
> >
> >
Re: Inconsistency with AJDT [message #566018 is a reply to message #19581] Tue, 29 April 2003 19:46 Go to previous message
Julie Waterhouse is currently offline Julie WaterhouseFriend
Messages: 42
Registered: July 2009
Member
Hi Charles,

Re. #1) The problem is occurring because "aspect" is a keyword under
AspectJ. However, the "new package" wizard (which is vanilla Eclipse)
doesn't know about AspectJ's reserved words, so doesn't prevent you from
creating a package using them. If you try to create a package called
"class.foo" you will get an error before you are able to finish the
package creation. You are correct, however, that the ajc compiler doesn't
seem to have any trouble. I was able to compile and run an aspect in a
package called "aspect.foo". Looks like ajc is not making this check
(whereas it does choke on a package called "class.foo"). I have opened a
bug against AspectJ: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069
We'll see what they say!

Re. #2) I experimented a little with this by creating a type with the same
name as a package component. I only ran into a problem when the type in
question was *also* in the package called "aspect.foo". Here's my
scenario. In an ApsectJ project, I have:
-package "aspect.foo" containing class "testname"
-package "testname.aa.bb"
I see the syntax error "The type testname collides with a package."

If I move my "testname" class to a package other than the problem one
("aspect.foo"), then this error goes away, so I think this problem is a
non-issue because you can't/shouldn't use that package name anyway. Note
that this is an unusual situation because naming conventions usually
dictate that class names are capitalised and package names start with a
lower case letter. If I follow this convention, then the error never
appears (even when the class is in the erroneous aspect.foo package).

Regards,

Julie Waterhouse
AJDT Development


Charles Zhang wrote:

> thanks a million for AJDT guys for their zeal in helping me with my
> problems. Here are some oddities I found building my projects with AJDT.
> 1. I used "aspect" as my package name. AspectJ compiler does not flag any
> errors, but AJDT can't handle it and flag every AspectJ statement in the
> included source files as error.
> Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.

> 2. Similarly, I have the following error:
> Kind Status Priority Description Resource In Folder Location
> Error The type iiop collides with a package iiop.java job/com/ooc/OCI line
> 13

> Both AspectJ and java compiler do not flag this as an error, but AJDT does.
> I think this is close to some kind of bug somewhere in Eclipse. But I can't
> figure out.

> Thanks again.

> Charles
Re: Inconsistency with AJDT [message #566827 is a reply to message #19824] Tue, 13 May 2003 22:35 Go to previous message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, Julie, thanks for the clerification. For the second case where class
name collides with the package name, I picked up this error while compiling
the ORBacus source, an open source CORBA implementation from IONA. They
follow the naming conventions very well. I believe there is a reason why
they have to use a package name which is the same as the one of the class
names. I know that Java compiler is OK with it since I compiled the whole
thing under Sun Forte several times. I can't change their program structure.
I still think there is something strange about AJDT or Eclipse build
environment. Thanks for the help.

Charles Zhang
Middleware Systems Research Group
Department of Electrical and Computer Engineering
University of Toronto

"Julie Waterhouse" <juliew@ca.ibm.com> wrote in message
news:b8mkqn$lur$1@rogue.oti.com...
> Hi Charles,
>
> Re. #1) The problem is occurring because "aspect" is a keyword under
> AspectJ. However, the "new package" wizard (which is vanilla Eclipse)
> doesn't know about AspectJ's reserved words, so doesn't prevent you from
> creating a package using them. If you try to create a package called
> "class.foo" you will get an error before you are able to finish the
> package creation. You are correct, however, that the ajc compiler doesn't
> seem to have any trouble. I was able to compile and run an aspect in a
> package called "aspect.foo". Looks like ajc is not making this check
> (whereas it does choke on a package called "class.foo"). I have opened a
> bug against AspectJ: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069
> We'll see what they say!
>
> Re. #2) I experimented a little with this by creating a type with the same
> name as a package component. I only ran into a problem when the type in
> question was *also* in the package called "aspect.foo". Here's my
> scenario. In an ApsectJ project, I have:
> -package "aspect.foo" containing class "testname"
> -package "testname.aa.bb"
> I see the syntax error "The type testname collides with a package."
>
> If I move my "testname" class to a package other than the problem one
> ("aspect.foo"), then this error goes away, so I think this problem is a
> non-issue because you can't/shouldn't use that package name anyway. Note
> that this is an unusual situation because naming conventions usually
> dictate that class names are capitalised and package names start with a
> lower case letter. If I follow this convention, then the error never
> appears (even when the class is in the erroneous aspect.foo package).
>
> Regards,
>
> Julie Waterhouse
> AJDT Development
>
>
> Charles Zhang wrote:
>
> > thanks a million for AJDT guys for their zeal in helping me with my
> > problems. Here are some oddities I found building my projects with AJDT.
> > 1. I used "aspect" as my package name. AspectJ compiler does not flag
any
> > errors, but AJDT can't handle it and flag every AspectJ statement in the
> > included source files as error.
> > Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.
>
> > 2. Similarly, I have the following error:
> > Kind Status Priority Description Resource In Folder Location
> > Error The type iiop collides with a package iiop.java job/com/ooc/OCI
line
> > 13
>
> > Both AspectJ and java compiler do not flag this as an error, but AJDT
does.
> > I think this is close to some kind of bug somewhere in Eclipse. But I
can't
> > figure out.
>
> > Thanks again.
>
> > Charles
>
>
>
>
>
>
Re: Inconsistency with AJDT [message #567148 is a reply to message #21221] Thu, 15 May 2003 15:48 Go to previous message
Julie Waterhouse is currently offline Julie WaterhouseFriend
Messages: 42
Registered: July 2009
Member
You can take a look at Jim's comments in the bug I opened:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069

Julie Waterhouse
AJDT Team

Charles Zhang wrote:

> Hi, Julie, thanks for the clerification. For the second case where class
> name collides with the package name, I picked up this error while compiling
> the ORBacus source, an open source CORBA implementation from IONA. They
> follow the naming conventions very well. I believe there is a reason why
> they have to use a package name which is the same as the one of the class
> names. I know that Java compiler is OK with it since I compiled the whole
> thing under Sun Forte several times. I can't change their program structure.
> I still think there is something strange about AJDT or Eclipse build
> environment. Thanks for the help.

> Charles Zhang
> Middleware Systems Research Group
> Department of Electrical and Computer Engineering
> University of Toronto

> "Julie Waterhouse" <juliew@ca.ibm.com> wrote in message
> news:b8mkqn$lur$1@rogue.oti.com...
> > Hi Charles,
> >
> > Re. #1) The problem is occurring because "aspect" is a keyword under
> > AspectJ. However, the "new package" wizard (which is vanilla Eclipse)
> > doesn't know about AspectJ's reserved words, so doesn't prevent you from
> > creating a package using them. If you try to create a package called
> > "class.foo" you will get an error before you are able to finish the
> > package creation. You are correct, however, that the ajc compiler doesn't
> > seem to have any trouble. I was able to compile and run an aspect in a
> > package called "aspect.foo". Looks like ajc is not making this check
> > (whereas it does choke on a package called "class.foo"). I have opened a
> > bug against AspectJ: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37069
> > We'll see what they say!
> >
> > Re. #2) I experimented a little with this by creating a type with the same
> > name as a package component. I only ran into a problem when the type in
> > question was *also* in the package called "aspect.foo". Here's my
> > scenario. In an ApsectJ project, I have:
> > -package "aspect.foo" containing class "testname"
> > -package "testname.aa.bb"
> > I see the syntax error "The type testname collides with a package."
> >
> > If I move my "testname" class to a package other than the problem one
> > ("aspect.foo"), then this error goes away, so I think this problem is a
> > non-issue because you can't/shouldn't use that package name anyway. Note
> > that this is an unusual situation because naming conventions usually
> > dictate that class names are capitalised and package names start with a
> > lower case letter. If I follow this convention, then the error never
> > appears (even when the class is in the erroneous aspect.foo package).
> >
> > Regards,
> >
> > Julie Waterhouse
> > AJDT Development
> >
> >
> > Charles Zhang wrote:
> >
> > > thanks a million for AJDT guys for their zeal in helping me with my
> > > problems. Here are some oddities I found building my projects with AJDT.
> > > 1. I used "aspect" as my package name. AspectJ compiler does not flag
> any
> > > errors, but AJDT can't handle it and flag every AspectJ statement in the
> > > included source files as error.
> > > Is this a AspectJ compiler issue or Eclipse issue? I'm not sure.
> >
> > > 2. Similarly, I have the following error:
> > > Kind Status Priority Description Resource In Folder Location
> > > Error The type iiop collides with a package iiop.java job/com/ooc/OCI
> line
> > > 13
> >
> > > Both AspectJ and java compiler do not flag this as an error, but AJDT
> does.
> > > I think this is close to some kind of bug somewhere in Eclipse. But I
> can't
> > > figure out.
> >
> > > Thanks again.
> >
> > > Charles
> >
> >
> >
> >
> >
> >
Previous Topic:Update manager can not differentiate between a development and an standard versi
Next Topic:Problem with Eclipse starting up
Goto Forum:
  


Current Time: Wed Apr 24 17:11:15 GMT 2024

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

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

Back to the top