blu3mania / npp-papyrus

Notepad++ plugin to provide Papyrus scripting language support to Notepad++, such as syntax highlighting with automatic recognition of class names/functions/properties, keywords matching, and hyperlinks to referenced scripts. It also comes with a compiler that can provide compilation errors in a separate list window, as well as inline annotation and indication where errors are reported, plus support anonymization of compiled .pex files.
GNU General Public License v3.0
24 stars 7 forks source link

Make Papyrus Plugin compatible with next release of Notepad++ (with Lexilla) #24

Closed donho closed 2 years ago

donho commented 2 years ago

Tested with the new modification of Notepad++ with Scintilla5 in PR: https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11468

blu3mania commented 2 years ago

@donho Before I merge this PR I need to clarify with you about a few things.

  1. I checked the history of PluginsManager.cpp and saw that GetLexerStatusText was only removed 5 days ago, so it means that in current NPP release 8.3.3 this method is still expected from external lexers. Is this right?
  2. If the answer to above question is yes, it would mean the next release of Papyrus Plugin will not be compatible with old NPP releases up to 8.3.3. I assume that I will need to properly specify the compatibility range when I submit PR to nppPluginList? However, I am not sure how this can be done. Current config lists old-versions-compatibility for only one range:
        {
            "folder-name": "Papyrus",
            "display-name": "Papyrus Script Lexer",
            "version": "0.3.0.24",
            "npp-compatible-versions": "[8.3,]",
            "old-versions-compatibility": "[,0.2.3.23][,8.2.1]",
            "id": "1eef1096f4d239a525cd8c50cab5bfd3b49dd6b08cbeb230bebd63e51dc8d2a4",
            "repository": "https://github.com/blu3mania/npp-papyrus/releases/download/v0.3.0/PapyrusPlugin-v0.3.0-x64.zip",
            "description": "View and edit Papyrus Script files used by Bethesda games with syntax highlighting, function and block folding, hyperlinks to referenced scripts, keywords matching, plus compilation support with anonymized output and error list view.",
            "author": "blu3mania",
            "homepage": "https://github.com/blu3mania/npp-papyrus"
        },

    If I want to list the full compatibility I will need something like:

            "old-versions-compatibility": "[,0.2.3.23][,8.2.1][0.3.0.24][8.3,8.3.3]",

    But I suspect this syntax will not work.

Or, am I supposed to only list the last old release's compatibility, like this?

            "old-versions-compatibility": "[0.3.0.24][8.3,8.3.3]",
  1. [cont from 2] Also, to update npp-compatible-versions of the new version I need to know the next NPP release. I assume it would be either 8.4 or 9.0?
  2. After checking your change in https://github.com/notepad-plus-plus/notepad-plus-plus/pull/11468, it appears to me that GetLexerFactory is also not used anymore, but the code is only commented out. Is there a plan to utilize it in the future? Seems unlikely due to the introduction of CreateLexer . If so, I assume I can remove this method as well?
donho commented 2 years ago

@blu3mania

I checked the history of PluginsManager.cpp and saw that GetLexerStatusText was only removed 5 days ago, so it means that in current NPP release 8.3.3 this method is still expected from external lexers. Is this right?

You're right about it - in this case, it will be better to keep GetLexerStatusText - so next version of Papyrus plugin can work also with all the old version of Notepad++.

This PR is for drawing your attention, it's not necessary to merge it. So please add only CreateLexer in your next version. Thank you.

blu3mania commented 2 years ago

Thanks @donho . I committed the required changes in a7cdd59d1507113fc29732be483d7a10671eaf74.