Source:
public void edit(final VmInitModel model) { driver.edit(model); initializeEnabledCBBehavior(model); networkAddButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { model.getAddNetworkCommand().execute(); } }); networkRemoveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { model.getRemoveNetworkCommand().execute(); } }); model.getNetworkList().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { setNetworkDetailsStyle(model.getNetworkList().getSelectedItem() != null); } }); model.getNetworkBootProtocolList().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { setNetworkStaticDetailsStyle(model.getNetworkBootProtocolList().getSelectedItem() == null || model.getNetworkBootProtocolList().getSelectedItem().getValue() == NetworkBootProtocol.STATIC_IP); } }); model.getCloudInitPasswordSet().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if (args != null && args instanceof PropertyChangedEventArgs) { String propName = ((PropertyChangedEventArgs) args).propertyName; if ("IsChangable".equals(propName)) { cloudInitPasswordSetEditor.setTitle( model.getCloudInitPasswordSet().getIsChangable() ? constants.vmInitPasswordSetToolTip() : constants.vmInitPasswordNotSetToolTip() ); } } } }); model.getSysprepPasswordSet().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if (args != null && args instanceof PropertyChangedEventArgs) { String propName = ((PropertyChangedEventArgs) args).propertyName; if ("IsChangable".equals(propName)) { sysprepPasswordSetEditor.setTitle( model.getSysprepPasswordSet().getIsChangable() ? constants.vmInitPasswordSetToolTip() : constants.vmInitPasswordNotSetToolTip() ); } } } }); }

Target:
public void edit(final VmInitModel model) { driver.edit(model); initializeEnabledCBBehavior(model); networkAddButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { model.getAddNetworkCommand().execute(); } }); networkRemoveButton.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { model.getRemoveNetworkCommand().execute(); } }); model.getNetworkList().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { setNetworkDetailsStyle(model.getNetworkList().getSelectedItem() != null); } }); model.getNetworkBootProtocolList().getSelectedItemChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { setNetworkStaticDetailsStyle(model.getNetworkBootProtocolList().getSelectedItem() != null && model.getNetworkBootProtocolList().getSelectedItem() == NetworkBootProtocol.STATIC_IP); } }); model.getCloudInitPasswordSet().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if (args != null && args instanceof PropertyChangedEventArgs) { String propName = ((PropertyChangedEventArgs) args).propertyName; if ("IsChangable".equals(propName)) { cloudInitPasswordSetEditor.setTitle( model.getCloudInitPasswordSet().getIsChangable() ? constants.vmInitPasswordSetToolTip() : constants.vmInitPasswordNotSetToolTip() ); } } } }); model.getSysprepPasswordSet().getPropertyChangedEvent().addListener(new IEventListener() { @Override public void eventRaised(Event ev, Object sender, EventArgs args) { if (args != null && args instanceof PropertyChangedEventArgs) { String propName = ((PropertyChangedEventArgs) args).propertyName; if ("IsChangable".equals(propName)) { sysprepPasswordSetEditor.setTitle( model.getSysprepPasswordSet().getIsChangable() ? constants.vmInitPasswordSetToolTip() : constants.vmInitPasswordNotSetToolTip() ); } } } }); }