From 645157ce7939b456e8d5a19b71a598e07f4a360c Mon Sep 17 00:00:00 2001 From: Rodin Aarssen Date: Tue, 13 Oct 2026 13:45:01 +0200 Subject: [PATCH] Messages can be added to existing PathConfigs --- src/org/rascalmpl/library/util/PathConfig.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/org/rascalmpl/library/util/PathConfig.java b/src/org/rascalmpl/library/util/PathConfig.java index ba5cf04bb42..7018650b310 100644 --- a/src/org/rascalmpl/library/util/PathConfig.java +++ b/src/org/rascalmpl/library/util/PathConfig.java @@ -9,6 +9,7 @@ import java.net.URL; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Collection; import java.util.Collections; import java.util.Enumeration; import java.util.HashMap; @@ -306,6 +307,18 @@ public PathConfig addLibLoc(ISourceLocation dir) throws IOException { return new PathConfig(projectRoot, srcs, extendedlibs, bin, ignores, resources, messages); } + public PathConfig addMessage(IConstructor newMessage) throws IOException { + List extendedMessages = new ArrayList(messages); + extendedMessages.add(newMessage); + return new PathConfig(projectRoot, srcs, libs, bin, ignores, resources, extendedMessages); + } + + public PathConfig addMessages(Collection newMessages) throws IOException { + List extendedMessages = new ArrayList(messages); + extendedMessages.addAll(newMessages); + return new PathConfig(projectRoot, srcs, libs, bin, ignores, resources, extendedMessages); + } + public PathConfig setBin(ISourceLocation bin) { return new PathConfig(projectRoot, srcs, libs, bin, ignores, resources, messages); }