Skip to content

Commit

Permalink
prevent crash of modules that import util::IDEServices outside of the…
Browse files Browse the repository at this point in the history
… IDE environment
  • Loading branch information
jurgenvinju committed Nov 5, 2024
1 parent a10f8cd commit d95267f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/org/rascalmpl/interpreter/utils/JavaBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.rascalmpl.exceptions.JavaCompilation;
import org.rascalmpl.exceptions.JavaMethodLink;
import org.rascalmpl.exceptions.RuntimeExceptionFactory;
import org.rascalmpl.ideservices.BasicIDEServices;
import org.rascalmpl.ideservices.IDEServices;
import org.rascalmpl.interpreter.Configuration;
import org.rascalmpl.interpreter.IEvaluator;
Expand Down Expand Up @@ -445,7 +446,7 @@ else if (formals[i].isAssignableFrom(IDEServices.class)) {
args[i] = (IDEServices) monitor;
}
else {
throw new IllegalArgumentException("no IDE services are available in this environment");
args[i] = new BasicIDEServices(err, monitor);
}
}
else if (formals[i].isAssignableFrom(IResourceLocationProvider.class)) {
Expand Down

0 comments on commit d95267f

Please sign in to comment.