It is my suspicion that supporting any completion pattern should be
"easy", for various definitions of the word easy.
The steps are:
1) Write an override function, like `semantic-ctxt-current-function'
that extracts the context information you need.
2) Create a new subclass of `semantic-analyze-context' similar to
`semantic-analyze-context-functionarg' with new fields or methods
needed to store your state.
3) Update `semantic-analyze-current-context-default' to recognize
the new context, and create your object.
The support needed to find and analyze the symbols in your context
should all be available.
If the number of possible completion contexts and apropos locations is
large, then it would be worthwhile to add a mode specific list of
these contexts somehow.
Eric
>>> joakim@... seems to think that:
>While workin on the java backend and trying out completion I had a
>little idea for a new type of completion system(new to me anyway, I'm
>writing partially to see if anyone knows about existing
>implementations)
>
>The feature would work like todays completion systems, but would allow
>adding more constraints. For instance:
>
>Java.lang.StringBuffer x;
>x.<point>
>
>will today complete methods in StringBuffer. Ok, but what about static
>members in other libraries which take StringBuffer as argument?
>
>??.??(x)
>
>I would now like to get a dynamic apropos of libraries and methods
>which take StringBuffer as argument.
>
>Same goes for other languages where its sometimes difficult to find
>the right method:
>
>(gnus-?? a b)
>
>would give me dynamic apropos of methods in gnus which takes 2
>args(we dont really have type constraints in elisp, except for eieio
>where the idea would be really nice I think)
>
>The point Im trying to make is that it should be possible to
>generalize semantic completion to not only cater for the object oriented
>syntaxes where the known type is to the left.
>
>What do you think of this idea? It feels at least somewhat doable with
>semantic.
--
Eric Ludlam: zappo@..., eric@...
Home: http://www.ludlam.net Siege: http://www.siege-engine.com
Emacs: http://cedet.sourceforge.net GNU: http://www.gnu.org
|