Frantisek Kossuth
Frantisek Kossuth

Reputation: 3524

Task Tags in XSP sources

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?

Upvotes: 3

Views: 286

Answers (1)

Darin Egan
Darin Egan

Reputation: 111

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.

Sample XSP code in the XPages Source View illustrating the use of Task Tags Task Tags from sample XSP code appearing in the Tasks View in Domino Designer

Upvotes: 3

Related Questions