Contribute to MacVim, OS X Vim, and Eclim 1.4.5?

76 views
Skip to first unread message

pr3d4t0r

unread,
Apr 18, 2009, 8:26:55 PM4/18/09
to eclim-dev
Greetings.

I am working on getting Eclim to work under OS X Leopard; it took me
an hour of experimentation with the environment variables and some of
the shell scripts. Before I go any further, is anyone else working on
this? Where is that project name?

So far Google isn't very helpful and all the information I'm finding
about Eclim in the official site appears to be Linux or Windows. If
no one else is working on this, I would like to start such a project
and contribute the shell scripts and other stuff I've been working on.

Thanks in advance and have a great weekend,

Eugene
http://ciurana.eu/

Eric Van Dewoestine

unread,
Apr 18, 2009, 9:15:02 PM4/18/09
to ecli...@googlegroups.com
On Sat, Apr 18, 2009 at 5:26 PM, pr3d4t0r <ciu...@gmail.com> wrote:
>
> Greetings.
>
> I am working on getting Eclim to work under OS X Leopard; it took me
> an hour of experimentation with the environment variables and some of
> the shell scripts.  Before I go any further, is anyone else working on
> this?  Where is that project name?

What portion of eclim are you having trouble getting working?
Unfortunately I don't have macs available to test with, but I'm almost
certain that there are users using the headless eclimd interface on
macs. The only portion of eclim that I'm pretty sure won't work on a
mac is the support for embedding gvim into eclipse.

> So far Google isn't very helpful and all the information I'm finding
> about Eclim in the official site appears to be Linux or Windows.

Yeah, those are the two environments which I have access to, so those
are the ones that are fully supported. However, I have had mac users
report a minor issue here and there leading me to believe that they
have been able to get eclim working.

> If no one else is working on this, I would like to start such a
> project and contribute the shell scripts and other stuff I've been
> working on.

Any contributions would be more than welcome. For starters though,
I'd love to get some details on what issues you've come across.

--
eric

pr3d4t0r

unread,
Apr 18, 2009, 10:05:13 PM4/18/09
to eclim-dev
Hi Eric!

Thanks for the quick reply.

On Apr 18, 6:15 pm, Eric Van Dewoestine <ervan...@gmail.com> wrote:

> What portion of eclim are you having trouble getting working?
> Unfortunately I don't have macs available to test with, but I'm almost
> certain that there are users using the headless eclimd interface on
> macs.  The only portion of eclim that I'm pretty sure won't work on a
> mac is the support for embedding gvim into eclipse.

The environment variables don't recognize the /Applications/Eclipse
IDE directory as $ECLIPSE_HOME because it has an embedded space in the
middle and the shell scripts aren't accounting for it (e.g. $0 instead
of "$0"). I modified eclimd to start correctly and moved it to
$ECLIPSE_HOME, and changed `command $arg` into $(command "$arg") and
so on. It starts now.

Once I got this to start, then I get:

java.lang.RuntimeException: Application
"org.eclim.application_headless" could not be found in the registry.
The applications available are: org.eclipse.ant.core.antRunner,
org.eclipse.ant.ui.antRunner, org.eclipse.equinox.app.error,
org.eclipse.equinox.p2.artifact.repository.mirrorApplication,
org.eclipse.equinox.p2.director.app.application,
org.eclipse.equinox.p2.metadata.generator.EclipseGenerator,
org.eclipse.equinox.p2.metadata.repository.mirrorApplication,
org.eclipse.equinox.p2.reconciler.application,
org.eclipse.help.base.infocenterApplication,
org.eclipse.help.base.helpApplication,
org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild,
org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.ui.ide.workbench,
org.eclipse.update.core.standaloneUpdate,
org.eclipse.update.core.siteOptimizer.
at
org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp
(EclipseAppContainer.java:242)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run
(MainApplicationLauncher.java:29)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication
(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:386)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run
(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:
549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)

It appears that the build.xml that comes with Eclim builds and
installs this. I am working in figuring out Ant now (I'm a make/Maven
guy) and trying to build Eclim from it.

The Ant script fails because the DLTK core isn't installed on the
machine, so I just got that from eclipse.org (latest version) and put
it in $ECLIPSE_HOME/plugins -- Ant is still not picking it up but I
just started on this, so I may need to move it or link it to somewhere
under the Eclip build directory (lib?).

> Yeah, those are the two environments which I have access to, so those
> are the ones that are fully supported.  However, I have had mac users
> report a minor issue here and there leading me to believe that they
> have been able to get eclim working.

I spoke with a couple of hardcore Apache guys who tried and they gave
up earlier; I didn't find anything in Google so far. If you know
anyone who's got it working... cool! Please put us in touch. And
let's hope that they're reading this.

> Any contributions would be more than welcome.  For starters though,
> I'd love to get some details on what issues you've come across.

So far this is what I've got. I can start Eclim until it dies because
of those missing classes, I'm trying to build, etc. I'll keep you
posted.

Is there an IRC channel where you and other Eclim users/developers
meet?

I'm heading out now, will check on this later tonight or sometime
tomorrow.

Thanks and have a great wknd,

pr3d4t0r
http://eugeneciurana.com

Eric Van Dewoestine

unread,
Apr 18, 2009, 11:50:11 PM4/18/09
to ecli...@googlegroups.com
On Sat, Apr 18, 2009 at 7:05 PM, pr3d4t0r <ciu...@gmail.com> wrote:
>
> Hi Eric!
>
> Thanks for the quick reply.
>
> On Apr 18, 6:15 pm, Eric Van Dewoestine <ervan...@gmail.com> wrote:
>
>> What portion of eclim are you having trouble getting working?
>> Unfortunately I don't have macs available to test with, but I'm almost
>> certain that there are users using the headless eclimd interface on
>> macs.  The only portion of eclim that I'm pretty sure won't work on a
>> mac is the support for embedding gvim into eclipse.
>
> The environment variables don't recognize the /Applications/Eclipse
> IDE directory as $ECLIPSE_HOME because it has an embedded space in the
> middle and the shell scripts aren't accounting for it (e.g. $0 instead
> of "$0").  I modified eclimd to start correctly and moved it to
> $ECLIPSE_HOME, and changed `command $arg` into $(command "$arg") and
> so on.  It starts now.

Ah, ok. I'll be sure to set up a test eclipse install containing a
space and apply your changes.

This is one of those eclipse issues that comes up very seldom and is
very difficult to diagnose. You can try looking at the eclipse log
(workspace/.metadata/.log) to see if it has any useful info, but for
this particular error, I doubt it will.

> It appears that the build.xml that comes with Eclim builds and
> installs this.  I am working in figuring out Ant now (I'm a make/Maven
> guy) and trying to build Eclim from it.
>
> The Ant script fails because the DLTK core isn't installed on the
> machine, so I just got that from eclipse.org (latest version) and put
> it in $ECLIPSE_HOME/plugins -- Ant is still not picking it up but I
> just started on this, so I may need to move it or link it to somewhere
> under the Eclip build directory (lib?).

You don't actually need the dltk unless you want to build the support
for php. By default the build script will attempt to build all the
eclim plugins, but you can specify which ones you want built:

$ ant -Dplugins=ant,jdt

The developers guide[1] has additional details.

>> Yeah, those are the two environments which I have access to, so those
>> are the ones that are fully supported.  However, I have had mac users
>> report a minor issue here and there leading me to believe that they
>> have been able to get eclim working.
>
> I spoke with a couple of hardcore Apache guys who tried and they gave
> up earlier; I didn't find anything in Google so far.  If you know
> anyone who's got it working... cool!  Please put us in touch.  And
> let's hope that they're reading this.

Where did you install eclipse from? You might want to try installing
one from eclipse.org and installing eclim against that.

>> Any contributions would be more than welcome.  For starters though,
>> I'd love to get some details on what issues you've come across.
>
> So far this is what I've got.  I can start Eclim until it dies because
> of those missing classes, I'm trying to build, etc.  I'll keep you
> posted.
>
> Is there an IRC channel where you and other Eclim users/developers
> meet?

No, currently email is my preferred means of contact, mainly so I can
avoid interruptions while at work. When I'm at home my time in front
of the computer is pretty erratic, so again, email ends up being more
convenient. I suppose though, there could be occasions like this were
an IRC channel could be quite helpful. For some reason I've never
been much of an IRC person, but perhaps I should get more acquainted
with it.

> I'm heading out now, will check on this later tonight or sometime
> tomorrow.
>
> Thanks and have a great wknd,

You very welcome, and be sure to have a great weekend yourself.

[1] http://eclim.sourceforge.net/guides/development.html

--
eric

pr3d4t0r

unread,
Apr 19, 2009, 11:16:22 AM4/19/09
to eclim-dev
On Apr 18, 8:50 pm, Eric Van Dewoestine <ervan...@gmail.com> wrote:
> On Sat, Apr 18, 2009 at 7:05 PM, pr3d4t0r <ciur...@gmail.com> wrote:
>
> Ah, ok.  I'll be sure to set up a test eclipse install containing a
> space and apply your changes.
>
> > Once I got this to start, then I get:
>
> > java.lang.RuntimeException: Application
> > "org.eclim.application_headless" could not be found in the registry.
> > The applications available are: org.eclipse.ant.core.antRunner,
>
> This is one of those eclipse issues that comes up very seldom and is
> very difficult to diagnose.  You can try looking at the eclipse log
> (workspace/.metadata/.log) to see if it has any useful info, but for
> this particular error, I doubt it will.

I'm working on that now. I got this to build -- updates posted here
coming soon.

> You don't actually need the dltk unless you want to build the support
> for php.  By default the build script will attempt to build all the
> eclim plugins, but you can specify which ones you want built:
>
>   $ ant -Dplugins=ant,jdt

Awesome -- I just build with ant,jdt,maven ==> it built the first
time. I'm looking at /Applications/Eclipse IDE/eclimd and working out
the changes I made yesterday, going again with a clean installation.

> Where did you install eclipse from?  You might want to try installing
> one from eclipse.org and installing eclim against that.

This came from eclipse.org -- it's the standard installation for OS
X. Programs have different locations and permissions than on Linux,
etc. etc. That's what I'm sorting out now.

Somewhat hypothetical question: rather than trying to make yet
another special case for the eclimd shell script (and possibly the
others in your distribution) like the one you have for Gentoo, would
it make sense to have a separate set of Mac-specific scripts? For
example: MacVim is gVim's cousin. You may start it from Finder *or*
from the command line. If the latter, then it comes with its own
script, /usr/bin/mvim. I think I'll have to do enough surgery to the
default eclimd script that it may justify this. We could have meclimd
<-- Mac, eclimd <-- Linux, and something like:

# In eclimd:
if [[ $(uname -s) = "Darwin" ]]
then
echo "You're on a Mac -- use $ECLIPSE_HOME/meclimd instead.
Thanks."
exit 42
fi
.
.

I can build the logic into eclimd and so on if you'd prefer to keep
everything with the same name, and then define sh functions for system-
specific behaviour, etc.

Cheers,

pr3d4t0r

pr3d4t0r

unread,
Apr 19, 2009, 1:08:23 PM4/19/09
to eclim-dev
Making progress with the shell scripts...

2009-04-19 10:04:14,467 INFO
[org.eclim.eclipse.AbstractEclimApplication] Eclim Server Started on
port 9091.

I will clean the scripts up and wait for directions on whether to have
a single eclim .sh script or a separate one for mvim that takes into
account the Mac's file system layout.

Cheers!

pr3d4t0r
http://www.istheserverup.com

Eric Van Dewoestine

unread,
Apr 19, 2009, 4:57:13 PM4/19/09
to ecli...@googlegroups.com
On Sun, Apr 19, 2009 at 10:08 AM, pr3d4t0r <ciu...@gmail.com> wrote:
>
> Making progress with the shell scripts...
>
> 2009-04-19 10:04:14,467 INFO
> [org.eclim.eclipse.AbstractEclimApplication] Eclim Server Started on
> port 9091.
>
> I will clean the scripts up and wait for directions on whether to have
> a single eclim .sh script or a separate one for mvim that takes into
> account the Mac's file system layout.

I would prefer to have a single eclimd script, but I'd have to first
see how many changes you ended up having to make for use on your mac.
I already went ahead and updated the current eclimd script to handle
an eclipse directory containing a space and did some general
refactoring to move various blocks of code into functions to break up
things up and hopeful make the whole thing a bit more readable.

Can you either apply your changes to the new script and send me a copy
or just send me a copy of what you have now so that I can evaluate
whether or not the mac needs its own eclimd start script?

--
eric

Reply all
Reply to author
Forward
0 new messages