Community
    • Login

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

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

        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