Bug 232851 Performance regression: OpenCloseViewTest#showView:ResourceNavigator
3.4 HEAD: Elapsed : 624ms (95% in [621ms, 628ms]) Measurable effect: 6ms (0.4 SDs) CPU Time: 576ms (95% in [564ms, 589ms]) Measurable effect: 25ms (0.4 SDs)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/ResourceNavigator.java
* @since 2.0
     */
    protected void linkToEditor(IStructuredSelection selection) {
    	if (this != this.getSite().getPage().getActivePart())
    		return;
    	
        Object obj = selection.getFirstElement();
        if (obj instanceof IFile && selection.size() == 1) {
            IFile file = (IFile) obj;
            IWorkbenchPage page = getSite().getPage();
            IEditorPart editor = ResourceUtil.findEditor(page, file);
            if (editor != null) {
                page.bringToTop(editor);
                return;
            }
        }   
    }
    /**
     * Creates the action group, which encapsulates all actions for the view.
     */
    protected void makeActions() {
    	MainActionGroup group = new MainActionGroup(this);
        setActionGroup(group);
        
        IHandlerService service = (IHandlerService) getSite().getService(IHandlerService.class);
    	service.activateHandler("org.eclipse.ui.navigate.linkWithEditor", 
    			new ActionHandler(group.toggleLinkingAction));
    	collapseAllHandler = new CollapseAllHandler(viewer);
    	service.activateHandler(CollapseAllHandler.COMMAND_ID,
				collapseAllHandler);