protected TableSortingContext<T> createSortingContext(TableSortState newSortState) {

		if (!isValidSortState(newSortState)) {
			newSortState = TableSortState.createUnsortedSortState();
			if (!isDisposed) {
				Msg.error(this, """
						"Table '%s' sort is invalid.  Assuming columns have been removed. \
						Setting unsorted.""".formatted(getName()));
			}
		}

		return new TableSortingContext<>(newSortState, getComparatorChain(newSortState));
	}
Returns true if this model has been sorted and does not have a new pending sort that will
be applied

@return true if sorted
@see #isSortPending()
Ghidra/Framework/Docking/src/main/java/docking/widgets/table/AbstractSortedTableModel.java