Re: outlining code editors (was: TechNote 2106)
Re: outlining code editors (was: TechNote 2106)
- Subject: Re: outlining code editors (was: TechNote 2106)
- From: Graff <email@hidden>
- Date: Tue, 09 Mar 2004 19:41:09 -0500
On Mar 9, 2004, at 6:53 PM, steve harley wrote:
on 9 Mar 2004, at 7:53 AM, John Adam Bloom wrote:
I think most of your desires can be attained with a little effort by
scripting OmniOutliner in conjunction with Script Editor.
not my desires, maybe someone else's ...
Pasting a short (compiled) script into OmniOutliner (shows up
colored, indented, etc.)
indented, but it doesn't suck the text into a proper outline..
additional scripts would be needed to recompose the outline
structure.. plus Script Editor doesn't seem to allow access to styled
text, so you'd have to resort to clunky GUI Scripting, copy & paste
Actually you can access styled text in Script Editor. I used that to
build a script which would take all of the formatting out of a Script
Editor document and build a fully CSS-enabled HTML page that exactly
mimics the look of a compiled script in Script Editor, including any
coloring options that you customized in the Script Editor prefs.
You access the style information in this manner:
-----------
tell application "Script Editor"
set theTextRef to a reference to first attribute run of text of front
document
set thisColor to color of theTextRef
set thisFont to font of theTextRef
set thisSize to size of theTextRef
set theText to theTextRef as text
end tell
-----------
... debug integration, subtree commenting, indent level inference,
etc.
finally, proper support for the "end" statements of AppleScript
require a unique twist in oultining -- either the outliner would hide
end statements, or it would need special knowledge to be able to
properly fold code blocks.. OmniOutliner does neither
I found a decent workaround to this problem, you need indent end
statements so that they get folded into the start statement they are
paired with when it is imported into OmniOutliner. It works pretty
well actually, you just need to do it outside of Script Editor because
it will just remove the extra indentation when it checks the script.
-Ken
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.