Task Tags in XSP sources

时光怂恿深爱的人放手 提交于 2019-12-23 18:49:33

问题


In Java sources one can use (by default) //TODO, //FIXME and //XXX comments to add that part of source to Tasks view in Eclipse/Domino Designer.

I would like to use it in SSJS too, but I can't make it work. In Designer preferences General/Editors/Structured Text Editors/Task Tags, Filters tab, you can eneable "Enable searching for Task Tags" checkbox and tick XML type. Affected content types section contains "xsp" that is file extension of XP/CC sources.

But any tag in SSJS source (property of XML tag, actually) does not appear in Tasks view.

How to write such task tag into XP/CC source to make it work?


回答1:


In Domino Designer, searching for Task Tags can be enabled for most editors via the Preferences.
i.e. (General -> Editors -> Structured Text Editors -> Task Tags)

However, the reported behaviour occurs because the Task Tags are added to a CDATA section.

CDATA sections are basically the wild wild west of XML.

For reference, see http://www.w3.org/TR/REC-xml/#sec-cdata-sect specifically:

"Within a CDATA section, only the ]]> string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using < and &"

Therefore, for this reason, the contents of CDATA sections are generally ignored by Eclipse XML parsing and validating. So if <!-- TODO --> or //TODO (or any tag) is put into a CDATA section it is not picked up as such.

So as a consequence, any annotated Server-Side JavaScript in XSP source does not appear in the Tasks View.

Using this sample code as an example, the Tasks View displays as follows.



来源:https://stackoverflow.com/questions/13235349/task-tags-in-xsp-sources

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!