private String getPropertiesFileSuffix() {
   if (myResourceBundle == null) {
     return myUseXMLBasedPropertiesCheckBox.isSelected() ? ".xml" : ".properties";
   }
   return "."
       + myResourceBundle
           .getDefaultPropertiesFile()
           .getContainingFile()
           .getFileType()
           .getDefaultExtension();
 }
 public CreateResourceBundleDialogComponent(
     Project project, PsiDirectory directory, ResourceBundle resourceBundle) {
   myProject = project;
   myDirectory = directory;
   myResourceBundle = resourceBundle;
   if (resourceBundle != null) {
     myResourceBundleNamePanel.setVisible(false);
     myUseXMLBasedPropertiesCheckBox.setVisible(false);
   } else {
     final String checkBoxSelectedStateKey = getClass() + ".useXmlPropertiesFiles";
     myUseXMLBasedPropertiesCheckBox.setSelected(
         PropertiesComponent.getInstance().getBoolean(checkBoxSelectedStateKey));
     myUseXMLBasedPropertiesCheckBox.addContainerListener(
         new ContainerAdapter() {
           @Override
           public void componentRemoved(ContainerEvent e) {
             PropertiesComponent.getInstance()
                 .setValue(checkBoxSelectedStateKey, myUseXMLBasedPropertiesCheckBox.isSelected());
           }
         });
   }
 }