protected void refreshInFinish(boolean isModified) {
   if (isModified) {
     if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
       IDesignerCoreService service =
           (IDesignerCoreService)
               GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
       if (service != null) {
         service.refreshComponentView(connectionItem);
       }
     }
   }
 }
  /**
   * DOC ggu Comment method "updateForRepository".
   *
   * <p>Worked for DetecteViewImpactAction
   *
   * @param node
   * @return
   */
  public boolean updateForRepository(IStructuredSelection selection, boolean needConfirm) {
    boolean forcePropagation = false;
    IRepositoryUpdateManagerProvider[] repositoryProviders = reader.getRepositoryProviders();
    for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
      if (provider.needForcePropagation(selection)) {
        forcePropagation = true;
      }
    }

    if (!forcePropagation && needConfirm) {
      IDesignerCoreService designerCoreService =
          CoreRuntimePlugin.getInstance().getDesignerCoreService();
      boolean deactive =
          designerCoreService != null
              ? Boolean.parseBoolean(
                  designerCoreService.getPreferenceStore(
                      ITalendCorePrefConstants.DEACTIVE_REPOSITORY_UPDATE))
              : true;
      if (deactive) { // disable to do update
        return false;
      }

      boolean propagated = RepositoryUpdateManager.openPropagationDialog();
      if (!propagated) {
        return false;
      }
    }

    boolean updated = false;
    for (IRepositoryUpdateManagerProvider provider : repositoryProviders) {
      // if one upate successfully, will return true.
      if (provider.updateForRepository(selection)) {
        updated = true;
      }
    }
    // Old Updates
    if (doOldUpdates(selection)) {
      updated = true;
    }
    if (!updated) {
      // nothing to update
      RepositoryUpdateManager.openNoModificationDialog();
    }
    return updated;
  }
  /**
   * DOC zli Comment method "loadProjectsettingsParameters".
   *
   * @param parameters
   */
  public static void loadProjectsettingsParameters(ParametersType parameters) {
    IEditorReference[] reference =
        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
    IDesignerCoreService designerCoreService = CorePlugin.getDefault().getDesignerCoreService();
    designerCoreService.switchToCurJobSettingsView();
    List<IProcess2> openedProcess = designerCoreService.getOpenedProcess(reference);

    for (IProcess2 process : openedProcess) {
      if (process instanceof Element) {
        Element processElem = (Element) process;
        ElementParameter2ParameterType.loadElementParameters(processElem, parameters, null);
      }
      process.setNeedRegenerateCode(true);
    }
    IProxyRepositoryFactory repositoryFactory = CorePlugin.getDefault().getProxyRepositoryFactory();
    IProcess process = null;

    try {
      List<IRepositoryViewObject> all = repositoryFactory.getAll(ERepositoryObjectType.PROCESS);
      for (IRepositoryViewObject object : all) {
        if (!openedProcess.contains(object)) {
          Item item = object.getProperty().getItem();
          if (item instanceof ProcessItem) {
            process = designerCoreService.getProcessFromProcessItem((ProcessItem) item);
            if (process != null && process instanceof IProcess2) {
              IProcess2 process2 = (IProcess2) process;
              if (process2 instanceof Element) {
                Element processElem = (Element) process2;
                ElementParameter2ParameterType.loadElementParameters(processElem, parameters, null);
                ProcessType processType = process2.saveXmlFile();
                if (processType != null) {
                  ((ProcessItem) item).setProcess(processType);
                }
                repositoryFactory.save(item);
              }
            }
          }
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 /**
  * DOC sgandon Comment method "updateManualImportedJars".
  *
  * @param importedJars
  */
 private void updateManualImportedJars(AtomicInteger enabledButtonCount, String[] importedJars) {
   for (Entry<ModuleToInstall, Button> moduleAndButton : manualInstallButtonMap.entrySet()) {
     String jarName = moduleAndButton.getKey().getName();
     for (String importedJar : importedJars) {
       if (importedJar.equals(jarName)) { // disable the button
         moduleAndButton.getValue().setEnabled(false);
         enabledButtonCount.decrementAndGet();
       } // else leave the button as it is
     }
   }
   if (enabledButtonCount.get() == 0) {
     close();
     // refresh
     if (GlobalServiceRegister.getDefault().isServiceRegistered(IDesignerCoreService.class)) {
       IDesignerCoreService service =
           (IDesignerCoreService)
               GlobalServiceRegister.getDefault().getService(IDesignerCoreService.class);
       if (service != null) {
         service.refreshComponentView();
       }
     }
   }
 }