private ComponentPlaceholder findBestPlaceholderAnchor(
			Set<ComponentPlaceholder> activePlaceholders, ComponentPlaceholder newPlaceholder) {

		String group = newPlaceholder.getGroup();
		if (ComponentProvider.DEFAULT_WINDOW_GROUP.equals(group)) {
			return null; // do not place together providers without a group
		}

		ComponentPlaceholder bestMatchPlaceholder = null;

		//
		// Prefer the given placeholders, if any exist.  The goal is to place providers together
		// when they:
		// 1) share the same owner (plugin), and
		// 2) are in the same group, or related groups
		//
		// If there are not other providers that share the same owner as the one we are given,
		// then we will search all providers.  This allows different plugins to share
		// window arrangement.
		//
		Set<ComponentPlaceholder> buddies = activePlaceholders;
		if (buddies.isEmpty()) {
			// no existing placeholders *with the same owner*--try searching all placeholders,
			// so that we can match providers' window groups across plugins.
			buddies = getAllActivePlaceholders();
		}

		for (ComponentPlaceholder placeholder : buddies) {
			if (placeholder == newPlaceholder) {
				continue;
			}

			String testGroup = placeholder.getGroup();
			if (group.startsWith(testGroup)) {
				if (bestMatchPlaceholder == null ||
					testGroup.length() > bestMatchPlaceholder.getGroup().length()) {
					bestMatchPlaceholder = placeholder;
				}
			}
		}

		return bestMatchPlaceholder;
	}
Finds or creates a component placeholder object for the given provider.
@param provider the provider for which to get an placeholder object.
@param defaultPlaceholder the placeholder to use if an existing one cannot be found
@return a component placeholder object that will be used to manager the providers component.
Ghidra/Framework/Docking/src/main/java/docking/PlaceholderManager.java