Eclim does not recognize package "offset" directory

59 views
Skip to first unread message

Andrew Ho

unread,
Jun 4, 2013, 7:49:37 PM6/4/13
to eclim...@googlegroups.com
Hey everyone,
I'm trying to get eclim up and running for headless mode. I'm working on Ubuntu 12.04

I'm working on a rather large project which works fine in Eclipse Indigo.
I haven't generated my own .project file as it was working fine when I run through eclipse GUI.

In a file c.java,
projectroot/src/a/b/c.java

The file starts off:
package a.b

However, when I run eclim and try to use completion, it complains along the lines of:
The declared package "a.b" does not match the expected package "src.a.b"

Any idea what is going wrong here? Again, if I run Eclipse, the project works just fine.

Thanks,
andrew

Eric Van Dewoestine

unread,
Jun 4, 2013, 7:56:22 PM6/4/13
to eclim...@googlegroups.com
On 2013-06-04 16:49:37, Andrew Ho wrote:
> Hey everyone,
> I'm trying to get eclim up and running for headless mode. I'm working on
> Ubuntu 12.04
>
> I'm working on a rather large project which works fine in Eclipse Indigo.
> I haven't generated my own .project file as it was working fine when I run
> through eclipse GUI.
>
> In a file c.java,
> projectroot/src/a/b/c.java
>
> The file starts off:
> package a.b
>
> However, when I run eclim and try to use completion, it complains along the
> lines of:
> The declared package "a.b" does not match the expected package "src.a.b"

Sounds like your project's .classpath file has a kind="src" entry
pointing at your project root instead of at path="src".

Can you post your .classpath file?

> Any idea what is going wrong here? Again, if I run Eclipse, the project
> works just fine.

That's interesting. Eclipse should report the same error.

> Thanks,
> andrew

--
eric

Andrew Ho

unread,
Jun 4, 2013, 8:44:44 PM6/4/13
to eclim...@googlegroups.com
Hi Eric,
Thanks for the reply. I just managed to figure it out, but I'm not sure if it's a bug or not.
It turns out that eclim does not like the kind="src" line to be in the beginning of classpath definition

This .classpath fails:
<?xml version...>
<classpath>
  <classpathentry kind="src" path="src" />
  <classpathentry kind="con" path="..." />
  <a bunch more classpath entries>
</classpath>

However, this one works:
<?xml version...>
<classpath>
  <classpathentry kind="con" path="..." />
  <a bunch more classpath entries>
  <classpathentry kind="src" path="src" />
</classpath>


I have no idea why one should fail and one should work.

thanks,
andrew

Eric Van Dewoestine

unread,
Jun 15, 2013, 7:17:07 AM6/15/13
to eclim...@googlegroups.com
On 2013-06-04 17:44:44, Andrew Ho wrote:
> Hi Eric,
> Thanks for the reply. I just managed to figure it out, but I'm not sure if
> it's a bug or not.
> It turns out that eclim does not like the kind="src" line to be in the
> beginning of classpath definition
>
> This .classpath fails:
> <?xml version...>
> <classpath>
> <classpathentry kind="src" path="src" />
> <classpathentry kind="con" path="..." />
> <a bunch more classpath entries>
> </classpath>
>
> However, this one works:
> <?xml version...>
> <classpath>
> <classpathentry kind="con" path="..." />
> <a bunch more classpath entries>
> <classpathentry kind="src" path="src" />
> </classpath>
>
>
> I have no idea why one should fail and one should work.
>
> thanks,
> andrew

I finally got a bit of time to look into this, but right away I
noticed that my unittest project has its src entries at the top of the
classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-linked"/>
<classpathentry kind="lib" path="lib/junit.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

Can you reproduce this problem with a small sample project?
> --
> 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 http://groups.google.com/group/eclim-user?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
eric
Reply all
Reply to author
Forward
0 new messages