Re: [CEDET-devel] semanticdb-javap not working
Brought to you by:
zappo
From: Eric L. <eri...@gm...> - 2012-01-21 04:10:04
|
On 01/19/2012 08:38 AM, Joel Borggren-Franck wrote: > On Sat, Jan 14, 2012 at 5:50 AM, Eric M. Ludlam<eri...@gm...> wrote: > >> The command: >> >> M-x bovinate RET >> >> is for running the parser. If you just run it, it dumps the raw lisp form. >> If prefixed w/ C-u, it will force a full refresh/reparse, but not display >> anything. >> > Thanks :) > > But I'm back at square 1,5 :/ > > For my classes (or the current class at least) I can complete on > members, IE all is well. > > For classes in the semanticdb I can only complete on Types IE I can > complete java.langSt to String, but I can't look at members. > > I'm at the latest bzr rev 8125. My only diff is Davids fix for > semanticdb-javap-classpath (btw please apply that). > > This should show the problem: > > import java.util.ArrayList; > import java.util.List; > import java.lang.String; > import java.lang.Integer; > import java.lang.Long; > > public class Java7 { > List bar = new ArrayList(); > Integer i = new Integer(2); > Long l = new Long(2); > > public static void main(String[] args) { > Java7 j = new Java7(); > l. > } > } > > the output from bovinate looks fine (also if parsing didn't work at > all I wouldn't be able to complete on the current file right?). Yes, it would complain about not being in a function, or something like that. > If I try to add a line: > > " java.lang.Stri" > > autocomplete works (IE completion on Types). > > also: > > " j.b" > > autocomplets to j.bar (IE my members work). > > But l. , bar. i. doesn't work. > > Stacktrace after debug-on-error attached. > > One thing is a bit strange, javap is working (from the *javap output* buffer): > > // Compiled from "Long.java" > public final class java.lang.Long extends java.lang.Number implements > java.lang.Comparable<java.lang.Long> { > public static final long MIN_VALUE; > public static final long MAX_VALUE; > > But all my jar-fil tables contain 0 tags: > > *#<semanticdb-java-jar-database classes.jar (7 tables) (20748 Files)> > ] Name: "classes.jar" > ] Class: #'semanticdb-java-jar-database > ] reference-directory > "/Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Classes/classes.jar" > ] new-table-class #'semanticdb-table-jar-file > ] cache : nil > ] :tables #<list o' stuff: 7 entries> > > #<semanticdb-table-jar-file java/util/ArrayList.class (0 tags)> > > #<semanticdb-table-jar-file java/util/List.class (0 tags)> > > #<semanticdb-table-jar-file java/lang/String.class (0 tags)> > > #<semanticdb-table-jar-file java/lang/Integer.class (0 tags)> > > #<semanticdb-table-jar-file java/lang/Long.class (0 tags)> > > #<semanticdb-table-jar-directory java/lang/ (105 Classes, 5 Packages)> > > #<semanticdb-table-jar-directory java/lang/ (105 Classes, 5 Packages)> > ] jarfilecache #<list o' stuff: 20748 entries> When I first got the javap database working, I had to fix parse errors by making the java parser more liberal in the kind of code it would accept. If you switched to using the full java parser, and not the java tags parser, those changes will need to be moved to that. You could find out by looking in the javap output buffer, and using M-x bovinate there to see what it is doing. I'm not Java expert enough to recognize what might be wrong from the code snippets here. The 0 tags are definitely a clue though. To be honest, I had never figured out how to get system jar files to work, mostly because I couldn't figure out how to get java to tell Emacs where they were. Eric |