/**********************************************************************
* Copyright (c) 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:
+ *
+ * Contributors:
* Bernd Hufmann - Initial API and implementation
**********************************************************************/
package org.eclipse.linuxtools.internal.lttng2.ui.views.control.handlers;
* <p>
* Command handler implementation to execute command calibrate to quantify LTTng overhead.
* </p>
- *
+ *
* @author Bernd Hufmann
*/
public class CalibrateHandler extends BaseControlViewHandler {
// ------------------------------------------------------------------------
// Operations
// ------------------------------------------------------------------------
-
+
/*
* (non-Javadoc)
* @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
try {
param.getDomain().calibrate(monitor);
} catch (ExecutionException e) {
- return new Status(Status.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_AddCalibrateFailure, e);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_AddCalibrateFailure, e);
}
return Status.OK_STATUS;
*/
@Override
public boolean isEnabled() {
-
+
// Get workbench page for the Control View
IWorkbenchPage page = getWorkbenchPage();
if (page == null) {
if (selection instanceof StructuredSelection) {
StructuredSelection structered = ((StructuredSelection) selection);
for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = (Object) iterator.next();
+ Object element = iterator.next();
if (element instanceof TraceDomainComponent) {
TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
session = (TraceSessionComponent) tmpDomain.getParent();
-
+
// Add only TraceDomainComponent whose TraceSessionComponent parent is not destroyed
if ((!session.isDestroyed())) {
domain = tmpDomain;