org.simantics.scl.compiler.types.kinds,
org.simantics.scl.compiler.types.util
Bundle-ClassPath: .
-Service-Component: OSGI-INF/org.simantics.scl.compiler.source.repository.BuiltinModuleSourceRepository.xml,
- OSGI-INF/org.simantics.scl.compiler.elaboration.java.LoggingModule.xml
Import-Package: org.osgi.service.component.annotations
+Bundle-ActivationPolicy: lazy
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.simantics.scl.compiler.elaboration.java.LoggingModule">
- <implementation class="org.simantics.scl.compiler.elaboration.java.LoggingModule"/>
-</scr:component>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.simantics.scl.compiler.source.repository.BuiltinModuleSourceRepository">
- <service>
- <provide interface="org.simantics.scl.compiler.source.repository.ModuleSourceRepository"/>
- </service>
- <implementation class="org.simantics.scl.compiler.source.repository.BuiltinModuleSourceRepository"/>
-</scr:component>
\ No newline at end of file
output.. = bin/
bin.includes = META-INF/,\
.,\
- OSGI-INF/org.simantics.scl.compiler.source.repository.BuiltinModuleSourceRepository.xml,\
- OSGI-INF/org.simantics.scl.compiler.elaboration.java.LoggingModule.xml,\
sclTests/,\
scl/
import org.slf4j.LoggerFactory;
import org.slf4j.Marker;
-@Component
public class LoggingModule extends ConcreteModule {
private static final String[] LOGGING_METHODS = new String[] {
import org.simantics.scl.compiler.types.Types;
import org.simantics.scl.compiler.types.kinds.Kinds;
-@Component
public class ReflectionJavaModule extends ConcreteModule {
public static ReflectionJavaModule INSTANCE = new ReflectionJavaModule();
package org.simantics.scl.compiler.source.repository;
-import org.osgi.service.component.annotations.Component;
import org.simantics.scl.compiler.elaboration.java.Builtins;
import org.simantics.scl.compiler.elaboration.java.JavaModule;
import org.simantics.scl.compiler.elaboration.java.LoggingModule;
import org.simantics.scl.compiler.elaboration.java.MinigraphModule;
import org.simantics.scl.compiler.elaboration.java.ReflectionJavaModule;
-@Component
public class BuiltinModuleSourceRepository extends MapModuleSourceRepository implements ModuleSourceRepository {
public BuiltinModuleSourceRepository() {
super(Builtins.INSTANCE,
public ModuleSource getModuleSource(String moduleName,
UpdateListener listener) {
ModuleSource result = null;
+ ModuleSourceRepository resultRepository = null;
Object[] services = sourceRepositories.getServices();
if(services != null)
for(Object sourceRepository_ : services) {
if(resultPriority > sourcePriority)
continue;
if(resultPriority == sourcePriority)
- throw new RuntimeException("Module " + moduleName + " has two sources " + result + ", " +
- source + " with the same priority.");
+ throw new RuntimeException("Module " + moduleName + " has two sources " + result + " (from "+resultRepository+"), " +
+ source + " (from "+sourceLoader+") with the same priority.");
}
result = source;
+ resultRepository = sourceLoader;
}
}
return result;