site.setSelectionProvider(fOutlineViewer);
updateSelectionProvider(site);
	public void createControl(Composite parent) {		Tree tree= new Tree(parent, SWT.MULTI);		AppearanceAwareLabelProvider lprovider= new AppearanceAwareLabelProvider(			AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS |  JavaElementLabels.F_APP_TYPE_SIGNATURE,			AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS		);		fOutlineViewer= new JavaOutlineViewer(tree);		initDragAndDrop();		fOutlineViewer.setContentProvider(new ChildrenProvider());		fOutlineViewer.setLabelProvider(new DecoratingJavaLabelProvider(lprovider));		Object[] listeners= fSelectionChangedListeners.getListeners();		for (int i= 0; i < listeners.length; i++) {			fSelectionChangedListeners.remove(listeners[i]);			fOutlineViewer.addSelectionChangedListener((ISelectionChangedListener) listeners[i]);		}		listeners= fPostSelectionChangedListeners.getListeners();		for (int i= 0; i < listeners.length; i++) {			fPostSelectionChangedListeners.remove(listeners[i]);			fOutlineViewer.addPostSelectionChangedListener((ISelectionChangedListener) listeners[i]);		}		MenuManager manager= new MenuManager(fContextMenuID, fContextMenuID);		manager.setRemoveAllWhenShown(true);		manager.addMenuListener(new IMenuListener() {			public void menuAboutToShow(IMenuManager m) {				contextMenuAboutToShow(m);			}		});		fMenu= manager.createContextMenu(tree);		tree.setMenu(fMenu);		IPageSite site= getSite();		site.registerContextMenu(JavaPlugin.getPluginId() + ".outline", manager, fOutlineViewer); //$NON-NLS-1$		site.setSelectionProvider(fOutlineViewer);		// we must create the groups after we have set the selection provider to the site		fActionGroups= new CompositeActionGroup(new ActionGroup[] {				new OpenViewActionGroup(this),				new CCPActionGroup(this),				new GenerateActionGroup(this),				new RefactorActionGroup(this),				new JavaSearchActionGroup(this)});		// register global actions		IActionBars actionBars= site.getActionBars();		actionBars.setGlobalActionHandler(ITextEditorActionConstants.UNDO, fEditor.getAction(ITextEditorActionConstants.UNDO));		actionBars.setGlobalActionHandler(ITextEditorActionConstants.REDO, fEditor.getAction(ITextEditorActionConstants.REDO));		IAction action= fEditor.getAction(ITextEditorActionConstants.NEXT);		actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_NEXT_ANNOTATION, action);		actionBars.setGlobalActionHandler(ITextEditorActionConstants.NEXT, action);		action= fEditor.getAction(ITextEditorActionConstants.PREVIOUS);		actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.GOTO_PREVIOUS_ANNOTATION, action);		actionBars.setGlobalActionHandler(ITextEditorActionConstants.PREVIOUS, action);				actionBars.setGlobalActionHandler(JdtActionConstants.SHOW_JAVA_DOC, fEditor.getAction("ShowJavaDoc")); //$NON-NLS-1$		actionBars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation);		fActionGroups.fillActionBars(actionBars);		IStatusLineManager statusLineManager= actionBars.getStatusLineManager();		if (statusLineManager != null) {			StatusBarUpdater updater= new StatusBarUpdater(statusLineManager);			fOutlineViewer.addPostSelectionChangedListener(updater);		}		// Custom filter group		fCustomFiltersActionGroup= new CustomFiltersActionGroup("org.eclipse.jdt.ui.JavaOutlinePage", fOutlineViewer); //$NON-NLS-1$		registerToolbarActions(actionBars);		fOutlineViewer.setInput(fInput);	}