Have icon for "reset" entry in reflog
[egit/eclipse.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / internal / commit / NestedContentOutlinePage.java
blobc5d8955cfb7d026e134722b266751eab461d67ea
1 /*******************************************************************************
2 * Copyright (C) 2016, Thomas Wolf <thomas.wolf@paranor.ch>
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
10 *******************************************************************************/
11 package org.eclipse.egit.ui.internal.commit;
13 import org.eclipse.jface.viewers.ISelectionProvider;
14 import org.eclipse.ui.part.IPageSite;
15 import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
17 /**
18 * A {@link ContentOutlinePage} that is to be nested in a
19 * {@link MultiPageEditorContentOutlinePage}.
21 public class NestedContentOutlinePage extends ContentOutlinePage {
23 @Override
24 public void init(IPageSite pageSite) {
25 // ContentOutlinePage insists on setting itself as selection provider.
26 // For pages nested inside a MultiPageEditorContentOutlinePage this is
27 // wrong. Save and restore the selection provider.
28 ISelectionProvider provider = pageSite.getSelectionProvider();
29 super.init(pageSite);
30 pageSite.setSelectionProvider(provider);