Allow LTTng Control to connect to LTTng 2.x.y nodes (Bug 388545)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.ui / src / org / eclipse / linuxtools / internal / lttng2 / ui / views / control / service / LTTngControlServiceConstants.java
index f09b0a0429dc8b36b7f7b657efaaa3dcca23b074..d73ca76e4b223a752568d0024d49821cda04651d 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.service;
@@ -17,7 +17,7 @@ import java.util.regex.Pattern;
  * <p>
  * Constants for LTTng Control Service.
  * </p>
- * 
+ *
  * @author Bernd Hufmann
  */
 public class LTTngControlServiceConstants {
@@ -25,7 +25,10 @@ public class LTTngControlServiceConstants {
     // ------------------------------------------------------------------------
     // Version constants
     // ------------------------------------------------------------------------
-    public final static String LTTNG_MAJOR_VERSION_2_0 = "2.0"; //$NON-NLS-1$
+    /**
+     * Pattern to match the LTTng toolchain version 2.x.y.
+     */
+    public final static Pattern VERSION_2_PATTERN = Pattern.compile("(2\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
 
     // ------------------------------------------------------------------------
     // Command constants
@@ -51,35 +54,35 @@ public class LTTngControlServiceConstants {
      */
     public final static String COMMAND_LIST_UST = COMMAND_LIST + "-u";  //$NON-NLS-1$
     /**
-     * Command to create a session. 
+     * Command to create a session.
      */
     public final static String COMMAND_CREATE_SESSION = " create "; //$NON-NLS-1$
     /**
-     * Command to destroy a session. 
+     * Command to destroy a session.
      */
     public final static String COMMAND_DESTROY_SESSION = " destroy "; //$NON-NLS-1$
     /**
-     * Command to destroy a session. 
+     * Command to destroy a session.
      */
     public final static String COMMAND_START_SESSION = " start "; //$NON-NLS-1$
     /**
-     * Command to destroy a session. 
+     * Command to destroy a session.
      */
     public final static String COMMAND_STOP_SESSION = " stop "; //$NON-NLS-1$
     /**
-     * Command to enable a channel. 
+     * Command to enable a channel.
      */
     public final static String COMMAND_ENABLE_CHANNEL = " enable-channel "; //$NON-NLS-1$
     /**
-     * Command to disable a channel. 
+     * Command to disable a channel.
      */
     public final static String COMMAND_DISABLE_CHANNEL = " disable-channel "; //$NON-NLS-1$
     /**
-     * Command to enable a event. 
+     * Command to enable a event.
      */
     public final static String COMMAND_ENABLE_EVENT = " enable-event "; //$NON-NLS-1$
     /**
-     * Command to disable a event. 
+     * Command to disable a event.
      */
     public final static String COMMAND_DISABLE_EVENT = " disable-event "; //$NON-NLS-1$
     /**
@@ -169,7 +172,7 @@ public class LTTngControlServiceConstants {
     /**
      * Optional command line option for configuring a channel's overwrite mode.
      */
-    public final static String OPTION_OVERWRITE = " --overwrite ";  //$NON-NLS-1$ 
+    public final static String OPTION_OVERWRITE = " --overwrite ";  //$NON-NLS-1$
     /**
      * Optional command line option for configuring a channel's number of sub buffers.
      */
@@ -187,7 +190,7 @@ public class LTTngControlServiceConstants {
      */
     public final static String OPTION_READ_TIMER = " --read-timer ";  //$NON-NLS-1$
     /**
-     * Command line option for printing the help of a specif command 
+     * Command line option for printing the help of a specif command
      */
     public final static String OPTION_HELP = " -h ";  //$NON-NLS-1$
 
@@ -197,7 +200,7 @@ public class LTTngControlServiceConstants {
     /**
      * Pattern to match the version.
      */
-    public final static Pattern VERSION_PATTERN = Pattern.compile("\\s*lttng\\s+version\\s+(\\d+\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
+    public final static Pattern VERSION_PATTERN = Pattern.compile(".*lttng\\s+version\\s+(\\d+\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
     /**
      * Pattern to match for error output
      */
@@ -297,7 +300,7 @@ public class LTTngControlServiceConstants {
     /**
      * Pattern to match for session information (lttng create <session name>)
      */
-    public final static Pattern CREATE_SESSION_NAME_PATTERN = Pattern.compile("\\s*Session\\s+(.*)\\s+created\\."); //$NON-NLS-1$
+    public final static Pattern CREATE_SESSION_NAME_PATTERN = Pattern.compile(".*Session\\s+(.*)\\s+created\\."); //$NON-NLS-1$
     /**
      * Pattern to match for session path information (lttng create <session name>)
      */
@@ -314,5 +317,8 @@ public class LTTngControlServiceConstants {
      * Pattern to match introduction line of context list.
      */
     public final static Pattern ADD_CONTEXT_HELP_CONTEXTS_END_LINE = Pattern.compile("\\s*Example.*"); //$NON-NLS-1$
-
+    /**
+     * Pattern to match error line if no kernel tracer is available or installed.
+     */
+    public final static Pattern LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN = Pattern.compile("\\s*Error:\\s+Unable\\s+to\\s+list\\s+kernel\\s+events.*"); //$NON-NLS-1$;
 }
This page took 0.027742 seconds and 5 git commands to generate.