@Override
	public void setSource(SourceType newSource) {
		assertNotGlobal();
		try {
			Pair<String, SourceType> validated = validateNameAndSource(getName(), newSource);
			newSource = validated.getRight();
		}
		catch (InvalidInputException e) {
			throw new AssertionError(e);
		}
		try (LockHold hold = LockHold.lock(manager.lock.writeLock())) {
			TraceChangeRecord<?, ?> sourceEvent = doSetSourceWithEvent(newSource);
			if (sourceEvent != null) {
				update(FLAGS_COLUMN);
				manager.trace.setChanged(sourceEvent);
			}
		}
	}
Sets the flags for the given source.

The caller must still call {@link #update(DBObjectColumn...)} for {@link #FLAGS_COLUMN}. The
update should be called before the returned event, if applicable, is fired.

@param newSource the source type
@return the appropriate change event, if a change was actually made
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/symbol/AbstractDBTraceSymbol.java