Re: [Screem-devel] HTML tag auto-completion
Status: Inactive
Brought to you by:
davek
From: David K. <da...@ri...> - 2009-11-24 18:08:37
|
On 17 Nov 2009, at 06:04, Jim Hayward wrote: > On Sun, 2009-11-15 at 17:52 +0000, David Knight wrote: >> >> 2) The dtd in use by the document. > > Is this list created from screem_ctags_model_autocomplete()? Or what is > the ctags model? It appears the if "cmodel" exists then the tag tree > list and the cmodel list are combined. What determines whether the ctags > model is created? Ah, this is a third type of autocomplete I had forgotten about. It makes use of http://ctags.sourceforge.net/ and so provides auto complete for function names when dealing with C, C++, PHP etc. Not sure how much html support it has, I think just for name anchors. The ctags model is created if there is a tag file in the site root, which can be set up to be automatically created in the site esttings. The dtd autocompletion comes from html_key_press in screem-editor.c depending on the keypressed. the screem_dtd_* methods in there lookup the appropriate completions. screem_dtd_get_elements and screem_dtd_get_attributes being the main ones. The dtd in use is determined by an idle handler down in screem-page.c / screem-page-model.c (doesn't require the tree structure to be built) > Is there anything that determines whether the tag tree or the DTD has > priority over the other for auto completion? DTD has priority, but only applies in certain circumstances. In screem_editor_keypress (screem-editor.c) html_key_press returns a flag indicating if the key press was handled. If it wasn't then the tag tree / ctag auto completion is then checked. David |