Text is very powerful and at the same time fragile. One single typo and XML/Code breaks. What I find fascinating is that during editing, text resides in an invalid state a majority of the time.
When we edit code or XML, we must break its logic to enhance it. With each keystroke, an application is either valid or invalid from a compilation or validation standpoint. My question is why do we have to work at this low level? Why can't we work at a higher level with objects and generate perfectly valid output and minimize/eliminate time in an invalid state.
Now you’re saying to yourself, "Ted, we have tools that do this". I honestly believe we don't. If you include the best editors on the planet and the most expensive case tools, in every instance I can find, code is in an invalid state at least 80% the time during development. We have tools that automate and guide text editing, they paste blocks in context, they insert blocks of code, they script the cursor, and sometimes they even pre-compile blocks to test validity inline. In all these cases, a majority of the time text is in an invalid state.
So what would a managed editor look like and how would it work? The goal would be to output a perfectly valid file system of files for compilation. Each project would be fully managed and valid for the target output. The goal would be to shorten the time in an invalid state by adding and removing code elements at the object level. Code output would always be valid so long as your were editing via the object hierarchy.
Take Flex MXML for example:
The user would create a project, add controls, set properties, add methods, save, and output for compilation. During editing each MXML tag would have an editing class based on the MXML schema. Also each ActionScript code block would have an editing class. In moving MXML blocks around, the editor would understand the tag hierarchy and prevent the insertion of certain blocks within non-compatible blocks, the same would be true for editing ActionScript. Ideally the user could grab a method or property and drag it from class to class. Since all code would be generated, you could paint with a much larger canvas and eliminate many low level errors in code development. Ideally you could also unit test code blocks inline. Simply click on a function or class and add a series of unit test cases for validation and press “Unit Test”.
To make this happen, each text format would need a schema, even code. The schema would need to contain code block dependencies and be able to denote child dependencies in a hierarchy. The editor would use this hierarchy to generate editing objects and manage them in context. Ideally if you added a schema for a particular language to the editor, it would provide a rock solid default editing format. It would allow code to be imported into a project and parse the text into a valid object state. Each language could also be extended to support custom dialogs and editors at the tag of code level. Assuming you select a code block, you could see properties in context.
In one sense, we have come a long way in software development, but in another, we are still crawling along by working with code by majority in an invalid state as we enhance it. It is about time we had a higher level editor to do allot of the grunt work and validation.
Cheers,
Ted ;)
DIGG IT! 
That is a very wicked insight Ted. This is one of those things in life that just doesnt make sense. Like youre stuck in a dream of a paradoxical world where common sense has been reversed. A coding alice in wonderland hell, and we're all looking for the rabbit hole. That product IS the successor to our current range of choices.
You should really check out Subtext and read the OOPSLA paper about it. The author covers much of this ground, and comes up with many interesting insights, not to mention a whole new programming style/editor.