Bug 479800 - [UCOSP] create a BuildStatusAttributeEditor and use it to show build status
Summary: [UCOSP] create a BuildStatusAttributeEditor and use it to show build status
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All Mac OS X
: P3 enhancement (vote)
Target Milestone: 2.9   Edit
Assignee: Kyle Ross CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks: 477862
  Show dependency tree
 
Reported: 2015-10-14 17:59 EDT by Sam Davis CLA
Modified: 2015-12-09 14:25 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2015-10-14 17:59:45 EDT
Create a BuildStatusAttributeEditor and use it to show build statuses in the Gerrit task editor.
Comment 1 Sam Davis CLA 2015-10-14 18:04:17 EDT
Basically, you can just implement createControl so that it creates the CLabels that are currently being created directly in the review section, and you can override decorateIncoming so that it calls setBackground on each changed build (those where model.hasIncomingChanges(attribute) is true).
Comment 2 Kyle Ross CLA 2015-10-18 14:30:27 EDT
I am thinking of creating the BuildStatusAttributeEditor class in tasks.ui.editors, amongst the other attribute editors. I see that editors such as the BooleanAttributeEditor and the LastCommentedAttributeEditor, for example, are created by the AttributeEditorFactory's createEditor method. Should the BuildStatusAttributeEditor be created by this Factory?
Comment 3 Kyle Ross CLA 2015-10-19 17:18:32 EDT
BuildStatusAttributeEditor has been implemented in the tasks.ui.editors, but is used in ReviewSetContentSection, which implies importing from Tasks into a Review class. Also, access to the enumeration BuildStatus and ReviewImages (both from Reviews) is needed in BuildStatusAttributeEditor and create circular dependencies. The easy solution to the above issues would be to move BuildStatusAttributeEditor to Reviews, but that would be inconsistent with the location of all the other AttributeEditor classes.
Comment 4 Sam Davis CLA 2015-10-20 17:33:39 EDT
You can put the BuildStatusAttributeEditor in reviews since it will only be used by review connectors. It's common for connectors to define their own attribute editors. GerritTaskEditorPage defines its own attribute editor factory where you can create the editor.

I think you might not need to use BuildStatus in the editor though, since it seems like that is only used when parsing the comments. In the editor you already have TaskAttributes.
Comment 5 Kyle Ross CLA 2015-10-24 11:08:36 EDT
I have successfully used the GerritTaskEditorPage's factory to create the editor in ReviewSetContentSection.

Currently working on the decorateIncoming related task.
Comment 6 Eclipse Genie CLA 2015-10-28 17:47:56 EDT
New Gerrit change created: https://git.eclipse.org/r/59179
Comment 7 Eclipse Genie CLA 2015-12-09 00:43:05 EST
New Gerrit change created: https://git.eclipse.org/r/62283
Comment 9 Sam Davis CLA 2015-12-09 14:25:08 EST
.