1 package org.simantics.scl.osgi.internal;
5 import org.osgi.service.component.annotations.Component;
6 import org.simantics.scl.compiler.module.repository.UpdateListener;
7 import org.simantics.scl.compiler.source.FileModuleSource;
8 import org.simantics.scl.compiler.source.ModuleSource;
9 import org.simantics.scl.compiler.source.TextualModuleSource;
10 import org.simantics.scl.compiler.source.repository.ModuleSourceRepository;
12 import gnu.trove.procedure.TObjectProcedure;
15 public class FileSystemModuleSourceRepository implements ModuleSourceRepository {
17 synchronized public ModuleSource getModuleSource(String moduleName,
18 UpdateListener listener) {
19 if(!moduleName.startsWith("file:"))
21 return new FileModuleSource(moduleName, getClass().getClassLoader(),
22 new File(moduleName.substring(5)), TextualModuleSource.DEFAULT_IMPORTS);
26 synchronized public void forAllModules(TObjectProcedure<String> procedure) {
30 public String getDocumentation(String documentationName) {
35 public void forAllDocumentations(TObjectProcedure<String> procedure) {
39 public void checkUpdates() {