code completion for PHP (on OSX) does not work

10 views
Skip to first unread message

Harald Lapp

unread,
Dec 17, 2009, 6:26:29 AM12/17/09
to eclim-user
hello,

i'm not sure, if my problems with code completion have anything to do
with the other OSX problem, therefore i open another thread:

i've written a simple test class, with only some dummy methods and a
test for it:

1: $e = eclim::getInstance();
2: $e->hallo();
3: $e->

code completion (via CTRL+X CTRL+U) works on lines 1 and 2, but breaks
on line 3 -- on line 3 i only get the message "pattern not found"

and that's the output of :messages

system: "/Applications/eclipse/eclim" -Dnailgun.server.port=9091 -
command projects

system: "/Applications/eclipse/eclim" -Dnailgun.server.port=9091 -
command project_open -p "eclim"

Opened project 'eclim'.
E464: Ambiguous use of user-defined command
"~/Documents/workspace/eclim/test.php" 10L, 92C
"~/Documents/workspace/eclim/test.php" line 1 of 10 --10%-- col 1
system: "/Applications/eclipse/eclim" -Dnailgun.server.port=9091 -
command php_co
mplete -p "eclim" -f "test.php" -o 51 -e utf-8


<-harald

Eric Van Dewoestine

unread,
Dec 17, 2009, 10:44:42 AM12/17/09
to eclim...@googlegroups.com

I don't think this is an OSX specific issue.

Can you try running vim with the minimum settings and see if the issue
is still there:

$ vim -u NONE -U NONE --cmd \
"set nocp | sy on | filetype plugin on | ru plugin/eclim.vim" \
test.php

Can you also send me the first few lines of output when running
":version" in vim?

Also, can you send me your test project? I have a php test case that
is similar to yours that doesn't exhibit any issues, but perhaps there
is something in yours that exposes an eclim bug.

--
eric

Harald Lapp

unread,
Dec 18, 2009, 4:58:33 AM12/18/09
to eclim-user

>
> I don't think this is an OSX specific issue.
>
> Can you try running vim with the minimum settings and see if the issue
> is still there:
>
> $ vim -u NONE -U NONE --cmd \
>   "set nocp | sy on | filetype plugin on | ru plugin/eclim.vim" \
>   test.php

yes, it's the same result as before ... "pattern not found"

> Can you also send me the first few lines of output when running
> ":version" in vim?

VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Feb 6 2009 18:23:45)
Included patches: 1-22
Compiled by _w...@b43.apple.com

> Also, can you send me your test project?  I have a php test case that
> is similar to yours that doesn't exhibit any issues, but perhaps there
> is something in yours that exposes an eclim bug.

sure, however -- i now used the code snippet from the PHP
documentation on the eclim site, and it does not work either:

http://screencast.com/t/NTk5ODFlN2Mt

it always works for the completion of the first method (this case:
getName), but not for any further completions. i've also tried the
command eclim is sending on command line -- it does not return
anything:

"/Applications/eclipse/eclim" -Dnailgun.server.port=9091 -command
php_complete -p "eclim" -f "test3.php" -o 124 -e latin1

<-harald

Eric Van Dewoestine

unread,
Dec 18, 2009, 10:52:14 AM12/18/09
to eclim...@googlegroups.com

Can you send me the result of the following:

:echo &ff

If that returns 'mac', can you try setting it to unix and see if that
resolves the issue:

:set ff=unix

Setting the file format to 'mac' on my box seems to reproduce the
issue and also screws up the file validation results. I'll see if I
can resolve this issue and include it with the next release (coming
real soon), but until then just add the above set command to your
~/.vimrc file.

--
eric

Eric Van Dewoestine

unread,
Dec 18, 2009, 11:39:30 AM12/18/09
to eclim...@googlegroups.com
> issue...

I take that last part back. I still can't reproduce the issue with
the mac file format, although it's still worth trying the above to see
if it resolves the issue for you.

Can you send me your test file. Perhaps there is something else
with the file that could be causing issues.

Also, can you try opening that file in the eclipse gui (using their
editor) to see if completion works there? There's the possibility
that the issue has nothing to do with eclim and is instead a pdt
problem.

--
eric

Harald Lapp

unread,
Dec 19, 2009, 3:57:34 AM12/19/09
to eclim-user

On 18 Dez., 17:39, Eric Van Dewoestine <ervan...@gmail.com> wrote:
>
> I take that last part back.  I still can't reproduce the issue with
> the mac file format, although it's still worth trying the above to see
> if it resolves the issue for you.
>
> Can you send me your test file.  Perhaps there is something else
> with the file that could be causing issues.
>
> Also, can you try opening that file in the eclipse gui (using their
> editor) to see if completion works there?  There's the possibility
> that the issue has nothing to do with eclim and is instead a pdt
> problem.

yes, echo &ff shows "unix" for me, too. i tried switching around to
mac and back to unix an nothing changed. i've already tried code
completion in eclipse gui and it worked, however i'm not sure if it
was the exact same test. so i'll try later today again and send you
the file, too. i'll try with linux today, too. i too think, that there
might be some problem with my mac eclipse installation ... :-(.
however, i anyway thought of running eclipse headless on a linux box
and forwarding the port to my mac -- if this is possible ...
nevertheless, would be nice to get this running on osx :)

<-harald

Harald Lapp

unread,
Dec 19, 2009, 3:04:17 PM12/19/09
to eclim-user
things are getting even more strange :-( ... i've deleted all files
from the project -- there where some from multiple tests, with similar
class names (class Test in about 5 different php files) and left only
one file. now completion seems to almost work. however, sometimes i
have to press CTRL+X/CTRL+U twice, first time: "pattern not found",
second time works -- maybe there's some time lag? however: i think i
have to test with a "real life project" and see, how this works out.
could there -- theoretically -- be a problem with multiple files
having the same class name in a project? if so, i think it would be
PDT's fault and would have to say sorry, for all the trouble :)

<-harald

Harald Lapp

unread,
Dec 21, 2009, 2:42:33 AM12/21/09
to eclim-user
eric,

sorry for all the trouble -- i think now, after cleaning up
everything, it seems to work ... i still don't exactly know what
happened, though :o(. i'll now start looking into what's happening
behind the scenes, to make this very cool thing work with textmate.

thanks very much for your support,

<-harald

Gerhard Siegesmund

unread,
Dec 21, 2009, 3:25:52 AM12/21/09
to eclim...@googlegroups.com
Hello Eric

I think, I found a bug with your new shared projecttree instances in
version 1.5.4. If the project you are in contains a minus "-" in the
directory name, this results in an vim errormessage:

Error detected while processing function
eclim#project#tree#ProjectTree..<SNR>69_OpenTree:
line 61:
E461: Illegal variable name:
eclim_project_tree_instanceTest-Project

Greetings

--
cu
--== Jerri ==--
Homepage: http://www.jerri.de/ ICQ: 54160208
Public PGP Key: http://www.jerri.de/jerris_public_key.asc

signature.asc

Eric Van Dewoestine

unread,
Dec 21, 2009, 10:31:14 AM12/21/09
to eclim...@googlegroups.com
On Sun, Dec 20, 2009 at 11:42:33PM -0800, Harald Lapp wrote:
> eric,
>
> sorry for all the trouble -- i think now, after cleaning up
> everything, it seems to work ... i still don't exactly know what
> happened, though :o(. i'll now start looking into what's happening
> behind the scenes, to make this very cool thing work with textmate.

Very good to hear. If the problem re-surfaces, feel free to send me
an example project which re-produces the issue and I'll try to
investigate the situation more.

--
eric

Reply all
Reply to author
Forward
0 new messages