Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Help with AJDT
Help with AJDT [message #19054] Fri, 11 April 2003 06:29 Go to next message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, I'm trying to use Eclipse for building a very large system
consisting of 2-3000 classes. I'm wondering what the exact process is
for importing or attaching to the existing code bases. Here is a summary
of what I did:
1. I seem to have followed the normal ways of creating the AspectJ
project using the wizard. I created a project and indicated the source
directory to be the same as the existing source.
2. I selected the ".lst" file that I uses for building the project on
the command line. The project and the configuration file work well on
the command line.
3. Eclipse finishes the build but complains about almost all the AspectJ
syntax as synatical errors.
Am I donig something stupid? Help is greatly appreciated.

Charles
Re: Help with AJDT [message #19222 is a reply to message #19054] Fri, 11 April 2003 12:30 Go to previous messageGo to next message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi Charles,

Have you been through the post-installation configuration steps that are
described in the release notes accompanying the AJDT plugins ? Assuming
that
you are using the latest AJDT release (1.1.1) they can be found on your
local system in the document ...

<your eclipse install
dir>/plugins/org.eclipse.ajdt.ui_0.6.1/releaseNotes/readme.html

Please post back if these steps don't sort things out for you.

Bye for now,
George

On Fri, 11 Apr 2003 02:29:15 -0400, Charles <czhang@eecg.utoronto.ca>
wrote:

> Hi, I'm trying to use Eclipse for building a very large system consisting
> of 2-3000 classes. I'm wondering what the exact process is for importing
> or attaching to the existing code bases. Here is a summary of what I did:
> 1. I seem to have followed the normal ways of creating the AspectJ
> project using the wizard. I created a project and indicated the source
> directory to be the same as the existing source.
> 2. I selected the ".lst" file that I uses for building the project on the
> command line. The project and the configuration file work well on the
> command line.
> 3. Eclipse finishes the build but complains about almost all the AspectJ
> syntax as synatical errors.
> Am I donig something stupid? Help is greatly appreciated.
>
> Charles
>
>



--
George Harley
AJDT Development
Re: Help with AJDT [message #19236 is a reply to message #19222] Fri, 11 April 2003 16:28 Go to previous messageGo to next message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
George Harley wrote:
> Hi Charles,
>
> Have you been through the post-installation configuration steps that are
> described in the release notes accompanying the AJDT plugins ? Assuming
> that
> you are using the latest AJDT release (1.1.1) they can be found on your
> local system in the document ...
>
> <your eclipse install
> dir>/plugins/org.eclipse.ajdt.ui_0.6.1/releaseNotes/readme.html
>
> Please post back if these steps don't sort things out for you.
>
> Bye for now,
> George
>
> On Fri, 11 Apr 2003 02:29:15 -0400, Charles <czhang@eecg.utoronto.ca>
> wrote:
>
>> Hi, I'm trying to use Eclipse for building a very large system
>> consisting of 2-3000 classes. I'm wondering what the exact process is
>> for importing or attaching to the existing code bases. Here is a
>> summary of what I did:
>> 1. I seem to have followed the normal ways of creating the AspectJ
>> project using the wizard. I created a project and indicated the source
>> directory to be the same as the existing source.
>> 2. I selected the ".lst" file that I uses for building the project on
>> the command line. The project and the configuration file work well on
>> the command line.
>> 3. Eclipse finishes the build but complains about almost all the
>> AspectJ syntax as synatical errors.
>> Am I donig something stupid? Help is greatly appreciated.
>>
>> Charles
>>
>>
>
>
>
Hi, George, thanks for the response. I tried the post installation
procedures. Then I removed the AspectJ nature and added back again. I
know the AJDT environment is installed because all the AspectJ keywords
are highlighted.
Like I described in the last email, I selected a pre-assembled build
list and still had all regular AspectJ syntax reported as errors. One
message is as follows:
Kind Status Priority Description Resource In Folder Location
Error Syntax error on token "aspect", "Identifier" expected
DelegateDII.java orb/aspect/dii/weave line 2

As a note, I hand compile my project using ajc 1.0.6. Although I don't
suspect the new version of ajc would cause any problems, this might give
you more context of what I am trying to do.

All my project files work fine when I handcompile. So there should be
nothing wrong with the source code.

Thanks a lot for your help

Charles
Re: Help with AJDT [message #19257 is a reply to message #19236] Fri, 11 April 2003 18:20 Go to previous messageGo to next message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi Charles,

I think I need some clarification of your setup. If I understand your
previous notes correctly (and don't take that for granted as it is late
Friday afternoon here !) you are doing the following :-

* On the command line you are running ajc version 1.0.6 (built 24-Jul-02
etc)
* On that command line you are able to do a successful compile using
something like $>ajc -argfile MyBuildFile.lst where MyBuildFile.lst is
your pre-assembled build list.
* Not changing any source nor your .lst file you import everything into a
new AspectJ project in Eclipse.
(Q1: Which version of Eclipse ?)
(Q2: What version of JVM is running Eclipse ?)
(Q3: Which version of the AJDT plugin ?)
* In your Eclipse AspectJ project you select the existing .lst file that
worked on the command line and use it to do a project build. The build
fails with a bunch of errors related to AspectJ syntax.

I tried to recreate all of the above starting from a simple Java class with
one aspect that built successfully on the command line using ajc 1.0.6.
Next
I imported this into a new Eclipse AspectJ project (where the Eclipse was
at
2.1 final and the AJDT plugin was at 1.1.1) being careful not to change the
simple .lst file that had worked for me on the command line. But alas -
everything worked fine for me !

The only two ways I could make my Eclipse project fail like yours was to :-

(a) right click on my project in the Package Explorer window of my Java
Perspective and select "Remove AspectJ Nature." Then I immediately saw
syntax problems like you describe.
(b) open up the project's properties and explicitly remove the
aspectjrt.jar
from the Java Build Path. Once again I immediately saw your kind of
syntax problems.

With the above in mind, could you please check that once you have converted
the project back to an AspectJ project you can still see aspectjrt.jar in
your
build path. It should be visible in the Package Explorer. If it is not
present
then you can add it back in using properties->Java build path->Libraries
tab->
add external jars... You can then navigate to and select the aspectjrt.jar
that
came with the AJDT plugin you have installed on your Eclipse. With my setup
this meant I had to go to

<eclipse install dir>/plugins/org.aspectj.ajde_1.1.1/aspectjrt.jar

Once aspectjrt.jar is back in your project then do a new build and see what
happens. Note that it is only with the latest version (1.1.1) of the AJDT
plugin that aspectjrt.jar is automatically added to your project when you
convert it to an AspectJ project. If you are using an older version of the
plugin then you have to add it into the build path yourself as described
above. If you have not yet upgraded to the latest version of AJDT plugin
then I suggest you do so. Follow the "Downloads" link off the AJDT home
page
at http://www.eclipse.org/ajdt .

Hope this helps,
George

On Fri, 11 Apr 2003 12:28:42 -0400, Charles <czhang@eecg.utoronto.ca>
wrote:
> Hi, George, thanks for the response. I tried the post installation
> procedures. Then I removed the AspectJ nature and added back again. I
> know the AJDT environment is installed because all the AspectJ keywords
> are highlighted.
> Like I described in the last email, I selected a pre-assembled build list
> and still had all regular AspectJ syntax reported as errors. One message
> is as follows:
> Kind Status Priority Description Resource In Folder Location
> Error Syntax error on token "aspect", "Identifier" expected
> DelegateDII.java orb/aspect/dii/weave line 2
>
> As a note, I hand compile my project using ajc 1.0.6. Although I don't
> suspect the new version of ajc would cause any problems, this might give
> you more context of what I am trying to do.
>
> All my project files work fine when I handcompile. So there should be
> nothing wrong with the source code.
>
> Thanks a lot for your help
>
> Charles
>
>
Re: Help with AJDT [message #19356 is a reply to message #19257] Tue, 15 April 2003 05:09 Go to previous messageGo to next message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, George, thanks so much for your help. I spent the past weekend and
finally figured out what is wrong. The reason is that my top level
package name is called "aspect". Although the AspectJ compiler does not
complain, Eclipse seems to go crazy and complain everything is wrong in
AspectJ syntax. But, right now everything compiles after I changed the
package name to something else.
Now, it would be really great to see the debugging part working. I used
to use Forte to build my project. It magically steps through my aspect
programs in debugging without even the aspectj pluggin. I hope it is not
too complicated to do that in Eclipse. Do you have an anticipated date
when the debugging would be available.

Thanks again for the help.

Charles
Re: Help with AJDT [message #19402 is a reply to message #19356] Tue, 15 April 2003 07:57 Go to previous message
Eclipse UserFriend
Originally posted by: adrian_colyer.uk.ibm.com

Charles wrote:

> Now, it would be really great to see the debugging part working. I used
> to use Forte to build my project. It magically steps through my aspect
> programs in debugging without even the aspectj pluggin. I hope it is not
> too complicated to do that in Eclipse. Do you have an anticipated date
> when the debugging would be available.

> Thanks again for the help.

> Charles

With the 1.1.1 release (i.e. the current release from the download page,
dated 14th March) we can now support debugging :-). You can set
breakpoints in regular Java classes (but not yet in aspects) and then use
"step into" in the debugger to step into the execution of advice. This
works well with before and after advice, but not so well with around
advice that gets inlined by the compiler. We do of course have plans to
get the whole show working in time.

-- Adrian.
Re: Help with AJDT [message #565512 is a reply to message #19054] Fri, 11 April 2003 12:30 Go to previous message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi Charles,

Have you been through the post-installation configuration steps that are
described in the release notes accompanying the AJDT plugins ? Assuming
that
you are using the latest AJDT release (1.1.1) they can be found on your
local system in the document ...

<your eclipse install
dir>/plugins/org.eclipse.ajdt.ui_0.6.1/releaseNotes/readme.html

Please post back if these steps don't sort things out for you.

Bye for now,
George

On Fri, 11 Apr 2003 02:29:15 -0400, Charles <czhang@eecg.utoronto.ca>
wrote:

> Hi, I'm trying to use Eclipse for building a very large system consisting
> of 2-3000 classes. I'm wondering what the exact process is for importing
> or attaching to the existing code bases. Here is a summary of what I did:
> 1. I seem to have followed the normal ways of creating the AspectJ
> project using the wizard. I created a project and indicated the source
> directory to be the same as the existing source.
> 2. I selected the ".lst" file that I uses for building the project on the
> command line. The project and the configuration file work well on the
> command line.
> 3. Eclipse finishes the build but complains about almost all the AspectJ
> syntax as synatical errors.
> Am I donig something stupid? Help is greatly appreciated.
>
> Charles
>
>



--
George Harley
AJDT Development
Re: Help with AJDT [message #565539 is a reply to message #19222] Fri, 11 April 2003 16:28 Go to previous message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
George Harley wrote:
> Hi Charles,
>
> Have you been through the post-installation configuration steps that are
> described in the release notes accompanying the AJDT plugins ? Assuming
> that
> you are using the latest AJDT release (1.1.1) they can be found on your
> local system in the document ...
>
> <your eclipse install
> dir>/plugins/org.eclipse.ajdt.ui_0.6.1/releaseNotes/readme.html
>
> Please post back if these steps don't sort things out for you.
>
> Bye for now,
> George
>
> On Fri, 11 Apr 2003 02:29:15 -0400, Charles <czhang@eecg.utoronto.ca>
> wrote:
>
>> Hi, I'm trying to use Eclipse for building a very large system
>> consisting of 2-3000 classes. I'm wondering what the exact process is
>> for importing or attaching to the existing code bases. Here is a
>> summary of what I did:
>> 1. I seem to have followed the normal ways of creating the AspectJ
>> project using the wizard. I created a project and indicated the source
>> directory to be the same as the existing source.
>> 2. I selected the ".lst" file that I uses for building the project on
>> the command line. The project and the configuration file work well on
>> the command line.
>> 3. Eclipse finishes the build but complains about almost all the
>> AspectJ syntax as synatical errors.
>> Am I donig something stupid? Help is greatly appreciated.
>>
>> Charles
>>
>>
>
>
>
Hi, George, thanks for the response. I tried the post installation
procedures. Then I removed the AspectJ nature and added back again. I
know the AJDT environment is installed because all the AspectJ keywords
are highlighted.
Like I described in the last email, I selected a pre-assembled build
list and still had all regular AspectJ syntax reported as errors. One
message is as follows:
Kind Status Priority Description Resource In Folder Location
Error Syntax error on token "aspect", "Identifier" expected
DelegateDII.java orb/aspect/dii/weave line 2

As a note, I hand compile my project using ajc 1.0.6. Although I don't
suspect the new version of ajc would cause any problems, this might give
you more context of what I am trying to do.

All my project files work fine when I handcompile. So there should be
nothing wrong with the source code.

Thanks a lot for your help

Charles
Re: Help with AJDT [message #565567 is a reply to message #19236] Fri, 11 April 2003 18:20 Go to previous message
George Harley is currently offline George HarleyFriend
Messages: 70
Registered: July 2009
Member
Hi Charles,

I think I need some clarification of your setup. If I understand your
previous notes correctly (and don't take that for granted as it is late
Friday afternoon here !) you are doing the following :-

* On the command line you are running ajc version 1.0.6 (built 24-Jul-02
etc)
* On that command line you are able to do a successful compile using
something like $>ajc -argfile MyBuildFile.lst where MyBuildFile.lst is
your pre-assembled build list.
* Not changing any source nor your .lst file you import everything into a
new AspectJ project in Eclipse.
(Q1: Which version of Eclipse ?)
(Q2: What version of JVM is running Eclipse ?)
(Q3: Which version of the AJDT plugin ?)
* In your Eclipse AspectJ project you select the existing .lst file that
worked on the command line and use it to do a project build. The build
fails with a bunch of errors related to AspectJ syntax.

I tried to recreate all of the above starting from a simple Java class with
one aspect that built successfully on the command line using ajc 1.0.6.
Next
I imported this into a new Eclipse AspectJ project (where the Eclipse was
at
2.1 final and the AJDT plugin was at 1.1.1) being careful not to change the
simple .lst file that had worked for me on the command line. But alas -
everything worked fine for me !

The only two ways I could make my Eclipse project fail like yours was to :-

(a) right click on my project in the Package Explorer window of my Java
Perspective and select "Remove AspectJ Nature." Then I immediately saw
syntax problems like you describe.
(b) open up the project's properties and explicitly remove the
aspectjrt.jar
from the Java Build Path. Once again I immediately saw your kind of
syntax problems.

With the above in mind, could you please check that once you have converted
the project back to an AspectJ project you can still see aspectjrt.jar in
your
build path. It should be visible in the Package Explorer. If it is not
present
then you can add it back in using properties->Java build path->Libraries
tab->
add external jars... You can then navigate to and select the aspectjrt.jar
that
came with the AJDT plugin you have installed on your Eclipse. With my setup
this meant I had to go to

<eclipse install dir>/plugins/org.aspectj.ajde_1.1.1/aspectjrt.jar

Once aspectjrt.jar is back in your project then do a new build and see what
happens. Note that it is only with the latest version (1.1.1) of the AJDT
plugin that aspectjrt.jar is automatically added to your project when you
convert it to an AspectJ project. If you are using an older version of the
plugin then you have to add it into the build path yourself as described
above. If you have not yet upgraded to the latest version of AJDT plugin
then I suggest you do so. Follow the "Downloads" link off the AJDT home
page
at http://www.eclipse.org/ajdt .

Hope this helps,
George

On Fri, 11 Apr 2003 12:28:42 -0400, Charles <czhang@eecg.utoronto.ca>
wrote:
> Hi, George, thanks for the response. I tried the post installation
> procedures. Then I removed the AspectJ nature and added back again. I
> know the AJDT environment is installed because all the AspectJ keywords
> are highlighted.
> Like I described in the last email, I selected a pre-assembled build list
> and still had all regular AspectJ syntax reported as errors. One message
> is as follows:
> Kind Status Priority Description Resource In Folder Location
> Error Syntax error on token "aspect", "Identifier" expected
> DelegateDII.java orb/aspect/dii/weave line 2
>
> As a note, I hand compile my project using ajc 1.0.6. Although I don't
> suspect the new version of ajc would cause any problems, this might give
> you more context of what I am trying to do.
>
> All my project files work fine when I handcompile. So there should be
> nothing wrong with the source code.
>
> Thanks a lot for your help
>
> Charles
>
>
Re: Help with AJDT [message #565618 is a reply to message #19257] Tue, 15 April 2003 05:09 Go to previous message
charles is currently offline charlesFriend
Messages: 14
Registered: July 2009
Junior Member
Hi, George, thanks so much for your help. I spent the past weekend and
finally figured out what is wrong. The reason is that my top level
package name is called "aspect". Although the AspectJ compiler does not
complain, Eclipse seems to go crazy and complain everything is wrong in
AspectJ syntax. But, right now everything compiles after I changed the
package name to something else.
Now, it would be really great to see the debugging part working. I used
to use Forte to build my project. It magically steps through my aspect
programs in debugging without even the aspectj pluggin. I hope it is not
too complicated to do that in Eclipse. Do you have an anticipated date
when the debugging would be available.

Thanks again for the help.

Charles
Re: Help with AJDT [message #565681 is a reply to message #19356] Tue, 15 April 2003 07:57 Go to previous message
Adrian Colyer is currently offline Adrian ColyerFriend
Messages: 61
Registered: July 2009
Member
Charles wrote:

> Now, it would be really great to see the debugging part working. I used
> to use Forte to build my project. It magically steps through my aspect
> programs in debugging without even the aspectj pluggin. I hope it is not
> too complicated to do that in Eclipse. Do you have an anticipated date
> when the debugging would be available.

> Thanks again for the help.

> Charles

With the 1.1.1 release (i.e. the current release from the download page,
dated 14th March) we can now support debugging :-). You can set
breakpoints in regular Java classes (but not yet in aspects) and then use
"step into" in the debugger to step into the execution of advice. This
works well with before and after advice, but not so well with around
advice that gets inlined by the compiler. We do of course have plans to
get the whole show working in time.

-- Adrian.
Previous Topic:Meta-info for projects?
Next Topic:Meta-info for projects?
Goto Forum:
  


Current Time: Sat Dec 21 16:47:58 GMT 2024

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

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

Back to the top