Vojtech Szocs has posted comments on this change.

Change subject: engine: refactor: add Model attribute for help tagging
......................................................................


Patch Set 17: Code-Review+2

(1 comment)

The enum approach sounds good and simple.

Aside from one small comment in HelpTag enum, this has +2 from me.

Possible follow-up could be to auto-generate HelpTag enum from properties file 
(with well-known format) provided by documentation writers.

http://gerrit.ovirt.org/#/c/21052/17/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java
File 
frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/help/HelpTag.java:

Line 454: 
Line 455:     reboot_virtual_machine("reboot_virtual_machine"); //$NON-NLS-1$
Line 456: 
Line 457:     public final String name;
Line 458:     @SuppressWarnings("unused")
> I might need help with this one. Since it's an enum, I'm accessing name dir
I recommend removing comment field entirely but retain comment as constructor 
argument, for example:

 HelpTag(String name) {
     this.name = name;
 }

 // comment unused, we don't care
 // comment will be optimized-out by GWT compiler
 HelpTag(String name, String comment) {
     this(name);
 }

The name field can be public, yeah we could have getter too but since String is 
immutable, I'm OK with public field too.
Line 459:     private final String comment;
Line 460: 
Line 461:     HelpTag(String name) {
Line 462:         this.name = name;


-- 
To view, visit http://gerrit.ovirt.org/21052
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia4074fcc2ecfcbdd2ea6c0855d92f2aa4bd26a5b
Gerrit-PatchSet: 17
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Alexander Wels <aw...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Einav Cohen <eco...@redhat.com>
Gerrit-Reviewer: Greg Sheremeta <gsher...@redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vsz...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to