JavaSearch does not work with external JARs

15 views
Skip to first unread message

Gokul Subramanian

unread,
Sep 10, 2018, 4:46:29 PM9/10/18
to eclim-user
Hi there.

I am running Eclipse 4.8 (Photon) with Eclim 2.8, and using Neovim 0.3.1 to work on a workspace with a few projects (that depend on one another).

JavaSearch (and JavaSearchContext) work well within workspace, but render only the declaration in decompiled class files for external JARs. Rather, I'd expect to see the method implementations and Javadoc as well. When I try to jump to class definition for the same external class from the Eclipse UI, it works fine.

Here's a simple project setup.

Project A (having a dependent project B in the same workspace) with a .classpath file that looks something like

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="src" path="src"/>
        <classpathentry kind="src" path="tst"/>
        <classpathentry kind="src" path="build/generated-src"/>
        <classpathentry kind="src" path="/B"/>
        <classpathentry kind="lib" path="/somepath/somelib.jar" sourcepath="/someotherpath"/>

I ran Neovim with the -V argument to get logs. This indicated that the command being sent to eclimd is an archive_read. So, it looks like eclim is neglecting the sourcepath attribute in the classpathentry tag of my project's classpath.

Is this a bug or am I missing something?

Thanks.


Eric Van Dewoestine

unread,
Sep 10, 2018, 11:06:54 PM9/10/18
to eclim...@googlegroups.com
Which entry in that .classpath file contains the element you are
searching for? Based on your description I'm guessing the last one for
someotherpath, but it's not totally clear.

It's possible something changed in photon that is preventing eclim
from finding the source file, but off hand i'm not sure. Unfortunately
I'm not sure when I'll have time to investigate.

On 2018-09-10 13:46:28, Gokul Subramanian wrote:
> Hi there.
>
> I am running Eclipse 4.8 (Photon) with Eclim 2.8, and using Neovim 0.3.1 to
> work on a workspace with a few projects (that depend on one another).
>
> JavaSearch (and JavaSearchContext) work well within workspace, but render
> only the declaration in decompiled class files for external JARs. Rather,
> I'd expect to see the method implementations and Javadoc as well. When I
> try to jump to class definition for the same external class from the
> Eclipse UI, it works fine.
>
> Here's a simple project setup.
>
> Project A (having a dependent project B in the same workspace) with a
> .classpath file that looks something like
>
> <?xml version="1.0" encoding="UTF-8"?>
> <classpath>
> <classpathentry kind="con"
> path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
> <classpathentry kind="src" path="src"/>
> <classpathentry kind="src" path="tst"/>
> <classpathentry kind="src" path="build/generated-src"/>
> <classpathentry kind="src" path="/B"/>
> <classpathentry kind="lib" path="/somepath/somelib.jar"
> sourcepath="/someotherpath"/>
>
> I ran Neovim with the -V argument to get logs. This indicated that the
> command being sent to eclimd is an *archive_read*. So, it looks like eclim
> is neglecting the sourcepath attribute in the classpathentry tag of my
> project's classpath.
>
> Is this a bug or am I missing something?
>
> Thanks.
>
>
> --
> You received this message because you are subscribed to the Google Groups "eclim-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to eclim-user+...@googlegroups.com.
> To post to this group, send email to eclim...@googlegroups.com.
> Visit this group at https://groups.google.com/group/eclim-user.
> For more options, visit https://groups.google.com/d/optout.


--
eric

Gokul Subramanian

unread,
Sep 14, 2018, 4:06:37 PM9/14/18
to eclim...@googlegroups.com
Sorry for the confusion. This was because the sourcepath directory was missing the source files. Please consider eclim as working as intended.
GOKUL R. SUBRAMANIAN,
Software Engineer
Reply all
Reply to author
Forward
0 new messages