Menu

loading "application data / NPP /stylers.xml"

yozi
2007-11-02
2012-11-14
  • yozi

    yozi - 2007-11-02

    Hi. 

    WHAT I'VE CODED:
    I programmatically modified stylers.xml to highlight custom words while writing LUA code.  The modified file is posted on an internal network drive for others to retrieve. 
    I then wrote a plug in for Notepad++ to copy the modified stylers.xml from the network drive to "application data/notepad++".

    PROBLEM:
    Before my plug-in copies the new version of stylers.xml from the network, Notepad++ has already loaded the previous version.  Thus to see my syntax highlighting changes, I need to restart Notepad++. 

    QUESTION:
    Is there a function I can call or message I can send to Notepad++ to ask it to reload stylers.xml after my plug in has done its thing?

    EXTRA INFO ABOUT STYLERS.XML (For those that aren't too familiar with it)
    Notepad++ actually has two different versions of the file.  One is located in the directory where Notepad++ is installed, i.e. "..\Program Files\Notepad++\", and it contains highlighting information for all the default languages notepad++ supports.  The 2nd stylers.xml is located in "C:\Documents and Settings\user_name\Application Data\Notepad++\" .  Application data is a hidden folder by default so you'll have to modify what files you can view to see it. 

     
    • Nobody/Anonymous

      and what about this: you kill the notepad++ process and start it again silently?

       
    • yozi

      yozi - 2007-11-05

      I'll try that out.  In the meantime, I've added a file comparison and if the plugin copies a new version of stylers.xml, a message box is displayed, telling the user to restart Notepad++ to see the latest highlighting changes.