src/vs/platform/undoRedo/common/undoRedoService.ts/UndoRedoService/canUndo
class UndoRedoService:	public canUndo(resourceOrSource: URI | UndoRedoSource): boolean {
		if (resourceOrSource instanceof UndoRedoSource) {
			const [, matchedStrResource] = this._findClosestUndoElementWithSource(resourceOrSource.id);
			return matchedStrResource ? true : false;
		}
		const strResource = this.getUriComparisonKey(resourceOrSource);
		if (this._editStacks.has(strResource)) {
			const editStack = this._editStacks.get(strResource)!;
			return editStack.hasPastElements();
		}
		return false;
	}