use of com.intellij.psi.statistics.StatisticsInfo in project intellij-community by JetBrains.
the class LastSelectedPropertiesFileStore method saveLastSelectedPropertiesFile.
public void saveLastSelectedPropertiesFile(PsiFile context, PropertiesFile file) {
VirtualFile virtualFile = context.getVirtualFile();
if (virtualFile instanceof VirtualFileWindow) {
virtualFile = ((VirtualFileWindow) virtualFile).getDelegate();
}
assert virtualFile != null;
String contextUrl = virtualFile.getUrl();
final VirtualFile vFile = file.getVirtualFile();
if (vFile != null) {
String url = vFile.getUrl();
lastSelectedUrls.put(contextUrl, url);
VirtualFile containingDir = virtualFile.getParent();
lastSelectedUrls.put(containingDir.getUrl(), url);
lastSelectedFileUrl = url;
StatisticsManager.getInstance().incUseCount(new StatisticsInfo(PROPERTIES_FILE_STATISTICS_KEY, FileUtil.toSystemDependentName(VfsUtilCore.urlToPath(url))));
}
}
Aggregations