Package org.cishell.app.service.fileloader

Examples of org.cishell.app.service.fileloader.FileLoadException


      String validatorsQuery = String.format(format, fileExtension, mimeType);
      ServiceReference[] supportingValidators = bundleContext.getAllServiceReferences(
        AlgorithmFactory.class.getName(), validatorsQuery);
     
      if (supportingValidators == null) {
        throw new FileLoadException(String.format(
          "The file %s cannot be loaded as type %s.", file.getName(), mimeType));
      } else {
        AlgorithmFactory validator =
          (AlgorithmFactory) bundleContext.getService(supportingValidators[0]);

        return loadFileOfType(
          bundleContext, ciShellContext, logger, progressMonitor, file, validator);
      }
    } catch (InvalidSyntaxException e) {
      e.printStackTrace();

      throw new FileLoadException(e.getMessage(), e);
    }
  }
View Full Code Here


        listener.fileLoaded(file);
      }

      return loadedFileData;
    } catch (AlgorithmExecutionException e) {
      throw new FileLoadException(e.getMessage(), e);
    }
  }
View Full Code Here

  private IWorkbenchWindow getFirstWorkbenchWindow() throws FileLoadException {
    final IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();

    if (windows.length == 0) {
      throw new FileLoadException(
        "Cannot obtain workbench window needed to open dialog.");
    } else {
      return windows[0];
    }
  }
View Full Code Here

TOP

Related Classes of org.cishell.app.service.fileloader.FileLoadException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.