public void renameMethod(@Nonnull Workspace workspace,
	                         @Nonnull WorkspaceResource resource,
	                         @Nonnull ClassBundle<? extends ClassInfo> bundle,
	                         @Nonnull ClassInfo declaringClass,
	                         @Nonnull MethodMember method) {
		String originalName = method.getName();
		Consumer<String> renameTask = newName -> {
			IntermediateMappings mappings = new IntermediateMappings();
			mappings.addMethod(declaringClass.getName(), method.getDescriptor(), originalName, newName);

			// Apply the mappings.
			MappingApplier applier = mappingApplierService.inWorkspace(workspace);
			MappingResults results = applier.applyToPrimaryResource(mappings);
			results.apply();
		};
		new NamePopup(renameTask)
				.withInitialName(originalName)
				.forMethodRename(declaringClass, method)
				.show();
	}
Prompts the user to rename the given method.

@param workspace
		Containing workspace.
@param resource
		Containing resource.
@param bundle
		Containing bundle.
@param declaringClass
		Class containing the method.
@param method
		Method to rename.
recaf-ui/src/main/java/software/coley/recaf/services/navigation/Actions.java