Any way to extend the code-completion data?

Post your questions and problem reports here

Moderator: kfury77

Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
  • Check the Support section of the corresponding product first. Chances are you will find your answer there;
  • Do not create new topics for already reported problems. Add your comments to the existing topics instead;
  • Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
  • Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
  • Include the version number of the software you are using;
  • This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
biotech
Posts: 27
Joined: Mon Mar 09, 2009 10:08 pm

Re: Any way to extend the code-completion data?

Post by biotech »

Thanks for all this and update.
Honestly, I thought that there would be some editor-like gui or easier way to get this done and turn snips into auto-complete.
Either way, thanks for posting this guide; I will give it a go when I catch some spare time to tweak my tools and post back.
Thanks again, good stuff.
Gatis
Blumentals Software Developer
Posts: 545
Joined: Sun Mar 05, 2006 12:30 am
Location: Latvia

Re: Any way to extend the code-completion data?

Post by Gatis »

Honestly, I thought that there would be some editor-like gui or easier way to get this done and turn snips into auto-complete.
Unfortunately there is no GUI way to add new items for auto-complete currently.
But I think it would be good, if we could add some automating here. So that we would not have to update all the PHP libraries once new versions come out ourselves, but customers themselves would be able to do that.

But it seems, this won't be an easy task. For example, generating .xml files for PHP Frameworks (Prado, YII, etc.) that are shipped with official release, is a 2-step process:
1) We use PHPDocumentator to generate documentation for the PHP library;
2) We use our own tool to generate the .xml files from the source files generated in first step;

The first step on my development PC for larger libraries can take up to 30-60 minutes! So, for now we are stuck with updating the libraries ourselves.
Kind regards,
Gatis Avots
Stringer
Posts: 2
Joined: Sat Feb 25, 2012 8:26 pm

Re: Any way to extend the code-completion data?

Post by Stringer »

Uh, so in order to use a brand new php library/framework you don't know yet, you will have to dig all the classes/functions manually and put them to those xml files?
Sounds like insane job to me. It also ruins idea of building anything more complex than one single file as your own project. You really should do something little bit more intelligent.
reacher
Posts: 40
Joined: Fri Oct 28, 2011 11:16 am

Re: Any way to extend the code-completion data?

Post by reacher »

Stringer what do you suggest? You obviously know of something more intelligent?
Stringer
Posts: 2
Joined: Sat Feb 25, 2012 8:26 pm

Re: Any way to extend the code-completion data?

Post by Stringer »

@reacher: you'll need to take what ever parser you now have for the active file, and make it do same parsing for all php files listed in the project's library folders. Then make a project wide code explorer and intellisense. For sake of speed, let the parser save the results to some project file instead of continually scanning the folders, pretty much like you now do with the xml files I guess.

And by the way, could you please add "Find all references" context action for variable/function/what ever selected from the text? Like Visual Studio does.
william070707
Posts: 16
Joined: Sun Feb 26, 2012 3:21 pm

Re: Any way to extend the code-completion data?

Post by william070707 »

Hi Gatis ,

This is really absolute way to learn. It is really a good way of posting in steps and is useful to those who want to lean. thank you after all posting this stiff :P
God never made his work for man to mend Image
Post Reply