Alexander Wels has posted comments on this change.
Change subject: webadmin: Start/stop progress on async operations
......................................................................
Patch Set 1: Code-Review+1
(2 comments)
I was going to ask about the difference between the new events and
raiseQueryCompleteEvent and raiseQueryStartEvent, but those only apply to
queries, and are being removed in a subsequent patch.
You also need to add:
<!--
findbugs complain of unused field in class.
This is a GWT class and use to generate code
findbugs reason:
UuF: Unused field (UUF_UNUSED_FIELD)
-->
<Match>
<Class
name="org.ovirt.engine.ui.frontend.communication.AsyncOperationComplete" />
<Bug code="UuF"/>
</Match>
Same for AsyncOperationStarted, so findbugs will not complain about generated
events.
http://gerrit.ovirt.org/#/c/35964/1/frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java
File
frontend/webadmin/modules/gwt-common/src/main/java/org/ovirt/engine/ui/common/presenter/AbstractModelBoundPopupPresenterWidget.java:
Line 150: }
Line 151:
Line 152: if (manageProgress && asyncOperationCounter++ == 0) {
Line 153: model.startProgress(null);
Line 154: }
Can't you simplify this with just the asyncOperationCounter like this:
if (event.getTarget() != model) {
return;
}
if(asyncOperationCounter == 0) {
model.startProgress(null);
}
asyncOperationCounter++;
Line 155: }
Line 156: });
Line 157: addRegisteredHandler(AsyncOperationCompleteEvent.getType(),
new AsyncOperationCompleteHandler() {
Line 158: @Override
Line 163:
Line 164: if (manageProgress && --asyncOperationCounter == 0) {
Line 165: manageProgress = false;
Line 166: model.stopProgress();
Line 167: }
Can't you simplify this combined with above and this:
if (event.getTarget() != model) {
return;
}
if(asyncOperationCounter > 0) {
asyncOperationCounter--;
}
if (asyncOperationCounter == 0) {
model.stopProgress();
}
That way you don't need the manageProgress variable.
Line 168: }
Line 169: });
Line 170:
Line 171: // Set up model command invoker
--
To view, visit http://gerrit.ovirt.org/35964
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I24ed80a5453668b37f488e0226f7bdfbf36e503d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Alexander Wels <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Greg Sheremeta <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: Vojtech Szocs <[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