private PropertiesFile getSelectedPropertiesFile() {
   if (mySelectedEditor == null) return null;
   PropertiesFile selectedFile = null;
   for (Map.Entry<PropertiesFile, Editor> entry : myEditors.entrySet()) {
     Editor editor = entry.getValue();
     if (editor == mySelectedEditor) {
       selectedFile = entry.getKey();
       break;
     }
   }
   return selectedFile;
 }
  @Override
  public void dispose() {
    if (mySelectedEditor != null) {
      for (final Map.Entry<PropertiesFile, Editor> entry : myEditors.entrySet()) {
        if (mySelectedEditor.equals(entry.getValue())) {
          writeEditorPropertyValue(mySelectedEditor, entry.getKey(), null);
        }
      }
    }

    VirtualFileManager.getInstance().removeVirtualFileListener(myVfsListener);
    myDisposed = true;
    Disposer.dispose(myStructureViewComponent);
    releaseAllEditors();
  }