Menu

CCompletion 1.08

2008-07-14
2012-11-14
  • CCompletion

    CCompletion - 2008-07-14

    Hi, everyone!

    Here's the latest version of CCompletion, an autocompletion plugin designed for the C programming language. It also works nicely for some other languages, due to CTags power. However, CCompletion is aimed at C, so don't expect too much...

    Changes in 1.08:
    1. fixed some bugs
    2. redesigned history function - now you have separated buffers for both views and can navigate them freely
    3. improved snippets
    4. made shortcuts useless unless you redefine them ;)

    Link is the same:
    http://freeweb.siol.net/rmihor/NppCCompletionPlugin.zip

    Regards,
    Bostjan

     
    • Mishail

      Mishail - 2008-07-31

      Thanks a lot for great plugin.
      I've faced one issue though. When I'm using F12 and the definition of the identifier under cursor is stored in the different file (not that I'm editing), and that different file is not opened in N++, then i get "History function failure" dialog.

      Steps to reproduce.
      1. 1 source file is opened in N++
      2. Select identifier defined in other file (which is not yet opened) and press f12
      3. New N++ tab appears with that file and then "History function failure" dialog immediately.
      4. Press OK in error dialog => the tab with 1st document gets focus (no identifier selected in 2nd tab).
      5. Press F12 again (the other file is opened in 2nd tab now) => identifier's definition is opened in secondary view in 1st tab.

      I have the similar setup of N++ on different PC and there is no such issue. What can be it related to?

      Thanks in advance. Great work.

       
      • CCompletion

        CCompletion - 2008-08-01

        Hi,

        it seems CCompletion started having a problem at some point (new N++ version) while trying to open the second view. I haven't noticed it since I never close the second view. For the time being, you can try opening the second view manually and CCompletion should work from that point on.

        Could you please specify the N++ version on the machine where the problem occurs and on the machine where it works fine? Most likely some internal N++ changes cause the difference.

        Regards,
        Bostjan

         
        • Mishail

          Mishail - 2008-08-04

          Well,now I have this problem on both setups. One is N++5.02 and 2nd is N++ 5.03.

           
    • Mishail

      Mishail - 2008-08-07

      OK. another issue for me. (N++ 5.03, CCompletion 1.08)

      Preconditions
      1. Have a pretty big project (in my case it's sources for Miranda IM)
      2. This project should be added in NppCCompletionPlugin.ini
      3. ctags file for the project already generated (it's about 6Mb in my case)

      Steps to reproduce
      1. Open the source file from the project. Notice the memory consumption by N++ in any process manager (it was about 10M for me)
      2. Start code surfing by F12 ("History function failure" can be observed at 1st attempt) (memory is increased to 60M)
      2. Continue surfing by F12. At the moment when about 5 tabs are opened in 2nd view the memory consumtion is about 100M and N++ become very slow.

      BTW, I also tried on our internal project (C/C++ code, about 500M of sources, ctags.tmp - 60MB). N++ consumed about 1G of memory within few F12-attempts

       
      • CCompletion

        CCompletion - 2008-08-11

        Hi,

        I'll take a look at the issues (sooner or later). Note a few things, though:

        1. CCompletion stores file path for each tag, along with some other strings and data. Meaning, the struct is as I remember > 300 B, 400 more likely. One million tags would probably cost about 400 MB of memory. The current implementation was build with simplicity in mind, but I guess it's time to start optimizing. I'll think about more memory friendly solutions, like a separated string depository. Performance might decrease, though.

        2. If N++ is also slow while you aren't using CCompletion (having the dialog open or in the moment when you trigger some function), then CCompletion has nothing to do with the slowness since it's not doing anything.

        Regards,
        Bostjan

         
        • Mishail

          Mishail - 2008-08-11

          Thnx a lot for the plugin, anyway