use of org.springsource.ide.eclipse.commons.internal.configurator.operations.AbstractInstallOperation in project eclipse-integration-commons by spring-projects.
the class InstallableItem method install.
public IStatus install(File base, IProgressMonitor monitor) {
File targetLocation = getTargetLocation(base);
targetLocation.mkdirs();
MultiStatus result = new MultiStatus(Activator.PLUGIN_ID, 0, NLS.bind("Installation of {0} failed", getName()), null);
List<AbstractInstallOperation> operations = getInstallOperations();
SubMonitor progress = SubMonitor.convert(monitor, NLS.bind("Installing {0}", getName()), operations.size());
for (AbstractInstallOperation operation : operations) {
try {
operation.setSourceBase(getSourceLocation());
} catch (CoreException e) {
return e.getStatus();
}
operation.setTargetBase(targetLocation);
IStatus status = operation.install(progress.newChild(1));
result.add(status);
}
return result;
}
use of org.springsource.ide.eclipse.commons.internal.configurator.operations.AbstractInstallOperation in project eclipse-integration-commons by spring-projects.
the class InstallableItem method getInstallOperations.
public List<AbstractInstallOperation> getInstallOperations() {
IConfigurationElement[] elements = element.getChildren();
List<AbstractInstallOperation> operations = new ArrayList<AbstractInstallOperation>(elements.length);
for (IConfigurationElement element : elements) {
if (element.getName().equals(ELEMENT_COPY)) {
operations.add(new CopyOperation(element));
} else if (element.getName().equals(ELEMENT_CHMOD)) {
operations.add(new ChmodOperation(element));
}
}
return operations;
}
Aggregations