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); }