|
Re: Builder Trouble [message #2760 is a reply to message #2734] |
Tue, 22 April 2003 15:18 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: genadyb.inter.net.il
I think you need to have it associated with a nature, but you can still
have it as the first builder in the list.
Genady
Paul Glezen wrote:
> Hi Folks,
>
> I'm trying to programmatically install a builder into the list of
> builders for a JDT project. It seems that the builder gets inserted
> into the build list ok. But when I try to run a build, I get the
> following error.
>
> ================ Eclipse Error Log ===============================
> !ENTRY org.eclipse.core.resources 2 1 Apr 17, 2003 20:28:24.989
> !MESSAGE Skipping builder com.abc.plugins.builders.PropSelect for
> project KillerProperties. Either the builder is missing from the
> install, or it belongs to a project nature that is missing or disabled.
> ================ Eclipse Error Log ===============================
>
> My builder is not associated with a project nature. Is is necessary to
> associate a builder with a nature (as described in "Project Builders and
> Natures") in order to have a builder actually run?
>
> That article describes Nature dependencies whereby one nature depending
> on another nature would cause its builder to run after the dependency's
> builder. In my case, I would like my builder to run BEFORE the JDT
> builders. I didn't notice a method to enforce this other than inserting
> the builder as first in the list.
>
> - Paul
>
|
|
|
|
Re: Builder Trouble [message #4723 is a reply to message #4371] |
Tue, 22 April 2003 22:13 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: genadyb.inter.net.il
You should do it programmatically. Here is what I do:
IProjectDescription descr = project.getProject().getDescription();
String natures[] = descr.getNatureIds();
for (int i = 0; i < natures.length; i++) {
if (natures[i].equals(RMIProjectNature.NATURE_ID)) {
return;
}
}
String newNatures[] = new String[natures.length+1];
System.arraycopy(natures, 0, newNatures, 0, natures.length);
newNatures[natures.length] = RMIProjectNature.NATURE_ID;
descr.setNatureIds(newNatures);
project.getProject().setDescription(descr, null);
and the nature class has:
public void configure() throws CoreException {
IProjectDescription descr = project.getProject().getDescription();
ICommand rmiBuilder = descr.newCommand();
rmiBuilder.setBuilderName(RMIBuilder.BUILDER_ID);
ICommand builders[] = descr.getBuildSpec();
for (int i = 0; i < builders.length; i++) {
if (builders[i].getBuilderName().equals(RMIBuilder.BUILDER_ID)) {
return;
}
}
ICommand newBuilders[] = new ICommand[builders.length+1];
System.arraycopy(builders, 0, newBuilders, 0, builders.length);
newBuilders[builders.length] = rmiBuilder;
descr.setBuildSpec(newBuilders);
project.setDescription(descr, null);
}
Paul Glezen wrote:
> Cool. I can do that. When I manually install an external build tool
> using the project's property dialog, does it get a nature associated
> with it under the covers? I guess "no" because the association is from
> the nature to the builder. I don't see a way to associate a builder
> with a nature dynamically.
>
> - Paul
>
> Genady wrote:
>
>> I think you need to have it associated with a nature, but you can
>> still have it as the first builder in the list.
>
>
>
|
|
|
Re: Builder Trouble [message #7823 is a reply to message #2734] |
Wed, 23 April 2003 21:21 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: John_Arthorne.oti.com_
Your builder does not HAVE to belong to a nature. You can create an
install a builder without any nature being involved. However, you
generally should associate a nature, because:
- natures give the configure() and deconfigure() lifecycle hooks that
can be used for installing and removing your builder.
- natures can depend on other natures. You can use these dependencies
to ensure your builder is installed after the JDT builder by making your
nature depend on the JDT nature.
I suspect your error is actually due to an incorrectly specified builder
id. The builder Id (name) used in the build spec must be the same as
the fully qualified id of your builder's extension. If plugin com.xyz
installs a builder with extension id ="PropSelect", then the "builder
name" in the build command must be "com.xyz.PropSelect". If this didn't
make sense, just post your plugin.xml and I will tell you what your
builder name in the build spec should be.
--
Paul Glezen wrote:
> Hi Folks,
>
> I'm trying to programmatically install a builder into the list of
> builders for a JDT project. It seems that the builder gets inserted
> into the build list ok. But when I try to run a build, I get the
> following error.
>
> ================ Eclipse Error Log ===============================
> !ENTRY org.eclipse.core.resources 2 1 Apr 17, 2003 20:28:24.989
> !MESSAGE Skipping builder com.abc.plugins.builders.PropSelect for
> project KillerProperties. Either the builder is missing from the
> install, or it belongs to a project nature that is missing or disabled.
> ================ Eclipse Error Log ===============================
>
> My builder is not associated with a project nature. Is is necessary to
> associate a builder with a nature (as described in "Project Builders and
> Natures") in order to have a builder actually run?
>
> That article describes Nature dependencies whereby one nature depending
> on another nature would cause its builder to run after the dependency's
> builder. In my case, I would like my builder to run BEFORE the JDT
> builders. I didn't notice a method to enforce this other than inserting
> the builder as first in the list.
>
> - Paul
>
|
|
|
Powered by
FUDForum. Page generated in 0.04217 seconds