| Summary: | [CDT][context] Mylyn automatically add all Includes in the context of the task | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Andrey Kourskov <_druid> | ||||||||||||
| Component: | Mylyn | Assignee: | Shawn Minto <shawn.minto> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | major | ||||||||||||||
| Priority: | P3 | CC: | angvoz.dev, sam.davis, shawn.minto, steffen.pingel | ||||||||||||
| Version: | unspecified | ||||||||||||||
| Target Milestone: | 3.4.3 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | All | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Andrey Kourskov
Thanks for the bug report. Do you have a sample project that you could attach and steps to reproduce the problem? (In reply to comment #1) > Thanks for the bug report. Do you have a sample project that you could attach > and steps to reproduce the problem? Steps to reproduce 1) File -> New -> C++ Project 2) Project name = HelloWorld 3) Project type = Executable HelloWorld C++ Project 4) Finish 5) TaskList -> NewTask (Local) 6) Save task 6) Activate task 7) Open HelloWorld.cpp in created C++ project 8) Open context of the created task or open Project Explorer(Focus on active task should be enable) Is it possible to fix this bug in Helios SR2? Thanks for the detailed steps. I have put it on for 3.5 so that it doesn't get lost. We'll try to look at it for 3.4.3 (SR2) but I can't promise anything. I am able to reproduce this. Note that includes can be added to the context in SR1 but could not previously. This bug may be a side effect of that. This may be a CDT bug. The problem seems to be that some of elements have the same handle identifier (for me it's "=MinGW"). For me these are the elements below: C:/MinGW/lib/gcc/mingw32/4.5.2/include/c++/backward C:/MinGW/lib/gcc/mingw32/4.5.2/include/c++/mingw32/bits C:/MinGW/include/ddk C:/MinGW/lib/gcc/mingw32/4.5.2/include/c++ This causes canFilter to return false. If we could detect which elements didn't have a proper handle identifier we could just ignore them. That would fix this bug but might prevent includes from showing up in the context when they should. Created attachment 187896 [details]
mylyn/context/zip
I have filed a bug against CDT: 336387: IncludeReferences have the same handle identifier as the project https://bugs.eclipse.org/bugs/show_bug.cgi?id=336387 Created attachment 188351 [details] Patch Here is a patch that should fix this problem. The IncludeReference's that are now shown under the project have the same handle identifier as the project. This means that once the project is a part of the context, all of these IncludeReferences are shown in focused mode. The fix that I did is to ensure that if the element is not a project that its handle is not the same as the project. This means that if there is another breakage like this in CDT or a fix is implemented that the focused mode will work correctly. The CDT bug that was created from this investigation: 336387: IncludeReferences have the same handle identifier as the project https://bugs.eclipse.org/bugs/show_bug.cgi?id=336387 Created attachment 188352 [details]
mylyn/context/zip
Note that we need to setup tests to make sure that we are happy with this. Created attachment 188361 [details]
patch for head
Thanks for fixing this Shawn! I have applied the patch to the e_3_6_m_3_4_x branch and head. A 3.4.3.v20110204-0608 build is now available from http://download.eclipse.org/tools/mylyn/update/maintenance. This fix will be in next week's Helios SR2 RC3 build. |