Author Topic: Python Code Completion  (Read 52561 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Python Code Completion
« Reply #45 on: November 07, 2012, 11:55:25 am »
I have attached a patch for codecompletion.cpp. I have deleted calls to 'IsFileExtRegistered' in this patch also.
So - this seems pretty much complete and does what I should do. @dmoore: are you happy with his, too? It looks fine here, after a few hours of testing... Looks like the "least common denominator" we were looking for... ;-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Code Completion
« Reply #46 on: November 07, 2012, 01:11:03 pm »
I haven't had time to look, but everything darmar said sounds good to me, so commit away unless you want me to test.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Python Code Completion
« Reply #47 on: November 07, 2012, 01:32:01 pm »
I haven't had time to look, but everything darmar said sounds good to me, so commit away unless you want me to test.
Committed with credits. Whats missing are the adjustments to the Fortran project plugin - darmar will take case I guess... ;D
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Code Completion
« Reply #48 on: November 09, 2012, 10:47:21 pm »
Now working nicely with PythonCodeCompletion plugin.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Python Code Completion
« Reply #49 on: November 10, 2012, 10:09:12 am »
Now working nicely with PythonCodeCompletion plugin.
Well done then. :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline darmar

  • Multiple posting newcomer
  • *
  • Posts: 57
Re: Python Code Completion
« Reply #50 on: November 24, 2012, 10:00:27 am »
The functions "RegisterCCFileExts" and "IsFileExtRegistered" are left still in "src/sdk/pluginmanager.cpp". They are unused any more and can be deleted, I think.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: Python Code Completion
« Reply #51 on: November 24, 2012, 12:11:09 pm »
They are unused any more and can be deleted, I think.
Done in trunk. Thank you!
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Code Completion
« Reply #52 on: October 29, 2013, 04:54:11 pm »
Update: Now using the jedi library to complete python code. Works a little better than rope and is more actively developed.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11939
    • Travis build status
Re: Python Code Completion
« Reply #53 on: October 29, 2013, 05:56:49 pm »
dmoore: Do you follow Alpha's changes to the CC in this branch https://github.com/alpha0010/codeblocks_sf/compare/cc_interface?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Code Completion
« Reply #54 on: October 29, 2013, 06:14:30 pm »
dmoore: Do you follow Alpha's changes to the CC in this branch https://github.com/alpha0010/codeblocks_sf/compare/cc_interface?

Not closely (i.e. I read the occasional post in the related thread), but I might soon. Is there enough ready to be able to do anything with it yet? Testing out his work with Python would obviously be a good test.

Offline Alpha

  • Developer
  • Lives here!
  • *****
  • Posts: 1513
Re: Python Code Completion
« Reply #55 on: October 30, 2013, 12:52:38 am »
Is there enough ready to be able to do anything with it yet? Testing out his work with Python would obviously be a good test.
I think so.  API for auto-complete popups, documentation popups, tooltips, and calltips are present and (mostly) functional.  These subsystems still contain some hardcoded defaults, but other than that, I believe it is ready for a test with Python.  (Be prepared for uncaught bugs and frequent API breaks though ::).)

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Python Code Completion
« Reply #56 on: October 30, 2013, 03:33:35 am »
I think so.  API for auto-complete popups, documentation popups, tooltips, and calltips are present and (mostly) functional.  These subsystems still contain some hardcoded defaults, but other than that, I believe it is ready for a test with Python.  (Be prepared for uncaught bugs and frequent API breaks though ::).)

I will take a look soon (if for no other reason than I want to use the docstring UI rather than roll my own). Some hints (e.g. doc strings) on how to use the plugin virtuals (i.e. what the plugin is supposed to do with each one) and what events are available and need to be used would be extremely helpful! Looks like a fairly extensive overhaul of the existing interface. (Well done!)