public void createExternalReference(String fromAddress, String libraryName,
			String externalLabel, String extAddress, int opIndex, RefType refType,
			SourceType sourceType) throws Exception {
		tx(() -> {
			ReferenceManager refMgr = program.getReferenceManager();
			Address eAddress = extAddress == null ? null : addr(extAddress);

			SymbolTable symTable = program.getSymbolTable();
			ExternalManager extMgr = program.getExternalManager();
			Namespace namespace = extMgr.addExternalLibraryName(libraryName, sourceType);

			String myExternalLabel = externalLabel;
			if (myExternalLabel != null && myExternalLabel.indexOf(Namespace.DELIMITER) > 0) {
				// External manager API does not yet support creation of namespaces within
				// library so we handle that here
				SymbolPath symPath = new SymbolPath(myExternalLabel);
				myExternalLabel = symPath.getName();
				namespace = NamespaceUtils.createNamespaceHierarchy(symPath.getParentPath(),
					namespace, program, null, sourceType);
			}

			Reference ref = refMgr.addExternalReference(addr(fromAddress), libraryName,
				myExternalLabel, eAddress, sourceType, opIndex, refType);

			if (!(namespace instanceof Library)) {
				Symbol s = symTable.getSymbol(ref);
				s.setNamespace(namespace);
			}
		});
	}
Creates a sting data type instance at the specified address, repeated {@code N} times.

@param addressString address.
@param dt {@link AbstractStringDataType} string type to place at address.
@param n repeat count.
Ghidra/Features/Base/src/main/java/ghidra/program/database/ProgramBuilder.java