public void refreshContainedMappings(EObject root,
CreateElementsWithinContainer handler, IProgressMonitor monitor) throws InferenceException {
monitor.beginTask("Inferring contained elements", 150);
// infer like normal...
DroolsInferenceEngine engine = getEngine(handler);
engine.create(root, new SubProgressMonitor(monitor, 100));
// but our handler will remove any incorrect elements
monitor.subTask("Removing uncontained elements");
handler.removeUncontainedElements(engine, new SubProgressMonitor(monitor, 50));