Community
Participate
Working Groups
Create a BuildStatusAttributeEditor and use it to show build statuses in the Gerrit task editor.
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).
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?
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.
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.
I have successfully used the GerritTaskEditorPage's factory to create the editor in ReviewSetContentSection. Currently working on the decorateIncoming related task.
New Gerrit change created: https://git.eclipse.org/r/59179
New Gerrit change created: https://git.eclipse.org/r/62283
Gerrit change https://git.eclipse.org/r/59179 was merged to [master]. Commit: http://git.eclipse.org/c/mylyn/org.eclipse.mylyn.reviews.git/commit/?id=625b620692d84e60d6645dcc2a1c2efb709cec66
.