Fix for bug 382684 (connection re-use)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / handlers / CalibrateHandler.java
index 48ed15fa99213e1e284c353d9e3c8a20abacd1c3..dd670631d575dab0dfe37695def8b1dac9b53dfa 100644 (file)
@@ -1,12 +1,12 @@
 /**********************************************************************
  * 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;
@@ -34,7 +34,7 @@ import org.eclipse.ui.PlatformUI;
  * <p>
  * Command handler implementation to execute command calibrate to quantify LTTng overhead.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class CalibrateHandler extends BaseControlViewHandler {
@@ -50,7 +50,7 @@ public class CalibrateHandler extends BaseControlViewHandler {
     // ------------------------------------------------------------------------
     // Operations
     // ------------------------------------------------------------------------
-    
+
     /*
      * (non-Javadoc)
      * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
@@ -74,7 +74,7 @@ public class CalibrateHandler extends BaseControlViewHandler {
                     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;
@@ -95,7 +95,7 @@ public class CalibrateHandler extends BaseControlViewHandler {
      */
     @Override
     public boolean isEnabled() {
-        
+
         // Get workbench page for the Control View
         IWorkbenchPage page = getWorkbenchPage();
         if (page == null) {
@@ -110,11 +110,11 @@ public class CalibrateHandler extends BaseControlViewHandler {
         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;
This page took 0.025228 seconds and 5 git commands to generate.