import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
/**
* The Control Flow view main object
makeActions();
contributeToActionBars();
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor instanceof ITmfTraceEditor) {
ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
if (trace != null) {
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
/**
* Main implementation for the LTTng 2.0 kernel Resource view
makeActions();
contributeToActionBars();
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor instanceof ITmfTraceEditor) {
ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
if (trace != null) {
/*******************************************************************************
* Copyright (c) 2011, 2012 Ericsson
- *
+ *
* 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
- *
+ *
* Contributors:
* Francois Chouinard - Initial API and implementation
*******************************************************************************/
import org.eclipse.ui.navigator.CommonViewer;
/**
- * The implementation of TMF project model element.
- *
+ * The implementation of TMF project model element.
+ *
* @version 1.0
* @author Francois Chouinard
*/
// ------------------------------------------------------------------------
/**
* Constructor.
- *
- * Creates the TMF project model element.
+ *
+ * Creates the TMF project model element.
* @param name The name of the project.
* @param project The project reference.
* @param parent The parent element
// Accessors
// ------------------------------------------------------------------------
/**
- * Returns the containing trace folder element.
+ * Returns the containing trace folder element.
* @return the TMF trace folder element.
*/
public TmfTraceFolder getTracesFolder() {
return;
}
IWorkbenchPage activePage = wbWindow.getActivePage();
+ if (activePage == null) {
+ return;
+ }
+
for (IViewReference viewReference : activePage.getViewReferences()) {
IViewPart viewPart = viewReference.getView(false);
if (viewPart instanceof CommonNavigator) {
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
/**
* Displays the CTF trace properties.
nameCol.pack();
valueCol.pack();
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor instanceof ITmfTraceEditor) {
ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
if (trace != null) {
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
/**
* The purpose of this view is to provide graphical time distribution statistics about the trace events.
// Histogram
fFullTraceHistogram = new FullTraceHistogram(this, fullRangeComposite);
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor instanceof ITmfTraceEditor) {
ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
if (trace != null) {
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PlatformUI;
/**
* The generic Statistics View displays statistics for any kind of traces.
fStatsViewers.setParent(parent);
createStatisticsViewers();
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = getSite().getPage().getActiveEditor();
if (editor instanceof ITmfTraceEditor) {
ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
if (trace != null) {
resetLoader();
- IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ IEditorPart editor = fView.getSite().getPage().getActiveEditor();
if (editor instanceof ITmfTraceEditor) {
ITmfTrace trace = ((ITmfTraceEditor) editor).getTrace();
if (trace != null) {