code: private DefaultLocalExtension createExtension(Extension extension)
      {
          DefaultLocalExtension localExtension = new DefaultLocalExtension(this, extension);
  
          localExtension.setFile(this.storage.getNewExtensionFile(localExtension.getId(), localExtension.getType()));
  
          return localExtension;
      }
docs: Create a new local extension from a remote extension.
  
  @param extension the extension to copy
  @return the new local extension