blob: 87bcc787084889d99b0c9116d85335e8278eb40b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*******************************************************************************
* Copyright (C) 2016, Thomas Wolf <thomas.wolf@paranor.ch>
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.eclipse.egit.ui.internal.commit;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.views.contentoutline.ContentOutlinePage;
/**
* A {@link ContentOutlinePage} that is to be nested in a
* {@link MultiPageEditorContentOutlinePage}.
*/
public class NestedContentOutlinePage extends ContentOutlinePage {
@Override
public void init(IPageSite pageSite) {
// ContentOutlinePage insists on setting itself as selection provider.
// For pages nested inside a MultiPageEditorContentOutlinePage this is
// wrong. Save and restore the selection provider.
ISelectionProvider provider = pageSite.getSelectionProvider();
super.init(pageSite);
pageSite.setSelectionProvider(provider);
}
}
|