syntax highlighting ant/antcontrib with marker characters

syntax highlighting ant/antcontrib with marker characters

4
NewbieNewbie
4

    Jul 31, 2007#1

    Hi,

    I am trying to highlight the property references in an ant script which refers to ant and antcontrib as ant extension.

    I want to highlight all between

    $ and } --> example: ${build.dir}
    @ and } --> example: @{build.dirs}

    I wanted to do this with the following entries in the wordfile:
    ...
    /Marker Characters = "$}@}"
    ...
    /C7"MarkerCharacters1"
    $}
    @}


    The problem is that only the first entry is syntax hightlighted. The second one is displayed as normal text?

    Then I tried to add a second "Marker Character Group":
    ...
    /C7"MarkerCharacters1"
    $}
    ...
    /C8"MarkerCharacters2"
    @}


    Same problem... :(

    Please can you help me to highlight both of them.

    greetings
    andreas

    6,675585
    Grand MasterGrand Master
    6,675585

      Re: syntax highlighting ant/antcontrib with marker character

      Jul 31, 2007#2

      @ must be specified also in the list of /Delimiters =. I guess, $ and } are already specified as delimiters.

      Hopefully you don't have any keyword which contains a @ because the will propably not be highlighted anymore after adding @ to the delimiters - see the ultimate test for invalid words macro for details.
      Best regards from an UC/UE/UES for Windows user from Austria

      4
      NewbieNewbie
      4

        Re: syntax highlighting ant/antcontrib with marker character

        Aug 01, 2007#3

        Hi Mofi,

        @ is already defined in my delimiters
        --> /Delimiters = ~@$^&*()+=|\{};"'<> ,

        But the syntax highlighting doesn't work...
        There aren't any keywords which contains a @.

        Perhaps it helps when I post you somes snippets from my highlighting:

        /L6"XML" XML_LANG Noquote Block Comment On = <!-- Block Comment Off = --> File Extensions = XML XUL XSD XSL XSLT JELLY BPEL WSDL
        /Delimiters = ~@$^&*()+=|\{};"'<> ,
        /Regexp Type = Perl
        /Function String = "(target name=.*)\>"
        /Open Brace Strings = "{" "(" "[" "<"
        /Close Brace Strings = "}" ")" "]" ">"
        /Marker Characters = "$}@}"
        :
        /C7"MarkerCharacters1"
        $} @}


        with the result $} are highlighted but @} not.

        When I switch the position of the two marker characters, then @} will be highlighted and $} not.

        6,675585
        Grand MasterGrand Master
        6,675585

          Re: syntax highlighting ant/antcontrib with marker character

          Aug 01, 2007#4

          $} and @} must be on different lines as you have posted it in your first post. The 2 marker strings start with a different character. So they must be on different lines.
          Best regards from an UC/UE/UES for Windows user from Austria

          4
          NewbieNewbie
          4

            Re: syntax highlighting ant/antcontrib with marker character

            Aug 01, 2007#5

            You mean:

            /Marker Characters = "$}@}"
              :
            /C7"MarkerCharacters1"
            $}
            /C8"MarkerCharacters2"
            @}

            That doesn't work... only the $} will be highlighted. It seems that only the first marker character pair will be highlighted. If I switched them from "$}@}" to "@}$}", then @} will be highlighted.

            Also

            /C7"MarkerCharacters1"
            $}
            @}

            doesn't work. Is there a problem with the equal ending characters } in both marker character pairs?

            6,675585
            Grand MasterGrand Master
            6,675585

              Re: syntax highlighting ant/antcontrib with marker character

              Aug 01, 2007#6

              I tested it again with UltraEdit v13.10a+1 on WinXP SP2 x86 although it already worked yesterday on a quick test as it should. Now I have used exactly your language definition with

              /C7"MarkerCharacters1"
              $}
              /C8"MarkerCharacters2"
              @}

              and also with

              /C7"MarkerCharacters1"
              $}
              @}

              Both worked on the test file with the two examples you have posted saved into a file with extension XML.

              Then I thought, that XML files are often encoded in UTF-8 and not in ASCII/ANSI. So I converted my Test.xml from ASCII to UTF-8 (Unicode) and suddenly I get the same effect as you. Only the first defined marker character pair works. Converting it back to ASCII and both marker character pairs work again.

              This is definitely a bug of UltraEdit. Please report it to IDM support per email - see address at top of this page. Attach your syntax highlighting wordfile and an example XML file which is encoded in UTF-8.

              Update: The issue with second marker character not working on a highlighted UTF-8 file was fixed with UE v15.00.0.1033.

              4
              NewbieNewbie
              4

                Re: syntax highlighting ant/antcontrib with marker character

                Aug 01, 2007#7

                Hi mofi,

                Thanks a lot for your help in this case!!!
                I will post it to IDM.

                Greetings from Darmstadt :D