Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Code completion with partial matching

<< < (3/9) > >>

dmoore:

--- Quote from: Alpha on January 19, 2014, 02:46:52 am ---
--- Code: (see attached) ---++hack;
--- End code ---

--- End quote ---

a very nice hack indeed. Works beautifully.


--- Quote from: Alpha on January 19, 2014, 05:12:36 am ---
--- Quote from: dmoore on January 18, 2014, 08:12:31 pm ---
--- Quote from: Alpha on January 18, 2014, 07:46:51 pm ---
--- Quote from: dmoore on January 18, 2014, 05:05:52 pm ---PS: Seems to be small bug with placement of doc string window. Sometimes it places on left when there clearly isn't room for the whole window.

--- End quote ---
Well, that was supposed to be a feature.  Does it act unexpectedly?

--- End quote ---
It gets cut off when being displayed on the left side. Maybe the same would have happened on the right side too, but I didn't think so (if that's the case, then maybe the window just needs to be resized). I was using a 1080p display on a dual monitor setup. The 1080p monitor is on the left, the other monitor is something less than 1080p.

--- End quote ---
Confirmed.  (And also confirmed that it is the fault of this hack interacting with another component of CCManager.)

--- End quote ---

hopefully a simple fix.

One more issue: in python cc, I think I need to be able to do async docstring calls. otherwise the gui can freeze for quite a while.

Alpha:

--- Quote from: dmoore on January 19, 2014, 07:13:08 am ---a very nice hack indeed. Works beautifully.

--- End quote ---
Until you try to complete wxString.  With my clang plugin, it does not even show up until I have typed the full name, and even then, it is the fifth item. ???




--- Quote from: dmoore on January 19, 2014, 07:13:08 am ---One more issue: in python cc, I think I need to be able to do async docstring calls. otherwise the gui can freeze for quite a while.

--- End quote ---
I have been attempting to work on that for a while (with cbThreadPool), however, I apparently do not understand threading nearly as well as I had thought; each of my tries immediately crashed while updating the GUI from a cbEVT_THREADTASK_ALLDONE handler.  Looks like more reading for me.

dmoore:
Nice catch re wxString, just need to sort alphabetically for equal priority items?

Re threads, need to be careful about passing data that is constructed in the worker thread being deleted before it gets handled on the main thread. There are some posts about certain events being unsafe by (i think) ollydbg.

Alpha:

--- Quote from: dmoore on January 19, 2014, 10:20:01 pm ---Nice catch re wxString, just need to sort alphabetically for equal priority items?

--- End quote ---
The problem is, CalcValue() (which is tries to nearly replicate/quantify the algorithm YCM designed) gives wxString a worse value because its word boundary string is only "ws" (whereas wxSTRING_REVERSE_ITERATOR for example is "wsri", more closely matching the input).  (Items with equal priority *should* already be in alphabetical order, assuming my implementation works the way I think it does.)
Unfortunately, re-balancing the weighting algorithm would probably cause it to lose the benefit it gives in most other cases.  (I am tempted to hardcode a small score boost for wxString, because it is rather common in wxWidgets based code... but that could get even uglier if other similar problem tokens show up.)


--- Quote from: dmoore on January 19, 2014, 10:20:01 pm ---Re threads, need to be careful about passing data that is constructed in the worker thread being deleted before it gets handled on the main thread. There are some posts about certain events being unsafe by (i think) ollydbg.

--- End quote ---
Thanks, I will look for those.

oBFusCATed:

--- Quote from: Alpha on January 20, 2014, 06:43:43 am ---Unfortunately, re-balancing the weighting algorithm would probably cause it to lose the benefit it gives in most other cases.  (I am tempted to hardcode a small score boost for wxString, because it is rather common in wxWidgets based code... but that could get even uglier if other similar problem tokens show up.)

--- End quote ---
No hardcoding, please, it is ugly and unprofessional:)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version