Bug 299435 NPE closing contacts demo with a dirty part
bundles/org.eclipse.e4.ui.workbench.renderers.swt/src/org/eclipse/e4/workbench/ui/renderers/swt/WBWRenderer.java
return saveableParts;
	}
	private boolean promptForSave(Shell parentShell, MElementContainer<?> window) {
		List<MSaveablePart> saveableParts = collectSaveableParts(window,
				new ArrayList<MSaveablePart>());
		if (!saveableParts.isEmpty()) {
			SaveablePartPromptDialog dialog = new SaveablePartPromptDialog(
					parentShell, saveableParts);
			if (dialog.open() == Window.CANCEL) {
				return false;
			}
			for (Object element : dialog.getCheckedElements()) {
				MSaveablePart part = (MSaveablePart) element;
				Object clientObject = part.getObject();
				try {
					ContextInjectionFactory.invoke(clientObject,
							"doSave", context); 
				} catch (InvocationTargetException e) {
					if (logger != null)
						logger.error(e);
				} catch (CoreException e) {
					if (logger != null)
						logger.error(e);
				}
			}
		}
		return true;
	}
	@Inject
	private IEclipseContext context;