Bug 286867 Update demos and compatibility to use context#modify() instead of outputContext
examples/org.eclipse.e4.demo.e4photo/src/org/eclipse/e4/demo/e4photo/Thumbnails.java
private final ISchedulingExecutor backgroundRunner;
	private IContainer input;
	private volatile Runnable runnable;
	private final IStylingEngine stylingEngine;
	public Thumbnails(Composite parent, final IEclipseContext outputContext,
			ISchedulingExecutor backgroundRunner, IStylingEngine stylingEngine) {
		this.outputContext = outputContext;
		this.backgroundRunner = backgroundRunner;
		this.stylingEngine = stylingEngine;
		parent.setLayout(new FillLayout());
		gallery = new Gallery(parent, SWT.V_SCROLL | SWT.MULTI);
		gallery.setData("org.eclipse.e4.ui.css.id", "thumbnails");
		gallery.setGroupRenderer(new NoGroupRenderer());
		DefaultGalleryItemRenderer ir = new DefaultGalleryItemRenderer();
		ir.setShowLabels(false);
		ir.setDropShadowsSize(0);
		ir.setShowRoundedSelectionCorners(false);
		gallery.setItemRenderer(ir);
		group = new GalleryItem(gallery, SWT.NONE);
		group.setExpanded(true);
		gallery.addSelectionListener(new SelectionAdapter() {
			public void widgetSelected(SelectionEvent e) {
				Object data = e.item.getData();
				outputContext.set(IServiceConstants.SELECTION, data);
			}
		});
	}
	private Point getBestSize(int originalX, int originalY, int maxX, int maxY) {
		double widthRatio = (double) originalX / (double) maxX;
		double heightRatio = (double) originalY / (double) maxY;