Community
    • Login

    AutoComplete Problem

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 2.0k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • GhotiheadG Offline
      Ghotihead
      last edited by

      I need the help of someone here. I am trying to put together an autocomplete for XQuery with function descriptions and parameters defined. To start with, I just went with something simple and tried to define for fn:contains(). Here’s what I have in my XQuery.xml file:

      <?xml version=“1.0” encoding=“Windows-1252” ?>
      <NotepadPlus>
      <AutoComplete language=“XQuery”>
      <Environment ignoreCase=“no” startFunc=“(” stopFunc=“)” paramSeparator=“,” terminal=“” />
      <KeyWord name=“fn:contains” func=“yes”>
      <Overload retVal=“boolean” descr=“Returns true if the first parameter contains the string from the second parameter, otherwise returns false.”>
      <Param name=“xs:string $parameter1” />
      <Param name=“xs:string $parameter2” />
      <Param name=“[xs:string $collation]” />
      </Overload>
      </KeyWord>
      </AutoComplete>
      </NotepadPlus>

      I also have a UDL that I imported that includes this for the highlighting.

      If I enter “fn:contains”, as I’m typing it, the suggestion comes up okay, but when I type the open paren, I don’t get the information for the function. However, if I change the above to be just “contains”, then repeat the steps by typing “contains(”, it works like it should, which is nice, but that would preclude having a different function with a different namespace, like “xyz:contains”, as both would put up the same parameters and return value information.

      Am I doing something wrong, or perhaps is the “fn:” causing problems with the auto-complete in recognizing it as a function name?

      Thanks for any help you can provide!

      1 Reply Last reply Reply Quote 0
      • Jim DaileyJ Offline
        Jim Dailey
        last edited by

        @Ghotihead
        I don’t think you are doing anything wrong. I think the “:” is the problem. I don’t think it affects auto-complete, but I do think it affects the function help tool tip.

        I have a lot of keywords that contain some special characters (e.g. gBS->AllocatePool), but I have to use only the function name (e.g. AllocatePool) and overload it with multiple definitions when there are more than one function of that name.

        So, I think you might have to define all your namespace:functions as keywords, and then overload the functions with multiple definitions (and maybe some text that identifies the namespace of each?).

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors