Home » Language IDEs » AspectJ » Missing helpful error marks in AspectJ editor
|
Re: Missing helpful error marks in AspectJ editor [message #53796 is a reply to message #53584] |
Tue, 21 June 2005 13:14 |
Eclipse User |
|
|
|
Originally posted by: mchapman.uk.ibm.com
On Mon, 13 Jun 2005 16:53:53 +0000, Harry Sheng wrote:
> I moved my aspects to a separat AspectJ project, so my java projects
> contain java code only and AspectJ project contains AspectJ code only.
>
> Now when I compile the AspectJ project, I see compile errors in the
> [Problems] tab, but no error marks show up in the AspectJ editor. I used
> to see the errors marks in AspectJ editor when I mixed java code and
> AspectJ code in a single project. How can I get it back again?
Hi Harry,
Sorry for the delay. Are you still having problems with this? If so,
please raise a bug and we'll investigate further. Please include your
eclipse and AJDT version numbers.
> Another little problem I am having is, I extend a concrete aspect to
> create another aspect. In AJDT, I do not get any error or warning message.
> But if I build the project from the ANT script, I get a "cannot extend a
> concrete aspect" error. If AspectJ does not allow extending a concrete
> aspect, shouldn't AJDT fail the compile?
The AspectJ programming guide states: "It is an error for a concrete
aspect to extend another concrete aspect". You should of course get the
same error in AJDT - what version are you using? Maybe this is related to
the first problem.
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
| |
Re: Missing helpful error marks in AspectJ editor [message #53849 is a reply to message #53822] |
Wed, 22 June 2005 09:55 |
Eclipse User |
|
|
|
Originally posted by: mchapman.uk.ibm.com
On Tue, 21 Jun 2005 20:00:31 +0000, Harry Sheng wrote:
> I still have the first problem. No error marks on AspectJ editor, there's
> a red mark on the AspectJ project node though. And the error message in
> the [Problem] tab only has project name and line number, no source file
> name.
>
> AspectJ compile option is set to "no weave".
>
> Eclipse Version: 3.0.2
> Build id: 200503110845
> AJDT Version: 1.2.0
> Build id: 20050610
> AspectJ version: 1.5.0M2
Hi Harry,
This problem sounds like that reported in bug 82341:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=82341
Are you using filesystem links on Linux? That seems to be one source of
the problem, but it has been seen on Windows too.
I've just increased the severity of the bug - we need to get to the bottom
of this, but we haven't been able to reproduce it ourselves. If you can
show the problem in a simple testcase, please attach it to the bug report.
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
|
Re: Missing helpful error marks in AspectJ editor [message #53872 is a reply to message #53849] |
Wed, 22 June 2005 13:14 |
harry sheng Messages: 62 Registered: July 2009 |
Member |
|
|
Well, I will add the follwing comment to the bug report after I get my
account.
My environment:
Win2K
J2SE1.4.2_05
Eclipse 3.0.2 Build id: 200503110845
AJDT 1.2.0 Build id: 20050610
I had no problem to have error marks and warning marks in AspectJ editor
for a while when I was using Eclipse 3.0.1 and AJDT 1.2.0 Build id
20041216, and having java code and AspectJ code in the same AspectJ
project.
Later I separated java code and AspectJ code, so that java project only
has java code and AspectJ project only has AspectJ code; and then upgrade
to Eclipse 3.0.2 and AJDT 20050610.
Cannot remember exactly when I started having this problem, but I could
reproduce the problem with a standalone AspectJ project containing one
java class and two aspects attached below. The java code is warning marked
and error marked in the java editor, but the AspectJ code are not.
Removing the aspectJ nature from the project, the java class is warning
marked or error marked in the Package explorer, as well as the packages
and project containing the class.
(NOTE: auto-rebuild of converting the project nature does not work
properly as before, or no re-build actually happened? I have to do a clean
build after removing AspectJ nature to get everything right.)
Converting the project to AspectJ project, the marks in the Package
explorer are all gone, except the project node. project name and line
number are in the [Problem] tab, but no source name.
------------------------------------------------------------ --
MyClass.java:
------------------------------------------------------------ --
package pdi.network;
import pdi.util.App;
public class MyClass
{
void myMethod() {}
}
------------------------------------------------------------ --
MyConcreteAspect.aj:
------------------------------------------------------------ --
public abstract aspect MyConcreteAspect {
static int i = 0;
public MyConcreteAspect()
{
MyClass myClz = new MyClass();
myClz.doSomething();
}
}
------------------------------------------------------------ --
MyExtendedAspect.aj:
------------------------------------------------------------ --
package pdi.network;
import pdi.network.MyConcreteAspect;
import java.io.File;
public aspect MyExtendedAspect extends MyConcreteAspect {
pointcut callMyMethod(MyClass myClz):
target (myClz) && call (* myMethod());
pointcut callYourMethod(YourClass urClz):
target (urClz) && call (* yourMethod());
before (MyClass myClz) : callMyMethod(myClz)
{
myClz.prepare();
}
after (YourClass urClz) : callYourMethod()
{
urClz.pack();
}
}
|
|
| |
Re: Missing helpful error marks in AspectJ editor [message #588906 is a reply to message #53584] |
Tue, 21 June 2005 13:14 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
On Mon, 13 Jun 2005 16:53:53 +0000, Harry Sheng wrote:
> I moved my aspects to a separat AspectJ project, so my java projects
> contain java code only and AspectJ project contains AspectJ code only.
>
> Now when I compile the AspectJ project, I see compile errors in the
> [Problems] tab, but no error marks show up in the AspectJ editor. I used
> to see the errors marks in AspectJ editor when I mixed java code and
> AspectJ code in a single project. How can I get it back again?
Hi Harry,
Sorry for the delay. Are you still having problems with this? If so,
please raise a bug and we'll investigate further. Please include your
eclipse and AJDT version numbers.
> Another little problem I am having is, I extend a concrete aspect to
> create another aspect. In AJDT, I do not get any error or warning message.
> But if I build the project from the ANT script, I get a "cannot extend a
> concrete aspect" error. If AspectJ does not allow extending a concrete
> aspect, shouldn't AJDT fail the compile?
The AspectJ programming guide states: "It is an error for a concrete
aspect to extend another concrete aspect". You should of course get the
same error in AJDT - what version are you using? Maybe this is related to
the first problem.
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
| |
Re: Missing helpful error marks in AspectJ editor [message #588922 is a reply to message #53822] |
Wed, 22 June 2005 09:55 |
Matt Chapman Messages: 429 Registered: July 2009 |
Senior Member |
|
|
On Tue, 21 Jun 2005 20:00:31 +0000, Harry Sheng wrote:
> I still have the first problem. No error marks on AspectJ editor, there's
> a red mark on the AspectJ project node though. And the error message in
> the [Problem] tab only has project name and line number, no source file
> name.
>
> AspectJ compile option is set to "no weave".
>
> Eclipse Version: 3.0.2
> Build id: 200503110845
> AJDT Version: 1.2.0
> Build id: 20050610
> AspectJ version: 1.5.0M2
Hi Harry,
This problem sounds like that reported in bug 82341:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=82341
Are you using filesystem links on Linux? That seems to be one source of
the problem, but it has been seen on Windows too.
I've just increased the severity of the bug - we need to get to the bottom
of this, but we haven't been able to reproduce it ourselves. If you can
show the problem in a simple testcase, please attach it to the bug report.
Regards,
Matt.
--
Matt Chapman
AJDT Development, http://www.eclipse.org/ajdt
|
|
|
Re: Missing helpful error marks in AspectJ editor [message #588930 is a reply to message #53849] |
Wed, 22 June 2005 13:14 |
harry sheng Messages: 62 Registered: July 2009 |
Member |
|
|
Well, I will add the follwing comment to the bug report after I get my
account.
My environment:
Win2K
J2SE1.4.2_05
Eclipse 3.0.2 Build id: 200503110845
AJDT 1.2.0 Build id: 20050610
I had no problem to have error marks and warning marks in AspectJ editor
for a while when I was using Eclipse 3.0.1 and AJDT 1.2.0 Build id
20041216, and having java code and AspectJ code in the same AspectJ
project.
Later I separated java code and AspectJ code, so that java project only
has java code and AspectJ project only has AspectJ code; and then upgrade
to Eclipse 3.0.2 and AJDT 20050610.
Cannot remember exactly when I started having this problem, but I could
reproduce the problem with a standalone AspectJ project containing one
java class and two aspects attached below. The java code is warning marked
and error marked in the java editor, but the AspectJ code are not.
Removing the aspectJ nature from the project, the java class is warning
marked or error marked in the Package explorer, as well as the packages
and project containing the class.
(NOTE: auto-rebuild of converting the project nature does not work
properly as before, or no re-build actually happened? I have to do a clean
build after removing AspectJ nature to get everything right.)
Converting the project to AspectJ project, the marks in the Package
explorer are all gone, except the project node. project name and line
number are in the [Problem] tab, but no source name.
------------------------------------------------------------ --
MyClass.java:
------------------------------------------------------------ --
package pdi.network;
import pdi.util.App;
public class MyClass
{
void myMethod() {}
}
------------------------------------------------------------ --
MyConcreteAspect.aj:
------------------------------------------------------------ --
public abstract aspect MyConcreteAspect {
static int i = 0;
public MyConcreteAspect()
{
MyClass myClz = new MyClass();
myClz.doSomething();
}
}
------------------------------------------------------------ --
MyExtendedAspect.aj:
------------------------------------------------------------ --
package pdi.network;
import pdi.network.MyConcreteAspect;
import java.io.File;
public aspect MyExtendedAspect extends MyConcreteAspect {
pointcut callMyMethod(MyClass myClz):
target (myClz) && call (* myMethod());
pointcut callYourMethod(YourClass urClz):
target (urClz) && call (* yourMethod());
before (MyClass myClz) : callMyMethod(myClz)
{
myClz.prepare();
}
after (YourClass urClz) : callYourMethod()
{
urClz.pack();
}
}
|
|
| |
Goto Forum:
Current Time: Sat Oct 19 11:34:00 GMT 2024
Powered by FUDForum. Page generated in 0.05929 seconds
|