Menu

Problem with auto language in windows explore

Erich S.
2009-08-07
2012-11-14
  • Erich S.

    Erich S. - 2009-08-07

    Hello all,

    I've got one problem with autoselection of a language (syntax hilight), e.g. a file with name xyz.java.
    When opening in notepad++ (via file -> open) it regognized it as Java-Code and the syntax higlightening works fine. But when double-clicking in windows explorer on xyz.java notepad++ starts - but shows the file as normal text. Does anyone knows why and what to do to change this behaviour?

    Or is it a bug??

    Greetings
    Erich

     
    • cchris

      cchris - 2009-08-07

      I just made an experiment, and it could relate with your issue.

      I am under XP Pro SP3 with a non admin account. I associated .cxx with Notepad++. No error message. But on double clicking the .cxx I got it opened in Notepad, not notepad++.

      This came as no surprise. Access to the registry is retricted, and file associations set by users, depending on the way they are done, work or don't.

      If, under a non admin Vista account, association of your file with NP++ was not complete, it is not very surprising that it opens as what Notepad++ is supposed to support by default. That would be normal text. I'm sure that if you set the type for new file to C, your java file will be opened as C. Just a conjecture.

      CChris

       
    • cchris

      cchris - 2009-08-07

      This problem has been reported on the forum already.
      Try renaping the plugins directory, and see if that helps.
      If it doesn't, then file a bug report, unless someone already did.
      If it does, rename back the folder, then, one at a time, rename each .dll as .dl and try again. That way, if a plugin is responsible, it will be identified soon and author will be notified.

      CChris

       
      • Erich S.

        Erich S. - 2009-08-07

        Hello Chris,

        as you suggested I renamed the plugins directory without any effect.
        But I noticed another effect: When re-starting notepad++ it re-opens the files from my last session: The *.java files, I explicitly told to handle as java code were shown with syntax highlights, the one *.java I added by double-clicking was displayed as normal text furthermore.

        Ahh, I just inspected the session.xml and noticed that the attribut lang="Normal Text" is written to each file. I suppose this overwrites the definition in styles.xml...

        Erich

         
    • cchris

      cchris - 2009-08-07

      It does. Now the point is to figure how that attribute came in the session file....

      CChris

       
MongoDB Logo MongoDB