Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » Newbie Questions
Newbie Questions [message #5098] Fri, 04 October 2002 09:58 Go to next message
Eclipse UserFriend
Originally posted by: david_watkins.lbss.com

Hi,
I've just started trying out the AspectJ plugin for eclipse and I'm having
a few problems which may be installation/setup issues or (more likely)
it's me not 'getting it'. I installed the plugin and followed the
post-install instructions in the ajdt directory. I then decided to try
and follow chapter 1 of the developer's manual from the main AspectJ
website. I created an AspectJ project and then created the Point class
and then created an aspect class and put in a simple pointcut for the
'setters' and an 'after' to print a message that something had been set.
I then clicked on build and got the following message:

"Compile could not complete. See the console for more details..."

I'm not sure what console this is referring to. I've checked the console
view and the .log file but couldn't see anything. Anyway it had changed
my source, but I thought the aim of this approach was that it didn't
change my source code, rather it created a temporary .java file and
compiled that, mixing in the aspect code. To attempt to rectify this I
then looked through the project properties and setup a new working
directory (d:\temp) and reset the Point.java file back to it's original
state. I built again and it gave the same message. Looking in the temp
directory it had created the .java file but not the .class file. In fact
I couldn't find a .class file anywhere, so I guess the message is
referring to that. The .java in the temp dir had the interleaved code in
it.

I'm now going to try and run the examples by hand using the command line
tools to see if I can see where I'm going wrong but just thought I'd give
you feedback on a 'complete newbies' experience of the plugin. As I said
it's probably me not understanding how I'm supposed to set up a project.
Any help/advice would be gratefully accepted!

Thanks,
Dave Watkins
London Bridge Software






org.aspectj.ajde (1.0.6)
org.eclipse.ajdt.ui (0.5.2)
Re: Newbie Questions [message #5170 is a reply to message #5098] Fri, 04 October 2002 10:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: david_watkins.lbss.com

forgot to mention in my previous post, the only thing written in the "AJDT
Event Trace" is:

11:06:32 Building TestAspectJ with config
D:\eclipse\workspace\TestAspectJ\default.lst.

CLASSPATH=D:\eclipse\plugins\org.aspectj.ajde_1.0.6\aspectjr t.jar;D:\eclipse\jre\lib\rt.jar;D:\eclipse\plugins\org.aspec tj.ajde_1.0.6\aspectjrt.jar;D:\eclipse\workspace\TestAspectJ ;
11:06:33 Model update notification for TestAspect.java

Which isn't giving me any clues!

Thanks
dw
Re: Newbie Questions [message #5238 is a reply to message #5170] Fri, 04 October 2002 10:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: david_watkins.lbss.com

As is usually the case in these matters I decided for one last attempt at
sorting things out and have got to the point where it seems to be sort of
working! I created a new project ("TestAspectJTarget") and set the
aspectJ working directory preference of the source project ("TestAspectJ")
to that. I added the aspectJ runtime library to the build path of the
target project and then clicked on the build in the source directory. I
still get the warning message but when I clicked refresh on the target
directory it seemed to compile everything okay, running my Point class
then displayed the correct output!

I'm now out of the starting blocks and away! But I still suspect that
I've just come up with a workaround rather than the 'proper' way of doing
this.

Thanks,
dw
Re: Newbie Questions [message #6864 is a reply to message #5238] Wed, 09 October 2002 13:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: david_watkins.lbss.com

In a bid to get the longest running one-man thread I thought I'd post and
let you all know it was just my configuration options. I'd selected the
'Use javac to compile .class files' option in the project preferences.
Deselecting this made the error message go away and everything seems to be
working, and I must say I do like what I see!

Anyway, hopefully this may save someone else from spending a few hours (I
know I'm slow) puzzling over this. It does of course beg the question
what this option is for... but that's not important to me now ;)

Regards,
dw
Re: Newbie Questions [message #6883 is a reply to message #6864] Wed, 09 October 2002 21:03 Go to previous messageGo to next message
Jon Hatcher is currently offline Jon HatcherFriend
Messages: 26
Registered: July 2009
Junior Member
Dave,

Good to hear, people are listening. Eclipse is painful for the first 20
hours, I'm on hour 17 at the moment....
Jon

"Dave Watkins" <david_watkins@lbss.com> wrote in message
news:ao1c5v$q27$1@rogue.oti.com...
> In a bid to get the longest running one-man thread I thought I'd post and
> let you all know it was just my configuration options. I'd selected the
> 'Use javac to compile .class files' option in the project preferences.
> Deselecting this made the error message go away and everything seems to be
> working, and I must say I do like what I see!
>
> Anyway, hopefully this may save someone else from spending a few hours (I
> know I'm slow) puzzling over this. It does of course beg the question
> what this option is for... but that's not important to me now ;)
>
> Regards,
> dw
>
Re: Newbie Questions [message #6907 is a reply to message #6864] Thu, 10 October 2002 15:19 Go to previous message
Eclipse UserFriend
Originally posted by: Mik.Kersten.parc.com

"Dave Watkins" <david_watkins@lbss.com> wrote in message
news:ao1c5v$q27$1@rogue.oti.com...
> In a bid to get the longest running one-man thread I thought I'd post and
> let you all know it was just my configuration options. I'd selected the
> 'Use javac to compile .class files' option in the project preferences.
> Deselecting this made the error message go away and everything seems to be
> working, and I must say I do like what I see!
>
> Anyway, hopefully this may save someone else from spending a few hours (I
> know I'm slow) puzzling over this. It does of course beg the question
> what this option is for... but that's not important to me now ;)
>
> Regards,
> dw

Hi Dave,

I'm glad that you got things working. You're not the only to get confused
about the "use javac" option, and there seems to be a bug with it since you
saw the "Compile could not complete" report. I'll submit a bug report on
your behalf. We'll also explore a way to better inform the user when no
..class files will be generated, e.g. with a dialog after the option is
selected.

Regards,

Mik
--
Mik Kersten
Development Tools Lead
AspectJ Team, Palo Alto Research Center
http://www.parc.com/mkersten
Re: Newbie Questions [message #561802 is a reply to message #5098] Fri, 04 October 2002 10:08 Go to previous message
Dave Watkins is currently offline Dave WatkinsFriend
Messages: 4
Registered: July 2009
Junior Member
forgot to mention in my previous post, the only thing written in the "AJDT
Event Trace" is:

11:06:32 Building TestAspectJ with config
D:\eclipse\workspace\TestAspectJ\default.lst.

CLASSPATH=D:\eclipse\plugins\org.aspectj.ajde_1.0.6\aspectjr t.jar;D:\eclipse\jre\lib\rt.jar;D:\eclipse\plugins\org.aspec tj.ajde_1.0.6\aspectjrt.jar;D:\eclipse\workspace\TestAspectJ ;
11:06:33 Model update notification for TestAspect.java

Which isn't giving me any clues!

Thanks
dw
Re: Newbie Questions [message #561817 is a reply to message #5170] Fri, 04 October 2002 10:48 Go to previous message
Dave Watkins is currently offline Dave WatkinsFriend
Messages: 4
Registered: July 2009
Junior Member
As is usually the case in these matters I decided for one last attempt at
sorting things out and have got to the point where it seems to be sort of
working! I created a new project ("TestAspectJTarget") and set the
aspectJ working directory preference of the source project ("TestAspectJ")
to that. I added the aspectJ runtime library to the build path of the
target project and then clicked on the build in the source directory. I
still get the warning message but when I clicked refresh on the target
directory it seemed to compile everything okay, running my Point class
then displayed the correct output!

I'm now out of the starting blocks and away! But I still suspect that
I've just come up with a workaround rather than the 'proper' way of doing
this.

Thanks,
dw
Re: Newbie Questions [message #561863 is a reply to message #5238] Wed, 09 October 2002 13:49 Go to previous message
Dave Watkins is currently offline Dave WatkinsFriend
Messages: 4
Registered: July 2009
Junior Member
In a bid to get the longest running one-man thread I thought I'd post and
let you all know it was just my configuration options. I'd selected the
'Use javac to compile .class files' option in the project preferences.
Deselecting this made the error message go away and everything seems to be
working, and I must say I do like what I see!

Anyway, hopefully this may save someone else from spending a few hours (I
know I'm slow) puzzling over this. It does of course beg the question
what this option is for... but that's not important to me now ;)

Regards,
dw
Re: Newbie Questions [message #561883 is a reply to message #6864] Wed, 09 October 2002 21:03 Go to previous message
Jon Hatcher is currently offline Jon HatcherFriend
Messages: 26
Registered: July 2009
Junior Member
Dave,

Good to hear, people are listening. Eclipse is painful for the first 20
hours, I'm on hour 17 at the moment....
Jon

"Dave Watkins" <david_watkins@lbss.com> wrote in message
news:ao1c5v$q27$1@rogue.oti.com...
> In a bid to get the longest running one-man thread I thought I'd post and
> let you all know it was just my configuration options. I'd selected the
> 'Use javac to compile .class files' option in the project preferences.
> Deselecting this made the error message go away and everything seems to be
> working, and I must say I do like what I see!
>
> Anyway, hopefully this may save someone else from spending a few hours (I
> know I'm slow) puzzling over this. It does of course beg the question
> what this option is for... but that's not important to me now ;)
>
> Regards,
> dw
>
Re: Newbie Questions [message #561905 is a reply to message #6864] Thu, 10 October 2002 15:19 Go to previous message
Mik Kersten is currently offline Mik KerstenFriend
Messages: 287
Registered: July 2009
Senior Member
"Dave Watkins" <david_watkins@lbss.com> wrote in message
news:ao1c5v$q27$1@rogue.oti.com...
> In a bid to get the longest running one-man thread I thought I'd post and
> let you all know it was just my configuration options. I'd selected the
> 'Use javac to compile .class files' option in the project preferences.
> Deselecting this made the error message go away and everything seems to be
> working, and I must say I do like what I see!
>
> Anyway, hopefully this may save someone else from spending a few hours (I
> know I'm slow) puzzling over this. It does of course beg the question
> what this option is for... but that's not important to me now ;)
>
> Regards,
> dw

Hi Dave,

I'm glad that you got things working. You're not the only to get confused
about the "use javac" option, and there seems to be a bug with it since you
saw the "Compile could not complete" report. I'll submit a bug report on
your behalf. We'll also explore a way to better inform the user when no
..class files will be generated, e.g. with a dialog after the option is
selected.

Regards,

Mik
--
Mik Kersten
Development Tools Lead
AspectJ Team, Palo Alto Research Center
http://www.parc.com/mkersten
Previous Topic:Newbie Questions
Next Topic:AJDT Outliner
Goto Forum:
  


Current Time: Wed Sep 25 22:44:41 GMT 2024

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

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

Back to the top