Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Autocomplete driven development is the issue. How do I feed autocomplete hints to IDEs, when I'm using scripting languages which provide magic methods?

I'm not using an IDE usually. But it's obvious that many developers rely on them, and some percentage of them rely on autocomplete hints from the IDE. Now Eclipse and Netbeans both have support for PHP and Python. But they are of course unable to see class methods and attributes which are provided through __get/__ or something. Whereas magic methods sometimes provide a nicer and more flexible API (and/or save coding).

Anyway it's obviously an issue if you want to make the API visible to autocomplete programmers. So how can it be done? Is there an XML format for this? I know Eclipse is pretty xml-happy, but couldn't google up anything useful about that. How about Netbeans or other IDEs, is there any standardized scheme to signal autocomplete infos to code editors? (Would be nice if you could hobble in class methods and attributes, but also signal type hints for commonly used variable/object names.)

share|improve this question
From your question and the context in which you use the term 'autocomplete programmers', I'm inferring that you don't believe in autocomplete. So my answer would be don't attempt it, if you're not convinced of its benefits it won't be the best motivation to do a good job of it. If you think autocomplete is a bad thing, then why not describe its absence as a feature? –  pgfearo Sep 8 '11 at 4:40

1 Answer 1

I believe that auto-complete, in most IDE's, is defined as part of the language syntax, which is normally protected in the IDE and not exposed in a mutable way to any part of the code. The best route would be to write a new language syntax for the IDE's you want to serve and provide those syntax files with the source code. Auto-complete is called content assist in Eclipse, and that link goes to a guide for working with content assist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.