* @param interpret
* the list of strings from prefs (projectName:fileName;... or
* moduleName;...)
*/
public void addModules(final Collection<String> interpret) {
final IErlModel model = ErlangEngine.getInstance().getModel();
for (final String projectColonModule : interpret) {
// project:module | module
final String[] projectModule = projectColonModule.split(":");
IErlModule module = null;
if (projectModule.length > 1) {
final IErlProject project = (IErlProject) model
.getChildNamed(projectModule[0]);
if (project != null) {
final String mName = projectModule[1];
try {
final boolean isErlangFile = CommonUtils
.isErlangFileContentFileName(mName);
final String s = isErlangFile ? mName : mName + ".erl";
module = project.getModule(s);
} catch (final ErlModelException e) {
ErlLogger.warn(e);
}
}
} else {
try {
module = model.findModule(projectColonModule);
} catch (final ErlModelException e) {
}
}
addModule(module);
}