getWorkspaceManager().getWorkspace().asModuleContainer(),
moduleName, startLine, 0, endLine, 0, functionNames);
CompilerMessageLogger messageLogger = new MessageLogger();
refactorer.calculateModifications(messageLogger);
if (messageLogger.getNErrors() == 0) {
// apply the changes, unless we encountered errors while calculating them
refactorer.apply(messageLogger);
}