Community
    • Login

    How can i get a specific deserialized code in npp++ to c#

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    2 Posts 2 Posters 506 Views
    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.
    • Yunus Emre KütükçüY
      Yunus Emre Kütükçü
      last edited by

      Hi , I’m writing a plugin with C#. The plugin deserializing data from a server(data is a script and it includes code , id , name etc.) and puts data to notepad++ file. I have to select this data’s code part from the file and serialize it again and patch it back to server, after editing the code . My problem is i dont know how to select the part i wanted ?
      GetScript1.PNG

      GetScriptCode.PNG

      e.g Plugin have to select function automatically after I edited the code

      PatchCodePart1.PNG

      PatchCodePart2.PNG

      This is the part that i have to write selecting and patching codes

      1 Reply Last reply Reply Quote 0
      • EkopalypseE
        Ekopalypse
        last edited by Ekopalypse

        @Yunus-Emre-Kütükçü
        I’m not sure I understand this correctly. Do you mean the entire content?
        If so, then SCI_GETTEXT is the way to go.
        If you want to have only the part that contains the changed lines, then you
        you have to work with markers.
        Find them, find the start and end position of that line and use SCI_GETRANGEPOINTER to retrieve the text.

        I don’t know if this is relevant in your case, but make sure you consider text encoding.

        1 Reply Last reply Reply Quote 3
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors