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

Bug 378003

Summary: [activity] integrate a TableViewer in the Task Editor
Product: z_Archived Reporter: Timur Achmetow <achmetow84>
Component: MylynAssignee: Timur Achmetow <achmetow84>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: b.muskalla, eclipse
Version: unspecified   
Target Milestone: 3.9   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 376233    
Attachments:
Description Flags
New Section for the activity data
none
mylyn/context/zip
none
mylyn/context/zip
none
Tableviewer in the new section
none
Code for the viewer
none
mylyn/context/zip none

Description Timur Achmetow CLA 2012-04-28 11:02:09 EDT
Integrate a TableViewer in the comment stream.
Comment 1 Timur Achmetow CLA 2012-04-28 12:23:14 EDT
From Steffen Pingel:

The relevant editor is in TaskEditor and AbstractTaskEditorPage in the
o.e.m.tasks.ui bundle. It's extensible through contribution
AbstractTaskEditorParts.

As a start, I would recommend looking at the
org.eclipse.mylyn.versions.tasks.core and org.eclipse.mylyn.versions.tasks.ui
bundles in the Mylyn Reviews repository which already implement part of the
functionality that we'll need.
Comment 2 Timur Achmetow CLA 2012-04-30 14:24:37 EDT
About the selection in the tableviewer or comment stream it also should be possible to navigate to the corresponding commit or build view.
Comment 3 Timur Achmetow CLA 2012-05-03 12:34:24 EDT
(In reply to comment #1)
> From Steffen Pingel:
> 
> The relevant editor is in TaskEditor and AbstractTaskEditorPage in the
> o.e.m.tasks.ui bundle. It's extensible through contribution
> AbstractTaskEditorParts.

Hi,
can someone tell me, where I have to integrate my new TableViewer? 
In which class/method I can inject it? I need only the java class and a parent "Composite" for the TableViewer. 
Where I find the code or maybe extension point?
Comment 4 Benjamin Muskalla CLA 2012-05-03 14:03:09 EDT
You can contribute new parts to existing task editors by leveraging mylyns extension points. See http://wiki.eclipse.org/Mylyn_Integrator_Reference#Task_editor for some examples.
Comment 5 Timur Achmetow CLA 2012-05-03 14:17:48 EDT
(In reply to comment #4)
> You can contribute new parts to existing task editors by leveraging mylyns
> extension points. See
> http://wiki.eclipse.org/Mylyn_Integrator_Reference#Task_editor for some
> examples.

Okay ... looks great. Thank you.
Comment 6 Timur Achmetow CLA 2012-05-03 18:45:31 EDT
Created attachment 215033 [details]
New Section for the activity data
Comment 7 Timur Achmetow CLA 2012-05-03 18:45:51 EDT
First steps are done! 
Have now created my new section in the task editor (Screenshot); 
next step: integrate the TableViewer in this section.
Comment 8 Timur Achmetow CLA 2012-05-03 18:46:08 EDT
Created attachment 215034 [details]
mylyn/context/zip
Comment 9 Timur Achmetow CLA 2012-05-05 16:12:53 EDT
The Tableviewer is now integrated, see attachment (screenshot, code).
Comment 10 Timur Achmetow CLA 2012-05-05 16:13:01 EDT
Created attachment 215132 [details]
mylyn/context/zip
Comment 11 Timur Achmetow CLA 2012-05-05 16:14:03 EDT
Created attachment 215133 [details]
Tableviewer in the new section
Comment 12 Timur Achmetow CLA 2012-05-05 16:15:27 EDT
Created attachment 215134 [details]
Code for the viewer
Comment 13 Steffen Pingel CLA 2012-05-08 19:02:15 EDT
Nice! In order to consume and collaborate on the contribution we need to have it in Gerrit. Could you login in to git.eclipse.org/r and push your changes as a code review?
Comment 14 Timur Achmetow CLA 2012-05-19 05:56:56 EDT
(In reply to comment #13)
> Nice! In order to consume and collaborate on the contribution we need to have
> it in Gerrit. Could you login in to git.eclipse.org/r and push your changes as
> a code review?

Okay, but the TableViewer has at the moment no logic for the reading from GIT history. 
That means: dead Viewer with dummy data (current). 
BUG 378097 is now not implemented (get the data from GIT histroy)

I still need to upload my changes? Or waiting for BUG 378097?
Comment 15 Steffen Pingel CLA 2012-05-23 05:46:31 EDT
It would be best if you uploaded the current changes that you already have. We can then do another code review based on that one. The smaller code reviews are the quicker we can add complete them and merge changes back in to Mylyn.
Comment 16 Timur Achmetow CLA 2012-06-04 16:35:21 EDT
Created attachment 216795 [details]
mylyn/context/zip
Comment 17 Steffen Pingel CLA 2012-07-15 17:41:54 EDT
A code review is here: https://git.eclipse.org/r/#/c/6520/.

Tim, as a first step, can you please update the review to provide the most simple implementation for an editor page using the data model that was implemented as part of bug 382788 taking my comments on the review into account?
Comment 18 Frank Becker CLA 2012-07-16 11:31:22 EDT
Maybe we can use / refactor some code from the Attachment Section (org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorAttachmentPart) where we also have a TableViewer.

Thoughts?
Comment 19 Steffen Pingel CLA 2012-07-16 12:22:52 EDT
I would rather get something working first even if we duplicate some of the code. We don't know for sure what the final UI design is going to look like.
Comment 20 Timur Achmetow CLA 2012-07-16 16:59:24 EDT
And we have at the moment a TreeViewer in the new tab, not more TableViewer.
Comment 21 Steffen Pingel CLA 2012-07-20 05:00:12 EDT
The idea of the current data model is that ActivityEvent stores the essential attributes required to render the event. It's intentionally light weight and conceptually similar to ITask. The tasks framework doesn't make any assumptions though about the type of event that's being rendered hence ActivityEvent is generic.

We could consider allowing extensions to inherit from ActivityEvent to provide specific implementations but I am not convinced there is much benefit. The events and associated artifacts that we intend to visualize such as builds or commits already have domain specific representations that could be made accessible through adapters or a similar mechanism. The generic data model makes it much easier to provide caching without a need for factories etc.
Comment 22 Steffen Pingel CLA 2012-07-27 16:18:41 EDT
The viewer was successfully merged: https://git.eclipse.org/r/#/c/6910/6.