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

Bug 264593

Summary: [context] parent elements not getting added to context for Maven projects
Product: z_Archived Reporter: Michael V <gverig>
Component: MylynAssignee: Mylyn Inbox <mylyn-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: shawn.minto, steffen.pingel
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Screen shot of parent package excluded
none
Bigger screen shot with packages excluded, showing package explorer none

Description Michael V CLA 2009-02-11 15:50:27 EST
Items (classes, methods) are not visible in package explorer in "focused" mode unless packages they are in are also in the context. This is inconvenient and confusing (IMO)
Comment 1 Steffen Pingel CLA 2009-02-11 16:05:48 EST
The parents, i.e. class and packages, of interesting elements should be automatically added to the context. Does that not work for you? Can you provide steps to reproduce?
Comment 2 Michael V CLA 2009-02-11 17:26:11 EST
Well, a note: projects I am working with are Maven projects. I just checked with plain java (well, web app) project and there it seems to work fine. I am using 0.9.7 Sonatype Maven plug-in (if this helps)

Following are steps to reproduce:

Odd... I am not doing anything special.
Create task
Activate it
Uncheck "focus on active task"
Find class you want to work with (do *not* double-click on packages, click on triangles to the left to expand the tree)
open a java file- it gets added to the context
Click "focus on active task"
--> at this point I see only source directory for the file (as in build path directory, root from which packages start) but not package
uncheck "focus"
find same file but now double-clicking on packages-> notice them added to the context
Focus again, notice that you see files
Comment 3 Steffen Pingel CLA 2009-02-11 23:23:37 EST
Does that happen for all your Maven projects? Do you have a Maven integration for Eclipse installed and which one?
Comment 4 Michael V CLA 2009-02-12 01:43:47 EST
As I mentioned, Sonatype (m2), version 0.9.7
Project URL: http://m2eclipse.codehaus.org/
Update URL: http://m2eclipse.sonatype.org/update/

I did try with a few projects, all seem to behave same way. Then again, all my Maven projects are set up similarly. 

Is there anything I can do to help you debug this? 
Comment 5 Michael V CLA 2009-02-13 15:25:41 EST
Created attachment 125684 [details]
Screen shot of parent package excluded
Comment 6 Michael V CLA 2009-02-13 15:33:50 EST
An update:
on top of described behavior, same "parent" elements sometimes drop from the context *after* being added. Specifically, "parent of the parent" is being dropped

See attached screenshot (sorry for airbrushing parts, I'm paranoid)- all files disappeared from Explorer while I was editing WedgeManager (after I specifically added parent packages)

I will post bug report in M2 issue tracker too, maybe they have some thoughts.
Comment 7 Michael V CLA 2009-02-13 15:39:55 EST
Created attachment 125688 [details]
Bigger screen shot with packages excluded, showing package explorer
Comment 8 Michael V CLA 2009-02-13 15:55:50 EST
Maven plugin report created;

http://jira.codehaus.org/browse/MNGECLIPSE-1195
(sorry for the number of updates)
Comment 9 Steffen Pingel CLA 2009-11-05 09:18:44 EST
Michael, the way parent elements are handled has changed in Mylyn 3.2.2 and later. Please retry the latest release of Mylyn and reopen if you are still experiencing the described problem.

*** This bug has been marked as a duplicate of bug 168475 ***