@Override
  public void replaceElement(final ProjectStructureElement newElement) {
    final ModuleEditor editor = myContext.getModulesConfigurator().getModuleEditor(myModule);
    if (editor != null) {
      final ModifiableRootModel rootModel = editor.getModifiableRootModelProxy();
      OrderEntryUtil.replaceLibrary(rootModel, ((LibraryProjectStructureElement)mySourceElement).getLibrary(),
                                    ((LibraryProjectStructureElement)newElement).getLibrary());
      myContext.getDaemonAnalyzer().queueUpdate(new ModuleProjectStructureElement(myContext, myModule));
    }
  }
@Override
  public void replaceElement(final ProjectStructureElement newElement)