I suggest you ...

Allow easy visualisation of states using yUML :)

This would need to be an addin or something, but it would be nice to have a way of visualising states as a diagram. Perhaps using http://yuml.me activity diagrams (until State diagrams are implemented).

21 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    anonymousanonymous shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • JesseJesse commented  ·   ·  Flag as inappropriate

        I did this but for Graphviz () using dot.
        Add this to StateMachine.cs

        /// <summary>
        /// Writes a visual representation of the FSM to be used in Graphviz.
        /// </summary>
        public string ToDot()
        {
        string ret = "digraph G {";

        foreach (var stateRepresentation in _stateConfiguration)
        {
        ret += loop(stateRepresentation.Value);
        }

        ret += " }";
        return (ret);
        }

        private string loop(StateRepresentation value)
        {
        string s = "";
        foreach (TTrigger trigger in value.PermittedTriggers)
        {
        TriggerBehaviour triggerBehaviour;
        if (value.TryFindHandler(trigger, out triggerBehaviour))
        {
        TState destination;
        if (triggerBehaviour.ResultsInTransitionFrom(value.UnderlyingState, new object[0], out destination))
        {
        var transition = new Transition(value.UnderlyingState, destination, trigger);
        s += value.UnderlyingState + " -> " + transition.Destination + " [fontsize=10, label=\"" + trigger + "\"]" + ";";
        }
        }
        }
        return (s);
        }

      Feedback and Knowledge Base