Bug 296364 [context] The constructors used by the injection mechanism should have @Inject
examples/org.eclipse.e4.demo.e4photo/src/org/eclipse/e4/demo/e4photo/Library.java
if (added) {
											set.add(resource);
										} else {
											set.remove(resource);
										}
									}
								});
							}
						}
					});
				} catch (CoreException e) {
					
					e.printStackTrace();
				}
			}
		}
	};
	private final IWorkspace workspace;
	static int counter;
	public Library(Composite parent, final IWorkspace workspace) {
		final Realm realm = SWTObservables.getRealm(parent.getDisplay());
		this.workspace = workspace;
		initializeWorkspace();
		TreeViewer viewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
		viewer.getTree().setData("org.eclipse.e4.ui.css.id", "library");
		
		viewer.addSelectionChangedListener(new ISelectionChangedListener(){
			public void selectionChanged(SelectionChangedEvent event) {
				StructuredSelection selection = (StructuredSelection)event.getSelection();
				context.modify(IServiceConstants.SELECTION, selection.size() == 1 ? selection.getFirstElement() : selection.toArray());