You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement: notepad-plus-plus/nppPluginList#416
While PluginAdmin loading nppPluginList.dll, it will check an attribute "npp-compatible-versions" (optional),
in order to determinate if plugin is compatible to the current version of Notepad++. If plugin is not compatible,
then this plugin will be ignored, therefore it won't be shown on the PluginAdmin's plugin list.
Note that it's only about pluginsAdmin's plugin list:
it prevent from Notepad++ install/update a plugin non-compatible to current version of Notepad++,
but it still allows Notepad++ load this plugin in question, if it's already installed.
Here is the attribite "npp-compatible-versions" looks like in plugin list json file:
```
{
"name": "npp-pluginList",
"version": "1.4.7",
"arch": "32",
"npp-plugins": [
{
"folder-name": "demoPluginA",
"display-name": "Demo Plugin A",
"version": "1.8.7",
"npp-compatible-versions": "[4.2,6.6.6]",
"id": "9c566a9083ef66a0ce93a3ce5f55977faea559b5b0993e37a1461b87f4aeb6f0",
...
},
{
"folder-name": "demoPluginB",
"display-name": "Demo Plugin B",
"version": "1.1.8.7",
"id": "8a6b9dadbf2ec37d5c60a12a5445f0eec2ef00e6eaa80452925789fd73950193",
...
},
...
}
}
```
It's optional. In the case of its absence, it's considered compatible to all versions of Notepad++.
The format of value for "npp-compatible-versions" is following (no white space is allowed):
"6.9" : exact version 6.9
"[4.2,6.6.6]" : from version 4.2 to 6.6.6 inclusive
"[8.3,]" : any version from 8.3 to the latest one
"[,8.2.1]" : 8.2.1 and any previous version
Fix#11338, close#11334
{TEXT("Anonymous #181"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("I met a magical Genie. He gave me one wish.\nI said: \"I wish I could be you.\"\nThe Genue saud: \"Weurd wush but U wull grant ut.\"\n") },
{TEXT("Anonymous #183"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("Dear Optimist, Pessimist and Realist,\n\nWhile you guys were busy arguing about\nthe glass of water, I drank it!\n\n\n Sincerely,\n The Opportunist\n") },
7217
+
{TEXT("Anonymous #184"), QuoteParams::slow, false, SC_CP_UTF8, L_TEXT, TEXT("Dance like nobody's watching.\nEncrypt like everyone is.\n") },
7218
+
{TEXT("Anonymous #185"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("Me: \"I'm 45 years old but I've got a 19 year-old young man's body\"\nHer: \"Show me\"\nI opened the freezer to show her the body.\nShe screamed.\nMe too.\n") },
7219
+
{TEXT("Anonymous #186"), QuoteParams::slow, false, SC_CP_UTF8, L_TEXT, TEXT("Everyone complains about the weather,\nbut no one wants to sacrifice a virgin to change it.\n") },
7220
+
{TEXT("Anonymous #187"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("If you are alone at home and feel lonely:\nTurn off the lights, turn on the TV and watch a horror movie.\nThen you will have feeling that there are someone hidden in the kitchen, in the toilet\nand even under your bed.\n") },
7217
7221
{TEXT("xkcd"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("Never have I felt so close to another soul\nAnd yet so helplessly alone\nAs when I Google an error\nAnd there's one result\nA thread by someone with the same problem\nAnd no answer\nLast posted to in 2003\n\n\"Who were you, DenverCoder9?\"\n\"What did you see?!\"\n\n(ref: https://xkcd.com/979/)") },
{TEXT("Elon Musk"), QuoteParams::rapid, false, SC_CP_UTF8, L_TEXT, TEXT("Don't set your password as your child's name.\nName your child after your password.") },
throwgeneric_string(TEXT("The string to parse is not a valid version format. Let's make it default value in catch block."));
44
+
throwwstring(TEXT("Version parts are more than 4. The string to parse is not a valid version format. Let's make it default value in catch block."));
45
45
46
46
int i = 0;
47
47
vector<unsignedlong*> v = {&_major, &_minor, &_patch, &_build};
48
48
for (constauto& s : ss)
49
49
{
50
50
if (!isNumber(s))
51
51
{
52
-
throwgeneric_string(TEXT("The string to parse is not a valid version format. Let's make it default value in catch block."));
52
+
throwwstring(TEXT("One of version character is not number. The string to parse is not a valid version format. Let's make it default value in catch block."));
53
53
}
54
54
*(v[i]) = std::stoi(s);
55
55
56
56
++i;
57
57
}
58
58
}
59
+
#ifdef DEBUG
60
+
catch (const wstring& s)
61
+
{
62
+
_major = 0;
63
+
_minor = 0;
64
+
_patch = 0;
65
+
_build = 0;
66
+
67
+
throw s;
68
+
}
69
+
#endif
59
70
catch (...)
60
71
{
61
72
_major = 0;
62
73
_minor = 0;
63
74
_patch = 0;
64
75
_build = 0;
76
+
#ifdef DEBUG
77
+
throwwstring(TEXT("Unknown exception from \"Version::Version(const generic_string& versionStr)\""));
0 commit comments