use of org.eclipse.core.resources.ICommand in project XobotOS by xamarin.
the class SharpenNature method newBuilderCommand.
private ICommand newBuilderCommand(IProjectDescription desc) {
ICommand command = desc.newCommand();
command.setBuilderName(SharpenBuilder.BUILDER_ID);
return command;
}
use of org.eclipse.core.resources.ICommand in project XobotOS by xamarin.
the class SharpenNature method deconfigure.
/*
* (non-Javadoc)
*
* @see org.eclipse.core.resources.IProjectNature#deconfigure()
*/
public void deconfigure() throws CoreException {
IProjectDescription description = getProject().getDescription();
ICommand[] commands = description.getBuildSpec();
for (int i = 0; i < commands.length; ++i) {
if (commands[i].getBuilderName().equals(SharpenBuilder.BUILDER_ID)) {
ICommand[] newCommands = new ICommand[commands.length - 1];
System.arraycopy(commands, 0, newCommands, 0, i);
System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
description.setBuildSpec(newCommands);
return;
}
}
}
use of org.eclipse.core.resources.ICommand in project XobotOS by xamarin.
the class SharpenNature method configure.
/*
* (non-Javadoc)
*
* @see org.eclipse.core.resources.IProjectNature#configure()
*/
public void configure() throws CoreException {
IProjectDescription desc = _project.getDescription();
ICommand[] commands = desc.getBuildSpec();
if (containsBuilderCommand(commands))
return;
desc.setBuildSpec(append(commands, newBuilderCommand(desc)));
_project.setDescription(desc, null);
}
use of org.eclipse.core.resources.ICommand in project linuxtools by eclipse.
the class RpmlintNature method configure.
@Override
public void configure() throws CoreException {
IProjectDescription desc = project.getDescription();
ICommand[] commands = desc.getBuildSpec();
for (ICommand command : commands) {
if (command.getBuilderName().equals(RpmlintBuilder.BUILDER_ID)) {
return;
}
}
ICommand[] newCommands = new ICommand[commands.length + 1];
System.arraycopy(commands, 0, newCommands, 0, commands.length);
ICommand command = desc.newCommand();
command.setBuilderName(RpmlintBuilder.BUILDER_ID);
newCommands[newCommands.length - 1] = command;
desc.setBuildSpec(newCommands);
project.setDescription(desc, null);
}
use of org.eclipse.core.resources.ICommand in project eclipse-pmd by acanda.
the class PMDNature method deconfigure.
@Override
public void deconfigure() throws CoreException {
final IProjectDescription description = getProject().getDescription();
final ICommand[] commands = description.getBuildSpec();
for (int i = 0; i < commands.length; ++i) {
if (commands[i].getBuilderName().equals(PMDBuilder.ID)) {
final ICommand[] newCommands = new ICommand[commands.length - 1];
System.arraycopy(commands, 0, newCommands, 0, i);
System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
description.setBuildSpec(newCommands);
project.setDescription(description, null);
return;
}
}
}
Aggregations