Bug 314538 Selection service considers context layers incorrectly
in I20100523-1612 I installed the EMF SDK and opened our /org.eclipse.e4.ui.model.workbench/model/UIElements.ecore file. If I open the Properties view it shows the correctly selected element, but if I select a different element in the ecore editor, the Properties view is not updated. PW
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/workbench/ui/internal/SelectionServiceImpl.java
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.contexts.RunAndTrack;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.core.services.events.IEventBroker;
import org.eclipse.e4.ui.model.application.ui.MContext;
import org.eclipse.e4.ui.model.application.ui.MElementContainer;
import org.eclipse.e4.ui.model.application.ui.basic.MPart;
import org.eclipse.e4.ui.services.IServiceConstants;
import org.eclipse.e4.workbench.modeling.EPartService;
import org.eclipse.e4.workbench.modeling.ESelectionService;
import org.eclipse.e4.workbench.modeling.ISelectionListener;
import org.eclipse.e4.workbench.ui.UIEvents;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
public class SelectionServiceImpl implements ESelectionService {
	static final String OUT_SELECTION = "output.selection"; 
	private ListenerList genericListeners = new ListenerList();
	private Map<String, ListenerList> targetedListeners = new HashMap<String, ListenerList>();
	private Set<IEclipseContext> tracked = new HashSet<IEclipseContext>();
	@Inject
	private IEclipseContext context;
	@Inject
	private EPartService partService;
	/**
	 * This is the specific implementation. TODO: generalize it
	 */
	@Inject
	@Named(EPartService.PART_SERVICE_ROOT)
	private MContext serviceRoot;