private void positionNewPlaceholder(Set<ComponentPlaceholder> activePlaceholders,
			ComponentPlaceholder newPlaceholder) {

		// first, see if we can stack the placeholder onto other, similar placeholders
		ComponentPlaceholder stackUponPlaceholder =
			findBestPlaceholderToStackUpon(activePlaceholders, newPlaceholder);
		if (stackUponPlaceholder != null) {
			stackUponPlaceholder.getNode().add(newPlaceholder);
			return;
		}

		WindowPosition windowPosition = newPlaceholder.getProvider().getDefaultWindowPosition();
		if (windowPosition == null) {
			// Error condition when provider return null
			windowPosition = WindowPosition.WINDOW;
		}

		// next, see if there is a logical anchor next to which we can put the new placeholder
		ComponentPlaceholder relativePlaceholder =
			findBestPlaceholderAnchor(activePlaceholders, newPlaceholder);
		if (relativePlaceholder == null) {
			// nothing better found, add it to the root node
			installer.installPlaceholder(newPlaceholder, windowPosition);
			return;
		}

		// are the groups the same?
		String newGroup = newPlaceholder.getGroup();
		String existingGroup = relativePlaceholder.getGroup();
		if (newGroup.equals(existingGroup)) {
			positionInSameGroup(newPlaceholder, relativePlaceholder);
		}
		else {
			positionInRelativeGroup(newPlaceholder, relativePlaceholder);
		}
	}
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