public void renamePackage(@Nonnull Workspace workspace,
	                          @Nonnull WorkspaceResource resource,
	                          @Nonnull JvmClassBundle bundle,
	                          @Nonnull String packageName) {
		boolean isRootDirectory = packageName.isEmpty();
		new NamePopup(newPackageName -> {
			// Create mappings.
			String oldPrefix = isRootDirectory ? "" : packageName + "/";
			String newPrefix = newPackageName + "/";
			IntermediateMappings mappings = new IntermediateMappings();
			for (JvmClassInfo info : bundle.valuesAsCopy()) {
				String className = info.getName();
				if (isRootDirectory) {
					// Source is the default package
					if (className.indexOf('/') == -1)
						// Class is in the default package
						mappings.addClass(className, newPackageName + '/' + className);
				} else if (className.startsWith(oldPrefix))
					// Class starts with the package prefix
					mappings.addClass(className, replacePrefix(className, oldPrefix, newPrefix));
			}

			// Apply mappings to create copies of the affected classes, using the provided name.
			// Then dump the mapped classes into bundle.
			MappingApplier applier = mappingApplierService.inWorkspace(workspace);
			MappingResults results = applier.applyToPrimaryResource(mappings);
			results.apply();
		}).withInitialPathName(packageName)
				.forPackageRename(bundle)
				.show();
	}
Prompts the user to give a new name for the copied package.

@param workspace
		Containing workspace.
@param resource
		Containing resource.
@param bundle
		Containing bundle.
@param packageName
		Name of directory to copy.
recaf-ui/src/main/java/software/coley/recaf/services/navigation/Actions.java