final IEclipseContext context) {
CCWPlugin.getTracer().trace(TraceOptions.LOG_INFO, "create object for bundleclass://" + bundle.getSymbolicName() + "/" + "clojure" + "/" + varAndParams);
try {
final String[] parts = varAndParams.split("\\/");
String var = parts[0] + "/" + parts[1];
final Var v = BundleUtils.requireAndGetVar(bundle, var);
return ClojureOSGi.withBundle(bundle, new RunnableWithException() {
@Override
public Object run() throws Exception {
switch (parts.length) {
case 2: return v.invoke(context);
case 3: return v.invoke(context, parts[2]);
case 4: return v.invoke(context, parts[2], parts[3]);
case 5: return v.invoke(context, parts[2], parts[3], parts[4]);
case 6: return v.invoke(context, parts[2], parts[3], parts[4], parts[5]);
case 7: return v.invoke(context, parts[2], parts[3], parts[4], parts[5], parts[6]);
case 8: return v.invoke(context, parts[2], parts[3], parts[4], parts[5], parts[6], parts[7]);
default: throw new UnsupportedOperationException("Cannot handle more than 6 arguments");
}
}
});
} catch (CoreException e) {