Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forumsitd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/72863/#msg_72863
i have some problems using itd with ajdt 1.6.3.
public class MixedObject implements IMixIn1, IMixIn2, IMixIn3 { }
//
package test.mo;
public class Test {
public static void main(String[] args) {
MixedObject mo = new MixedObject();
mo.m11();
mo.m12();
mo.m31();
mo.f11 = "value";
System.out.println(mo.f11);
}
}
//
package test.mo;
public class Test1 {
public static void main(String[] args) {
new Test1().m21();
new Test1().m31();
}
}
problem descriptions:
- MixIn1 with "wrong" 'implements Objects' works "fine" with weaving
method and field only into MixedObject
- MixIn2 with correct 'implements IMixIn2' weaves into all classes of
package test.mo
- MixIn3 has marker "MyEnum$C1 cannot be resolved", but works fine
- MixedObject code assist doesn't work for IMixIn* in implements clause,
List shows them but selection doesn't work
- context menu "Declared On" at "declare parents : test.mo.* implements
IMixIn2;" in MinIn2 shows Test, Test1
- no aspectj marker at "declare parents : test.mo.* implements Object;" in
MinIn1
- code works but should not, Test1 and Test2 are executable
question:
bug or my mistake ?
Thanks,
Max]]>Max Meier2009-01-11T11:56:35-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/72881/#msg_72881
Originally posted by: andrew.eisenberg.springsource.com
Hi,
Yes, there are some tricky things with the new ITD aware reconciling,
especially for interfaces. We haven't yet covered all the corner cases. I
will use your classes as a test case and will have a fix in a few days.
In the meantime, you can track the progress of this bug in bugzilla:
> Hello,
>
> i have some problems using itd with ajdt 1.6.3.
>
> environment:
>
> - clean install of eclipse-SDK-3.4.1-win32
> - using http://download.eclipse.org/tools/ajdt/34/dev/update
> installing 1.6.3.20090110234235 AJDT (JT Weaving)
> installing 1.0.0.200901090822 Equinox Aspects Feature
>
>
> simple test implementation:
>
> //
> package test;
>
> public enum MyEnum {
> C1, C2;
> }
>
> //
> package test.mi;
>
> public aspect MixIn1 {
>
> public interface IMixIn1 {};
>
> declare parents : test.mo.* implements Object;
>
> public String IMixIn1.f11;
>
> public void IMixIn1.m11() {
> System.out.println("called m11");
> };
>
> public void IMixIn1.m12() {
> System.out.println("called m12");
> };
>
> }
>
>
> //
> package test.mi;
>
> public aspect MixIn2 {
>
> public interface IMixIn2 {};
>
> declare parents : test.mo.* implements IMixIn2;
>
> public void IMixIn2.m21() {
> System.out.println("called m21");
> };
>
> }
>
>
> //
> package test.mi;
>
> import test.*;
> import static test.MyEnum.*;
>
> public aspect MixIn3 {
>
> private static MyEnum me1 = MyEnum.C1;
> private static MyEnum me2 = C2;
>
> public interface IMixIn3 {};
>
> declare parents : test.mo.* implements IMixIn3;
>
> public void IMixIn3.m31() {
> System.out.println(me1 + " " + me2);
> };
> }
>
>
> //
> package test.mo;
>
> import test.mi.MixIn1.IMixIn1;
> import test.mi.MixIn2.IMixIn2;
> import test.mi.MixIn3.IMixIn3;
>
> public class MixedObject implements IMixIn1, IMixIn2, IMixIn3 { }
>
> //
> package test.mo;
>
> public class Test {
>
> public static void main(String[] args) {
>
> MixedObject mo = new MixedObject();
>
> mo.m11();
> mo.m12();
> mo.m31();
>
> mo.f11 = "value";
>
> System.out.println(mo.f11);
>
> }
>
> }
>
> //
> package test.mo;
>
> public class Test1 {
>
> public static void main(String[] args) {
> new Test1().m21();
> new Test1().m31();
> }
>
> }
>
> problem descriptions:
>
> - MixIn1 with "wrong" 'implements Objects' works "fine" with weaving
> method and field only into MixedObject
> - MixIn2 with correct 'implements IMixIn2' weaves into all classes of
> package test.mo
> - MixIn3 has marker "MyEnum$C1 cannot be resolved", but works fine
> - MixedObject code assist doesn't work for IMixIn* in implements clause,
> List shows them but selection doesn't work
> - context menu "Declared On" at "declare parents : test.mo.* implements
> IMixIn2;" in MinIn2 shows Test, Test1
> - no aspectj marker at "declare parents : test.mo.* implements Object;" in
> MinIn1
> - code works but should not, Test1 and Test2 are executable
>
> question:
>
> bug or my mistake ?
>
>
> Thanks,
> Max
>]]>Andrew Eisenberg2009-01-11T17:15:54-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/599490/#msg_599490
Most of the problems you mention have been fixed in a dev version of AJDT
put out yesterday: 1.6.3.20090110234235 (available on the 34 dev update
site).
Many of your other issues are actually not problems, but expected behavior.
There is only one thing you are seeing that is actually a but. Explanations
below.
> problem descriptions:
>
> - MixIn1 with "wrong" 'implements Objects' works "fine" with weaving
> method and field only into MixedObject
Expected.
Object is not exposed to the weaver and so even though you add a parent to
it through ITD, it does not really happen.
> - MixIn2 with correct 'implements IMixIn2' weaves into all classes of
> package test.mo
Expected
> - MixIn3 has marker "MyEnum$C1 cannot be resolved", but works fine
This is an error. It is an error in the editor, not the compiler. So, the
code works fine even though the editor shows a spurious error.
> - MixedObject code assist doesn't work for IMixIn* in implements clause,
> List shows them but selection doesn't work
Not exactly sure what you mean here. ITD methods exist in content assist
when within a method. We have not yet implemented the overriding of ITD
methods when you select Source -> Override/Implement methods...
> - context menu "Declared On" at "declare parents : test.mo.* implements
> IMixIn2;" in MinIn2 shows Test, Test1
Expected
ITDs on interfaces are not actually added to the interface because
interfaces have no implementations. Rather, they are added to the first
sub-class that implements the interface (if it is exposed to the weaver).
So, here Test and Test1 have IMixIn2.m21() declared on it even though it is
really declared on their super interface.
This may not have worked in earlier versions of AJDT. So, if this is still
giving you problems, please update to the latest dev version.
> - no aspectj marker at "declare parents : test.mo.* implements Object;" in
> MinIn1
Expected.
Again, Object not exposed to the weaver.
> - code works but should not, Test1 and Test2 are executable
The errors you see are from the editor, not the compiler. You can tell this
because you can open up the problems view and see that the errors don't
exist there. Only in the editor.
>
> question:
>
> bug or my mistake ?
>
>
> Thanks,
> Max
>]]>Andrew Eisenberg2009-01-11T17:37:56-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/72899/#msg_72899
Originally posted by: andrew.eisenberg.springsource.com
More on this...
Most of the problems you mention have been fixed in a dev version of AJDT
put out yesterday: 1.6.3.20090110234235 (available on the 34 dev update
site).
Many of your other issues are actually not problems, but expected behavior.
There is only one thing you are seeing that is actually a but. Explanations
below.
> problem descriptions:
>
> - MixIn1 with "wrong" 'implements Objects' works "fine" with weaving
> method and field only into MixedObject
Expected.
Object is not exposed to the weaver and so even though you add a parent to
it through ITD, it does not really happen.
> - MixIn2 with correct 'implements IMixIn2' weaves into all classes of
> package test.mo
Expected
> - MixIn3 has marker "MyEnum$C1 cannot be resolved", but works fine
This is an error. It is an error in the editor, not the compiler. So, the
code works fine even though the editor shows a spurious error.
> - MixedObject code assist doesn't work for IMixIn* in implements clause,
> List shows them but selection doesn't work
Not exactly sure what you mean here. ITD methods exist in content assist
when within a method. We have not yet implemented the overriding of ITD
methods when you select Source -> Override/Implement methods...
> - context menu "Declared On" at "declare parents : test.mo.* implements
> IMixIn2;" in MinIn2 shows Test, Test1
Expected
ITDs on interfaces are not actually added to the interface because
interfaces have no implementations. Rather, they are added to the first
sub-class that implements the interface (if it is exposed to the weaver).
So, here Test and Test1 have IMixIn2.m21() declared on it even though it is
really declared on their super interface.
This may not have worked in earlier versions of AJDT. So, if this is still
giving you problems, please update to the latest dev version.
> - no aspectj marker at "declare parents : test.mo.* implements Object;" in
> MinIn1
Expected.
Again, Object not exposed to the weaver.
> - code works but should not, Test1 and Test2 are executable
The errors you see are from the editor, not the compiler. You can tell this
because you can open up the problems view and see that the errors don't
exist there. Only in the editor.
>
> question:
>
> bug or my mistake ?
>
>
> Thanks,
> Max
>]]>2009-01-11T17:37:56-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/599497/#msg_599497
>> package test.mo
> Expected
To make it clear for me: MixIn2 will not only be weaved into classes
implementing the interface IMixIn2? I'm relative sure, that this works in
earlier versions (eclipse 3.3 with AJDT 1.5.4.200808131959).
>> - MixedObject code assist doesn't work for IMixIn* in implements clause,
>> List shows them but selection doesn't work
> Not exactly sure what you mean here. ITD methods exist in content assist
> when within a method. We have not yet implemented the overriding of ITD
> methods when you select Source -> Override/Implement methods...
What I mean is, that if you press ctrl+space after the word implements
then the assist list appears for the IMixIn* Interface with an A icon. But
if you try to select one, it's not possible.]]>Max Meier2009-01-12T01:35:47-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/72917/#msg_72917
>> package test.mo
> Expected
To make it clear for me: MixIn2 will not only be weaved into classes
implementing the interface IMixIn2? I'm relative sure, that this works in
earlier versions (eclipse 3.3 with AJDT 1.5.4.200808131959).
>> - MixedObject code assist doesn't work for IMixIn* in implements clause,
>> List shows them but selection doesn't work
> Not exactly sure what you mean here. ITD methods exist in content assist
> when within a method. We have not yet implemented the overriding of ITD
> methods when you select Source -> Override/Implement methods...
What I mean is, that if you press ctrl+space after the word implements
then the assist list appears for the IMixIn* Interface with an A icon. But
if you try to select one, it's not possible.]]>Max Meier2009-01-12T01:35:47-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/599507/#msg_599507
better visibility than this newsgroup: https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>> - MixIn2 with correct 'implements IMixIn2' weaves into all classes of
>>> package test.mo
>> Expected
>
> To make it clear for me: MixIn2 will not only be weaved into classes
> implementing the interface IMixIn2? I'm relative sure, that this works in
> earlier versions (eclipse 3.3 with AJDT 1.5.4.200808131959).
MixIn2 is an Aspect. Aspects are not "woven into" anything. Rather, the
declarations of an aspect may be woven into other types. In the sample code
you provided, every class in the test.mo package will implement IMixIn2.
The *declarations* of the ITDs defined on IMixIn2 will be introduced into
IMixIn2 and the *implementations* of these ITDs will be introduced into
IMixIn2's direct implementors.
This is the same compile/weaving behavior that you find in in AJDT 1.5.4.
However, the editor behavior is quite different.
>
>>> - MixedObject code assist doesn't work for IMixIn* in implements clause,
>>> List shows them but selection doesn't work
>> Not exactly sure what you mean here. ITD methods exist in content assist
>> when within a method. We have not yet implemented the overriding of ITD
>> methods when you select Source -> Override/Implement methods...
>
> What I mean is, that if you press ctrl+space after the word implements
> then the assist list appears for the IMixIn* Interface with an A icon. But
> if you try to select one, it's not possible.
We have not fully implemented all corner cases with ITDs and content assist.
This is something that is still in active development. The A icon is
something that will be fixed in the next dev release of AJDT (out tomorrow).
As for not being able to choose a content assist proposal after an
implements, clause, that is a bug as well. I'll look into it.]]>Andrew Eisenberg2009-01-12T17:37:26-00:00Re: itd problems with ajdt 1.6.3
https://www.eclipse.org/forums/index.php/mv/msg/22650/72933/#msg_72933
Originally posted by: andrew.eisenberg.springsource.com
>>> - MixIn2 with correct 'implements IMixIn2' weaves into all classes of
>>> package test.mo
>> Expected
>
> To make it clear for me: MixIn2 will not only be weaved into classes
> implementing the interface IMixIn2? I'm relative sure, that this works in
> earlier versions (eclipse 3.3 with AJDT 1.5.4.200808131959).
MixIn2 is an Aspect. Aspects are not "woven into" anything. Rather, the
declarations of an aspect may be woven into other types. In the sample code
you provided, every class in the test.mo package will implement IMixIn2.
The *declarations* of the ITDs defined on IMixIn2 will be introduced into
IMixIn2 and the *implementations* of these ITDs will be introduced into
IMixIn2's direct implementors.
This is the same compile/weaving behavior that you find in in AJDT 1.5.4.
However, the editor behavior is quite different.
>
>>> - MixedObject code assist doesn't work for IMixIn* in implements clause,
>>> List shows them but selection doesn't work
>> Not exactly sure what you mean here. ITD methods exist in content assist
>> when within a method. We have not yet implemented the overriding of ITD
>> methods when you select Source -> Override/Implement methods...
>
> What I mean is, that if you press ctrl+space after the word implements
> then the assist list appears for the IMixIn* Interface with an A icon. But
> if you try to select one, it's not possible.
We have not fully implemented all corner cases with ITDs and content assist.
This is something that is still in active development. The A icon is
something that will be fixed in the next dev release of AJDT (out tomorrow).
As for not being able to choose a content assist proposal after an
implements, clause, that is a bug as well. I'll look into it.]]>2009-01-12T17:37:26-00:00