User-defined language keywords group limitation

imdjs
2013-05-11
2013-05-21
  • imdjs

    imdjs - 2013-05-11

    hi
    I am planing to add all the keywords of APIs form 3D software blender into the notepad++ user-defined language recently, but found that the group of keyword seemed to have a limit on the number of keywords to not more than about 1800, is there any way to solve this ?since the function keywords of blender is more than 8000, Although the editor can be pasted into 8000 key words in, but the next time you open notepad++, only about 1800 in the keywords group, Even editing language file.Xml is the same results, each time you open notopad++ in the keywords group showed only about 1800.

    imdjs

     
    Last edit: imdjs 2013-05-11
  • Loreia2

    Loreia2 - 2013-05-15

    Hi imdjs,

    MS Windows limits edit box size to roughly 32kB, I extended that limit to I believe 64 Kb in current revision (n.b. only for Keyword1-8 types). If that is not enough, just split your keywords into two (or more) groups, apply same styler and everything should be fine.

    BR,
    Loreia

     
  • imdjs

    imdjs - 2013-05-16

    Hi Loreia
    thank you for your reply,I think that is the only way to solve my problem

    imdjs

     
    Last edit: imdjs 2013-05-16
  • armyofda12monkeys

    Hey Loreia2,

    Which version has this 64kb fix (tried 6.3.3 and seems to still have that 31kb limit)?
    If windows doesn't allow it in their form control, how did you increase it to 64kb?

    Also would be cool if you can do all the basic setup/styling and then be done with the User Defined popup... and manually add the long keyword List via a text-editor. so since the popup never comes up again (hopefully, otherwise need to add the keywords manually again), it will accept as many chars as needed? is that possible (currently it just crashes Notepad++ if i try to do that)?

    I have a Drupal-Autocomplete for Notepad++ where i create most of the User Defined Language xml's via a script and would be nice if didn't need to put php or drupal keywords split into multiple sections for each one.

     
    Last edit: armyofda12monkeys 2013-05-17
  • Loreia2

    Loreia2 - 2013-05-17

    Hi armyofda12monkeys,

    if 6.3.3 does not have this included than I probably still did not publish this patch (I don't remember which was it, and I can't access git right now to verify). You can try to test with UDL2 beta version (you can find download link somewhere at the end of this thread: https://sourceforge.net/p/notepad-plus/discussion/331753/thread/01f8c28f)

    BR,
    Loreia

     
  • Loreia2

    Loreia2 - 2013-05-17

    Re-read and noticed few more questions

    ~~~~~~~~~~~~~~~~~~~~
    currently it just crashes Notepad++ if i try to do that
    ~~~~~~~~~~~~~~~~~~~~~

    Can you describe how to reproduce this?

    If windows doesn't allow it in their form control, 
    how did you increase it to 64kb?
    

    There is some API that allows it, 32KB is simply the default.

    Also would be cool if you can do all the basic setup/styling 
    and then be done with the User Defined popup... and manually 
    add the long keyword List via a text-editor
    

    You can do that, but you must use external editor, not Notepad++ !!

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    I have a Drupal-Autocomplete for Notepad++ where i
    create most of the User Defined Language xml's via a
    script and would be nice if didn't need to put php or
    drupal keywords split into multiple sections for each one.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    This kind of problems will be solved by new GUI that will come with next major revision. Until then update you script to generate 32kB blocks of keywords. I know it a pain, but that is the best I have for now.

    BR
    Loreia

     
  • armyofda12monkeys

    K thanks for your response Loreia2...

    I edited with another text editor to get passed the GUI limit but still had issues. I believe it crashed when i clicked a tab or opened the file whose extension is associated with that User Defined Language ... I can replicate later and post that UserDefinedLanguage.xml file and possibly link to a video

     
    Last edit: armyofda12monkeys 2013-05-17
  • armyofda12monkeys

    Here is a screenshot of me switching tabs to the .module file... then Notepad 6.3.3 crashes: http://screencast.com/t/Va0sUtIoqnuJ

    Here are my drupal.xml which is in C:\Program Files\Notepad++\plugins\APIs\ and UserDefineLang.xml which is in C:\Documents and Settings\me\Application Data\Notepad++\

    I edited UserDefineLang.xml in another editing app so it has the full > 31Kb string in Keyword List 1.
    I thought editing this in another Notepad-like app would work as you suggested (I swore i did this in an older version of Notepad++) but seems to crash it now. If you make Keyword List 1 shorter... then it doesn't seem to crash.

     
    Last edit: armyofda12monkeys 2013-05-18
  • armyofda12monkeys

    Any idea Loreia2 how to get the external editor to work? since its harder for people to create the xml with my script, I can just pre-create them for people in my external editor, then test in Notepad++ and distribute to others... But seems to crash Notepad++ now.

     
  • Loreia2

    Loreia2 - 2013-05-21

    Hi,

    there seems to be a bit of misunderstanding here. You cannot have more than 32KB of data per one edit box in current UDL GUI. Lets repeat for emphasis: You cannot put more than 32 KB of data into any UDL keyword type !!

    There is no way to cheat on this. If you want to use more than 32KB, you must recompile Notepad++. Having said that, I am pretty sure I compiled latest beta version with support for 64 (or 128) KB of data per edit box. (you can find download link somewhere at the end of this thread: https://sourceforge.net/p/notepad-plus/discussion/331753/thread/01f8c28f)

    When I mentioned editing with external editor, I meant to say that you could use UDL GUI for styling, and add keyword directly to XML file using external editor. I didn't want to say you could extend 32 KB limit by using external editor.

    Now, you are using keyword1-3, and have blank keyword4-8 type. Just split keyword1 into two shorter groups and everything should work fine.

    BR,
    Loreia

     
  • armyofda12monkeys

    okay gotcha, I'll wait for the next major revision and try that Beta version for now.