**********************************************************************/
package org.eclipse.tracecompass.internal.lttng2.control.ui.views.service;
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
import java.util.regex.Pattern;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
* Pattern to match the LTTng toolchain version 2.x.y.
*/
- Pattern VERSION_2_PATTERN = checkNotNull(Pattern.compile("(2\\.\\d+\\.\\d+).*")); //$NON-NLS-1$
+ Pattern VERSION_2_PATTERN = Pattern.compile("(2\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
// ------------------------------------------------------------------------
// Constants
/**
* Pattern to match the version.
*/
- Pattern VERSION_PATTERN = checkNotNull(Pattern.compile(".*lttng\\s+version\\s+.*(\\d+\\.\\d+\\.\\d+).*")); //$NON-NLS-1$
+ Pattern VERSION_PATTERN = Pattern.compile(".*lttng\\s+version\\s+.*(\\d+\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
/**
* Pattern to match for error output
*/
- Pattern ERROR_PATTERN = checkNotNull(Pattern.compile("\\s*Error\\:.*")); //$NON-NLS-1$
+ Pattern ERROR_PATTERN = Pattern.compile("\\s*Error\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for session information (lttng list)
*/
- Pattern SESSION_PATTERN = checkNotNull(Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*")); //$NON-NLS-1$
+ Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*"); //$NON-NLS-1$
/**
* Pattern to match for session information (lttng list <session>)
*/
- Pattern TRACE_SESSION_PATTERN = checkNotNull(Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*")); //$NON-NLS-1$
+ Pattern TRACE_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\].*"); //$NON-NLS-1$
/**
* Pattern to match for snapshot session information (lttng list <session>)
*/
- Pattern TRACE_SNAPSHOT_SESSION_PATTERN = checkNotNull(Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\s*snapshot\\].*")); //$NON-NLS-1$
+ Pattern TRACE_SNAPSHOT_SESSION_PATTERN = Pattern.compile("\\s*Tracing\\s+session\\s+(.*)\\:\\s+\\[(active|inactive)\\s*snapshot\\].*"); //$NON-NLS-1$
/**
* Pattern to match for session path information (lttng list <session>)
*/
- Pattern TRACE_SESSION_PATH_PATTERN = checkNotNull(Pattern.compile("\\s*Trace\\s+path\\:\\s+(.*)")); //$NON-NLS-1$
+ Pattern TRACE_SESSION_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(.*)"); //$NON-NLS-1$
/**
* Pattern to match session path for network tracing (lttng list <session>)
* Note: file for protocol is not considered as network trace since local consumer will be used.
*/
- Pattern TRACE_NETWORK_PATH_PATTERN = checkNotNull(Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}")); //$NON-NLS-1$
+ Pattern TRACE_NETWORK_PATH_PATTERN = Pattern.compile("\\s*Trace\\s+path\\:\\s+(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
/**
* Pattern to match session path for network tracing
* Note: file for protocol is not considered as network trace since local consumer will be used.
*/
- Pattern TRACE_NETWORK_PATTERN = checkNotNull(Pattern.compile("\\s*(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}")); //$NON-NLS-1$
+ Pattern TRACE_NETWORK_PATTERN = Pattern.compile("\\s*(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
/**
* Sub-pattern to pattern TRACE_NETWORK_PATH_PATTERN to match file protocol
*/
- Pattern TRACE_FILE_PROTOCOL_PATTERN = checkNotNull(Pattern.compile("(file)\\:\\/\\/(.*)")); //$NON-NLS-1$
+ Pattern TRACE_FILE_PROTOCOL_PATTERN = Pattern.compile("(file)\\:\\/\\/(.*)"); //$NON-NLS-1$
/**
* Pattern to match for kernel domain information (lttng list <session>)
*/
- Pattern DOMAIN_KERNEL_PATTERN = checkNotNull(Pattern.compile("=== Domain: Kernel ===")); //$NON-NLS-1$
+ Pattern DOMAIN_KERNEL_PATTERN = Pattern.compile("=== Domain: Kernel ==="); //$NON-NLS-1$
/**
* Pattern to match for ust domain information (lttng list <session>)
*/
- Pattern DOMAIN_UST_GLOBAL_PATTERN = checkNotNull(Pattern.compile("=== Domain: UST global ===")); //$NON-NLS-1$
+ Pattern DOMAIN_UST_GLOBAL_PATTERN = Pattern.compile("=== Domain: UST global ==="); //$NON-NLS-1$
/**
* Pattern to match for matching warning about no kernel channel
*/
- Pattern DOMAIN_NO_KERNEL_CHANNEL_PATTERN = checkNotNull(Pattern.compile("\\s*Warning\\:\\s+No kernel\\s+channel.*")); //$NON-NLS-1$
+ Pattern DOMAIN_NO_KERNEL_CHANNEL_PATTERN = Pattern.compile("\\s*Warning\\:\\s+No kernel\\s+channel.*"); //$NON-NLS-1$
/**
* Pattern to match for matching warning about no UST channel
*/
- Pattern DOMAIN_NO_UST_CHANNEL_PATTERN = checkNotNull(Pattern.compile("\\s*Error\\:\\s+UST\\s+channel\\s+not\\s+found.*")); //$NON-NLS-1$
+ Pattern DOMAIN_NO_UST_CHANNEL_PATTERN = Pattern.compile("\\s*Error\\:\\s+UST\\s+channel\\s+not\\s+found.*"); //$NON-NLS-1$
/**
* Pattern to match for buffer type (lttng list <session>)
*/
- Pattern BUFFER_TYPE_PATTERN = checkNotNull(Pattern.compile("\\s*Buffer\\s+type\\:.*")); //$NON-NLS-1$
+ Pattern BUFFER_TYPE_PATTERN = Pattern.compile("\\s*Buffer\\s+type\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channels section (lttng list <session>)
*/
- Pattern CHANNELS_SECTION_PATTERN = checkNotNull(Pattern.compile("\\s*Channels\\:")); //$NON-NLS-1$
+ Pattern CHANNELS_SECTION_PATTERN = Pattern.compile("\\s*Channels\\:"); //$NON-NLS-1$
/**
* Pattern to match for channel information (lttng list <session>)
*/
- Pattern CHANNEL_PATTERN = checkNotNull(Pattern.compile("\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]")); //$NON-NLS-1$
+ Pattern CHANNEL_PATTERN = Pattern.compile("\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]"); //$NON-NLS-1$
/**
* Pattern to match for events section information (lttng list <session>)
*/
- Pattern EVENT_SECTION_PATTERN = checkNotNull(Pattern.compile("\\s*Events\\:")); //$NON-NLS-1$
+ Pattern EVENT_SECTION_PATTERN = Pattern.compile("\\s*Events\\:"); //$NON-NLS-1$
/**
* Pattern to match for event information (lttng list <session>)
*/
- Pattern EVENT_PATTERN = checkNotNull(Pattern.compile("\\s+(.*)\\s+\\(loglevel\\s*(:|<=|==)\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*")); //$NON-NLS-1$
+ Pattern EVENT_PATTERN = Pattern.compile("\\s+(.*)\\s+\\(loglevel\\s*(:|<=|==)\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*"); //$NON-NLS-1$
/**
* Pattern to match a wildcarded event information (lttng list <session>)
*/
- Pattern WILDCARD_EVENT_PATTERN = checkNotNull(Pattern.compile("\\s+(.*)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*")); //$NON-NLS-1$
+ Pattern WILDCARD_EVENT_PATTERN = Pattern.compile("\\s+(.*)\\s+\\(type:\\s+(.*)\\)\\s+\\[(enabled|disabled)\\]\\s*(\\[.*\\]){0,1}.*"); //$NON-NLS-1$
/**
* Pattern to match a probe address information (lttng list <session>)
*/
- Pattern PROBE_ADDRESS_PATTERN = checkNotNull(Pattern.compile("\\s+(addr)\\:\\s+(0x[0-9a-fA-F]{1,16})")); //$NON-NLS-1$
+ Pattern PROBE_ADDRESS_PATTERN = Pattern.compile("\\s+(addr)\\:\\s+(0x[0-9a-fA-F]{1,16})"); //$NON-NLS-1$
/**
* Pattern to match a probe OFFSET information (lttng list <session>)
*/
- Pattern PROBE_OFFSET_PATTERN = checkNotNull(Pattern.compile("\\s+(offset)\\:\\s+(0x[0-9a-fA-F]{1,16})")); //$NON-NLS-1$
+ Pattern PROBE_OFFSET_PATTERN = Pattern.compile("\\s+(offset)\\:\\s+(0x[0-9a-fA-F]{1,16})"); //$NON-NLS-1$
/**
* Pattern to match a probe SYMBOL information (lttng list <session>)
*/
- Pattern PROBE_SYMBOL_PATTERN = checkNotNull(Pattern.compile("\\s+(symbol)\\:\\s+(.+)")); //$NON-NLS-1$
+ Pattern PROBE_SYMBOL_PATTERN = Pattern.compile("\\s+(symbol)\\:\\s+(.+)"); //$NON-NLS-1$
/**
* Pattern to match for channel (overwite mode) information (lttng list <session>)
*/
- Pattern OVERWRITE_MODE_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+overwrite\\s+mode\\:.*")); //$NON-NLS-1$
+ Pattern OVERWRITE_MODE_ATTRIBUTE = Pattern.compile("\\s+overwrite\\s+mode\\:.*"); //$NON-NLS-1$
/**
* Pattern to match indicating false for overwrite mode
*/
/**
* Pattern to match for channel (sub-buffer size) information (lttng list <session>)
*/
- Pattern SUBBUFFER_SIZE_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+subbufers\\s+size\\:.*")); //$NON-NLS-1$
+ Pattern SUBBUFFER_SIZE_ATTRIBUTE = Pattern.compile("\\s+subbufers\\s+size\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channel (number of sub-buffers) information (lttng list <session>)
*/
- Pattern NUM_SUBBUFFERS_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+number\\s+of\\s+subbufers\\:.*")); //$NON-NLS-1$
+ Pattern NUM_SUBBUFFERS_ATTRIBUTE = Pattern.compile("\\s+number\\s+of\\s+subbufers\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channel (switch timer) information (lttng list <session>)
*/
- Pattern SWITCH_TIMER_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+switch\\s+timer\\s+interval\\:.*")); //$NON-NLS-1$
+ Pattern SWITCH_TIMER_ATTRIBUTE = Pattern.compile("\\s+switch\\s+timer\\s+interval\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channel (read timer) information (lttng list <session>)
*/
- Pattern READ_TIMER_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+read\\s+timer\\s+interval\\:.*")); //$NON-NLS-1$
+ Pattern READ_TIMER_ATTRIBUTE = Pattern.compile("\\s+read\\s+timer\\s+interval\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channel (output type) information (lttng list <session>)
*/
- Pattern OUTPUT_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+output\\:.*")); //$NON-NLS-1$
+ Pattern OUTPUT_ATTRIBUTE = Pattern.compile("\\s+output\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channel (trace file size) information (lttng list <session>)
*/
- Pattern TRACE_FILE_COUNT_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+trace\\s+file\\s+count\\:.*")); //$NON-NLS-1$
+ Pattern TRACE_FILE_COUNT_ATTRIBUTE = Pattern.compile("\\s+trace\\s+file\\s+count\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for channel (trace file size) information (lttng list <session>)
*/
- Pattern TRACE_FILE_SIZE_ATTRIBUTE = checkNotNull(Pattern.compile("\\s+trace\\s+file\\s+size\\s+\\(bytes\\)\\:.*")); //$NON-NLS-1$
+ Pattern TRACE_FILE_SIZE_ATTRIBUTE = Pattern.compile("\\s+trace\\s+file\\s+size\\s+\\(bytes\\)\\:.*"); //$NON-NLS-1$
/**
* Pattern to match for provider information (lttng list -k/-u)
*/
- Pattern PROVIDER_EVENT_PATTERN = checkNotNull(Pattern.compile("\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)")); //$NON-NLS-1$
+ Pattern PROVIDER_EVENT_PATTERN = Pattern.compile("\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)"); //$NON-NLS-1$
/**
* Pattern to match event fields
*/
- Pattern EVENT_FIELD_PATTERN = checkNotNull(Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)")); //$NON-NLS-1$
+ Pattern EVENT_FIELD_PATTERN = Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)"); //$NON-NLS-1$
/**
* Pattern to match for UST provider information (lttng list -u)
*/
- Pattern UST_PROVIDER_PATTERN = checkNotNull(Pattern.compile("\\s*PID\\:\\s+(\\d+)\\s+-\\s+Name\\:\\s+(.*)")); //$NON-NLS-1$
+ Pattern UST_PROVIDER_PATTERN = Pattern.compile("\\s*PID\\:\\s+(\\d+)\\s+-\\s+Name\\:\\s+(.*)"); //$NON-NLS-1$
/**
* Pattern to match for session information (lttng create <session name>)
*/
- Pattern CREATE_SESSION_NAME_PATTERN = checkNotNull(Pattern.compile(".*Session\\s+(.*)\\s+created\\.")); //$NON-NLS-1$
+ 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>)
*/
- Pattern CREATE_SESSION_PATH_PATTERN = checkNotNull(Pattern.compile("\\s*Traces\\s+will\\s+be\\s+written\\s+in\\s+(.*).*")); //$NON-NLS-1$
+ Pattern CREATE_SESSION_PATH_PATTERN = Pattern.compile("\\s*Traces\\s+will\\s+be\\s+written\\s+in\\s+(.*).*"); //$NON-NLS-1$
/**
* Pattern to match for session command output for "session name not found".
*/
- Pattern SESSION_NOT_FOUND_ERROR_PATTERN = checkNotNull(Pattern.compile("\\s*Error:\\s+Session\\s+name\\s.*not\\s+found")); //$NON-NLS-1$
+ Pattern SESSION_NOT_FOUND_ERROR_PATTERN = Pattern.compile("\\s*Error:\\s+Session\\s+name\\s.*not\\s+found"); //$NON-NLS-1$
/**
* Pattern to match introduction line of context list.
*/
- Pattern ADD_CONTEXT_HELP_CONTEXTS_INTRO = checkNotNull(Pattern.compile("\\s*TYPE can\\s+be\\s+one\\s+of\\s+the\\s+strings\\s+below.*")); //$NON-NLS-1$
+ Pattern ADD_CONTEXT_HELP_CONTEXTS_INTRO = Pattern.compile("\\s*TYPE can\\s+be\\s+one\\s+of\\s+the\\s+strings\\s+below.*"); //$NON-NLS-1$
/**
* Pattern to match introduction line of context list.
*/
- Pattern ADD_CONTEXT_HELP_CONTEXTS_END_LINE = checkNotNull(Pattern.compile("\\s*Example.*")); //$NON-NLS-1$
+ 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.
*/
- Pattern LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN = checkNotNull(Pattern.compile("\\s*Error:\\s+Unable\\s+to\\s+list\\s+kernel\\s+events.*")); //$NON-NLS-1$;
+ Pattern LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN = Pattern.compile("\\s*Error:\\s+Unable\\s+to\\s+list\\s+kernel\\s+events.*"); //$NON-NLS-1$;
/**
* Pattern to match error line if no ust tracer is available or installed.
*/
- Pattern LIST_UST_NO_UST_PROVIDER_PATTERN = checkNotNull(Pattern.compile(".*Unable\\s*to\\s*list\\s*UST\\s*event.*")); //$NON-NLS-1$;
+ Pattern LIST_UST_NO_UST_PROVIDER_PATTERN = Pattern.compile(".*Unable\\s*to\\s*list\\s*UST\\s*event.*"); //$NON-NLS-1$;
/**
* Pattern to match for list snapshot information (lttng snapshot list-output)
*/
- Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = checkNotNull(Pattern.compile("\\s+\\[(\\d+)\\]\\s+(\\S*)\\:\\s+(\\S*)(.*)")); //$NON-NLS-1$
+ Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = Pattern.compile("\\s+\\[(\\d+)\\]\\s+(\\S*)\\:\\s+(\\S*)(.*)"); //$NON-NLS-1$
/**
* Pattern to match the live timer interval line of session list.
*/
- Pattern LIST_LIVE_TIMER_INTERVAL_PATTERN = checkNotNull(Pattern.compile("\\s*Live\\stimer\\sinterval\\s\\(usec\\):\\s(\\d+)")); //$NON-NLS-1$
+ Pattern LIST_LIVE_TIMER_INTERVAL_PATTERN = Pattern.compile("\\s*Live\\stimer\\sinterval\\s\\(usec\\):\\s(\\d+)"); //$NON-NLS-1$
/**
* Pattern to match snapshot path for network tracing (lttng list <session>)
* Note: file for protocol is not considered as network trace since local consumer will be used.
*/
- Pattern SNAPSHOT_NETWORK_PATH_PATTERN = checkNotNull(Pattern.compile("(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}")); //$NON-NLS-1$
+ Pattern SNAPSHOT_NETWORK_PATH_PATTERN = Pattern.compile("(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
}