Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327808

Summary: [context] remove from context in package explore on AspectJ element doesn't work
Product: z_Archived Reporter: Raffi Khatchadourian <raffi.khatchadourian>
Component: MylynAssignee: Mylyn Inbox <mylyn-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: andrew.eisenberg, shawn.minto, steffen.pingel
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
example none

Description Raffi Khatchadourian CLA 2010-10-14 13:50:01 EDT
When trying to remove an AspectJ element  from the mylyn context by right-clicking on the element in the package explorer, the element persists to remain in the mylyn context. However, it can be removed via the "context" tab in the task pane.
Comment 1 Steffen Pingel CLA 2010-10-26 05:09:13 EDT
Created attachment 181704 [details]
example
Comment 2 Steffen Pingel CLA 2010-10-26 05:14:49 EDT
Shawn, could you take a look at the screenshot? I removed Test.aj from the context using the popup menu in Package Explorer. It did disappear from the Package explorer but it looks like it is still showing in the context and not all events got cleared:

$ zless local-49.xml.zip | xmlindent | grep Test.aj
    <InteractionEvent Delta="null" EndDate="2010-10-26 02:05:47.822 PDT" Interest="1.0" Kind="edit" Navigation="null" OriginId="org.eclipse.ajdt.internal.ui.editor.CompilationUnitEditor" StartDate="2010-10-26 02:05:47.822 PDT" StructureHandle="=Aspect/src&amp;lt;*Test.aj&amp;apos;Test~call~V" StructureKind="java"/>
    <InteractionEvent Delta="null" EndDate="2010-10-26 02:00:46.227 PDT" Interest="3.0" Kind="selection" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2010-10-26 02:00:43.435 PDT" StructureHandle="=Aspect/src&amp;lt;{Test.aj" StructureKind="java" NumEvents="3" CreationCount="17"/>
    <InteractionEvent Delta="null" EndDate="2010-10-26 02:00:42.309 PDT" Interest="1.0" Kind="propagation" Navigation="null" OriginId="org.eclipse.mylyn.resources.ui.interest.updater" StartDate="2010-10-26 02:00:42.309 PDT" StructureHandle="=Aspect/src&amp;lt;{Test.aj" StructureKind="java"/>
    <InteractionEvent Delta="null" EndDate="2010-10-26 02:05:45.912 PDT" Interest="1.0" Kind="selection" Navigation="null" OriginId="org.eclipse.ajdt.internal.ui.editor.CompilationUnitEditor" StartDate="2010-10-26 02:05:45.912 PDT" StructureHandle="=Aspect/src&amp;lt;*Test.aj&amp;apos;Test~call~V" StructureKind="java"/>
    <InteractionEvent Delta="null" EndDate="2010-10-26 02:01:18.513 PDT" Interest="14.0" Kind="edit" Navigation="null" OriginId="org.eclipse.jdt.ui.CompilationUnitEditor" StartDate="2010-10-26 02:00:43.808 PDT" StructureHandle="=Aspect/src&amp;lt;{Test.aj" StructureKind="java" NumEvents="14" CreationCount="17"/>

This might be related to the particular design of the AJDT structure bridge.
Comment 3 Shawn Minto CLA 2010-12-07 13:01:32 EST
This does seem like it could be a problem with the AJDT structure bridge, but  I will have to do some more detailed investigation.  Steffen, what version of Mylyn did you reproduce this on? HEAD?
Comment 4 Steffen Pingel CLA 2010-12-07 13:55:37 EST
Yes, head with a fairly recent AJDT.
Comment 5 Andrew Eisenberg CLA 2010-12-10 11:43:54 EST
I'll take a look at ajdt to see if the problem is coming from there.
Comment 6 Andrew Eisenberg CLA 2010-12-10 12:05:55 EST
Steffen,

I can't exactly reproduce the problem here, but it looks like JDT Weaving was not enabled when you tried this.  Could you enable JDT weaving and try again?

I tried locally both ways and could not reproduce.  If you describe the exact steps you took, I'll try again.
Comment 7 Shawn Minto CLA 2010-12-10 13:17:26 EST
Thanks for looking into this Andrew!  Let me know if there is something that seems amiss with the framework and I can look into it too.
Comment 8 Steffen Pingel CLA 2011-01-10 18:36:56 EST
I can not reproduce this with the latest of Mylyn and AJDT. Raffi, if you can reproduce this with one of the AspectJ sample projects, please reopen and post steps and we'll look into it further.
Comment 9 Raffi Khatchadourian CLA 2011-01-11 11:11:36 EST
(In reply to comment #8)
> I can not reproduce this with the latest of Mylyn and AJDT. Raffi, if you can
> reproduce this with one of the AspectJ sample projects, please reopen and post
> steps and we'll look into it further.

I can no longer reproduce this bug either. I am using Eclipse 3.6.1, Build id: M20100909-0800 and AspectJ Development Tools 2.1.1.e36x-release-20101020-1600.