}
StructuredSelection structuredSelection = new StructuredSelection(cloudService);
int len = applicationsToProcess.size();
for (int i=0;i<len;i++){
ApplicationToService curr = applicationsToProcess.get(i);
// Detect if the service was modified for that application
//
// Call AddServicesToApplicationAction and RemoveServicesFromApplicationAction,
// which will deal with the binding and unbinding of the service. In addition
// these actions refresh the Application and Services editor after the update
boolean isBoundToServiceAfter = curr.getBoundToServiceAfter();
if (isBoundToServiceAfter != curr.getBoundToServiceBefore()){
CloudApplication cloudApp = applicationsToProcess.get(i).getCloudApplication();
CloudFoundryApplicationModule module = server.getExistingCloudModule(cloudApp.getName());
if(isBoundToServiceAfter){
ModifyServicesForApplicationAction bindService =
new AddServicesToApplicationAction(structuredSelection,