<plugin>
<extension
id="com.dubture.symfony2.core.nature"
point="org.eclipse.core.resources.natures">
<runtime>
<run
class="com.dubture.symfony2.core.SymfonyNature">
</run>
</runtime>
</extension>
<extension
point="org.eclipse.dltk.core.buildParticipant">
<buildParticipant
class="com.dubture.symfony2.internal.core.builder.SymfonyBuildParticipantFactory"
id="com.dubture.symfony2.core.buildParticipant.parser"
name="Symfony 2 Parser"
nature="org.eclipse.php.core.PHPNature">
</buildParticipant>
</extension>
<extension
id="SymfonBuilder"
name="Symfony Yaml Builder"
point="org.eclipse.core.resources.builders">
<builder
callOnEmptyDelta="true"
hasNature="true">
<run
class="com.dubture.symfony2.internal.core.builder.SymfonyYamlBuilder">
</run>
</builder>
</extension>
</plugin>
The Nature extends ScriptNature, and adds the builder in the configure() method like this:
IProjectDescription desc = project.getDescription();
ICommand[] commands = desc.getBuildSpec();
for (int i = 0; i < commands.length; ++i) {
if (commands[i].getBuilderName().equals(SymfonyYamlBuilder.BUILDER_ID)) {
return;
}
}
ICommand[] newCommands = new ICommand[commands.length + 1];
System.arraycopy(commands, 0, newCommands, 0, commands.length);
ICommand command = desc.newCommand();
command.setBuilderName(SymfonyYamlBuilder.BUILDER_ID);
newCommands[newCommands.length - 1] = command;
desc.setBuildSpec(newCommands);
project.setDescription(desc, null);
Has anyone a hint why the builder can't be loaded?
thanks!
-robert