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

question on how to trigger evt(cbEVT_COMPLETE_CODE)

<< < (2/5) > >>

oBFusCATed:
I don't see this behaviour. For me the list of entries is not shrunk or trimmed at every character typed.
When I type a character I see that just the selection changes. And at one particular character the list is regenerated/reopened.

I'm surprised that you're describing different behaviour.

p.s. Our CC plugin will stay in the history just after I finish my editor experiments...

ollydbg:

--- Quote from: oBFusCATed on August 18, 2017, 09:05:47 am ---I don't see this behaviour. For me the list of entries is not shrunk or trimmed at every character typed.
When I type a character I see that just the selection changes. And at one particular character the list is regenerated/reopened.

I'm surprised that you're describing different behaviour.
--- End quote ---

You are right, the list never get shrunked when I enter "M", just the selection was changed.
My main question is about the "regenerated/reopened" behavior, which cause some extra CC, see my attachment gif file. (I have enabled the debuglog of the CC, so you see when I get the ".", we get 9 items, after I have entered 6 chars, that's 2+4, the evt(cbEVT_COMPLETE_CODE) is fired again, and you get 6 items). I mean the next run of the "statement solving inside CC" is not necessary, we have already generate 9 items, then we can shrunk directly on the previous results.

Here is the test code:

--- Code: ---class AAA
{
public:
    void Method1();
    void Method2();
    void Method3();
    void Method4();
    void Method5();
    void Method6();
    int aaa;
    int bbb;
    int ccc;
    int aaa1;
    int bbb1;
    int ccc1;
    int aaa2;
    int bbb2;
    int ccc2;
};
AAA obj;
obj.M

--- End code ---



--- Quote ---p.s. Our CC plugin will stay in the history just after I finish my editor experiments...
--- End quote ---
You plan to remove the CC plugin, and implement the Clang CC plugin? Or some other ideas?

oBFusCATed:

--- Quote from: ollydbg on August 18, 2017, 10:08:30 am ---You are right, the list never get shrunked when I enter "M", just the selection was changed.
... I mean the next run of the "statement solving inside CC" is not necessary, we have already generate 9 items, then we can shrunk directly on the previous results.

--- End quote ---
I think this is a limitation of the scintilla apis. We should just ask the cc plugin for a list of completions and then use it for our list control.
I don't know why this is done this way, but I guess I'll find out when I try to implement the auto-completion in multiple-selections.


--- Quote from: ollydbg on August 18, 2017, 10:08:30 am ---You plan to remove the CC plugin, and implement the Clang CC plugin? Or some other ideas?

--- End quote ---
I plan to implement a client for http://langserver.org/
For me this is the only feasible option for an IDE with the size of CB.

ollydbg:

--- Quote from: oBFusCATed on August 18, 2017, 07:23:53 pm ---
--- Quote from: ollydbg on August 18, 2017, 10:08:30 am ---You plan to remove the CC plugin, and implement the Clang CC plugin? Or some other ideas?

--- End quote ---
I plan to implement a client for http://langserver.org/
For me this is the only feasible option for an IDE with the size of CB.

--- End quote ---
Sounds like langserver for C++ are maintained by LLVM, so it's still clang. But currently it's status is "in progress", and I see only a VS client is in the code repository. It sounds like all the communication is through IPC or socket(see here:sourcegraph/javascript-typescript-langserver: JavaScript and TypeScript code intelligence through the Language Server Protocol)

--- Code: ---# run over STDIO
node lib/language-server-stdio
# or run over TCP
node lib/language-server

--- End code ---
Hope the speed is still good enough. ;)

BTW: About our current status in buildin CC, it needs some asynchronous mechanisms to avoid a lot of lockers to protect the tokentree or other resource.

ollydbg:
Guys, I found another bug under C::B build against wx3.1, that is "press shift + key" cancel the auto completion window under Windows. I test it again, and this does not happens under Nightly build version. I'm on Win7.

Test code is in the post: Re: question on how to trigger evt(cbEVT_COMPLETE_CODE), the step to reproduce is quite simple:

1, hit "." after the "obj", which shows the suggestion list.
2, hit "shift + m"
3, the expected behavior is the "Method.." item will be selected, but in my C::B build against wx3.1, the auto completion window is canceled.

Note that if in the step 2, I hit the "a", then the "a..." item is selected, and the auto completion window is still active.
Note that if in the step 2, I only hit the "shift" key, the auto completion window is still active.

Really strange, it looks like wx3.1 emit some extra event which cancel the active auto completion window when I hit "shift + key". Any one can reproduce?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version