@Override
	public ToolTemplate getDefaultToolTemplate(String contentType) {

		try {
			ContentHandler<?> contentHandler = DomainObjectAdapter.getContentHandler(contentType);
			if (contentHandler instanceof LinkHandler) {
				Class<? extends DomainObjectAdapter> domainObjectClass =
					contentHandler.getDomainObjectClass();
				contentHandler = DomainObjectAdapter.getContentHandler(domainObjectClass);
				contentType = contentHandler.getContentType();
			}
		}
		catch (IOException e) {
			// Failed to identify content handler
			Msg.error(this, e.getMessage());
			return null;
		}

		String toolName =
			Preferences.getProperty(getToolAssociationPreferenceKey(contentType), null, true);
		if (toolName == null) {
			// never been set--lookup a hardcoded default
			toolName = getDefaultToolAssociation(contentType);
		}

		return findToolChestToolTemplate(toolName);
	}
Implementation of service used to manipulate tools.
Ghidra/Framework/Project/src/main/java/ghidra/framework/project/tool/ToolServicesImpl.java