public IEnumerable<IDaemonStageProcess> CreateProcess(IDaemonProcess process, IContextBoundSettingsStore settings, DaemonProcessKind processKind)
{
if (processKind == DaemonProcessKind.VISIBLE_DOCUMENT)
return EmptyList<IDaemonStageProcess>.InstanceList;
// check the cultureInfo of current file
var lang = process.SourceFile.GetCultureName();
if (!lang.IsEmpty())
return EmptyList<IDaemonStageProcess>.InstanceList;
var project = process.SourceFile.GetProject();
var directory = process.SourceFile.GetLocation().Directory.FullPath;
var files = System.IO.Directory.EnumerateFiles(directory,
var items = files.ToList<string, IPsiSourceFile>(f => {
var fsp = FileSystemPath.CreateByCanonicalPath(f);
var item = project.GetPsiSourceFileInProject(fsp);
return item;
});
items.Add(process.SourceFile);
var psiFiles = items.SelectNotNull(f => f.GetPsiFiles<ResxLanguage>()).SelectMany(x => x).OfType<IResxFile>();
return new List<IDaemonStageProcess>(){ CreateProcess(process, settings, processKind, psiFiles) };
}