* @param options - the values for compiler options
* @return a copy of the program modifier, either a new one, or the private copy held by this workspace manager.
*/
protected ProgramModifier makeProgramModifier(CompilationOptions options) {
ProgramModifier newProgramModifier = programManager.makeProgramModifier();
for (final StatusListener statusListener : statusListeners) {
newProgramModifier.addStatusListener(statusListener);
}
if (options != null) {
newProgramModifier.setForceCodeRegen(options.isForceCodeRegeneration());
newProgramModifier.setForImmediateUse(options.isForImmediateUse());
newProgramModifier.setIgnoreCompiledModuleInfo(options.isIgnoreCompiledModuleInfo());
newProgramModifier.setForeignContextProvider(options.getCustomForeignContextProvider());
}
return newProgramModifier;
}