Re[2]: [CEDET-devel] Inline completion
Brought to you by:
zappo
From: Eric M. L. <er...@si...> - 2004-02-03 19:59:23
|
>>> David Ponce <dav...@wa...> seems to think that: >Eric, > >[...] > > I have verified that "Bar" is now in scope with my fix, but "Foo" was > > not. I don't think I have your overload for > > `semantic-ctxt-scoped-types', though I have updated my wisent > > directory. > >It is in bovine/semantic-java.el. Hmm, I had not realized that there was still java code in there. Too bad CVS is currently not accepting my update request.. >[...] > > I will continue to experiment with your sample. I think there may be > > another bug lurking in the function I just fixed. All scoped tags in > > Java are available with your function, so I suspect it should return > > the right thing when you get my change? (though it may need to run > > through the uniq function I added to semantic-tag-sort.el.) >[...] > >I tried the fixed version of `semantic-analyze-scoped-types' through >`semantic-complete-analyze-inline' with the following small example: > [ ... ] >It seems to work better, but there is still problems with internal >classes: > >- When the cursor is at [-1-] `semantic-complete-analyze-inline' > works fine and proposes "a2" and "a1" to complete "a". > >- When the cursor is at [-2-] it proposes "a4", "a3" and "a1" but > not "a2". [ ... ] Over lunch I followed up my previous update with a new one. I've added a function `semantic-analyze-scope-nested-tags' specifically for finding nested class tags. It supersedes the old code which had one level (ok for most C++) so it is pretty generic. I tried it out with your new example, and it provides exactly the results you prescribe. I use the command `semantic-analyze-current-context' to provide a dump of what it is able to analyze. This is useful for debugging the scope list. I use the command `semantic-analyze-possible-completions' to list what it thinks completions could be. Completion answers should be drawn from global symbols, tags in scope, and local variables/methods. There may be some slight name confusion since scope is currently used only for types where "this" is presumed, and is not representative of local variables or arguments. Thanks for your good example! Eric -- Eric Ludlam: za...@gn..., er...@si... Home: http://www.ludlam.net Siege: www.siege-engine.com Emacs: http://cedet.sourceforge.net GNU: www.gnu.org |