String (final PropertiesFile propertiesFile) { final PsiDirectory directory = propertiesFile.getParent(); if (directory == null) { return null; } final String packageName; final PsiPackage aPackage = JavaDirectoryService.getInstance().getPackage(directory); if (aPackage == null) { packageName = ""; } else { packageName = aPackage.getQualifiedName(); } String bundleName = propertiesFile.getResourceBundle().getBaseName(); if (packageName.length() > 0) { bundleName = packageName + '.' + bundleName; } bundleName = bundleName.replace('.', '/'); return bundleName; }