import org.cojen.classfile.TypeDesc;
import org.osgi.service.component.annotations.Component;
+import org.simantics.scl.compiler.commands.CommandSession;
import org.simantics.scl.compiler.common.names.Name;
import org.simantics.scl.compiler.constants.JavaMethod;
import org.simantics.scl.compiler.elaboration.contexts.SimplificationContext;
@Override
public Expression apply(SimplificationContext context, Type[] typeParameters, EApply apply) {
ConcreteModule module = context.getCompilationContext().module;
+ String identifier;
+ if (module != null)
+ identifier = module.getName().replaceAll("/", ".");
+ else
+ identifier = CommandSession.class.getName();
apply.set(new ELiteral(javaMethod), new Expression[] {
- new EExternalConstant(LoggerFactory.getLogger(module.getName().replaceAll("/", ".")), Logger),
+ new EExternalConstant(LoggerFactory.getLogger(identifier), Logger),
apply.parameters[0]
});
return apply;