private void registerExtensionPoint(
      final String extensionPointName,
      String extensionPointBeanClass,
      PluginDescriptor descriptor,
      ExtensionPoint.Kind kind) {
    if (hasExtensionPoint(extensionPointName)) {
      if (DEBUG_REGISTRATION) {
        final ExtensionPointImpl oldEP = getExtensionPoint(extensionPointName);
        myLogger.error(
            "Duplicate registration for EP: "
                + extensionPointName
                + ": original plugin "
                + oldEP.getDescriptor().getPluginId()
                + ", new plugin "
                + descriptor.getPluginId(),
            myEPTraces.get(extensionPointName));
      }
      throw new RuntimeException("Duplicate registration for EP: " + extensionPointName);
    }

    registerExtensionPoint(
        new ExtensionPointImpl(
            extensionPointName,
            extensionPointBeanClass,
            kind,
            this,
            myAreaInstance,
            myLogger,
            descriptor));
  }
 public void registerExtensionPoint(final ExtensionPointImpl extensionPoint) {
   final String name = extensionPoint.getName();
   myExtensionPoints.put(name, extensionPoint);
   notifyEPRegistered(extensionPoint);
   if (DEBUG_REGISTRATION) {
     myEPTraces.put(name, new Throwable("Original registration for " + name));
   }
 }
 @TestOnly
 public final void notifyAreaReplaced() {
   for (final ExtensionPointImpl point : myExtensionPoints.values()) {
     point.notifyAreaReplaced(this);
   }
 }