SymfonyBundleUtil symfonyBundleUtil = new SymfonyBundleUtil(this.project);
final SymfonyBundle symfonyBundle = symfonyBundleUtil.getContainingBundle(fileContext);
List<TranslationFileModel> psiFilesSorted = new ArrayList<TranslationFileModel>();
for(PsiFile psiFile: psiFiles) {
TranslationFileModel psiWeightList = new TranslationFileModel(psiFile);
if(symfonyBundle != null && symfonyBundle.isInBundle(psiFile)) {
psiWeightList.setSymfonyBundle(symfonyBundle);
psiWeightList.setBoldness(true);
psiWeightList.addWeight(2);
} else {
psiWeightList.setSymfonyBundle(symfonyBundleUtil.getContainingBundle(psiFile));
}
String relativePath = psiWeightList.getRelativePath();
if(relativePath != null && (relativePath.startsWith("src") || relativePath.startsWith("app"))) {
psiWeightList.addWeight(1);
}
psiFilesSorted.add(psiWeightList);
}