Collection<File> flattenedFileStructure =
flattenDraggedFileStructures(fileNames);
ServiceReference fileLoaderServiceReference =
Activator.context.getServiceReference(FileLoaderService.class.getName());
FileLoaderService fileLoader =
(FileLoaderService) Activator.context.getService(
fileLoaderServiceReference);
DataManagerService dataManager =
(DataManagerService) Activator.context.getService(
Activator.context.getServiceReference(
DataManagerService.class.getName()));
ServiceReference dataManagerServiceReference =
Activator.context.getServiceReference(DataManagerService.class.getName());
for (File file : flattenedFileStructure) {
/* TODO: Eventually use the AlgorithmInvocationService for this
* kind of stuff?
*/
ServiceReference uniqueServiceReference = dataManagerServiceReference;
// ServiceReference uniqueServiceReference = new ServiceReferenceDelegate(
// dataManagerServiceReference);
CIShellContext ciShellContext = new CIShellContextDelegate(
uniqueServiceReference, new LocalCIShellContext(Activator.context));
LogService uniqueLogger =
(LogService) ciShellContext.getService(LogService.class.getName());
try {
Data[] inputData = fileLoader.loadFile(
Activator.context,
ciShellContext,
uniqueLogger,
ProgressMonitor.NULL_MONITOR,
file);