How to enable a new FunctionList?

  • Hello there.

    I am Newbie in Notepad++.
    I am writing IBM DXL code. The language is very similar to the C.
    Therefore I copy the /functionList/c.xml to /functionList/dxl.xml.

    Then I substitute the string “C” with “DXL” as follows :

    <!-- =========================================================== [ DXL ] -->
    id =“dxl_function”

    When I open a abc.dxl file, the function cannot be displayed in the function window.
    But when I rename the file to abc.c, the function can be displayed.

    Can someone help me to fix the problem?

    Thank you.

    Best regards,

  • @chamisso-chen ,

    Since DXL is not a builtin language, you will need a couple more steps:

    1. I am going to assume that the snippet you gave from the dxl.xml was not meant to be complete, because the <parser... tag didn’t show its closing >, let alone its contents or </parser>
    2. in the .../functionList/overrideMap.xml, in the User Defined Languages section, add a line like:
    			<association id= "dxl.xml"				userDefinedLangName="DXL"/>
    1. Create a User Defined Language (UDL) for DXL.


    Alternately, if DXL is close enough to C (ie, C with a few extra keywords) that you don’t need to customize anything about its function list capability, then you can skip creating the functionList\dxl.xml file, and just go into Settings > Style Configurator, select C, add dxl to the User ext. box (no dot in the box), and if there are extra keywords, put them in the user defined keywords section of INSTRUCTION WORD and/or TYPE WORD, as appropritate; then Notepad++ will treat .dxl files just like c source code for everything (syntax highlighting and function list included).

  • @PeterJones

    Thank you very much for the quick response.

    Yes, it does work after adding the line in the overrideMap.xml.

    Before I tried to add this line : <association id= “dxl.xml” langID= “85”/>, which didn’t help.

    By the way, the functionList for C seems to have bugs, see below.

    question.png image url)

    Not only the function definition will be shown, but also the invoking position is shown as well.

    I try to study the REGEXP grammar and get lost. :-)

    Do you have any idea to improve the template?

  • @chamisso-chen said in How to enable a new FunctionList?:

    Not only the function definition will be shown, but also the invoking position is shown as well.

    IIRC, that is a known issue with no current resolution.

Log in to reply