X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=org.eclipse.linuxtools.lttng2.ui%2Fsrc%2Forg%2Feclipse%2Flinuxtools%2Finternal%2Flttng2%2Fui%2Fviews%2Fcontrol%2Fservice%2FLTTngControlServiceConstants.java;h=d73ca76e4b223a752568d0024d49821cda04651d;hb=cfe737e4898e78f72ed19ca502adf1c5fdbaa771;hp=a1bdac402f6f9d2cff0c5daf21399d72d9323e75;hpb=e6a4cf1b845c25006b594546a98096769eef2a7e;p=deliverable%2Ftracecompass.git diff --git a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java index a1bdac402f..d73ca76e4b 100644 --- a/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java +++ b/org.eclipse.linuxtools.lttng2.ui/src/org/eclipse/linuxtools/internal/lttng2/ui/views/control/service/LTTngControlServiceConstants.java @@ -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; @@ -14,17 +14,21 @@ package org.eclipse.linuxtools.internal.lttng2.ui.views.control.service; import java.util.regex.Pattern; /** - * LTTngControlServiceConstants *

* Constants for LTTng Control Service. *

+ * + * @author Bernd Hufmann */ 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 @@ -50,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$ /** @@ -168,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. */ @@ -186,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$ @@ -196,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 */ @@ -296,7 +300,7 @@ public class LTTngControlServiceConstants { /** * Pattern to match for session information (lttng create ) */ - 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 ) */ @@ -313,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$; }