<div dir="ltr">You want to hook into the online expansion, right? You can register a handler that&#39;s called after online expansion completes in the place where it runs and then its results are passed back to a handler you register on the other side, back in DrRacket&#39;s main place. This is how online check syntax works.<div>
<br></div><div><a href="http://docs.racket-lang.org/tools/drracket_module-language-tools.html?q=drracket%20online#%28def._%28%28lib._drracket%2Ftool-lib..rkt%29._drracket~3amodule-language-tools~3aadd-online-expansion-handler%29%29">http://docs.racket-lang.org/tools/drracket_module-language-tools.html?q=drracket%20online#%28def._%28%28lib._drracket%2Ftool-lib..rkt%29._drracket~3amodule-language-tools~3aadd-online-expansion-handler%29%29</a><br>
</div><div><br></div><div style>This goes only one direction, tho, from the code to your view. Making the view manipulations change the source text would have to be some more mundane type thing where you just override various GUI callbacks and then work at the character/string level with the text% object in the definitions window.</div>
<div><br></div><div style>hth,</div><div style>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 3, 2013 at 7:21 PM, Nick Main <span dir="ltr">&lt;<a href="mailto:david.nick.main@gmail.com" target="_blank">david.nick.main@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am developing a DrRacket plugin that adds a diagrammatic view to the IDE (roughly the same place as the Module Browser).<div>
The diagram is a visualization of certain forms in the current text editor. Ultimately I would like to make the connection be bi-directional - manipulating the diagram will change values in the text editor.</div>

<div><br></div><div>The initial use-case is a state-machine visualizer (and later, editor).</div><div><br></div><div>My current approach uses a macro to define the state-machine. I would like to drive the generation of the diagram from the uses of the macro (during background expansion), rather than writing my own code to detect text changes and parse the contents of the editor.</div>


<div><br></div><div>I am trying to find an easy way to communicate from the macro execution to the DrRacket plugin, but nothing has surfaced so far.</div><div>If all else fails I could open up a socket connection in the macro and talk to the plugin that way (I assume).</div>


<div>Are there any cheaper ways to poke a hole through the macro sandbox ?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>--Nick</div></font></span></div>
<br>____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>