May 07 2002

[extension idea] I love the new Code Hints feature

Published by at 10:09 under Wayback Archive

[extension idea] I love the new Code Hints feature of Dreamweaver MX. It feels like having a daddy watching over your shoulder and telling you what’s next to type. But, as always with these ‘clever’ systems, there seem to be some shortcomings. At the end the Code Hints engine simply searches some predefined patterns again and again. Take editing of XML documents for example; It would be unfair to expect that Dreamweaver MX knows what types of tags and attributes you use in those files, simply because they can have any name you like. Wouldn’t it?

Wrong! The Dreamweaver engineers did a great job in this aspect. They made Dreamweaver MX scan each XML document when you open it, and then the appropriate Code Hints are temporary being added to the engine on the fly! This means that all the existing tags and attributes you had already used in your XML document can now be hinted for by Dreamweaver MX. It’s oh so powerfull! Of course it’s still not perfect, but it’s a beginning. For example… when you create a new document (Let’s say an MXI-XML file to package extensions with) Dreamweaver MX does not give you any Code hints at all (because there were non of them in the page when opened).

Now let’s think about this: Code Hints can be temporary added on the fly, what does that mean? Me thinks that it means power to the extension developers! One of the things that I can imagine is an extension that allows you to apply Code Hints for a new XML document following predefined XML structures. If this is possible then Dreamweaver can even give you Code Hints for an empty XML document, as long as you have told Dreamweaver what type of XML document you are going to edit.

I see it like this: You keep predefined XML documents somewhere in your configuration folder (these documents contain all the allowed tags and attributes for that XML scheme). Dreamweaver lists these scheme names in for example a Code Hints sub menu of the Commands Menu and you simply have to choose one of them for the XML document you are currently working on. Then, when choosing one of them, Dreamweaver reads the predefined XML document and uses it to define the Code Hints pattern for your current document. That would be cool, wouldn’t it!

At the end I think that there’s a lot in Dreamweaver that can be explorerd by extension developers. The example above is just one of them. I could add lots of ideas to the one above (for example right-mouse-clicking on a new tag to have Dreamweaver add it as default tag to the predefined XML document, etc etc). I think it’s all possible, but there need to be more people to make it come true. So come on folks… join the extension developers club!

No responses yet

Comments are closed.