Re: Trouble with Java completion
David Ventimiglia <[email protected]> Fri, 2 Sep 2016 04:54:37 -0700
| Newsgroups | gmane.emacs.semantic |
|---|---|
| Message-ID | <CALaE=t8PzWtjvEU-CF_=Piwk-GJ4GymjD5VS-oqZ2chV5JmSAQ@mail.gmail.com> |
--===============6057730486280082943==
Content-Type: multipart/alternative; boundary=001a1137cfdad7428e053b84ffed
--001a1137cfdad7428e053b84ffed
Content-Type: text/plain; charset=UTF-8
Hi Edward,
Thanks for getting back to me. Yes, it certainly seems like EDE picked up
my project; at least, ede-project-customize seems to think that it has.
Also, cedet-java-describe (thanks for that tip) seems to have a sensible
opinion on the subject (output pasted in below). I'll dig into the
function call with the debugger, beginning with the back-trace you sent, so
thanks for that as well.
In the meantime ("no good deed goes unpunished"), if you're up for it you
might for fun (for some definition of "fun") try a Docker image that I
threw together with the intent of having a reproducible environment for
demonstrating the problem I'm experiencing. If so, and if you have Docker
installed (not necessarily an easy task), I think you can issue the
following commands to get the image and run it in a terminal:
docker pull dventimi/docker-emacs
docker run -t -i dventimi/docker-emacs emacs
That should put you into an Emacs instance running in console mode in a
Docker container. You're "root" and the CWD is "/", but there's an Emacs
bookmark set to the same HelloWorld.java file in "/root/Scratch", an
up-to-date version of CEDET is in "/root/cedet" and is compiled, Emacs is
initialized with a bare-bones .emacs file in "/root", and within that
initialization file an EDE Java project is configured for "/root/Scratch".
If that all works, you should be able to visit the "HelloWorld.java" file
and with point at "m." and try semantic-ia-complete-symbol or
semantic-analyze-debug-assist. With point in either of the includes (e.g.,
"import java.util.Map"), if you try M-x
semantic-decoration-fileless-include-describe, you should again get the
output indicating it has a tag table handled by a JAR file, but there are 0
tags.
Of course, if you've no appetite for all this, I completely understand. :)
Best wishes,
David
==========================
cedet-java-describe output:
CEDET Java Operational Environment:
Current Java Version: 1.7.0_111
Minimum Desired version: 1.4
Java Command: java
Jar Command: jar
Javap Command: javap
User Specified Global Classpath Extension:
Project Specified Classpath Extension (EDE):
Java JDK Core Jar File:
/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/rt.jar
On Tue, Aug 30, 2016 at 12:01 PM, Edward John Steere <
[email protected]> wrote:
> Hi David,
>
> 1-4, all roughly the same as me.
> 5. I don't know whether it's necessary, but it doesn't seem to work on
> my machine w/o a project.
> 7. Did ede pick up the project after you defined it? You can run
> `ede-customize-project' to verify.
>
> I think that there might be a bug in the db because it isn't finding any
> tags for the include. I get the following output for that import:
>
> Include Tag: java.util.Map
>
> This header tag has been marked "Fileless".
> This means that Semantic cannot find a file associated with this tag
> on disk, but a database table of tags has been associated with it.
>
> This means that the include will still be used to find tags for
> searches, but you cannot visit this include.
>
> This Header is now represented by the following database table:
>
> #<semanticdb-table-jar-file java/util/Map.class (1 tags)>
>
> I found a function to detect your java environment:
> `cedet-java-describe'. You could use that to determine whether your
> java is being picked up correctly. I get the following (on a Mac):
>
> CEDET Java Operational Environment:
>
> Current Java Version: 1.8.0_11
>
> Minimum Desired version: 1.4
> Java Command: java
> Jar Command: jar
> Javap Command: javap
>
> User Specified Global Classpath Extension:
>
> Project Specified Classpath Extension (EDE):
>
> Java JDK Core Jar File:
> /Library/Java/JavaVirtualMachines/jdk1.8.0_
> 11.jdk/Contents/Home/jre/lib/rt.jar
>
>
> I used the profiler to find the most likely functions involved in
> finding tags. This *might* not be a real call stack, but I find that it
> sometimes helps me to orient myself in a project. If you're going to
> debug the issue then I'd say that theses functions are probably a good
> place to start:
>
> - semanticdb-javap-classpath-objects
> - semanticdb-find-table-for-include-java-mode
> - semanticdb-find-table-for-include
> - semanticdb-find-translate-path-includes--internal
> - semanticdb-find-translate-path-includes-default
> - semanticdb-find-translate-path-java-mode
> - semanticdb-find-translate-path
> - semanticdb-table
> - apply
> - eieio-generic-call-primary-only
> - semanticdb-typecache-include-tags
> - #<compiled 0x411b26ed>
> - apply
> - semanticdb-typecache-find-method
> - semanticdb-typecache-find-default
> - semanticdb-typecache-find-java-mode
>
> If I could replicate your problem then I would be much better equipped
> to help. As it stands this is the best I can do to point you in a
> direction (I'm sure I'll be corrected if anything I've said is off point
> :-) ).
>
> Kind regards,
>
> Edward Steere
>
> > Hi Edward,
> >
> > Thanks so much for replying. Here's what I can tell you.
> >
> > 1 I'm using CEDET from the Git repository
> > http://git.code.sf.net/p/cedet/git and it's up-to-date.
> > 2 It's the very first thing I load in my init file, so as to avoid
> > using the built-in CEDET.
> > 3 CEDET version is 2.0. Full (cedet-version) output is below.
> > 4 I've always had global-semantic-decoration-mode enabled and all my
> > imports have always been green "Fileless." Full output is below.
> > 5 I didn't originally have an EDE project-root (is that necessary). I
> > only had the HelloWorld.java file in /home/dventimi/Scratch
> > 6 I have however always had (require 'semantic/db-javap) at the top of
> > my init file.
> > 7 I added a project-root with this line in my init file:
> > (ede-java-root-project "Scratch" :file
> > "/home/dventimi/Scratch/HelloWorld.java"). I know the project root
> > doesn't typically "hang off" the file I'm trying to compile, but
> > there's no choice since I have no other files in the Scratch
> > directory.
> > 8 Even with this addition, I get precisely the same behavior. The key
> > is that it seems to identify the import statements as "Fileless." In
> > my experience (I've had completion working in the past, though long
> > ago under different circumstances on a different computer) "green is
> > good" and that's the ideal state for importing tags from JAR files
> > via javap. And yet, the tags table it builds this time has 0 tags.
> >
> > I'm happy to start drilling in with the debugger, but at present I
> > don't even know where to begin. Anyway, thanks!
> >
> > Best,
> > David
> >
> > (cedet-version)
> > ->
> > CEDET Version: 2.0
> > Requested File Loaded
> > Package Version Version Version
> > ----------------------------------------------------------
> > cedet: 2.0 ok ok
> > eieio: 1.4 nil ok
> > semantic: 2.2 ok ok
> > srecode: 1.2 ok ok
> > ede: 1.2 2.0 2.0
> > cogre: 1.2 ok ok
> > cedet-contrib: 1.2 nil Not Loaded
> >
> > "What's this?"
> > ->
> > Include Tag: java.util.Map
> >
> > This header tag has been marked "Fileless".
> > This means that Semantic cannot find a file associated with this tag
> > on disk, but a database table of tags has been associated with it.
> >
> > This means that the include will still be used to find tags for
> > searches, but you cannot visit this include.
> >
> > This Header is now represented by the following database table:
> >
> > #<semanticdb-table-jar-file java/util/Map.class (0 tags)>
> >
> > On Mon, Aug 29, 2016 at 1:26 PM, Edward John Steere
> > <[email protected]> wrote:
> >
> > Hi David,
> >
> > You're right, db-javap does deal with this :) I could only
> > replicate
> > your problem with db-javap turned off (i.e. not `require'd). Once
> > I
> > `require'd it it complained that generic projects don't have a
> > :classpath slot (which is of course true.) Once I created a
> > `java-root'
> > project, and dumped your code in it, it worked fine and gave me
> > the
> > following options:
> >
> > clear compute
> > computeIfAbsent computeIfPresent
> > containsKey containsValue entrySet
> > equals forEach get
> > getOrDefault hashCode isEmpty
> > keySet merge put
> > putAll putIfAbsent remove
> > replace replaceAll size
> > values
> >
> > Are you using upstream or built in CEDET?
> >
> > You can also turn on `global-semantic-decoration-mode' and your
> > imports
> > will be decorated to indicate whether they have been:
> >
> > - Parsed (no highlighting)
> > - Still need to be parsed (highlighted yellow on my machine)
> > - None-file imports -- such as an import from a jar file
> > (highlighted
> > green on my machine)
> > - Unrecognised imports (highlighted red on my machine)
> > - (Your function tags will also be decorated in the buffer)
> >
> > This ought to give you a good idea of whether cedet has figured
> > out your
> > project setup.
> >
> > To answer 1. and 2. I'm not familiar with the global versus local
> > type
> > cache, but with any luck you wont have to be either :)
> >
> > Kind regards,
> >
> > Edward Steere
> >
> > > Hi!
> > >
> > > I'm having trouble with the Semantic Analyzer and Analyzer
> > Debugging
> > > for Java programs. I've a simple "Hello, World!" Java file that
> > looks
> > > like this:
> > >
> > > import java.util.Map;
> > >
> > > import java.util.HashMap;
> > >
> > >
> > >
> > >
> > > public class HelloWorld {
> > >
> > > public static void main (String[] args) {
> > >
> > > Map m = new HashMap();
> > >
> > > m.
> > >
> > > }
> > >
> > > }
> > >
> > > When I try M-x semantic-ia-complete-symbol after the "m.", I get
> > the
> > > message "Cannot find types for `Map m'," I get the output in the
> > > attached debug.txt file. I'm trying to interpret this output,
> > and a
> > > couple questions come to mind.
> > >
> > > 1 Should I expect the type to be a local type or a global type?
> > > 2 What's the difference between a local type and a global type?
> > > 3 Shouldn't semantic/db-javap just handle this?
> > >
> > > The typecache (also attached) seems to have all the java.lang
> > types,
> > > which semantic/db-javap presumably fished out of my Java
> > > installation's rt.jar file. If that's the case, shouldn't it
> > also have
> > > fished out java.util.Map?
> > >
> > > Thanks!
> > > Best,
> > > David
> > >
> > >
> > >
> > >
> > > -
> > ------------------------------------------------------------
> -----------------
> >
> > > _______________________________________________
> > > cedet-semantic mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/cedet-semantic
> >
>
--001a1137cfdad7428e053b84ffed
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Hi Edward,<div><br></div><div>Thanks for getting back to m=
e.=C2=A0 Yes, it certainly seems like EDE picked up my project; at least, e=
de-project-customize seems to think that it has.=C2=A0 Also, cedet-java-des=
cribe (thanks for that tip) seems to have a sensible opinion on the subject=
(output pasted in below).=C2=A0 I'll dig into the function call with t=
he debugger, beginning with the back-trace you sent, so thanks for that as =
well. =C2=A0</div><div><br></div><div>In the meantime ("no good deed g=
oes unpunished"), if you're up for it you might for fun (for some =
definition of "fun") try a Docker image that I threw together wit=
h the intent of having a reproducible environment for demonstrating the pro=
blem I'm experiencing.=C2=A0 If so, and if you have Docker installed (n=
ot necessarily an easy task), I think you can issue the following commands =
to get the image and run it in a terminal:</div><div><br></div><div>docker =
pull dventimi/docker-emacs<br></div><div>docker run -t -i dventimi/docker-e=
macs emacs<br></div><div><br></div><div>That should put you into an Emacs i=
nstance running in console mode in a Docker container.=C2=A0 You're &qu=
ot;root" and the CWD is "/", but there's an Emacs bookma=
rk set to the same HelloWorld.java file in "/root/Scratch", an up=
-to-date version of CEDET is in "/root/cedet" and is compiled, Em=
acs is initialized with a bare-bones .emacs file in "/root", and =
within that initialization file an EDE Java project is configured for "=
;/root/Scratch".=C2=A0 If that all works, you should be able to visit =
the "HelloWorld.java" file and with point at "m." and t=
ry semantic-ia-complete-symbol or semantic-analyze-debug-assist.=C2=A0 With=
point in either of the includes (e.g., "import java.util.Map"), =
if you try M-x semantic-decoration-fileless-include-describe, you should ag=
ain get the output indicating it has a tag table handled by a JAR file, but=
there are 0 tags.</div><div><br></div><div>Of course, if you've no app=
etite for all this, I completely understand. =C2=A0:)</div><div><br></div><=
div>Best wishes,</div><div>David</div><div><br></div><div>=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D</div><div>c=
edet-java-describe output:</div><div><br></div><div><div>CEDET Java Operati=
onal Environment:</div><div><br></div><div>Current Java Version: 1.7.0_111<=
/div><div><br></div><div>Minimum Desired version: 1.4</div><div>Java Comman=
d: java</div><div>Jar Command: jar</div><div>Javap Command: javap</div><div=
><br></div><div>User Specified Global Classpath Extension:</div><div><br></=
div><div><br></div><div>Project Specified Classpath Extension (EDE):</div><=
div><br></div><div><br></div><div>Java JDK Core Jar File:</div><div>=C2=A0 =
/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/rt.jar</div></div><div><br></=
div><div><br></div><div><br></div></div><div class=3D"gmail_extra"><br><div=
class=3D"gmail_quote">On Tue, Aug 30, 2016 at 12:01 PM, Edward John Steere=
<span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D=
"_blank">[email protected]</a>></span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">Hi David,<br>
<br>
1-4, all roughly the same as me.<br>
5. I don't know whether it's necessary, but it doesn't seem to =
work on<br>
=C2=A0 =C2=A0my machine w/o a project.<br>
7. Did ede pick up the project after you defined it?=C2=A0 You can run<br>
=C2=A0 =C2=A0`ede-customize-project' to verify.<br>
<br>
I think that there might be a bug in the db because it isn't finding an=
y<br>
tags for the include.=C2=A0 I get the following output for that import:<br>
<span class=3D""><br>
=C2=A0 =C2=A0 Include Tag: java.util.Map<br>
<br>
=C2=A0 =C2=A0 This header tag has been marked "Fileless".<br>
=C2=A0 =C2=A0 This means that Semantic cannot find a file associated with t=
his tag<br>
=C2=A0 =C2=A0 on disk, but a database table of tags has been associated wit=
h it.<br>
<br>
=C2=A0 =C2=A0 This means that the include will still be used to find tags f=
or<br>
=C2=A0 =C2=A0 searches, but you cannot visit this include.<br>
<br>
=C2=A0 =C2=A0 This Header is now represented by the following database tabl=
e:<br>
<br>
</span>=C2=A0 =C2=A0 =C2=A0 #<semanticdb-table-jar-file java/util/Map.cl=
ass (1 tags)><br>
<br>
I found a function to detect your java environment:<br>
`cedet-java-describe'.=C2=A0 You could use that to determine whether yo=
ur<br>
java is being picked up correctly.=C2=A0 I get the following (on a Mac):<br=
>
<br>
=C2=A0 =C2=A0 CEDET Java Operational Environment:<br>
<br>
=C2=A0 =C2=A0 Current Java Version: 1.8.0_11<br>
<br>
=C2=A0 =C2=A0 Minimum Desired version: 1.4<br>
=C2=A0 =C2=A0 Java Command: java<br>
=C2=A0 =C2=A0 Jar Command: jar<br>
=C2=A0 =C2=A0 Javap Command: javap<br>
<br>
=C2=A0 =C2=A0 User Specified Global Classpath Extension:<br>
<br>
=C2=A0 =C2=A0 Project Specified Classpath Extension (EDE):<br>
<br>
=C2=A0 =C2=A0 Java JDK Core Jar File:<br>
=C2=A0 =C2=A0 =C2=A0 /Library/Java/<wbr>JavaVirtualMachines/jdk1.8.0_<wbr>1=
1.jdk/Contents/Home/jre/lib/<wbr>rt.jar<br>
<br>
<br>
I used the profiler to find the most likely functions involved in<br>
finding tags.=C2=A0 This *might* not be a real call stack, but I find that =
it<br>
sometimes helps me to orient myself in a project.=C2=A0 If you're going=
to<br>
debug the issue then I'd say that theses functions are probably a good<=
br>
place to start:<br>
<br>
=C2=A0 =C2=A0 - semanticdb-javap-classpath-<wbr>objects<br>
=C2=A0 =C2=A0 =C2=A0- semanticdb-find-table-for-<wbr>include-java-mode<br>
=C2=A0 =C2=A0 =C2=A0 - semanticdb-find-table-for-<wbr>include<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0- semanticdb-find-translate-<wbr>path-includes--=
internal<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 - semanticdb-find-translate-<wbr>path-includes-=
default<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- semanticdb-find-translate-<wbr>path-jav=
a-mode<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - semanticdb-find-translate-path<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- semanticdb-table<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - apply<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- eieio-generic-call-primar=
y-<wbr>only<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - semanticdb-typecache-inc=
lude-<wbr>tags<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- #<compiled 0x41=
1b26ed><br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - apply<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- semanticdb-=
typecache-find-<wbr>method<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 - semanticdb=
-typecache-find-<wbr>default<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- sema=
nticdb-typecache-find-<wbr>java-mode<br>
<br>
If I could replicate your problem then I would be much better equipped<br>
to help.=C2=A0 As it stands this is the best I can do to point you in a<br>
direction (I'm sure I'll be corrected if anything I've said is =
off point<br>
:-) ).<br>
<br>
Kind regards,<br>
<br>
Edward Steere<br>
<span class=3D""><br>
> Hi Edward,<br>
><br>
> Thanks so much for replying. Here's what I can tell you.<br>
><br>
</span>> 1 I'm using CEDET from the Git repository<br>
<span class=3D"">>=C2=A0 =C2=A0<a href=3D"http://git.code.sf.net/p/cedet=
/git" rel=3D"noreferrer" target=3D"_blank">http://git.code.sf.net/p/<wbr>ce=
det/git</a> and it's up-to-date.<br>
</span>> 2 It's the very first thing I load in my init file, so as t=
o avoid<br>
>=C2=A0 =C2=A0using the built-in CEDET.<br>
> 3 CEDET version is 2.0. Full (cedet-version) output is below.<br>
> 4 I've always had global-semantic-decoration-<wbr>mode enabled and=
all my<br>
<span class=3D"">>=C2=A0 =C2=A0imports have always been green "File=
less." Full output is below.<br>
</span>> 5 I didn't originally have an EDE project-root (is that nec=
essary). I<br>
<span class=3D"">>=C2=A0 =C2=A0only had the HelloWorld.java file in /hom=
e/dventimi/Scratch<br>
</span>> 6 I have however always had (require 'semantic/db-javap) at=
the top of<br>
>=C2=A0 =C2=A0my init file.<br>
> 7 I added a project-root with this line in my init file:<br>
<span class=3D"">>=C2=A0 =C2=A0(ede-java-root-project "Scratch"=
; :file<br>
>=C2=A0 =C2=A0"/home/dventimi/Scratch/<wbr>HelloWorld.java"). =
I know the project root<br>
>=C2=A0 =C2=A0doesn't typically "hang off" the file I'=
m trying to compile, but<br>
>=C2=A0 =C2=A0there's no choice since I have no other files in the S=
cratch<br>
>=C2=A0 =C2=A0directory.<br>
</span>> 8 Even with this addition, I get precisely the same behavior. T=
he key<br>
<div class=3D"HOEnZb"><div class=3D"h5">>=C2=A0 =C2=A0is that it seems t=
o identify the import statements as "Fileless." In<br>
>=C2=A0 =C2=A0my experience (I've had completion working in the past=
, though long<br>
>=C2=A0 =C2=A0ago under different circumstances on a different computer)=
"green is<br>
>=C2=A0 =C2=A0good" and that's the ideal state for importing ta=
gs from JAR files<br>
>=C2=A0 =C2=A0via javap. And yet, the tags table it builds this time has=
0 tags.<br>
><br>
> I'm happy to start drilling in with the debugger, but at present I=
<br>
> don't even know where to begin. Anyway, thanks!<br>
><br>
> Best,<br>
> David<br>
><br>
> (cedet-version)<br>
> -><br>
> CEDET Version: 2.0<br>
> Requested File Loaded<br>
> Package Version Version Version<br>
> ------------------------------<wbr>----------------------------<br>
> cedet: 2.0 ok ok<br>
> eieio: 1.4 nil ok<br>
> semantic: 2.2 ok ok<br>
> srecode: 1.2 ok ok<br>
> ede: 1.2 2.0 2.0<br>
> cogre: 1.2 ok ok<br>
> cedet-contrib: 1.2 nil Not Loaded<br>
><br>
> "What's this?"<br>
> -><br>
> Include Tag: java.util.Map<br>
><br>
> This header tag has been marked "Fileless".<br>
> This means that Semantic cannot find a file associated with this tag<b=
r>
> on disk, but a database table of tags has been associated with it.<br>
><br>
> This means that the include will still be used to find tags for<br>
> searches, but you cannot visit this include.<br>
><br>
> This Header is now represented by the following database table:<br>
><br>
> #<semanticdb-table-jar-file java/util/Map.class (0 tags)><br>
><br>
> On Mon, Aug 29, 2016 at 1:26 PM, Edward John Steere<br>
> <<a href=3D"mailto:[email protected]">[email protected]=
</a>> wrote:<br>
><br>
>=C2=A0 =C2=A0 =C2=A0Hi David,<br>
><br>
>=C2=A0 =C2=A0 =C2=A0You're right, db-javap does deal with this :) I=
could only<br>
>=C2=A0 =C2=A0 =C2=A0replicate<br>
>=C2=A0 =C2=A0 =C2=A0your problem with db-javap turned off (i.e. not `re=
quire'd). Once<br>
>=C2=A0 =C2=A0 =C2=A0I<br>
>=C2=A0 =C2=A0 =C2=A0`require'd it it complained that generic projec=
ts don't have a<br>
>=C2=A0 =C2=A0 =C2=A0:classpath slot (which is of course true.) Once I c=
reated a<br>
>=C2=A0 =C2=A0 =C2=A0`java-root'<br>
>=C2=A0 =C2=A0 =C2=A0project, and dumped your code in it, it worked fine=
and gave me<br>
>=C2=A0 =C2=A0 =C2=A0the<br>
>=C2=A0 =C2=A0 =C2=A0following options:<br>
><br>
>=C2=A0 =C2=A0 =C2=A0clear compute<br>
>=C2=A0 =C2=A0 =C2=A0computeIfAbsent computeIfPresent<br>
>=C2=A0 =C2=A0 =C2=A0containsKey containsValue entrySet<br>
>=C2=A0 =C2=A0 =C2=A0equals forEach get<br>
>=C2=A0 =C2=A0 =C2=A0getOrDefault hashCode isEmpty<br>
>=C2=A0 =C2=A0 =C2=A0keySet merge put<br>
>=C2=A0 =C2=A0 =C2=A0putAll putIfAbsent remove<br>
>=C2=A0 =C2=A0 =C2=A0replace replaceAll size<br>
>=C2=A0 =C2=A0 =C2=A0values<br>
><br>
>=C2=A0 =C2=A0 =C2=A0Are you using upstream or built in CEDET?<br>
><br>
>=C2=A0 =C2=A0 =C2=A0You can also turn on `global-semantic-decoration-<w=
br>mode' and your<br>
>=C2=A0 =C2=A0 =C2=A0imports<br>
>=C2=A0 =C2=A0 =C2=A0will be decorated to indicate whether they have bee=
n:<br>
><br>
>=C2=A0 =C2=A0 =C2=A0- Parsed (no highlighting)<br>
>=C2=A0 =C2=A0 =C2=A0- Still need to be parsed (highlighted yellow on my=
machine)<br>
>=C2=A0 =C2=A0 =C2=A0- None-file imports -- such as an import from a jar=
file<br>
>=C2=A0 =C2=A0 =C2=A0(highlighted<br>
>=C2=A0 =C2=A0 =C2=A0green on my machine)<br>
>=C2=A0 =C2=A0 =C2=A0- Unrecognised imports (highlighted red on my machi=
ne)<br>
>=C2=A0 =C2=A0 =C2=A0- (Your function tags will also be decorated in the=
buffer)<br>
><br>
>=C2=A0 =C2=A0 =C2=A0This ought to give you a good idea of whether cedet=
has figured<br>
>=C2=A0 =C2=A0 =C2=A0out your<br>
>=C2=A0 =C2=A0 =C2=A0project setup.<br>
><br>
>=C2=A0 =C2=A0 =C2=A0To answer 1. and 2. I'm not familiar with the g=
lobal versus local<br>
>=C2=A0 =C2=A0 =C2=A0type<br>
>=C2=A0 =C2=A0 =C2=A0cache, but with any luck you wont have to be either=
:)<br>
><br>
>=C2=A0 =C2=A0 =C2=A0Kind regards,<br>
><br>
>=C2=A0 =C2=A0 =C2=A0Edward Steere<br>
><br>
>=C2=A0 =C2=A0 =C2=A0> Hi!<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> I'm having trouble with the Semantic Analy=
zer and Analyzer<br>
>=C2=A0 =C2=A0 =C2=A0Debugging<br>
>=C2=A0 =C2=A0 =C2=A0> for Java programs. I've a simple "Hel=
lo, World!" Java file that<br>
>=C2=A0 =C2=A0 =C2=A0looks<br>
>=C2=A0 =C2=A0 =C2=A0> like this:<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> import java.util.Map;<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> import java.util.HashMap;<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> public class HelloWorld {<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> public static void main (String[] args) {<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> Map m =3D new HashMap();<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> m.<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> }<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> }<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> When I try M-x semantic-ia-complete-symbol aft=
er the "m.", I get<br>
>=C2=A0 =C2=A0 =C2=A0the<br>
>=C2=A0 =C2=A0 =C2=A0> message "Cannot find types for `Map m'=
;," I get the output in the<br>
>=C2=A0 =C2=A0 =C2=A0> attached debug.txt file. I'm trying to int=
erpret this output,<br>
>=C2=A0 =C2=A0 =C2=A0and a<br>
>=C2=A0 =C2=A0 =C2=A0> couple questions come to mind.<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> 1 Should I expect the type to be a local type =
or a global type?<br>
>=C2=A0 =C2=A0 =C2=A0> 2 What's the difference between a local ty=
pe and a global type?<br>
>=C2=A0 =C2=A0 =C2=A0> 3 Shouldn't semantic/db-javap just handle =
this?<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> The typecache (also attached) seems to have al=
l the java.lang<br>
>=C2=A0 =C2=A0 =C2=A0types,<br>
>=C2=A0 =C2=A0 =C2=A0> which semantic/db-javap presumably fished out =
of my Java<br>
>=C2=A0 =C2=A0 =C2=A0> installation's rt.jar file. If that's =
the case, shouldn't it<br>
>=C2=A0 =C2=A0 =C2=A0also have<br>
>=C2=A0 =C2=A0 =C2=A0> fished out java.util.Map?<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> Thanks!<br>
>=C2=A0 =C2=A0 =C2=A0> Best,<br>
>=C2=A0 =C2=A0 =C2=A0> David<br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0><br>
>=C2=A0 =C2=A0 =C2=A0> -<br>
>=C2=A0 =C2=A0 =C2=A0------------------------------<wbr>----------------=
--------------<wbr>-----------------<br>
><br>
>=C2=A0 =C2=A0 =C2=A0> ______________________________<wbr>___________=
______<br>
>=C2=A0 =C2=A0 =C2=A0> cedet-semantic mailing list<br>
>=C2=A0 =C2=A0 =C2=A0> <a href=3D"mailto:[email protected]=
orge.net">cedet-semantic@lists.<wbr>sourceforge.net</a><br>
>=C2=A0 =C2=A0 =C2=A0> <a href=3D"https://lists.sourceforge.net/lists=
/listinfo/cedet-semantic" rel=3D"noreferrer" target=3D"_blank">https://list=
s.sourceforge.net/<wbr>lists/listinfo/cedet-semantic</a><br>
><br>
</div></div></blockquote></div><br></div>
--001a1137cfdad7428e053b84ffed--
--===============6057730486280082943==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
------------------------------------------------------------------------------
--===============6057730486280082943==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
cedet-semantic mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cedet-semantic
--===============6057730486280082943==--