[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Generating an Eclipse project

Hi, all.

I have been just bouncing off of this task.

We have something near a hundred inter-related projects, with ANT build 
files to generate them all in the proper order.  These ant files are 
generated via XSLT from a project list that lists the libraries (in the 
libs folder) and the other projects (all rooted at the same point) that 
are needed.

I would love to generate eclipse projects that understand these 
dependencies.  At first, I tried using XSLT, and succeeded in getting 
.classpath and .ini files produced in the proper places.  Very cool, as 
then I could open any one project, and have it work.

What this lacked, of course, was co-ordination.  Project B depends on 
project A, but Eclipse did not know that, as it was not stored in the 
classpath file I created.  It knew about the output jar, but not the 
actual Eclipse project.

After discussion here about the opaque binary project format, I have 
been convinced that if I want this to work, I am going to have to use 
Eclipse tools to do it.  Both Darin and Martin suggested looking at the 
org.eclipse.jdt.debug.tests plugin, and the JavaProjectHelper and 
ProjectCreationDecorator.

I must be just completely out of it, as I cannot figure out which jars 
to put in my classpath, and how to make the needed calls, for my snippet 
of Java code to generated the hundred some odd Eclipse projects.  Anyone 
care to give a few pointers?

My intention is simple: I will write a small bit of Java code that reads 
the project list and that calls the needed Eclipse code to generate each 
project, adding in classpath and project dependencies one by one.  This 
will be a destructive over-write - projects will, when this is run, end 
up with the current deps from cvs, and will forget prior settings.

Scott