Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » How to extend JavaProjectWizard?
How to extend JavaProjectWizard? [message #296523] Fri, 23 December 2005 06:56 Go to next message
Eclipse UserFriend
Originally posted by: wjancz.\/\/asko.pl (change \/\/ with w)

Hello.
I don't know if it is correct group to ask (if not please relay me to
correct).

I need to extend wizard which creates new java project. how to do this if
most of classes used in this wizard are internal ?

What i want to do is after creating new java project create programatically
some packages in this project and generate some classes templates and
interfaces.
This should work as creating SPECIFIC java project in which user should
implement some interfaces and implement generated methods in classes.

I want to add new wizard - SpecialJavaProjectWizard which will extends
Eclipse, so users shoul use this wizard to write classes used in my Eclipse
plugin (those classes should implement special Interface) so the easiest way
is to generate code template and put in into class and let user implement
this.

I don't know if you understand what i want to do... but if... please help :)

WojT

P.S. Sory for my english...
Re: How to extend JavaProjectWizard? [message #296527 is a reply to message #296523] Fri, 23 December 2005 08:52 Go to previous message
Eclipse UserFriend
> I don't know if it is correct group to ask (if not please relay me to
> correct).

The eclipse.tools.jdt group seems better for this.

> I need to extend wizard which creates new java project. how to do this if
> most of classes used in this wizard are internal ?

I try to do the same at the moment.

> What i want to do is after creating new java project create
> programatically
> some packages in this project and generate some classes templates and
> interfaces.

I made a INewWizard extension, added my own pages and added the page new
JavaCapabilityConfigurationPage(); This class has some nice methods which
I hope will create and configure a java project. These methods are
createProject(...) and configureJavaProject(...).

To add a file to a project I use the following code (stripped):

IFile file = getNewProject().getFile("build.xml");
try {
file.create(inputStream,true,null);
}
catch (CoreException exception) {
return;
}

getNewProject() returns an IProject instance.

If your want to process your template with the template engine velocity my
post "Re: Get classes from another Bundle without importing them in the
Manifest" may be of interest. It describes how to setup a velocity
template as a plugin.


Regard,

Ricky
Previous Topic:Stop run application
Next Topic:Stale plugin.jar
Goto Forum:
  


Current Time: Fri Jul 18 14:03:25 EDT 2025

Powered by FUDForum. Page generated in 0.04892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top