Bug 339777 - fill empty context from stack trace when task is activated
Summary: fill empty context from stack trace when task is activated
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.6   Edit
Assignee: David Green CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
: 108067 (view as bug list)
Depends on:
Blocks: 326245 348348
  Show dependency tree
 
Reported: 2011-03-11 20:01 EST by David Green CLA
Modified: 2011-06-14 16:48 EDT (History)
3 users (show)

See Also:


Attachments
patch that implements the described function (44.53 KB, patch)
2011-03-11 20:06 EST, David Green CLA
steffen.pingel: iplog+
Details | Diff
mylyn/context/zip (28.87 KB, application/octet-stream)
2011-03-11 20:06 EST, David Green CLA
no flags Details
screenshot (18.30 KB, image/png)
2011-05-31 15:46 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Green CLA 2011-03-11 20:01:16 EST
Task activation with an empty context should create a context from information available on the task, such as a Java stack trace.
Comment 1 David Green CLA 2011-03-11 20:06:22 EST
Created attachment 191036 [details]
patch that implements the described function

patch implements the described functionality.  Adds a new extension point, and a concrete implementation for Java stack traces.  Please consider as an inclusion to Mylyn 3.6
Comment 2 David Green CLA 2011-03-11 20:06:23 EST
Created attachment 191037 [details]
mylyn/context/zip
Comment 3 Steffen Pingel CLA 2011-03-14 18:35:10 EDT
Thanks. We'll need to clarify a CQ is needed here since the contribution exceeds the 250 line limit.
Comment 4 David Green CLA 2011-03-14 20:00:24 EDT
Note that I didn't externalize any of the strings.  This was intentional, to make refactoring easier.  Once the patch is looking good, we can externalize strings too.
Comment 5 David Green CLA 2011-04-05 19:47:38 EDT
what's needed to move this forward?
Comment 6 Steffen Pingel CLA 2011-04-06 05:32:54 EDT
I have to file a CQ. Can you confirm that you have authored the code, have a right to contribute the content to Eclipse and that you contribute the content under EPL?
Comment 7 David Green CLA 2011-04-07 14:53:16 EDT
This is my confirmation that I, David Green:
* Authored the code.
* Have a right to contribute the content to Eclipse.
* Contribute the content under EPL.
Comment 8 Steffen Pingel CLA 2011-04-08 10:07:55 EDT
*** Bug 108067 has been marked as a duplicate of this bug. ***
Comment 9 Steffen Pingel CLA 2011-04-12 17:23:50 EDT
Thanks David. I have filed CQ 5097 to move this forward.
Comment 10 David Green CLA 2011-04-29 11:47:41 EDT
Looks like the CQ was approved! 

5097: feature enhancement to fill task context from stack trace
https://dev.eclipse.org/ipzilla/show_bug.cgi?id=5097

What's the next step?
Comment 11 Steffen Pingel CLA 2011-05-18 09:34:34 EDT
Thanks for the great patch, David! I have applied it to head. 

I made a few modifications:
* The extension point is o.e.m.context.core now since there is now API dependency on the UI.
* I remove the coupling to the Tasks from the API. The input is now passed as an IAdaptable to allow easier reuse in other contexts, e.g. for generating contexts based on build failures.
* Elements from the java and javax namespace are filtered when generating contexts. We may want to consider adding additional filters but that already helped to make contexts more relevant.
* I ran into an exception when no strategies where registered which I fixed by adding a null check:
java.lang.NullPointerException
	at org.eclipse.mylyn.internal.context.ui.ContextPopulationStrategy$1.run(ContextPopulationStrategy.java:88)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 12 Steffen Pingel CLA 2011-05-31 13:08:15 EDT
Committed changes for o.e.m.context.ui to head which got accidentally committed to e_4_0_m_3_x initially. Feature should appear in next weekly build.
Comment 13 Steffen Pingel CLA 2011-05-31 15:46:44 EDT
Created attachment 197037 [details]
screenshot
Comment 14 David Green CLA 2011-06-14 16:48:28 EDT
Thanks Steffen!