@Override public void execute() throws BuildException { if (extensionPoint == null) { throw new BuildException("extensionPoint required", getLocation()); } if (getOwningTarget() == null || !getOwningTarget().getName().isEmpty()) { throw new BuildException("bindtargets only allowed as a top-level task"); } if (onMissingExtensionPoint == null) { onMissingExtensionPoint = OnMissingExtensionPoint.FAIL; } final ProjectHelper helper = getProject().getReference( ProjectHelper.PROJECTHELPER_REFERENCE); for (String target : targets) { helper.getExtensionStack().add(new String[] {extensionPoint, target, onMissingExtensionPoint.name()}); } } }
for (String[] extensionInfo : getExtensionStack()) { String extPointName = extensionInfo[0]; String targetName = extensionInfo[1];
subHelper.getExtensionStack().addAll(helper.getExtensionStack()); getProject().addReference(ProjectHelper.PROJECTHELPER_REFERENCE, subHelper); helper.getImportStack().clear(); helper.getImportStack().addAll(subHelper.getImportStack()); helper.getExtensionStack().clear(); helper.getExtensionStack().addAll(subHelper.getExtensionStack()); } catch (BuildException ex) { throw ProjectHelper.addLocationToBuildException(
helper.getExtensionStack().add( new String[] {extPointName, target.getName(), extensionPointMissing.name(), prefix + sep}); } else { helper.getExtensionStack().add( new String[] {extPointName, target.getName(), extensionPointMissing.name()});