[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: How do I register my builder with a project?
|
Steve,
You do not need to make a new IProject (Clients are not intended to
implement IProject). You can register your builder with any project simply
by adding it to that project's buildspec. To do this you get the project's
description, add an ICommand identifying your builder into the buildspec of
that description and then set the description back on the project.
Something like:
IProjectDescription description = project.getDescription();
<manipulate the build spec of the description as appropriate>
project.setDescription(description);
This code can be done explicitly by you (i.e., in a new project wizard or
some menu action) or in the configure method of an IProjectNature. Either
way, once the builder is added to the build spec, it will be run whenever a
build is done.
I believe the SiteGeneratorExample has an example of how this is done.
Jeff
"Steven Squire" <steven_squire@xxxxxxxxxxxxxxxxxx> wrote in message
news:9bn13i$r03$1@xxxxxxxxxxxxxxxx
> I've created a new subclass of IncrementalProjectBuilder and added the
> appropriate tags to my plugin.xml file, but it's unclear to me how to
> register this builder with my project. Does a new implementor of IProject
> have to be created or can new builders be registered with existing
> projects?
>
> Thanks,
> -steve
>