public class ActionStack : CustomDebugStringConvertible

An Action Stack is a trail of actions a user has performed from a specific Feature, with sub-stacks created when the user then uses an action from another feature, so each stack can represent a graph of actions broken down by feature.

Certain actions will Close their stack, e.g. a Close option on a document editing feature. Some stacks may never be closed however, say a DrawingFeature that allows use of many drawing tools. There is no clear end to that except closing the document, an operation on a different feature.

!!! TODO: Work out what this means for sub-stacks. We want to retain information about what was done in other features, in amongst the current stack’s features, but when the stack closes we don’t want to lose that history if there was not a closing action of the sub stack. Some sub-stacks should be implicitly discarded however - e.g. drawing functions.

We need reference semantics here because we have parent relationships and navigate the graph.

!!! TODO: Use LIFOQueue to limit to the number of past items held to avoid blowing/leaking memory over time