public void movePackage(@Nonnull Workspace workspace,
	                        @Nonnull WorkspaceResource resource,
	                        @Nonnull JvmClassBundle bundle,
	                        @Nonnull String packageName) {
		boolean isRootDirectory = packageName.isEmpty();
		ItemTreeSelectionPopup.forPackageNames(bundle, chosenPackages -> {
					if (chosenPackages.isEmpty()) return;
					String newPackageName = chosenPackages.get(0);
					if (packageName.equals(newPackageName)) return;

					// Create mappings for classes in the given package.
					IntermediateMappings mappings = new IntermediateMappings();
					String newPrefix = (newPackageName.isEmpty() ? "" : newPackageName + "/") + shortenPath(packageName) + "/";
					if (isRootDirectory) {
						// Source is default package
						for (JvmClassInfo info : bundle.values()) {
							String name = info.getName();
							if (name.indexOf('/') != -1) {
								mappings.addClass(name, newPrefix + name);
							}
						}
					} else {
						// Source is another package
						String oldPrefix = packageName + "/";
						for (JvmClassInfo info : bundle.values()) {
							String name = info.getName();
							if (newPackageName.isEmpty() && name.indexOf('/') == -1) {
								// Target is default package
								mappings.addClass(name, shortenPath(name));
							} else if (name.startsWith(oldPrefix)) {
								// Target is some package, replace prefix
								mappings.addClass(name, replacePrefix(name, oldPrefix, newPrefix));
							}
						}
					}

					// Apply the mappings.
					MappingApplier applier = mappingApplierService.inWorkspace(workspace);
					MappingResults results = applier.applyToPrimaryResource(mappings);
					results.apply();
				}).withTitle(Lang.getBinding("dialog.title.move-package"))
				.withTextMapping(name -> textService.getPackageTextProvider(workspace, resource, bundle, name).makeText())
				.withGraphicMapping(name -> iconService.getPackageIconProvider(workspace, resource, bundle, name).makeIcon())
				.show();
	}
Prompts the user to select a package to move the given package into.

@param workspace
		Containing workspace.
@param resource
		Containing resource.
@param bundle
		Containing bundle.
@param packageName
		Package to go move into another package as a sub-package.
recaf-ui/src/main/java/software/coley/recaf/services/navigation/Actions.java