Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] RE: Syntax Templates

It's mostly for readability, since template patterns often have line feeds and tabs.
Attributes should be able to take whitespaces like line feeds and tabs, too, but some implementations of XML parsers choke on that.

Sent by: eclipse-dev-admin@xxxxxxxxxxx

10.02.2002 10:46
Please respond to eclipse-dev

        To:        eclipse-dev@xxxxxxxxxxx
        Subject:        [eclipse-dev] RE: Syntax Templates

                Hi All,

                I am interested in Syntax Templates. JDT uses a
default-templates.xml for storing patterns for each templates. The Pattern
value can be given as an attribute for each  Template. But it is given as a
#Text node under each template. Any particular reason why this is used???

                Eg; In JDT
                <template description="iterate over array" name="for" context="java"
                >for (int ${index} = 0; ${index} &lt; ${array}.length; ${index}++) {

                Which can also be given as
                <template description="iterate over array" name="for" context="java"
                pattern="for (int ${index} = 0; ${index} &lt; ${array}.length;
${index}++) {
                                 ${cursor}}" > </template>

This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
eclipse-dev mailing list

Back to the top