コード例 #1
0
 public static Set<IConnectionValidator> getConnectionValidators() {
   if (validators == null) {
     validators = new HashSet<IConnectionValidator>();
     IConfigurationElement[] validatorExtensions =
         Platform.getExtensionRegistry().getConfigurationElementsFor(CONNECTION_VALIDATOR);
     if (validatorExtensions != null && validatorExtensions.length > 0) {
       for (IConfigurationElement ie : validatorExtensions) {
         try {
           Object execution = ie.createExecutableExtension(CLASS_ATTRIBUTE);
           validators.add((IConnectionValidator) execution);
         } catch (CoreException e) {
           ExceptionHandler.log(e.getMessage());
           continue;
         }
       }
     }
   }
   return validators;
 }