Community
Participate
Working Groups
Breakpoints inside ITDs appear to be broken in AJDT 2.1.0. http://forum.springsource.org/showthread.php?t=91851
perhaps a windows thing if you can't create it Kris? Ask Nieraj to try too.
Created attachment 173902 [details] picture it manifests slightly differently for me depending on whether i am in a Roo project or a regular project. In a roo project I get the red status message (see screenshot). In a regular AspectJ project (I ran the new aspectj example Bean project) and on BoundPoint.aj line 35 tried to set a breakpoint - it flashes there then vanishes. I'd suggest you try a roo project.
When I tried it with a fresh install of STS (just installed this morning from nightly update site), I get the problem. That is, running the release itself, not code checked out from CVS. So it is not a windows issue. I did not try a roo project yet. I get the behavior you decribe, brekapoint flashes and vanishes then a message informs me I can't put BP there. Maybe it is something in STS that doesn't agree with AJDT. I'll see if I can reproduce the problem still with AJDT checked out from CVS in STS.
I'm getting some other funny stuff happening... It makes me wonder if it may have something todo with the JDT weaving being messed up somehow. For example: public aspect Azzpext { public void testMe() { System.out.println("testing"); } public void Player.pullme() { Player me = this; System.out.println("Pulling!"); } } I get a compile error marker in the editor, but not in the problems view: It says that "this" is of type "Azzpext". Despite that, the JDT weaving seems to be enabled, it is printing the usual kind of chatter in the console.
On eclipse 3.5, I cant set breakpoints with 2.1.0 but I can with 2.0.2 (nothing to do with STS).
For some reason, in my RCP workspace, where breakpoints seem to work, it seems like we are not actually using the AspectJ specific implementation in org.eclipse.ajdt.internal.debug.ui.actions.ToggleBreakpointAdapter However, in my STS workspace, we *are* using the AspectJ specific implementation. The trouble is that it doesn't appear to work correctly. When I put breakpoints inside of ToggleBreakpointAdapter in my RCP workspace they are not being reached. I don't know why this would be the case however. Since the codebases in both instances are identical. The funny thing is, that the JDT implementation which we are (so it seems) accidentally running actually works correctly, whereas the AJDT replacement that is supposed to run instead is not working correctly.
Created attachment 173933 [details] patch A patch that appears to fix the bug. I tested it briefly. Also reran all the UI tests which run clean. I attempted to run the "Core tests" in org.eclipse.ajdt.core.tests project but I am not sure how to run them. When I just run them the same way as the UI test suite, it seems to deadlock in the beginning. There is one "scary" thing I did in this patch: I removed "implements IField" from IntertypeElement. I can see that this may potentially have some unexpected consequences. On the other hand it seems quite illogical for IntertypeElement to declare implementing this interface since not all IntertypeElements are actually fields. So it seems unlikely that removing this implements would break someones assumptions on what it means to "implement IField" and rather more likely to actually fix some latent bug (since one most likely would assume that something implementing IField is actually a field, which for intertype elements would not be true). If it seems a bit too dangerous to just remove this implements clause, let me know. I can probably create a patch that avoids doing this as well. Finally, I am a bit surprised that breakpoints in intertype elements has worked before. From the looks of it, the reason why it worked before, may be because the code that was supposed to handle breakpoint checking in .aj files was actually not being run (but similar JDT code was for some yet undetermined reason being run instead). I have not included a test for this bug. If someone could point me to where such a test would live (and some similar tests related to breakpoints that I could look at) I'll have a look at adding a test as well.
thanks for investigating Kris. I'll let Andrew comment on the 'implements IField' change before we make a call on committing it.
Created attachment 174066 [details] Patch that doesn'r remove "implements IField" from IntertypeElement After dicussing with Andrew, we decided to make a "quick and dirty" patch now, to fix the bug, and work on a nicer fix later. The nicer fix will split up IntertypeElement class into an abstract class with two concrete subclasses, one for field and one for method. The subclasses can implement IField and IMethod interfaces. The quick and dirty patch is attached.
I have applied the quick-and-dirty patch and I have also created some tests to ensure that this regression does not happen again.
All tests are passing locally. I will commit after I look at bug 319613.
I can't get breakpoints inside ITDs to work in AJDT 2.2.0. When I try to use "Toggle Breakpoint" on a line of code inside an ITD, nothing happens (not even the "Breakpoint cannot be set at the given position" message mentioned in comment #2), nothing shows up in Error Log. I can set a method breakpoint, but the debugger won't stop when it's hit. Should this bug be reopened or should I file a new one?
File a new bug please. It would be helpful if you could attach a simple project.
Done: bug #384409