LWJGL Eclipse Plugin available?

Started by Jens v.P., July 18, 2007, 14:07:28

Previous topic - Next topic

Jens v.P.

Hi,

I'm currently developing an Eclipse plugin using LWJGL. For that purpose I'm wondering whether a LWJGL Eclipse plug in already exists? I've already created my own LWJGL plugin which I could make public (or which can be used as a starting point). It may be a good idea if an "official" LWJGL plugin could be created to avoid people of inventing the wheel over and over again.

My "plugin" consists of  actually four plugins:
- jars and native libs
- documentation (javadoc)
- sources
- test plugin providing a simple LWJGL based view

I had some trouble with automatically resolving the native libs, in my current version LWJGL works without specifying any additional paths (suc has java.library.path), it's running simply after copying the plugins into Eclipse's plugin folder. At least under Windows and Mac OS X....

Is there any interest in creating such an "official" plugin -- or is it even available yet?

Jens

Evil-Devil

What exactly does the plugin do? I don't see any reason for having a plugin as you only have to create a Eclipse Variable with the library informations stored and attach to your current project.

Jens v.P.

A plugin will make installation easier if you provide or develop a plugin using LWJGL. If you have no plugin, a user will have to
- install LWJGL manually (i.e. download and extract somewhere)
- set the variable, and attach the variable to every new project
- set java.library.path or something for the native libraries

With the plugin, the user has simply to install the plugin, i.e. download the plugin and extract/copy it to the plugin folder of eclipse. Since (in case of my plugin) the documentation is also provided as a plugin, the javadoc is directly available in Eclipse without further configurations. You can also use the Eclipse dependency mechanism for different versions etc.

A plugin is not a big deal, I know. But it makes things easier. No classpath struggle, no variables etc. Just have a look at this forum: There are several postings with exactly these problems. Of course, a plugin is only good for Eclipse and Eclipse plug in development ;-) I only thought that it might be a good idea if there is a "official" LWJGL plugin, because otherwise every Eclipse plugin developer creates her or his own plugin, just like me (and I have seen other plugins with LWJGL stuff as well...).

Evil-Devil

Yea, your cases make sense. Is the plugin an extension for the JDT or how does it fit into the eclipse JDT workflow?

Jens v.P.

It's a simple plugin providing the LWJGL jars.

To give you an impression, I make my current version temporarily available. You can download it under

http://www.informatik.fernuni-hagen.de/import/pi3/jens/gef3d/temp/lwjgl-plugins.zip

This archive is no longer available, see posting below!


The zip contains four plugins:
- org.lwjgl_1.1.0 -- the current lwjgl version, e.g. jars and native libs. I've added an Activator which
  sets org.lwjgl.librarypath to the appropriate path. It works with Windows and Mac OS X, I have
  not Linux to test it....
  If you develop a plugin using LWJGL, you have to simply add this plugin to your required bundles in
  the manifest file -- that's it.
- org.lwjgl.source_1.1.0 -- contains the source code. The sources should be automatically retrieved
  if you use the first plugin, but this is not working yet. Must have missed something...
- org.lwjgl.doc_1.1.0 -- containts the javadocs of LWJGL and a simple help page linking to org.lwjgl.
  The javadocs are automatically retrieved (if the first plugin is used), I've tested that with Eclipse 3.3
- org.lwjgl.test_1.1.0 -- provides a simple test view (Window/Show View/Others/LWJGL Test View).
  It draws a torus to check whether everything is working.
  The LWJGL code is taken from Snippet 195
  (http://www.eclipse.org/swt/opengl/)

I will remove the zip within a few days from now -- if you don't like it ;-) Otherwise it could be used as a starting point for an "official" lwjgl plugin...

Odeamus

LWJGL Eclipse plug-in would be great. I tried to get Matzon to include it to the build process, but didn't succeed. :(
But that was long ago. I still think that Java OpenGL games built on the Eclipse Platform would rock. Unfortunately I haven't done any Java coding at home any more. Got swept up in D. ;)

Quote- org.lwjgl_1.1.0 -- the current lwjgl version, e.g. jars and native libs. I've added an Activator which
  sets org.lwjgl.librarypath to the appropriate path. It works with Windows and Mac OS X, I have
  not Linux to test it....
  If you develop a plugin using LWJGL, you have to simply add this plugin to your required bundles in
  the manifest file -- that's it.

Have you thought about putting the platform specific stuff in fragments? I did that back when I had(have still somewhere) my own LWJGL Eclipse plug-in. That way the user doesn't have to download binaries for platforms he/she doesn't need.
Just a thought.

Jens v.P.

I had put the platform specific stuff in fragments, but I changed it for two reasons:


  • it's much easier simply installing one plugin instead of two, the size of the native libraries is not too big. Especially you have no trouble with different versions of the jars and the native libraries if you install simply one plugin with matching versions (this issue appeared in some postings in the forum here). I think it should be kept as simple as possible.
  • setting the library path is much easier w/o fragments


Odeamus

Quote from: jpilgrim on July 21, 2007, 13:54:05
I had put the platform specific stuff in fragments, but I changed it for two reasons:


  • it's much easier simply installing one plugin instead of two, the size of the native libraries is not too big. Especially you have no trouble with different versions of the jars and the native libraries if you install simply one plugin with matching versions (this issue appeared in some postings in the forum here). I think it should be kept as simple as possible.
  • setting the library path is much easier w/o fragments

1. You are correct that it makes things easier for the plug-in creator, but the end result will be the same for the user, except the user needs to download a bigger plug-in.

2. I didn't need to set any library paths when the shared libraries where in the fragments root, if my memory serves. There's some magic going on which puts them in the search path automagically.

O.

Matzon

I would very much like an Eclipse plugin - accessible through the Update manager using the remote path.
As odeamus mentioned we were in talks once, but somehow that ball got dropped.
If this plugin is buildable using ant (to minimize the already somewhat cumbersome build process) then that would be prefered.

Jens v.P.

@Odeamus: I don't think that size is really a matter here. The sizes of the libraries are 700 (Mac, Linux) and 300 kByte for Windows, so approximately 1 MB overhead is loaded. Apart from that I had problems with setting up the library path and fragments on Mac OS X. It worked on Windows, but not on Mac OS X. Thus I merged all native libraries into one plugin. The LWJGL archives also contain all native libraries.

@Matzon: I can add a feature (necessary for using the update mechanism), create a build.xml and send everything to you. You can then set up the update site ;-) Still: Someone has to test it under Linux...

Matzon


Evil-Devil

Do I really have to upgrade to Eclipse 3.3 or am I just to dumb to get it work under 3.2. Maybe I've overseen something, plz gimme any hints on how to use it, if it is runnable unter 3.2.

Evil

Jens v.P.

The version I made available above should also run under Eclipse 3.2. The source code plugin contains a bug and doesn't work as expected. I've tested the plugin under Eclipse 3.3 (Windows) and Eclipse 3.2 (Mac OS X).

MuesliMan

As i just wanted to build one by myself, I am glad to use yours.
Although it would be great to have an update site for this.


Evil-Devil

Quote from: jpilgrim on July 25, 2007, 16:58:01
The version I made available above should also run under Eclipse 3.2. The source code plugin contains a bug and doesn't work as expected. I've tested the plugin under Eclipse 3.3 (Windows) and Eclipse 3.2 (Mac OS X).
Ok, but how do I use it then? I haven't found any Menu/Settings Entry and have no idea how to use it.