private void delete() {
		int row = table.getSelectedRow();
		if (row != 0 && row != tableModel.getRowCount() - 1) {
			Msg.showError(this, this, "Cannot Delete Version",
				"Only first and last version may be deleted.");
			return;
		}
		Version version = tableModel.getVersionAt(row);
		try {
			for (ItemCheckoutStatus status : domainFile.getCheckouts()) {
				if (status.getCheckoutVersion() == version.getVersion()) {
					Msg.showError(this, this, "Cannot Delete Version",
						"File version has one or more checkouts.");
					return;
				}

			}
			if (confirmDelete()) {
				DeleteTask task = new DeleteTask(version.getVersion());
				new TaskLauncher(task, this);
			}
		}
		catch (IOException e) {
			ClientUtil.handleException(tool.getProject().getRepository(), e, "Delete Version",
				this);
		}
	}
Set up the drag and drop stuff.
Ghidra/Framework/Project/src/main/java/ghidra/framework/main/datatree/VersionHistoryPanel.java