Alona Kaplan has posted comments on this change.

Change subject: webadmin: Fix type-casting warnings in 
ClusterManageNetworkPopupView and re-arrange it.
......................................................................


Patch Set 2:

(10 comments)

http://gerrit.ovirt.org/#/c/26159/2//COMMIT_MSG
Commit Message:

Line 9: 
Line 10: In ClusterManageNetworkPopupView class:
Line 11:    1. Change all generic EntityModel occurencies to a specific model
Line 12:    class (i.e. ClusterNetworkModel).
Line 13:    2. Remove all type type castings.
typo (type type)
Line 14:    3. Convert anonymous classes into inner ones.
Line 15: Define ClusterNetworkModel class as an extetion of EntityModel<Network>
Line 16: (add Network as a type parameter).
Line 17: 


http://gerrit.ovirt.org/#/c/26159/2/frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterManageNetworkPopupView.java
File 
frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/popup/cluster/ClusterManageNetworkPopupView.java:

Line 65:         initWidget(ViewUiBinder.uiBinder.createAndBindUi(this));
Line 66:     }
Line 67: 
Line 68:     Iterable<ClusterNetworkModel> getNetworksTableItems() {
Line 69:         ListModel<ClusterNetworkModel> tableModel = 
networks.asEditor().flush();
You can replace ListModel<ClusterNetworkModel> with ClusterNetworkManageModel
Line 70:         return tableModel != null ? tableModel.getItems() : new 
ArrayList<ClusterNetworkModel>();
Line 71:     }
Line 72: 
Line 73:     void refreshNetworksTable() {


Line 162:         }
Line 163:     }
Line 164: 
Line 165:     private final class RequiredIndicatorCheckboxColumn extends 
CheckboxColumn<ClusterNetworkModel> {
Line 166:         private final ApplicationTemplates templates;
You can use the parent class templates.
Line 167:         private final ApplicationConstants constants;
Line 168: 
Line 169:         private 
RequiredIndicatorCheckboxColumn(FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater,
Line 170:                 ApplicationTemplates templates,


Line 165:     private final class RequiredIndicatorCheckboxColumn extends 
CheckboxColumn<ClusterNetworkModel> {
Line 166:         private final ApplicationTemplates templates;
Line 167:         private final ApplicationConstants constants;
Line 168: 
Line 169:         private 
RequiredIndicatorCheckboxColumn(FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater,
You can replace FieldUpdater<ClusterNetworkModel, Boolean> with 
RequiredIndicatorFieldUpdater
Line 170:                 ApplicationTemplates templates,
Line 171:                 ApplicationConstants constants) {
Line 172:             super(fieldUpdater);
Line 173:             this.templates = templates;


Line 169:         private 
RequiredIndicatorCheckboxColumn(FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater,
Line 170:                 ApplicationTemplates templates,
Line 171:                 ApplicationConstants constants) {
Line 172:             super(fieldUpdater);
Line 173:             this.templates = templates;
You can use the parent class templates.
Line 174:             this.constants = constants;
Line 175:         }
Line 176: 
Line 177:         @Override


Line 170:                 ApplicationTemplates templates,
Line 171:                 ApplicationConstants constants) {
Line 172:             super(fieldUpdater);
Line 173:             this.templates = templates;
Line 174:             this.constants = constants;
You can use the parent class constants.
Line 175:         }
Line 176: 
Line 177:         @Override
Line 178:         public Boolean getValue(ClusterNetworkModel 
clusterNetworkModel) {


Line 240:     private final class AttachedIndicatorCheckboxColumn extends 
CheckboxColumn<ClusterNetworkModel> {
Line 241:         private final ApplicationConstants constants;
Line 242:         private final ApplicationTemplates templates;
Line 243: 
Line 244:         private 
AttachedIndicatorCheckboxColumn(FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater,
Yon can use AttachedIndicatorFieldUpdater instead of 
FieldUpdater<ClusterNetworkModel, Boolean>
Line 245:                 ApplicationConstants constants,
Line 246:                 ApplicationTemplates templates) {
Line 247:             super(fieldUpdater);
Line 248:             this.constants = constants;


Line 242:         private final ApplicationTemplates templates;
Line 243: 
Line 244:         private 
AttachedIndicatorCheckboxColumn(FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater,
Line 245:                 ApplicationConstants constants,
Line 246:                 ApplicationTemplates templates) {
You can use the parent class constants and templates.
Line 247:             super(fieldUpdater);
Line 248:             this.constants = constants;
Line 249:             this.templates = templates;
Line 250:         }


Line 313:     }
Line 314: 
Line 315:     private final class MigrationNetworkIndicatorCheckboxColumn 
extends CheckboxColumn<ClusterNetworkModel> {
Line 316:         private MigrationNetworkIndicatorCheckboxColumn(boolean 
multipleSelectionAllowed,
Line 317:                 FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater) {
Yon can replace FieldUpdater<ClusterNetworkModel, Boolean> with 
MigrationNetworkIndicatorFieldUpdater
Line 318:             super(multipleSelectionAllowed, fieldUpdater);
Line 319:         }
Line 320: 
Line 321:         @Override


Line 350:     }
Line 351: 
Line 352:     private final class DisplayNetworkIndicatorCheckboxColumn extends 
CheckboxColumn<ClusterNetworkModel> {
Line 353:         private DisplayNetworkIndicatorCheckboxColumn(boolean 
multipleSelectionAllowed,
Line 354:                 FieldUpdater<ClusterNetworkModel, Boolean> 
fieldUpdater) {
You can replace with FieldUpdater<ClusterNetworkModel, Boolean> with 
DisplayNetworkIndicatorFieldUpdater
Line 355:             super(multipleSelectionAllowed, fieldUpdater);
Line 356:         }
Line 357: 
Line 358:         @Override


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If0a72f5530388d1abb6758e0d9cc9e5c8ebdb3e9
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to