User forums > Using Code::Blocks
Can code completion be made contextual?
MortenMacFly:
--- Quote from: oBFusCATed on July 07, 2012, 02:45:09 pm ---I've set it to 200 in the UI, but this value is ignored, as "/max/matches" is only read, never set.
The config value set in the UI is "/max_matches" as far as I can see.
--- End quote ---
If that is true, then this is really a bug. :P
--- Quote from: oBFusCATed on July 07, 2012, 02:45:09 pm ---But again in my opinion this is broken, because the max_matches config variable should limit only the results shown in the listctrl, not the searching phaze.
--- End quote ---
Well the point here is: How do you limit? The first, the last...?! Without an information provided to the user we will get a lot forum noise like "my function is not displayed" just because we silently strip the results. Here, instead, we show a warning so the user knows "There were many results, but we didn't know what to show.". I personally like this more... and that's why it is that way.
Of course if you prove me wrong or find a more clever solution - I am open for it.
oBFusCATed:
--- Quote from: MortenMacFly on July 07, 2012, 03:30:33 pm ---Of course if you prove me wrong or find a more clever solution - I am open for it.
--- End quote ---
We can always add an item at the end - "number of matches reached the limit, please increase it to see all matches" or something like this.
MortenMacFly:
--- Quote from: oBFusCATed on July 07, 2012, 03:55:20 pm ---
--- Quote from: MortenMacFly on July 07, 2012, 03:30:33 pm ---Of course if you prove me wrong or find a more clever solution - I am open for it.
--- End quote ---
We can always add an item at the end - "number of matches reached the limit, please increase it to see all matches" or something like this.
--- End quote ---
You mean "at the end of 16000 items"? ::) Then you can also print it to the hidden debug log or the NullLogger... ;D
oBFusCATed:
No, at the 201-st item...
carra:
--- Quote from: ollydbg on July 07, 2012, 01:28:56 am ---I just review the code, and see that:
--- Code: ---int CodeCompletion::CodeComplete()
--- End code ---
adding all the tokens to show, and sort the show items.
If a Token is a local variable(automatic variable), it will have Token->m_IsTemp==true.
So, maybe, we can firstly scan those tokens, and put them in the beginning of the codecompletion list.
I'm currently working on other part of CC, so it is great if you can help us. :)
Add to:
005252
--- End quote ---
I've read that request description and the approach of presenting the last definitions first could also work. If I am thinking it correctly, the current function's variables are always going to be taken as the last in that context. And it would also be a pretty simple way of making big libraries (such as Windows, OpenGL, etc...) have low priority because they are commonly taken as a base to build custom code over them (and therefore are included BEFORE user definitions).
EDIT: Another possible approach could be to place first definitions parsed the active editor's file. This alternative could possibly be easier to implement (though, not as good).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version