コード例 #1
0
  @Override
  public void syncLibraries(IProgressMonitor... monitorWrap) {
    // TODO system routine libraries seems no use ,need to check more...
    // deploy system routine libraries
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerUIService.class)) {
      ILibraryManagerUIService libUiService =
          (ILibraryManagerUIService)
              GlobalServiceRegister.getDefault().getService(ILibraryManagerUIService.class);
      libUiService.initializeSystemLibs();
    }

    if (TalendCacheUtils.cleanComponentCache()) {
      repositoryBundleService.clearCache();
    }
    // Add a new system file, if exists, means all components libs are already setup, so no need to
    // do again.
    // if clean the component cache, it will automatically recheck all libs still.
    if (!repositoryBundleService.isInitialized()) {
      // 2. Components libraries
      if (GlobalServiceRegister.getDefault().isServiceRegistered(IComponentsService.class)) {
        repositoryBundleService.deployComponentsLibs(monitorWrap);
        repositoryBundleService.setInitialized();
      }
    }

    checkInstalledLibraries();

    // clean the temp library of job needed in .java\lib
    cleanLibs();

    log.debug(Messages.getString("JavaLibrariesService.synchronization")); // $NON-NLS-1$
    isLibSynchronized = true;
  }
コード例 #2
0
  public static boolean checkIsInstallExternalJar() {
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerUIService.class)) {
      ILibraryManagerUIService libUiService =
          (ILibraryManagerUIService)
              GlobalServiceRegister.getDefault().getService(ILibraryManagerUIService.class);

      return libUiService.isModuleInstalledForBundle(REQUIRE_BUNDLE_NAME);
    }
    return false;
  }
コード例 #3
0
 @Override
 public List<URL> getTalendBeansFolder() throws IOException {
   List<URL> toReturn = new ArrayList<URL>();
   if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerUIService.class)) {
     ILibraryManagerUIService libUiService =
         (ILibraryManagerUIService)
             GlobalServiceRegister.getDefault().getService(ILibraryManagerUIService.class);
     for (IRoutinesProvider routineProvider :
         libUiService.getRoutinesProviders(ECodeLanguage.JAVA)) {
       toReturn.add(routineProvider.getTalendRoutinesFolder());
     }
   }
   return toReturn;
 }
コード例 #4
0
  /*
   * (non-Javadoc)
   *
   * @see org.talend.core.model.general.ILibrariesService#getSystemRoutines()
   */
  @Override
  public List<URL> getSystemRoutines() {
    List<URL> toReturn = new ArrayList<URL>();
    if (GlobalServiceRegister.getDefault().isServiceRegistered(ILibraryManagerUIService.class)) {
      ILibraryManagerUIService libUiService =
          (ILibraryManagerUIService)
              GlobalServiceRegister.getDefault().getService(ILibraryManagerUIService.class);

      for (IRoutinesProvider routineProvider :
          libUiService.getRoutinesProviders(ECodeLanguage.JAVA)) {
        toReturn.addAll(routineProvider.getSystemRoutines());
      }
    }
    return toReturn;
  }