1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.handlers
;
14 import org
.eclipse
.core
.commands
.AbstractHandler
;
15 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.ControlView
;
16 import org
.eclipse
.ui
.IWorkbenchPage
;
17 import org
.eclipse
.ui
.IWorkbenchPart
;
18 import org
.eclipse
.ui
.IWorkbenchWindow
;
19 import org
.eclipse
.ui
.PlatformUI
;
22 * <b><u>BaseControlViewHandler</u></b>
24 * Abstract Command handler implementation for all control view handlers.
27 abstract public class BaseControlViewHandler
extends AbstractHandler
{
29 // ------------------------------------------------------------------------
31 // ------------------------------------------------------------------------
33 * @return returns the workbench page for the Control View
35 protected IWorkbenchPage
getWorkbenchPage() {
36 // Check if we are closing down
37 IWorkbenchWindow window
= PlatformUI
.getWorkbench().getActiveWorkbenchWindow();
42 // Check if we are in the Project View
43 IWorkbenchPage page
= window
.getActivePage();
48 IWorkbenchPart part
= page
.getActivePart();
49 if (!(part
instanceof ControlView
)) {
This page took 0.032012 seconds and 6 git commands to generate.