use of com.intellij.lang.properties.refactoring.rename.ResourceBundleRenamerFactory in project intellij-community by JetBrains.
the class ResourceBundleTest method doTestRenameResourceBundleEntryFile.
private void doTestRenameResourceBundleEntryFile(String fileNameToRenameBefore, String fileNameToCheckBefore, String fileNameToRenameAfter, String fileNameToCheckAfter) {
final PsiFile toRenameFile = myFixture.addFileToProject(fileNameToRenameBefore, "");
final PsiFile toCheck = myFixture.addFileToProject(fileNameToCheckBefore, "");
final RenameProcessor processor = new RenameProcessor(getProject(), toRenameFile, fileNameToRenameAfter, true, true);
for (AutomaticRenamerFactory factory : Extensions.getExtensions(AutomaticRenamerFactory.EP_NAME)) {
if (factory instanceof ResourceBundleRenamerFactory) {
processor.addRenamerFactory(factory);
}
}
processor.run();
assertEquals(fileNameToCheckAfter, toCheck.getName());
}
Aggregations