org.eclipse.tracecompass.ctf.core.tests;bundle-version="2.1.0",
org.eclipse.tracecompass.gdbtrace.core.tests;bundle-version="1.1.0",
org.eclipse.tracecompass.gdbtrace.ui.tests;bundle-version="1.1.0",
- org.eclipse.linuxtools.lttng2.control.core.tests;bundle-version="2.1.0",
- org.eclipse.linuxtools.lttng2.control.ui.tests;bundle-version="2.1.0",
- org.eclipse.linuxtools.lttng2.kernel.core.tests;bundle-version="2.1.0",
- org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;bundle-version="3.1.0",
- org.eclipse.linuxtools.lttng2.kernel.ui.tests;bundle-version="2.1.0",
- org.eclipse.linuxtools.lttng2.ust.core.tests;bundle-version="2.1.0",
- org.eclipse.linuxtools.lttng2.ust.ui.tests;bundle-version="2.1.0",
+ org.eclipse.tracecompass.lttng2.control.core.tests;bundle-version="2.1.0",
+ org.eclipse.tracecompass.lttng2.control.ui.tests;bundle-version="2.1.0",
+ org.eclipse.tracecompass.lttng2.kernel.core.tests;bundle-version="2.1.0",
+ org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests;bundle-version="3.1.0",
+ org.eclipse.tracecompass.lttng2.kernel.ui.tests;bundle-version="2.1.0",
+ org.eclipse.tracecompass.lttng2.ust.core.tests;bundle-version="2.1.0",
+ org.eclipse.tracecompass.lttng2.ust.ui.tests;bundle-version="2.1.0",
org.eclipse.linuxtools.statesystem.core.tests;bundle-version="3.1.0",
org.eclipse.linuxtools.tmf.core.tests;bundle-version="2.1.0",
org.eclipse.linuxtools.tmf.ctf.core.tests;bundle-version="3.1.0",
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.control.core.tests"
+ id="org.eclipse.tracecompass.lttng2.control.core.tests"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.control.ui.tests"
+ id="org.eclipse.tracecompass.lttng2.control.ui.tests"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.kernel.core.tests"
+ id="org.eclipse.tracecompass.lttng2.kernel.core.tests"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests"
+ id="org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.kernel.ui.tests"
+ id="org.eclipse.tracecompass.lttng2.kernel.ui.tests"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.ust.core.tests"
+ id="org.eclipse.tracecompass.lttng2.ust.core.tests"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
- id="org.eclipse.linuxtools.lttng2.ust.ui.tests"
+ id="org.eclipse.tracecompass.lttng2.ust.ui.tests"
download-size="0"
install-size="0"
version="0.0.0"
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.control.core.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.control.core.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.lttng2.control.core;bundle-version="3.1.0"
-Export-Package: org.eclipse.linuxtools.lttng2.control.core.tests;x-friends:="org.eclipse.linuxtools.lttng.alltests",
- org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;x-internal:=true,
- org.eclipse.linuxtools.lttng2.control.core.tests.relayd,
- org.eclipse.linuxtools.lttng2.control.core.tests.session
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties
-src.includes = about.html
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.control.core.tests
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Control Core Tests Plug-in
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.control.core.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Control Core Tests Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.linuxtools.lttng2.control.core.tests</testSuite>
- <testClass>org.eclipse.linuxtools.lttng2.control.core.tests.AllTests</testClass>
- <useUIHarness>false</useUIHarness>
- <useUIThread>false</useUIThread>
- <product>org.eclipse.platform.ide</product>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Test stubs for the Activator.
- */
-public class ActivatorTest {
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#Activator()}.
- */
- @Test
- public void testActivator() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#getDefault()}.
- */
- @Test
- public void testGetDefault() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#start(org.osgi.framework.BundleContext)}.
- */
- @Test
- public void testStartBundleContext() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#stop(org.osgi.framework.BundleContext)}.
- */
- @Test
- public void testStopBundleContext() {
- assertTrue(true);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Run all the tests in the test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ActivatorTest.class,
- org.eclipse.linuxtools.lttng2.control.core.tests.model.impl.AllTests.class,
- org.eclipse.linuxtools.lttng2.control.core.tests.session.AllTests.class,
- org.eclipse.linuxtools.lttng2.control.core.tests.model.impl.AllTests.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2011, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- BaseEventInfoTest.class,
- ChannelInfoTest.class,
- DomainInfoTest.class,
- EventInfoTest.class,
- FieldInfoTest.class,
- ProbeEventInfoTest.class,
- SessionInfoTest.class,
- TraceInfoTest.class,
- UstProviderInfoTest.class,
- SnapshotInfoTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>BaseEventInfoTest</code> contains test for the class
- * <code>{@link BaseEventInfo}</code>.
- */
-public class BaseEventInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IBaseEventInfo fEventInfo1 = null;
- private IBaseEventInfo fEventInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fEventInfo1 = factory.getBaseEventInfo1();
- fEventInfo2 = factory.getBaseEventInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Run the BaseEventInfo() constructor test.
- */
- @Test
- public void testBaseEventInfo() {
- BaseEventInfo fixture = new BaseEventInfo("event");
- assertNotNull(fixture);
-
- TraceEventType result = fixture.getEventType();
-
- assertEquals("event", fixture.getName());
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- TraceLogLevel level = fixture.getLogLevel();
- assertEquals("TRACE_DEBUG", level.getInName());
- assertEquals("TRACE_DEBUG", level.name());
- assertEquals("TRACE_DEBUG", level.toString());
- assertEquals(14, level.ordinal());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventInfoCopy() {
- BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo1);
-
- assertEquals(fEventInfo1.getName(), info.getName());
- assertEquals(fEventInfo1.getEventType(), info.getEventType());
- assertEquals(fEventInfo1.getLogLevel(), info.getLogLevel());
- assertEquals(fEventInfo1.getFilterExpression(), info.getFilterExpression());
-
- IFieldInfo[] orignalFields = fEventInfo1.getFields();
- IFieldInfo[] copiedFields = info.getFields();
- assertEquals(orignalFields.length, copiedFields.length);
-
- for (int i = 0; i < copiedFields.length; i++) {
- assertEquals(orignalFields[i], copiedFields[i]);
- }
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventCopy2() {
- try {
- BaseEventInfo info = null;
- new BaseEventInfo(info);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the TraceEventType getEventType() method test.
- */
- @Test
- public void testGetEventType_1() {
- BaseEventInfo fixture = new BaseEventInfo("event");
- fixture.setEventType("unknown");
-
- TraceEventType result = fixture.getEventType();
-
- assertNotNull(result);
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- fixture.setEventType("");
- result = fixture.getEventType();
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- fixture.setEventType("tracepoint");
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("tracepoint", result.getInName());
- assertEquals("TRACEPOINT", result.name());
- assertEquals("TRACEPOINT", result.toString());
- assertEquals(0, result.ordinal());
-
- fixture.setEventType("syscall");
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("syscall", result.getInName());
- assertEquals("SYSCALL", result.name());
- assertEquals("SYSCALL", result.toString());
- assertEquals(1, result.ordinal());
-
- fixture.setEventType("probe");
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("probe", result.getInName());
- assertEquals("PROBE", result.name());
- assertEquals("PROBE", result.toString());
- assertEquals(2, result.ordinal());
-
- fixture.setEventType("function");
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("function", result.getInName());
- assertEquals("FUNCTION", result.name());
- assertEquals("FUNCTION", result.toString());
- assertEquals(3, result.ordinal());
-
-
- }
-
- /**
- * Run the void setEventType(TraceEventType) method test.
- */
- @Test
- public void testSetEventType_2() {
- BaseEventInfo fixture = new BaseEventInfo("event");
- fixture.setEventType(TraceEventType.TRACEPOINT);
-
- TraceEventType result = fixture.getEventType();
-
- assertNotNull(result);
- assertEquals("tracepoint", result.getInName());
- assertEquals("TRACEPOINT", result.name());
- assertEquals("TRACEPOINT", result.toString());
- assertEquals(0, result.ordinal());
-
- fixture.setEventType(TraceEventType.UNKNOWN);
- result = fixture.getEventType();
-
- assertNotNull(result);
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- fixture.setEventType(TraceEventType.SYSCALL);
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("syscall", result.getInName());
- assertEquals("SYSCALL", result.name());
- assertEquals("SYSCALL", result.toString());
- assertEquals(1, result.ordinal());
-
- fixture.setEventType(TraceEventType.PROBE);
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("probe", result.getInName());
- assertEquals("PROBE", result.name());
- assertEquals("PROBE", result.toString());
- assertEquals(2, result.ordinal());
-
- fixture.setEventType(TraceEventType.FUNCTION);
- result = fixture.getEventType();
- assertNotNull(result);
- assertEquals("function", result.getInName());
- assertEquals("FUNCTION", result.name());
- assertEquals("FUNCTION", result.toString());
- assertEquals(3, result.ordinal());
-
-
- }
-
- /**
- * Run the void setLogLevel(TraceLogLevel) method test.
- * Run the TraceLogLevel getLogLevel() method test
- */
- @Test
- public void testSetLogLevel1() {
- BaseEventInfo fixture = new BaseEventInfo("event");
- fixture.setEventType(TraceEventType.TRACEPOINT);
- fixture.setLogLevel(TraceLogLevel.TRACE_CRIT);
-
- // 2 set/get-operations are enough to test the method
- TraceLogLevel result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_CRIT", result.getInName());
- assertEquals("TRACE_CRIT", result.name());
- assertEquals("TRACE_CRIT", result.toString());
- assertEquals(2, result.ordinal());
-
- fixture.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_FUNCTION", result.getInName());
- assertEquals("TRACE_DEBUG_FUNCTION", result.name());
- assertEquals("TRACE_DEBUG_FUNCTION", result.toString());
- assertEquals(12, result.ordinal());
- }
-
- /**
- * Run the void setLogLevel(String) method test.
- * Run the TraceLogLevel getLogLevel() method test
- */
- @Test
- public void testSetLogLevel2() {
- BaseEventInfo fixture = new BaseEventInfo("event");
- fixture.setEventType(TraceEventType.TRACEPOINT);
- fixture.setLogLevel("TRACE_EMERG");
-
- TraceLogLevel result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_EMERG", result.getInName());
- assertEquals("TRACE_EMERG", result.name());
- assertEquals(0, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_ALERT");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_ALERT", result.getInName());
- assertEquals("TRACE_ALERT", result.name());
- assertEquals(1, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_CRIT");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_CRIT", result.getInName());
- assertEquals("TRACE_CRIT", result.name());
- assertEquals(2, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_ERR");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_ERR", result.getInName());
- assertEquals("TRACE_ERR", result.name());
- assertEquals(3, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_WARNING");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_WARNING", result.getInName());
- assertEquals("TRACE_WARNING", result.name());
- assertEquals(4, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_NOTICE");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_NOTICE", result.getInName());
- assertEquals("TRACE_NOTICE", result.name());
- assertEquals(5, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_INFO");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_INFO", result.getInName());
- assertEquals("TRACE_INFO", result.name());
- assertEquals(6, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_SYSTEM");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_SYSTEM", result.getInName());
- assertEquals("TRACE_DEBUG_SYSTEM", result.name());
- assertEquals(7, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_PROGRAM");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_PROGRAM", result.getInName());
- assertEquals("TRACE_DEBUG_PROGRAM", result.name());
- assertEquals(8, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_PROCESS");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_PROCESS", result.getInName());
- assertEquals("TRACE_DEBUG_PROCESS", result.name());
- assertEquals(9, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_MODULE");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_MODULE", result.getInName());
- assertEquals("TRACE_DEBUG_MODULE", result.name());
- assertEquals(10, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_UNIT");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_UNIT", result.getInName());
- assertEquals("TRACE_DEBUG_UNIT", result.name());
- assertEquals(11, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_FUNCTION");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_FUNCTION", result.getInName());
- assertEquals("TRACE_DEBUG_FUNCTION", result.name());
- assertEquals(12, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG_LINE");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG_LINE", result.getInName());
- assertEquals("TRACE_DEBUG_LINE", result.name());
- assertEquals(13, result.ordinal());
-
- //------------------------
- fixture.setLogLevel("TRACE_DEBUG");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("TRACE_DEBUG", result.getInName());
- assertEquals("TRACE_DEBUG", result.name());
- assertEquals(14, result.ordinal());
-
- //-------------------------
- fixture.setLogLevel("LEVEL_UNKNOWN");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("LEVEL_UNKNOWN", result.getInName());
- assertEquals("LEVEL_UNKNOWN", result.name());
- assertEquals(15, result.ordinal());
-
- fixture.setLogLevel("garbage");
-
- result = fixture.getLogLevel();
- assertNotNull(result);
- assertEquals("LEVEL_UNKNOWN", result.getInName());
- assertEquals("LEVEL_UNKNOWN", result.name());
- assertEquals(15, result.ordinal());
- }
-
- /**
- * test filter expression
- */
- @Test
- public void testSetFields() {
- BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo2);
- info.setFilterExpression("stringfield==test");
- assertEquals("stringfield==test", info.getFilterExpression());
- }
-
-
- /**
- * test add field
- */
- @Test
- public void testAddField() {
- BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo2);
-
- IFieldInfo field = new FieldInfo("intfield");
- field.setFieldType("int");
-
- info.addField(field);
-
- // Verify the stored events
- IFieldInfo[] result = info.getFields();
-
- assertNotNull(result);
- assertEquals(1, result.length);
- assertNotNull(result[0]);
- assertTrue(field.equals(result[0]));
- }
-
- /**
- * test set fields
- */
- @Test
- public void testFields() {
- BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo2);
-
- IFieldInfo field1 = new FieldInfo("intfield");
- field1.setFieldType("int");
-
- IFieldInfo field2 = new FieldInfo("stringfield");
- field2.setFieldType("string");
-
- List<IFieldInfo> fields = new LinkedList<>();
- fields.add(field1);
- fields.add(field2);
- info.setFields(fields);
-
- // Verify the stored events
- IFieldInfo[] result = info.getFields();
-
- assertNotNull(result);
- assertEquals(2, result.length);
-
- for (int i = 0; i < result.length; i++) {
- assertNotNull(result[i]);
- assertTrue(fields.get(i).equals(result[i]));
- }
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- BaseEventInfo fixture = new BaseEventInfo("event");
- fixture.setName("testName");
- fixture.setEventType(TraceEventType.TRACEPOINT);
- fixture.setLogLevel(TraceLogLevel.TRACE_ERR);
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("[BaseEventInfo([TraceInfo(Name=testName)],type=TRACEPOINT,level=TRACE_ERR)]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Test the .equals() method.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fEventInfo1.equals(fEventInfo1));
- assertTrue("equals", fEventInfo2.equals(fEventInfo2));
-
- assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
- assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
- }
-
- /**
- * Test the .equals() method.
- */
- @Test
- public void testEqualsSymmetry() {
- BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
- BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo2);
-
- assertTrue("equals", info1.equals(fEventInfo1));
- assertTrue("equals", fEventInfo1.equals(info1));
-
- assertTrue("equals", info2.equals(fEventInfo2));
- assertTrue("equals", fEventInfo2.equals(info2));
- }
-
- /**
- * Test the .equals() method.
- */
- @Test
- public void testEqualsTransivity() {
- BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
- BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
- BaseEventInfo info3 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
-
- assertTrue("equals", info1.equals(info2));
- assertTrue("equals", info2.equals(info3));
- assertTrue("equals", info1.equals(info3));
- }
-
- /**
- * Test the .equals() method.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fEventInfo1.equals(null));
- assertTrue("equals", !fEventInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Test the hashCode() method.
- */
- @Test
- public void testHashCode() {
- BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
- BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo2);
-
- assertTrue("hashCode", fEventInfo1.hashCode() == info1.hashCode());
- assertTrue("hashCode", fEventInfo2.hashCode() == info2.hashCode());
-
- assertTrue("hashCode", fEventInfo1.hashCode() != info2.hashCode());
- assertTrue("hashCode", fEventInfo2.hashCode() != info1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>ChannelInfoTest</code> contains tests for the class
- * <code>{@link ChannelInfo}</code>.
- */
-public class ChannelInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IChannelInfo fChannelInfo1 = null;
- private IChannelInfo fChannelInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fChannelInfo1 = factory.getChannel1();
- fChannelInfo2 = factory.getChannel2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Run the ChannelInfo() constructor test.
- */
- @Test
- public void testChannelInfo() {
- ChannelInfo result = new ChannelInfo("test");
- assertNotNull(result);
-
- assertEquals("test", result.getName());
- assertEquals(0, result.getNumberOfSubBuffers());
- assertEquals("unknown", result.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.UNKNOWN, result.getOutputType());
- assertEquals(false, result.isOverwriteMode());
- assertEquals(0, result.getReadTimer());
- assertEquals("disabled", result.getState().getInName());
- assertEquals(0, result.getSubBufferSize());
- assertEquals(0, result.getSwitchTimer());
- assertEquals(0, result.getMaxSizeTraceFiles());
- assertEquals(0, result.getMaxNumberTraceFiles());
- assertEquals(BufferType.BUFFER_TYPE_UNKNOWN, result.getBufferType());
- }
-
- /**
- * Test copy constructor.
- */
- @Test
- public void testChannelInfoCopy() {
- ChannelInfo channelInfo = new ChannelInfo((ChannelInfo)fChannelInfo1);
-
- assertEquals(fChannelInfo1.getName(), channelInfo.getName());
- assertEquals(fChannelInfo1.getNumberOfSubBuffers(), channelInfo.getNumberOfSubBuffers());
- assertEquals(fChannelInfo1.getOutputType(), channelInfo.getOutputType());
- assertEquals(fChannelInfo1.isOverwriteMode(), channelInfo.isOverwriteMode());
- assertEquals(fChannelInfo1.getReadTimer(), channelInfo.getReadTimer());
- assertEquals(fChannelInfo1.getState(), channelInfo.getState());
- assertEquals(fChannelInfo1.getSwitchTimer(), channelInfo.getSwitchTimer());
- assertEquals(fChannelInfo1.getEvents().length, channelInfo.getEvents().length);
- assertEquals(fChannelInfo1.getMaxSizeTraceFiles(), channelInfo.getMaxSizeTraceFiles());
- assertEquals(fChannelInfo1.getMaxNumberTraceFiles(), channelInfo.getMaxNumberTraceFiles());
- assertEquals(fChannelInfo1.getBufferType(), channelInfo.getBufferType());
-
- IEventInfo[] orignalEvents = fChannelInfo1.getEvents();
- IEventInfo[] resultEvents = channelInfo.getEvents();
- for (int i = 0; i < orignalEvents.length; i++) {
- assertEquals(orignalEvents[i], resultEvents[i]);
- }
- }
-
- /**
- * Test copy constructor with a null value.
- */
- @Test
- public void testChannelCopy2() {
- try {
- ChannelInfo channel = null;
- new ChannelInfo(channel);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the IEventInfo[] getEvents() method test.
- */
- @Test
- public void testAddAndGetEvents_1() {
- ChannelInfo fixture = new ChannelInfo("test");
- fixture.setSwitchTimer(1L);
- fixture.setOverwriteMode(true);
- fixture.setReadTimer(1L);
- fixture.setState(TraceEnablement.DISABLED);
- fixture.setNumberOfSubBuffers(1);
- fixture.setOutputType("");
- fixture.setSubBufferSize(1L);
-
- // add an event
- IEventInfo event = new EventInfo("event");
- fixture.addEvent(event);
-
- // Verify the stored events
- IEventInfo[] result = fixture.getEvents();
-
- assertNotNull(result);
- assertEquals(1, result.length);
- assertNotNull(result[0]);
- assertTrue(event.equals(result[0]));
- }
-
- /**
- * Run the long getNumberOfSubBuffers() method test.
- */
- @Test
- public void testGetAndSetters() {
- ChannelInfo fixture = new ChannelInfo("test");
- fixture.setSwitchTimer(2L);
- fixture.setOverwriteMode(true);
- fixture.setReadTimer(3L);
- fixture.setState(TraceEnablement.DISABLED);
- fixture.setNumberOfSubBuffers(4);
- fixture.setOutputType("splice()");
- fixture.setSubBufferSize(1L);
- fixture.setMaxSizeTraceFiles(1024);
- fixture.setMaxNumberTraceFiles(20);
- fixture.setBufferType(BufferType.BUFFER_PER_UID);
- fixture.addEvent(new EventInfo("event"));
-
- long switchTimer = fixture.getSwitchTimer();
- assertEquals(2L, switchTimer);
-
- boolean mode = fixture.isOverwriteMode();
- assertTrue(mode);
-
- long readTimer = fixture.getReadTimer();
- assertEquals(3L, readTimer);
-
- TraceEnablement state = fixture.getState();
- assertEquals("disabled", state.getInName());
-
- long numSubBuffers = fixture.getNumberOfSubBuffers();
- assertEquals(4, numSubBuffers);
-
- String outputType = fixture.getOutputType().getInName();
- assertEquals("splice()", outputType);
-
- long subBufferSize = fixture.getSubBufferSize();
- assertEquals(1L, subBufferSize);
-
- int maxSizeTraceFiles = fixture.getMaxSizeTraceFiles();
- assertEquals(1024, maxSizeTraceFiles);
-
- int maxNumberTraceFiles = fixture.getMaxNumberTraceFiles();
- assertEquals(20, maxNumberTraceFiles);
-
- BufferType bufferType = fixture.getBufferType();
- assertTrue(bufferType == BufferType.BUFFER_PER_UID);
-
- fixture.setSwitchTimer(5L);
- fixture.setOverwriteMode(false);
- fixture.setReadTimer(6L);
- fixture.setState(TraceEnablement.ENABLED);
- fixture.setNumberOfSubBuffers(7);
- fixture.setOutputType("mmap()");
- fixture.setSubBufferSize(8L);
- fixture.setMaxSizeTraceFiles(4096);
- fixture.setMaxNumberTraceFiles(10);
- fixture.setBufferType(BufferType.BUFFER_PER_PID);
-
- switchTimer = fixture.getSwitchTimer();
- assertEquals(5L, switchTimer);
-
- mode = fixture.isOverwriteMode();
- assertFalse(mode);
-
- readTimer = fixture.getReadTimer();
- assertEquals(6L, readTimer);
-
- state = fixture.getState();
- assertEquals("enabled", state.getInName());
-
- numSubBuffers = fixture.getNumberOfSubBuffers();
- assertEquals(7, numSubBuffers);
-
- outputType = fixture.getOutputType().getInName();
- assertEquals("mmap()", outputType);
-
- subBufferSize = fixture.getSubBufferSize();
- assertEquals(8L, subBufferSize);
-
- maxSizeTraceFiles = fixture.getMaxSizeTraceFiles();
- assertEquals(4096, maxSizeTraceFiles);
-
- maxNumberTraceFiles = fixture.getMaxNumberTraceFiles();
- assertEquals(10, maxNumberTraceFiles);
-
- bufferType = fixture.getBufferType();
- assertTrue(bufferType == BufferType.BUFFER_PER_PID);
- }
-
- /**
- * Run the void setEvents(List<IEventInfo>) method test.
- */
- @Test
- public void testSetEvents_1() {
- ChannelInfo fixture = new ChannelInfo("test");
- fixture.setSwitchTimer(1L);
- fixture.setOverwriteMode(true);
- fixture.setReadTimer(1L);
- fixture.setState(TraceEnablement.DISABLED);
- fixture.setNumberOfSubBuffers(1);
- fixture.setOutputType("");
- fixture.setSubBufferSize(1L);
- List<IEventInfo> events = new LinkedList<>();
-
- for (int i = 0; i < 2; i++) {
- IEventInfo info = new EventInfo("event" + i);
- info.setEventType("tracepoint");
- info.setState((i % 2 == 0 ? "enabled" : "disabled"));
- events.add(info);
- }
-
- fixture.setEvents(events);
-
- IEventInfo[] infos = fixture.getEvents();
-
- assertEquals(events.size(), infos.length);
-
- for (int i = 0; i < infos.length; i++) {
- assertEquals(events.get(i), infos[i]);
- }
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- ChannelInfo fixture = new ChannelInfo("channel");
- fixture.setSwitchTimer(1L);
- fixture.setOverwriteMode(true);
- fixture.setReadTimer(1L);
- fixture.setState(TraceEnablement.DISABLED);
- fixture.setNumberOfSubBuffers(1);
- fixture.setOutputType("splice()");
- fixture.setSubBufferSize(1L);
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("[ChannelInfo([TraceInfo(Name=channel)],State=DISABLED,OverwriteMode=true,SubBuffersSize=1,NumberOfSubBuffers=1,SwitchTimer=1,ReadTimer=1,output=splice(),Events=None)]", result);
- }
-
- /**
- * Run another String toString() method test.
- */
- @Test
- public void testToString_2() {
- String result = fChannelInfo1.toString();
-
- // add additional test code here
- assertEquals("[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fChannelInfo1.equals(fChannelInfo1));
- assertTrue("equals", fChannelInfo2.equals(fChannelInfo2));
-
- assertTrue("equals", !fChannelInfo1.equals(fChannelInfo2));
- assertTrue("equals", !fChannelInfo2.equals(fChannelInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- ChannelInfo event1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
- ChannelInfo event2 = new ChannelInfo((ChannelInfo)fChannelInfo2);
-
- assertTrue("equals", event1.equals(fChannelInfo1));
- assertTrue("equals", fChannelInfo1.equals(event1));
-
- assertTrue("equals", event2.equals(fChannelInfo2));
- assertTrue("equals", fChannelInfo2.equals(event2));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- ChannelInfo channel1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
- ChannelInfo channel2 = new ChannelInfo((ChannelInfo)fChannelInfo1);
- ChannelInfo channel3 = new ChannelInfo((ChannelInfo)fChannelInfo1);
-
- assertTrue("equals", channel1.equals(channel2));
- assertTrue("equals", channel2.equals(channel3));
- assertTrue("equals", channel1.equals(channel3));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fChannelInfo1.equals(null));
- assertTrue("equals", !fChannelInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- ChannelInfo channel1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
- ChannelInfo channel2 = new ChannelInfo((ChannelInfo)fChannelInfo2);
-
- assertTrue("hashCode", fChannelInfo1.hashCode() == channel1.hashCode());
- assertTrue("hashCode", fChannelInfo2.hashCode() == channel2.hashCode());
-
- assertTrue("hashCode", fChannelInfo1.hashCode() != channel2.hashCode());
- assertTrue("hashCode", fChannelInfo2.hashCode() != channel1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>ChannelInfoTest</code> contains tests for the class
- * <code>{@link DomainInfo}</code>.
- */
-public class DomainInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IDomainInfo fDomainInfo1 = null;
- private IDomainInfo fDomainInfo2 = null;
- private IChannelInfo fChannelInfo1 = null;
- private IChannelInfo fChannelInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- // Get test instances from the factory
- ModelImplFactory factory = new ModelImplFactory();
- fChannelInfo1 = factory.getChannel1();
- fChannelInfo2 = factory.getChannel2();
- fDomainInfo1 = factory.getDomainInfo1();
- fDomainInfo2 = factory.getDomainInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Run the ChannelInfo() constructor test.
- */
- @Test
- public void testDomainInfo() {
- DomainInfo result = new DomainInfo("test");
- assertNotNull(result);
-
- assertEquals("test", result.getName());
- assertEquals(0, result.getChannels().length);
- }
-
- /**
- * Test the copy constructor.
- */
- @Test
- public void testDomainInfoCopy() {
- DomainInfo channelInfo = new DomainInfo((DomainInfo)fDomainInfo1);
- IChannelInfo[] orignalEvents = fDomainInfo1.getChannels();
- IChannelInfo[] resultEvents = channelInfo.getChannels();
- for (int i = 0; i < orignalEvents.length; i++) {
- assertEquals(orignalEvents[i], resultEvents[i]);
- }
- }
-
- /**
- * Test the copy constructor.
- */
- @Test
- public void testDomainlCopy2() {
- try {
- DomainInfo domain = null;
- new DomainInfo(domain);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the long getNumberOfSubBuffers() method test.
- */
- @Test
- public void testGetAndSetters() {
-
- // Note that addChannel() has been executed in setUp()
- // check get method here
- assertEquals(1, fDomainInfo1.getChannels().length);
- assertNotNull(fDomainInfo1.getChannels()[0]);
- assertEquals(fChannelInfo1, fDomainInfo1.getChannels()[0]);
-
- IDomainInfo domain = new DomainInfo("domain");
- List<IChannelInfo> list = new LinkedList<>();
- list.add(fChannelInfo1);
- list.add(fChannelInfo2);
- domain.setChannels(list);
-
- IChannelInfo[] result = domain.getChannels();
- assertEquals(2, result.length);
- assertEquals(fChannelInfo1, result[0]);
- assertEquals(fChannelInfo2, result[1]);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- DomainInfo fixture = new DomainInfo("domain");
-
- String result = fixture.toString();
-
- assertEquals("[DomainInfo([TraceInfo(Name=domain)],Channels=None,isKernel=false)]", result);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_2() {
- String result = fDomainInfo1.toString();
-
- assertEquals("[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])],isKernel=false)]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fDomainInfo1.equals(fDomainInfo1));
- assertTrue("equals", fDomainInfo2.equals(fDomainInfo2));
-
- assertTrue("equals", !fDomainInfo1.equals(fDomainInfo2));
- assertTrue("equals", !fDomainInfo2.equals(fDomainInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- DomainInfo event1 = new DomainInfo((DomainInfo)fDomainInfo1);
- DomainInfo event2 = new DomainInfo((DomainInfo)fDomainInfo2);
-
- assertTrue("equals", event1.equals(fDomainInfo1));
- assertTrue("equals", fDomainInfo1.equals(event1));
-
- assertTrue("equals", event2.equals(fDomainInfo2));
- assertTrue("equals", fDomainInfo2.equals(event2));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- DomainInfo channel1 = new DomainInfo((DomainInfo)fDomainInfo1);
- DomainInfo channel2 = new DomainInfo((DomainInfo)fDomainInfo1);
- DomainInfo channel3 = new DomainInfo((DomainInfo)fDomainInfo1);
-
- assertTrue("equals", channel1.equals(channel2));
- assertTrue("equals", channel2.equals(channel3));
- assertTrue("equals", channel1.equals(channel3));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fDomainInfo1.equals(null));
- assertTrue("equals", !fDomainInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- DomainInfo channel1 = new DomainInfo((DomainInfo)fDomainInfo1);
- DomainInfo channel2 = new DomainInfo((DomainInfo)fDomainInfo2);
-
- assertTrue("hashCode", fDomainInfo1.hashCode() == channel1.hashCode());
- assertTrue("hashCode", fDomainInfo2.hashCode() == channel2.hashCode());
-
- assertTrue("hashCode", fDomainInfo1.hashCode() != channel2.hashCode());
- assertTrue("hashCode", fDomainInfo2.hashCode() != channel1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>EventInfoTest</code> contains test for the class
- * <code>{@link EventInfo}</code>.
- */
-public class EventInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IEventInfo fEventInfo1 = null;
- private IEventInfo fEventInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fEventInfo1 = factory.getEventInfo1();
- fEventInfo2 = factory.getEventInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Run the EventInfo() constructor test.
- */
- @Test
- public void testBaseEventInfo() {
- EventInfo fixture = new EventInfo("event");
- assertNotNull(fixture);
-
- TraceEventType result = fixture.getEventType();
-
- assertEquals("event", fixture.getName());
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- TraceEnablement state = fixture.getState();
- assertEquals("disabled", state.getInName());
- assertEquals("DISABLED", state.name());
- assertEquals("DISABLED", state.toString());
- assertEquals(0, state.ordinal());
-
- LogLevelType logType = fixture.getLogLevelType();
- assertEquals("", logType.getShortName());
- assertEquals("LOGLEVEL_NONE", logType.name());
- assertEquals("LOGLEVEL_NONE", logType.toString());
- assertEquals(0, state.ordinal());
-
-
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventInfoCopy() {
- EventInfo info = new EventInfo((EventInfo)fEventInfo1);
-
- assertEquals(fEventInfo1.getName(), info.getName());
- assertEquals(fEventInfo1.getEventType(), info.getEventType());
- assertEquals(fEventInfo1.getState(), info.getState());
- assertEquals(fEventInfo1.getLogLevelType(), info.getLogLevelType());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventCopy2() {
- try {
- EventInfo info = null;
- new EventInfo(info);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Getter/Setter tests
- */
- @Test
- public void testGetAndSetter() {
- EventInfo fixture = new EventInfo("event");
-
- fixture.setEventType(TraceEventType.TRACEPOINT);
- TraceEventType result = fixture.getEventType();
-
- // setEventType(TraceEventType type)
- assertNotNull(result);
- assertEquals("tracepoint", result.getInName());
- assertEquals("TRACEPOINT", result.name());
- assertEquals("TRACEPOINT", result.toString());
- assertEquals(0, result.ordinal());
-
- fixture.setEventType(TraceEventType.UNKNOWN);
- result = fixture.getEventType();
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- // setEventType(String typeName)
- String typeName = "";
- fixture.setEventType(typeName);
- result = fixture.getEventType();
-
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- typeName = "unknown";
-
- fixture.setEventType(typeName);
- result = fixture.getEventType();
-
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- // setState(String stateName)
- fixture.setState("disabled");
- TraceEnablement state = fixture.getState();
- assertEquals("disabled", state.getInName());
- assertEquals("DISABLED", state.name());
- assertEquals("DISABLED", state.toString());
- assertEquals(0, state.ordinal());
-
- fixture.setState("false");
- state = fixture.getState();
- assertEquals("false", state.getInMiName());
- assertEquals("DISABLED", state.name());
- assertEquals("DISABLED", state.toString());
- assertEquals(0, state.ordinal());
-
- fixture.setState("bla");
- state = fixture.getState();
- assertEquals("disabled", state.getInName());
- assertEquals("DISABLED", state.name());
- assertEquals("DISABLED", state.toString());
- assertEquals(0, state.ordinal());
-
- fixture.setState("enabled");
- state = fixture.getState();
- assertEquals("enabled", state.getInName());
- assertEquals("ENABLED", state.name());
- assertEquals("ENABLED", state.toString());
- assertEquals(1, state.ordinal());
-
- fixture.setState("true");
- state = fixture.getState();
- assertEquals("true", state.getInMiName());
- assertEquals("ENABLED", state.name());
- assertEquals("ENABLED", state.toString());
- assertEquals(1, state.ordinal());
-
- // setState(TraceEnablement state)
- fixture.setState(TraceEnablement.DISABLED);
- state = fixture.getState();
- assertEquals("disabled", state.getInName());
- assertEquals("DISABLED", state.name());
- assertEquals("DISABLED", state.toString());
- assertEquals(0, state.ordinal());
-
- fixture.setState(TraceEnablement.ENABLED);
- state = fixture.getState();
- assertEquals("enabled", state.getInName());
- assertEquals("ENABLED", state.name());
- assertEquals("ENABLED", state.toString());
- assertEquals(1, state.ordinal());
-
- // setLogLevelType(String name)
- fixture.setLogLevelType("==");
- assertEquals("LOGLEVEL_ONLY", fixture.getLogLevelType().name());
- assertEquals("==", fixture.getLogLevelType().getShortName());
-
- fixture.setLogLevelType("<=");
- assertEquals("LOGLEVEL", fixture.getLogLevelType().name());
- assertEquals("<=", fixture.getLogLevelType().getShortName());
-
- fixture.setLogLevelType("");
- assertEquals("LOGLEVEL_ALL", fixture.getLogLevelType().name());
- assertEquals("", fixture.getLogLevelType().getShortName());
-
- fixture.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
- assertEquals("LOGLEVEL_ONLY", fixture.getLogLevelType().name());
- assertEquals("==", fixture.getLogLevelType().getShortName());
-
- fixture.setLogLevelType(LogLevelType.LOGLEVEL);
- assertEquals("LOGLEVEL", fixture.getLogLevelType().name());
- assertEquals("<=", fixture.getLogLevelType().getShortName());
-
- fixture.setLogLevelType(LogLevelType.LOGLEVEL_ALL);
- assertEquals("LOGLEVEL_ALL", fixture.getLogLevelType().name());
- assertEquals("", fixture.getLogLevelType().getShortName());
-
- fixture.setLogLevelType(LogLevelType.LOGLEVEL_NONE);
- assertEquals("LOGLEVEL_NONE", fixture.getLogLevelType().name());
- assertEquals("", fixture.getLogLevelType().getShortName());
-
- // setLogLevelType(String name)
- // machine interface
- fixture.setLogLevelType("SINGLE");
- assertEquals("LOGLEVEL_ONLY", fixture.getLogLevelType().name());
- assertEquals("SINGLE", fixture.getLogLevelType().getMiName());
-
- fixture.setLogLevelType("RANGE");
- assertEquals("LOGLEVEL", fixture.getLogLevelType().name());
- assertEquals("RANGE", fixture.getLogLevelType().getMiName());
-
- fixture.setLogLevelType("ALL");
- assertEquals("LOGLEVEL_ALL", fixture.getLogLevelType().name());
- assertEquals("ALL", fixture.getLogLevelType().getMiName());
-
- fixture.setLogLevelType("UNKNOWN");
- assertEquals("LOGLEVEL_NONE", fixture.getLogLevelType().name());
- assertEquals("UNKNOWN", fixture.getLogLevelType().getMiName());
-
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- EventInfo fixture = new EventInfo("event");
- fixture.setName("testName");
- fixture.setEventType(TraceEventType.TRACEPOINT);
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("[EventInfo([BaseEventInfo([TraceInfo(Name=testName)],type=TRACEPOINT,level=TRACE_DEBUG)],State=DISABLED,levelType=LOGLEVEL_NONE)]", result);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_2() {
- EventInfo fixture = new EventInfo("event");
- fixture.setName("testName");
- fixture.setEventType(TraceEventType.TRACEPOINT);
- fixture.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("[EventInfo([BaseEventInfo([TraceInfo(Name=testName)],type=TRACEPOINT,level=TRACE_DEBUG)],State=DISABLED,levelType=LOGLEVEL_ONLY)]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fEventInfo1.equals(fEventInfo1));
- assertTrue("equals", fEventInfo2.equals(fEventInfo2));
-
- assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
- assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
- EventInfo info2 = new EventInfo((EventInfo)fEventInfo2);
-
- assertTrue("equals", info1.equals(fEventInfo1));
- assertTrue("equals", fEventInfo1.equals(info1));
-
- assertTrue("equals", info2.equals(fEventInfo2));
- assertTrue("equals", fEventInfo2.equals(info2));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
- EventInfo info2 = new EventInfo((EventInfo)fEventInfo1);
- EventInfo info3 = new EventInfo((EventInfo)fEventInfo1);
-
- assertTrue("equals", info1.equals(info2));
- assertTrue("equals", info2.equals(info3));
- assertTrue("equals", info1.equals(info3));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fEventInfo1.equals(null));
- assertTrue("equals", !fEventInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
- EventInfo info2 = new EventInfo((EventInfo)fEventInfo2);
-
- assertTrue("hashCode", fEventInfo1.hashCode() == info1.hashCode());
- assertTrue("hashCode", fEventInfo2.hashCode() == info2.hashCode());
-
- assertTrue("hashCode", fEventInfo1.hashCode() != info2.hashCode());
- assertTrue("hashCode", fEventInfo2.hashCode() != info1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>FieldInfoTest</code> contains test for the class
- * <code>{@link FieldInfo}</code>.
- */
-public class FieldInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IFieldInfo fFieldInfo1 = null;
- private IFieldInfo fFieldInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fFieldInfo1 = factory.getFieldInfo1();
- fFieldInfo2 = factory.getFieldInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Run the BaseEventInfo() constructor test.
- */
- @Test
- public void testFiledInfo() {
- FieldInfo fixture = new FieldInfo("field");
- assertNotNull(fixture);
-
- assertEquals("field", fixture.getName());
- assertNull(fixture.getFieldType());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventInfoCopy() {
- FieldInfo info = new FieldInfo((FieldInfo)fFieldInfo1);
-
- assertEquals(fFieldInfo1.getName(), info.getName());
- assertEquals(fFieldInfo1.getFieldType(), info.getFieldType());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventCopy2() {
- try {
- FieldInfo info = null;
- new FieldInfo(info);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the TraceEventType getEventType() method test.
- */
- @Test
- public void testSetFieldType() {
- FieldInfo info = new FieldInfo((FieldInfo)fFieldInfo1);
-
- info.setFieldType("string");
- assertEquals("string", info.getFieldType());
- }
-
- /**
- * Run the toString() method test.
- */
- @Test
- public void testToString() {
- String result = fFieldInfo1.toString();
-
- // add additional test code here
- assertEquals("[FieldInfo([TraceInfo(Name=intfield)],type=int", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fFieldInfo1.equals(fFieldInfo1));
- assertTrue("equals", fFieldInfo2.equals(fFieldInfo2));
-
- assertTrue("equals", !fFieldInfo1.equals(fFieldInfo2));
- assertTrue("equals", !fFieldInfo2.equals(fFieldInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- FieldInfo info1 = new FieldInfo((FieldInfo)fFieldInfo1);
- FieldInfo info2 = new FieldInfo((FieldInfo)fFieldInfo2);
-
- assertTrue("equals", info1.equals(fFieldInfo1));
- assertTrue("equals", fFieldInfo1.equals(info1));
-
- assertTrue("equals", info2.equals(fFieldInfo2));
- assertTrue("equals", fFieldInfo2.equals(info2));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- FieldInfo info1 = new FieldInfo((FieldInfo)fFieldInfo1);
- FieldInfo info2 = new FieldInfo((FieldInfo)fFieldInfo1);
- FieldInfo info3 = new FieldInfo((FieldInfo)fFieldInfo1);
-
- assertTrue("equals", info1.equals(info2));
- assertTrue("equals", info2.equals(info3));
- assertTrue("equals", info1.equals(info3));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fFieldInfo1.equals(null));
- assertTrue("equals", !fFieldInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testHashCode() {
- FieldInfo info1 = new FieldInfo((FieldInfo)fFieldInfo1);
- FieldInfo info2 = new FieldInfo((FieldInfo)fFieldInfo2);
-
- assertTrue("hashCode", fFieldInfo1.hashCode() == info1.hashCode());
- assertTrue("hashCode", fFieldInfo2.hashCode() == info2.hashCode());
-
- assertTrue("hashCode", fFieldInfo1.hashCode() != info2.hashCode());
- assertTrue("hashCode", fFieldInfo2.hashCode() != info1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
-
-/**
- * Test facility to constants across test case
- */
-@SuppressWarnings("javadoc")
-public class ModelImplFactory {
-
- private ISessionInfo fSessionInfo1 = null;
- private ISessionInfo fSessionInfo2 = null;
- private IDomainInfo fDomainInfo1 = null;
- private IDomainInfo fDomainInfo2 = null;
- private IChannelInfo fChannelInfo1 = null;
- private IChannelInfo fChannelInfo2 = null;
- private IEventInfo fEventInfo1 = null;
- private IEventInfo fEventInfo2 = null;
- private IEventInfo fEventInfo3 = null;
- private IFieldInfo fFieldInfo1 = null;
- private IFieldInfo fFieldInfo2 = null;
- private IBaseEventInfo fBaseEventInfo1 = null;
- private IBaseEventInfo fBaseEventInfo2 = null;
- private IUstProviderInfo fUstProviderInfo1 = null;
- private IUstProviderInfo fUstProviderInfo2 = null;
- private IProbeEventInfo fProbeEventInfo1 = null;
- private IProbeEventInfo fProbeEventInfo2 = null;
- private ISnapshotInfo fSnapshotInfo1 = null;
- private ISnapshotInfo fSnapshotInfo2 = null;
-
- public ModelImplFactory() {
-
- fFieldInfo1 = new FieldInfo("intfield");
- fFieldInfo1.setFieldType("int");
- fFieldInfo2 = new FieldInfo("stringfield");
- fFieldInfo2.setFieldType("string");
-
- fBaseEventInfo1 = new BaseEventInfo("event1");
- fBaseEventInfo1.setEventType(TraceEventType.UNKNOWN);
- fBaseEventInfo1.setLogLevel(TraceLogLevel.TRACE_ERR);
- fBaseEventInfo1.addField(fFieldInfo1);
- fBaseEventInfo1.addField(fFieldInfo2);
- fBaseEventInfo1.setFilterExpression("intField==10");
-
- fBaseEventInfo2 = new BaseEventInfo("event2");
- fBaseEventInfo2.setEventType(TraceEventType.TRACEPOINT);
- fBaseEventInfo1.setLogLevel(TraceLogLevel.TRACE_DEBUG);
-
- fEventInfo1 = new EventInfo("event1");
- fEventInfo1.setEventType(TraceEventType.TRACEPOINT);
- fEventInfo1.setLogLevelType("==");
- fEventInfo1.setLogLevel(TraceLogLevel.TRACE_DEBUG);
- fEventInfo1.setState(TraceEnablement.ENABLED);
-
- fEventInfo2 = new EventInfo("event2");
- fEventInfo2.setLogLevelType("<=");
- fEventInfo2.setLogLevel(TraceLogLevel.TRACE_INFO);
- fEventInfo2.setEventType(TraceEventType.UNKNOWN);
- fEventInfo2.setState(TraceEnablement.DISABLED);
-
- fEventInfo3 = new EventInfo("event3");
- fEventInfo3.setEventType(TraceEventType.TRACEPOINT);
- fEventInfo3.setState(TraceEnablement.DISABLED);
-
- fUstProviderInfo1 = new UstProviderInfo("myUST1");
- fUstProviderInfo1.setPid(1234);
- fUstProviderInfo1.addEvent(fBaseEventInfo1);
-
- fUstProviderInfo2 = new UstProviderInfo("myUST2");
- fUstProviderInfo2.setPid(2345);
- fUstProviderInfo2.addEvent(fBaseEventInfo1);
- fUstProviderInfo2.addEvent(fBaseEventInfo2);
-
- fChannelInfo1 = new ChannelInfo("channel1");
- fChannelInfo1.setSwitchTimer(10L);
- fChannelInfo1.setOverwriteMode(true);
- fChannelInfo1.setReadTimer(11L);
- fChannelInfo1.setState(TraceEnablement.DISABLED);
- fChannelInfo1.setNumberOfSubBuffers(12);
- fChannelInfo1.setOutputType("splice()");
- fChannelInfo1.setSubBufferSize(13L);
- fChannelInfo1.addEvent(fEventInfo1);
-
- fChannelInfo2 = new ChannelInfo("channel2");
- fChannelInfo2.setSwitchTimer(1L);
- fChannelInfo2.setOverwriteMode(false);
- fChannelInfo2.setReadTimer(2L);
- fChannelInfo2.setState(TraceEnablement.ENABLED);
- fChannelInfo2.setNumberOfSubBuffers(3);
- fChannelInfo2.setOutputType("mmap()");
- fChannelInfo2.setSubBufferSize(4L);
- fChannelInfo2.addEvent(fEventInfo2);
- fChannelInfo2.addEvent(fEventInfo3);
-
- fDomainInfo1 = new DomainInfo("test1");
- fDomainInfo1.addChannel(fChannelInfo1);
-
- fDomainInfo2 = new DomainInfo("test2");
- fDomainInfo2.addChannel(fChannelInfo1);
- fDomainInfo2.addChannel(fChannelInfo2);
-
- fSessionInfo1 = new SessionInfo("session1");
- fSessionInfo1.setSessionPath("/home/user");
- fSessionInfo1.setSessionState(TraceSessionState.ACTIVE);
- fSessionInfo1.addDomain(fDomainInfo1);
-
- fSessionInfo2 = new SessionInfo("session2");
- fSessionInfo2.setSessionPath("/home/user1");
- fSessionInfo2.setSessionState(TraceSessionState.INACTIVE);
- fSessionInfo2.addDomain(fDomainInfo1);
- fSessionInfo2.addDomain(fDomainInfo2);
- fSessionInfo2.setStreamedTrace(true);
-
- fProbeEventInfo1 = new ProbeEventInfo("probeEvent1");
- fProbeEventInfo1.setEventType(TraceEventType.TRACEPOINT);
- fProbeEventInfo1.setState(TraceEnablement.ENABLED);
- fProbeEventInfo1.setAddress("0xc1231234");
-
- fProbeEventInfo2 = new ProbeEventInfo("probeEvent2");
- fProbeEventInfo2.setEventType(TraceEventType.FUNCTION);
- fProbeEventInfo2.setState(TraceEnablement.DISABLED);
- fProbeEventInfo2.setOffset("0x100");
- fProbeEventInfo2.setSymbol("init_post");
-
- fSnapshotInfo1 = new SnapshotInfo("snapshot-1");
- fSnapshotInfo1.setId(1);
- fSnapshotInfo1.setSnapshotPath("/home/user/lttng-trace/mysession/");
- fSnapshotInfo2 = new SnapshotInfo("other-snapshot");
- fSnapshotInfo2.setId(1);
- fSnapshotInfo2.setSnapshotPath("net4://172.0.0.1:1234/");
- fSnapshotInfo2.setStreamedSnapshot(true);
-
- fSessionInfo1.setSnapshotInfo(fSnapshotInfo1);
- }
-
- public ISessionInfo getSessionInfo1() {
- return fSessionInfo1;
- }
-
- public ISessionInfo getSessionInfo2() {
- return fSessionInfo2;
- }
-
- public IDomainInfo getDomainInfo1() {
- return fDomainInfo1;
- }
-
- public IDomainInfo getDomainInfo2() {
- return fDomainInfo2;
- }
-
- public IChannelInfo getChannel1() {
- return fChannelInfo1;
- }
-
- public IChannelInfo getChannel2() {
- return fChannelInfo2;
- }
-
- public IEventInfo getEventInfo1() {
- return fEventInfo1;
- }
-
- public IEventInfo getEventInfo2() {
- return fEventInfo2;
- }
-
- public IEventInfo getEventInfo3() {
- return fEventInfo3;
- }
-
- public IBaseEventInfo getBaseEventInfo1() {
- return fBaseEventInfo1;
- }
-
- public IBaseEventInfo getBaseEventInfo2() {
- return fBaseEventInfo2;
- }
-
- public IUstProviderInfo getUstProviderInfo1() {
- return fUstProviderInfo1;
- }
-
- public IUstProviderInfo getUstProviderInfo2() {
- return fUstProviderInfo2;
- }
-
- public IProbeEventInfo getProbeEventInfo1() {
- return fProbeEventInfo1;
- }
-
- public IProbeEventInfo getProbeEventInfo2() {
- return fProbeEventInfo2;
- }
-
- public IFieldInfo getFieldInfo1() {
- return fFieldInfo1;
- }
-
- public IFieldInfo getFieldInfo2() {
- return fFieldInfo2;
- }
-
- public ISnapshotInfo getSnapshotInfo1() {
- return fSnapshotInfo1;
- }
-
- public ISnapshotInfo getSnapshotInfo2() {
- return fSnapshotInfo2;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>ProbEventInfoTest</code> contains test for the class
- * <code>{@link ProbeEventInfo}</code>.
- */
-public class ProbeEventInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IProbeEventInfo fEventInfo1 = null;
- private IProbeEventInfo fEventInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fEventInfo1 = factory.getProbeEventInfo1();
- fEventInfo2 = factory.getProbeEventInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Run the BaseEventInfo() constructor test.
- */
- @Test
- public void testBaseEventInfo() {
- ProbeEventInfo fixture = new ProbeEventInfo("event");
- assertNotNull(fixture);
-
- TraceEventType result = fixture.getEventType();
-
- assertEquals("event", fixture.getName());
- assertEquals("unknown", result.getInName());
- assertEquals("UNKNOWN", result.name());
- assertEquals("UNKNOWN", result.toString());
- assertEquals(4, result.ordinal());
-
- TraceEnablement state = fixture.getState();
- assertEquals("disabled", state.getInName());
- assertEquals("DISABLED", state.name());
- assertEquals("DISABLED", state.toString());
- assertEquals(0, state.ordinal());
-
- assertNull(fixture.getAddress());
- assertNull(fixture.getOffset());
- assertNull(fixture.getSymbol());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventInfoCopy() {
- ProbeEventInfo info = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
-
- assertEquals(fEventInfo1.getName(), info.getName());
- assertEquals(fEventInfo1.getEventType(), info.getEventType());
- assertEquals(fEventInfo1.getState(), info.getState());
- assertEquals(fEventInfo1.getAddress(), info.getAddress());
- assertEquals(fEventInfo1.getOffset(), info.getOffset());
- assertEquals(fEventInfo1.getSymbol(), info.getSymbol());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testEventCopy2() {
- try {
- ProbeEventInfo info = null;
- new ProbeEventInfo(info);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Getter/Setter tests
- */
- @Test
- public void testGetAndSetter() {
- ProbeEventInfo fixture = new ProbeEventInfo("event");
-
- fixture.setAddress("0xc12344321");
- String result = fixture.getAddress();
-
- assertNotNull(result);
- assertEquals("0xc12344321", result);
-
- fixture.setOffset("0x1000");
- result = fixture.getOffset();
-
- assertNotNull(result);
- assertEquals("0x1000", result);
-
- fixture.setSymbol("cpu_idle");
- result = fixture.getSymbol();
-
- assertNotNull(result);
- assertEquals("cpu_idle", result);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- assertEquals("[ProbeEventInfo([EventInfo([BaseEventInfo([TraceInfo(Name=probeEvent1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_NONE)],fAddress=0xc1231234)]", fEventInfo1.toString());
- assertEquals("[ProbeEventInfo([EventInfo([BaseEventInfo([TraceInfo(Name=probeEvent2)],type=FUNCTION,level=TRACE_DEBUG)],State=DISABLED,levelType=LOGLEVEL_NONE)],fOffset=0x100,fSymbol=init_post)]", fEventInfo2.toString());
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fEventInfo1.equals(fEventInfo1));
- assertTrue("equals", fEventInfo2.equals(fEventInfo2));
-
- assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
- assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
- ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo2);
-
- assertTrue("equals", info1.equals(fEventInfo1));
- assertTrue("equals", fEventInfo1.equals(info1));
-
- assertTrue("equals", info2.equals(fEventInfo2));
- assertTrue("equals", fEventInfo2.equals(info2));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
- ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
- ProbeEventInfo info3 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
-
- assertTrue("equals", info1.equals(info2));
- assertTrue("equals", info2.equals(info3));
- assertTrue("equals", info1.equals(info3));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fEventInfo1.equals(null));
- assertTrue("equals", !fEventInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
- ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo2);
-
- assertTrue("hashCode", fEventInfo1.hashCode() == info1.hashCode());
- assertTrue("hashCode", fEventInfo2.hashCode() == info2.hashCode());
-
- assertTrue("hashCode", fEventInfo1.hashCode() != info2.hashCode());
- assertTrue("hashCode", fEventInfo2.hashCode() != info1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>ChannelInfoTest</code> contains tests for the class
- * <code>{@link SessionInfo}</code>.
- */
-public class SessionInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private ISessionInfo fSessionInfo1 = null;
- private ISessionInfo fSessionInfo2 = null;
-
- private IDomainInfo fDomainInfo1 = null;
- private IDomainInfo fDomainInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fSessionInfo1 = factory.getSessionInfo1();
- fDomainInfo1 = factory.getDomainInfo1();
- fSessionInfo2 = factory.getSessionInfo2();
- fDomainInfo2 = factory.getDomainInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Run the ChannelInfo() constructor test.
- */
- @Test
- public void testSessionInfo() {
- ISessionInfo result = new SessionInfo("test");
- assertNotNull(result);
-
- assertEquals("test", result.getName());
- assertEquals("", result.getSessionPath());
- TraceSessionState state = result.getSessionState();
- assertEquals("inactive", state.getInName());
- assertEquals("INACTIVE", state.name());
- assertEquals("INACTIVE", state.toString());
- assertEquals(0, state.ordinal());
- assertEquals(0, result.getDomains().length);
- assertFalse(result.isSnapshotSession());
- assertNull(result.getNetworkUrl());
- assertNull(result.getControlUrl());
- assertNull(result.getDataUrl());
- }
-
- /**
- * Test copy constructor.
- */
- @Test
- public void testSessionInfoCopy() {
- SessionInfo sessionInfo = new SessionInfo((SessionInfo)fSessionInfo1);
-
- assertEquals(sessionInfo.getName(), fSessionInfo1.getName());
- assertEquals(sessionInfo.getSessionPath(), fSessionInfo1.getSessionPath());
- assertEquals(sessionInfo.getSessionState(), fSessionInfo1.getSessionState());
-
- IDomainInfo[] orignalDomains = fSessionInfo1.getDomains();
- IDomainInfo[] resultDomains = sessionInfo.getDomains();
- for (int i = 0; i < orignalDomains.length; i++) {
- assertEquals(orignalDomains[i], resultDomains[i]);
- }
-
- assertEquals(sessionInfo.getNetworkUrl(), fSessionInfo1.getNetworkUrl());
- assertEquals(sessionInfo.getControlUrl(), fSessionInfo1.getControlUrl());
- assertEquals(sessionInfo.getDataUrl(), fSessionInfo1.getDataUrl());
- }
-
- /**
- * Test copy constructor.
- */
- @Test
- public void testSessionCopy2() {
- try {
- SessionInfo session = null;
- new SessionInfo(session);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the long getNumberOfSubBuffers() method test.
- */
- @Test
- public void testGetAndSetters() {
-
- // Note that addDomain() has been executed in setUp()
- // check get method here
- assertEquals(1, fSessionInfo1.getDomains().length);
- assertNotNull(fSessionInfo1.getDomains()[0]);
- assertEquals(fDomainInfo1, fSessionInfo1.getDomains()[0]);
-
- ISessionInfo session = new SessionInfo("session");
- List<IDomainInfo> list = new LinkedList<>();
- list.add(fDomainInfo1);
- list.add(fDomainInfo2);
- session.setDomains(list);
-
- IDomainInfo[] result = session.getDomains();
- assertEquals(2, result.length);
- assertEquals(fDomainInfo1, result[0]);
- assertEquals(fDomainInfo2, result[1]);
-
- session.setSessionPath("/home/user");
- assertEquals("/home/user", session.getSessionPath());
-
- session.setSessionState("active");
- TraceSessionState state = session.getSessionState();
- state = session.getSessionState();
- assertEquals("active", state.getInName());
- assertEquals("ACTIVE", state.name());
- assertEquals("ACTIVE", state.toString());
- assertEquals(1, state.ordinal());
-
- session.setSessionState("inactive");
- state = session.getSessionState();
- assertEquals("inactive", state.getInName());
- assertEquals("INACTIVE", state.name());
- assertEquals("INACTIVE", state.toString());
- assertEquals(0, state.ordinal());
-
- session.setSessionState("test");
- state = session.getSessionState();
- assertEquals("inactive", state.getInName());
- assertEquals("INACTIVE", state.name());
- assertEquals("INACTIVE", state.toString());
- assertEquals(0, state.ordinal());
-
- session.setSessionState(TraceSessionState.ACTIVE);
- state = session.getSessionState();
- assertEquals("active", state.getInName());
- assertEquals("ACTIVE", state.name());
- assertEquals("ACTIVE", state.toString());
- assertEquals(1, state.ordinal());
-
- session.setSessionState(TraceSessionState.INACTIVE);
- state = session.getSessionState();
- assertEquals("inactive", state.getInName());
- assertEquals("INACTIVE", state.name());
- assertEquals("INACTIVE", state.toString());
- assertEquals(0, state.ordinal());
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- ISessionInfo fixture = new SessionInfo("sessionName");
-
- String result = fixture.toString();
-
- // add additional test code here
- assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],Path=,State=INACTIVE,isStreamedTrace=false,isSnapshot=false,Domains=,NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_2() {
- String result = fSessionInfo1.toString();
-
- // add additional test code here
- assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,isSnapshot=false,snapshotInfo="
- + "[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)],"
- + "Domains=[DomainInfo([TraceInfo(Name=test1)],"
- + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),"
- + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])],"
- + "isKernel=false)],NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_3() {
- SessionInfo info = new SessionInfo((SessionInfo)fSessionInfo1);
- info.setSnapshot(false);
- info.setSnapshotInfo(null);
- info.setSessionPath("/home/user/lttng-trace/mysession/");
-
- String result = info.toString();
-
- // add additional test code here
- assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,isSnapshot=false,"
- + "Domains=[DomainInfo([TraceInfo(Name=test1)],"
- + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),"
- + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])],"
- + "isKernel=false)],NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the {@link SessionInfo#equals} method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fSessionInfo1.equals(fSessionInfo1));
- assertTrue("equals", fSessionInfo2.equals(fSessionInfo2));
-
- assertTrue("equals", !fSessionInfo1.equals(fSessionInfo2));
- assertTrue("equals", !fSessionInfo2.equals(fSessionInfo1));
- }
-
- /**
- * Run the {@link SessionInfo#equals} method test.
- */
- @Test
- public void testEqualsSymmetry() {
- SessionInfo event1 = new SessionInfo((SessionInfo)fSessionInfo1);
- SessionInfo event2 = new SessionInfo((SessionInfo)fSessionInfo2);
-
- assertTrue("equals", event1.equals(fSessionInfo1));
- assertTrue("equals", fSessionInfo1.equals(event1));
-
- assertTrue("equals", event2.equals(fSessionInfo2));
- assertTrue("equals", fSessionInfo2.equals(event2));
- }
-
- /**
- * Run the {@link SessionInfo#equals} method test.
- */
- @Test
- public void testEqualsTransivity() {
- SessionInfo channel1 = new SessionInfo((SessionInfo)fSessionInfo1);
- SessionInfo channel2 = new SessionInfo((SessionInfo)fSessionInfo1);
- SessionInfo channel3 = new SessionInfo((SessionInfo)fSessionInfo1);
-
- assertTrue("equals", channel1.equals(channel2));
- assertTrue("equals", channel2.equals(channel3));
- assertTrue("equals", channel1.equals(channel3));
- }
-
- /**
- * Run the {@link SessionInfo#equals} method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fSessionInfo1.equals(null));
- assertTrue("equals", !fSessionInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the {@link SessionInfo#hashCode} method test.
- */
- @Test
- public void testHashCode() {
- SessionInfo channel1 = new SessionInfo((SessionInfo)fSessionInfo1);
- SessionInfo channel2 = new SessionInfo((SessionInfo)fSessionInfo2);
-
- assertTrue("hashCode", fSessionInfo1.hashCode() == channel1.hashCode());
- assertTrue("hashCode", fSessionInfo2.hashCode() == channel2.hashCode());
-
- assertTrue("hashCode", fSessionInfo1.hashCode() != channel2.hashCode());
- assertTrue("hashCode", fSessionInfo2.hashCode() != channel1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.TraceInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>SnapshotInfoTest</code> contains test for the class
- * <code>{@link SnapshotInfo}</code>.
- */
-public class SnapshotInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private ISnapshotInfo fSnapshotInfo1 = null;
- private ISnapshotInfo fSnapshotInfo2 = null;
-
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fSnapshotInfo1 = factory.getSnapshotInfo1();
- fSnapshotInfo2 = factory.getSnapshotInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Constructor test.
- */
- @Test
- public void testSnapshotInfo() {
- SnapshotInfo fixture = new SnapshotInfo("event");
- assertNotNull(fixture);
- assertEquals("event", fixture.getName());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testSnapshotInfo2() {
- try {
- String name = null;
- new SnapshotInfo(name);
- fail("null name in custructor");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testSnapshotCopy() {
- SnapshotInfo info = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
-
- assertEquals(fSnapshotInfo1.getName(), info.getName());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testTraceCopy2() {
- try {
- SnapshotInfo info = null;
- new SnapshotInfo(info);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the void setEventType(String) method test.
- */
- @Test
- public void testSetName() {
- SnapshotInfo fixture = new SnapshotInfo("event");
- fixture.setName("newName");
- assertEquals("newName", fixture.getName());
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- String result = fSnapshotInfo1.toString();
-
- // add additional test code here
- assertEquals("[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fSnapshotInfo1.equals(fSnapshotInfo1));
- assertTrue("equals", fSnapshotInfo2.equals(fSnapshotInfo2));
-
- assertTrue("equals", !fSnapshotInfo1.equals(fSnapshotInfo2));
- assertTrue("equals", !fSnapshotInfo2.equals(fSnapshotInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
- SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo2);
-
- assertTrue("equals", info1.equals(fSnapshotInfo1));
- assertTrue("equals", fSnapshotInfo1.equals(info1));
-
- assertTrue("equals", info2.equals(fSnapshotInfo2));
- assertTrue("equals", fSnapshotInfo2.equals(info2));
- }
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
- SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
- SnapshotInfo info3 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
-
- assertTrue("equals", info1.equals(info2));
- assertTrue("equals", info2.equals(info3));
- assertTrue("equals", info1.equals(info3));
- }
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fSnapshotInfo1.equals(null));
- assertTrue("equals", !fSnapshotInfo2.equals(null));
-
- SnapshotInfo info = new SnapshotInfo("snapshot-1");
- assertTrue("equals", !fSnapshotInfo1.equals(info));
-
- info.setSnapshotPath(null);
- assertTrue("equals", !fSnapshotInfo1.equals(info));
-
- info.setId(fSnapshotInfo1.getId());
- assertTrue("equals", !info.equals(fSnapshotInfo1));
-
- info.setSnapshotPath("/home/user/lttng-trace/mysession/");
- assertTrue("equals", fSnapshotInfo1.equals(info));
- info.setId(2);
- assertTrue("equals", !fSnapshotInfo1.equals(info));
-
- info.setId(fSnapshotInfo1.getId());
- info.setStreamedSnapshot(true);
- assertTrue("equals", !fSnapshotInfo1.equals(info));
-
- assertTrue("equals", !fSnapshotInfo1.equals(new TraceInfo(fSnapshotInfo1.getName())));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
- SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo2);
-
- assertTrue("hashCode", fSnapshotInfo1.hashCode() == info1.hashCode());
- assertTrue("hashCode", fSnapshotInfo2.hashCode() == info2.hashCode());
-
- assertTrue("hashCode", fSnapshotInfo1.hashCode() != info2.hashCode());
- assertTrue("hashCode", fSnapshotInfo2.hashCode() != info1.hashCode());
-
- // null values
- SnapshotInfo info3 = new SnapshotInfo("snapshot-1");
- assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode());
-
- info3.setSnapshotPath(null);
- assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode());
-
- info3.setSnapshotPath("/home/user/lttng-trace/mysession/");
- assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ITraceInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.TraceInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>TraceInfoTest</code> contains test for the class
- * <code>{@link TraceInfo}</code>.
- */
-public class TraceInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private ITraceInfo fTraceInfo1 = null;
- private ITraceInfo fTraceInfo2 = null;
-
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- fTraceInfo1 = new TraceInfo("event1");
- fTraceInfo2 = new TraceInfo("event2");
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Run the BaseEventInfo() constructor test.
- */
- @Test
- public void testTraceInfo() {
- TraceInfo fixture = new TraceInfo("event");
- assertNotNull(fixture);
-
- assertEquals("event", fixture.getName());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testTraceInfo2() {
- try {
- String name = null;
- new TraceInfo(name);
- fail("null name in custructor");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testTraceInfoCopy() {
- TraceInfo info = new TraceInfo((TraceInfo)fTraceInfo1);
-
- assertEquals(fTraceInfo1.getName(), info.getName());
- }
-
- /**
- * Test Copy Constructor
- */
- @Test
- public void testTraceCopy2() {
- try {
- TraceInfo info = null;
- new TraceInfo(info);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the void setEventType(String) method test.
- */
- @Test
- public void testSetName() {
- TraceInfo fixture = new TraceInfo("event");
- fixture.setName("newName");
- assertEquals("newName", fixture.getName());
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- String result = fTraceInfo1.toString();
-
- // add additional test code here
- assertEquals("[TraceInfo(Name=event1)]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fTraceInfo1.equals(fTraceInfo1));
- assertTrue("equals", fTraceInfo2.equals(fTraceInfo2));
-
- assertTrue("equals", !fTraceInfo1.equals(fTraceInfo2));
- assertTrue("equals", !fTraceInfo2.equals(fTraceInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
- TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo2);
-
- assertTrue("equals", info1.equals(fTraceInfo1));
- assertTrue("equals", fTraceInfo1.equals(info1));
-
- assertTrue("equals", info2.equals(fTraceInfo2));
- assertTrue("equals", fTraceInfo2.equals(info2));
- }
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
- TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo1);
- TraceInfo info3 = new TraceInfo((TraceInfo)fTraceInfo1);
-
- assertTrue("equals", info1.equals(info2));
- assertTrue("equals", info2.equals(info3));
- assertTrue("equals", info1.equals(info3));
- }
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fTraceInfo1.equals(null));
- assertTrue("equals", !fTraceInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
- TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo2);
-
- assertTrue("hashCode", fTraceInfo1.hashCode() == info1.hashCode());
- assertTrue("hashCode", fTraceInfo2.hashCode() == info2.hashCode());
-
- assertTrue("hashCode", fTraceInfo1.hashCode() != info2.hashCode());
- assertTrue("hashCode", fTraceInfo2.hashCode() != info1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
-
-import static org.junit.Assert.*;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * The class <code>ChannelInfoTest</code> contains tests for the class
- * <code>{@link UstProviderInfo}</code>.
- */
-public class UstProviderInfoTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private IUstProviderInfo fUstProviderInfo1 = null;
- private IUstProviderInfo fUstProviderInfo2 = null;
-
- private IBaseEventInfo fEventInfo1 = null;
- private IBaseEventInfo fEventInfo2 = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- ModelImplFactory factory = new ModelImplFactory();
- fUstProviderInfo1 = factory.getUstProviderInfo1();
- fUstProviderInfo2 = factory.getUstProviderInfo2();
- fEventInfo1 = factory.getBaseEventInfo1();
- fEventInfo2 = factory.getBaseEventInfo2();
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Run the UstProviderInfo() constructor test.
- */
- @Test
- public void testUstProviderInfo() {
- IUstProviderInfo result = new UstProviderInfo("test");
- assertNotNull(result);
-
- assertEquals("test", result.getName());
- assertEquals(0, result.getPid());
- assertEquals(0, result.getEvents().length);
- }
-
- /**
- * Test the copy constructor.
- */
- @Test
- public void testUstProviderInfoCopy() {
- IUstProviderInfo providerInf = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
-
- assertEquals(fUstProviderInfo1.getName(), providerInf.getName());
- assertEquals(fUstProviderInfo1.getPid(), providerInf.getPid());
- assertEquals(fUstProviderInfo1.getEvents().length, providerInf.getEvents().length);
-
- IBaseEventInfo[] orignalEvents = fUstProviderInfo1.getEvents();
- IBaseEventInfo[] resultEvents = providerInf.getEvents();
- for (int i = 0; i < orignalEvents.length; i++) {
- assertEquals(orignalEvents[i], resultEvents[i]);
- }
- }
-
- /**
- * Test the copy constructor.
- */
- @Test
- public void testUstProviderCopy2() {
- try {
- UstProviderInfo providerInfo = null;
- new UstProviderInfo(providerInfo);
- fail("null copy");
- }
- catch (IllegalArgumentException e) {
- // Success
- }
- }
-
- /**
- * Run the IEventInfo[] getEvents() method test.
- */
- @Test
- public void testGetAndSetters() {
- IUstProviderInfo fixture = new UstProviderInfo("test");
- fixture.setPid(2468);
-
- // add an event
- IBaseEventInfo event = new BaseEventInfo("event");
- fixture.addEvent(event);
-
- // Verify the stored events
- IBaseEventInfo[] result = fixture.getEvents();
-
- assertNotNull(result);
- assertEquals(1, result.length);
- assertNotNull(result[0]);
- assertTrue(event.equals(result[0]));
-
- assertEquals(2468, fixture.getPid());
- }
-
- /**
- * Run the void setEvents(List<IBaseEventInfo>) method test.
- */
- @Test
- public void testSetEvents_1() {
- UstProviderInfo fixture = new UstProviderInfo("test");
- fixture.setPid(2468);
- List<IBaseEventInfo> events = new LinkedList<>();
- events.add(fEventInfo1);
- events.add(fEventInfo2);
- fixture.setEvents(events);
-
- IBaseEventInfo[] infos = fixture.getEvents();
-
- assertEquals(events.size(), infos.length);
-
- for (int i = 0; i < infos.length; i++) {
- assertEquals(events.get(i), infos[i]);
- }
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_1() {
- UstProviderInfo fixture = new UstProviderInfo("test");
- fixture.setPid(2468);
- String result = fixture.toString();
-
- assertEquals("[EventInfo([TraceInfo(Name=test)],PID=2468,Events=None)]", result);
- }
-
- /**
- * Run the String toString() method test.
- */
- @Test
- public void testToString_2() {
- String result = fUstProviderInfo2.toString();
- assertEquals("[EventInfo([TraceInfo(Name=myUST2)],PID=2345,Events=[BaseEventInfo([TraceInfo(Name=event1)]," +
- "type=UNKNOWN,level=TRACE_DEBUG,Fields=[FieldInfo([TraceInfo(Name=intfield)],type=int[FieldInfo" +
- "([TraceInfo(Name=stringfield)],type=string,Filter=intField==10)][BaseEventInfo([TraceInfo(Name=event2)]," +
- "type=TRACEPOINT,level=TRACE_DEBUG)])]", result);
- }
-
- // ------------------------------------------------------------------------
- // equals
- // ------------------------------------------------------------------------
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsReflexivity() {
- assertTrue("equals", fUstProviderInfo1.equals(fUstProviderInfo1));
- assertTrue("equals", fUstProviderInfo2.equals(fUstProviderInfo2));
-
- assertTrue("equals", !fUstProviderInfo1.equals(fUstProviderInfo2));
- assertTrue("equals", !fUstProviderInfo2.equals(fUstProviderInfo1));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsSymmetry() {
- UstProviderInfo event1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
- UstProviderInfo event2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo2);
-
- assertTrue("equals", event1.equals(fUstProviderInfo1));
- assertTrue("equals", fUstProviderInfo1.equals(event1));
-
- assertTrue("equals", event2.equals(fUstProviderInfo2));
- assertTrue("equals", fUstProviderInfo2.equals(event2));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsTransivity() {
- UstProviderInfo UstProvider1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
- UstProviderInfo UstProvider2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
- UstProviderInfo UstProvider3 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
-
- assertTrue("equals", UstProvider1.equals(UstProvider2));
- assertTrue("equals", UstProvider2.equals(UstProvider3));
- assertTrue("equals", UstProvider1.equals(UstProvider3));
- }
-
- /**
- * Run the equals() method test.
- */
- @Test
- public void testEqualsNull() {
- assertTrue("equals", !fUstProviderInfo1.equals(null));
- assertTrue("equals", !fUstProviderInfo2.equals(null));
- }
-
- // ------------------------------------------------------------------------
- // hashCode
- // ------------------------------------------------------------------------
-
- /**
- * Run the hashCode() method test.
- */
- @Test
- public void testHashCode() {
- UstProviderInfo UstProvider1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
- UstProviderInfo UstProvider2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo2);
-
- assertTrue("hashCode", fUstProviderInfo1.hashCode() == UstProvider1.hashCode());
- assertTrue("hashCode", fUstProviderInfo2.hashCode() == UstProvider2.hashCode());
-
- assertTrue("hashCode", fUstProviderInfo1.hashCode() != UstProvider2.hashCode());
- assertTrue("hashCode", fUstProviderInfo2.hashCode() != UstProvider1.hashCode());
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.relayd;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.LttngRelaydConnectorFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.Command;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionReturnCode;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetNextIndex;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NextIndexReturnCode;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ViewerCommand;
-import org.junit.Test;
-
-/**
- * Unit tests for lttng-relayd. It actually allows us to test the API.
- *
- * @author Matthew Khouzam
- */
-public class LttngRelayd24Test {
-
- private static final int PACKETS_TO_READ = 100;
- private static final String ADDRESS = "127.0.0.1"; // change me //$NON-NLS-1$
- private static final int PORT = 5344;
-
- private static void getPackets(AttachSessionResponse attachedSession, Socket connection, ILttngRelaydConnector relayD) throws IOException {
- int numPacketsReceived = 0;
- DataOutputStream fOutNet = new DataOutputStream(connection.getOutputStream());
- DataInputStream fInNet = new DataInputStream(connection.getInputStream());
- while (numPacketsReceived < PACKETS_TO_READ) {
- for (StreamResponse stream : attachedSession.getStreamList()) {
- if (stream.getMetadataFlag() != 1) {
- ConnectResponse connectPayload = new ConnectResponse(fInNet);
- assertNotNull(connectPayload);
-
- ViewerCommand connectCommand = new ViewerCommand(Command.VIEWER_GET_NEXT_INDEX, ConnectResponse.SIZE, 0);
- fOutNet.write(connectCommand.serialize());
- fOutNet.flush();
-
- GetNextIndex indexRequest = new GetNextIndex(stream.getId());
- fOutNet.write(indexRequest.serialize());
- fOutNet.flush();
-
- IndexResponse indexReply = new IndexResponse(fInNet);
- // Nothing else supported for now
- if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_OK) {
- if (relayD.getPacketFromStream(indexReply, stream.getId()) != null) {
- numPacketsReceived++;
- }
- }
- }
- }
- }
- }
-
- /**
- * Test a connection
- *
- * @throws IOException
- * network timeout?
- */
- @Test
- public void testViewerConnection() throws IOException {
- InetAddress addr = InetAddress.getByName(ADDRESS);
- try (Socket connection = new Socket(addr, PORT);
- ILttngRelaydConnector relayD = LttngRelaydConnectorFactory.getNewConnector(connection);) {
-
- List<SessionResponse> sessions = relayD.getSessions();
- assertTrue(sessions.size() > 0);
- SessionResponse lttngViewerSession = sessions.get(0);
- assertNotNull(lttngViewerSession);
- CreateSessionResponse createSession = relayD.createSession();
- assertEquals(createSession.getStatus(), CreateSessionReturnCode.LTTNG_VIEWER_CREATE_SESSION_OK);
- AttachSessionResponse attachedSession = relayD.attachToSession(lttngViewerSession);
-
- String metaData = relayD.getMetadata(attachedSession);
- assertNotNull(metaData);
-
- getPackets(attachedSession, connection, relayD);
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *********************************************************************/
-package org.eclipse.linuxtools.lttng2.control.core.tests.session;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Run all the tests in the lttng2.core.session plugin.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- SessionConfigGeneratorTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.tests.session;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.linuxtools.internal.lttng2.control.core.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigGenerator;
-import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
-import org.eclipse.linuxtools.lttng2.control.core.tests.model.impl.ModelImplFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * This class contains tests for the class {@link SessionConfigGenerator}.
- */
-public class SessionConfigGeneratorTest {
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- /** Session files for validation */
- private static final File VALID_SESSION_FILE = new File("../org.eclipse.linuxtools.lttng2.control.core.tests/test_session_config_files/test_valid.lttng");
- private static final File INVALID_SESSION_FILE = new File("../org.eclipse.linuxtools.lttng2.control.core.tests/test_session_config_files/test_invalid.lttng");
-
- private static final String SESSION_FILENAME = "test_session." + SessionConfigStrings.SESSION_CONFIG_FILE_EXTENSION;
- private static final IPath SESSION_FILE_PATH = Activator.getDefault().getStateLocation().addTrailingSeparator().append(SESSION_FILENAME);
- private static final String TRACE_SESSION_PATH = "/home/user/folder";
-
- private static final String SESSION_NAME_1 = "session1";
- private static final String SESSION_NAME_2 = "session2";
- private static final String SESSION_NAME_3 = "session3";
-
- /** Session informations for generation tests */
- private ISessionInfo fValidSessionInfo = null;
- private ISessionInfo fValidSessionSnapshotInfo = null;
- private ISessionInfo fInvalidSessionInfo = null;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
- /**
- * Perform pre-test initialization.
- */
- @Before
- public void setUp() {
- /* A valid domain with shared buffer type */
- ModelImplFactory factory = new ModelImplFactory();
- IDomainInfo domain = factory.getDomainInfo1();
- domain.setBufferType(BufferType.BUFFER_SHARED);
-
- /* The valid sessions */
- fValidSessionInfo = new SessionInfo(SESSION_NAME_1);
- fValidSessionInfo.setSessionPath(TRACE_SESSION_PATH);
- fValidSessionInfo.setSessionState(TraceSessionState.ACTIVE);
- fValidSessionInfo.addDomain(domain);
-
- fValidSessionSnapshotInfo = new SessionInfo(SESSION_NAME_2);
- fValidSessionSnapshotInfo.setSessionPath(TRACE_SESSION_PATH);
- fValidSessionSnapshotInfo.setSessionState(TraceSessionState.ACTIVE);
- fValidSessionSnapshotInfo.addDomain(domain);
- fValidSessionSnapshotInfo.setSnapshotInfo(factory.getSnapshotInfo1());
-
- /* The invalid session contains an event with an invalid type */
- fInvalidSessionInfo = factory.getSessionInfo2();
- fInvalidSessionInfo.setName(SESSION_NAME_3);
- }
-
- /**
- * Delete the session file created
- */
- @After
- public void tearUp() {
- /* Tear up the file created if it exists */
- File sessionConfigurationFile = SESSION_FILE_PATH.toFile();
- if (sessionConfigurationFile.exists()) {
- sessionConfigurationFile.delete();
- }
-
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link SessionConfigGenerator#sessionValidate(File)}
- */
- @Test
- public void testSessionValidate() {
- File testSessionFile = VALID_SESSION_FILE;
- if ((testSessionFile == null) || !testSessionFile.exists()) {
- fail("Session test file does not exist");
- }
- IStatus status = SessionConfigGenerator.sessionValidate(testSessionFile);
- if (!status.isOK()) {
- fail(status.getMessage());
- }
-
- testSessionFile = INVALID_SESSION_FILE;
- if ((testSessionFile == null) || !testSessionFile.exists()) {
- fail("Session test file does not exist");
- }
- assertFalse(SessionConfigGenerator.sessionValidate(testSessionFile).isOK());
- }
-
- /**
- * Test method for
- * {@link SessionConfigGenerator#generateSessionConfig(Set, IPath)}
- */
- @Test
- public void testGenerateSessionConfig() {
- /* Should fail since it's empty */
- final Set<ISessionInfo> sessions = new HashSet<>();
- assertFalse(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
-
- /* Add a valid session and validate */
- sessions.add(fValidSessionInfo);
- assertTrue(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
- assertTrue(SessionConfigGenerator.sessionValidate(SESSION_FILE_PATH.toFile()).isOK());
-
- /* Add a valid snapshot session and validate */
- sessions.add(fValidSessionSnapshotInfo);
- assertTrue(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
- assertTrue(SessionConfigGenerator.sessionValidate(SESSION_FILE_PATH.toFile()).isOK());
-
- /* Add an invalid session */
- sessions.add(fInvalidSessionInfo);
- assertFalse(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
- <!--***************************************************************************\r
- * Copyright(C) 2014 École Polytechnique de Montréal\r
- *\r
- * All rights reserved. This program and the accompanying materials are\r
- * made available under the terms of the Eclipse Public License v1.0 which\r
- * accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * Guilliano Molaire - Initial API and implementation\r
- ***************************************************************************\r
- This is an invalid session configuration file. The domain type\r
- is missing.-->\r
-<sessions>\r
- <session>\r
- <name>auto-20140323-130527</name>\r
- <started>false</started>\r
- <domains>\r
- <domain>\r
- <buffer_type>GLOBAL</buffer_type>\r
- <channels>\r
- <channel>\r
- <name>channel0</name>\r
- <overwrite_mode>DISCARD</overwrite_mode>\r
- <subbuffer_count>4</subbuffer_count>\r
- <switch_timer_interval>0</switch_timer_interval>\r
- <tracefile_size>0</tracefile_size>\r
- <tracefile_count>0</tracefile_count>\r
- <live_timer_interval>0</live_timer_interval>\r
- <enabled>false</enabled>\r
- <subbuffer_size>262144</subbuffer_size>\r
- <read_timer_interval>200000</read_timer_interval>\r
- <output_type>SPLICE</output_type>\r
- <events>\r
- <event>\r
- <name>exit_syscall</name>\r
- <enabled>true</enabled>\r
- <type>TRACEPOINT</type>\r
- </event>\r
- </events>\r
- </channel>\r
- </channels>\r
- </domain>\r
- </domains>\r
- <output>\r
- <consumer_output>\r
- <enabled>true</enabled>\r
- <destination>\r
- <path>/home/user/folder</path>\r
- </destination>\r
- </consumer_output>\r
- </output>\r
- </session>\r
-</sessions>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
- <!--***************************************************************************\r
- * Copyright(C) 2014 École Polytechnique de Montréal\r
- *\r
- * All rights reserved. This program and the accompanying materials are\r
- * made available under the terms of the Eclipse Public License v1.0 which\r
- * accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * Guilliano Molaire - Initial API and implementation\r
- ***************************************************************************\r
- This is a valid session configuration file. All mandatory\r
- elements are provided.-->\r
-<sessions>\r
- <session>\r
- <name>auto-20140323-130527</name>\r
- <started>false</started>\r
- <domains>\r
- <domain>\r
- <type>KERNEL</type>\r
- <buffer_type>GLOBAL</buffer_type>\r
- <channels>\r
- <channel>\r
- <name>channel0</name>\r
- <overwrite_mode>DISCARD</overwrite_mode>\r
- <subbuffer_count>4</subbuffer_count>\r
- <switch_timer_interval>0</switch_timer_interval>\r
- <tracefile_size>0</tracefile_size>\r
- <tracefile_count>0</tracefile_count>\r
- <live_timer_interval>0</live_timer_interval>\r
- <enabled>false</enabled>\r
- <subbuffer_size>262144</subbuffer_size>\r
- <read_timer_interval>200000</read_timer_interval>\r
- <output_type>SPLICE</output_type>\r
- <events>\r
- <event>\r
- <name>exit_syscall</name>\r
- <enabled>true</enabled>\r
- <type>TRACEPOINT</type>\r
- </event>\r
- </events>\r
- </channel>\r
- </channels>\r
- </domain>\r
- </domains>\r
- <output>\r
- <consumer_output>\r
- <enabled>true</enabled>\r
- <destination>\r
- <path>/home/user/folder</path>\r
- </destination>\r
- </consumer_output>\r
- </output>\r
- </session>\r
-</sessions>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.control.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.control.core;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.control.core.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.tracecompass.ctf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core;bundle-version="3.1.0"
-Export-Package: org.eclipse.linuxtools.internal.lttng2.control.core;x-friends:="org.eclipse.linuxtools.lttng2.control.core.tests",
- org.eclipse.linuxtools.internal.lttng2.control.core.model;x-friends:="org.eclipse.linuxtools.lttng2.control.ui,org.eclipse.linuxtools.lttng2.control.ui.tests,org.eclipse.linuxtools.lttng2.control.core.tests",
- org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;x-friends:="org.eclipse.linuxtools.lttng2.control.ui,org.eclipse.linuxtools.lttng2.control.ui.tests,org.eclipse.linuxtools.lttng2.control.core.tests",
- org.eclipse.linuxtools.internal.lttng2.control.core.relayd;x-friends:="org.eclipse.linuxtools.lttng2.control.core.tests,org.eclipse.linuxtools.lttng2.control.ui,org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl;x-friends:="org.eclipse.linuxtools.lttng2.control.core.tests,org.eclipse.linuxtools.lttng2.control.ui,org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;x-friends:="org.eclipse.linuxtools.lttng2.control.core.tests,org.eclipse.linuxtools.lttng2.control.ui,org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.lttng2.control.core.session
-Import-Package: com.google.common.collect
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.control.core
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Control Core Plug-in
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.control.core</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools LTTng Control Core Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * <b><u>Activator</u></b>
- * <p>
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.control.core"; //$NON-NLS-1$
-
- /**
- * The shared instance
- */
- private static Activator plugin;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ------------------------------------------------------------------------
- // Operators
- // ------------------------------------------------------------------------
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logInfo(String message) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logInfo(String message, Throwable exception) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logWarning(String message) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logWarning(String message, Throwable exception) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logError(String message) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logError(String message, Throwable exception) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-import java.util.List;
-
-/**
- * <p>
- * Interface for retrieval of basic trace event information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IBaseEventInfo extends ITraceInfo {
-
- /**
- * @return the trace event type
- */
- TraceEventType getEventType();
-
- /**
- * Sets the trace event type to the given type
- * @param type - type to set
- */
- void setEventType(TraceEventType type);
-
- /**
- * Sets the trace event type to the type specified by the given name.
- * @param typeName - event type name
- */
- void setEventType(String typeName);
-
- /**
- * @return the trace event log level
- */
- TraceLogLevel getLogLevel();
-
- /**
- * Sets the trace event log level to the given level
- * @param level - event log level to set
- */
- void setLogLevel(TraceLogLevel level);
-
- /**
- * Sets the trace event log level to the level specified by the given name.
- * @param levelName - event log level name
- */
- void setLogLevel(String levelName);
-
- /**
- * Returns the field information (if exists)
- * @return the field information or null
- */
- IFieldInfo[] getFields();
-
- /**
- * @param field The field to add
- */
- void addField(IFieldInfo field);
-
- /**
- * Sets the fields
- * @param fields The fields
- */
- void setFields(List<IFieldInfo> fields);
-
- /**
- * Returns filter expression.
- * @return filter expression
- */
- String getFilterExpression();
-
- /**
- * Sets the filter expression.
- * @param filter The filter expression to set
- */
- void setFilterExpression(String filter);
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Simon Delisle - Updated for support of LTTng Tools 2.2
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-
-/**
- * <p>
- * Interface for retrieval of trace channel information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IChannelInfo extends ITraceInfo {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Default value for overwrite mode.
- */
- public final static boolean DEFAULT_OVERWRITE_MODE = false;
-
- /**
- * @return the overwrite mode value.
- */
- boolean isOverwriteMode();
- /**
- * Sets the overwrite mode value to the given mode.
- * @param mode - mode to set.
- */
- void setOverwriteMode(boolean mode);
-
- /**
- * @return the sub-buffer size.
- */
- long getSubBufferSize();
- /**
- * Sets the sub-buffer size to the given value.
- * @param bufferSize - size to set to set.
- */
- void setSubBufferSize(long bufferSize);
-
- /**
- * @return the number of sub-buffers.
- */
- int getNumberOfSubBuffers();
- /**
- * Sets the number of sub-buffers to the given value.
- * @param numberOfSubBuffers - value to set.
- */
- void setNumberOfSubBuffers(int numberOfSubBuffers);
-
- /**
- * @return the switch timer interval.
- */
- long getSwitchTimer();
- /**
- * Sets the switch timer interval to the given value.
- * @param timer - timer value to set.
- */
- void setSwitchTimer(long timer);
-
- /**
- * @return the read timer interval.
- */
- long getReadTimer();
- /**
- * Sets the read timer interval to the given value.
- * @param timer - timer value to set..
- */
- void setReadTimer(long timer);
-
- /**
- * @return the output type.
- */
- TraceChannelOutputType getOutputType();
- /**
- * Sets the output type to the given value.
- * @param type - type to set.
- */
- void setOutputType(String type);
- /**
- * Sets the output type to the given value.
- * @param type - type to set.
- */
- void setOutputType(TraceChannelOutputType type);
-
- /**
- * @return the channel state (enabled or disabled).
- */
- TraceEnablement getState();
- /**
- * Sets the channel state (enablement) to the given value.
- * @param state - state to set.
- */
- void setState(TraceEnablement state);
- /**
- * Sets the channel state (enablement) to the value specified by the given name.
- * @param stateName - state to set.
- */
- void setState(String stateName);
-
- /**
- * @return all event information as array.
- */
- IEventInfo[] getEvents();
- /**
- * Sets the event information specified by given list.
- * @param events - all event information to set.
- */
- void setEvents(List<IEventInfo> events);
- /**
- * Adds a single event information.
- * @param event - event information to add.
- */
- void addEvent(IEventInfo event);
- /**
- * Sets the maximum size of trace files
- * @param maxSizeTraceFiles - maximum size
- */
- void setMaxSizeTraceFiles(int maxSizeTraceFiles);
- /**
- * Sets the maximum number of trace files
- * @param maxNumberTraceFiles - maximum number
- */
- void setMaxNumberTraceFiles(int maxNumberTraceFiles);
- /**
- * @return maximum size of trace files
- */
- int getMaxSizeTraceFiles();
- /**
- * @return maximum number of trace files
- */
- int getMaxNumberTraceFiles();
- /**
- * Sets per UID buffers
- * @param buffersUID - enable or not
- */
- void setBufferType(BufferType buffersUID);
- /**
- * @return the value of buffersUID (enable or not)
- */
- BufferType getBufferType();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-
-/**
- * <p>
- * Interface for retrieval of trace domain information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IDomainInfo extends ITraceInfo {
-
- /**
- * @return information about all channels
- */
- IChannelInfo[] getChannels();
-
- /**
- * Sets the channel information specified by given list.
- * @param channels - all channel information to set.
- */
- void setChannels(List<IChannelInfo> channels);
-
- /**
- * Adds a single channel information.
- * @param channel - channel information to add.
- */
- void addChannel(IChannelInfo channel);
-
- /**
- * @return true if domain is kernel, false for UST
- */
- boolean isKernel();
-
- /**
- * Sets whether domain is Kernel domain or UST
- * @param isKernel true for kernel, false for UST
- */
- void setIsKernel(boolean isKernel);
-
- /**
- * @return Information about the buffer type
- */
- BufferType getBufferType();
-
- /**
- * Sets the buffer type
- *
- * @param bufferType
- * The buffer type
- */
- void setBufferType(BufferType bufferType);
-
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * <p>
- * Interface for retrieval of trace event information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IEventInfo extends IBaseEventInfo {
-
- /**
- * @return the event state (enabled or disabled).
- */
- TraceEnablement getState();
-
- /**
- * Sets the event state (enablement) to the given value.
- * @param state - state to set.
- */
- void setState(TraceEnablement state);
-
- /**
- * Sets the event state (enablement) to the value specified by the given name.
- * @param stateName - state to set.
- */
- void setState(String stateName);
-
- /**
- * Returns the log level type.
- * @return log level type.
- */
- LogLevelType getLogLevelType();
-
- /**
- * Sets the LogLevelType.
- * @param type - log level type
- */
- void setLogLevelType(LogLevelType type);
-
- /**
- * Sets the LogLevelType based on given short name.
- * @param shortName - short name of type
- */
- void setLogLevelType(String shortName);
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * <p>
- * Interface for retrieval of event field information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IFieldInfo extends ITraceInfo {
-
- /**
- * @return the event field type
- */
- String getFieldType();
-
- /**
- * Sets field type string
- *
- * @param fieldType - sting of event field type
- */
- void setFieldType(String fieldType);
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * <p>
- * Interface for retrieval of probe event information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IProbeEventInfo extends IEventInfo {
-
- /**
- * @return the address of the probe. (null if not used)
- */
- String getAddress();
-
- /**
- * Sets the address of the probe.
- * @param address - a address (null if not used)
- */
- void setAddress(String address);
-
- /**
- * @return the offset applied to the symbol (null if not used).
- */
- String getOffset();
-
- /**
- * Sets the offset applied to the symbol.
- * @param offset - a offset ((null if not used)
- */
- void setOffset(String offset);
-
- /**
- * @return the symbol name. ((null if not used))
- */
- String getSymbol();
-
- /**
- * Sets the symbol name.
- * @param symbol - a symbol name ((null if not used))
- */
- void setSymbol(String symbol);
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-import java.util.List;
-
-/**
- * <p>
- * Interface for retrieval of trace session information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ISessionInfo extends ITraceInfo {
-
- /**
- * @return the session state state (active or inactive).
- */
- TraceSessionState getSessionState();
- /**
- * Sets the session state to the given value.
- * @param state - state to set.
- */
- void setSessionState(TraceSessionState state);
-
- /**
- * Sets the event state to the value specified by the given name.
- * @param stateName - state to set.
- */
- void setSessionState(String stateName);
-
- /**
- * @return path string where session is located.
- */
- String getSessionPath();
-
- /**
- * Sets the path string (where session is located) to the given value.
- * @param path - session path to set.
- */
- void setSessionPath(String path);
-
- /**
- * @return all domain information as array.
- */
- IDomainInfo[] getDomains();
-
- /**
- * Sets all domain information specified by given list.
- * @param domains - all domain information to set.
- */
- void setDomains(List<IDomainInfo> domains);
-
- /**
- * Adds a single domain information.
- * @param domainInfo domain information to add.
- */
- void addDomain(IDomainInfo domainInfo);
-
- /**
- * Returns if session is streamed over network
- * @return <code>true</code> if streamed over network else <code>false</code>
- */
- boolean isStreamedTrace();
-
- /**
- * Sets whether the trace is streamed or not
- * @param isStreamedTrace <code>true</code> if streamed over network else <code>false</code>
- */
- void setStreamedTrace(boolean isStreamedTrace);
-
- /**
- * Returns whether the session is snapshot session or not
- * @return <code>true</code> if it is snapshot session else <code>false</code>
- */
- boolean isSnapshotSession();
-
- /**
- * Set whether or not the session should be in snapshot mode
- *
- * @param isSnapshot
- * true for snapshot mode, false otherwise
- */
- void setSnapshot(boolean isSnapshot);
-
- /**
- * Gets the snapshot information the session or null if it is not a
- * snapshot session.
- * @return snapshot information
- */
- ISnapshotInfo getSnapshotInfo();
-
- /**
- * Sets the snapshot information of the session
- * @param setSnapshotInfo - the snapshot data to set.
- */
- void setSnapshotInfo(ISnapshotInfo setSnapshotInfo);
-
- /**
- * Get whether or not the session should be in Live mode
- *
- * @return <code>true</code> if is a live session else <code>false</code>
- */
- public boolean isLive();
-
- /**
- * Set whether or not the session should be in Live mode
- *
- * @param isLive
- * true for Live mode, false otherwise
- */
- public void setLive(boolean isLive);
-
- /**
- * Get the live delay which is the delay in micro seconds before the data is
- * flushed and streamed.
- *
- * @return the live delay or -1 if the default value should be used
- */
- public int getLiveDelay();
-
- /**
- * Set the live delay which is the delay in micro seconds before the data is
- * flushed and streamed.
- *
- * @param liveDelay
- * the live delay
- */
- public void setLiveDelay(int liveDelay);
-
- /**
- * Get the network URL in case control and data is configured together
- * otherwise null If it returns a non-null value, getControlUrl() and
- * getDataUrl() have to return null.
- *
- * @return The network URL or null.
- */
- String getNetworkUrl();
-
- /**
- * Set the network URL
- *
- * @param networkUrl
- * the network URL
- */
- void setNetworkUrl(String networkUrl);
-
- /**
- * Get the control URL in case control and data is configured separately. If
- * it returns a non-null value, getDataUrl() has to return a valid value too
- * and getNetworkUrl() has to return null.
- *
- * @return The control URL or null.
- */
- String getControlUrl();
-
- /**
- * Set the control URL
- *
- * @param controlUrl
- * the control URL
- */
- void setControlUrl(String controlUrl);
-
- /**
- * Get the data URL in case control and data is configured separately. If it
- * returns a non-null value, getControlUrl() has to return a valid value too
- * and getNetworkUrl() has to return null.
- *
- * @return The data URL or null.
- */
- String getDataUrl();
-
- /**
- * Set the data URL
- *
- * @param datalUrl
- * the data URL
- */
- void setDataUrl(String datalUrl);
-
- /**
- * Get the live URL.
- *
- * @return the live URL
- */
- String getLiveUrl();
-
- /**
- * Set the live URL.
- *
- * @param liveUrl
- * the live URL
- */
- void setLiveUrl(String liveUrl);
-
- /**
- * Get the live port.
- *
- * @return the live port
- */
- Integer getLivePort();
-
- /**
- * Set the live port.
- *
- * @param livePort
- * the live port
- */
- void setLivePort(Integer livePort);
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-
-/**
- * <p>
- * Interface for retrieval of snapshot information of a session.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ISnapshotInfo extends ITraceInfo {
-
- /**
- * @return path string where snapshot is located.
- */
- String getSnapshotPath();
-
- /**
- * Sets the path string (where snapshot is located) to the given value.
- * @param path - session path to set.
- */
- void setSnapshotPath(String path);
-
- /**
- * @return the snapshot ID.
- */
- int getId();
-
- /**
- * Sets the snapshot ID.
- * @param id - the ID to set.
- */
- void setId(int id);
-
- /**
- * Sets whether snapshot is streamed over the network or stored locally
- * at the tracers host.
- *
- * @param isStreamed - <code>true</code> if streamed else <code>false</code>
- */
- void setStreamedSnapshot(boolean isStreamed);
-
- /**
- * Gets whether snapshot is streamed over the network or stored locally
- * at the tracers host.
- *
- * @return <code>true</code> if streamed else <code>false</code>
- */
- boolean isStreamedSnapshot();
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * <p>
- * Interface for retrieve trace comon information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ITraceInfo {
- /**
- * @return the name of the information element.
- */
- String getName();
-
- /**
- * Sets the name of the information element.
- *
- * @param name
- * The name to assign
- */
- void setName(String name);
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-import java.util.List;
-
-/**
- * <p>
- * Interface for retrieval of UST provider information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IUstProviderInfo extends ITraceInfo {
-
- /**
- * @return the process ID of the UST provider.
- */
- int getPid();
-
- /**
- * Sets the process ID of the UST provider to the given value.
- * @param pid - process ID to set
- */
- void setPid(int pid);
-
- /**
- * @return all event information as array.
- */
- IBaseEventInfo[] getEvents();
-
- /**
- * Sets the event information specified by given list.
- * @param events - all event information to set.
- */
- void setEvents(List<IBaseEventInfo> events);
-
- /**
- * Adds a single event information.
- * @param event - event information to add.
- */
- void addEvent(IBaseEventInfo event);
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- *********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-
-/**
- * Type of log Level enumeration.
- *
- * @author Bernd Hufmann
- */
-public enum LogLevelType {
-
- // ------------------------------------------------------------------------
- // Enum definition
- // ------------------------------------------------------------------------
- /** range of log levels [0,logLevel] */
- LOGLEVEL("<=", "RANGE"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /** all log level */
- LOGLEVEL_ALL("", "ALL"), //$NON-NLS-1$//$NON-NLS-2$
-
- /** single log level */
- LOGLEVEL_ONLY("==", "SINGLE"), //$NON-NLS-1$ //$NON-NLS-2$
-
- /** no log level */
- LOGLEVEL_NONE("", "UNKNOWN"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ------------------------------------------------------------------------
- // Constuctors
- // ------------------------------------------------------------------------
-
- /**
- * Private constructor
- *
- * @param name
- * the name of state
- */
- private LogLevelType(String shortName, String miName) {
- fShortName = shortName;
- fMiName = miName;
- }
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * Name of enum.
- */
- private final String fShortName;
- private final String fMiName;
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return short string
- */
- public String getShortName() {
- return fShortName;
- }
-
- /**
- * @return machine interface name string
- */
- public String getMiName() {
- return fMiName;
- }
-
- // ------------------------------------------------------------------------
- // Utility
- // ------------------------------------------------------------------------
- /**
- * Return the corresponding {@link LogLevelType} to String "name"
- *
- * @param name
- * String to compare to retrieve the good LogLevelType
- * @return the corresponding {@link LogLevelType}
- */
- public static LogLevelType valueOfString(String name) {
- if (name == null) {
- throw new IllegalArgumentException();
- }
- for (LogLevelType lltype : LogLevelType.values()) {
- if (!lltype.equals(LOGLEVEL_NONE)) {
- boolean isEqual = lltype.fShortName.equalsIgnoreCase(name) || lltype.fMiName.equalsIgnoreCase(name);
- if (isEqual) {
- return lltype;
- }
- }
- }
-
- // No match
- return LogLevelType.LOGLEVEL_NONE;
- }
-}
+++ /dev/null
-/**********************************************************************
- * 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * <p>
- * Enumeration for the node connection state.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public enum TargetNodeState {
- /** State when disconnected */
- DISCONNECTED,
- /** State while disconnecting */
- DISCONNECTING,
- /** State when connected */
- CONNECTED,
- /** State while connecting */
- CONNECTING;
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * Trace domain type enumeration.
- *
- * @author Jonathan Rajotte
- */
-public enum TraceChannelOutputType {
- /** Channel output type : splice */
- SPLICE("splice()", "SPLICE" ), //$NON-NLS-1$ //$NON-NLS-2$
- /** Channel output type : mmap */
- MMAP("mmap()", "MMAP"), //$NON-NLS-1$ //$NON-NLS-2$
- /** Channel output type : unknown */
- UNKNOWN("unknown", "unknown"); //$NON-NLS-1$ //$NON-NLS-2$
-
- private final String fInName;
- private final String fInMiName;
-
- private TraceChannelOutputType(String name, String miName) {
- fInName = name;
- fInMiName = miName;
- }
-
- /**
- * Get the type's name
- *
- * @return The type's name
- */
- public String getInName() {
- return fInName;
- }
-
- /**
- * Get the type's name
- *
- * @return The type's name
- */
- public String getInMiName() {
- return fInMiName;
- }
-
- /**
- * Return the corresponding {@link TraceChannelOutputType} of string miName
- *
- * @param name
- * name of the Trace domain type to look for
- * @return the corresponding {@link TraceChannelOutputType}
- */
- public static TraceChannelOutputType valueOfString(String name) {
- if (name == null) {
- throw new IllegalArgumentException();
- }
- for (TraceChannelOutputType tdType : TraceChannelOutputType.values()) {
- boolean isEqual = tdType.getInName().equalsIgnoreCase(name) || tdType.getInMiName().equalsIgnoreCase(name);
- if (isEqual) {
- return tdType;
- }
- }
- // Unknown domain
- return UNKNOWN;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * Trace domain type enumeration.
- *
- * @author Jonathan Rajotte
- */
-public enum TraceDomainType {
- /** Domain type : ust */
- UST("ust"), //$NON-NLS-1$
- /** Domain type : kernel */
- KERNEL("kernel"), //$NON-NLS-1$
- /** Domain type : jul */
- JUL("jul"), //$NON-NLS-1$
- /** Unknown domain type */
- UNKNOWN("Unknown domain type"); //$NON-NLS-1$
-
- private final String fInName;
-
- private TraceDomainType(String name) {
- fInName = name;
- }
-
- /**
- * Get the type's name
- *
- * @return The type's name
- */
- public String getInName() {
- return fInName;
- }
-
- /**
- * Return the corresponding {@link TraceDomainType} of string miName
- *
- * @param miName
- * name of the Trace domain type to look for
- * @return the corresponding {@link TraceDomainType}
- */
- public static TraceDomainType valueOfString(String miName) {
- if (miName == null) {
- throw new IllegalArgumentException();
- }
- for (TraceDomainType tdType : TraceDomainType.values()) {
- if (tdType.getInName().equalsIgnoreCase(miName)) {
- return tdType;
- }
- }
- // Unknown domain
- return UNKNOWN;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Jonathan Rajotte - Machine interface support and utility function
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-import java.security.InvalidParameterException;
-
-/**
- * Enumeration for enabled/disabled states.
- *
- * @author Bernd Hufmann
- */
-public enum TraceEnablement {
-
- // ------------------------------------------------------------------------
- // Enum definition
- // ------------------------------------------------------------------------
- /** Tracing is disabled */
- DISABLED("disabled", "false"), //$NON-NLS-1$ //$NON-NLS-2$
- /** Tracing is enabled */
- ENABLED("enabled", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * Name of enum
- */
- private final String fInName;
- private final String fInMiName;
-
- // ------------------------------------------------------------------------
- // Constuctors
- // ------------------------------------------------------------------------
-
- /**
- * Private constructor
- *
- * @param name
- * the name of state
- */
- private TraceEnablement(String name, String miName) {
- fInName = name;
- fInMiName = miName;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return state name
- */
- public String getInName() {
- return fInName;
- }
-
- /**
- * @return state name
- */
- public String getInMiName() {
- return fInMiName;
- }
-
- /**
- * @param name
- * name of the desired enum
- * @return the corresponding {@link TraceEnablement} matching name
- */
- public static TraceEnablement valueOfString(String name) {
- if (name == null) {
- throw new InvalidParameterException();
- }
- for (TraceEnablement enablementType : TraceEnablement.values()) {
- boolean exist = enablementType.fInName.equalsIgnoreCase(name) || enablementType.fInMiName.equalsIgnoreCase(name);
- if (exist) {
- return enablementType;
- }
- }
- return DISABLED;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * Trace event type enumeration.
- *
- * @author Bernd Hufmann
- */
-public enum TraceEventType {
- /** Event type: tracepoint */
- TRACEPOINT("tracepoint"), //$NON-NLS-1$
- /** Event type: syscall */
- SYSCALL("syscall"), //$NON-NLS-1$
- /** Event type: probe */
- PROBE("probe"), //$NON-NLS-1$
- /** Event type: function */
- FUNCTION("function"), //$NON-NLS-1$
- /** Event type unknown */
- UNKNOWN("unknown"); //$NON-NLS-1$
-
- private final String fInName;
-
- private TraceEventType(String name) {
- fInName = name;
- }
-
- /**
- * Get the type's name
- *
- * @return The type's name
- */
- public String getInName() {
- return fInName;
- }
-
- /**
- * Return the corresponding {@link TraceEventType} of string miName
- *
- * @param name
- * name of the {@link TraceEventType} to look for
- * @return the corresponding {@link TraceEventType}
- */
- public static TraceEventType valueOfString(String name) {
- if (name == null) {
- throw new IllegalArgumentException();
- }
- for (TraceEventType teType : TraceEventType.values()) {
- if (teType.getInName().equalsIgnoreCase(name)) {
- return teType;
- }
- }
- return UNKNOWN;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Jonathan Rajotte - Utility function
- *********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-
-/**
- * Log Level enumeration.
- *
- * @author Bernd Hufmann
- */
-@SuppressWarnings("nls")
-public enum TraceLogLevel {
-
- // ------------------------------------------------------------------------
- // Enum definition
- // ------------------------------------------------------------------------
- /** Log level 0 */
- TRACE_EMERG("TRACE_EMERG"),
- /** Log level 1 */
- TRACE_ALERT("TRACE_ALERT"),
- /** Log level 2 */
- TRACE_CRIT("TRACE_CRIT"),
- /** Log level 3 */
- TRACE_ERR("TRACE_ERR"),
- /** Log level 4 */
- TRACE_WARNING("TRACE_WARNING"),
- /** Log level 5 */
- TRACE_NOTICE("TRACE_NOTICE"),
- /** Log level 6 */
- TRACE_INFO("TRACE_INFO"),
- /** Log level 7 */
- TRACE_DEBUG_SYSTEM("TRACE_DEBUG_SYSTEM"),
- /** Log level 8 */
- TRACE_DEBUG_PROGRAM("TRACE_DEBUG_PROGRAM"),
- /** Log level 9 */
- TRACE_DEBUG_PROCESS("TRACE_DEBUG_PROCESS"),
- /** Log level 10 */
- TRACE_DEBUG_MODULE("TRACE_DEBUG_MODULE"),
- /** Log level 11 */
- TRACE_DEBUG_UNIT("TRACE_DEBUG_UNIT"),
- /** Log level 12 */
- TRACE_DEBUG_FUNCTION("TRACE_DEBUG_FUNCTION"),
- /** Log level 13 */
- TRACE_DEBUG_LINE("TRACE_DEBUG_LINE"),
- /** Log level 14 */
- TRACE_DEBUG("TRACE_DEBUG"),
- /** Log level 15 */
- LEVEL_UNKNOWN("LEVEL_UNKNOWN");
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * Name of enum.
- */
- private final String fInName;
-
- // ------------------------------------------------------------------------
- // Constuctors
- // ------------------------------------------------------------------------
-
- /**
- * Private constructor
- *
- * @param name
- * the name of state
- */
- private TraceLogLevel(String name) {
- fInName = name;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return state name
- */
- public String getInName() {
- return fInName;
- }
-
- // ------------------------------------------------------------------------
- // Utility
- // ------------------------------------------------------------------------
- /**
- * Return the corresponding {@link TraceLogLevel} to String "name"
- *
- * @param name
- * String to compare to retrieve the good {@link TraceLogLevel}
- * @return the corresponding {@link TraceLogLevel}
- */
- public static TraceLogLevel valueOfString(String name) {
- if (name == null) {
- throw new IllegalArgumentException();
- }
- for (TraceLogLevel tllevel : TraceLogLevel.values()) {
- if (tllevel.getInName().equalsIgnoreCase(name)) {
- return tllevel;
- }
- }
- // No match
- return LEVEL_UNKNOWN;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Jonathan Rajotte - machine interface support and utility function
- *********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model;
-
-/**
- * Session state enumeration.
- *
- * @author Bernd Hufmann
- */
-public enum TraceSessionState {
-
- // ------------------------------------------------------------------------
- // Enum definition
- // ------------------------------------------------------------------------
- /** Trace session inactive */
- INACTIVE("inactive", "false"), //$NON-NLS-1$ //$NON-NLS-2$
- /** Trace session active */
- ACTIVE("active", "true"); //$NON-NLS-1$ //$NON-NLS-2$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * Name of enum.
- */
- private final String fInName;
- private final String fMiName;
-
- // ------------------------------------------------------------------------
- // Constuctors
- // ------------------------------------------------------------------------
-
- /**
- * Private constructor
- *
- * @param name
- * the name of state
- */
- private TraceSessionState(String name, String miName) {
- fInName = name;
- fMiName = miName;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return state name
- */
- public String getInName() {
- return fInName;
- }
-
- /**
- * @return the machine interface name
- */
- public String getfMiName() {
- return fMiName;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * Return the corresponding {@link TraceSessionState} to String "name"
- *
- * @param name
- * String to compare to retrieve the good
- * {@link TraceSessionState}
- * @return the corresponding {@link TraceSessionState}
- */
- public static TraceSessionState valueOfString(String name) {
- if (name == null) {
- return INACTIVE;
- }
- for (TraceSessionState tst : TraceSessionState.values()) {
- boolean isEqual = tst.fInName.equalsIgnoreCase(name) || tst.fMiName.equalsIgnoreCase(name);
- if (isEqual) {
- return tst;
- }
- }
- // No match
- return INACTIVE;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-
-/**
-* <p>
-* Implementation of the basic trace event interface (IEventInfo) to store event
-* related data.
-* </p>
-*
-* @author Bernd Hufmann
-*/
-public class BaseEventInfo extends TraceInfo implements IBaseEventInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The trace event type.
- */
- private TraceEventType fEventType = TraceEventType.UNKNOWN;
- /**
- * The trace log level.
- */
- private TraceLogLevel fLogLevel = TraceLogLevel.TRACE_DEBUG;
- /**
- * The Event fields
- */
- private final List<IFieldInfo> fFields = new ArrayList<>();
- /**
- * The filter expression.
- */
- private String fFilterExpression;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - name of base event
- */
- public BaseEventInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public BaseEventInfo(BaseEventInfo other) {
- super(other);
- fEventType = other.fEventType;
- fLogLevel = other.fLogLevel;
- for (Iterator<IFieldInfo> iterator = other.fFields.iterator(); iterator.hasNext();) {
- IFieldInfo field = iterator.next();
- if (field instanceof FieldInfo) {
- fFields.add(new FieldInfo((FieldInfo)field));
- } else {
- fFields.add(field);
- }
- }
- fFilterExpression = other.fFilterExpression;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public TraceEventType getEventType() {
- return fEventType;
- }
-
- @Override
- public void setEventType(TraceEventType type) {
- fEventType = type;
- }
-
- @Override
- public void setEventType(String typeName) {
- if(TraceEventType.TRACEPOINT.getInName().equalsIgnoreCase(typeName)) {
- fEventType = TraceEventType.TRACEPOINT;
- } else if(TraceEventType.SYSCALL.getInName().equalsIgnoreCase(typeName)) {
- fEventType = TraceEventType.SYSCALL;
- } else if (TraceEventType.PROBE.getInName().equalsIgnoreCase(typeName)) {
- fEventType = TraceEventType.PROBE;
- } else if (TraceEventType.FUNCTION.getInName().equalsIgnoreCase(typeName)) {
- fEventType = TraceEventType.FUNCTION;
- } else {
- fEventType = TraceEventType.UNKNOWN;
- }
- }
-
- @Override
- public TraceLogLevel getLogLevel() {
- return fLogLevel;
- }
-
- @Override
- public void setLogLevel(TraceLogLevel level) {
- fLogLevel = level;
- }
-
- @Override
- public void setLogLevel(String levelName) {
- fLogLevel = TraceLogLevel.valueOfString(levelName);
- }
-
- @Override
- public IFieldInfo[] getFields() {
- return fFields.toArray(new IFieldInfo[fFields.size()]);
- }
-
- @Override
- public void addField(IFieldInfo field) {
- fFields.add(field);
- }
-
- @Override
- public void setFields(List<IFieldInfo> fields) {
- fFields.clear();
- for (Iterator<IFieldInfo> iterator = fields.iterator(); iterator.hasNext();) {
- IFieldInfo fieldInfo = iterator.next();
- fFields.add(fieldInfo);
- }
- }
-
- @Override
- public String getFilterExpression() {
- return fFilterExpression;
- }
-
- @Override
- public void setFilterExpression(String filter) {
- fFilterExpression = filter;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((fEventType == null) ? 0 : fEventType.hashCode());
- result = prime * result + fFields.hashCode();
- result = prime * result + ((fFilterExpression == null) ? 0 : fFilterExpression.hashCode());
- result = prime * result + ((fLogLevel == null) ? 0 : fLogLevel.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- BaseEventInfo other = (BaseEventInfo) obj;
- if (fEventType != other.fEventType) {
- return false;
- }
- if (!fFields.equals(other.fFields)) {
- return false;
- }
- if (fFilterExpression == null) {
- if (other.fFilterExpression != null) {
- return false;
- }
- } else if (!fFilterExpression.equals(other.fFilterExpression)) {
- return false;
- }
- if (fLogLevel != other.fLogLevel) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[BaseEventInfo(");
- output.append(super.toString());
- output.append(",type=");
- output.append(fEventType);
- output.append(",level=");
- output.append(fLogLevel);
- if (!fFields.isEmpty()) {
- output.append(",Fields=");
- for (Iterator<IFieldInfo> iterator = fFields.iterator(); iterator.hasNext();) {
- IFieldInfo field = iterator.next();
- output.append(field.toString());
- }
- }
- if (fFilterExpression != null) {
- output.append(",Filter=");
- output.append(fFilterExpression);
- }
- output.append(")]");
- return output.toString();
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013, 2014 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:
- * Simon Delisle - Initial API and implementation
- * Bernd Hufmann - Updated to enum definition
- * Jonathan Rajotte - Updated enum definition for lttng machine interface
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-/**
- * Constants for buffer type.
- *
- * @author Simon Delisle
- * @author Bernd Hufmann
- */
-
-public enum BufferType {
- // ------------------------------------------------------------------------
- // Enum definition
- // ------------------------------------------------------------------------
- /**
- * Buffer type : per UID
- */
- BUFFER_PER_UID("per UID", "PER_UID"), //$NON-NLS-1$ //$NON-NLS-2$
- /**
- * Buffer type : per PID
- */
- BUFFER_PER_PID("per PID", "PER_PID"), //$NON-NLS-1$ //$NON-NLS-2$
- /**
- * Buffer type : shared
- */
- BUFFER_SHARED("shared"), //$NON-NLS-1$
- /**
- * If the LTTng version doesn't show the buffer type
- */
- BUFFER_TYPE_UNKNOWN("information not unavailable"); //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * Name of enum
- */
- private final String fInName;
-
- /**
- * Name of the machine interface enum
- */
- private final String fInMiName;
-
- // ------------------------------------------------------------------------
- // Constuctors
- // ------------------------------------------------------------------------
-
- /**
- * Private constructor
- *
- * @param name
- * the name of state
- */
- private BufferType(String name, String miName) {
- fInName = name;
- fInMiName = miName;
- }
-
- private BufferType(String name) {
- fInName = name;
- fInMiName = ""; //$NON-NLS-1$
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return state name
- */
- public String getInName() {
- return fInName;
- }
-
- /**
- * @return machine interface buffer name
- */
- public String getInMiName() {
- return fInMiName;
- }
-
- // /
- // ------------------------------------------------------------------------
- // Utility function
- // -------------------------------------------------------------------------
- /**
- * @param name
- * the string representation of the type
- * @return enum BufferType of the corresponding type
- */
- public static BufferType valueOfString(String name) {
- if (name == null) {
- throw new IllegalArgumentException();
- }
- for (BufferType bufferType : BufferType.values()) {
- boolean isEqual = bufferType.getInName().equalsIgnoreCase(name) || bufferType.getInMiName().equalsIgnoreCase(name);
- if (isEqual) {
- return bufferType;
- }
- }
- return BUFFER_TYPE_UNKNOWN;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Simon Delisle - Updated for support of LTTng Tools 2.2
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-
-/**
- * Implementation of the trace channel interface (IChannelInfo) to store channel
- * related data.
- *
- * @author Bernd Hufmann
- */
-public class ChannelInfo extends TraceInfo implements IChannelInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The overwrite mode of the channel.
- */
- private boolean fOverwriteMode;
- /**
- * The sub-buffer size of the channel.
- */
- private long fSubBufferSize;
- /**
- * The number of sub-buffers of the channel.
- */
- private int fNumberOfSubBuffers;
- /**
- * The switch timer interval of the channel.
- */
- private long fSwitchTimer;
- /**
- * The read timer interval of the channel.
- */
- private long fReadTimer;
- /**
- * The Output type of the channel.
- */
- private TraceChannelOutputType fOutputType = TraceChannelOutputType.UNKNOWN;
- /**
- * The channel enable state.
- */
- private TraceEnablement fState = TraceEnablement.DISABLED;
- /**
- * The events information of the channel.
- */
- private final List<IEventInfo> fEvents = new ArrayList<>();
- /**
- * The maximum size of trace files
- */
- private int fMaxSizeTraceFiles;
- /**
- * The maximum number of trace files
- */
- private int fMaxNumberTraceFiles;
- /**
- * The value of buffer type
- */
- private BufferType fBufferType = BufferType.BUFFER_TYPE_UNKNOWN;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- *
- * @param name
- * - name channel
- */
- public ChannelInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- *
- * @param other
- * - the instance to copy
- */
- public ChannelInfo(ChannelInfo other) {
- super(other);
- fOverwriteMode = other.fOverwriteMode;
- fSubBufferSize = other.fSubBufferSize;
- fNumberOfSubBuffers = other.fNumberOfSubBuffers;
- fSwitchTimer = other.fSwitchTimer;
- fReadTimer = other.fReadTimer;
- fMaxSizeTraceFiles = other.fMaxSizeTraceFiles;
- fMaxNumberTraceFiles = other.fMaxNumberTraceFiles;
- fBufferType = other.fBufferType;
- fOutputType = (other.fOutputType == null ? null : other.fOutputType);
- fState = other.fState;
- for (Iterator<IEventInfo> iterator = other.fEvents.iterator(); iterator.hasNext();) {
- IEventInfo event = iterator.next();
- if (event instanceof EventInfo) {
- fEvents.add(new EventInfo((EventInfo) event));
- } else {
- fEvents.add(event);
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public boolean isOverwriteMode() {
- return fOverwriteMode;
- }
-
- @Override
- public void setOverwriteMode(boolean mode) {
- fOverwriteMode = mode;
- }
-
- @Override
- public long getSubBufferSize() {
- return fSubBufferSize;
- }
-
- @Override
- public void setSubBufferSize(long bufferSize) {
- fSubBufferSize = bufferSize;
- }
-
- @Override
- public int getNumberOfSubBuffers() {
- return fNumberOfSubBuffers;
- }
-
- @Override
- public void setNumberOfSubBuffers(int numberOfSubBuffers) {
- fNumberOfSubBuffers = numberOfSubBuffers;
- }
-
- @Override
- public long getSwitchTimer() {
- return fSwitchTimer;
- }
-
- @Override
- public void setSwitchTimer(long timer) {
- fSwitchTimer = timer;
- }
-
- @Override
- public long getReadTimer() {
- return fReadTimer;
- }
-
- @Override
- public void setReadTimer(long timer) {
- fReadTimer = timer;
- }
-
- @Override
- public TraceChannelOutputType getOutputType() {
- return fOutputType;
- }
-
- @Override
- public void setOutputType(String type) {
- fOutputType = TraceChannelOutputType.valueOfString(type);
- }
-
- @Override
- public void setOutputType(TraceChannelOutputType type) {
- fOutputType = type;
- }
-
- @Override
- public TraceEnablement getState() {
- return fState;
- }
-
- @Override
- public void setState(TraceEnablement state) {
- fState = state;
- }
-
- @Override
- public void setState(String stateName) {
- fState = TraceEnablement.valueOfString(stateName);
- }
-
- @Override
- public IEventInfo[] getEvents() {
- return fEvents.toArray(new IEventInfo[fEvents.size()]);
- }
-
- @Override
- public void setEvents(List<IEventInfo> events) {
- fEvents.clear();
- for (Iterator<IEventInfo> iterator = events.iterator(); iterator.hasNext();) {
- IEventInfo eventInfo = iterator.next();
- fEvents.add(eventInfo);
- }
- }
-
- @Override
- public void addEvent(IEventInfo channel) {
- fEvents.add(channel);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + fEvents.hashCode();
- result = prime * result + fNumberOfSubBuffers;
- result = prime * result + ((fOutputType == null) ? 0 : fOutputType.hashCode());
- result = prime * result + (fOverwriteMode ? 1231 : 1237);
- result = prime * result + (int) (fReadTimer ^ (fReadTimer >>> 32));
- result = prime * result + ((fState == null) ? 0 : (fState.ordinal() + 1));
- result = prime * result + (int) (fSubBufferSize ^ (fSubBufferSize >>> 32));
- result = prime * result + (int) (fSwitchTimer ^ (fSwitchTimer >>> 32));
- result = prime * result + ((fBufferType == null) ? 0 : (fBufferType.ordinal() + 1));
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- ChannelInfo other = (ChannelInfo) obj;
- if (!fEvents.equals(other.fEvents)) {
- return false;
- }
- if (fNumberOfSubBuffers != other.fNumberOfSubBuffers) {
- return false;
- }
- if (fOutputType == null) {
- if (other.fOutputType != null) {
- return false;
- }
- } else if (!fOutputType.equals(other.fOutputType)) {
- return false;
- }
- if (fOverwriteMode != other.fOverwriteMode) {
- return false;
- }
- if (fReadTimer != other.fReadTimer) {
- return false;
- }
- if (fState != other.fState) {
- return false;
- }
- if (fSubBufferSize != other.fSubBufferSize) {
- return false;
- }
- if (fSwitchTimer != other.fSwitchTimer) {
- return false;
- }
- if (fBufferType != other.fBufferType) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[ChannelInfo(");
- output.append(super.toString());
- output.append(",State=");
- output.append(fState);
- output.append(",OverwriteMode=");
- output.append(fOverwriteMode);
- output.append(",SubBuffersSize=");
- output.append(fSubBufferSize);
- output.append(",NumberOfSubBuffers=");
- output.append(fNumberOfSubBuffers);
- output.append(",SwitchTimer=");
- output.append(fSwitchTimer);
- output.append(",ReadTimer=");
- output.append(fReadTimer);
- output.append(",output=");
- output.append(fOutputType.getInName());
- if ((fBufferType != null) && !fBufferType.equals(BufferType.BUFFER_TYPE_UNKNOWN) && !fBufferType.equals(BufferType.BUFFER_SHARED)) {
- output.append(",BufferType=");
- output.append(fBufferType);
- }
- output.append(",Events=");
- if (fEvents.isEmpty()) {
- output.append("None");
- } else {
- for (Iterator<IEventInfo> iterator = fEvents.iterator(); iterator.hasNext();) {
- IEventInfo event = iterator.next();
- output.append(event.toString());
- }
- }
- output.append(")]");
- return output.toString();
- }
-
- @Override
- public void setMaxSizeTraceFiles(int maxSizeTraceFiles) {
- fMaxSizeTraceFiles = maxSizeTraceFiles;
- }
-
- @Override
- public void setMaxNumberTraceFiles(int maxNumberTraceFiles) {
- fMaxNumberTraceFiles = maxNumberTraceFiles;
- }
-
- @Override
- public int getMaxSizeTraceFiles() {
- return fMaxSizeTraceFiles;
- }
-
- @Override
- public int getMaxNumberTraceFiles() {
- return fMaxNumberTraceFiles;
- }
-
- @Override
- public void setBufferType(BufferType bufferType) {
- fBufferType = bufferType;
- }
-
- @Override
- public BufferType getBufferType() {
- return fBufferType;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-
-/**
- * <p>
- * Implementation of the trace domain interface (IDomainInfo) to store domain
- * related data.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class DomainInfo extends TraceInfo implements IDomainInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The channels information of the domain.
- */
- private final List<IChannelInfo> fChannels = new ArrayList<>();
- private boolean fIsKernel = false;
- private BufferType fBufferType = BufferType.BUFFER_TYPE_UNKNOWN;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - name of domain
- */
- public DomainInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public DomainInfo(DomainInfo other) {
- super(other);
- for (int i = 0; i < other.fChannels.size(); i++) {
- if (other.fChannels.get(i) instanceof ChannelInfo) {
- fChannels.add(new ChannelInfo((ChannelInfo)other.fChannels.get(i)));
- } else {
- fChannels.add(other.fChannels.get(i));
- }
- }
- fIsKernel = other.fIsKernel;
- fBufferType = other.fBufferType;
- }
-
- @Override
- public boolean isKernel() {
- return fIsKernel;
- }
-
- @Override
- public void setIsKernel(boolean isKernel) {
- fIsKernel = isKernel;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public IChannelInfo[] getChannels() {
- return fChannels.toArray(new IChannelInfo[fChannels.size()]);
- }
-
- @Override
- public void setChannels(List<IChannelInfo> channels) {
- fChannels.clear();
- for (Iterator<IChannelInfo> iterator = channels.iterator(); iterator.hasNext();) {
- IChannelInfo channelInfo = iterator.next();
- fChannels.add(channelInfo);
- }
- }
-
- @Override
- public void addChannel(IChannelInfo channel) {
- fChannels.add(channel);
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + fChannels.hashCode();
- result = prime * result + (fIsKernel ? 1231 : 1237);
- result = prime * result + ((fBufferType == null) ? 0 : (fBufferType.ordinal() + 1));
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- DomainInfo other = (DomainInfo) obj;
- if (!fChannels.equals(other.fChannels)) {
- return false;
- }
- if (fIsKernel != other.fIsKernel) {
- return false;
- }
- if (fBufferType != other.fBufferType) {
- return false;
- }
- return true;
- }
-
- @Override
- public BufferType getBufferType() {
- if (fIsKernel) {
- return BufferType.BUFFER_SHARED;
- }
- return fBufferType;
- }
-
- @Override
- public void setBufferType(BufferType bufferType) {
- fBufferType = bufferType;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[DomainInfo(");
- output.append(super.toString());
- output.append(",Channels=");
- if (fChannels.isEmpty()) {
- output.append("None");
- } else {
- for (Iterator<IChannelInfo> iterator = fChannels.iterator(); iterator.hasNext();) {
- IChannelInfo channel = iterator.next();
- output.append(channel.toString());
- }
- }
- output.append(",isKernel=");
- output.append(String.valueOf(fIsKernel));
- if ((fBufferType != null) && !fBufferType.equals(BufferType.BUFFER_TYPE_UNKNOWN) && !fBufferType.equals(BufferType.BUFFER_SHARED)) {
- output.append(",BufferType=");
- output.append(fBufferType);
- }
- output.append(")]");
- return output.toString();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-
-/**
-* <p>
-* Implementation of the trace event interface (IEventInfo) to store event
-* related data.
-* </p>
-*
-* @author Bernd Hufmann
-*/
-public class EventInfo extends BaseEventInfo implements IEventInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The enable state of the event.
- */
- private TraceEnablement fState = TraceEnablement.DISABLED;
- /**
- * The log level type.
- */
- private LogLevelType fLogLevelType = LogLevelType.LOGLEVEL_NONE;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - name of event
- */
- public EventInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public EventInfo(EventInfo other) {
- super(other);
- fState = other.fState;
- fLogLevelType = other.fLogLevelType;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public TraceEnablement getState() {
- return fState;
- }
-
- @Override
- public void setState(TraceEnablement state) {
- fState = state;
- }
-
- @Override
- public void setState(String stateName) {
- fState = TraceEnablement.valueOfString(stateName);
- }
-
- @Override
- public LogLevelType getLogLevelType() {
- return fLogLevelType;
- }
-
- @Override
- public void setLogLevelType(LogLevelType type) {
- fLogLevelType = type;
- }
-
- @Override
- public void setLogLevelType(String shortName) {
- fLogLevelType = LogLevelType.valueOfString(shortName);
- }
-
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((fState == null) ? 0 : (fState.ordinal() + 1));
- result = prime * result + ((fLogLevelType == null) ? 0 : fLogLevelType.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- EventInfo other = (EventInfo) obj;
- if (fState != other.fState) {
- return false;
- }
- if (fLogLevelType != other.fLogLevelType) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[EventInfo(");
- output.append(super.toString());
- output.append(",State=");
- output.append(fState);
- output.append(",levelType=");
- output.append(fLogLevelType);
- output.append(")]");
- return output.toString();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-
-/**
-* <p>
-* Implementation of the basic trace event interface (IEventInfo) to store event
-* related data.
-* </p>
-*
-* @author Bernd Hufmann
-*/
-public class FieldInfo extends TraceInfo implements IFieldInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The trace event type.
- */
- private String fFieldType;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - name of base event
- */
- public FieldInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public FieldInfo(FieldInfo other) {
- super(other);
- fFieldType = other.fFieldType;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getFieldType() {
- return fFieldType;
- }
-
- @Override
- public void setFieldType(String fieldType) {
- fFieldType = fieldType.toLowerCase();
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result
- + ((fFieldType == null) ? 0 : fFieldType.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- FieldInfo other = (FieldInfo) obj;
- if (fFieldType == null) {
- if (other.fFieldType != null) {
- return false;
- }
- } else if (!fFieldType.equals(other.fFieldType)) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[FieldInfo(");
- output.append(super.toString());
- output.append(",type=");
- output.append(fFieldType);
- return output.toString();
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
-
-/**
- * Implementation of the trace event interface (IProbeEventInfo) to store probe
- * event related data.
- *
- * @author Bernd Hufmann
- */
-public class ProbeEventInfo extends EventInfo implements IProbeEventInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The dynamic probe address (null if symbol is used).
- */
- private String fAddress;
- /**
- * The dynamic probe offset (if symbol is used).
- */
- private String fOffset;
-
- /**
- * The symbol name (null if address is used)
- */
- private String fSymbol;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- *
- * @param name
- * - name of event
- */
- public ProbeEventInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- *
- * @param other
- * - the instance to copy
- */
- public ProbeEventInfo(ProbeEventInfo other) {
- super(other);
- fAddress = other.fAddress;
- fOffset = other.fOffset;
- fSymbol = other.fSymbol;
- }
-
- /**
- * Constructor from a {@link IEventInfo}
- *
- * @param eventInfo
- * - the instance to copy
- */
- public ProbeEventInfo(IEventInfo eventInfo) {
- super(eventInfo.getName());
- setState(eventInfo.getState());
- setLogLevelType(eventInfo.getLogLevelType());
- setLogLevel(eventInfo.getLogLevel());
- setFilterExpression(eventInfo.getFilterExpression());
- setEventType(eventInfo.getEventType());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getAddress() {
- return fAddress;
- }
-
- @Override
- public void setAddress(String address) {
- fAddress = address;
- }
-
- @Override
- public String getOffset() {
- return fOffset;
- }
-
- @Override
- public void setOffset(String offset) {
- fOffset = offset;
- }
-
- @Override
- public String getSymbol() {
- return fSymbol;
- }
-
- @Override
- public void setSymbol(String symbol) {
- fSymbol = symbol;
- }
-
- // ------------------------------------------------------------------------
- // Operation
- // ------------------------------------------------------------------------
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + ((fAddress == null) ? 0 : fAddress.hashCode());
- result = prime * result + ((fOffset == null) ? 0 : fOffset.hashCode());
- result = prime * result + ((fSymbol == null) ? 0 : fSymbol.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- ProbeEventInfo other = (ProbeEventInfo) obj;
- if (fAddress == null) {
- if (other.fAddress != null) {
- return false;
- }
- } else if (!fAddress.equals(other.fAddress)) {
- return false;
- }
- if (fOffset == null) {
- if (other.fOffset != null) {
- return false;
- }
- } else if (!fOffset.equals(other.fOffset)) {
- return false;
- }
- if (fSymbol == null) {
- if (other.fSymbol != null) {
- return false;
- }
- } else if (!fSymbol.equals(other.fSymbol)) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[ProbeEventInfo(");
- output.append(super.toString());
- if (fAddress != null) {
- output.append(",fAddress=");
- output.append(fAddress);
- } else {
- output.append(",fOffset=");
- output.append(fOffset);
- output.append(",fSymbol=");
- output.append(fSymbol);
- }
- output.append(")]");
- return output.toString();
- }
-
-}
+++ /dev/null
-/**********************************************************************
-
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-
-/**
- * Implementation of the trace session interface (ISessionInfo) to store session
- * related data.
- *
- * @author Bernd Hufmann
- */
-public class SessionInfo extends TraceInfo implements ISessionInfo {
-
- /**
- * The default network URL when creating a live session.
- */
- public static final String DEFAULT_LIVE_NETWORK_URK = "net://127.0.0.1"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The trace session state.
- */
- private TraceSessionState fState = TraceSessionState.INACTIVE;
- /**
- * The trace session path for storing traces.
- */
- private String fSessionPath = ""; //$NON-NLS-1$
- /**
- * The domains information of this session.
- */
- private final List<IDomainInfo> fDomains = new ArrayList<>();
- /**
- * Flag to indicate whether trace is streamed over network or not.
- */
- private boolean fIsStreamedTrace = false;
- /**
- * Flag to indicate whether the session is a snapshot session or not.
- */
- private boolean fIsSnapshot = false;
- /**
- * The snapshot information of the session
- */
- private ISnapshotInfo fSnapshotInfo = null;
- /**
- * The network URL for the session (-U)
- */
- private String fNetworkUrl = null;
- /**
- * The control URL for the session (-C)
- */
- private String fControlUrl = null;
- /**
- * The data URL for the session (-D)
- */
- private String fDataUrl = null;
-
- /**
- * Flag to indicate whether trace is live or not.
- */
- private boolean fIsLive = false;
-
- /**
- * The delay in micro seconds before the data is flushed and streamed.
- */
- private int fLiveDelay = -1;
-
- /**
- * The live connection url (Relayd).
- */
- private String fLiveUrl;
-
- /**
- * The live connection port (Relayd).
- */
- private Integer fLivePort;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- *
- * @param name
- * - name of base event
- */
- public SessionInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- *
- * @param other
- * - the instance to copy
- */
- public SessionInfo(SessionInfo other) {
- super(other);
- fState = other.fState;
- fSessionPath = other.fSessionPath;
- fIsStreamedTrace = other.fIsStreamedTrace;
- fIsSnapshot = other.fIsSnapshot;
- fSnapshotInfo = other.fSnapshotInfo;
- fNetworkUrl = other.fNetworkUrl;
- fControlUrl = other.fControlUrl;
- fDataUrl = other.fDataUrl;
-
- for (Iterator<IDomainInfo> iterator = other.fDomains.iterator(); iterator.hasNext();) {
- IDomainInfo domain = iterator.next();
- if (domain instanceof DomainInfo) {
- fDomains.add(new DomainInfo((DomainInfo) domain));
- } else {
- fDomains.add(domain);
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public TraceSessionState getSessionState() {
- return fState;
- }
-
- @Override
- public void setSessionState(TraceSessionState state) {
- fState = state;
- }
-
- @Override
- public void setSessionState(String stateName) {
- fState = TraceSessionState.valueOfString(stateName);
- }
-
- @Override
- public String getSessionPath() {
- if (isSnapshotSession() && fSnapshotInfo != null) {
- return fSnapshotInfo.getSnapshotPath();
- }
- return fSessionPath;
- }
-
- @Override
- public void setSessionPath(String path) {
- fSessionPath = path;
- }
-
- @Override
- public IDomainInfo[] getDomains() {
- return fDomains.toArray(new IDomainInfo[fDomains.size()]);
- }
-
- @Override
- public void setDomains(List<IDomainInfo> domains) {
- fDomains.clear();
- for (Iterator<IDomainInfo> iterator = domains.iterator(); iterator.hasNext();) {
- IDomainInfo domainInfo = iterator.next();
- fDomains.add(domainInfo);
- }
- }
-
- @Override
- public boolean isStreamedTrace() {
- if (isSnapshotSession() && getSnapshotInfo() != null) {
- return getSnapshotInfo().isStreamedSnapshot();
- }
- return fIsStreamedTrace;
- }
-
- @Override
- public void setStreamedTrace(boolean isStreamedTrace) {
- fIsStreamedTrace = isStreamedTrace;
- }
-
- @Override
- public boolean isSnapshotSession() {
- return fIsSnapshot || fSnapshotInfo != null;
- }
-
- @Override
- public void setSnapshot(boolean isSnapshot) {
- fIsSnapshot = isSnapshot;
- }
-
- @Override
- public ISnapshotInfo getSnapshotInfo() {
- return fSnapshotInfo;
- }
-
- @Override
- public void setSnapshotInfo(ISnapshotInfo info) {
- fSnapshotInfo = info;
- }
-
- @Override
- public boolean isLive() {
- return fIsLive;
- }
-
- @Override
- public void setLive(boolean isLive) {
- fIsLive = isLive;
- }
-
- @Override
- public int getLiveDelay() {
- return fLiveDelay;
- }
-
- @Override
- public void setLiveDelay(int liveDelay) {
- fLiveDelay = liveDelay;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void addDomain(IDomainInfo domainInfo) {
- fDomains.add(domainInfo);
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[SessionInfo(");
- output.append(super.toString());
- output.append(",Path=");
- output.append(getSessionPath());
- output.append(",State=");
- output.append(fState);
- output.append(",isStreamedTrace=");
- output.append(fIsStreamedTrace);
- output.append(",isSnapshot=");
- output.append(fIsSnapshot);
-
- if (fSnapshotInfo != null) {
- output.append(",snapshotInfo=");
- output.append(fSnapshotInfo.toString());
- }
- output.append(",Domains=");
- for (Iterator<IDomainInfo> iterator = fDomains.iterator(); iterator.hasNext();) {
- IDomainInfo domain = iterator.next();
- output.append(domain.toString());
- }
-
- output.append(",NetworkUrl=");
- output.append(getNetworkUrl());
- output.append(",ControlUrl=");
- output.append(getControlUrl());
- output.append(",DataUrl=");
- output.append(getDataUrl());
-
- output.append(")]");
- return output.toString();
- }
-
- @Override
- public String getNetworkUrl() {
- return fNetworkUrl;
- }
-
- @Override
- public void setNetworkUrl(String networkUrl) {
- fNetworkUrl = networkUrl;
- }
-
- @Override
- public String getControlUrl() {
- return fControlUrl;
- }
-
- @Override
- public void setControlUrl(String controlUrl) {
- fControlUrl = controlUrl;
- }
-
- @Override
- public void setDataUrl(String datalUrl) {
- fDataUrl = datalUrl;
- }
-
- @Override
- public String getDataUrl() {
- return fDataUrl;
- }
-
- @Override
- public void setLiveUrl(String liveUrl) {
- fLiveUrl = liveUrl;
- }
-
- @Override
- public void setLivePort(Integer livePort) {
- fLivePort = livePort;
- }
-
- @Override
- public String getLiveUrl() {
- return fLiveUrl;
- }
-
- @Override
- public Integer getLivePort() {
- return fLivePort;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-
-/**
- * <p>
- * Implementation of the snapshot interface (ISnapshotInfo) to store snapshot
- * related data.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class SnapshotInfo extends TraceInfo implements ISnapshotInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /** The snapshot path for storing traces. */
- private String fPath = ""; //$NON-NLS-1$
- /** The snapshot ID */
- private int fId = -1;
- /** Flag whether snapshot is stored over the network or locally */
- private boolean fIsStreamed = false;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - name of base event
- */
- public SnapshotInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public SnapshotInfo(SnapshotInfo other) {
- super(other);
- fPath = other.fPath;
- fId = other.fId;
- fIsStreamed = other.fIsStreamed;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getSnapshotPath() {
- return fPath;
- }
-
- @Override
- public void setSnapshotPath(String path) {
- fPath = path;
- }
-
- @Override
- public int getId() {
- return fId;
- }
-
- @Override
- public void setId(int id) {
- fId = id;
- }
-
- @Override
- public void setStreamedSnapshot(boolean isStreamed) {
- fIsStreamed = isStreamed;
- }
-
- @Override
- public boolean isStreamedSnapshot() {
- return fIsStreamed;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + fId;
- result = prime * result + (fIsStreamed ? 1231 : 1237);
- result = prime * result + ((fPath == null) ? 0 : fPath.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- SnapshotInfo other = (SnapshotInfo) obj;
- if (fId != other.fId) {
- return false;
- }
- if (fIsStreamed != other.fIsStreamed) {
- return false;
- }
- if (fPath == null) {
- if (other.fPath != null) {
- return false;
- }
- } else if (!fPath.equals(other.fPath)) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[SnapshotInfo(");
- output.append(super.toString());
- output.append(",snapshotPath=");
- output.append(fPath);
- output.append(",ID=");
- output.append(fId);
- output.append(",isStreamedSnapshot=");
- output.append(fIsStreamed);
- output.append(")]");
- return output.toString();
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ITraceInfo;
-
-/**
- * <p>
- * Implementation of the base trace information interface (ITraceInfo) to
- * store common data.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceInfo implements ITraceInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The name of the element.
- */
- private String fName = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - name of trace element
- */
- public TraceInfo(String name) {
- if (name == null) {
- throw new IllegalArgumentException();
- }
- fName = name;
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public TraceInfo(TraceInfo other) {
- if (other == null) {
- throw new IllegalArgumentException();
- }
- fName = String.valueOf(other.fName);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getName() {
- return fName;
- }
-
- @Override
- public void setName(String name) {
- fName = name;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fName == null) ? 0 : fName.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- TraceInfo other = (TraceInfo) obj;
- if (fName == null) {
- if (other.fName != null) {
- return false;
- }
- } else if (!fName.equals(other.fName)) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[TraceInfo(");
- output.append("Name=");
- output.append(getName());
- output.append(")]");
- return output.toString();
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-
-/**
- * <p>
- * Implementation of the Ust Provider interface (IUstProviderInfo) to store UST
- * provider related data.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The process ID of the UST provider.
- */
- private int fPid = 0;
-
- /**
- * List of event information.
- */
- private final List<IBaseEventInfo> fEvents = new ArrayList<>();
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param name - name of UST provider
- */
- public UstProviderInfo(String name) {
- super(name);
- }
-
- /**
- * Copy constructor
- * @param other - the instance to copy
- */
- public UstProviderInfo(UstProviderInfo other) {
- super(other);
- fPid = other.fPid;
- for (Iterator<IBaseEventInfo> iterator = other.fEvents.iterator(); iterator.hasNext();) {
- IBaseEventInfo event = iterator.next();
- if (event instanceof BaseEventInfo) {
- fEvents.add(new BaseEventInfo((BaseEventInfo)event));
- } else {
- fEvents.add(event);
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public int getPid() {
- return fPid;
- }
-
- @Override
- public void setPid(int pid) {
- fPid = pid;
- }
-
- @Override
- public IBaseEventInfo[] getEvents() {
- return fEvents.toArray(new IBaseEventInfo[fEvents.size()]);
- }
-
- @Override
- public void setEvents(List<IBaseEventInfo> events) {
- fEvents.clear();
- for (Iterator<IBaseEventInfo> iterator = events.iterator(); iterator.hasNext();) {
- IBaseEventInfo eventInfo = iterator.next();
- fEvents.add(eventInfo);
- }
- }
-
- @Override
- public void addEvent(IBaseEventInfo event) {
- fEvents.add(event);
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = super.hashCode();
- result = prime * result + fEvents.hashCode();
- result = prime * result + fPid;
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (!super.equals(obj)) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- UstProviderInfo other = (UstProviderInfo) obj;
- if (!fEvents.equals(other.fEvents)) {
- return false;
- }
- if (fPid != other.fPid) {
- return false;
- }
- return true;
- }
-
- @SuppressWarnings("nls")
- @Override
- public String toString() {
- StringBuffer output = new StringBuffer();
- output.append("[EventInfo(");
- output.append(super.toString());
- output.append(",PID=");
- output.append(fPid);
- output.append(",Events=");
- if (fEvents.isEmpty()) {
- output.append("None");
- } else {
- for (Iterator<IBaseEventInfo> iterator = fEvents.iterator(); iterator.hasNext();) {
- IBaseEventInfo event = iterator.next();
- output.append(event.toString());
- }
- }
- output.append(")]");
- return output.toString();
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
-
-/**
- * Connector for Lttng Relayd
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public interface ILttngRelaydConnector extends AutoCloseable {
-
- /**
- * Gets a list of active Lttng sessions
- *
- * @return the session List (we need the get function)
- * @throws IOException
- * timeout and such
- */
- List<SessionResponse> getSessions() throws IOException;
-
- /**
- * Create a session
- *
- * @return create session response
- * @throws IOException
- * timeout and such
- */
- CreateSessionResponse createSession() throws IOException;
-
- /**
- * Attach the trace viewer to a Session
- *
- * @param lttngViewerSession
- * viewer session
- * @return An AttachSessionResponse
- * @throws IOException
- * timeout and such
- */
- AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) throws IOException;
-
- /**
- * Get the metadata from the relayd
- *
- * @param attachedSession
- * the attached session
- * @return a chunk of TSDL metadata
- * @throws IOException
- * timeout and such
- */
- String getMetadata(AttachSessionResponse attachedSession) throws IOException;
-
- /**
- * Get the next index
- *
- * @param stream
- * the stream
- * @return the stream input packet entry
- * @throws IOException
- * timeout and such
- */
- IndexResponse getNextIndex(StreamResponse stream) throws IOException;
-
- /**
- * Get the next packet in a stream
- *
- * @param stream
- * the stream response
- * @return the packet response
- * @throws IOException
- * timeout and such
- */
- TracePacketResponse getNextPacket(StreamResponse stream) throws IOException;
-
- /**
- * Gets the packet from the stream
- *
- * @param index
- * the index of the stream
- * @param id
- * the stream id
- * @return the packet response
- * @throws IOException
- * timeout and such
- */
- TracePacketResponse getPacketFromStream(IndexResponse index, long id) throws IOException;
-
- /**
- * Gets the new streams
- *
- * @return a list of stream responses
- * @throws IOException
- * timeout and such
- */
- Iterable<StreamResponse> getNewStreams() throws IOException;
-
- @Override
- void close() throws IOException;
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.net.Socket;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl.LttngRelaydConnector_2_4;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl.LttngRelaydConnector_Unsupported;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.Command;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectionType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ViewerCommand;
-
-/**
- * LTTng RelayD connector factory
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public final class LttngRelaydConnectorFactory {
-
- private LttngRelaydConnectorFactory() {
- }
-
- /**
- * Create a connection to a relayd
- *
- * @param myConnection
- * a connection to the relayd
- *
- * @return A relayd connector
- * @throws IOException
- * caused by invalid sockets
- */
- public static ILttngRelaydConnector getNewConnector(Socket myConnection) throws IOException {
- DataOutputStream outNet = new DataOutputStream(myConnection.getOutputStream());
- DataInputStream inNet = new DataInputStream(myConnection.getInputStream());
-
- ViewerCommand connectCommand = new ViewerCommand(Command.VIEWER_CONNECT, ConnectResponse.SIZE, 0);
-
- outNet.write(connectCommand.serialize());
- outNet.flush();
-
- ConnectResponse payload = new ConnectResponse(0, 2, 4, ConnectionType.VIEWER_CLIENT_COMMAND);
- outNet.write(payload.serialize());
- outNet.flush();
-
- ConnectResponse connectReply = new ConnectResponse(inNet);
- switch (connectReply.getMajor()) {
- case 2:
- switch (connectReply.getMinor()) {
- case 0:
- case 1:
- case 2:
- case 3:
- return new LttngRelaydConnector_Unsupported();
- case 4:
- default:
- return new LttngRelaydConnector_2_4(inNet, outNet);
- }
- default:
- return new LttngRelaydConnector_Unsupported();
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- * Marc-Andre Laperle - Create session and split getNextIndex from getNextPacket
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionRequest;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.Command;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetMetadata;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetNextIndex;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetPacket;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ListSessionsResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.MetadataPacketResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NewStreamsResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NextIndexReturnCode;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SeekCommand;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ViewerCommand;
-
-/**
- * Lttng 2.4 implementation
- *
- * @author Matthew Khouzam
- */
-public class LttngRelaydConnector_2_4 implements ILttngRelaydConnector {
-
- private final @NonNull DataInputStream fInNet;
- private final @NonNull DataOutputStream fOutNet;
-
- /**
- * Constructor needs two network streams
- *
- * @param inNet
- * network incoming data
- * @param outNet
- * network outgoing data
- */
- public LttngRelaydConnector_2_4(@NonNull DataInputStream inNet, @NonNull DataOutputStream outNet) {
- fInNet = inNet;
- fOutNet = outNet;
- }
-
- // ------------------------------------------------------------------------
- // AutoCloseable
- // ------------------------------------------------------------------------
-
- @Override
- public void close() throws IOException {
- fInNet.close();
- fOutNet.close();
- }
-
- // ------------------------------------------------------------------------
- // ILttngRelaydConnector
- // ------------------------------------------------------------------------
-
- @Override
- public List<SessionResponse> getSessions() throws IOException {
- ViewerCommand listSessionsCmd = new ViewerCommand(Command.VIEWER_LIST_SESSIONS, 0,0);
-
- fOutNet.write(listSessionsCmd.serialize());
- fOutNet.flush();
-
- return new ListSessionsResponse(fInNet).getSessionsList();
- }
-
- @Override
- public CreateSessionResponse createSession() throws IOException {
- ViewerCommand listSessionsCmd = new ViewerCommand(Command.VIEWER_CREATE_SESSION, 0, 0);
- fOutNet.write(listSessionsCmd.serialize());
- fOutNet.flush();
-
- return new CreateSessionResponse(fInNet);
- }
-
- @Override
- public AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) throws IOException {
- ViewerCommand listSessionsCmd = new ViewerCommand(Command.VIEWER_ATTACH_SESSION, 0,0);
- fOutNet.write(listSessionsCmd.serialize());
- /*
- * only flush if you read after
- */
-
- AttachSessionRequest attachRequest = new AttachSessionRequest(lttngViewerSession.getId(), SeekCommand.VIEWER_SEEK_BEGINNING);
- fOutNet.write(attachRequest.serialize());
- fOutNet.flush();
-
- return new AttachSessionResponse(fInNet);
- }
-
- @Override
- public String getMetadata(AttachSessionResponse attachedSession) throws IOException {
-
- for (StreamResponse stream : attachedSession.getStreamList()) {
- if (stream.getMetadataFlag() == 1) {
- issueCommand(Command.VIEWER_GET_METADATA);
-
- GetMetadata metadataRequest = new GetMetadata(stream.getId());
- fOutNet.write(metadataRequest.serialize());
- fOutNet.flush();
-
- MetadataPacketResponse metaDataPacket = new MetadataPacketResponse(fInNet);
- return new String(metaDataPacket.getData());
- }
- }
-
- return null;
- }
-
- @Override
- public TracePacketResponse getPacketFromStream(IndexResponse index, long id) throws IOException {
-
- issueCommand(Command.VIEWER_GET_PACKET);
-
- GetPacket packetRequest = new GetPacket(id, index.getOffset(), (int) (index.getPacketSize() / 8));
- fOutNet.write(packetRequest.serialize());
- fOutNet.flush();
-
- return new TracePacketResponse(fInNet);
- }
-
- @Override
- public TracePacketResponse getNextPacket(StreamResponse stream) throws IOException {
- IndexResponse indexReply = getNextIndex(stream);
-
- TracePacketResponse packet = null;
- if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_OK) {
- packet = getPacketFromStream(indexReply, stream.getId());
- }
- return packet;
- }
-
- @Override
- public IndexResponse getNextIndex(StreamResponse stream) throws IOException {
- issueCommand(Command.VIEWER_GET_NEXT_INDEX);
-
- GetNextIndex indexRequest = new GetNextIndex(stream.getId());
- fOutNet.write(indexRequest.serialize());
- fOutNet.flush();
-
- return new IndexResponse(fInNet);
- }
-
- @Override
- public List<StreamResponse> getNewStreams() throws IOException {
-
- Command viewerGetNewStreams = Command.VIEWER_GET_NEW_STREAMS;
-
- issueCommand(viewerGetNewStreams);
-
- return new NewStreamsResponse(fInNet).getStreamList();
- }
-
- private void issueCommand(Command command) throws IOException {
- ViewerCommand connectCommand = new ViewerCommand(command, ConnectResponse.SIZE, 0);
- fOutNet.write(connectCommand.serialize());
- fOutNet.flush();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl;
-
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
-
-/**
- * Unsupported version of the relay daemon
- *
- * @author Matthew Khouzam
- */
-public class LttngRelaydConnector_Unsupported implements ILttngRelaydConnector {
-
- @Override
- public List<SessionResponse> getSessions() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public String getMetadata(AttachSessionResponse attachedSession) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public TracePacketResponse getNextPacket(StreamResponse stream) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public TracePacketResponse getPacketFromStream(IndexResponse index, long id) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public List<StreamResponse> getNewStreams() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public CreateSessionResponse createSession() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public IndexResponse getNextIndex(StreamResponse stream) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void close() {
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Return codes for "viewer attach" command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum AttachReturnCode implements IBaseCommand {
-
- /** If the attach command succeeded. */
- VIEWER_ATTACH_OK(1),
- /** If a viewer is already attached. */
- VIEWER_ATTACH_ALREADY(2),
- /** If the session ID is unknown. */
- VIEWER_ATTACH_UNK(3),
- /** If the session is not live. */
- VIEWER_ATTACH_NOT_LIVE(4),
- /** Seek error. */
- VIEWER_ATTACH_SEEK_ERR(5),
- /** No session */
- VIEWER_ATTACH_NO_SESSION(6);
-
- private final int fCode;
-
- private AttachReturnCode(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * VIEWER_ATTACH_SESSION payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class AttachSessionRequest implements IRelayCommand {
-
- /**
- * Command size
- *
- * fSessionId + fOffset + fSeek
- */
- public static final int SIZE = (Long.SIZE + Long.SIZE) / 8 + SeekCommand.SIZE;
- /** the id of a session */
- private final long fSessionId;
- /** unused for now */
- private final long fOffset;
- /** enum lttng_viewer_seek */
- private final SeekCommand fSeek;
-
- /**
- * Attach session request constructor
- *
- * @param id
- * the session id
- * @param seekCommand
- * the seek command
- */
- public AttachSessionRequest(long id, SeekCommand seekCommand) {
- this(id, 0, seekCommand);
- }
-
- /**
- * Attach session request constructor
- *
- * @param id
- * the session id
- * @param offset
- * unused for now
- * @param seekCommand
- * the seek command
- */
-
- public AttachSessionRequest(long id, int offset, SeekCommand seekCommand) {
- fSessionId = id;
- fOffset = offset;
- fSeek = seekCommand;
-
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(fSessionId);
- bb.putLong(fOffset);
- bb.putInt(fSeek.getCommand());
- return data;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.List;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableList.Builder;
-
-/**
- * Attach session response
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class AttachSessionResponse implements IRelayResponse {
-
- /**
- * Response size
- *
- * fStatus + fStreamsCount (first half of a packet) */
- private static final int SIZE = (Integer.SIZE + Integer.SIZE) / 8;
- /** enum lttng_viewer_attach_return_code */
- private final AttachReturnCode fStatus;
- /** how many streams are there */
- private final int fStreamsCount;
- /** public class lttng_viewer_stream */
- private final List<StreamResponse> fStreamList;
-
- /**
- * Attach session response network constructor
- *
- * @param inNet
- * network input stream
- * @throws IOException
- * network error
- */
- public AttachSessionResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data, 0, SIZE);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fStatus = AttachReturnCode.values()[bb.getInt() - 1];
- fStreamsCount = bb.getInt();
- Builder<StreamResponse> streamResponses = ImmutableList.builder();
- for (int i = 0; i < getNbStreams(); i++) {
- streamResponses.add(new StreamResponse(inNet));
- }
- fStreamList = streamResponses.build();
-
- }
-
- /**
- * Gets the Status
- *
- * @return the Status
- */
- public AttachReturnCode getStatus() {
- return fStatus;
- }
-
- /**
- * Gets the StreamsCount
- *
- * @return the StreamsCount
- */
- public int getNbStreams() {
- return fStreamsCount;
- }
-
- /**
- * Gets the StreamList
- *
- * @return the StreamList
- */
- public List<StreamResponse> getStreamList() {
- return fStreamList;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Viewer commands
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum Command implements IBaseCommand {
-
- /** get version */
- VIEWER_CONNECT(1),
- /** list all lttng sessions */
- VIEWER_LIST_SESSIONS(2),
- /** attach to a session */
- VIEWER_ATTACH_SESSION(3),
- /** get the next index */
- VIEWER_GET_NEXT_INDEX(4),
- /** get packet */
- VIEWER_GET_PACKET(5),
- /** get metadata */
- VIEWER_GET_METADATA(6),
- /** get new streams */
- VIEWER_GET_NEW_STREAMS(7),
- /** create a new session */
- VIEWER_CREATE_SESSION(8);
-
- /**
- * Command size (fCode)
- */
- public static final int SIZE = Integer.SIZE / 8;
-
- private final int fCode;
-
- private Command(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * CONNECT payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class ConnectResponse implements IRelayResponse, IRelayCommand {
-
- /**
- * Response or command size
- *
- * fViewerSessionId + fMajor + fMinor + fType
- */
- public static final int SIZE = (Long.SIZE + Integer.SIZE + Integer.SIZE + Integer.SIZE) / 8;
- /** session id, counts from 1 and increments by session */
- private final long fViewerSessionId;
- /**
- * Major version, hint, it's at least 2
- */
- private final int fMajor;
- /**
- * Minor version, hint, it's at least 4
- */
- private final int fMinor;
- /**
- * type of connect to {@link ConnectionType}
- */
- private final ConnectionType fType;
-
- /**
- * Connection response reply constructor
- *
- * @param inStream
- * the data input stream
- * @throws IOException
- * a network error
- */
- public ConnectResponse(DataInputStream inStream) throws IOException {
- byte data[] = new byte[SIZE];
- inStream.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fViewerSessionId = bb.getLong();
- fMajor = bb.getInt();
- fMinor = bb.getInt();
- bb.getInt(); // Should not be used, see http://bugs.lttng.org/issues/728
- fType = ConnectionType.VIEWER_CLIENT_COMMAND;
- }
-
- /**
- * Constructor for command
- *
- * @param sessionID
- * session id
- * @param major
- * the major version
- * @param minor
- * the minor version
- * @param connection
- * the connection type, typically VIEWER_CLIENT_COMMAND
- */
- public ConnectResponse(long sessionID, int major, int minor, ConnectionType connection) {
- fViewerSessionId = sessionID;
- fMajor = major;
- fMinor = minor;
- fType = connection;
- }
-
- /**
- * get the major version
- *
- * @return the major version
- */
- public int getMajor() {
- return fMajor;
- }
-
- /**
- * get the minor version
- *
- * @return the minor version
- */
- public int getMinor() {
- return fMinor;
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(fViewerSessionId);
- bb.putInt(fMajor);
- bb.putInt(fMinor);
- bb.putInt(fType.getCommand());
- return data;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Get viewer connection type
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum ConnectionType implements IBaseCommand {
-
- /** Command sent */
- VIEWER_CLIENT_COMMAND(1),
- /** Notification sent */
- VIEWER_CLIENT_NOTIFICATION(2);
-
- private final int fCode;
-
- private ConnectionType(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * Response to a "create session" command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class CreateSessionResponse implements IRelayResponse {
-
- /**
- * Response size (fStatus)
- */
- public static final int SIZE = Integer.SIZE / 8;
-
- /** enum lttng_viewer_create_session_return_code */
- private final CreateSessionReturnCode fStatus;
-
- /**
- * Create session response network constructor
- *
- * @param inNet
- * network input stream
- * @throws IOException
- * network error
- */
- public CreateSessionResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fStatus = (CreateSessionReturnCode.values()[bb.getInt() - 1]);
- }
-
- /**
- * Get status
- *
- * @return the status
- */
- public CreateSessionReturnCode getStatus() {
- return fStatus;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Create new session return code
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum CreateSessionReturnCode implements IBaseCommand {
-
- /** If new streams are being sent. */
- LTTNG_VIEWER_CREATE_SESSION_OK(1),
- /** Fatal error on the server-side. */
- LTTNG_VIEWER_CREATE_SESSION_ERR(2);
-
- private final int fCode;
-
- private CreateSessionReturnCode(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * VIEWER_GET_METADATA payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class GetMetadata implements IRelayCommand {
-
- /**
- * Command size (fStreamId)
- */
- public static final int SIZE = Long.SIZE / 8;
-
- /**
- * The stream id
- */
- private final long fStreamId;
-
- /**
- * Set the stream id
- *
- * @param streamId
- * the stream id
- */
- public GetMetadata(long streamId) {
- fStreamId = streamId;
- }
-
- /**
- * Get the stream id
- *
- * @return the stream id
- */
- public long getStreamId() {
- return fStreamId;
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(getStreamId());
- return data;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Get metadata return code
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum GetMetadataReturnCode implements IBaseCommand {
-
- /** Response was OK */
- VIEWER_METADATA_OK(1),
- /** Response was nothing new */
- VIEWER_NO_NEW_METADATA(2),
- /** Response was Error */
- VIEWER_METADATA_ERR(3);
-
- private final int fCode;
-
- private GetMetadataReturnCode(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * VIEWER_GET_NEXT_INDEX payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class GetNextIndex implements IRelayCommand {
-
- /**
- * Command size (fStreamId)
- */
- public static final int SIZE = Long.SIZE / 8;
- /**
- * the id of the stream
- */
- private final long fStreamId;
-
- /**
- * Constructor
- *
- * @param streamId
- * the index stream id
- */
- public GetNextIndex(long streamId) {
- fStreamId = streamId;
- }
-
- /**
- * Gets the stream id
- *
- * @return the stream id
- */
- public long getStreamId() {
- return fStreamId;
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(getStreamId());
- return data;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * VIEWER_GET_PACKET payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class GetPacket implements IRelayCommand {
-
- /**
- * Command size
- *
- * fStreamId + fOffset + fLength
- */
- public static final int SIZE = (Long.SIZE + Long.SIZE + Integer.SIZE) / 8;
- /** the stream Id */
- private final long fStreamId;
- /** the offset */
- private final long fOffset;
- /** the length of the packet */
- private final int fLength;
-
- /**
- * Get packet constructor
- *
- * @param streamId
- * the stream id
- * @param offset
- * the offset
- * @param length
- * the packet length
- */
- public GetPacket(long streamId, long offset, int length) {
- fStreamId = streamId;
- fOffset = offset;
- fLength = length;
- }
-
- /**
- * Get the length of the packet
- *
- * @return the length of the packet in bytes
- */
- public int getLength() {
- return fLength;
- }
-
- /**
- * Gets the offset of the packet
- *
- * @return the offset
- */
- public long getOffset() {
- return fOffset;
- }
-
- /**
- * Gets the stream id
- *
- * @return the stream id
- */
- public long getStreamId() {
- return fStreamId;
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(getStreamId());
- bb.putLong(getOffset());
- bb.putInt(getLength());
- return data;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Get packet return code
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum GetPacketReturnCode implements IBaseCommand {
-
- /** Response was OK */
- VIEWER_GET_PACKET_OK(1),
- /** Response was RETRY */
- VIEWER_GET_PACKET_RETRY(2),
- /** Response was ERROR */
- VIEWER_GET_PACKET_ERR(3),
- /** Response was End of File */
- VIEWER_GET_PACKET_EOF(4);
-
- private final int fCode;
-
- private GetPacketReturnCode(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Instruction to send to relayd
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public interface IBaseCommand {
-
- /**
- * gets the numerical value of the command
- *
- * @return the numerical value of the command
- */
- int getCommand();
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-
-/**
- * Command sent, needs a getBytes to stream the data
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public interface IRelayCommand {
-
- /**
- * Gets a byte array of the command so that it may be streamed
- *
- * @return the byte array of the command
- */
- byte[] serialize();
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Command response, this will allow sorting commands easier
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public interface IRelayResponse {
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * An Lttng packet index
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class IndexResponse implements IRelayResponse {
-
- /**
- * Command size
- *
- * Sum of the field sizes / 8 ( 7 longs and 2 ints):
- * fOffset + fPacketSize + fContentSize + fTimestampBegin + fTimestampEnd +
- * fEventsDiscarded + fStreamId + fStatus + fFlags
- */
- public final static int SIZE =
- (Long.SIZE * 7 + Integer.SIZE * 2) / 8;
-
- /** the offset */
- private final long fOffset;
- /** packet_size */
- private final long fPacketSize;
- /** the content size - how much of the packet is used */
- private final long fContentSize;
- /** timestamp of the beginning of the packet */
- private final long fTimestampBegin;
- /** timestamp of the end of the packet */
- private final long fTimestampEnd;
- /** number of discarded events BEFORE this packet */
- private final long fEventsDiscarded;
- /** the CTF stream id */
- private final long fStreamId;
- /** the status of the getNextIndex request */
- private final NextIndexReturnCode fStatus;
- /** whether there are new streams or metadata */
- private final int fFlags;
-
- /**
- * IndexResposne from network
- *
- * @param inNet
- * data input stream
- * @throws IOException
- * network error
- */
- public IndexResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fOffset = bb.getLong();
- fPacketSize = bb.getLong();
- fContentSize = bb.getLong();
- fTimestampBegin = bb.getLong();
- fTimestampEnd = bb.getLong();
- fEventsDiscarded = bb.getLong();
- fStreamId = bb.getLong();
- fStatus = NextIndexReturnCode.values()[bb.getInt() - 1];
- fFlags = bb.getInt();
- }
-
- /**
- * Gets the offset
- *
- * @return the offset
- */
- public long getOffset() {
- return fOffset;
- }
-
- /**
- * Gets the packet size
- *
- * @return the packet size
- */
- public long getPacketSize() {
- return fPacketSize;
- }
-
- /**
- * Gets the content size - how much of the packet is used
- *
- * @return the content size
- */
- public long getContentSize() {
- return fContentSize;
- }
-
- /**
- * Gets the timestamp of the beginning of the packet
- *
- * @return the timestamp of the beginning of the packet
- */
- public long getTimestampBegin() {
- return fTimestampBegin;
- }
-
- /**
- * Gets the timestamp of the end of the packet
- *
- * @return the timestamp of the end of the packet
- */
- public long getTimestampEnd() {
- return fTimestampEnd;
- }
-
- /**
- * Gets the number of discarded events BEFORE this packet
- *
- * @return the number of discarded events BEFORE this packet
- */
- public long getEventsDiscarded() {
- return fEventsDiscarded;
- }
-
- /**
- * Gets the CTF stream id
- *
- * @return the CTF stream id
- */
- public long getStreamId() {
- return fStreamId;
- }
-
- /**
- * Gets the status
- *
- * @return the status
- */
- public NextIndexReturnCode getStatus() {
- return fStatus;
- }
-
- /**
- * Gets the flags that describe whether there are new streams or metadata
- *
- * @return the flags
- */
- public int getFlags() {
- return fFlags;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.List;
-
-import com.google.common.collect.ImmutableList;
-import com.google.common.collect.ImmutableList.Builder;
-
-/**
- * VIEWER_LIST_SESSIONS payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class ListSessionsResponse implements IRelayResponse {
-
- /**
- * Response size (nbSessions)
- */
- public static final int PACKET_FIXED_SIZE = Integer.SIZE / 8;
-
- /** the list of sessions */
- private final List<SessionResponse> fSessionList;
-
- /**
- * List Sessions response from network
- *
- * @param inNet
- * the network stream
- * @throws IOException
- * network error
- */
- public ListSessionsResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[PACKET_FIXED_SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- int nbSessions = bb.getInt();
- Builder<SessionResponse> sl = new ImmutableList.Builder<>();
- for (int session = 0; session < nbSessions; session++) {
- sl.add(new SessionResponse(inNet));
- }
- fSessionList = sl.build();
- }
-
- /**
- * Gets the session list
- *
- * @return the sessions list
- */
- public List<SessionResponse> getSessionsList() {
- return fSessionList;
- }
-
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * LTTng Relay Daemon API. needs a TCP connection, API is defined from
- * BSD-licensed implementation in Lttng tools: <a href=
- * "http://git.lttng.org/?p=lttng-tools.git;a=blob;f=src/bin/lttng-relayd/lttng-viewer-abi.h"
- * > src/bin/lttng-relayd/lttng-viewer-abi.h</a>
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public interface LttngViewerCommands {
-
- /** Maximum path name length */
- static final int LTTNG_VIEWER_PATH_MAX = 4096;
- /** Maximum name length */
- static final int LTTNG_VIEWER_NAME_MAX = 255;
- /** Maximum host name length */
- static final int LTTNG_VIEWER_HOST_NAME_MAX = 64;
- /** New stream in the trace */
- static final int NEW_STREAM = (1 << 1);
- /** New metadata in the trace */
- static final int NEW_METADATA = (1 << 0);
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * Metadata packet response containing a packet of metadata
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class MetadataPacketResponse implements IRelayResponse {
-
- /**
- * Response size
- *
- * fData.length + fStatus
- */
- private static final int SIZE = (Long.SIZE + Integer.SIZE) / 8;
- /** status of the metadata request */
- private final GetMetadataReturnCode fStatus;
- /** the packet */
- private final byte fData[];
-
- /**
- * Read new metadata packet from the network
- *
- * @param inNet
- * network input reader
- * @throws IOException
- * network error
- */
- public MetadataPacketResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- long length = bb.getLong();
- fStatus = GetMetadataReturnCode.values()[bb.getInt() - 1];
- if (length >= Integer.MAX_VALUE) {
- throw new IOException("Metadata Packet too big " + length); //$NON-NLS-1$
- }
- fData = new byte[(int) length];
- inNet.readFully(fData);
- }
-
- /**
- * Get the packet
- *
- * @return the packet
- */
- public byte[] getData() {
- return fData;
- }
-
- /**
- * Gets the status
- *
- * @return the status
- */
- public GetMetadataReturnCode getStatus() {
- return fStatus;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * LTTNG_VIEWER_GET_NEW_STREAMS payload.
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class NewStreamsRequest implements IRelayCommand {
-
- /**
- * Command size (fSessionId)
- */
- public static final int SIZE = Long.SIZE / 8;
-
- /** session ID */
- private final long fSessionId;
-
- /**
- * Constructor
- *
- * @param sessionId
- * the session id we want
- */
- public NewStreamsRequest(long sessionId) {
- fSessionId = sessionId;
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(fSessionId);
- return data;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.List;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Response to a "new streams" command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class NewStreamsResponse implements IRelayResponse {
-
- /**
- * Response size
- *
- * fStatus + fNbStreams
- */
- private static final int SIZE = (Integer.SIZE + Integer.SIZE) / 8;
- /** status of the request */
- private final NewStreamsReturnCode fStatus;
- /** the number of streams */
- private final int fNbStreams;
- /** the list of streams in the response */
- private final List<StreamResponse> fStreamList;
-
- /**
- * New stream response network constructor
- *
- * @param inNet
- * network stream
- * @throws IOException
- * network error
- */
- public NewStreamsResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fStatus = NewStreamsReturnCode.values()[bb.getInt() - 1];
- fNbStreams = bb.getInt();
- ImmutableList.Builder<StreamResponse> sl = new ImmutableList.Builder<>();
- if (getStatus().equals(NewStreamsReturnCode.LTTNG_VIEWER_NEW_STREAMS_OK)) {
- for (int stream = 0; stream < fNbStreams; stream++) {
- sl.add(new StreamResponse(inNet));
- }
- }
- fStreamList = sl.build();
- }
-
- /**
- * Gets the status
- *
- * @return the status
- */
- public NewStreamsReturnCode getStatus() {
- return fStatus;
- }
-
- /**
- * gets the stream list
- *
- * @return the stream list
- */
- public List<StreamResponse> getStreamList() {
- return fStreamList;
- }
-
- /**
- * The number of streams
- *
- * @return the number of streams
- */
- public int getNbStreams() {
- return fNbStreams;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Return codes for "new streams" command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum NewStreamsReturnCode implements IBaseCommand {
-
- /** If new streams are being sent. */
- LTTNG_VIEWER_NEW_STREAMS_OK(1),
- /** If no new streams are available. */
- LTTNG_VIEWER_NEW_STREAMS_NO_NEW(2),
- /** Error. */
- LTTNG_VIEWER_NEW_STREAMS_ERR(3),
- /** Session closed. */
- LTTNG_VIEWER_NEW_STREAMS_HUP(4);
-
- private final int fCode;
-
- private NewStreamsReturnCode(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Get next index return code (hope it's viewer_index_ok)
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum NextIndexReturnCode implements IBaseCommand {
-
- /** Index is available. */
- VIEWER_INDEX_OK(1),
- /** Index not yet available. */
- VIEWER_INDEX_RETRY(2),
- /** Index closed (trace destroyed). */
- VIEWER_INDEX_HUP(3),
- /** Unknown error. */
- VIEWER_INDEX_ERR(4),
- /** Inactive stream beacon. */
- VIEWER_INDEX_INACTIVE(5),
- /** End of index file. */
- VIEWER_INDEX_EOF(6);
-
- private final int fCode;
-
- private NextIndexReturnCode(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-/**
- * Seek command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public enum SeekCommand implements IBaseCommand {
-
- /** Receive the trace packets from the beginning. */
- VIEWER_SEEK_BEGINNING(1),
- /** Receive the trace packets from now. */
- VIEWER_SEEK_LAST(2);
-
- private final int fCode;
-
- /**
- * Command size (fCode)
- */
- public static final int SIZE = Integer.SIZE / 8;
-
- private SeekCommand(int c) {
- fCode = c;
- }
-
- @Override
- public int getCommand() {
- return fCode;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * Get viewer session response to command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class SessionResponse implements IRelayResponse {
-
- /**
- * Response size
- *
- * fHostname + fSessionName + fId + fLiveTimer + fClients + fStreams
- */
- public static final int SIZE =
- LttngViewerCommands.LTTNG_VIEWER_HOST_NAME_MAX + LttngViewerCommands.LTTNG_VIEWER_NAME_MAX + (Long.SIZE + Integer.SIZE + Integer.SIZE + Integer.SIZE) / 8;
- /** id of the session */
- private final long fId;
- /** live timer */
- private final int fLiveTimer;
- /** number of clients */
- private final int fClients;
- /** number streams */
- private final int fStreams;
- /** Hostname, like 'localhost' */
- private final String fHostname;
- /** Session name, like 'streaming session' */
- private final String fSessionName;
-
- /**
- * Session response network constructor
- *
- * @param inNet
- * input network stream
- * @throws IOException
- * network error
- */
- public SessionResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fId = bb.getLong();
- fLiveTimer = bb.getInt();
- fClients = bb.getInt();
- fStreams = bb.getInt();
- byte[] hostName = new byte[LttngViewerCommands.LTTNG_VIEWER_HOST_NAME_MAX];
- byte[] sessionName = new byte[LttngViewerCommands.LTTNG_VIEWER_NAME_MAX];
- bb.get(hostName, 0, hostName.length);
- bb.get(sessionName, 0, sessionName.length);
- fHostname = new String(hostName);
- fSessionName = new String(sessionName);
- }
-
- /**
- * Gets the id of the session
- *
- * @return the id of the session
- */
- public long getId() {
- return fId;
- }
-
- /**
- * Gets the live timer
- *
- * @return the live timer
- */
- public int getLiveTimer() {
- return fLiveTimer;
- }
-
- /**
- * Gets the number of clients
- *
- * @return the number of clients
- */
- public int getClients() {
- return fClients;
- }
-
- /**
- * Gets the number streams
- *
- * @return the number streams
- */
- public int getStreams() {
- return fStreams;
- }
-
- /**
- * Gets the Hostname
- *
- * @return the Hostname
- */
- public String getHostname() {
- return fHostname;
- }
-
- /**
- * Gets the session name
- *
- * @return the session name
- */
- public String getSessionName() {
- return fSessionName;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * Get response of viewer stream
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class StreamResponse implements IRelayResponse {
-
- /**
- * Response size
- *
- * fId + fCtfTraceId + fMetadataFlag + fPathName + fChannelName
- */
- public static final int SIZE = (Long.SIZE + Long.SIZE + Integer.SIZE) / 8 + LttngViewerCommands.LTTNG_VIEWER_PATH_MAX + LttngViewerCommands.LTTNG_VIEWER_NAME_MAX;
-
- /**
- * id of the stream
- */
- private final long fId;
- /**
- * It is guaranteed to be unique, because the value is assigned sequentially
- * by the relay.
- */
- private final long fCtfTraceId;
- /**
- * if the stream is a metadata stream
- */
- private final int fMetadataFlag;
- /**
- * the path
- */
- private final String fPathName;
- /**
- * The channel, traditionally channel0
- */
- private final String fChannelName;
-
- /**
- * Stream response
- *
- * @param inNet
- * input data stream
- * @throws IOException
- * network time
- */
- public StreamResponse(DataInputStream inNet) throws IOException {
- byte[] streamData = new byte[SIZE];
- inNet.readFully(streamData, 0, SIZE);
- ByteBuffer bb = ByteBuffer.wrap(streamData);
- bb.order(ByteOrder.BIG_ENDIAN);
- fId = (bb.getLong());
- fCtfTraceId = bb.getLong();
- fMetadataFlag = bb.getInt();
- byte pathName[] = new byte[LttngViewerCommands.LTTNG_VIEWER_PATH_MAX];
- byte channelName[] = new byte[LttngViewerCommands.LTTNG_VIEWER_NAME_MAX];
- bb.get(pathName, 0, LttngViewerCommands.LTTNG_VIEWER_PATH_MAX);
- bb.get(channelName, 0, LttngViewerCommands.LTTNG_VIEWER_NAME_MAX);
- fPathName = new String(pathName);
- fChannelName = new String(channelName);
- }
-
- /**
- * Get the id
- *
- * @return the Id
- */
- public long getId() {
- return fId;
- }
-
- /**
- * Get the CtfTraceId
- *
- * @return the CtfTraceId
- */
- public long getCtfTraceId() {
- return fCtfTraceId;
- }
-
- /**
- * Get the metadata flag
- *
- * @return the MetadataFlag
- */
- public int getMetadataFlag() {
- return fMetadataFlag;
- }
-
- /**
- * Get the path name
- *
- * @return the PathName
- */
- public String getPathName() {
- return fPathName;
- }
-
- /**
- * get the Channel name
- *
- * @return the ChannelName
- */
- public String getChannelName() {
- return fChannelName;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * Response to getpacket command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class TracePacketResponse implements IRelayResponse {
-
- /**
- * Command size
- *
- * fStatus + fData.length + fFlags
- */
- private static final int SIZE = (Integer.SIZE + Integer.SIZE + Integer.SIZE) / 8;
- /** Enum lttng_viewer_get_packet_return_code */
- private final GetPacketReturnCode fStatus;
- /** flags: is there new metadata or new streams? */
- private final int fFlags;
- /** the packet */
- private final byte[] fData;
-
- /**
- * Trace packet response network constructor
- *
- * @param inNet
- * network input stream
- * @throws IOException
- * network error
- */
- public TracePacketResponse(DataInputStream inNet) throws IOException {
- byte[] data = new byte[SIZE];
- inNet.readFully(data);
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- fStatus = GetPacketReturnCode.values()[bb.getInt() - 1];
- int length = bb.getInt();
- fFlags = bb.getInt();
- if (fStatus.equals(GetPacketReturnCode.VIEWER_GET_PACKET_OK)) {
- fData = new byte[length];
- inNet.readFully(fData);
- } else {
- fData = new byte[0];
- }
- }
-
- /**
- * Get the status
- *
- * @return the Status
- */
- public GetPacketReturnCode getStatus() {
- return fStatus;
- }
-
- /**
- * Get the flags
- *
- * @return the Flags
- */
- public int getFlags() {
- return fFlags;
- }
-
- /**
- * Get the packet data, please do not modify the data
- *
- * @return the Data
- */
- public byte[] getData() {
- return fData;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation and API
- * Marc-Andre Laperle - Initial implementation and API
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-/**
- * The LTTng command
- *
- * @author Matthew Khouzam
- * @since 3.0
- */
-public class ViewerCommand implements IRelayCommand {
-
- /**
- * Command size
- *
- * fDataSize + fCmdVersion + fCmd
- */
- public static final int SIZE = (Long.SIZE + Integer.SIZE) / 8 + Command.SIZE;
- /**
- * data size following this header, you normally attach a payload that one,
- * in bytes
- */
- private final long fDataSize;
- /** enum lttcomm_relayd_command */
- private final Command fCmd;
- /** command version */
- private final int fCmdVersion;
-
- /**
- * Sets the packet command
- *
- * @param viewerConnect
- * the command
- * @param size size of the command
- * @param version the version number
- */
- public ViewerCommand(Command viewerConnect, long size, int version) {
- fCmd = viewerConnect;
- fDataSize = size;
- fCmdVersion = version;
- }
-
- /**
- * Get the data size
- *
- * @return the DataSize
- */
- public long getDataSize() {
- return fDataSize;
- }
-
- /**
- * Get the command
- *
- * @return the Cmd
- */
- public Command getCmd() {
- return fCmd;
- }
-
- /**
- * Get the command version
- *
- * @return the CmdVersion
- */
- public int getCmdVersion() {
- return fCmdVersion;
- }
-
- @Override
- public byte[] serialize() {
- byte data[] = new byte[SIZE];
- ByteBuffer bb = ByteBuffer.wrap(data);
- bb.order(ByteOrder.BIG_ENDIAN);
- bb.putLong(getDataSize());
- bb.putInt(getCmd().getCommand());
- bb.putInt(fCmdVersion);
- return data;
- }
-
-
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.core.session;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized message strings from the lttng2.core.control.session
- *
- * @author Guilliano Molaire
- * @since 3.0
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.control.core.session.messages"; //$NON-NLS-1$
-
- public static String SessionConfigXML_BadRequirementType;
- public static String SessionConfigXML_DomainTypeMissing;
- public static String SessionConfigXML_EventTypeMissing;
- public static String SessionConfigXML_InvalidSessionInfoList;
- public static String SessionConfigXML_InvalidTraceSessionPath;
- public static String SessionConfigXML_UnknownEventType;
- public static String SessionConfigXML_UnknownDomainBufferType;
- public static String SessionConfigXML_SessionConfigGenerationError;
- public static String SessionConfigXML_XmlParseError;
- public static String SessionConfigXML_XmlValidateError;
- public static String SessionConfigXML_XmlValidationError;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *********************************************************************/
-package org.eclipse.linuxtools.lttng2.control.core.session;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Set;
-
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerException;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.dom.DOMSource;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.validation.Validator;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.linuxtools.internal.lttng2.control.core.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Class for generating a session configuration file. A session configuration is
- * used to configure a trace session. It is a XML formatted file that contains
- * values defining the behavior of that specific trace session.
- * <p>
- * Kernel session configuration example:
- *
- * <pre>
- * {@code
- * <sessions>
- * <session>
- * <name>test_kernel</name>
- * <domains>
- * <domain>
- * <type>KERNEL</type>
- * <buffer_type>GLOBAL</buffer_type>
- * <channels>
- * <channel>
- * <name>channel0</name>
- * <enabled>false</enabled>
- * <overwrite_mode>DISCARD</overwrite_mode>
- * <subbuffer_size>262144</subbuffer_size>
- * <subbuffer_count>4</subbuffer_count>
- * <switch_timer_interval>0</switch_timer_interval>
- * <read_timer_interval>200000</read_timer_interval>
- * <output_type>SPLICE</output_type>
- * <tracefile_size>0</tracefile_size>
- * <tracefile_count>0</tracefile_count>
- * <live_timer_interval>0</live_timer_interval>
- * <events>
- * <event>
- * <enabled>true</enabled>
- * <type>SYSCALL</type>
- * </event>
- * <event>
- * <name>snd_soc_cache_sync</name>
- * <enabled>true</enabled>
- * <type>TRACEPOINT</type>
- * </event>
- * </events>
- * </channel>
- * </channels>
- * </domain>
- * </domains>
- * <started>false</started>
- * <output>
- * <consumer_output>
- * <enabled>true</enabled>
- * <destination>
- * <path>/home/user/lttng-traces/test_kernel</path>
- * </destination>
- * </consumer_output>
- * </output>
- * </session>
- * </sessions>
- * }
- * </pre>
- *
- * </p>
- *
- * @author Guilliano Molaire
- * @since 3.0
- */
-public final class SessionConfigGenerator {
-
- /** The name of the session schema */
- private static final String SESSION_XSD_FILENAME = "session.xsd"; //$NON-NLS-1$
-
- /** The indent size used for the session configuration XML file */
- private static final String INDENT_AMOUNT_PROPERTY_NAME = "{http://xml.apache.org/xslt}indent-amount"; //$NON-NLS-1$
- private static final String INDENT_AMOUNT_PROPERTY_VALUE = "4"; //$NON-NLS-1$
-
- /**
- * Private constructor. The class should not be instantiated.
- */
- private SessionConfigGenerator() {
- }
-
- // ---------------------------------------------------------
- // Methods to generate session configuration files
- // ---------------------------------------------------------
-
- /**
- * Generates a session configuration file from a set of session information.
- *
- * @param sessions
- * The session informations
- * @param sessionFileDestination
- * The path of the locally saved session configuration file
- * @return The status of the session configuration generation
- */
- public static IStatus generateSessionConfig(Set<ISessionInfo> sessions, IPath sessionFileDestination) {
- /* Parameters validation */
- if (sessions == null || sessions.isEmpty()) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SessionConfigXML_InvalidSessionInfoList);
- } else if (sessionFileDestination == null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SessionConfigXML_InvalidTraceSessionPath);
- }
-
- /* Generate the session configuration file */
- try {
- Document sessionConfigDocument = generateSessionConfig(sessions);
-
- if (sessionConfigDocument != null) {
- saveSessionConfig(sessionConfigDocument, sessionFileDestination.toString());
- } else {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SessionConfigXML_SessionConfigGenerationError);
- }
- } catch (TransformerException | IllegalArgumentException | ParserConfigurationException e) {
- Activator.getDefault().logError("Error generating the session configuration file: " + sessionFileDestination.toString(), e); //$NON-NLS-1$
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage());
- }
-
- return Status.OK_STATUS;
- }
-
- /**
- * Generates a session configuration from a set of session informations.
- *
- * @param sessions
- * The session informations
- * @return The document with all session configuration nodes
- * @throws IllegalArgumentException
- * On an illegal argument inside sessions
- * @throws ParserConfigurationException
- * On an parser configuration error
- */
- private static Document generateSessionConfig(Iterable<ISessionInfo> sessions) throws IllegalArgumentException, ParserConfigurationException {
- DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
-
- Document document = docBuilder.newDocument();
-
- Element rootElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_SESSIONS);
- document.appendChild(rootElement);
-
- for (ISessionInfo session : sessions) {
- /* All elements under "sessions" elements */
- Element sessionElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_SESSION);
-
- /* Contents of session element */
- String enabled = session.getSessionState().equals(TraceSessionState.ACTIVE) ? SessionConfigStrings.CONFIG_STRING_TRUE : SessionConfigStrings.CONFIG_STRING_FALSE;
-
- addElementContent(document, sessionElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, session.getName());
- addElementContent(document, sessionElement, SessionConfigStrings.CONFIG_ELEMENT_STARTED, enabled);
-
- if (session.isSnapshotSession()) {
- /* If it's a snapshot, we must add an attribute telling it is */
- Element attributesElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_ATTRIBUTES);
- addElementContent(document, attributesElement, SessionConfigStrings.CONFIG_ELEMENT_SNAPSHOT_MODE, SessionConfigStrings.CONFIG_STRING_TRUE);
- sessionElement.appendChild(attributesElement);
- }
-
- sessionElement.appendChild(getDomainsElement(document, session));
- sessionElement.appendChild(getOutputElement(document, session));
- rootElement.appendChild(sessionElement);
- }
-
- return document;
- }
-
- // ---------------------------------------------------------
- // Getters for each element of the configuration file
- // ---------------------------------------------------------
-
- /**
- * Gets the 'domains' element after creating it.
- *
- * @param document
- * The document in which the nodes are being added
- * @param session
- * The session informations
- * @return The domains element as an XML element
- */
- private static Element getDomainsElement(Document document, ISessionInfo session) {
- Element domainsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_DOMAINS);
-
- for (IDomainInfo domain : session.getDomains()) {
- Element domainElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
-
- /*
- * Add everything specific to a domain
- *
- * TODO: We suppose here that domain is either kernel or UST. It
- * will have to change if other domains are supported
- */
- String domainType = domain.isKernel() ? SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL : SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST;
- addElementContent(document, domainElement, SessionConfigStrings.CONFIG_ELEMENT_TYPE, domainType);
-
- String bufferType = null;
- switch (domain.getBufferType()) {
- case BUFFER_PER_UID:
- bufferType = SessionConfigStrings.CONFIG_BUFFER_TYPE_PER_UID;
- break;
- case BUFFER_PER_PID:
- bufferType = SessionConfigStrings.CONFIG_BUFFER_TYPE_PER_PID;
- break;
- case BUFFER_SHARED:
- bufferType = SessionConfigStrings.CONFIG_BUFFER_TYPE_GLOBAL;
- break;
- case BUFFER_TYPE_UNKNOWN:
- default:
- throw new IllegalArgumentException(Messages.SessionConfigXML_UnknownDomainBufferType);
- }
- addElementContent(document, domainElement, SessionConfigStrings.CONFIG_ELEMENT_DOMAIN_BUFFER_TYPE, bufferType);
-
- /* Add the channels */
- domainElement.appendChild(getChannelsElement(document, domain.isKernel(), domain.getChannels()));
- domainsElement.appendChild(domainElement);
- }
-
- return domainsElement;
- }
-
- /**
- * Gets the 'output' element after creating it. If the session is a
- * snapshot, it will be composed of a snapshot outputs element. Otherwise,
- * it will contain the consumer output element.
- *
- * @param document
- * The document in which the nodes are being added
- * @param session
- * The session informations
- * @return The output element as an XML node
- */
- private static Element getOutputElement(Document document, ISessionInfo session) {
- Element outputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_OUTPUT);
-
- if (session.isSnapshotSession()) {
- outputElement.appendChild(getSnapshotOuputsElement(document, session));
- } else if (session.isStreamedTrace()) {
- outputElement.appendChild(getNetOutputElement(document, session));
- } else {
- outputElement.appendChild(getConsumerOutputElement(document, session));
- }
-
- return outputElement;
- }
-
- /**
- * Gets the 'channels' element after creating it.
- *
- * @param document
- * The document in which the nodes are being added
- * @param isKernel
- * Is it a kernel domain type
- * @param channels
- * The channels to be added as elements
- * @return The channels element as an XML element
- */
- private static Element getChannelsElement(Document document, boolean isKernel, IChannelInfo[] channels) {
- Element channelsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_CHANNELS);
-
- for (IChannelInfo channel : channels) {
- Element channelElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_CHANNEL);
-
- /* Add everything related to a channel */
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, channel.getName());
-
- String overwriteMode = channel.isOverwriteMode() ? SessionConfigStrings.CONFIG_OVERWRITE_MODE_OVERWRITE : SessionConfigStrings.CONFIG_OVERWRITE_MODE_DISCARD;
- String enabled = channel.getState().equals(TraceEnablement.ENABLED) ? SessionConfigStrings.CONFIG_STRING_TRUE : SessionConfigStrings.CONFIG_STRING_FALSE;
-
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_ENABLED, enabled);
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_OVERWRITE_MODE, overwriteMode);
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_SUBBUFFER_SIZE, channel.getSubBufferSize());
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_SUBBUFFER_COUNT, channel.getNumberOfSubBuffers());
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_SWITCH_TIMER_INTERVAL, channel.getSwitchTimer());
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_READ_TIMER_INTERVAL, channel.getReadTimer());
-
- String outputType = channel.getOutputType().getInName().startsWith(SessionConfigStrings.CONFIG_OUTPUT_TYPE_MMAP) ?
- outputType = SessionConfigStrings.CONFIG_OUTPUT_TYPE_MMAP : SessionConfigStrings.CONFIG_OUTPUT_TYPE_SPLICE;
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_OUTPUT_TYPE, outputType);
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_TRACEFILE_SIZE, channel.getMaxSizeTraceFiles());
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_TRACEFILE_COUNT, channel.getMaxNumberTraceFiles());
-
- /*
- * TODO: Replace the 0 value by the channel live timer property from
- * SessionInfo once live session tracing is supported
- */
- addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_LIVE_TIMER_INTERVAL, SessionConfigStrings.CONFIG_STRING_ZERO);
-
- /* Add the events */
- channelElement.appendChild(getEventsElement(document, isKernel, channel.getEvents()));
- channelsElement.appendChild(channelElement);
- }
-
- return channelsElement;
- }
-
- /**
- * Gets the 'events' element after creating it. It is composed of the event
- * informations from a list of IEventInfo.
- *
- * @param document
- * The document in which the nodes are being added
- * @param isKernel
- * Is the domain type kernel
- * @param events
- * The event informations to be added
- * @return An element containing all the event informations as XML elements
- */
- private static Element getEventsElement(Document document, boolean isKernel, IEventInfo[] events) {
- Element eventsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_EVENTS);
-
- for (IEventInfo event : events) {
- Element eventElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_EVENT);
-
- /* Enabled attribute */
- String enabled = event.getState().equals(TraceEnablement.ENABLED) ? SessionConfigStrings.CONFIG_STRING_TRUE : SessionConfigStrings.CONFIG_STRING_FALSE;
-
- /* Add the attributes to the event node */
- addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, event.getName());
- addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_ENABLED, enabled);
- TraceEventType eventType = event.getEventType();
- if (!eventType.equals(TraceEventType.UNKNOWN)) {
- addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_TYPE, eventType.getInName().toUpperCase());
- } else {
- throw new IllegalArgumentException(Messages.SessionConfigXML_UnknownEventType);
- }
-
- /* Specific to UST session config: the log level */
- if (!isKernel && !event.getLogLevel().equals(TraceLogLevel.LEVEL_UNKNOWN)) {
- addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_LOGLEVEL, event.getLogLevel().ordinal());
- }
-
- /* Add the node to the parent node events */
- eventsElement.appendChild(eventElement);
- }
-
- return eventsElement;
- }
-
- /**
- * Gets the 'consumer_output' element after creating it.
- *
- * @param document
- * The document in which the nodes are being added
- * @param session
- * The session informations
- * @return The consumer output element with his informations as XML elements
- */
- private static Element getConsumerOutputElement(Document document, ISessionInfo session) {
- Element consumerOutputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_CONSUMER_OUTPUT);
- Element destinationElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_DESTINATION);
-
- /* Value of consumer output element */
- addElementContent(document, consumerOutputElement, SessionConfigStrings.CONFIG_ELEMENT_ENABLED, SessionConfigStrings.CONFIG_STRING_TRUE);
-
- if (session.isStreamedTrace()) {
- /* If it is a streamed session, add the net output element */
- destinationElement.appendChild(getNetOutputElement(document, session));
- } else {
- addElementContent(document, destinationElement, SessionConfigStrings.CONFIG_ELEMENT_PATH, session.getSessionPath());
- }
-
- consumerOutputElement.appendChild(destinationElement);
- return consumerOutputElement;
- }
-
- /**
- * Gets the 'net_output' element after creating it. It is composed of the
- * control and data URIs.
- *
- * @param document
- * The document in which the nodes are being added
- * @param session
- * The session informations
- * @return The net output element
- */
- private static Element getNetOutputElement(Document document, ISessionInfo session) {
- Element netOutputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_NET_OUTPUT);
-
- String networkUrl = session.getNetworkUrl();
- String controlUri = networkUrl == null ? session.getControlUrl() : networkUrl;
- String dataUri = networkUrl == null ? session.getDataUrl() : networkUrl;
- addElementContent(document, netOutputElement, SessionConfigStrings.CONFIG_ELEMENT_CONTROL_URI, controlUri);
- addElementContent(document, netOutputElement, SessionConfigStrings.CONFIG_ELEMENT_DATA_URI, dataUri);
-
- return netOutputElement;
- }
-
- /**
- * Gets the 'snapshot_outputs' element after creating it.
- *
- * @param document
- * The document in which the nodes are being added
- * @param session
- * The session informations
- * @return The snapshot outputs element with snapshot informations as XML
- * elements
- */
- private static Element getSnapshotOuputsElement(Document document, ISessionInfo session) {
- Element snapshotOutputsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_SNAPSHOT_OUTPUTS);
- Element outputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_OUTPUT);
-
- /* Add the name of the snapshot and the max size element */
- addElementContent(document, outputElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, session.getSnapshotInfo().getName());
-
- /*
- * TODO: find the proper max size value of output element. For now it is
- * set to the default 0 value which means unlimited for lttng.
- */
- addElementContent(document, outputElement, SessionConfigStrings.CONFIG_ELEMENT_MAX_SIZE, SessionConfigStrings.CONFIG_STRING_ZERO);
- outputElement.appendChild(getConsumerOutputElement(document, session));
-
- snapshotOutputsElement.appendChild(outputElement);
- return snapshotOutputsElement;
- }
-
- // ---------------------------------------------------------
- // Utilities
- // ---------------------------------------------------------
-
- /**
- * Validates the session configuration file against its schema.
- *
- * @param sessionFile
- * The session configuration file
- * @return The status of the validation
- */
- public static IStatus sessionValidate(File sessionFile) {
- URL url = SessionConfigGenerator.class.getResource(SESSION_XSD_FILENAME);
- SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Source xmlSource = new StreamSource(sessionFile);
-
- try {
- Schema schema = schemaFactory.newSchema(url);
- Validator validator = schema.newValidator();
- validator.validate(xmlSource);
- } catch (SAXParseException e) {
- String error = NLS.bind(Messages.SessionConfigXML_XmlParseError, e.getLineNumber(), e.getLocalizedMessage());
- Activator.getDefault().logError(error);
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- } catch (SAXException e) {
- String error = NLS.bind(Messages.SessionConfigXML_XmlValidationError, e.getLocalizedMessage());
- Activator.getDefault().logError(error);
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- } catch (IOException e) {
- String error = Messages.SessionConfigXML_XmlValidateError;
- Activator.getDefault().logError("IO exception occurred", e); //$NON-NLS-1$
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Saves the session configuration into a XML file.
- *
- * @param document
- * The document representing the session configuration file
- * @param destination
- * The path of the locally saved session configuration file
- * @throws TransformerException
- * On an transformation process
- */
- private static void saveSessionConfig(Document document, String destination) throws TransformerException {
- /* Write the content into a XML file */
- TransformerFactory transformerFactory = TransformerFactory.newInstance();
- Transformer transformer = transformerFactory.newTransformer();
-
- transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
- transformer.setOutputProperty(INDENT_AMOUNT_PROPERTY_NAME, INDENT_AMOUNT_PROPERTY_VALUE);
-
- DOMSource source = new DOMSource(document);
- StreamResult result = new StreamResult(new File(destination));
-
- transformer.transform(source, result);
- }
-
- /**
- * Adds to a parent node an element with his content.
- *
- * @param document
- * The document in which the nodes are being added
- * @param parent
- * The parent node that contains the element and his content
- * @param elementName
- * The element container name
- * @param elementContent
- * The content itself
- */
- private static void addElementContent(Document document, Element parent, String elementName, Object elementContent) {
- Element contentElement = document.createElement(elementName);
- contentElement.appendChild(document.createTextNode(elementContent.toString()));
- parent.appendChild(contentElement);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *********************************************************************/
-package org.eclipse.linuxtools.lttng2.control.core.session;
-
-/**
- * This file defines most markers from a session configuration file used to
- * configure a trace session. They can be found in the session configuration
- * schema "session.xsd" in src/common/config/ folder of LTTng-tools.
- *
- * @author Guilliano Molaire
- * @since 3.0
- */
-@SuppressWarnings({ "javadoc", "nls" })
-public interface SessionConfigStrings {
-
- /* Session configuration file extension */
- static final String SESSION_CONFIG_FILE_EXTENSION = "lttng";
-
- /* Elements of the session configuration file */
- static final String CONFIG_ELEMENT_SESSIONS = "sessions";
- static final String CONFIG_ELEMENT_SESSION = "session";
- static final String CONFIG_ELEMENT_DOMAINS = "domains";
- static final String CONFIG_ELEMENT_DOMAIN = "domain";
- static final String CONFIG_ELEMENT_CHANNELS = "channels";
- static final String CONFIG_ELEMENT_CHANNEL = "channel";
- static final String CONFIG_ELEMENT_EVENTS = "events";
- static final String CONFIG_ELEMENT_EVENT = "event";
- static final String CONFIG_ELEMENT_OUTPUT = "output";
- static final String CONFIG_ELEMENT_ATTRIBUTES = "attributes";
- static final String CONFIG_ELEMENT_NET_OUTPUT = "net_output";
- static final String CONFIG_ELEMENT_MAX_SIZE = "max_size";
- static final String CONFIG_ELEMENT_SNAPSHOT_OUTPUTS = "snapshot_outputs";
- static final String CONFIG_ELEMENT_CONSUMER_OUTPUT = "consumer_output";
- static final String CONFIG_ELEMENT_DESTINATION = "destination";
- static final String CONFIG_ELEMENT_CONTROL_URI = "control_uri";
- static final String CONFIG_ELEMENT_DATA_URI = "data_uri";
- static final String CONFIG_ELEMENT_SNAPSHOT_MODE = "snapshot_mode";
- static final String CONFIG_ELEMENT_PATH = "path";
- static final String CONFIG_ELEMENT_NAME = "name";
- static final String CONFIG_ELEMENT_ENABLED = "enabled";
- static final String CONFIG_ELEMENT_TYPE = "type";
- static final String CONFIG_ELEMENT_STARTED = "started";
- static final String CONFIG_ELEMENT_DOMAIN_BUFFER_TYPE = "buffer_type";
- static final String CONFIG_ELEMENT_OVERWRITE_MODE = "overwrite_mode";
- static final String CONFIG_ELEMENT_SUBBUFFER_SIZE = "subbuffer_size";
- static final String CONFIG_ELEMENT_SUBBUFFER_COUNT = "subbuffer_count";
- static final String CONFIG_ELEMENT_SWITCH_TIMER_INTERVAL = "switch_timer_interval";
- static final String CONFIG_ELEMENT_READ_TIMER_INTERVAL = "read_timer_interval";
- static final String CONFIG_ELEMENT_OUTPUT_TYPE = "output_type";
- static final String CONFIG_ELEMENT_TRACEFILE_SIZE = "tracefile_size";
- static final String CONFIG_ELEMENT_TRACEFILE_COUNT = "tracefile_count";
- static final String CONFIG_ELEMENT_LIVE_TIMER_INTERVAL = "live_timer_interval";
- static final String CONFIG_ELEMENT_LOGLEVEL_TYPE = "loglevel_type";
- static final String CONFIG_ELEMENT_LOGLEVEL = "loglevel";
-
- /* Common element values */
- static final String CONFIG_STRING_TRUE = "true";
- static final String CONFIG_STRING_FALSE = "false";
- static final String CONFIG_STRING_ZERO = "0";
-
- static final String CONFIG_DOMAIN_TYPE_KERNEL = "KERNEL";
- static final String CONFIG_DOMAIN_TYPE_UST = "UST";
-
- static final String CONFIG_BUFFER_TYPE_PER_UID = "PER_UID";
- static final String CONFIG_BUFFER_TYPE_PER_PID = "PER_PID";
- static final String CONFIG_BUFFER_TYPE_GLOBAL = "GLOBAL";
-
- static final String CONFIG_OVERWRITE_MODE_DISCARD = "DISCARD";
- static final String CONFIG_OVERWRITE_MODE_OVERWRITE = "OVERWRITE";
-
- static final String CONFIG_OUTPUT_TYPE_SPLICE = "SPLICE";
- static final String CONFIG_OUTPUT_TYPE_MMAP = "MMAP";
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2014 École Polytechnique de Montréal
-#
-# 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:
-# Guilliano Molaire - Initial API and implementation
-###############################################################################
-
-SessionConfigXML_BadRequirementType=The requirement type is not supported
-SessionConfigXML_DomainTypeMissing=The domain requirement type is missing
-SessionConfigXML_EventTypeMissing=The event requirement type is missing
-SessionConfigXML_InvalidSessionInfoList=The list of session is empty or null
-SessionConfigXML_InvalidTraceSessionPath=The trace session path is not valid
-SessionConfigXML_UnknownEventType=The event type is not handled by the session configuration
-SessionConfigXML_UnknownDomainBufferType=The domain buffer type is not handled by the session configuration
-SessionConfigXML_SessionConfigGenerationError=An error occurred while generating the session configuration file
-SessionConfigXML_XmlParseError=XML Parsing error at line {0}: {1}
-SessionConfigXML_XmlValidateError=An error occurred while validating the XML file.
-SessionConfigXML_XmlValidationError=Error validating XML file {0}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2014 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
--->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
-elementFormDefault="qualified" version="2.5">
-
-<xs:simpleType name="name_type">
- <xs:restriction base="xs:string">
- <xs:maxLength value="255"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="uint64_type">
- <xs:restriction base="xs:integer">
- <xs:minInclusive value="0"/>
- <xs:maxInclusive value="18446744073709551615"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="uint32_type">
- <xs:restriction base="xs:integer">
- <xs:minInclusive value="0"/>
- <xs:maxInclusive value="4294967295"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:simpleType name="channel_overwrite_mode_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="DISCARD"/>
- <xs:enumeration value="OVERWRITE"/>
- </xs:restriction>
-</xs:simpleType>
-
-<!-- Maps to the lttng_event_output enum -->
-<xs:simpleType name="event_output_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="SPLICE"/>
- <xs:enumeration value="MMAP"/>
- </xs:restriction>
-</xs:simpleType>
-
-<!-- Maps to the lttng_loglevel_type enum -->
-<xs:simpleType name="loglevel_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="ALL"/>
- <xs:enumeration value="RANGE"/>
- <xs:enumeration value="SINGLE"/>
- </xs:restriction>
-</xs:simpleType>
-
-<!-- Maps to the lttng_event_type enum -->
-<xs:simpleType name="event_type_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="ALL"/>
- <xs:enumeration value="TRACEPOINT"/>
- <xs:enumeration value="PROBE"/>
- <xs:enumeration value="FUNCTION"/>
- <xs:enumeration value="FUNCTION_ENTRY"/>
- <xs:enumeration value="NOOP"/>
- <xs:enumeration value="SYSCALL"/>
- <xs:enumeration value="KPROBE"/>
- <xs:enumeration value="KRETPROBE"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="event_probe_attributes_type">
- <xs:all>
- <xs:element name="symbol_name" type="name_type" minOccurs="0"/>
- <xs:element name="address" type="uint64_type" minOccurs="0"/>
- <xs:element name="offset" type="uint64_type" minOccurs="0"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="event_ftrace_attributes_type">
- <xs:all>
- <xs:element name="symbol_name" type="name_type"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="event_attributes_type">
- <xs:choice>
- <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
- <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
- </xs:choice>
-</xs:complexType>
-
-<xs:complexType name="event_exclusion_list_type">
- <xs:sequence>
- <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="event_type">
- <xs:all>
- <xs:element name="name" type="name_type" minOccurs="0"/>
- <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
- <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/>
- <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/>
- <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/>
- <xs:element name="filter" type="xs:string" minOccurs="0"/>
- <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
- <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="event_list_type">
- <xs:sequence>
- <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="event_perf_context_type">
- <xs:all>
- <xs:element name="type" type="uint32_type"/>
- <xs:element name="config" type="uint64_type"/>
- <xs:element name="name" type="name_type"/>
- </xs:all>
-</xs:complexType>
-
-<!-- Maps to the lttng_event_context_type enum -->
-<xs:simpleType name="event_context_type_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="PID"/>
- <xs:enumeration value="PROCNAME"/>
- <xs:enumeration value="PRIO"/>
- <xs:enumeration value="NICE"/>
- <xs:enumeration value="VPID"/>
- <xs:enumeration value="TID"/>
- <xs:enumeration value="VTID"/>
- <xs:enumeration value="PPID"/>
- <xs:enumeration value="VPPID"/>
- <xs:enumeration value="PTHREAD_ID"/>
- <xs:enumeration value="HOSTNAME"/>
- <xs:enumeration value="IP"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="event_context_type">
- <xs:choice>
- <xs:element name="type" type="event_context_type_type"/>
- <xs:element name="perf" type="event_perf_context_type"/>
- </xs:choice>
-</xs:complexType>
-
-<xs:complexType name="event_context_list_type">
- <xs:sequence>
- <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
-</xs:complexType>
-
-<!-- Maps to struct lttng_channel -->
-<xs:complexType name="channel_type">
- <xs:all>
- <xs:element name="name" type="name_type"/>
- <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
- <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
- <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
- <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
- <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
- <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
- <xs:element name="output_type" type="event_output_type"/>
- <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
- <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
- <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
- <xs:element name="events" type="event_list_type" minOccurs="0"/>
- <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/>
- </xs:all>
-</xs:complexType>
-
-<!-- Maps to the lttng_domain_type enum -->
-<xs:simpleType name="domain_type_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="KERNEL"/>
- <xs:enumeration value="UST"/>
- <xs:enumeration value="JUL"/>
- </xs:restriction>
-</xs:simpleType>
-
-<!-- Maps to the lttng_buffer_type enum -->
-<xs:simpleType name="domain_buffer_type">
- <xs:restriction base="xs:string">
- <xs:enumeration value="PER_PID"/>
- <xs:enumeration value="PER_UID"/>
- <xs:enumeration value="GLOBAL"/>
- </xs:restriction>
-</xs:simpleType>
-
-<xs:complexType name="channel_list_type">
- <xs:sequence>
- <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
-</xs:complexType>
-
-<!-- Maps to struct lttng_domain and contains channels -->
-<xs:complexType name="domain_type">
- <xs:all>
- <xs:element name="type" type="domain_type_type"/>
- <xs:element name="buffer_type" type="domain_buffer_type"/>
- <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="session_attributes_type">
- <xs:choice>
- <xs:element name="snapshot_mode" type="xs:boolean"/>
- <xs:element name="live_timer_interval" type="uint32_type"/> <!-- usec -->
- </xs:choice>
-</xs:complexType>
-
-<xs:complexType name="domain_list_type">
- <xs:sequence>
- <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="net_output_type">
- <xs:all>
- <xs:element name="control_uri" type="xs:string"/>
- <xs:element name="data_uri" type="xs:string"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="destination_type">
- <xs:choice>
- <xs:element name="path" type="xs:string"/>
- <xs:element name="net_output" type="net_output_type"/>
- </xs:choice>
-</xs:complexType>
-
-<xs:complexType name="consumer_output_type">
- <xs:all>
- <xs:element name="enabled" type="xs:boolean" default="true"/>
- <xs:element name="destination" type="destination_type"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="snapshot_output_type">
- <xs:all>
- <xs:element name="name" type="name_type"/>
- <xs:element name="max_size" type="uint64_type"/>
- <xs:element name="consumer_output" type="consumer_output_type"/>
- </xs:all>
-</xs:complexType>
-
-<xs:complexType name="snapshot_output_list_type">
- <xs:sequence>
- <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
- </xs:sequence>
-</xs:complexType>
-
-<xs:complexType name="session_output_type">
- <xs:choice>
- <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
- <xs:element name="consumer_output" type="consumer_output_type"/>
- </xs:choice>
-</xs:complexType>
-
-<xs:complexType name="session_type">
- <xs:all>
- <xs:element name="name" type="name_type"/>
- <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
- <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
- <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
- <xs:element name="output" type="session_output_type" minOccurs="0"/>
- </xs:all>
-</xs:complexType>
-
-<xs:element name="sessions">
- <xs:complexType>
- <xs:sequence>
- <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
- </xs:sequence>
- </xs:complexType>
-</xs:element>
-
-</xs:schema>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="stubs"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.control.ui.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.control.ui.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.commands,
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.linuxtools.lttng2.control.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.lttng2.control.ui;bundle-version="3.1.0"
-Import-Package: org.eclipse.rse.core,
- org.eclipse.rse.core.model,
- org.eclipse.rse.core.subsystems,
- org.eclipse.rse.services.shells,
- org.eclipse.rse.services.terminals,
- org.eclipse.rse.subsystems.files.core,
- org.eclipse.rse.subsystems.files.core.servicesubsystem
-Export-Package: org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.control.stubs.service;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;x-internal:=true,
- org.eclipse.linuxtools.lttng2.control.ui.tests;x-friends:="org.eclipse.linuxtools.lttng.alltests",
- org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;x-internal:=true,
- org.eclipse.linuxtools.lttng2.control.ui.tests.service;x-internal:=true
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/,\
- stubs/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties
-src.includes = about.html
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.control.ui.tests
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Control UI Tests Plug-in
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.control.ui.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Control UI Tests Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.linuxtools.lttng2.control.ui.tests</testSuite>
- <testClass>org.eclipse.linuxtools.lttng2.control.ui.tests.AllTests</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
- <product>org.eclipse.platform.ide</product>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Test suite for the Activator class
- */
-public class ActivatorTest {
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#Activator}.
- */
- @Test
- public void testActivator() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#getDefault}.
- */
- @Test
- public void testGetDefault() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#start}.
- */
- @Test
- public void testStartBundleContext() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#stop}.
- */
- @Test
- public void testStopBundleContext() {
- assertTrue(true);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ActivatorTest.class,
- org.eclipse.linuxtools.lttng2.control.ui.tests.model.component.AllTests.class,
- org.eclipse.linuxtools.lttng2.control.ui.tests.service.AllTests.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2011, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the model.component unit tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- TraceControlComponentTest.class,
- TraceControlCreateSessionTests.class,
- TraceControlCreateSessionMiTests.class,
- TraceControlKernelProviderTests.class,
- TraceControlKernelSessionTests.class,
- TraceControlPropertiesTest.class,
- TraceControlTreeModelNoProvidersTest.class,
- TraceControlTreeModelTest.class,
- TraceControlUstProviderTests.class,
- TraceControlUstSessionTests.class,
- TraceControlUstSessionTests2.class,
- TraceControlSnapshotSessionTests.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/**********************************************************************
- * 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
-
-/**
- * The class can be used to validate the listener interface.
- */
-@SuppressWarnings("javadoc")
-public class ListenerValidator implements ITraceControlComponentChangedListener {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private boolean fisAddedCalled = false;
- private boolean fisRemoveCalled = false;
- private boolean fisChangedCalled = false;
-
- private ITraceControlComponent fParent = null;
- private ITraceControlComponent fChild = null;
- private ITraceControlComponent fChangedComponent = null;
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- public boolean isAddedCalled() {
- return fisAddedCalled;
- }
-
- public boolean isRemovedCalled() {
- return fisRemoveCalled;
- }
-
- public boolean isChangedCalled() {
- return fisChangedCalled;
- }
-
- public ITraceControlComponent getSavedParent() {
- return fParent;
- }
-
- public ITraceControlComponent getSavedChild() {
- return fChild;
- }
-
- public ITraceControlComponent getSavedComponent() {
- return fChangedComponent;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- public void initialize() {
- fisAddedCalled = false;
- fisRemoveCalled = false;
- fisChangedCalled = false;
- fParent = null;
- fChild = null;
- fChangedComponent = null;
- }
-
- @Override
- public void componentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
- fisAddedCalled = true;
- fParent = parent;
- fChild = component;
- }
-
- @Override
- public void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
- fisRemoveCalled = true;
- fParent = parent;
- fChild = component;
- }
-
- @Override
- public void componentChanged(ITraceControlComponent component) {
- fisChangedCalled = true;
- fParent = null;
- fChangedComponent = component;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlRoot;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceMI;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.ISharedImages;
-import org.eclipse.ui.PlatformUI;
-import org.junit.Test;
-
-/**
- * The class <code>TraceControlComponentTest</code> contains tests for the class
- * <code>{@link TraceControlComponent}</code>.
- */
-public class TraceControlComponentTest {
-
- /**
- * Run the TraceControlComponent(String) constructor test.
- */
- @Test
- public void testTraceControlComponent_1() {
-
- String name = "node";
-
- TraceControlComponent result = new TraceControlComponent(name);
-
- assertNotNull(result);
- assertEquals(name, result.getName());
- assertEquals(null, result.getParent());
- assertEquals(false, result.hasChildren());
- assertEquals(null, result.getImage());
- assertEquals(null, result.getControlService());
- assertEquals(null, result.getToolTip());
- }
-
- /**
- * Run the TraceControlComponent(String,ITraceControlComponent) constructor test.
- */
- @Test
- public void testTraceControlComponent_2() {
- String name = "node";
-
- ITraceControlComponent parent = new TraceControlRoot();
- TraceControlComponent result = new TraceControlComponent(name, parent);
-
- assertNotNull(result);
- assertEquals(name, result.getName());
- assertEquals(false, result.hasChildren());
- assertEquals(null, result.getImage());
- assertEquals(null, result.getControlService());
- assertEquals(null, result.getToolTip());
- }
-
- /**
- * Run the void addChild(ITraceControlComponent) method test.
- */
- @Test
- public void testAddAndGetChild1() {
- TraceControlComponent fixture = new TraceControlComponent("node", new TraceControlRoot());
- fixture.setToolTip("This is the test node");
- fixture.addChild(new TraceControlRoot());
- ITraceControlComponent component = new TraceControlRoot();
- fixture.addChild(component);
-
- ITraceControlComponent child = fixture.getChild(TraceControlRoot.TRACE_CONTROL_ROOT_NAME);
- assertNotNull(child);
- assertEquals(TraceControlRoot.TRACE_CONTROL_ROOT_NAME, child.getName());
- }
-
- /**
- * Run the void addChild(ITraceControlComponent) method test.
- */
- @Test
- public void testAddAndGetChild2() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- ITraceControlComponent component = null;
-
- fixture.addChild(component);
- assertFalse(fixture.hasChildren());
- }
-
- /**
- * Run the void addComponentListener(ITraceControlComponentChangedListener) method test.
- */
- @Test
- public void testAddComponentListener_1() {
- TraceControlComponent fixture = new TraceControlComponent("", (ITraceControlComponent) null);
- fixture.setToolTip("");
-
- ListenerValidator validator = new ListenerValidator();
- fixture.addComponentListener(validator);
-
- TraceControlRoot root = new TraceControlRoot();
- fixture.addChild(root);
- assertTrue(validator.isAddedCalled());
-
- fixture.removeChild(root);
- assertTrue(validator.isRemovedCalled());
-
- fixture.fireComponentChanged(fixture);
- assertTrue(validator.isChangedCalled());
- }
-
- /**
- * Run the boolean containsChild(String) method test.
- */
- @Test
- public void testContainsChild_1() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
- String name = "node";
-
- boolean result = fixture.containsChild(name);
-
- assertEquals(false, result);
- }
-
- /**
- * Run the boolean containsChild(String) method test.
- */
- @Test
- public void testContainsChild_2() {
- TraceControlComponent fixture = new TraceControlComponent("name", new TraceControlRoot());
- fixture.setToolTip("");
-
- boolean result = fixture.containsChild(TraceControlRoot.TRACE_CONTROL_ROOT_NAME);
-
- assertEquals(false, result);
- }
-
- /**
- * Run the void fireCompenentAdded(ITraceControlComponent,ITraceControlComponent) method test.
- * Run the void fireCompenentRemoved(ITraceControlComponent,ITraceControlComponent) method test.
- * Run the void fireCompenentChanged(ITraceControlComponent) method test
- */
- @Test
- public void testFireCompenentUpdated() {
- ITraceControlComponent parent = new TraceControlRoot();
-
- TraceControlComponent fixture = new TraceControlComponent("node", parent);
- fixture.setToolTip("");
-
- ITraceControlComponent component = new TraceControlComponent("child");
- fixture.addChild(component);
-
- ListenerValidator validator = new ListenerValidator();
- fixture.addComponentListener(validator);
-
- fixture.fireComponentAdded(parent, component);
- assertTrue(validator.isAddedCalled());
- assertEquals(parent.getName(), validator.getSavedParent().getName());
- assertEquals(component.getName(), validator.getSavedChild().getName());
-
- validator.initialize();
-
- fixture.fireComponentRemoved(parent, component);
- assertTrue(validator.isRemovedCalled());
- assertEquals(parent.getName(), validator.getSavedParent().getName());
- assertEquals(component.getName(), validator.getSavedChild().getName());
-
- validator.initialize();
- fixture.fireComponentChanged(fixture);
- assertTrue(validator.isChangedCalled());
- assertEquals(fixture.getName(), validator.getSavedComponent().getName());
- }
-
- /**
- * Run the Object getAdapter(Class) method test.
- */
- @Test
- public void testGetAdapter() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
- Class<Object> adapter = Object.class;
-
- Object result = fixture.getAdapter(adapter);
-
- assertEquals(null, result);
- }
-
- /**
- * Run the ITraceControlComponent[] getChildren() method test.
- */
- @Test
- public void testGetChildren_1() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
-
- ITraceControlComponent[] result = fixture.getChildren();
-
- assertNotNull(result);
- assertEquals(1, result.length);
- assertNotNull(result[0]);
- assertEquals("trace_control_root", result[0].getName());
- assertEquals(null, result[0].getParent());
- assertEquals(false, result[0].hasChildren());
- assertEquals(null, result[0].getImage());
- assertEquals(null, result[0].getControlService());
- assertEquals(null, result[0].getToolTip());
- }
-
- /**
- * Run the ILttngControlService getControlService()/setControlService()
- * method test.
- *
- * @throws ExecutionException
- * Would fail the test
- */
- @Test
- public void testGetAndSetControlService_1() throws ExecutionException {
-
- TraceControlComponent parent = new TraceControlComponent("parent") {
- ILttngControlService fService = null;
-
- @Override
- public void setControlService(ILttngControlService service ) {
- fService = service;
- }
-
- @Override
- public ILttngControlService getControlService() {
- return fService;
- }
- };
-
- TraceControlComponent fixture = new TraceControlComponent("", parent);
- parent.addChild(fixture);
- fixture.setToolTip("");
- TraceControlComponent child = new TraceControlComponent("child", fixture);
- fixture.addChild(child);
-
- ILttngControlService result = fixture.getControlService();
- assertEquals(null, result);
-
- TestRemoteSystemProxy proxy = new TestRemoteSystemProxy();
- ILttngControlService service = new LTTngControlService(proxy.createCommandShell());
- fixture.setControlService(service);
- result = fixture.getControlService();
- assertNotNull(service);
- assertEquals(service, result);
-
- service = new LTTngControlServiceMI(proxy.createCommandShell(), LTTngControlServiceMI.class.getResource(LTTngControlServiceConstants.MI_XSD_FILENAME));
- fixture.setControlService(service);
- result = fixture.getControlService();
- assertNotNull(service);
- assertEquals(service, result);
-
- result = fixture.getChildren()[0].getControlService();
- assertNotNull(service);
- assertEquals(service, result);
- }
-
- /**
- * Run the Image getImage() method test.
- */
- @Test
- public void testGetImage_1() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
-
- Image result = fixture.getImage();
- assertEquals(null, result);
-
- fixture.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER));
- assertNotNull(fixture.getImage());
- }
-
- /**
- * Run the boolean hasChildren() method test.
- */
- @Test
- public void testHasChildren_1() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
-
- boolean result = fixture.hasChildren();
-
- assertTrue(result);
- }
-
- /**
- * Run the boolean hasChildren() method test.
- */
- @Test
- public void testHasChildren_2() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
-
- boolean result = fixture.hasChildren();
-
- assertFalse(result);
- }
-
- /**
- * Run the void removeAllChildren() method test.
- */
- @Test
- public void testRemoveAllChildren_2() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
-
- fixture.addChild(new TraceControlRoot());
- fixture.addChild(new TraceControlComponent("child"));
-
- fixture.removeAllChildren();
- assertFalse(fixture.hasChildren());
- }
-
- /**
- * Run the void removeChild(ITraceControlComponent) method test.
- */
- @Test
- public void testRemoveChild_1() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- TraceControlComponent child = new TraceControlComponent("child", fixture);
-
- fixture.addChild(child);
- fixture.removeChild(child);
- assertFalse(fixture.hasChildren());
- }
-
- /**
- * Run the void removeChild(ITraceControlComponent) method test.
- */
- @Test
- public void testRemoveChild_2() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
- ITraceControlComponent component = null;
-
- fixture.removeChild(component);
- assertTrue(fixture.hasChildren());
- }
-
- /**
- * Run the void removeComponentListener(ITraceControlComponentChangedListener) method test.
- */
- @Test
- public void testRemoveComponentListener_1() {
- TraceControlComponent fixture = new TraceControlComponent("", (ITraceControlComponent) null);
- fixture.setToolTip("");
-
- ListenerValidator validator = new ListenerValidator();
- fixture.addComponentListener(validator);
-
- // Remove listener and check that validator is not called anymore
- validator.initialize();
- fixture.removeComponentListener(validator);
- TraceControlRoot root = new TraceControlRoot();
- fixture.addChild(root);
- assertFalse(validator.isAddedCalled());
-
- fixture.removeChild(root);
- assertFalse(validator.isRemovedCalled());
-
- fixture.fireComponentChanged(fixture);
- assertFalse(validator.isChangedCalled());
- }
-
- /**
- * Run the void removeComponentListener(ITraceControlComponentChangedListener) method test.
- */
- @Test
- public void testRemoveComponentListener_2() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
- ITraceControlComponentChangedListener listener = new ControlView();
-
- fixture.removeComponentListener(listener);
-
- }
-
- /**
- * Run the void setChildren(List<ITraceControlComponent>)/ITraceControlComponent[] getChildren() method test.
- */
- @Test
- public void testGetAndSetChildren() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- List<ITraceControlComponent> children = new LinkedList<>();
- children.add(new TraceControlComponent("child1"));
- children.add(new TraceControlComponent("child2"));
-
- fixture.setChildren(children);
-
- ITraceControlComponent[] result = fixture.getChildren();
- assertEquals(2, result.length);
- assertEquals("child1", result[0].getName());
- assertEquals("child2", result[1].getName());
- }
-
- /**
- * Run the void String getName()/setName(String) method tests.
- */
- @Test
- public void testGetAndSetName() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
- String name = "node";
-
- fixture.setName(name);
- assertEquals(name,fixture.getName());
-
- }
-
- /**
- * Run the void ITraceControlComponent getParent()/setParent(ITraceControlComponent) method tests.
- */
- @Test
- public void testGetAndSetParent() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("");
- fixture.addChild(new TraceControlRoot());
- ITraceControlComponent parent = new TraceControlRoot();
- parent.addChild(fixture);
-
- fixture.setParent(parent);
- ITraceControlComponent retrievedParent = fixture.getParent();
- assertNotNull(retrievedParent);
- assertEquals(parent.getName(), retrievedParent.getName());
- assertEquals(TraceControlRoot.TRACE_CONTROL_ROOT_NAME, retrievedParent.getName());
- assertEquals(null, retrievedParent.getParent());
- assertEquals(true, retrievedParent.hasChildren());
- }
-
- /**
- * Run the void TargetNodeState getTargetNodeState()/etTargetNodeState(TargetNodeState) method tests.
- */
- @Test
- public void testGetAndSetTargetNodeState_1() {
- TraceControlComponent parent = new TraceControlComponent("parent") {
- private TargetNodeState fState;
-
- @Override
- public void setTargetNodeState(TargetNodeState state ) {
- fState = state;
- }
-
- @Override
- public TargetNodeState getTargetNodeState() {
- return fState;
- }
- };
-
- TraceControlComponent fixture = new TraceControlComponent("", parent);
- parent.addChild(fixture);
-
- fixture.setToolTip("");
- TargetNodeState state = TargetNodeState.CONNECTED;
-
- fixture.setTargetNodeState(state);
- TargetNodeState result = fixture.getTargetNodeState();
-
- assertNotNull(result);
- assertEquals(state, result);
- // Check also parent
- assertEquals(state, fixture.getParent().getTargetNodeState());
- assertEquals("CONNECTED", result.name());
- assertEquals("CONNECTED", result.toString());
- assertEquals(2, result.ordinal());
-
- fixture.setTargetNodeState(TargetNodeState.DISCONNECTED);
- result = fixture.getTargetNodeState();
- assertNotNull(result);
- assertEquals("DISCONNECTED", result.name());
- assertEquals("DISCONNECTED", result.toString());
- assertEquals(0, result.ordinal());
-
- state = TargetNodeState.CONNECTING;
-
- fixture.setTargetNodeState(state);
- result = fixture.getTargetNodeState();
- assertNotNull(result);
- assertEquals("CONNECTING", result.name());
- assertEquals("CONNECTING", result.toString());
- assertEquals(3, result.ordinal());
-
- fixture.setTargetNodeState(TargetNodeState.DISCONNECTING);
- result = fixture.getTargetNodeState();
- assertNotNull(result);
- assertEquals("DISCONNECTING", result.name());
- assertEquals("DISCONNECTING", result.toString());
- assertEquals(1, result.ordinal());
-
- }
-
- /**
- * Run the void setToolTip(String) method test.
- */
- @Test
- public void testGetSndSetToolTip() {
- TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
- fixture.setToolTip("This is a tooltip");
- fixture.addChild(new TraceControlRoot());
-
- String result = fixture.getToolTip();
-
- assertEquals("This is a tooltip", result);
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte - Support for machine interface LTTng 2.6
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-/**
- * Machine interface Kernel session manipulation handling test cases.
- * LTTng 2.6
- */
-public class TraceControlCreateSessionMiTests extends TraceControlCreateSessionTests {
-
- private static final String TEST_STREAM = "CreateSessionTestMi.cfg";
-
- @Override
- protected String getTestStream() {
- return TEST_STREAM;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Jonathan Rajotte - Support for LTTng 2.6
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class {@link TraceControlKernelSessionTests} contains Kernel
- * session/channel/event handling test cases.
- */
-public class TraceControlCreateSessionTests {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- private static final String TEST_STREAM = "CreateSessionTest.cfg";
- private static final String SCEN_SCENARIO_FILE_PROTO_TEST = "CreateSessionFileProto";
- private static final String SCEN_SCENARIO_CONTROL_DATA_TEST = "CreateSessionControlData";
- private static final String SCEN_SCENARIO_NETWORK_TEST = "CreateSessionNetwork";
- private static final String SCEN_SCENARIO_NETWORK2_TEST = "CreateSessionNetwork2";
-
- private static final String SESSION = "mysession";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + getTestStream()), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Get the test stream file name to use for the test suite
- *
- * @return the name of the test stream file
- */
- protected String getTestStream() {
- return TEST_STREAM;
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * on internal error
- */
- @Test
- public void testTraceSessionTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
-
- root.addChild(node);
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Verify that node is connected
- assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
-
- ILttngControlService controleService = node.getControlService();
-
- // Get provider groups
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Initialize dialog implementations for command execution
- CreateSessionDialogStub sessionDialogStub = new CreateSessionDialogStub();
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialogStub);
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // ------------------------------------------------------------------------
- // Create session (--U file://...) and destroy
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_FILE_PROTO_TEST);
-
- sessionDialogStub.setNetworkUrl("file:///tmp");
- sessionDialogStub.setStreamedTrace(true);
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals(getSessionName(), session.getName());
- if (controleService.isVersionSupported("2.6.0")) {
- assertEquals("/tmp", session.getSessionPath());
- } else {
- assertEquals("file:///tmp", session.getSessionPath());
- }
-
- assertTrue(!session.isStreamedTrace());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setNetworkUrl(null);
- sessionDialogStub.setStreamedTrace(false);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- // ------------------------------------------------------------------------
- // Create session (--U file://,,, and destroy
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_CONTROL_DATA_TEST);
-
- sessionDialogStub.setControlUrl("tcp://172.0.0.1");
- sessionDialogStub.setDataUrl("tcp://172.0.0.1:5343");
- sessionDialogStub.setStreamedTrace(true);
-
- session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals(getSessionName(), session.getName());
- if (controleService.isVersionSupported("2.6.0")) {
- assertEquals("tcp4://172.0.0.1:5342/ [data: 5343]", session.getSessionPath());
- } else {
- assertEquals("tcp://172.0.0.1:5342 [data: 5343]", session.getSessionPath());
- }
- assertTrue(session.isStreamedTrace());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setControlUrl(null);
- sessionDialogStub.setDataUrl(null);
- sessionDialogStub.setStreamedTrace(false);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- // ------------------------------------------------------------------------
- // Create session (--U file://... and destroy
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_NETWORK_TEST);
-
- sessionDialogStub.setNetworkUrl("net://172.0.0.1:1234:2345");
- sessionDialogStub.setStreamedTrace(true);
-
- session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals(getSessionName(), session.getName());
- if (controleService.isVersionSupported("2.6.0")) {
- assertEquals("tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]", session.getSessionPath());
- } else {
- assertEquals("net://172.0.0.1:1234 [data: 2345]", session.getSessionPath());
- }
- assertTrue(session.isStreamedTrace());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setNetworkUrl(null);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- // ------------------------------------------------------------------------
- // Create session (--U net6://[...] and destroy
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(SCEN_SCENARIO_NETWORK2_TEST);
-
- sessionDialogStub.setNetworkUrl("net6://[ffff::eeee:dddd:cccc:0]");
- sessionDialogStub.setStreamedTrace(true);
-
- session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals(getSessionName(), session.getName());
- if (controleService.isVersionSupported("2.6.0")) {
- assertEquals("tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]", session.getSessionPath());
- } else {
- assertEquals("net://[ffff::eeee:dddd:cccc:0]:5342/mysession-20130221-144451 [data: 5343]", session.getSessionPath());
- }
- assertTrue(session.isStreamedTrace());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- sessionDialogStub.setNetworkUrl(null);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- // -------------------------------------------------------------------------
- // Disconnect node
- // -------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- // -------------------------------------------------------------------------
- // Delete node
- // -------------------------------------------------------------------------
-
- fFacility.executeCommand(node, "delete");
- assertEquals(0, fFacility.getControlView().getTraceControlRoot().getChildren().length);
- }
-
- private static String getSessionName() {
- return SESSION;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlKernelProviderTests</code> contains UST provider
- * handling test cases.
- */
-public class TraceControlKernelProviderTests {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "CreateTreeTest.cfg";
- private static final String SCEN_SCENARIO1_TEST = "Scenario1";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- fFacility.dispose();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * Would fail the test
- */
- @Test
- public void testKernelProviderTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
-
- root.addChild(node);
-
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 20) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Verify that node is connected
- assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
-
- // Get provider and session group
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Check for kernel provider
- TraceProviderGroup providerGroup = (TraceProviderGroup) groups[0];
- assertTrue(providerGroup.hasKernelProvider());
-
- // Get kernel provider
- ITraceControlComponent[] providers = providerGroup.getChildren();
- KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
-
- // Get kernel provider events and select 2 events
- ITraceControlComponent[] events = kernelProvider.getChildren();
- assertNotNull(events);
- assertEquals(3, events.length);
-
- BaseEventComponent baseEventInfo0 = (BaseEventComponent) events[0];
- BaseEventComponent baseEventInfo1 = (BaseEventComponent) events[1];
-
- // Initialize dialog implementations for command execution
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
- TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- // ------------------------------------------------------------------------
- // Create session
- // ------------------------------------------------------------------------
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertEquals("/home/user/lttng-traces/mysession-20120314-132824", session.getSessionPath());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- // ------------------------------------------------------------------------
- // Enable event on default channel on created session above
- // ------------------------------------------------------------------------
- // Initialize scenario
- fProxy.setScenario(SCEN_SCENARIO1_TEST);
-
- ITraceControlComponent[] components = { baseEventInfo0, baseEventInfo1 };
-
- fFacility.executeCommand(components, "assign.event");
-
- // Verify that kernel domain was created
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("Kernel", domains[0].getName());
-
- // Verify that channel0 was created with default values
- ITraceControlComponent[] channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
- assertEquals("channel0", channel.getName());
- assertEquals(4, channel.getNumberOfSubBuffers());
- assertEquals("splice()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
- assertEquals(false, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(262144, channel.getSubBufferSize());
- assertEquals(0, channel.getSwitchTimer());
-
- // Verify that event components were created
- ITraceControlComponent[] channel0Events = channel.getChildren();
- assertNotNull(channel0Events);
- assertEquals(2, channel0Events.length);
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
- assertTrue(channel0Events[1] instanceof TraceEventComponent);
-
- TraceEventComponent event = (TraceEventComponent) channel0Events[0];
- assertEquals("sched_kthread_stop_ret", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- TraceEventComponent event1 = (TraceEventComponent) channel0Events[1];
- assertEquals("sched_kthread_stop", event1.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event1.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event1.getEventType());
- assertEquals(TraceEnablement.ENABLED, event1.getState());
-
- // ------------------------------------------------------------------------
- // Disable event components
- // ------------------------------------------------------------------------
- ITraceControlComponent[] selection = { event, event1 };
- fFacility.executeCommand(selection, "disableEvent");
-
- assertEquals(TraceEnablement.DISABLED, event.getState());
- assertEquals(TraceEnablement.DISABLED, event1.getState());
-
- // ------------------------------------------------------------------------
- // Enable event component
- // ------------------------------------------------------------------------
- fFacility.executeCommand(event1, "enableEvent");
-
- // Verify event state
- assertEquals(TraceEnablement.ENABLED, event1.getState());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- //-------------------------------------------------------------------------
- // Disconnect node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "delete");
- assertEquals(0, fFacility.getControlView().getTraceControlRoot().getChildren().length);
-
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.AddContextDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableEventsDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlKernelSessionTests</code> contains Kernel
- * session/channel/event handling test cases.
- */
-public class TraceControlKernelSessionTests {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "CreateTreeTest.cfg";
- private static final String SCEN_SCENARIO3_TEST = "Scenario3";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- fFacility.dispose();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * Would fail the test
- */
- @Test
- public void testTraceSessionTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
-
- root.addChild(node);
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Verify that node is connected
- assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
-
- // Get provider groups
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Initialize dialog implementations for command execution
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
- TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- // ------------------------------------------------------------------------
- // Create session
- // ------------------------------------------------------------------------
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertEquals("/home/user/lttng-traces/mysession-20120314-132824", session.getSessionPath());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- // Initialize scenario
- fProxy.setScenario(SCEN_SCENARIO3_TEST);
-
- // ------------------------------------------------------------------------
- // Enable channel on session
- // ------------------------------------------------------------------------
- EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
- channelStub.setIsKernel(true);
- TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelStub);
-
- fFacility.executeCommand(session, "enableChannelOnSession");
-
- // Verify that Kernel domain was created
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("Kernel", domains[0].getName());
-
- // Verify that channel was created with correct data
- ITraceControlComponent[] channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
- assertEquals("mychannel", channel.getName());
- assertEquals(4, channel.getNumberOfSubBuffers());
- assertEquals("splice()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
- assertEquals(true, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(16384, channel.getSubBufferSize());
- assertEquals(100, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Create channel on domain
- // ------------------------------------------------------------------------
- ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
- info.setName("mychannel2");
- info.setOverwriteMode(false);
- info.setSubBufferSize(32768);
- info.setNumberOfSubBuffers(2);
- info.setSwitchTimer(100);
- info.setReadTimer(200);
- channelStub.setChannelInfo(info);
-
- fFacility.executeCommand(domains[0], "enableChannelOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- assertTrue(channels[1] instanceof TraceChannelComponent);
- channel = (TraceChannelComponent) channels[1];
- assertEquals("mychannel2", channel.getName());
- assertEquals(2, channel.getNumberOfSubBuffers());
- assertEquals("splice()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
- assertEquals(false, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(32768, channel.getSubBufferSize());
- assertEquals(100, channel.getSwitchTimer());
-
- EnableEventsDialogStub eventsDialogStub = new EnableEventsDialogStub();
- eventsDialogStub.setIsTracePoints(true);
- List<String> events = new ArrayList<>();
- events.add("sched_kthread_stop");
- events.add("sched_kthread_stop_ret");
- eventsDialogStub.setNames(events);
- eventsDialogStub.setIsKernel(true);
- TraceControlDialogFactory.getInstance().setEnableEventsDialog(eventsDialogStub);
-
- // ------------------------------------------------------------------------
- // disable channels
- // ------------------------------------------------------------------------
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- fFacility.executeCommand(channels, "disableChannel");
-
- assertEquals(TraceEnablement.DISABLED, ((TraceChannelComponent)channels[0]).getState());
- assertEquals(TraceEnablement.DISABLED, ((TraceChannelComponent)channels[1]).getState());
-
- // ------------------------------------------------------------------------
- // enable channels
- // ------------------------------------------------------------------------
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- fFacility.executeCommand(channels, "enableChannel");
-
- assertEquals(TraceEnablement.ENABLED, ((TraceChannelComponent)channels[0]).getState());
- assertEquals(TraceEnablement.ENABLED, ((TraceChannelComponent)channels[1]).getState());
-
- // ------------------------------------------------------------------------
- // enable event (tracepoints) on session
- // ------------------------------------------------------------------------
- fFacility.executeCommand(session, "enableEventOnSession");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(3, channels.length);
-
- assertTrue(channels[2] instanceof TraceChannelComponent);
- channel = (TraceChannelComponent) channels[2];
- assertEquals("channel0", channel.getName());
- // No need to check parameters of default channel because that has been done in other tests
-
- ITraceControlComponent[] channel0Events = channel.getChildren();
- assertEquals(2, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
- assertTrue(channel0Events[1] instanceof TraceEventComponent);
-
- TraceEventComponent event = (TraceEventComponent) channel0Events[0];
- assertEquals("sched_kthread_stop_ret", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- event = (TraceEventComponent) channel0Events[1];
- assertEquals("sched_kthread_stop", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // enable event (tracepoints) on domain
- // ------------------------------------------------------------------------
- events.clear();
- events.add("sched_wakeup_new");
- eventsDialogStub.setNames(events);
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel = (TraceChannelComponent) channels[2];
-
- channel0Events = channel.getChildren();
- assertEquals(3, channel0Events.length);
-
- assertTrue(channel0Events[2] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[2];
- assertEquals("sched_wakeup_new", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // enable event (tracepoints) on channel
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setNames(events);
- eventsDialogStub.setIsAllTracePoints(true);
-
- fFacility.executeCommand(channels[1], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- // No need to check parameters of default channel because that has been done in other tests
- channel = (TraceChannelComponent) channels[1];
-
- channel0Events = channel.getChildren();
- assertEquals(3, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
- assertTrue(channel0Events[1] instanceof TraceEventComponent);
- assertTrue(channel0Events[2] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("sched_kthread_stop_ret", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- event = (TraceEventComponent) channel0Events[1];
- assertEquals("sched_kthread_stop", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- event = (TraceEventComponent) channel0Events[2];
- assertEquals("sched_wakeup_new", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // enable event (syscall) on channel
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setIsTracePoints(false);
- eventsDialogStub.setIsAllTracePoints(false);
- eventsDialogStub.setIsSysCalls(true);
-
- fFacility.executeCommand(channels[0], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel = (TraceChannelComponent) channels[0];
-
- channel0Events = channel.getChildren();
- assertEquals(1, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("syscalls", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.SYSCALL, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // enable event (syscall) on domain
- // ------------------------------------------------------------------------
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel = (TraceChannelComponent) channels[2];
-
- channel0Events = channel.getChildren();
- assertEquals(4, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("syscalls", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.SYSCALL, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // enable event (syscall) on session
- // ------------------------------------------------------------------------
- fFacility.executeCommand(session, "enableEventOnSession");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel = (TraceChannelComponent) channels[2];
-
- channel0Events = channel.getChildren();
- assertEquals(4, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("syscalls", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.SYSCALL, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
-
- // ------------------------------------------------------------------------
- // enable event (dynamic probe) on domain
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setIsSysCalls(false);
- eventsDialogStub.setIsDynamicProbe(true);
- eventsDialogStub.setDynamicProbe("0xc0101280");
- eventsDialogStub.setProbeEventName("myevent1");
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(5, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
-
- TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[0];
- assertEquals("myevent1", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertNull(probeEvent.getOffset());
- assertEquals("0xc0101280", probeEvent.getAddress());
- assertNull(probeEvent.getSymbol());
-
- // ------------------------------------------------------------------------
- // enable event (dynamic probe) on channel
- // ------------------------------------------------------------------------
- eventsDialogStub.setIsDynamicProbe(true);
- eventsDialogStub.setDynamicProbe("init_post");
- eventsDialogStub.setProbeEventName("myevent2");
-
- fFacility.executeCommand(channels[2], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(6, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[0];
- assertEquals("myevent2", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertEquals("0x0", probeEvent.getOffset());
- assertNull(null, probeEvent.getAddress());
- assertEquals("init_post", probeEvent.getSymbol());
-
- // ------------------------------------------------------------------------
- // enable event (dynamic probe) on session
- // ------------------------------------------------------------------------
- eventsDialogStub.setIsDynamicProbe(true);
- eventsDialogStub.setDynamicProbe("init_post:0x1000");
- eventsDialogStub.setProbeEventName("myevent3");
-
- fFacility.executeCommand(session, "enableEventOnSession");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(7, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[0];
- assertEquals("myevent3", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertEquals("0x1000", probeEvent.getOffset());
- assertNull(null, probeEvent.getAddress());
- assertEquals("init_post", probeEvent.getSymbol());
-
- // ------------------------------------------------------------------------
- // enable event (dynamic function probe) on session
- // ------------------------------------------------------------------------
- eventsDialogStub.setIsDynamicProbe(false);
- eventsDialogStub.setDynamicProbe(null);
- eventsDialogStub.setProbeEventName(null);
- eventsDialogStub.setIsFunctionProbe(true);
- eventsDialogStub.setFunctionEventName("myevent4");
- eventsDialogStub.setFunctionProbe("create_dev");
-
- fFacility.executeCommand(session, "enableEventOnSession");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(8, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[0];
- assertEquals("myevent4", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- // Changed for Bug fix 419454 to function event which was introduced by LTTng 2.2
- assertEquals(TraceEventType.FUNCTION, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertEquals("0x0", probeEvent.getOffset());
- assertNull(null, probeEvent.getAddress());
- assertEquals("create_dev", probeEvent.getSymbol());
-
- // ------------------------------------------------------------------------
- // enable event (dynamic function probe) on domain
- // ------------------------------------------------------------------------
- eventsDialogStub.setIsFunctionProbe(true);
- eventsDialogStub.setFunctionEventName("myevent5");
- eventsDialogStub.setFunctionProbe("create_dev:0x2000");
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(9, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[0];
- assertEquals("myevent5", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertEquals("0x2000", probeEvent.getOffset());
- assertNull(null, probeEvent.getAddress());
- assertEquals("create_dev", probeEvent.getSymbol());
-
- // ------------------------------------------------------------------------
- // enable event (dynamic function probe) on channel
- // ------------------------------------------------------------------------
- eventsDialogStub.setIsFunctionProbe(true);
- eventsDialogStub.setFunctionEventName("myevent");
- eventsDialogStub.setFunctionProbe("create_dev:0x2000");
-
- fFacility.executeCommand(channels[0], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(2, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[0];
- assertEquals("myevent", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertEquals("0x2000", probeEvent.getOffset());
- assertNull(null, probeEvent.getAddress());
- assertEquals("create_dev", probeEvent.getSymbol());
-
- // ------------------------------------------------------------------------
- // Add Context on domain
- // ------------------------------------------------------------------------
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- AddContextDialogStub addContextStub = new AddContextDialogStub();
- List<String> contexts = new ArrayList<>();
- contexts.add("prio");
- contexts.add("perf:branch-misses");
- contexts.add("perf:cache-misses");
- addContextStub.setContexts(contexts);
- TraceControlDialogFactory.getInstance().setAddContextDialog(addContextStub);
-
- fFacility.executeCommand(domains[0], "addContextOnDomain");
- // Currently there is nothing to verify because the list commands don't show any context information
- // However, the execution of the command make sure that the correct service command line is build and executed.
-
- // ------------------------------------------------------------------------
- // Add Context on channel
- // ------------------------------------------------------------------------
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- //Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
-
- try {
- // The setContext() verifies that the contexts set are part of the available contexts
- // The available contexts are set by the command handler addContextOnDomain above.
- // So we indirectly test here that the parsing and setting of available contexts were
- // done correctly above.
- addContextStub.setContexts(contexts);
- } catch (IllegalArgumentException e) {
- fail("Exception caught - unknown context");
- }
-
- fFacility.executeCommand(channel, "addContextOnChannel");
- // Currently there is nothing to verify because the list commands don't show any context information
- // However, the execution of the command make sure that the correct service command line is build and executed.
-
- // ------------------------------------------------------------------------
- // Add Context on event
- // ------------------------------------------------------------------------
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- //Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
-
- channel0Events = channel.getChildren();
-
- event = (TraceEventComponent) channel0Events[6];
-
- fFacility.executeCommand(event, "addContextOnEvent");
- // Currently there is nothing to verify because the list commands don't show any context information
- // However, the execution of the command make sure that the correct service command line is build and executed.
-
- // ------------------------------------------------------------------------
- // Calibrate
- // ------------------------------------------------------------------------
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- fFacility.executeCommand(domains[0], "calibrate");
- // There is nothing to verify here.
- // However, the execution of the command make sure that the correct service command line is build and executed.
-
- // ------------------------------------------------------------------------
- // refresh
- // ------------------------------------------------------------------------
- fFacility.executeCommand(node, "refresh");
- groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
- assertEquals(3, groups[0].getChildren().length); // provider
- assertEquals(1, groups[1].getChildren().length); // sessions
- assertEquals(1, groups[1].getChildren()[0].getChildren().length); // domains
- assertEquals(3, groups[1].getChildren()[0].getChildren()[0].getChildren().length); // channels
- assertEquals(2, groups[1].getChildren()[0].getChildren()[0].getChildren()[0].getChildren().length); // events (of channel[0])
-
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- session = (TraceSessionComponent)groups[1].getChildren()[0];
-
- // ------------------------------------------------------------------------
- // start session
- // ------------------------------------------------------------------------
- fFacility.startSession(session);
- assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
-
- // ------------------------------------------------------------------------
- // stop session
- // ------------------------------------------------------------------------
- fFacility.stopSession(session);
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- //-------------------------------------------------------------------------
- // Disconnect node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
-
- fFacility.executeCommand(node, "delete");
- assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.BaseEventPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.KernelProviderPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TargetNodePropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceChannelPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceDomainPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceEventPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceProbeEventPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceSessionPropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.UstProviderPropertySource;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.junit.After;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlPropertiesTest</code> contains tests for the all
- * property class</code>.
- */
-public class TraceControlPropertiesTest {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String DIRECTORY = "testfiles";
- private static final String TEST_STREAM = "ListInfoTest.cfg";
- private static final String SCEN_LIST_INFO_TEST = "ListInfoTest";
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- TraceControlTestFacility.getInstance().waitForJobs();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testComponentProperties() throws Exception {
-
- TestRemoteSystemProxy proxy = new TestRemoteSystemProxy();
-
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- proxy.setTestFile(testfile.getAbsolutePath());
- proxy.setScenario(SCEN_LIST_INFO_TEST);
-
- ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, proxy);
-
- root.addChild(node);
- node.connect();
-
- TraceControlTestFacility.getInstance().waitForJobs();
-
- // ------------------------------------------------------------------------
- // Verify Node Properties (adapter)
- // ------------------------------------------------------------------------
- Object adapter = node.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TargetNodePropertySource);
-
- TargetNodePropertySource source = (TargetNodePropertySource)adapter;
-
- assertNull(source.getEditableValue());
- assertFalse(source.isPropertySet(TargetNodePropertySource.TARGET_NODE_NAME_PROPERTY_ID));
- assertNotNull(source.getPropertyDescriptors());
-
- assertEquals("myNode", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_NAME_PROPERTY_ID));
- assertEquals("LOCALHOST", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_ADDRESS_PROPERTY_ID));
- assertEquals(TargetNodeState.CONNECTED.name(), source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_STATE_PROPERTY_ID));
- assertEquals("2.1.0", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_VERSION_PROPERTY_ID));
- assertNull(source.getPropertyValue("test"));
-
- adapter = node.getAdapter(IChannelInfo.class);
- assertNull(adapter);
-
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- ITraceControlComponent[] providers = groups[0].getChildren();
-
- assertNotNull(providers);
- assertEquals(3, providers.length);
-
- // ------------------------------------------------------------------------
- // Verify Kernel Provider Properties (adapter)
- // ------------------------------------------------------------------------
- KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
-
- adapter = kernelProvider.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof KernelProviderPropertySource);
-
- KernelProviderPropertySource kernelSource = (KernelProviderPropertySource)adapter;
- assertNotNull(kernelSource.getPropertyDescriptors());
-
- assertEquals("Kernel", kernelSource.getPropertyValue(KernelProviderPropertySource.KERNEL_PROVIDER_NAME_PROPERTY_ID));
-
- // ------------------------------------------------------------------------
- // Verify UST Provider Properties (adapter)
- // ------------------------------------------------------------------------
- UstProviderComponent ustProvider = (UstProviderComponent) providers[1];
-
- adapter = ustProvider.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof UstProviderPropertySource);
-
- UstProviderPropertySource ustSource = (UstProviderPropertySource)adapter;
- assertNotNull(ustSource.getPropertyDescriptors());
-
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustSource.getPropertyValue(UstProviderPropertySource.UST_PROVIDER_NAME_PROPERTY_ID));
- assertEquals(String.valueOf(9379), ustSource.getPropertyValue(UstProviderPropertySource.UST_PROVIDER_PID_PROPERTY_ID));
-
- // ------------------------------------------------------------------------
- // Verify Base Event Properties (adapter)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] events = ustProvider.getChildren();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- BaseEventComponent baseEventInfo = (BaseEventComponent) events[0];
- assertNotNull(baseEventInfo);
-
- adapter = baseEventInfo.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof BaseEventPropertySource);
-
- BaseEventPropertySource baseSource = (BaseEventPropertySource)adapter;
- assertNotNull(baseSource.getPropertyDescriptors());
-
- assertEquals("ust_tests_hello:tptest_sighandler", baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_NAME_PROPERTY_ID));
- assertEquals(TraceEventType.TRACEPOINT.name(), baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_TYPE_PROPERTY_ID));
- assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE.name(), baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_LOGLEVEL_PROPERTY_ID));
-
- baseEventInfo = (BaseEventComponent) events[1];
- assertNotNull(baseEventInfo);
-
- adapter = baseEventInfo.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof BaseEventPropertySource);
- baseSource = (BaseEventPropertySource)adapter;
- assertNotNull(baseSource.getPropertyDescriptors());
- assertEquals("doublefield=float;floatfield=float;stringfield=string", baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_FIELDS_PROPERTY_ID));
-
- // ------------------------------------------------------------------------
- // Verify Session Properties (adapter)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] sessions = groups[1].getChildren();
- assertNotNull(sessions);
- assertEquals(2, sessions.length);
-
- TraceSessionComponent session = (TraceSessionComponent)sessions[1];
-
- adapter = session.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceSessionPropertySource);
-
- TraceSessionPropertySource sessionSource = (TraceSessionPropertySource)adapter;
- assertNotNull(sessionSource.getPropertyDescriptors());
-
- assertEquals("mysession", sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_NAME_PROPERTY_ID));
- assertEquals("/home/user/lttng-traces/mysession-20120129-084256", sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_PATH_PROPERTY_ID));
- assertEquals(TraceSessionState.ACTIVE.name(), sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_STATE_PROPERTY_ID));
-
- // ------------------------------------------------------------------------
- // Verify Domain Provider Properties (adapter)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(2, domains.length);
-
- TraceDomainComponent domain = (TraceDomainComponent) domains[0];
- adapter = domain.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceDomainPropertySource);
-
- TraceDomainPropertySource domainSource = (TraceDomainPropertySource)adapter;
- assertNotNull(domainSource.getPropertyDescriptors());
-
- assertEquals("Kernel", domainSource.getPropertyValue(TraceDomainPropertySource.TRACE_DOMAIN_NAME_PROPERTY_ID));
- assertEquals(BufferType.BUFFER_SHARED.getInName(), domainSource.getPropertyValue(TraceDomainPropertySource.BUFFER_TYPE_PROPERTY_ID));
-
- ITraceControlComponent[] channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- // ------------------------------------------------------------------------
- // Verify Channel Properties (adapter)
- // ------------------------------------------------------------------------
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
-
- adapter = channel.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceChannelPropertySource);
-
- TraceChannelPropertySource channelSource = (TraceChannelPropertySource)adapter;
- assertNotNull(channelSource.getPropertyDescriptors());
-
- assertEquals("channel0", channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_NAME_PROPERTY_ID));
- assertEquals(String.valueOf(4), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID));
- assertEquals(TraceEnablement.ENABLED.name(), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_STATE_PROPERTY_ID));
- assertEquals(String.valueOf(false), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID));
- assertEquals("splice()", channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID));
- assertEquals(String.valueOf(200), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_READ_TIMER_PROPERTY_ID));
- assertEquals(String.valueOf(262144), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID));
- assertEquals(String.valueOf(0), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID));
-
- // ------------------------------------------------------------------------
- // Verify Event Properties (adapter)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] channel0Events = channel.getChildren();
- assertNotNull(channel0Events);
- assertEquals(5, channel0Events.length);
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- TraceEventComponent event = (TraceEventComponent) channel0Events[0];
-
- adapter = event.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceEventPropertySource);
-
- TraceEventPropertySource eventSource = (TraceEventPropertySource)adapter;
- assertNotNull(eventSource.getPropertyDescriptors());
-
- assertEquals("block_rq_remap", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID));
- assertEquals(TraceLogLevel.TRACE_EMERG.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
- assertEquals(TraceEventType.TRACEPOINT.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID));
- assertEquals(TraceEnablement.ENABLED.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID));
-
- // ------------------------------------------------------------------------
- // Verify Probe Event Properties (adapter)
- // ------------------------------------------------------------------------
- assertTrue(channel0Events[2] instanceof TraceProbeEventComponent);
-
- TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[2];
-
- adapter = probeEvent.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceProbeEventPropertySource);
-
- TraceProbeEventPropertySource probeEventSource = (TraceProbeEventPropertySource)adapter;
- assertNotNull(probeEventSource.getPropertyDescriptors());
- assertEquals(4, probeEventSource.getPropertyDescriptors().length);
-
- assertEquals("myevent2", probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID));
- assertEquals(TraceEventType.PROBE.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID));
- assertEquals(TraceEnablement.ENABLED.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID));
- assertEquals("0xc0101340", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID));
-
- assertTrue(channel0Events[3] instanceof TraceProbeEventComponent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[3];
-
- adapter = probeEvent.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceProbeEventPropertySource);
-
- probeEventSource = (TraceProbeEventPropertySource)adapter;
- assertNotNull(probeEventSource.getPropertyDescriptors());
- assertEquals(5, probeEventSource.getPropertyDescriptors().length);
-
- assertEquals("myevent0", probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID));
- assertEquals(TraceEventType.PROBE.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID));
- assertEquals(TraceEnablement.ENABLED.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID));
- assertEquals("0x0", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID));
- assertEquals("init_post", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID));
-
- //-------------------------------------------------------------------------
- // Verify Filter of UST event
- //-------------------------------------------------------------------------
- event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[0];
- adapter = event.getAdapter(IPropertySource.class);
- assertEquals("with filter", event.getFilterExpression());
-
- //-------------------------------------------------------------------------
- // Verify Log Level Type of UST events (> LTTng 2.4)
- //-------------------------------------------------------------------------
- event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[0];
- adapter = event.getAdapter(IPropertySource.class);
- eventSource = (TraceEventPropertySource) adapter;
- assertEquals("== TRACE_DEBUG_LINE", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
-
- event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[1];
- adapter = event.getAdapter(IPropertySource.class);
- eventSource = (TraceEventPropertySource) adapter;
- assertEquals("<= TRACE_INFO", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
-
- event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[2];
- adapter = event.getAdapter(IPropertySource.class);
- eventSource = (TraceEventPropertySource) adapter;
- assertEquals("TRACE_DEBUG_SYSTEM", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
- node.disconnect();
- node.getParent().removeChild(node);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceSessionPropertySource;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlSnapshotSessionTests</code> contains Snapshot
- * session test cases for support of LTTng Tools 2.3.
- */
-public class TraceControlSnapshotSessionTests {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "CreateSessionTest2.cfg";
- private static final String SCEN_CREATE_SESSION = "ScenCreateSession";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- fFacility.dispose();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testTraceSessionTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
-
- root.addChild(node);
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Get provider groups
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Initialize dialog implementations for command execution
- // --- snapshot session ---
- CreateSessionDialogStub sessionDialog = new CreateSessionDialogStub();
- sessionDialog.setSnapshot(true);
-
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialog);
- TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // Initialize scenario
- fProxy.setScenario(SCEN_CREATE_SESSION);
-
- // ------------------------------------------------------------------------
- // Create session
- // ------------------------------------------------------------------------
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertTrue(session.isSnapshotSession());
- assertNotNull(session.getSnapshotInfo());
- assertEquals("snapshot-1", session.getSnapshotInfo().getName());
- assertEquals("/home/user/lttng-traces/mysession-20130913-141651", session.getSnapshotInfo().getSnapshotPath());
- assertEquals(1, session.getSnapshotInfo().getId());
-
- // ------------------------------------------------------------------------
- // Start session
- // ------------------------------------------------------------------------
- fFacility.startSession(session);
- assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
-
- // verify properties
- Object adapter = session.getAdapter(IPropertySource.class);
- assertNotNull(adapter);
- assertTrue(adapter instanceof TraceSessionPropertySource);
-
- TraceSessionPropertySource sessionSource = (TraceSessionPropertySource)adapter;
- IPropertyDescriptor[] descriptors = sessionSource.getPropertyDescriptors();
- assertNotNull(descriptors);
-
- Map<String,String> map = new HashMap<>();
- map.put(TraceSessionPropertySource.TRACE_SESSION_NAME_PROPERTY_ID, "mysession");
- map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_NAME_PROPERTY_ID, "snapshot-1");
- map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_PATH_PROPERTY_ID, "/home/user/lttng-traces/mysession-20130913-141651");
- map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_ID_PROPERTY_ID, "1");
- map.put(TraceSessionPropertySource.TRACE_SESSION_STATE_PROPERTY_ID, TraceSessionState.ACTIVE.name());
-
- for (int j = 0; j < descriptors.length; j++) {
- String expected = map.get(descriptors[j].getId());
- assertNotNull(expected);
- assertEquals(expected, sessionSource.getPropertyValue(descriptors[j].getId()).toString());
- }
-
- // ------------------------------------------------------------------------
- // Record snapshot
- // ------------------------------------------------------------------------
- fFacility.executeCommand(session, "snapshot");
-
- // ------------------------------------------------------------------------
- // Stop snapshot
- // ------------------------------------------------------------------------
- fFacility.stopSession(session);
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- //-------------------------------------------------------------------------
- // Disconnect node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
-
- fFacility.executeCommand(node, "delete");
-
- assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
- }
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2011, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.NotEnabledException;
-import org.eclipse.core.commands.NotHandledException;
-import org.eclipse.core.commands.common.NotDefinedException;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.handlers.IHandlerService;
-
-/**
- * Singleton class to facilitate the test cases. Creates UML2SD view and loader objects as well as provides
- * utility methods for interacting with the loader/view.
- */
-@SuppressWarnings("javadoc")
-public class TraceControlTestFacility {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- public final static int WAIT_FOR_JOBS_DELAY = 50;
- public final static int GUI_REFESH_DELAY = 500;
-
- public final static String DIRECTORY = "testfiles";
- public final static String COMMAND_CATEGORY_PREFIX = "org.eclipse.linuxtools.internal.lttng2.ui.commands.control.";
- public final static String SCEN_INIT_TEST = "Initialize";
- public final static String SCEN_SCENARIO_SESSION_HANDLING = "SessionHandling";
- public final static String SCEN_SCENARIO_SESSION_HANDLING_WITH_PATH = "SessionHandlingWithPath";
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private static TraceControlTestFacility fInstance = null;
- private ControlView fControlView = null;
- private boolean fIsInitialized = false;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- private TraceControlTestFacility() {
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- public static TraceControlTestFacility getInstance() {
- if (fInstance == null) {
- fInstance = new TraceControlTestFacility();
- }
- return fInstance;
- }
-
- /**
- * Initial the test facility.
- */
- public void init() {
-
- if (!fIsInitialized) {
-
- IViewPart view;
- try {
-
- view = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .findView("org.eclipse.ui.internal.introview");
-
- if (view != null) {
- PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage().hideView(view);
- }
-
- view = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow()
- .getActivePage()
- .showView(ControlView.ID);
-
- } catch (PartInitException e) {
- throw new RuntimeException(e);
- }
-
- fControlView = (ControlView) view;
-
- delay(3000);
- fIsInitialized = true;
- }
- }
-
-
- /**
- * Disposes the facility (and GUI)
- */
- public void dispose() {
- if (fIsInitialized) {
- waitForJobs();
-
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(fControlView);
- fIsInitialized = false;
- }
- }
-
- /**
- * Creates a delay for given time.
- * @param waitTimeMillis - time in milli seconds
- */
- public void delay(long waitTimeMillis) {
- Display display = Display.getCurrent();
- if (display != null) {
- long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
- while(System.currentTimeMillis() < endTimeMillis) {
- if (!display.readAndDispatch()) {
- // We do not use Display.sleep because it might never wake up
- // if there is no user interaction
- try {
- Thread.sleep(Math.min(waitTimeMillis, 10));
- } catch (final InterruptedException e) {
- // Ignored
- }
- }
- display.update();
- }
- } else {
- try {
- Thread.sleep(waitTimeMillis);
- } catch (InterruptedException e) {
- // Ignored
- }
- }
- }
-
- /**
- * Waits for all Eclipse jobs to finish
- */
- public void waitForJobs() {
- while (!Job.getJobManager().isIdle()) {
- delay(WAIT_FOR_JOBS_DELAY);
- }
- }
-
- /**
- * @return current control view
- */
- public ControlView getControlView() {
- return fControlView;
- }
-
- /**
- * Executes an Eclipse command with command ID after selecting passed component
- * @param component - component to select in the tree
- * @param commandId - command ID
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public void executeCommand(ITraceControlComponent component, String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- setSelection(component);
- executeCommand(commandId);
- }
-
- /**
- * Executes an Eclipse command with command ID after selecting passed components
- * @param components - array of components to select in the tree
- * @param commandId - command ID
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public void executeCommand(ITraceControlComponent[] components, String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- setSelection(components);
- executeCommand(commandId);
- }
-
- /**
- * Executes an Eclipse command with command ID
- * @param commandId
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public void executeCommand(String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- IHandlerService handlerService = (IHandlerService) fControlView.getSite().getService(IHandlerService.class);
- handlerService.executeCommand(COMMAND_CATEGORY_PREFIX + commandId, null);
- waitForJobs();
- }
-
- /**
- * Selects passed component
- * @param component - component to select in the tree
- * @param commandId - command ID
- */
- public void setSelection(ITraceControlComponent component) {
- fControlView.setSelection(component);
- // Selection is done in own job
- waitForJobs();
- }
-
-
- /**
- * Selects passed components
- * @param components - array of component to select in the tree
- * @param commandId - command ID
- */
- public void setSelection(ITraceControlComponent[] components) {
- fControlView.setSelection(components);
-
- // Selection is done in own job
- waitForJobs();
- }
-
- /**
- * Creates session on passed session group.
- * @param group - session group
- * @return - trace session group if it's successful else null
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public TraceSessionComponent createSession(ITraceControlComponent group) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- executeCommand(group, "createSession");
-
- ITraceControlComponent[] sessions = group.getChildren();
- if ((sessions == null) || (sessions.length == 0)) {
- return null;
- }
- return (TraceSessionComponent)sessions[0];
- }
-
- /**
- * Destroys a given session.
- * @param session - session to destroy
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public void destroySession(TraceSessionComponent session) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- executeCommand(session, "destroySession");
- }
-
- /**
- * Starts a given session
- * @param session - session to start
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public void startSession(TraceSessionComponent session) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- executeCommand(session, "start");
- }
-
- /**
- * Stops a given session
- * @param session - session to stop
- * @throws ExecutionException
- * @throws NotDefinedException
- * @throws NotEnabledException
- * @throws NotHandledException
- */
- public void stopSession(TraceSessionComponent session) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
- executeCommand(session, "stop");
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlTreeModelNoProvidersTest</code> verifies that the
- * Tracer Control can handle the case where no kernel provider and only UST
- * provider are available.
- */
-public class TraceControlTreeModelNoProvidersTest {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "ListInfoTest.cfg";
- private static final String SCEN_LIST_INFO_TEST = "ListInfoTestNoKernel";
- private static final String TARGET_NODE_NAME = "myNode";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- TraceControlTestFacility.getInstance().waitForJobs();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testTraceControlComponents() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(SCEN_LIST_INFO_TEST);
-
- ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent(TARGET_NODE_NAME, root, host, fProxy);
-
- root.addChild(node);
- node.connect();
-
- TraceControlTestFacility.getInstance().waitForJobs();
-
- // ------------------------------------------------------------------------
- // Verify Parameters of TargetNodeComponent
- // ------------------------------------------------------------------------
- assertEquals("LOCALHOST", node.getHostName()); // assigned in createLocalHost() above
- assertEquals("LOCALHOST", node.getToolTip()); // assigned in createLocalHost() above
- Image connectedImage = node.getImage();
- assertNotNull(connectedImage);
- assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
- assertNotNull(node.getControlService());
- ILttngControlService service = node.getControlService();
- assertTrue(service instanceof LTTngControlService);
- node.setControlService(service);
- assertTrue(node.getControlService() instanceof LTTngControlService);
-
- assertTrue(node.isPassiveCommunicationsListener());
-
- // ------------------------------------------------------------------------
- // Verify Children of TargetNodeComponent
- // ------------------------------------------------------------------------
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- assertTrue(groups[0] instanceof TraceProviderGroup);
- assertTrue(groups[1] instanceof TraceSessionGroup);
-
- // Check for kernel provider
- TraceProviderGroup providerGroup = (TraceProviderGroup) groups[0];
- assertFalse(providerGroup.hasKernelProvider());
-
- assertEquals("Provider", providerGroup.getName());
- assertEquals("Sessions", groups[1].getName());
-
- // ------------------------------------------------------------------------
- // Verify TraceProviderGroup
- // ------------------------------------------------------------------------
- ITraceControlComponent[] providers = groups[0].getChildren();
-
- assertNotNull(providers);
- assertEquals(1, providers.length);
- assertTrue(providers[0] instanceof UstProviderComponent);
-
- // disconnect
- node.disconnect();
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
- assertNotNull(node.getImage());
- assertNotSame(connectedImage, node.getImage());
-
- node.getParent().removeChild(node);
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlTreeModelTest</code> contains tests for the tree
- * component classes.
- */
-public class TraceControlTreeModelTest {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "ListInfoTest.cfg";
- private static final String SCEN_LIST_INFO_TEST = "ListInfoTest";
- private static final String TARGET_NODE_NAME = "myNode";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- TraceControlTestFacility.getInstance().waitForJobs();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testTraceControlComponents() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(SCEN_LIST_INFO_TEST);
-
- ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent(TARGET_NODE_NAME, root, host, fProxy);
-
- root.addChild(node);
- node.connect();
-
- TraceControlTestFacility.getInstance().waitForJobs();
-
- // ------------------------------------------------------------------------
- // Verify Parameters of TargetNodeComponent
- // ------------------------------------------------------------------------
- assertEquals("LOCALHOST", node.getHostName()); // assigned in createLocalHost() above
- assertEquals("LOCALHOST", node.getToolTip()); // assigned in createLocalHost() above
- Image connectedImage = node.getImage();
- assertNotNull(connectedImage);
- assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
- assertNotNull(node.getControlService());
- ILttngControlService service = node.getControlService();
- assertTrue(service instanceof LTTngControlService);
- node.setControlService(service);
- assertTrue(node.getControlService() instanceof LTTngControlService);
-
- assertTrue(node.isPassiveCommunicationsListener());
-
- // ------------------------------------------------------------------------
- // Verify Children of TargetNodeComponent
- // ------------------------------------------------------------------------
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- assertTrue(groups[0] instanceof TraceProviderGroup);
- assertTrue(groups[1] instanceof TraceSessionGroup);
-
- assertEquals("Provider", groups[0].getName());
- assertEquals("Sessions", groups[1].getName());
-
- // ------------------------------------------------------------------------
- // Verify TraceProviderGroup
- // ------------------------------------------------------------------------
- ITraceControlComponent[] providers = groups[0].getChildren();
-
- assertNotNull(providers);
- assertEquals(3, providers.length);
-
- // ------------------------------------------------------------------------
- // Verify KernelProviderComponent
- // ------------------------------------------------------------------------
- KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
-
- // ------------------------------------------------------------------------
- // Verify event info (kernel provider)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] events = kernelProvider.getChildren();
- assertNotNull(events);
- assertEquals(3, events.length);
-
- BaseEventComponent baseEventInfo = (BaseEventComponent) events[0];
- assertNotNull(baseEventInfo);
- assertEquals("sched_kthread_stop", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = (BaseEventComponent) events[1];
- assertEquals("sched_kthread_stop_ret", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = (BaseEventComponent) events[2];
- assertEquals("sched_wakeup_new", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- // ------------------------------------------------------------------------
- // Verify UstProviderComponent
- // ------------------------------------------------------------------------
- UstProviderComponent ustProvider = (UstProviderComponent) providers[1];
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustProvider.getName());
- assertEquals(9379, ustProvider.getPid());
-
- // ------------------------------------------------------------------------
- // Verify event info (UST provider)
- // ------------------------------------------------------------------------
- events = ustProvider.getChildren();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- baseEventInfo = (BaseEventComponent) events[0];
- assertNotNull(baseEventInfo);
- assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = (BaseEventComponent) events[1];
- assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_INFO, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- // ------------------------------------------------------------------------
- // Verify UstProviderComponent
- // ------------------------------------------------------------------------
- ustProvider = (UstProviderComponent) providers[2];
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=4852]", ustProvider.getName());
- assertEquals(4852, ustProvider.getPid());
-
- // verify getters and setter
- verifyUstProviderGettersSetters(ustProvider);
-
- // ------------------------------------------------------------------------
- // Verify event info (UST provider)
- // ------------------------------------------------------------------------
- events = ustProvider.getChildren();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- baseEventInfo = (BaseEventComponent) events[0];
- assertNotNull(baseEventInfo);
- assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_WARNING, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = (BaseEventComponent) events[1];
- assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- // verify getters and setters
- verifyBaseEventGettersSetters(baseEventInfo);
-
- // ------------------------------------------------------------------------
- // Verify TraceSessionGroup
- // ------------------------------------------------------------------------
- ITraceControlComponent[] sessions = groups[1].getChildren();
- assertNotNull(sessions);
- assertEquals(2, sessions.length);
- for (int i = 0; i < sessions.length; i++) {
- assertTrue(sessions[i] instanceof TraceSessionComponent);
- }
- assertEquals("mysession1", sessions[0].getName());
- assertEquals("mysession", sessions[1].getName());
-
- // ------------------------------------------------------------------------
- // Verify TraceSessionComponent
- // ------------------------------------------------------------------------
- TraceSessionComponent session = (TraceSessionComponent)sessions[1];
- assertEquals("mysession", session.getName());
- assertEquals("/home/user/lttng-traces/mysession-20120129-084256", session.getSessionPath());
- assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
-
- // Verify setters and setters
- verifySessionGetterSetters(session);
-
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(2, domains.length);
-
- // ------------------------------------------------------------------------
- // Verify Kernel domain
- // ------------------------------------------------------------------------
- assertEquals("Kernel", domains[0].getName());
- ITraceControlComponent[] channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- // Verify setters and setters
- verifyDomainGettersSetters((TraceDomainComponent) domains[0]);
-
- // ------------------------------------------------------------------------
- // Verify Kernel's channel0
- // ------------------------------------------------------------------------
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
- assertEquals("channel0", channel.getName());
- assertEquals(4, channel.getNumberOfSubBuffers());
- assertEquals("splice()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
- assertEquals(false, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(262144, channel.getSubBufferSize());
- assertEquals(0, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Verify event info (kernel, channel0)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] channel0Events = channel.getChildren();
- assertNotNull(channel0Events);
- assertEquals(5, channel0Events.length);
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
- assertTrue(channel0Events[1] instanceof TraceEventComponent);
- assertTrue(channel0Events[2] instanceof TraceProbeEventComponent);
- assertTrue(channel0Events[3] instanceof TraceProbeEventComponent);
- assertTrue(channel0Events[4] instanceof TraceEventComponent);
-
- TraceEventComponent event = (TraceEventComponent) channel0Events[0];
- assertEquals("block_rq_remap", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- event = (TraceEventComponent) channel0Events[1];
- assertEquals("block_bio_remap", event.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.DISABLED, event.getState());
-
- TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[2];
- assertEquals("myevent2", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertEquals("0xc0101340", probeEvent.getAddress());
- assertNull(probeEvent.getOffset());
- assertNull(probeEvent.getSymbol());
-
- // verify getters and setter
- verifyProbeEventGettersSetters(probeEvent);
-
- probeEvent = (TraceProbeEventComponent) channel0Events[3];
- assertEquals("myevent0", probeEvent.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
- assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
- assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
- assertNull(probeEvent.getAddress());
- assertEquals("0x0", probeEvent.getOffset());
- assertEquals("init_post", probeEvent.getSymbol());
-
- event = (TraceEventComponent) channel0Events[4];
- assertEquals("syscalls", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.SYSCALL, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Verify Kernel's channel1
- // ------------------------------------------------------------------------
- assertEquals("channel1", channels[1].getName());
- channel = (TraceChannelComponent) channels[1];
- assertEquals(4, channel.getNumberOfSubBuffers());
- assertEquals("splice()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
- assertEquals(true, channel.isOverwriteMode());
- assertEquals(400, channel.getReadTimer());
- assertEquals(TraceEnablement.DISABLED, channel.getState());
- assertEquals(524288, channel.getSubBufferSize());
- assertEquals(100, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Verify event info (kernel, channel1)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] channel1Events = channels[1].getChildren();
- assertEquals(0, channel1Events.length);
-
- // ------------------------------------------------------------------------
- // Verify domain UST global
- // ------------------------------------------------------------------------
- assertEquals("UST global", domains[1].getName());
-
- ITraceControlComponent[] ustChannels = domains[1].getChildren();
-
- for (int i = 0; i < ustChannels.length; i++) {
- assertTrue(ustChannels[i] instanceof TraceChannelComponent);
- }
-
- // ------------------------------------------------------------------------
- // Verify UST global's mychannel1
- // ------------------------------------------------------------------------
- channel = (TraceChannelComponent) ustChannels[0];
- assertEquals("mychannel1", channel.getName());
- assertEquals(8, channel.getNumberOfSubBuffers());
- assertEquals("mmap()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
- assertEquals(true, channel.isOverwriteMode());
- assertEquals(100, channel.getReadTimer());
- assertEquals(TraceEnablement.DISABLED, channel.getState());
- assertEquals(8192, channel.getSubBufferSize());
- assertEquals(200, channel.getSwitchTimer());
-
- // verify getters and setters
- verifyChannelGettersSetters(channel);
-
- // ------------------------------------------------------------------------
- // Verify event info (UST global, mychannel1)
- // ------------------------------------------------------------------------
- ITraceControlComponent[] ustEvents = channel.getChildren();
- assertEquals(0, ustEvents.length);
-
- // ------------------------------------------------------------------------
- // Verify UST global's channel0
- // ------------------------------------------------------------------------
- channel = (TraceChannelComponent) ustChannels[1];
- assertEquals("channel0", channel.getName());
- assertEquals(4, channel.getNumberOfSubBuffers());
- assertEquals("mmap()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
- assertEquals(false, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(4096, channel.getSubBufferSize());
- assertEquals(0, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Verify event info (UST global, channel0)
- // ------------------------------------------------------------------------
- ustEvents = channel.getChildren();
- assertEquals(4, ustEvents.length);
-
- event = (TraceEventComponent) ustEvents[0];
- assertEquals("ust_tests_hello:tptest_sighandler", event.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_LINE, event.getLogLevel());
- assertEquals(LogLevelType.LOGLEVEL_ONLY, event.getLogLevelType());
- assertEquals(LogLevelType.LOGLEVEL_ONLY.getShortName(), event.getLogLevelType().getShortName());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.DISABLED, event.getState());
-
- event = (TraceEventComponent) ustEvents[1];
- assertEquals("ust_tests_hello:tptest_sighandler1", event.getName());
- assertEquals(TraceLogLevel.TRACE_INFO, event.getLogLevel());
- assertEquals(LogLevelType.LOGLEVEL, event.getLogLevelType());
- assertEquals(LogLevelType.LOGLEVEL.getShortName(), event.getLogLevelType().getShortName());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.DISABLED, event.getState());
-
- event = (TraceEventComponent) ustEvents[2];
- assertEquals("ust_tests_hello:tptest_sighandler2", event.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_SYSTEM, event.getLogLevel());
- assertEquals(LogLevelType.LOGLEVEL_NONE, event.getLogLevelType());
- assertEquals(LogLevelType.LOGLEVEL_NONE.getShortName(), event.getLogLevelType().getShortName());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.DISABLED, event.getState());
-
- event = (TraceEventComponent) ustEvents[3];
- assertEquals("*", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // verify getters and setters
- verifyEventGettersSetters(event);
-
- // disconnect
- node.disconnect();
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
- assertNotNull(node.getImage());
- assertNotSame(connectedImage, node.getImage());
-
- node.getParent().removeChild(node);
- }
-
- private static void verifySessionGetterSetters(TraceSessionComponent session) {
- // save original values
- String name = session.getName();
- String origPath = session.getSessionPath();
- TraceSessionState origState = session.getSessionState();
-
- // test cases
- session.setName("newName");
- assertEquals("newName", session.getName());
-
- session.setSessionPath("/home/user/tmp");
- assertEquals("/home/user/tmp", session.getSessionPath());
-
- session.setSessionState(TraceSessionState.INACTIVE);
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
- Image inactiveImage = session.getImage();
- assertNotNull(inactiveImage);
-
- session.setSessionState("active");
- assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
-
- Image activeImage = session.getImage();
- assertNotNull(activeImage);
- assertNotSame(activeImage, inactiveImage);
-
- ITraceControlComponent[] children = session.getChildren();
- TraceDomainComponent[] domains = session.getDomains();
-
- assertEquals(children.length, domains.length);
-
- for (int i = 0; i < domains.length; i++) {
- assertEquals(domains[i].getName(), children[i].getName());
- }
-
- // restore original values
- session.setName(name);
- session.setSessionPath(origPath);
- session.setSessionState(origState);
- }
-
- private static void verifyDomainGettersSetters(TraceDomainComponent domain) {
- // save original values
- boolean isKernel = domain.isKernel();
-
- domain.setIsKernel(false);
- assertFalse(domain.isKernel());
- domain.setIsKernel(true);
- assertTrue(domain.isKernel());
-
- ITraceControlComponent[] children = domain.getChildren();
- TraceChannelComponent[] channels = domain.getChannels();
-
- assertEquals(children.length, channels.length);
-
- for (int i = 0; i < channels.length; i++) {
- assertEquals(channels[i].getName(), children[i].getName());
- }
-
- String nodeName = domain.getTargetNode().getName();
- assertEquals(TARGET_NODE_NAME, nodeName);
-
- // restore original values
- domain.setIsKernel(isKernel);
- }
-
- private static void verifyBaseEventGettersSetters(BaseEventComponent event) {
- // save original values
- String name = event.getName();
- TraceLogLevel level = event.getLogLevel();
- TraceEventType type = event.getEventType();
-
- // test cases
- event.setName("newName");
- assertEquals("newName", event.getName());
-
- event.setLogLevel(TraceLogLevel.TRACE_INFO);
- assertEquals(TraceLogLevel.TRACE_INFO, event.getLogLevel());
- event.setLogLevel("TRACE_ALERT");
- assertEquals(TraceLogLevel.TRACE_ALERT, event.getLogLevel());
-
- event.setEventType(TraceEventType.UNKNOWN);
- assertEquals(TraceEventType.UNKNOWN, event.getEventType());
- event.setEventType("tracepoint");
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
-
- // restore original values
- event.setName(name);
- event.setLogLevel(level);
- event.setEventType(type);
- }
-
- private static void verifyEventGettersSetters(TraceEventComponent event) {
- // save original values
- String name = event.getName();
- TraceLogLevel level = event.getLogLevel();
- TraceEventType type = event.getEventType();
- TraceEnablement state = event.getState();
-
- // test cases
- event.setName("newName");
- assertEquals("newName", event.getName());
-
- event.setLogLevel(TraceLogLevel.TRACE_INFO);
- assertEquals(TraceLogLevel.TRACE_INFO, event.getLogLevel());
- event.setLogLevel("TRACE_ALERT");
- assertEquals(TraceLogLevel.TRACE_ALERT, event.getLogLevel());
-
- event.setEventType(TraceEventType.UNKNOWN);
- assertEquals(TraceEventType.UNKNOWN, event.getEventType());
- event.setEventType("tracepoint");
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
-
- event.setState("disabled");
- assertEquals(TraceEnablement.DISABLED, event.getState());
-
- Image disabledImage = event.getImage();
- assertNotNull(disabledImage);
-
- event.setState(TraceEnablement.ENABLED);
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- Image enabledImage = event.getImage();
- assertNotNull(enabledImage);
- assertNotSame(enabledImage, disabledImage);
-
- // restore original values
- event.setName(name);
- event.setLogLevel(level);
- event.setEventType(type);
- event.setState(state);
- }
-
- private static void verifyProbeEventGettersSetters(TraceProbeEventComponent event) {
- // save original values
- String address = event.getAddress();
- String offset = event.getOffset();
- String symbol = event.getSymbol();
-
- // test cases
- event.setAddress("0xffff1234");
- assertEquals("0xffff1234", event.getAddress());
-
- event.setOffset("0x1234");
- assertEquals("0x1234", event.getOffset());
-
- event.setSymbol("init");
- assertEquals("init", event.getSymbol());
-
- // restore original values
- event.setAddress(address);
- event.setOffset(offset);
- event.setSymbol(symbol);
- }
-
- private static void verifyChannelGettersSetters(TraceChannelComponent channel) {
- // save original values
- String name = channel.getName();
- int nbSubBuffers = channel.getNumberOfSubBuffers();
- TraceChannelOutputType type = channel.getOutputType();
- boolean mode = channel.isOverwriteMode();
- long readTimer = channel.getReadTimer();
- TraceEnablement state = channel.getState();
- long subBufferSize = channel.getSubBufferSize();
- long switchTimer = channel.getSwitchTimer();
-
- // test cases
- channel.setName("newName");
- assertEquals("newName", channel.getName());
-
- channel.setNumberOfSubBuffers(2);
- assertEquals(2, channel.getNumberOfSubBuffers());
-
- channel.setOutputType("splice()");
- assertEquals("splice()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
-
- channel.setOverwriteMode(false);
- assertEquals(false, channel.isOverwriteMode());
-
- channel.setReadTimer(250);
- assertEquals(250, channel.getReadTimer());
-
- channel.setState("enabled");
- assertEquals(TraceEnablement.ENABLED, channel.getState());
-
- Image enabledImage = channel.getImage();
- assertNotNull(enabledImage);
- channel.setState(TraceEnablement.DISABLED);
- assertEquals(TraceEnablement.DISABLED, channel.getState());
-
- Image disabledImage = channel.getImage();
- assertNotNull(disabledImage);
- assertNotSame(enabledImage, disabledImage);
-
- channel.setSubBufferSize(1024);
- assertEquals(1024, channel.getSubBufferSize());
-
- channel.setSwitchTimer(1000);
- assertEquals(1000, channel.getSwitchTimer());
-
- // restore original values
- channel.setName(name);
- channel.setNumberOfSubBuffers(nbSubBuffers);
- channel.setOutputType(type);
- channel.setOverwriteMode(mode);
- channel.setReadTimer(readTimer);
- channel.setState(state);
- channel.setSubBufferSize(subBufferSize);
- channel.setSwitchTimer(switchTimer);
- }
-
- private static void verifyUstProviderGettersSetters(UstProviderComponent ustProvider) {
- // save original values
- String name = ustProvider.getName();
- int pid = ustProvider.getPid();
-
- // test cases
- ustProvider.setName("newName");
- assertEquals("newName", ustProvider.getName());
-
- ustProvider.setPid(9876);
- assertEquals(9876, ustProvider.getPid());
-
- // restore original values
- ustProvider.setName(name);
- ustProvider.setPid(pid);
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlUstProviderTests</code> contains UST provider
- * handling test cases.
- */
-public class TraceControlUstProviderTests {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "CreateTreeTest.cfg";
- private static final String SCEN_SCENARIO2_TEST = "Scenario2";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- fFacility.dispose();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testUstProviderTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
- root.addChild(node);
-
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
-
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Verify that node is connected
- assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
-
- // Get provider groups
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Get kernel provider
- ITraceControlComponent[] providers = groups[0].getChildren();
- KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
-
- // Get kernel provider events and select 2 events
- ITraceControlComponent[] events = kernelProvider.getChildren();
- assertNotNull(events);
- assertEquals(3, events.length);
-
- BaseEventComponent baseEventInfo0 = (BaseEventComponent) events[0];
- BaseEventComponent baseEventInfo1 = (BaseEventComponent) events[1];
-
- // Initialize dialog implementations for command execution
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
- TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // ------------------------------------------------------------------------
- // Create session
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING_WITH_PATH);
-
- CreateSessionDialogStub sessionDialogStub = new CreateSessionDialogStub();
- sessionDialogStub.setSessionPath("/home/user/temp");
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialogStub);
-
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertEquals("/home/user/temp", session.getSessionPath());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- // ------------------------------------------------------------------------
- // Enable Channel on UST global domain
- // ------------------------------------------------------------------------
- fProxy.setScenario(SCEN_SCENARIO2_TEST);
- EnableChannelDialogStub channelDialogStub = new EnableChannelDialogStub();
- channelDialogStub.setIsKernel(false);
- channelDialogStub.getChannelInfo().setOverwriteMode(false);
- channelDialogStub.getChannelInfo().setSwitchTimer(200);
- channelDialogStub.getChannelInfo().setReadTimer(100);
- channelDialogStub.getChannelInfo().setNumberOfSubBuffers(2);
- TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelDialogStub);
-
- fFacility.executeCommand(session, "enableChannelOnSession");
-
- // Verify that UST domain was created
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("UST global", domains[0].getName());
-
- // Verify that channel was created with correct data
- ITraceControlComponent[]channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
- assertEquals("mychannel", channel.getName());
- assertEquals(2, channel.getNumberOfSubBuffers());
- assertEquals("mmap()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
- assertEquals(false, channel.isOverwriteMode());
- assertEquals(100, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(16384, channel.getSubBufferSize());
- assertEquals(200, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Enable event on default channel on created session above
- // ------------------------------------------------------------------------
- // Get first UST provider
- UstProviderComponent ustProvider = (UstProviderComponent) providers[1];
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustProvider.getName());
- assertEquals(9379, ustProvider.getPid());
-
- // Get events
- events = ustProvider.getChildren();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- baseEventInfo0 = (BaseEventComponent) events[0];
- baseEventInfo1 = (BaseEventComponent) events[1];
-
- ITraceControlComponent[] ustSelection = { baseEventInfo0, baseEventInfo1 };
-
- fFacility.executeCommand(ustSelection, "assign.event");
-
- // verify that events were created under the channel
- // Note that domain and channel has to be re-read because the tree is re-created
-
- domains = session.getChildren();
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
-
- ITraceControlComponent[] ustEvents = channels[0].getChildren();
- assertEquals(2, ustEvents.length);
-
- TraceEventComponent event = (TraceEventComponent) ustEvents[0];
- assertEquals("ust_tests_hello:tptest_sighandler", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- event = (TraceEventComponent) ustEvents[1];
- assertEquals("ust_tests_hello:tptest", ustEvents[1].getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Disable event components
- // ------------------------------------------------------------------------
- fFacility.executeCommand(event, "disableEvent");
-
- assertEquals(TraceEnablement.DISABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event component
- // ------------------------------------------------------------------------
- fFacility.executeCommand(event, "enableEvent");
-
- // Verify event state
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
-
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- //-------------------------------------------------------------------------
- // Disconnect node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "delete");
- assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableEventsDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlUstSessionTests</code> contains UST
- * session/channel/event handling test cases.
- */
-public class TraceControlUstSessionTests {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "CreateTreeTest.cfg";
- private static final String SCEN_SCENARIO4_TEST = "Scenario4";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- fFacility.dispose();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testTraceSessionTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
-
- root.addChild(node);
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Get provider groups
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Initialize dialog implementations for command execution
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
- TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- // ------------------------------------------------------------------------
- // Create session
- // ------------------------------------------------------------------------
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertEquals("/home/user/lttng-traces/mysession-20120314-132824", session.getSessionPath());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- // Initialize scenario
- fProxy.setScenario(SCEN_SCENARIO4_TEST);
-
- // ------------------------------------------------------------------------
- // Enable default channel on created session above
- // ------------------------------------------------------------------------
- EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
- channelStub.setIsKernel(false);
- TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelStub);
-
- fFacility.executeCommand(session, "enableChannelOnSession");
-
- // Verify that Kernel domain was created
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("UST global", domains[0].getName());
- assertEquals("Domain buffer Type", BufferType.BUFFER_TYPE_UNKNOWN, ((TraceDomainComponent)domains[0]).getBufferType());
-
- // Verify that channel was created with correct data
- ITraceControlComponent[] channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
- assertEquals("mychannel", channel.getName());
- assertEquals(4, channel.getNumberOfSubBuffers());
- assertEquals("mmap()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
- assertEquals(true, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(16384, channel.getSubBufferSize());
- assertEquals(100, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Enable channel on domain
- // ------------------------------------------------------------------------
- ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
- info.setName("mychannel2");
- info.setOverwriteMode(false);
- info.setSubBufferSize(32768);
- info.setNumberOfSubBuffers(2);
- info.setSwitchTimer(100);
- info.setReadTimer(200);
- channelStub.setChannelInfo(info);
-
- fFacility.executeCommand(domains[0], "enableChannelOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- assertTrue(channels[1] instanceof TraceChannelComponent);
- channel = (TraceChannelComponent) channels[1];
- assertEquals("mychannel2", channel.getName());
- assertEquals(2, channel.getNumberOfSubBuffers());
- assertEquals("mmap()", channel.getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
- assertEquals(false, channel.isOverwriteMode());
- assertEquals(200, channel.getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channel.getState());
- assertEquals(32768, channel.getSubBufferSize());
- assertEquals(100, channel.getSwitchTimer());
-
- // ------------------------------------------------------------------------
- // Enable event (tracepoint) on session and default channel
- // ------------------------------------------------------------------------
- EnableEventsDialogStub eventsDialogStub = new EnableEventsDialogStub();
- eventsDialogStub.setIsTracePoints(true);
- List<String> events = new ArrayList<>();
- events.add("ust_tests_hello:tptest_sighandler");
- eventsDialogStub.setNames(events);
- eventsDialogStub.setIsKernel(false);
- TraceControlDialogFactory.getInstance().setEnableEventsDialog(eventsDialogStub);
-
- fFacility.executeCommand(session, "enableEventOnSession");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(3, channels.length);
-
- assertTrue(channels[2] instanceof TraceChannelComponent);
- channel = (TraceChannelComponent) channels[2];
- assertEquals("channel0", channel.getName());
- // No need to check parameters of default channel because that has been done in other tests
-
- ITraceControlComponent[] channel0Events = channel.getChildren();
- assertEquals(1, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- TraceEventComponent event = (TraceEventComponent) channel0Events[0];
- assertEquals("ust_tests_hello:tptest_sighandler", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel()); // TODO
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (tracepoint) on domain and default channel
- // ------------------------------------------------------------------------
- events.clear();
- events.add("ust_tests_hello:tptest");
- eventsDialogStub.setNames(events);
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(2, channel0Events.length);
-
- assertTrue(channel0Events[1] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[1];
- assertEquals("ust_tests_hello:tptest", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel()); // TODO
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (all tracepoints) on specific channel
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setNames(events);
- eventsDialogStub.setIsAllTracePoints(true);
-
- fFacility.executeCommand(channels[1], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[1];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel = (TraceChannelComponent) channels[1];
-
- channel0Events = channel.getChildren();
- assertEquals(1, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("*", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (wildcard) on specific channel
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setIsTracePoints(false);
- eventsDialogStub.setIsAllTracePoints(false);
- eventsDialogStub.setIsWildcard(true);
- eventsDialogStub.setWildcard("ust*");
-
- fFacility.executeCommand(channels[0], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(1, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("ust*", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (wildcard) on domain
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setIsTracePoints(false);
- eventsDialogStub.setIsAllTracePoints(false);
- eventsDialogStub.setIsWildcard(true);
- eventsDialogStub.setWildcard("ust*");
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(1, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("ust*", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (wildcard) on session
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setIsTracePoints(false);
- eventsDialogStub.setIsAllTracePoints(false);
- eventsDialogStub.setIsWildcard(true);
- eventsDialogStub.setWildcard("ust*");
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(4, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("u*", event.getName());
- assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (loglevel) on domain
- // ------------------------------------------------------------------------
- events.clear();
- eventsDialogStub.setIsWildcard(false);
- eventsDialogStub.setIsLogLevel(true);
- eventsDialogStub.setLogLevelEventName("myevent1");
- eventsDialogStub.setLogLevelType(LogLevelType.LOGLEVEL);
- eventsDialogStub.setLogLevel(TraceLogLevel.TRACE_WARNING);
-
- fFacility.executeCommand(domains[0], "enableEventOnDomain");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(5, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("myevent1", event.getName());
- assertEquals(TraceLogLevel.TRACE_WARNING, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (loglevel) on session
- // ------------------------------------------------------------------------
- eventsDialogStub.setLogLevelEventName("myevent2");
- eventsDialogStub.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
- eventsDialogStub.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
-
- fFacility.executeCommand(session, "enableEventOnSession");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[2];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(6, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("myevent2", event.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Enable event (loglevel) on channel
- // ------------------------------------------------------------------------
- eventsDialogStub.setLogLevelEventName("myevent0");
- eventsDialogStub.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
- eventsDialogStub.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
-
- fFacility.executeCommand(channels[0], "enableEventOnChannel");
-
- // Get Kernel domain component instance
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- channel = (TraceChannelComponent) channels[0];
- // No need to check parameters of default channel because that has been done in other tests
-
- channel0Events = channel.getChildren();
- assertEquals(2, channel0Events.length);
-
- assertTrue(channel0Events[0] instanceof TraceEventComponent);
-
- event = (TraceEventComponent) channel0Events[0];
- assertEquals("myevent0", event.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, event.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
- assertEquals(TraceEnablement.ENABLED, event.getState());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
- // Initialize session handling scenario
- fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
-
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals("Session components still exist.", 0, groups[1].getChildren().length);
-
- //-------------------------------------------------------------------------
- // Disconnect node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
-
- fFacility.executeCommand(node, "delete");
-
- assertEquals("Node not deleted.", 0, fFacility.getControlView().getTraceControlRoot().getChildren().length);
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemProfile;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>TraceControlUstSessionTests</code> contains UST
- * session/channel/event handling test cases for LTTng 2.2.
- */
-public class TraceControlUstSessionTests2 {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private static final String TEST_STREAM = "CreateTreeTest2.cfg";
- private static final String SCEN_SCEN_PER_UID_TEST = "ScenPerUidTest";
- private static final String SCEN_SCEN_PER_PID_TEST = "ScenPerPidTest";
- private static final String SCEN_SCEN_BUF_SIZE_TEST = "ScenBufSizeTest";
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private TraceControlTestFacility fFacility;
- private TestRemoteSystemProxy fProxy;
- private String fTestFile;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fFacility = TraceControlTestFacility.getInstance();
- fFacility.init();
- fProxy = new TestRemoteSystemProxy();
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestFile = testfile.getAbsolutePath();
- }
-
- /**
- * Perform post-test clean-up.
- */
- @After
- public void tearDown() {
- fFacility.waitForJobs();
- fFacility.dispose();
- }
-
- /**
- * Run the TraceControlComponent.
- *
- * @throws Exception
- * This will fail the test
- */
- @Test
- public void testTraceSessionTree() throws Exception {
-
- fProxy.setTestFile(fTestFile);
- fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
-
- ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- ISystemProfile profile = registry.createSystemProfile("myProfile", true);
- IHost host = registry.createLocalHost(profile, "myProfile", "user");
-
- TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
-
- root.addChild(node);
- fFacility.waitForJobs();
-
- fFacility.executeCommand(node, "connect");
- int i = 0;
- while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
- i++;
- fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
- }
-
- // Get provider groups
- ITraceControlComponent[] groups = node.getChildren();
- assertNotNull(groups);
- assertEquals(2, groups.length);
-
- // Initialize dialog implementations for command execution
- TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
- TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
- TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
-
- // Initialize scenario
- fProxy.setScenario(SCEN_SCEN_PER_UID_TEST);
-
- // ------------------------------------------------------------------------
- // Create session
- // ------------------------------------------------------------------------
- TraceSessionComponent session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
-
- // ------------------------------------------------------------------------
- // Enable default channel on created session above
- // ------------------------------------------------------------------------
- EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
- channelStub.setIsKernel(false);
- ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
- info.setName("mychannel");
- info.setOverwriteMode(false);
- info.setSubBufferSize(-1);
- info.setNumberOfSubBuffers(-1);
- info.setSwitchTimer(-1);
- info.setReadTimer(-1);
- info.setMaxNumberTraceFiles(-1);
- info.setMaxSizeTraceFiles(-1);
- info.setBufferType(BufferType.BUFFER_PER_UID);
- channelStub.setChannelInfo(info);
-
- TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelStub);
-
- fFacility.executeCommand(session, "enableChannelOnSession");
-
- // Verify that UST domain was created
- ITraceControlComponent[] domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("UST global", domains[0].getName());
- assertEquals("Domain buffer Type", BufferType.BUFFER_PER_UID, ((TraceDomainComponent)domains[0]).getBufferType());
-
- // Verify that channel was created with correct data
- ITraceControlComponent[] channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- TraceChannelComponent channel = (TraceChannelComponent) channels[0];
- assertEquals("mychannel", channel.getName());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- // ------------------------------------------------------------------------
- // Create session (per-pid buffers)
- // ------------------------------------------------------------------------
-
- // Initialize scenario
- fProxy.setScenario(SCEN_SCEN_PER_PID_TEST);
-
- session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
-
- // ------------------------------------------------------------------------
- // Enable default channel on created session above
- // ------------------------------------------------------------------------
- info = (ChannelInfo)channelStub.getChannelInfo();
- info.setName("mychannel");
- info.setBufferType(BufferType.BUFFER_PER_PID);
- channelStub.setChannelInfo(info);
-
- fFacility.executeCommand(session, "enableChannelOnSession");
-
- // Verify that UST domain was created
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("UST global", domains[0].getName());
- assertEquals("Domain buffer Type", BufferType.BUFFER_PER_PID, ((TraceDomainComponent)domains[0]).getBufferType());
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- channel = (TraceChannelComponent) channels[0];
- assertEquals("mychannel", channel.getName());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- // ------------------------------------------------------------------------
- // Create session (configured file size and number of files)
- // ------------------------------------------------------------------------
-
- // Initialize scenario
- fProxy.setScenario(SCEN_SCEN_BUF_SIZE_TEST);
-
- session = fFacility.createSession(groups[1]);
-
- // Verify that session was created
- assertNotNull(session);
- assertEquals("mysession", session.getName());
-
- // ------------------------------------------------------------------------
- // Enable default channel on created session above
- // ------------------------------------------------------------------------
- info = (ChannelInfo)channelStub.getChannelInfo();
- info.setName("mychannel");
- info.setMaxNumberTraceFiles(10);
- info.setMaxSizeTraceFiles(1024);
- info.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
- channelStub.setChannelInfo(info);
-
- fFacility.executeCommand(session, "enableChannelOnSession");
-
- // Verify that UST domain was created
- domains = session.getChildren();
- assertNotNull(domains);
- assertEquals(1, domains.length);
-
- assertEquals("UST global", domains[0].getName());
- assertEquals("Domain buffer Type", BufferType.BUFFER_PER_PID, ((TraceDomainComponent)domains[0]).getBufferType());
-
- // Verify that channel was created with correct data
- channels = domains[0].getChildren();
- assertNotNull(channels);
- assertEquals(1, channels.length);
-
- assertTrue(channels[0] instanceof TraceChannelComponent);
- channel = (TraceChannelComponent) channels[0];
- assertEquals("mychannel", channel.getName());
-
- // ------------------------------------------------------------------------
- // Destroy session
- // ------------------------------------------------------------------------
- fFacility.destroySession(session);
-
- // Verify that no more session components exist
- assertEquals(0, groups[1].getChildren().length);
-
- //-------------------------------------------------------------------------
- // Disconnect node
- //-------------------------------------------------------------------------
- fFacility.executeCommand(node, "disconnect");
- assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
-
- //-------------------------------------------------------------------------
- // Delete node
- //-------------------------------------------------------------------------
-
- fFacility.executeCommand(node, "delete");
-
- assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
- }
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2011, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.service;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the service unit tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- LTTngControlServiceTest.class,
- LTTngControlServiceMiTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte - Support of machine interface
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.service;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.net.URL;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceMI;
-
-/**
- * @author ejorajo
- *
- */
-public class LTTngControlServiceMiTest extends LTTngControlServiceTest {
-
- private static final String MI_TEST_STREAM = "LTTngServiceMiTest.cfg";
-
- @Override
- protected ILttngControlService getControlService() {
- try {
- URL resource = LTTngControlServiceMI.class.getResource(LTTngControlServiceConstants.MI_XSD_FILENAME);
- return new LTTngControlServiceMI(getfShell(), resource);
- } catch (ExecutionException e) {
- return null;
- }
- }
-
- @Override
- public void testGetSessionNameGarbage() {
- try {
- fShell.setScenario(SCEN_GET_SESSION_GARBAGE_OUT);
- fService.getSessionNames(new NullProgressMonitor());
- } catch (ExecutionException e) {
- // Success. Parsing of garbage result in an ExecutionException
- // generated by the XML document parser: Unable to parse the xml
- // document.
- }
- }
-
- @Override
- public void testCreateLiveSession() throws ExecutionException {
- fShell.setScenario(SCEN_CREATE_LIVE_SESSION);
-
- ISessionInfo params = new SessionInfo("mysession");
- params.setLive(true);
- params.setStreamedTrace(true);
- params.setNetworkUrl("net://127.0.0.1");
- ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
- assertNotNull(sessionInfo);
- assertEquals("mysession", sessionInfo.getName());
- assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
- assertTrue(sessionInfo.isStreamedTrace());
- assertTrue(sessionInfo.isLive());
- assertEquals("tcp4://127.0.0.1:5342/ [data: 5343]", sessionInfo.getSessionPath());
- String[] names = fService.getSessionNames(new NullProgressMonitor());
- assertEquals(names[0], "mysession");
- fService.destroySession("mysession", new NullProgressMonitor());
- }
-
- @Override
- protected String getTestStream() {
- return MI_TEST_STREAM;
- }
-
- @Override
- protected TraceLogLevel getAllEventTraceLogLevel() {
- return TraceLogLevel.TRACE_DEBUG;
- }
-
- @Override
- public void testGetKernelProviderNoUstVerbose() {
- // Verbose mode in machine interface is deactivated. This test is
- // ignored.
- }
-
- @Override
- public void testCreateSession2_1() {
- // 2.1 is not supported by mi. This test is ignored.
- }
-
- @Override
- public void testGetKernelProviderNoUst3() {
- // Verbose mode in machine interface is deactivated. This test is
- // ignored.
- }
-
- @Override
- public void testGetKernelProviderNoKernelVerbose() {
- // Verbose mode in machine interface is deactivated. This test is
- // ignored.
- }
-
- @Override
- public void testCreateSessionVerbose2_1() {
- // Verbose mode in machine interface is deactivated. This test is
- // ignored.
- }
-
- @Override
- public void testDestroySessionVerbose() {
- // Verbose mode in machine interface is deactivated. This test is
- // ignored.
- }
-
- @Override
- public void testCreateSessionWithPrompt() {
- // TODO Investigate if this case can happen in production. If yes than
- // we need to rethinks the MI fetching and parsing.
- }
-
- @Override
- public void testAddContext() {
- // TODO This does not use mi feature.And currently the context enabling
- // is wrong for 2.6.
- }
-
- @Override
- public void testAddContextFailure() {
- // TODO This does not use mi feature.And currently the context enabling
- // is wrong for 2.6.
- }
-
- @Override
- public void testCreateSnapshotSession2_5() {
- // not applicable for MI
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.control.ui.tests.service;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.CommandShellFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.shells.LTTngToolsFileShell;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.FrameworkUtil;
-
-/**
- * The class <code>LTTngControlServiceTest</code> contains test for the class
- * <code>{@link LTTngControlService}</code>.
- */
-@SuppressWarnings("javadoc")
-public class LTTngControlServiceTest {
-
- private static final String DIRECTORY = "testfiles";
- private static final String TEST_STREAM = "LTTngServiceTest.cfg";
-
- private static final String SCEN_LTTNG_NOT_INSTALLED = "LttngNotInstalled";
- private static final String SCEN_LTTNG_VERSION = "LttngVersion";
- private static final String SCEN_LTTNG_VERSION_WITH_PROMPT = "LttngVersionWithPrompt";
- private static final String SCEN_LTTNG_UNSUPPORTED_VERSION = "LttngUnsupportedVersion";
- private static final String SCEN_LTTNG_NO_VERSION = "LttngNoVersion";
- private static final String SCEN_NO_SESSION_AVAILABLE = "NoSessionAvailable";
- private static final String SCEN_GET_SESSION_NAMES1 = "GetSessionNames1";
- private static final String SCEN_GET_SESSION_NAME_NOT_EXIST = "GetSessionNameNotExist";
- private static final String SCEN_GET_SESSION_NAME_NOT_EXIST_VERBOSE = "GetSessionNameNotExistVerbose";
- protected static final String SCEN_GET_SESSION_GARBAGE_OUT = "GetSessionGarbageOut";
- private static final String SCEN_GET_SESSION1 = "GetSession1";
- private static final String SCEN_GET_KERNEL_PROVIDER1 = "GetKernelProvider1";
- private static final String SCEN_LIST_WITH_NO_KERNEL1 = "ListWithNoKernel1";
- private static final String SCEN_LIST_WITH_NO_KERNEL2 = "ListWithNoKernel2";
- private static final String SCEN_LIST_WITH_NO_KERNEL_VERBOSE = "ListWithNoKernelVerbose";
- private static final String SCEN_GET_UST_PROVIDER1 = "GetUstProvider1";
- private static final String SCEN_GET_UST_PROVIDER2 = "GetUstProvider2";
- private static final String SCEN_GET_UST_PROVIDER3 = "GetUstProvider3";
- private static final String SCEN_LIST_WITH_NO_UST1 = "ListWithNoUst1";
- private static final String SCEN_LIST_WITH_NO_UST2 = "ListWithNoUst2";
- private static final String SCEN_LIST_WITH_NO_UST3 = "ListWithNoUst3";
- private static final String SCEN_LIST_WITH_NO_UST_VERBOSE = "ListWithNoUstVerbose";
- private static final String SCEN_CREATE_SESSION1 = "CreateSession1";
- private static final String SCEN_CREATE_SESSION_WITH_PROMPT = "CreateSessionWithPrompt";
- private static final String SCEN_CREATE_SESSION_VARIANTS = "CreateSessionVariants";
- private static final String SCEN_DESTROY_SESSION1 = "DestroySession1";
- private static final String SCEN_DESTROY_SESSION_VERBOSE = "DestroySessionVerbose";
- private static final String SCEN_CHANNEL_HANDLING = "ChannelHandling";
- private static final String SCEN_EVENT_HANDLING = "EventHandling";
- private static final String SCEN_CONTEXT_HANDLING = "ContextHandling";
- private static final String SCEN_CONTEXT_ERROR_HANDLING = "ContextErrorHandling";
- private static final String SCEN_CALIBRATE_HANDLING = "CalibrateHandling";
- private static final String SCEN_CREATE_SESSION_2_1 = "CreateSessionLttng2.1";
- private static final String SCEN_CREATE_SESSION_VERBOSE_2_1 = "CreateSessionLttngVerbose2.1";
- private static final String SCEN_CREATE_SNAPSHOT_SESSION = "CreateSessionSnapshot";
- private static final String SCEN_CREATE_SNAPSHOT_SESSION_2_5 = "CreateSessionSnapshot2.5";
- private static final String SCEN_CREATE_STREAMED_SNAPSHOT_SESSION = "CreateSessionStreamedSnapshot";
- private static final String SCEN_CREATE_SNAPSHOT_SESSION_ERRORS = "CreateSessionSnapshotErrors";
- protected static final String SCEN_CREATE_LIVE_SESSION = "CreateSessionLive";
- private static final String SCEN_CREATE_LIVE_SESSION_ERRORS = "CreateSessionLiveErrors";
-
-
- // ------------------------------------------------------------------------
- // Test data
- // ------------------------------------------------------------------------
-
- private CommandShellFactory fShellFactory;
- private String fTestfile;
- protected LTTngToolsFileShell fShell;
- protected ILttngControlService fService;
-
- // ------------------------------------------------------------------------
- // Housekeeping
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-test initialization.
- *
- * @throws Exception
- * if the initialization fails for some reason
- */
- @Before
- public void setUp() throws Exception {
- fShellFactory = CommandShellFactory.getInstance();
-
- URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(getTestDirectory() + File.separator + getTestStream()), null);
- File testfile = new File(FileLocator.toFileURL(location).toURI());
- fTestfile = testfile.getAbsolutePath();
-
- fShell = fShellFactory.getFileShell();
- fShell.loadScenarioFile(fTestfile);
- fService = getControlService();
- if (fService == null) {
- throw new Exception("Unable to obtain a valid ControlService");
- }
-
- ControlPreferences.getInstance().init(Activator.getDefault().getPreferenceStore());
- }
-
- /**
- * @return the string of the test directory to use
- */
- protected String getTestDirectory() {
- return DIRECTORY;
- }
-
- /**
- * @return the LttngCon
- */
- protected ILttngControlService getControlService() {
- return new LTTngControlService(fShell);
- }
-
- public LTTngToolsFileShell getfShell() {
- return fShell;
- }
-
- /**
- * @return
- */
- protected String getTestStream() {
- return TEST_STREAM;
- }
-
- @After
- public void tearDown() {
- disableVerbose();
- ControlPreferences.getInstance().dispose();
- }
-
- // ------------------------------------------------------------------------
- // Test Cases
- // ------------------------------------------------------------------------
-
- @Test
- public void testVersion() {
- try {
- fShell.setScenario(SCEN_LTTNG_VERSION);
- ILttngControlService service = LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
- assertNotNull(service);
- assertEquals("2.1.0", service.getVersionString());
- } catch (ExecutionException e) {
- fail("Exeption thrown " + e);
- }
- }
-
- @Test
- public void testVersionWithPrompt() {
- try {
- fShell.setScenario(SCEN_LTTNG_VERSION_WITH_PROMPT);
- ILttngControlService service = LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
- assertNotNull(service);
- assertEquals("2.0.0", service.getVersionString());
- } catch (ExecutionException e) {
- fail("Exeption thrown " + e);
- }
- }
-
- @Test
- public void testUnsupportedVersion() {
- try {
- fShell.setScenario(SCEN_LTTNG_UNSUPPORTED_VERSION);
- LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
- fail("No exeption thrown");
- } catch (ExecutionException e) {
- // success
- }
- }
-
- @Test
- public void testNoVersion() {
- try {
- fShell.setScenario(SCEN_LTTNG_NO_VERSION);
- LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
- fail("No exeption thrown");
- } catch (ExecutionException e) {
- // success
- }
- }
-
- @Test
- public void testLttngNotInstalled() {
- try {
- fShell.setScenario(SCEN_LTTNG_NOT_INSTALLED);
- fService.getSessionNames(new NullProgressMonitor());
- fail("No exeption thrown");
- } catch (ExecutionException e) {
- // success
- }
- }
-
- @Test
- public void testGetSessionNames1() {
- try {
- fShell.setScenario(SCEN_NO_SESSION_AVAILABLE);
- String[] result = fService.getSessionNames(new NullProgressMonitor());
-
- assertNotNull(result);
- assertEquals(0, result.length);
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetSessionNames2() {
- try {
- fShell.setScenario(SCEN_GET_SESSION_NAMES1);
- String[] result = fService.getSessionNames(new NullProgressMonitor());
-
- assertNotNull(result);
- assertEquals(2, result.length);
- assertEquals("mysession1", result[0]);
- assertEquals("mysession", result[1]);
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetSessionNotExist() {
- try {
- fShell.setScenario(SCEN_GET_SESSION_NAME_NOT_EXIST);
- fService.getSessionNames(new NullProgressMonitor());
- fail("No exeption thrown");
-
- } catch (ExecutionException e) {
- // success
- }
- }
-
- @Test
- public void testGetSessionNotExistVerbose() {
- try {
- enableVerbose();
- fShell.setScenario(SCEN_GET_SESSION_NAME_NOT_EXIST_VERBOSE);
- fService.getSessionNames(new NullProgressMonitor());
- fail("No exeption thrown");
-
- } catch (ExecutionException e) {
- // success
- } finally {
- disableVerbose();
- }
- }
-
- @Test
- public void testGetSessionNameGarbage() {
- try {
- fShell.setScenario(SCEN_GET_SESSION_GARBAGE_OUT);
- String[] result = fService.getSessionNames(new NullProgressMonitor());
-
- assertNotNull(result);
- assertEquals(0, result.length);
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetSession1() {
- try {
- fShell.setScenario(SCEN_GET_SESSION1);
- ISessionInfo session = fService.getSession("mysession", new NullProgressMonitor());
-
- // Verify Session
- assertNotNull(session);
- assertEquals("mysession", session.getName());
- assertEquals("/home/user/lttng-traces/mysession-20120129-084256", session.getSessionPath());
- assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
-
- IDomainInfo[] domains = session.getDomains();
- assertNotNull(domains);
- assertEquals(2, domains.length);
-
- // Verify Kernel domain
- assertEquals("Kernel", domains[0].getName());
- IChannelInfo[] channels = domains[0].getChannels();
- assertNotNull(channels);
- assertEquals(2, channels.length);
-
- // Verify Kernel's channel0
- assertEquals("channel0", channels[0].getName());
- assertEquals(4, channels[0].getNumberOfSubBuffers());
- assertEquals("splice()", channels[0].getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channels[0].getOutputType());
- assertEquals(false, channels[0].isOverwriteMode());
- assertEquals(200, channels[0].getReadTimer());
- assertEquals(TraceEnablement.ENABLED, channels[0].getState());
- assertEquals(262144, channels[0].getSubBufferSize());
- assertEquals(0, channels[0].getSwitchTimer());
-
- // Verify event info
- IEventInfo[] channel0Events = channels[0].getEvents();
- assertNotNull(channel0Events);
- assertEquals(2, channel0Events.length);
- assertEquals("block_rq_remap", channel0Events[0].getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, channel0Events[0].getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, channel0Events[0].getEventType());
- assertEquals(TraceEnablement.ENABLED, channel0Events[0].getState());
-
- assertEquals("block_bio_remap", channel0Events[1].getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, channel0Events[1].getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, channel0Events[1].getEventType());
- assertEquals(TraceEnablement.DISABLED, channel0Events[1].getState());
-
- // Verify Kernel's channel1
- assertEquals("channel1", channels[1].getName());
- assertEquals(4, channels[1].getNumberOfSubBuffers());
- assertEquals("splice()", channels[1].getOutputType().getInName());
- assertEquals(TraceChannelOutputType.SPLICE, channels[1].getOutputType());
- assertEquals(true, channels[1].isOverwriteMode());
- assertEquals(400, channels[1].getReadTimer());
- assertEquals(TraceEnablement.DISABLED, channels[1].getState());
- assertEquals(524288, channels[1].getSubBufferSize());
- assertEquals(100, channels[1].getSwitchTimer());
-
- // Verify event info
- IEventInfo[] channel1Events = channels[1].getEvents();
- assertEquals(0, channel1Events.length);
-
- // Verify domain UST global
- assertEquals("UST global", domains[1].getName());
-
- IChannelInfo[] ustChannels = domains[1].getChannels();
-
- // Verify UST global's mychannel1
- assertEquals("mychannel1", ustChannels[0].getName());
- assertEquals(8, ustChannels[0].getNumberOfSubBuffers());
- assertEquals("mmap()", ustChannels[0].getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, ustChannels[0].getOutputType());
- assertEquals(true, ustChannels[0].isOverwriteMode());
- assertEquals(100, ustChannels[0].getReadTimer());
- assertEquals(TraceEnablement.DISABLED, ustChannels[0].getState());
- assertEquals(8192, ustChannels[0].getSubBufferSize());
- assertEquals(200, ustChannels[0].getSwitchTimer());
-
- // Verify event info
- IEventInfo[] ustEvents = ustChannels[0].getEvents();
- assertEquals(0, ustEvents.length);
-
- // Verify UST global's channel0
- assertEquals("channel0", ustChannels[1].getName());
- assertEquals(4, ustChannels[1].getNumberOfSubBuffers());
- assertEquals("mmap()", ustChannels[1].getOutputType().getInName());
- assertEquals(TraceChannelOutputType.MMAP, ustChannels[1].getOutputType());
- assertEquals(false, ustChannels[1].isOverwriteMode());
- assertEquals(200, ustChannels[1].getReadTimer());
- assertEquals(TraceEnablement.ENABLED, ustChannels[1].getState());
- assertEquals(4096, ustChannels[1].getSubBufferSize());
- assertEquals(0, ustChannels[1].getSwitchTimer());
-
- // Verify event info
- ustEvents = ustChannels[1].getEvents();
- assertEquals(2, ustEvents.length);
-
- assertEquals("ust_tests_hello:tptest_sighandler", ustEvents[0].getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_LINE, ustEvents[0].getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, ustEvents[0].getEventType());
- assertEquals(TraceEnablement.DISABLED, ustEvents[0].getState());
-
- assertEquals("*", ustEvents[1].getName());
- assertEquals(getAllEventTraceLogLevel(), ustEvents[1].getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, ustEvents[1].getEventType());
- assertEquals(TraceEnablement.ENABLED, ustEvents[1].getState());
-
- // next session (no detailed information available)
- session = fService.getSession("mysession1", new NullProgressMonitor());
- assertNotNull(session);
- assertEquals("mysession1", session.getName());
- assertEquals("/home/user/lttng-traces/mysession1-20120203-133225", session.getSessionPath());
- assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
-
- domains = session.getDomains();
- assertNotNull(domains);
- assertEquals(0, domains.length);
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- /**
- * @return
- */
- protected TraceLogLevel getAllEventTraceLogLevel() {
- return TraceLogLevel.LEVEL_UNKNOWN;
- }
-
- public void testGetKernelProvider() {
- try {
- fShell.setScenario(SCEN_GET_KERNEL_PROVIDER1);
- List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
-
- // Verify event info
- assertNotNull(events);
- assertEquals(3, events.size());
-
- IBaseEventInfo baseEventInfo = events.get(0);
- assertNotNull(baseEventInfo);
- assertEquals("sched_kthread_stop", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = events.get(1);
- assertEquals("sched_kthread_stop_ret", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = events.get(2);
- assertEquals("sched_wakeup_new", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetKernelProviderNoKernel1() {
- try {
- fShell.setScenario(SCEN_LIST_WITH_NO_KERNEL1);
- List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
-
- // Verify event info
- assertNotNull(events);
- assertEquals(0, events.size());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetKernelProviderNoKernel2() {
- try {
- fShell.setScenario(SCEN_LIST_WITH_NO_KERNEL2);
- List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
-
- // Verify event info
- assertNotNull(events);
- assertEquals(0, events.size());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetKernelProviderNoKernelVerbose() {
- try {
- enableVerbose();
- fShell.setScenario(SCEN_LIST_WITH_NO_KERNEL_VERBOSE);
- List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
-
- // Verify event info
- assertNotNull(events);
- assertEquals(0, events.size());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- } finally {
- disableVerbose();
- }
- }
-
- @Test
- public void testGetUstProvider() {
- try {
- fShell.setScenario(SCEN_GET_UST_PROVIDER1);
- List<IUstProviderInfo> providers = fService.getUstProvider();
-
- // Check all providers
- assertNotNull(providers);
- assertEquals(2, providers.size());
-
- //Verify first provider
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(0).getName());
- assertEquals(9379, providers.get(0).getPid());
-
- // Verify event info
- IBaseEventInfo[] events = providers.get(0).getEvents();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- IBaseEventInfo baseEventInfo = events[0];
- assertNotNull(baseEventInfo);
- assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = events[1];
- assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_INFO, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- //Verify second provider
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(1).getName());
- assertEquals(4852, providers.get(1).getPid());
-
- // Verify event info
- events = providers.get(1).getEvents();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- baseEventInfo = events[0];
- assertNotNull(baseEventInfo);
- assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_WARNING, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- baseEventInfo = events[1];
- assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
- assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, baseEventInfo.getLogLevel());
- assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testUstProvider2() {
- try {
- fShell.setScenario(SCEN_GET_UST_PROVIDER2);
- List<IUstProviderInfo> providers = fService.getUstProvider();
-
- assertNotNull(providers);
- assertEquals(0, providers.size());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetUstProvider3() {
- try {
- fShell.setScenario(SCEN_GET_UST_PROVIDER3);
- // Set version
- ((LTTngControlService)fService).setVersion("2.1.0");
- List<IUstProviderInfo> providers = fService.getUstProvider();
-
- // Check all providers
- assertNotNull(providers);
- assertEquals(2, providers.size());
-
- //Verify first provider
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(0).getName());
- assertEquals(9379, providers.get(0).getPid());
-
- // Verify event info
- IBaseEventInfo[] events = providers.get(0).getEvents();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- IBaseEventInfo baseEventInfo = events[0];
- assertNotNull(baseEventInfo);
- IFieldInfo[] fields = baseEventInfo.getFields();
- assertNotNull(fields);
- assertEquals(0, fields.length);
-
- baseEventInfo = events[1];
- fields = baseEventInfo.getFields();
- assertNotNull(fields);
- assertEquals(3, fields.length);
- assertEquals("doublefield", fields[0].getName());
- assertEquals("float", fields[0].getFieldType());
-
- assertEquals("floatfield", fields[1].getName());
- assertEquals("float", fields[1].getFieldType());
-
- assertEquals("stringfield", fields[2].getName());
- assertEquals("string", fields[2].getFieldType());
-
- //Verify second provider
- assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(1).getName());
- assertEquals(4852, providers.get(1).getPid());
-
- // Verify event info
- events = providers.get(1).getEvents();
- assertNotNull(events);
- assertEquals(2, events.length);
-
- baseEventInfo = events[0];
- assertNotNull(baseEventInfo);
- fields = baseEventInfo.getFields();
- assertNotNull(fields);
- assertEquals(0, fields.length);
-
- baseEventInfo = events[1];
- fields = baseEventInfo.getFields();
- assertNotNull(fields);
- assertEquals(3, fields.length);
-
- assertEquals("doublefield", fields[0].getName());
- assertEquals("float", fields[0].getFieldType());
-
- assertEquals("floatfield", fields[1].getName());
- assertEquals("float", fields[1].getFieldType());
-
- assertEquals("stringfield", fields[2].getName());
- assertEquals("string", fields[2].getFieldType());
-
- // Reset version
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
-
- @Test
- public void testGetKernelProviderNoUst1() {
- try {
- fShell.setScenario(SCEN_LIST_WITH_NO_UST1);
- List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
-
- // Verify Provider info
- assertNotNull(providerList);
- assertEquals(0, providerList.size());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
-
- @Test
- public void testGetKernelProviderNoUst2() {
- try {
- // Set version
- ((LTTngControlService)fService).setVersion("2.1.0");
-
- fShell.setScenario(SCEN_LIST_WITH_NO_UST2);
- List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
-
- // Verify Provider info
- assertNotNull(providerList);
- assertEquals(0, providerList.size());
-
- // Reset version
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetKernelProviderNoUst3() {
- try {
-
- // Set version
- ((LTTngControlService)fService).setVersion("2.1.0");
-
- fShell.setScenario(SCEN_LIST_WITH_NO_UST3);
- List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
-
- // Verify provider info
- assertNotNull(providerList);
- assertEquals(0, providerList.size());
-
- // Reset version
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testGetKernelProviderNoUstVerbose() {
- try {
- enableVerbose();
-
- // Set version
- ((LTTngControlService)fService).setVersion("2.1.0");
-
- fShell.setScenario(SCEN_LIST_WITH_NO_UST_VERBOSE);
- List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
-
- // Verify provider info
- assertNotNull(providerList);
- assertEquals(0, providerList.size());
-
- // Reset version
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- } finally {
- disableVerbose();
- }
- }
-
-
-
- @Test
- public void testCreateSession() {
- try {
- fShell.setScenario(SCEN_CREATE_SESSION1);
-
- ISessionInfo info = fService.createSession(new SessionInfo("mysession2"), new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession2", info.getName());
- assertNotNull(info.getSessionPath());
- assertTrue(info.getSessionPath().contains("mysession2"));
- assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateSessionWithPrompt() {
- try {
- // First line has the shell prompt before the command output
- // This can happen in a real application if the command line is not echoed by the shell.
- fShell.setScenario(SCEN_CREATE_SESSION_WITH_PROMPT);
-
- // First line has no shell prompt before the output
- ISessionInfo info = fService.createSession(new SessionInfo("mysession2"), new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession2", info.getName());
- assertNotNull(info.getSessionPath());
- assertTrue(info.getSessionPath().contains("mysession2"));
- assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateSessionVariants() {
-
- fShell.setScenario(SCEN_CREATE_SESSION_VARIANTS);
-
- try {
- fService.createSession(new SessionInfo("alreadyExist"), new NullProgressMonitor());
- fail("No exeption thrown");
- } catch (ExecutionException e) {
- // success
- }
-
- try {
- fService.createSession(new SessionInfo("wrongName"), new NullProgressMonitor());
- fail("No exeption thrown");
- } catch (ExecutionException e) {
- // success
- }
-
- try {
- ISessionInfo sessionInfo = new SessionInfo("withPath");
- sessionInfo.setSessionPath("/home/user/hallo");
- fService.createSession(sessionInfo, new NullProgressMonitor());
- fail("No exeption thrown");
- } catch (ExecutionException e) {
- // success
- }
-
- try {
- ISessionInfo info = fService.createSession(new SessionInfo("session with spaces"), new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("session with spaces", info.getName());
- assertNotNull(info.getSessionPath());
- assertTrue(info.getSessionPath().contains("session with spaces"));
- assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
-
- try {
- ISessionInfo sessionInfo = new SessionInfo("pathWithSpaces");
- sessionInfo.setSessionPath("/home/user/hallo user/here");
- ISessionInfo info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("pathWithSpaces", info.getName());
- assertNotNull(info.getSessionPath());
- assertTrue(info.getSessionPath().contains("/home/user/hallo user/here"));
- assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testDestroySession() {
- try {
- fShell.setScenario(SCEN_DESTROY_SESSION1);
- fService.destroySession("mysession2", new NullProgressMonitor());
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testDestroySessionVerbose() {
- try {
- enableVerbose();
- fShell.setScenario(SCEN_DESTROY_SESSION_VERBOSE);
- fService.destroySession("mysession2", new NullProgressMonitor());
- } catch (ExecutionException e) {
- fail(e.toString());
- } finally {
- disableVerbose();
- }
- }
-
- @Test
- public void testCreateChannel() {
- try {
- ((LTTngControlService)fService).setVersion("2.2.0");
- String sessionName = "mysession2";
- List<String> list = new ArrayList<>();
- String kernelChannel0 = "mychannel0";
- String kernelChannel1 = "mychannel1";
- list.add(kernelChannel0);
- list.add(kernelChannel1);
-
- fShell.setScenario(SCEN_CHANNEL_HANDLING);
-
- // Create/enable/configure 2 kernel channels
- ChannelInfo chanInfo = new ChannelInfo("");
- chanInfo.setOverwriteMode(true);
- chanInfo.setSubBufferSize(16384);
- chanInfo.setReadTimer(100);
- chanInfo.setSwitchTimer(200);
- chanInfo.setNumberOfSubBuffers(2);
- chanInfo.setMaxNumberTraceFiles(10);
- chanInfo.setMaxSizeTraceFiles(0);
- fService.enableChannels(sessionName, list, true, chanInfo, new NullProgressMonitor());
-
- // Create/enable/configure 1 UST channel
- list.clear();
- list.add("ustChannel");
-
- chanInfo = new ChannelInfo("");
- chanInfo.setOverwriteMode(true);
- chanInfo.setSubBufferSize(32768);
- chanInfo.setReadTimer(200);
- chanInfo.setSwitchTimer(100);
- chanInfo.setNumberOfSubBuffers(1);
- chanInfo.setMaxNumberTraceFiles(20);
- chanInfo.setMaxSizeTraceFiles(0);
- fService.enableChannels(sessionName, list, false, chanInfo, new NullProgressMonitor());
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateChannelUIDBuffer() {
- try {
- ((LTTngControlService)fService).setVersion("2.2.0");
- String sessionName = "mysession2";
- List<String> list = new ArrayList<>();
- String USTChannel = "ustChannel";
- list.add(USTChannel);
- fShell.setScenario(SCEN_CHANNEL_HANDLING);
-
- ChannelInfo chanInfo = new ChannelInfo("");
- chanInfo.setOverwriteMode(true);
- chanInfo.setSubBufferSize(32768);
- chanInfo.setReadTimer(200);
- chanInfo.setSwitchTimer(100);
- chanInfo.setNumberOfSubBuffers(1);
- chanInfo.setMaxNumberTraceFiles(20);
- chanInfo.setMaxSizeTraceFiles(0);
- chanInfo.setBufferType(BufferType.BUFFER_PER_UID);
- fService.enableChannels(sessionName, list, false, chanInfo, new NullProgressMonitor());
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateChannelPIDBuffer() {
- try {
- ((LTTngControlService)fService).setVersion("2.2.0");
- String sessionName = "mysession2";
- List<String> list = new ArrayList<>();
- String USTChannel = "ustChannel";
- list.add(USTChannel);
- fShell.setScenario(SCEN_CHANNEL_HANDLING);
-
-
- ChannelInfo chanInfo = new ChannelInfo("");
- chanInfo.setOverwriteMode(true);
- chanInfo.setSubBufferSize(-1);
- chanInfo.setReadTimer(-1);
- chanInfo.setSwitchTimer(-1);
- chanInfo.setNumberOfSubBuffers(-1);
- chanInfo.setMaxNumberTraceFiles(-1);
- chanInfo.setMaxSizeTraceFiles(-1);
- chanInfo.setBufferType(BufferType.BUFFER_PER_PID);
-
- fService.enableChannels(sessionName, list, false, chanInfo, new NullProgressMonitor());
- ((LTTngControlService)fService).setVersion("2.0.0");
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testDisableChannel() {
- try {
-
- String sessionName = "mysession2";
- List<String> list = new ArrayList<>();
- String kernelChannel0 = "mychannel0";
- String kernelChannel1 = "mychannel1";
- list.add(kernelChannel0);
- list.add(kernelChannel1);
-
- fShell.setScenario(SCEN_CHANNEL_HANDLING);
- fService.disableChannels(sessionName, list, true, new NullProgressMonitor());
-
- list.clear();
- list.add("ustChannel");
- fService.disableChannels(sessionName, list, false, new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testEnableChannel() {
- try {
-
- String sessionName = "mysession2";
- List<String> list = new ArrayList<>();
- String kernelChannel0 = "mychannel0";
- String kernelChannel1 = "mychannel1";
- list.add(kernelChannel0);
- list.add(kernelChannel1);
-
- fShell.setScenario(SCEN_CHANNEL_HANDLING);
- fService.enableChannels(sessionName, list, true, null, new NullProgressMonitor());
-
- // Create/enable/configure 1 UST channel
- list.clear();
- list.add("ustChannel");
-
- fService.enableChannels(sessionName, list, false, null, new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testEnableEvents() {
- try {
- // 1) session name, channel = null, 3 event names, kernel
- String sessionName = "mysession2";
- List<String> list = new ArrayList<>();
- String eventName0 = "block_rq_remap";
- String eventName1 = "block_bio_remap";
- String eventName2 = "softirq_entry";
- list.add(eventName0);
- list.add(eventName1);
- list.add(eventName2);
- fShell.setScenario(SCEN_EVENT_HANDLING);
- fService.enableEvents(sessionName, null, list, true, null, new NullProgressMonitor());
-
- // 2) session name, channel=mychannel, event name= null, kernel
- String channelName = "mychannel";
- fService.enableEvents(sessionName, channelName, null, true, null, new NullProgressMonitor());
-
- // 3) session name, channel=mychannel, 1 event name, ust, no filter
- String ustEventName = "ust_tests_hello:tptest_sighandler";
- list.clear();
- list.add(ustEventName);
- fService.enableEvents(sessionName, channelName, list, false, null, new NullProgressMonitor());
-
- // 4) session name, channel = mychannel, no event name, ust, with filter
- fService.enableEvents(sessionName, channelName, list, false, "intfield==10", new NullProgressMonitor());
-
- // 5) session name, channel = mychannel, no event name, ust, no filter
- list.clear();
- fService.enableEvents(sessionName, channelName, list, false, null, new NullProgressMonitor());
-
- // TODO add test with filters
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testEnableSyscalls() {
- try {
- // 1) session name, channel = null, 3 event names, kernel
- String sessionName = "mysession2";
- String channelName = "mychannel";
-
- fShell.setScenario(SCEN_EVENT_HANDLING);
-
- // 1) session name, channel = null
- fService.enableSyscalls(sessionName, null, new NullProgressMonitor());
-
- // 2) session name, channel = mychannel
- fService.enableSyscalls(sessionName, channelName, new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testDynamicProbe() {
- try {
- // 1) session name, channel = null, 3 event names, kernel
- String sessionName = "mysession2";
- String channelName = "mychannel";
- String eventName0 = "myevent0";
- String eventName1 = "myevent1";
- String functionProbe = "0xc0101340";
- String dynProbe = "init_post";
-
- fShell.setScenario(SCEN_EVENT_HANDLING);
-
- // 1) session name, channel = null, event name, function probe, probe
- fService.enableProbe(sessionName, null, eventName0, true, functionProbe, new NullProgressMonitor());
-
- // 2) session name, channel = mychannel
- fService.enableProbe(sessionName, channelName, eventName1, false, dynProbe, new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testEnableLogLevel() {
- try {
- // 1) session name, channel = null, 3 event names, kernel
- String sessionName = "mysession2";
- String channelName = "mychannel";
- String eventName4 = "myevent4";
- String eventName5 = "myevent5";
-
- fShell.setScenario(SCEN_EVENT_HANDLING);
-
- // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
- fService.enableLogLevel(sessionName, null, eventName4, LogLevelType.LOGLEVEL_ONLY, TraceLogLevel.TRACE_DEBUG, null, new NullProgressMonitor());
-
- // 2) session name, channel = mychannel, null, loglevel, TRACE_DEBUG_FUNCTION
- fService.enableLogLevel(sessionName, channelName, eventName5, LogLevelType.LOGLEVEL, TraceLogLevel.TRACE_DEBUG_FUNCTION, null, new NullProgressMonitor());
-
- // TODO add test with filters
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testAddContext() {
- try {
- // 1) session name, channel = null, 3 event names, kernel
- String sessionName = "mysession2";
- String channelName = "mychannel";
- String eventName = "ust_tests_hello:tptest_sighandler";
- List<String> contexts = new ArrayList<>();
- contexts.add("prio");
- contexts.add("pid");
-
- fShell.setScenario(SCEN_CONTEXT_HANDLING);
-
- List<String> availContexts = fService.getContextList(new NullProgressMonitor());
- assertNotNull(availContexts);
- assertEquals(12, availContexts.size());
-
- // A very "hard-coded" way to verify but it works ...
- Set<String> expectedContexts = new HashSet<>();
- expectedContexts.add("pid");
- expectedContexts.add("procname");
- expectedContexts.add("prio");
- expectedContexts.add("nice");
- expectedContexts.add("vpid");
- expectedContexts.add("tid");
- expectedContexts.add("pthread_id");
- expectedContexts.add("vtid");
- expectedContexts.add("ppid");
- expectedContexts.add("vppid");
- expectedContexts.add("perf:cpu-cycles");
- expectedContexts.add("perf:cycles");
-
- assertTrue(expectedContexts.containsAll(availContexts));
-
- // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
- fService.addContexts(sessionName, channelName, eventName, false, contexts, new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testAddContextFailure() {
-
- // 1) session name, channel = null, 3 event names, kernel
- String sessionName = "mysession2";
- String channelName = "mychannel";
- String eventName = "ust_tests_hello:tptest_sighandler";
- List<String> contexts = new ArrayList<>();
- contexts.add("prio");
- contexts.add("pid");
- fShell.setScenario(SCEN_CONTEXT_ERROR_HANDLING);
- try {
- fService.getContextList(new NullProgressMonitor());
- fail("No exeption generated");
- } catch (ExecutionException e) {
- // success
- }
- try {
- // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
- fService.addContexts(sessionName, channelName, eventName, false, contexts, new NullProgressMonitor());
- fail("No exeption generated");
- } catch (ExecutionException e) {
- // success
- }
- }
-
- @Test
- public void testCalibrate() {
- try {
- fShell.setScenario(SCEN_CALIBRATE_HANDLING);
- fService.calibrate(true, new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCalibrateFailure() {
- try {
- fShell.setScenario(SCEN_CALIBRATE_HANDLING);
- fService.calibrate(false, new NullProgressMonitor());
- fail("No exeption generated");
- } catch (ExecutionException e) {
- // success
- }
- }
-
- @Test
- public void testCreateSession2_1() {
-
- try {
- fShell.setScenario(SCEN_CREATE_SESSION_2_1);
-
- ISessionInfo sessionInfo = new SessionInfo("mysession");
- sessionInfo.setNetworkUrl("net://172.0.0.1");
- sessionInfo.setStreamedTrace(true);
- ISessionInfo info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("net://172.0.0.1", info.getSessionPath());
- assertTrue(info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- sessionInfo = new SessionInfo("mysession");
- sessionInfo.setStreamedTrace(true);
- sessionInfo.setNetworkUrl("file:///tmp");
- info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("file:///tmp", info.getSessionPath());
- assertTrue(!info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- sessionInfo = new SessionInfo("mysession");
- sessionInfo.setStreamedTrace(true);
- sessionInfo.setNetworkUrl("file:///tmp");
- info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("file:///tmp", info.getSessionPath());
- assertTrue(!info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- sessionInfo = new SessionInfo("mysession");
- sessionInfo.setStreamedTrace(true);
- sessionInfo.setControlUrl("tcp://172.0.0.1");
- sessionInfo.setDataUrl("tcp://172.0.0.1:5343");
- info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("", info.getSessionPath()); // the complete network path is not available at this point
- assertTrue(info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- sessionInfo = new SessionInfo("mysession");
- sessionInfo.setStreamedTrace(true);
- sessionInfo.setNetworkUrl("net://172.0.0.1:1234:2345");
- info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("net://172.0.0.1:1234:2345", info.getSessionPath());
- assertTrue(info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
-
- // verbose
- enableVerbose();
- sessionInfo = new SessionInfo("mysession");
- sessionInfo.setStreamedTrace(true);
- sessionInfo.setNetworkUrl("net://172.0.0.1");
- info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("net://172.0.0.1", info.getSessionPath());
- assertTrue(info.isStreamedTrace());
- disableVerbose();
- fService.destroySession("mysession", new NullProgressMonitor());
-
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateSessionVerbose2_1() {
- try {
- fShell.setScenario(SCEN_CREATE_SESSION_VERBOSE_2_1);
-
- enableVerbose();
- ISessionInfo sessionInfo = new SessionInfo("mysession");
- sessionInfo.setStreamedTrace(true);
- sessionInfo.setNetworkUrl("net://172.0.0.1");
- ISessionInfo info = fService.createSession(sessionInfo, new NullProgressMonitor());
- assertNotNull(info);
- assertEquals("mysession", info.getName());
- assertEquals("net://172.0.0.1", info.getSessionPath());
- assertTrue(info.isStreamedTrace());
- fService.destroySession("mysession", new NullProgressMonitor());
- } catch (ExecutionException e) {
- fail(e.toString());
- } finally {
- disableVerbose();
- }
- }
-
- @Test
- public void testCreateSnapshotSession() {
- try {
- fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION);
- ISessionInfo params = new SessionInfo("mysession");
- params.setSnapshot(true);
- ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
- assertNotNull(sessionInfo);
- assertEquals("mysession", sessionInfo.getName());
- assertTrue(sessionInfo.isSnapshotSession());
- assertEquals("", sessionInfo.getSessionPath());
- assertTrue(!sessionInfo.isStreamedTrace());
-
- assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
-
- String[] names = fService.getSessionNames(new NullProgressMonitor());
- assertEquals(names[0], "mysession");
-
- ISnapshotInfo snapshotInfo = fService.getSnapshotInfo("mysession", new NullProgressMonitor());
- assertNotNull(snapshotInfo);
- assertEquals("snapshot-1", snapshotInfo.getName());
- assertEquals("/home/user/lttng-traces/mysession-20130913-141651", snapshotInfo.getSnapshotPath());
- assertEquals(1, snapshotInfo.getId());
- assertTrue(!snapshotInfo.isStreamedSnapshot());
-
- // we need to set the snapshotInfo to so that the session path is set correctly
- sessionInfo.setSnapshotInfo(snapshotInfo);
- assertEquals("/home/user/lttng-traces/mysession-20130913-141651", sessionInfo.getSessionPath());
-
- fService.recordSnapshot("mysession", new NullProgressMonitor());
-
- fService.destroySession("mysession", new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateSnapshotSession2_5() {
- try {
- fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION_2_5);
- ISessionInfo params = new SessionInfo("mysession");
- params.setSnapshot(true);
- ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
- assertNotNull(sessionInfo);
- assertEquals("mysession", sessionInfo.getName());
- assertTrue(sessionInfo.isSnapshotSession());
- assertEquals("", sessionInfo.getSessionPath());
- assertTrue(!sessionInfo.isStreamedTrace());
-
- assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
-
- String[] names = fService.getSessionNames(new NullProgressMonitor());
- assertEquals(names[0], "mysession");
-
- ISnapshotInfo snapshotInfo = fService.getSnapshotInfo("mysession", new NullProgressMonitor());
- assertNotNull(snapshotInfo);
- assertEquals("snapshot-1", snapshotInfo.getName());
- assertEquals("/home/user/lttng-traces/mysession-20130913-141651", snapshotInfo.getSnapshotPath());
- assertEquals(1, snapshotInfo.getId());
- assertTrue(!snapshotInfo.isStreamedSnapshot());
-
- // we need to set the snapshotInfo to so that the session path is set correctly
- sessionInfo.setSnapshotInfo(snapshotInfo);
- assertEquals("/home/user/lttng-traces/mysession-20130913-141651", sessionInfo.getSessionPath());
-
- fService.recordSnapshot("mysession", new NullProgressMonitor());
-
- fService.destroySession("mysession", new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- public void testCreateStreamedSnapshotSession() {
- try {
- fShell.setScenario(SCEN_CREATE_STREAMED_SNAPSHOT_SESSION);
-
- ISessionInfo params = new SessionInfo("mysession");
- params.setNetworkUrl("net://172.0.0.1");
- ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
- assertNotNull(sessionInfo);
- assertEquals("mysession", sessionInfo.getName());
- assertTrue(sessionInfo.isSnapshotSession());
-
- assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
- assertTrue(sessionInfo.isStreamedTrace());
-
- String[] names = fService.getSessionNames(new NullProgressMonitor());
- assertEquals(names[0], "mysession");
-
- ISnapshotInfo snapshotInfo = sessionInfo.getSnapshotInfo();
- assertNotNull(sessionInfo);
- assertEquals("snapshot-2", snapshotInfo.getName());
- assertEquals("net4://172.0.0.1:5342/", snapshotInfo.getSnapshotPath());
- assertEquals(2, snapshotInfo.getId());
- assertTrue(snapshotInfo.isStreamedSnapshot());
-
- // we need to set the snapshotInfo to so that the session path is set correctly
- sessionInfo.setSnapshotInfo(snapshotInfo);
- assertEquals("net4://172.0.0.1:5342/", sessionInfo.getSessionPath());
-
- fService.recordSnapshot("mysession", new NullProgressMonitor());
-
- fService.destroySession("mysession", new NullProgressMonitor());
-
- } catch (ExecutionException e) {
- fail(e.toString());
- }
- }
-
- @Test
- public void testCreateSnapshotSessionErrors() {
- try {
- fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION_ERRORS);
-
- String[] names = fService.getSessionNames(new NullProgressMonitor());
- assertEquals(names[0], "mysession");
- } catch (ExecutionException e) {
- fail(e.toString());
- }
-
- try {
- fService.getSnapshotInfo("blabla", new NullProgressMonitor());
- fail("getSnapshoInfo() didn't fail");
- } catch (ExecutionException e) {
- // successful
- }
-
- try {
- fService.recordSnapshot("blabla", new NullProgressMonitor());
- fail("getSnapshoInfo() didn't fail");
- } catch (ExecutionException e) {
- // successful
- }
-
- try {
- fService.recordSnapshot("mysession", new NullProgressMonitor());
- fail("getSnapshoInfo() didn't fail");
- } catch (ExecutionException e) {
- // successful
- }
- }
-
- @Test
- public void testCreateLiveSession() throws ExecutionException {
- fShell.setScenario(SCEN_CREATE_LIVE_SESSION);
-
- ISessionInfo params = new SessionInfo("mysession");
- params.setLive(true);
- params.setStreamedTrace(true);
- params.setNetworkUrl("net://127.0.0.1");
- ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
- assertNotNull(sessionInfo);
- assertEquals("mysession", sessionInfo.getName());
- assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
- assertTrue(sessionInfo.isStreamedTrace());
- assertTrue(sessionInfo.isLive());
- assertEquals("net://127.0.0.1", sessionInfo.getSessionPath());
- String[] names = fService.getSessionNames(new NullProgressMonitor());
- assertEquals(names[0], "mysession");
- fService.destroySession("mysession", new NullProgressMonitor());
- }
-
- @Test
- public void testCreateLiveSessionErrors() {
- try {
- fShell.setScenario(SCEN_CREATE_LIVE_SESSION_ERRORS);
-
- ISessionInfo parameters = new SessionInfo("mysession");
- parameters.setLive(true);
- parameters.setSnapshot(true);
- fService.createSession(parameters, new NullProgressMonitor());
- fail("createSession() didn't fail");
- } catch (ExecutionException e) {
- // successful
- }
-
- try {
- ISessionInfo parameters = new SessionInfo("mysession");
- parameters.setNetworkUrl("blah");
- parameters.setLive(true);
- fService.createSession(parameters, new NullProgressMonitor());
- fail("createSession() didn't fail");
- } catch (ExecutionException e) {
- // successful
- }
-
- try {
- ISessionInfo parameters = new SessionInfo("mysession");
- parameters.setControlUrl("net://127.0.0.1");
- parameters.setLive(true);
- fService.createSession(parameters, new NullProgressMonitor());
- fail("createSession() didn't fail");
- } catch (ExecutionException e) {
- // successful
- }
- }
-
- private static void enableVerbose() {
- // verbose
- ControlCommandLogger.init(ControlPreferences.getInstance().getLogfilePath(), false);
- ControlPreferences.getInstance().getPreferenceStore().setDefault(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, true);
- ControlPreferences.getInstance().getPreferenceStore().setDefault(ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_PREF, ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE);
- }
-
- private static void disableVerbose() {
- ControlPreferences.getInstance().getPreferenceStore().setDefault(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, false);
- }
-
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IAddContextDialog;
-
-/**
- * Add Context dialog stub.
- */
-@SuppressWarnings("javadoc")
-public class AddContextDialogStub implements IAddContextDialog {
-
- private Set<String> fAvailableContexts = null;
- private List<String> fContexts = null;
-
- @Override
- public int open() {
- return 0;
- }
-
- @Override
- public void setAvalibleContexts(List<String> contexts) {
- fAvailableContexts = new HashSet<>();
- fAvailableContexts.addAll(contexts);
- }
-
- @Override
- public List<String> getContexts() {
- List<String> ret = new ArrayList<>();
- ret.addAll(fContexts);
- return ret;
- }
-
- public void setContexts(List<String> contexts) throws IllegalArgumentException{
- fContexts = new ArrayList<>();
- fContexts.addAll(contexts);
- // If availableContexts are null we cannot verify
- if (fAvailableContexts != null) {
- for (Iterator<String> iterator = fContexts.iterator(); iterator.hasNext();) {
- String string = iterator.next();
- if (!fAvailableContexts.contains(string)) {
- throw new IllegalArgumentException();
- }
- }
- }
- }
-}
-
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ICreateSessionDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-
-/**
- * Create session dialog stub implementation.
- */
-@SuppressWarnings("javadoc")
-public class CreateSessionDialogStub implements ICreateSessionDialog {
-
- public String fName = "mysession";
- public String fPath = null;
- private boolean fIsStreamedTrace = false;
- private String fNetworkUrl = null;
- private String fControlUrl = null;
- private String fDataUrl = null;
- private boolean fIsSnapshot;
- private boolean fIsLive = false;
- private int fLiveDelay = 0;
-
- @Override
- public void initialize(TraceSessionGroup group) {
- }
-
- @Override
- public int open() {
- return 0;
- }
-
- public void setSessionPath(String path) {
- fPath = path;
- }
-
- public void setSessionName(String name) {
- fName = name;
- }
-
- public void setStreamedTrace(boolean isStreamedTrace) {
- fIsStreamedTrace = isStreamedTrace;
- }
-
- public void setNetworkUrl(String fNetworkUrl) {
- this.fNetworkUrl = fNetworkUrl;
- }
-
- public void setControlUrl(String fControlUrl) {
- this.fControlUrl = fControlUrl;
- }
-
- public void setDataUrl(String fDataUrl) {
- this.fDataUrl = fDataUrl;
- }
-
- public void setSnapshot(boolean isSnapshot) {
- fIsSnapshot = isSnapshot;
- }
-
- public void setLive(boolean isLive) {
- fIsLive = isLive;
- }
-
- public void setLiveDelay(int liveDelay) {
- fLiveDelay = liveDelay;
- }
-
- @Override
- public ISessionInfo getParameters() {
- ISessionInfo sessionInfo = new SessionInfo(fName);
-
- if (fIsStreamedTrace) {
- sessionInfo.setNetworkUrl(fNetworkUrl);
- sessionInfo.setControlUrl(fControlUrl);
- sessionInfo.setDataUrl(fDataUrl);
- sessionInfo.setStreamedTrace(true);
- } else if (fPath != null) {
- sessionInfo.setSessionPath(fPath);
- }
-
- sessionInfo.setLive(fIsLive);
- sessionInfo.setLiveDelay(fLiveDelay);
- sessionInfo.setSnapshot(fIsSnapshot);
-
- return sessionInfo;
- }
-}
+++ /dev/null
-/**********************************************************************
- * 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IConfirmDialog;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * A confirmation dialog stub implementation.
- */
-public class DestroyConfirmDialogStub implements IConfirmDialog {
-
- @Override
- public boolean openConfirm(Shell parent, String title, String message) {
- return true;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableChannelDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-
-/**
- * Create channel dialog stub implementation.
- */
-@SuppressWarnings("javadoc")
-public class EnableChannelDialogStub implements IEnableChannelDialog {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private TraceDomainComponent fDomain;
- private ChannelInfo fChannelInfo;
- private boolean fIsKernel;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
- public EnableChannelDialogStub() {
- fChannelInfo = new ChannelInfo("mychannel");
- fChannelInfo.setNumberOfSubBuffers(4);
- fChannelInfo.setOverwriteMode(true);
- fChannelInfo.setReadTimer(200);
- fChannelInfo.setSwitchTimer(100);
- fChannelInfo.setSubBufferSize(16384);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- public void setIsKernel(boolean isKernel) {
- fIsKernel = isKernel;
- }
-
- @Override
- public IChannelInfo getChannelInfo() {
- return fChannelInfo;
- }
-
- @Override
- public void setDomainComponent(TraceDomainComponent domain) {
- fDomain = domain;
- if (fDomain != null) {
- fIsKernel = fDomain.isKernel();
- }
- }
-
- @Override
- public int open() {
- return 0;
- }
-
- @Override
- public boolean isKernel() {
- return fIsKernel;
- }
-
- @Override
- public void setHasKernel(boolean hasKernel) {
- // Do nothing
- }
-
- public void setChannelInfo(ChannelInfo info) {
- fChannelInfo = info;
- }
-
- @Override
- public void setTargetNodeComponent(TargetNodeComponent node) {
- // Do nothing
- }
-
- public void setBufferType (BufferType bufferType) {
- fChannelInfo.setBufferType(bufferType);
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableEventsDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-
-/**
- * Enable events dialog stub implementation.
- */
-@SuppressWarnings("javadoc")
-public class EnableEventsDialogStub implements IEnableEventsDialog {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private boolean fIsKernel;
- private boolean fIsTracePoints;
- private boolean fIsAllTracePoints;
- private boolean fIsSysCalls;
- private boolean fIsDynamicProbe;
- private String fProbeEventName;
- private String fDynamicProbe;
- private boolean fIsFunctionProbe;
- private String fFunctionEventName;
- private String fFunctionProbe;
- private boolean fIsWildcard;
- private String fWildcard;
- private boolean fIsLogLevel;
- private String fLogLevelEventName;
- private TraceLogLevel fLogLevel;
- private LogLevelType fLogLevelType;
- private String fFilter;
- private List<String> fNames = new ArrayList<>();
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- public void setIsKernel(boolean isKernel) {
- fIsKernel = isKernel;
- }
-
- public void setIsTracePoints(boolean isTracePoints) {
- fIsTracePoints = isTracePoints;
- }
-
- public void setIsAllTracePoints(boolean isAllTracePoints) {
- fIsAllTracePoints = isAllTracePoints;
- }
-
- public void setIsSysCalls(boolean isSysCalls) {
- this.fIsSysCalls = isSysCalls;
- }
-
- public void setIsDynamicProbe(boolean isDynamicProbe) {
- fIsDynamicProbe = isDynamicProbe;
- }
-
- public void setProbeEventName(String probeEventName) {
- fProbeEventName = probeEventName;
- }
-
- public void setDynamicProbe(String dynamicProbe) {
- fDynamicProbe = dynamicProbe;
- }
-
- public void setIsFunctionProbe(boolean isFunctionProbe) {
- fIsFunctionProbe = isFunctionProbe;
- }
-
- public void setFunctionEventName(String functionEventName) {
- fFunctionEventName = functionEventName;
- }
-
- public void setFunctionProbe(String functionProbe) {
- fFunctionProbe = functionProbe;
- }
-
- public void setIsWildcard(boolean isWildcard) {
- fIsWildcard = isWildcard;
- }
-
- public void setWildcard(String wildcard) {
- fWildcard = wildcard;
- }
-
- public void setIsLogLevel(boolean isLogLevel) {
- fIsLogLevel = isLogLevel;
- }
-
- public void setLogLevelEventName(String logLevelEventName) {
- fLogLevelEventName = logLevelEventName;
- }
-
- public void setLogLevel(TraceLogLevel logLevel) {
- fLogLevel = logLevel;
- }
-
- public void setLogLevelType(LogLevelType logLevelType) {
- fLogLevelType = logLevelType;
- }
-
- public void setNames(List<String> names) {
- fNames = names;
- }
-
- public void setFilterExpression(String filter) {
- fFilter = filter;
- }
-
- @Override
- public boolean isTracepoints() {
- return fIsTracePoints;
- }
-
- @Override
- public boolean isAllTracePoints() {
- return fIsAllTracePoints;
- }
-
- @Override
- public boolean isSysCalls() {
- return fIsSysCalls;
- }
-
- @Override
- public boolean isAllSysCalls() {
- return fIsSysCalls;
- }
-
- @Override
- public List<String> getEventNames() {
- return fNames;
- }
-
- @Override
- public boolean isDynamicProbe() {
- return fIsDynamicProbe;
- }
-
- @Override
- public String getProbeEventName() {
- return fProbeEventName;
- }
-
- @Override
- public String getProbeName() {
- return fDynamicProbe;
- }
-
- @Override
- public boolean isDynamicFunctionProbe() {
- return fIsFunctionProbe;
- }
-
- @Override
- public String getFunctionEventName() {
- return fFunctionEventName;
- }
-
- @Override
- public String getFunction() {
- return fFunctionProbe;
- }
-
- @Override
- public boolean isWildcard() {
- return fIsWildcard;
- }
-
- @Override
- public String getWildcard() {
- return fWildcard;
- }
-
- @Override
- public boolean isLogLevel() {
- return fIsLogLevel;
- }
-
- @Override
- public LogLevelType getLogLevelType() {
- return fLogLevelType;
- }
-
- @Override
- public TraceLogLevel getLogLevel() {
- return fLogLevel;
- }
-
- @Override
- public String getLogLevelEventName() {
- return fLogLevelEventName;
- }
-
- @Override
- public boolean isKernel() {
- return fIsKernel;
- }
-
- @Override
- public void setTraceProviderGroup(TraceProviderGroup providerGroup) {
- }
-
- @Override
- public void setTraceDomainComponent(TraceDomainComponent domain) {
- }
-
- @Override
- public int open() {
- return 0;
- }
-
- @Override
- public String getFilterExpression() {
- return fFilter;
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
-
-import java.util.Arrays;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IGetEventInfoDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * Get event information dialog stub implementation.
- */
-public class GetEventInfoDialogStub implements IGetEventInfoDialog {
-
- private TraceSessionComponent[] fSessions;
- private String fFilterExpression;
-
- @Override
- public TraceSessionComponent getSession() {
- return fSessions[0];
- }
-
- @Override
- public TraceChannelComponent getChannel() {
- return null;
- }
-
- @Override
- public void setIsKernel(boolean isKernel) {
- }
-
- @Override
- public void setSessions(TraceSessionComponent[] sessions) {
- if (sessions != null) {
- fSessions = Arrays.copyOf(sessions, sessions.length);
- return;
- }
- fSessions = null;
- }
-
- @Override
- public String getFilterExpression() {
- return fFilterExpression;
- }
-
- @Override
- public int open() {
- return 0;
- }
-
- /**
- * @param filter the filter to set
- */
- public void setFilterExpression(String filter) {
- fFilterExpression = filter;
- }
-}
-
+++ /dev/null
-/**********************************************************************
- * 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.service;
-
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.shells.LTTngToolsFileShell;
-
-@SuppressWarnings("javadoc")
-public class CommandShellFactory {
-
- public static final int GET_SESSION_NAMES_COMMAND_SHELL = 0;
-
- private static CommandShellFactory fInstance = null;
-
- public static CommandShellFactory getInstance() {
- if (fInstance == null) {
- fInstance = new CommandShellFactory();
- }
- return fInstance;
- }
-
-// public ICommandShell getRealShell() {
-// ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
-// IHost host = registry.getLocalHost();
-// RemoteSystemProxy proxy = new RemoteSystemProxy(host);
-// ICommandShell shell = new LTTngToolsSimulatorShell(proxy);
-// return shell;
-// }
-
- public LTTngToolsFileShell getFileShell() {
- return new LTTngToolsFileShell();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.service;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.linuxtools.internal.lttng2.control.stubs.shells.LTTngToolsFileShell;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-
-@SuppressWarnings("javadoc")
-public class TestRemoteSystemProxy implements IRemoteSystemProxy {
-
- private LTTngToolsFileShell fShell = null;
- private String fTestFile = null;
- private String fScenario = null;
-
- @Override
- public IShellService getShellService() {
- return null;
- }
-
- @Override
- public ITerminalService getTerminalService() {
- return null;
- }
-
- @Override
- public ISubSystem getShellServiceSubSystem() {
- return null;
- }
-
- @Override
- public ISubSystem getTerminalServiceSubSystem() {
- return null;
- }
- @Override
- public IFileServiceSubSystem getFileServiceSubSystem() {
- return null;
- }
-
- @Override
- public void connect(IRSECallback callback) throws ExecutionException {
-// System.out.println("in done: proxy connect ");
- if (callback != null) {
- callback.done(Status.OK_STATUS, null);
- }
- }
-
- @Override
- public void disconnect() throws ExecutionException {
- fShell = null;
- }
-
- @Override
- public ICommandShell createCommandShell() throws ExecutionException {
- if (fShell == null) {
- fShell = CommandShellFactory.getInstance().getFileShell();
- if ((fTestFile != null) && (fScenario != null)) {
- try {
- fShell.loadScenarioFile(fTestFile);
- } catch (Exception e) {
- throw new ExecutionException(e.toString());
- }
- fShell.setScenario(fScenario);
- }
- }
- return fShell;
- }
-
- @Override
- public void addCommunicationListener(ICommunicationsListener listener) {
- }
-
- @Override
- public void removeCommunicationListener(ICommunicationsListener listener) {
- }
-
- public void setTestFile(String testFile) {
- fTestFile = testFile;
- }
-
- public void setScenario(String scenario) {
- fScenario = scenario;
- if (fShell != null) {
- fShell.setScenario(fScenario);
- }
- }
-
- @Override
- public int getPort() {
- return IRemoteSystemProxy.INVALID_PORT_NUMBER;
- }
-
- @Override
- public void setPort(int port) {
- }
-
- @Override
- public boolean isLocal() {
- return false;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;
-
-import java.io.BufferedReader;
-import java.io.DataInputStream;
-import java.io.FileInputStream;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.CommandResult;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
-
-@SuppressWarnings("javadoc")
-public class LTTngToolsFileShell extends TestCommandShell {
-
- // ------------------------------------------------------------------------
- // CONSTANTS
- // ------------------------------------------------------------------------
- private final static String SCENARIO_KEY = "<SCENARIO>";
- private final static String SCENARIO_END_KEY = "</SCENARIO>";
- private final static String INPUT_KEY = "<COMMAND_INPUT>";
- private final static String INPUT_END_KEY = "</COMMAND_INPUT>";
- private final static String RESULT_KEY = "<COMMAND_RESULT>";
- private final static String OUTPUT_KEY = "<COMMAND_OUTPUT>";
- private final static String OUTPUT_END_KEY = "</COMMAND_OUTPUT>";
- private final static String ERROR_OUTPUT_KEY = "<COMMAND_ERROR_OUTPUT>";
- private final static String ERROR_OUTPUT_END_KEY = "</COMMAND_ERROR_OUTPUT>";
- private final static String COMMENT_KEY = "#.*";
-
- private final static Pattern LTTNG_LIST_SESSION_PATTERN = Pattern.compile("lttng\\s+list\\s+(.+)");
- private final static String LTTNG_LIST_PROVIDER_PATTERN = "lttng\\s+list\\s+(-u|-k)";
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private String fScenariofile;
- private String fScenario;
-
- private final Map<String, Map<String, ICommandResult>> fScenarioMap = new HashMap<>();
- private final Map<String, Integer> fSessionNameMap = new HashMap<>();
-
- /**
- * Parse a scenario file with the format:
- * <pre>
- * <SCENARIO>
- * ScenarioName
- *
- * <COMMAND_INPUT>
- * Command
- * </COMAND_INPUT>
- *
- * <COMMAND_RESULT>
- * CommandResult
- * </COMMAND_RESULT>
- *
- * <COMMAND_OUTPUT>
- * CommandOutput
- * <COMMAND_ERROR_OUTPUT>
- * CommandErrorOutput
- * </COMMAND_ERROR_OUTPUT>
- * </COMMAND_OUTPUT>
- *
- * </SCENARIO>
- *
- * Where: ScenarioName - is the scenario name
- * Command - the command line string
- * CommandResult - the result integer of the command (0 for success, 1 for failure)
- * ComandOutput - the command output string (multi-line possible)
- * ComandErrorOutput - the command error output string (multi-line possible)
- *
- * Note: 1) There can be many scenarios per file
- * 2) There can be many (Command-CommandResult-CommandOutput) triples per scenario
- * 3) Lines starting with # will be ignored (comments)
- * <pre>
- * @param scenariofile - path to scenario file
- * @throws Exception
- */
- public synchronized void loadScenarioFile(String scenariofile) throws Exception {
- fScenariofile = scenariofile;
-
- // clean up map
- Collection<Map<String, ICommandResult>> values = fScenarioMap.values();
- for (Iterator<Map<String, ICommandResult>> iterator = values.iterator(); iterator.hasNext();) {
- Map<String, ICommandResult> map = iterator.next();
- map.clear();
- }
- fScenarioMap.clear();
-
- // load from file
-
- // Open the file
- try (FileInputStream fstream = new FileInputStream(fScenariofile);
- DataInputStream in = new DataInputStream(fstream);
- BufferedReader br = new BufferedReader(new InputStreamReader(in));) {
- String strLine;
-
- // Read File Line by Line
-
- // Temporary map for generating instance numbers for lttng list
- // <session> commands.
- // The numbers are per scenario.
- Map<String, Integer> tmpSessionNameMap = new HashMap<>();
- while ((strLine = br.readLine()) != null) {
-
- // Ignore comments
- if (isComment(strLine)) {
- continue;
- }
-
- if (SCENARIO_KEY.equals(strLine)) {
- // scenario start
-
- // Ignore comments
- strLine = br.readLine();
- while (isComment(strLine)) {
- strLine = br.readLine();
- }
-
- String scenario = strLine;
- Map<String, ICommandResult> commandMap = new HashMap<>();
- fScenarioMap.put(scenario, commandMap);
- List<String> output = null;
- List<String> errorOutput = null;
- String input = null;
- boolean inOutput = false;
- boolean inErrorOutput = false;
- int result = 0;
- tmpSessionNameMap.clear();
- while ((strLine = br.readLine()) != null) {
- // Ignore comments
- if (isComment(strLine)) {
- continue;
- }
-
- if (SCENARIO_END_KEY.equals(strLine)) {
- // Scenario is finished
- break;
- }
- if (INPUT_KEY.equals(strLine)) {
- strLine = br.readLine();
- // Ignore comments
- while (isComment(strLine)) {
- strLine = br.readLine();
- }
- // Read command
- input = strLine;
-
- // Handle instances of 'lttng list
- // <session"-comamand
- Matcher matcher = LTTNG_LIST_SESSION_PATTERN.matcher(strLine);
- if (matcher.matches() && !input.matches(LTTNG_LIST_PROVIDER_PATTERN)) {
- String sessionName = matcher.group(1).trim();
- Integer i = tmpSessionNameMap.get(sessionName);
- if (i != null) {
- i++;
- } else {
- i = 0;
- }
- tmpSessionNameMap.put(sessionName, i);
- input += String.valueOf(i);
- }
- } else if (INPUT_END_KEY.equals(strLine)) {
- // Initialize output array
- output = new ArrayList<>();
- errorOutput = new ArrayList<>();
- } else if (RESULT_KEY.equals(strLine)) {
- strLine = br.readLine();
- // Ignore comments
- while (isComment(strLine)) {
- strLine = br.readLine();
- }
- // Save result value
- result = Integer.parseInt(strLine);
- } else if (OUTPUT_END_KEY.equals(strLine)) {
- // Save output/result in command map
- if (output != null && errorOutput != null) {
- commandMap.put(input, new CommandResult(result, output.toArray(new String[output.size()]), errorOutput.toArray(new String[errorOutput.size()])));
- }
- inOutput = false;
- } else if (OUTPUT_KEY.equals(strLine)) {
- // first line of output
- inOutput = true;
- } else if (ERROR_OUTPUT_KEY.equals(strLine)) {
- // first line of output
- inErrorOutput = true;
- } else if (ERROR_OUTPUT_END_KEY.equals(strLine)) {
- inErrorOutput = false;
- } else if (inOutput) {
- while (isComment(strLine)) {
- strLine = br.readLine();
- }
- // lines of output/error output
- if (errorOutput != null && inErrorOutput) {
- errorOutput.add(strLine);
- } else if (output != null) {
- output.add(strLine);
- }
- }
- // else {
- // if (RESULT_END_KEY.equals(strLine)) {
- // nothing to do
- // }
- }
- }
- }
- }
- }
-
- // Set the scenario to consider in executeCommand()
- public synchronized void setScenario(String scenario) {
- fScenario = scenario;
- fSessionNameMap.clear();
- if (!fScenarioMap.containsKey(fScenario)) {
- throw new IllegalArgumentException();
- }
- }
-
- @Override
- public synchronized ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
- Map<String, ICommandResult> commands = fScenarioMap.get(fScenario);
- String fullCommand = command;
-
- Matcher matcher = LTTNG_LIST_SESSION_PATTERN.matcher(command);
- if (matcher.matches() && !command.matches(LTTNG_LIST_PROVIDER_PATTERN)) {
- String sessionName = matcher.group(1).trim();
- Integer i = fSessionNameMap.get(sessionName);
- if (i != null) {
- i++;
- } else {
- i = 0;
- }
- fSessionNameMap.put(sessionName, i);
- fullCommand += String.valueOf(i);
- }
-
- if (commands.containsKey(fullCommand)) {
- return commands.get(fullCommand);
- }
-
- String[] output = new String[1];
- output[0] = String.valueOf("Command not found");
- CommandResult result = new CommandResult(0, null, null);
- // For verification of setters of class CommandResult
- result.setOutput(output);
- result.setErrorOutput(output);
- result.setResult(1);
- return result;
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
-
- private static boolean isComment(String line) {
- if (line == null) {
- throw new RuntimeException("line is null");
- }
- return line.matches(COMMENT_KEY);
- }
-}
+++ /dev/null
-/**********************************************************************
- * 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.CommandResult;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
-
-/**
- * Command shell stub
- */
-public class TestCommandShell implements ICommandShell {
-
- /** If the shell is connected */
- protected boolean fIsConnected = false;
-
- @Override
- public void connect() throws ExecutionException {
- fIsConnected = true;
- }
-
- @Override
- public void disconnect() {
- fIsConnected = false;
- }
-
- @Override
- public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
- return executeCommand(command, monitor, true);
- }
-
- @Override
- public ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
- if (fIsConnected) {
-
- }
- return new CommandResult(0, new String[0], new String[0]);
- }
-}
+++ /dev/null
-####################################################################
-# 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:
-# Bernd Hufmann - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Initialize
-####################################################################
-<SCENARIO>
-Initialize
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Currently no available tracing session
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> with LTTng 2.1 options
-####################################################################
-##################################################################
-<SCENARIO>
-CreateSessionFileProto
-<COMMAND_INPUT>
-lttng create mysession -U file:///tmp
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in file:///tmp
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: file:///tmp
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-##################################################################
-<SCENARIO>
-CreateSessionControlData
-<COMMAND_INPUT>
-lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Control URL tcp://172.0.0.1 set for session mysession
-Data URL tcp://172.0.0.1:5343 set for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: tcp://172.0.0.1:5342 [data: 5343]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-##################################################################
-<SCENARIO>
-CreateSessionNetwork
-<COMMAND_INPUT>
-lttng create mysession -U net://172.0.0.1:1234:2345
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in net://172.0.0.1:1234:2345
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: net://172.0.0.1:1234 [data: 2345]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession2 destroyed.
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-##################################################################
-<SCENARIO>
-CreateSessionNetwork2
-<COMMAND_INPUT>
-lttng create mysession -U net6://[ffff::eeee:dddd:cccc:0]
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in net6://[ffff::eeee:dddd:cccc:0]
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: net://[ffff::eeee:dddd:cccc:0]:5342/mysession-20130221-144451 [data: 5343]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession2 destroyed.
-</COMMAND_OUTPUT>
-
-</SCENARIO>
\ No newline at end of file
+++ /dev/null
-####################################################################
-# Copyright (c) 2013 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:
-# Bernd Hufmann - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Initialize
-####################################################################
-<SCENARIO>
-Initialize
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.3.0 - Dominus Vobiscum
-
-A very succulent line-up of beers brewed at Microbrasserie Charlevoix. Elaborated starting from special malts and fermented with a Belgian yeast. These beers are refermented in bottle and will make you discover the richness of wheat, amber and triple styles.
-
-Web site: http://lttng.org
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Currently no available tracing session
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot" LTTng 2.3
-####################################################################
-<SCENARIO>
-ScenCreateSession
-<COMMAND_INPUT>
-lttng create mysession --snapshot
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
-Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive snapshot]
- Trace path:
-
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot list-output -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Snapshot output list for session mysession
- [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng start mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing started for session mysession.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- Snapshot recorded successfully for session mysession
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng stop mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing stopped for session mysession.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
+++ /dev/null
-####################################################################
-# Copyright (c) 2014 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:
-# Jonathan Rajotte - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Initialize
-####################################################################
-<SCENARIO>
-Initialize
-<COMMAND_INPUT>
-lttng --mi xml version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>version</name>
- <output>
- <version>
- <string>2.6.0</string>
- <major>2</major>
- <minor>6</minor>
- <commit></commit>
- <patchLevel>0</patchLevel>
- <name>TestMI</name>
- <description>Lorem ipsum</description>
- <url>http://lttng.org</url>
- <license>lttng is free software and under the GPL license and part LGPL</license>
- </version>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions/>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <domains>
- <domain>
- <type>KERNEL</type>
- <buffer_type>PER_PID</buffer_type>
- <events>
- <event>
- <name>sched_kthread_stop</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- <event>
- <name>sched_kthread_stop_ret</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- <event>
- <name>sched_wakeup_new</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- </events>
- </domain>
- </domains>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <domains>
- <domain>
- <type>UST</type>
- <buffer_type>PER_PID</buffer_type>
- <pids>
- <pid>
- <id>9379</id>
- <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_MODULE</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields/>
- </event>
- <event>
- <name>ust_tests_hello:tptest</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_INFO</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields>
- <event_field>
- <name>doublefield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>floatfield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>stringfield</name>
- <type>STRING</type>
- <nowrite>0</nowrite>
- </event_field>
- </event_fields>
- </event>
- </events>
- </pid>
- <pid>
- <id>4852</id>
- <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_WARNING</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields/>
- </event>
- <event>
- <name>ust_tests_hello:tptest</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields>
- <event_field>
- <name>doublefield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>floatfield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>stringfield</name>
- <type>STRING</type>
- <nowrite>0</nowrite>
- </event_field>
- </event_fields>
- </event>
- </events>
- </pid>
- </pids>
- </domain>
- </domains>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> with LTTng 2.1 options
-####################################################################
-##################################################################
-<SCENARIO>
-CreateSessionFileProto
-<COMMAND_INPUT>
-lttng --mi xml create mysession -U file:///tmp
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>/tmp</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/tmp</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- <domains/>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/tmp</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-##################################################################
-<SCENARIO>
-CreateSessionControlData
-<COMMAND_INPUT>
-lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- <domains/>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-##################################################################
-<SCENARIO>
-CreateSessionNetwork
-<COMMAND_INPUT>
-lttng --mi xml create mysession -U net://172.0.0.1:1234:2345
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- <domains/>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-##################################################################
-<SCENARIO>
-CreateSessionNetwork2
-<COMMAND_INPUT>
-lttng --mi xml create mysession -U net6://[ffff::eeee:dddd:cccc:0]
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- <domains/>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-</SCENARIO>
\ No newline at end of file
+++ /dev/null
-####################################################################
-# Copyright (c) 2012, 2014 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:
-# Bernd Hufmann - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Initialize
-####################################################################
-<SCENARIO>
-Initialize
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Currently no available tracing session
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Create and destroy session
-####################################################################
-<SCENARIO>
-SessionHandling
-<SCENARIO>
-<COMMAND_INPUT>
-lttng create mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in /home/user/lttng-traces/mysession-20120314-132824
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng start mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing started for session mysession.
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng stop mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing stopped for session mysession.
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Create and destroy session
-####################################################################
-<SCENARIO>
-SessionHandlingWithPath
-<SCENARIO>
-<COMMAND_INPUT>
-lttng create mysession -o /home/user/temp
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in /home/user/temp
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/temp
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Enable events from kernel provider events
-####################################################################
-<SCENARIO>
-Scenario1
-
-
-<COMMAND_INPUT>
-lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event sched_kthread_stop created in channel channel0
-kernel sched_kthread_stop_ret created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng disable-event sched_kthread_stop_ret,sched_kthread_stop -k -s mysession -c channel0
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event sched_kthread_stop_ret disabled in channel channel0
-kernel event sched_kthread_stop disabled in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event sched_kthread_stop -k -s mysession -c channel0 --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event sched_kthread_stop enabled in channel channel0
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Enable events from UST provider events
-####################################################################
-<SCENARIO>
-Scenario2
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel -u -s mysession --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/temp
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 16384
- number of subbufers: 2
- switch timer interval: 200
- read timer interval: 100
- output: mmap()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event ust_tests_hello:tptest_sighandler,ust_tests_hello:tptest -u -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust_tests_hello:tptest_sighandler in channel channel0
-UST sched_ust_tests_hello:tptest created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/temp
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 16384
- number of subbufers: 2
- switch timer interval: 200
- read timer interval: 100
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng disable-event ust_tests_hello:tptest -u -s mysession -c mychannel
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event ust_tests_hello:tptest in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event ust_tests_hello:tptest -u -s mysession -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event ust_tests_hello:tptest enabled in channel mychannel
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-<SCENARIO>
-Scenario3
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel -k -s mysession --overwrite --subbuf-size 16384 --num-subbuf 4 --switch-timer 100 --read-timer 200
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel2 -k -s mysession --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel2 enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-
-<COMMAND_INPUT>
-lttng disable-channel mychannel,mychannel2 -k -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel disabled for session mysession
-Kernel channel mychannel2 disabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel,mychannel2 -k -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel enabled for session mysession
-Kernel channel mychannel2 enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event sched_kthread_stop created in channel channel0
-kernel sched_kthread_stop_ret created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event sched_wakeup_new -k -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event sched_wakeup_new created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession -c mychannel2 --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel event sched_kthread_stop created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession -c mychannel --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel system calls are enabled in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel system calls are enabled in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel system calls are enabled in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent1 -k -s mysession --probe 0xc0101280
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent1 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent2 -k -s mysession -c channel0 --probe init_post
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent2 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent3 -k -s mysession --probe init_post:0x1000
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent2 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent4 -k -s mysession --function create_dev
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent4 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent5 -k -s mysession --function create_dev:0x2000
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent5 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent5 (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent -k -s mysession -c mychannel --function create_dev:0x2000
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent created in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- myevent (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent5 (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Available tracing sessions:
- 1) mysession (/home/eedbhu/lttng-traces/mysession-20120321-115617) [inactive]
-
-Use lttng list <session_name> for more details
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- myevent (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent5 (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE
-
-If no channel and no event is given (-c/-e), the context
-will be added to all events and all channels.
-Otherwise the context will be added only to the channel (-c)
-and/or event (-e) indicated.
-Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -e, --event NAME Apply to event
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
- perf:stalled-cycles-frontend,
- perf:idle-cycles-frontend,
- perf:stalled-cycles-backend,
- perf:idle-cycles-backend, perf:instructions,
- perf:cache-references, perf:cache-misses,
- perf:branch-instructions, perf:branches,
- perf:branch-misses, perf:bus-cycles,
- perf:L1-dcache-loads, perf:L1-dcache-load-misses,
- perf:L1-dcache-stores,
- perf:L1-dcache-store-misses,
- perf:L1-dcache-prefetches,
- perf:L1-dcache-prefetch-misses,
- perf:L1-icache-loads, perf:L1-icache-load-misses,
- perf:L1-icache-stores,
- perf:L1-icache-store-misses,
- perf:L1-icache-prefetches,
- perf:L1-icache-prefetch-misses, perf:LLC-loads,
- perf:LLC-load-misses, perf:LLC-stores,
- perf:LLC-store-misses, perf:LLC-prefetches,
- perf:LLC-prefetch-misses, perf:dTLB-loads,
- perf:dTLB-load-misses, perf:dTLB-stores,
- perf:dTLB-store-misses, perf:dTLB-prefetches,
- perf:dTLB-prefetch-misses, perf:iTLB-loads,
- perf:iTLB-load-misses, perf:branch-loads,
- perf:branch-load-misses, perf:cpu-clock,
- perf:task-clock, perf:page-fault, perf:faults,
- perf:major-faults, perf:minor-faults,
- perf:context-switches, perf:cs,
- perf:cpu-migrations, perf:migrations,
- perf:alignment-faults, perf:emulation-faults
-Example:
-This command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events
-in the trace data output:
-# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -s mysession -k -t prio -t perf:branch-misses -t perf:cache-misses
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel context perf:cache-misses added to all channels
-kernel context perf:branch-misses added to all channels
-kernel context prio added to all channels
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- myevent (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent5 (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE
-
-If no channel and no event is given (-c/-e), the context
-will be added to all events and all channels.
-Otherwise the context will be added only to the channel (-c)
-and/or event (-e) indicated.
-Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -e, --event NAME Apply to event
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
- perf:stalled-cycles-frontend,
- perf:idle-cycles-frontend,
- perf:stalled-cycles-backend,
- perf:idle-cycles-backend, perf:instructions,
- perf:cache-references, perf:cache-misses,
- perf:branch-instructions, perf:branches,
- perf:branch-misses, perf:bus-cycles,
- perf:L1-dcache-loads, perf:L1-dcache-load-misses,
- perf:L1-dcache-stores,
- perf:L1-dcache-store-misses,
- perf:L1-dcache-prefetches,
- perf:L1-dcache-prefetch-misses,
- perf:L1-icache-loads, perf:L1-icache-load-misses,
- perf:L1-icache-stores,
- perf:L1-icache-store-misses,
- perf:L1-icache-prefetches,
- perf:L1-icache-prefetch-misses, perf:LLC-loads,
- perf:LLC-load-misses, perf:LLC-stores,
- perf:LLC-store-misses, perf:LLC-prefetches,
- perf:LLC-prefetch-misses, perf:dTLB-loads,
- perf:dTLB-load-misses, perf:dTLB-stores,
- perf:dTLB-store-misses, perf:dTLB-prefetches,
- perf:dTLB-prefetch-misses, perf:iTLB-loads,
- perf:iTLB-load-misses, perf:branch-loads,
- perf:branch-load-misses, perf:cpu-clock,
- perf:task-clock, perf:page-fault, perf:faults,
- perf:major-faults, perf:minor-faults,
- perf:context-switches, perf:cs,
- perf:cpu-migrations, perf:migrations,
- perf:alignment-faults, perf:emulation-faults
-Example:
-This command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events
-in the trace data output:
-# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -s mysession -c mychannel -k -t prio -t perf:branch-misses -t perf:cache-misses
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel context perf:cache-misses added to channel mychannel
-kernel context perf:branch-misses added to channel mychannel
-kernel context prio added to channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- myevent (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent5 (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE
-
-If no channel and no event is given (-c/-e), the context
-will be added to all events and all channels.
-Otherwise the context will be added only to the channel (-c)
-and/or event (-e) indicated.
-Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -e, --event NAME Apply to event
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
- perf:stalled-cycles-frontend,
- perf:idle-cycles-frontend,
- perf:stalled-cycles-backend,
- perf:idle-cycles-backend, perf:instructions,
- perf:cache-references, perf:cache-misses,
- perf:branch-instructions, perf:branches,
- perf:branch-misses, perf:bus-cycles,
- perf:L1-dcache-loads, perf:L1-dcache-load-misses,
- perf:L1-dcache-stores,
- perf:L1-dcache-store-misses,
- perf:L1-dcache-prefetches,
- perf:L1-dcache-prefetch-misses,
- perf:L1-icache-loads, perf:L1-icache-load-misses,
- perf:L1-icache-stores,
- perf:L1-icache-store-misses,
- perf:L1-icache-prefetches,
- perf:L1-icache-prefetch-misses, perf:LLC-loads,
- perf:LLC-load-misses, perf:LLC-stores,
- perf:LLC-store-misses, perf:LLC-prefetches,
- perf:LLC-prefetch-misses, perf:dTLB-loads,
- perf:dTLB-load-misses, perf:dTLB-stores,
- perf:dTLB-store-misses, perf:dTLB-prefetches,
- perf:dTLB-prefetch-misses, perf:iTLB-loads,
- perf:iTLB-load-misses, perf:branch-loads,
- perf:branch-load-misses, perf:cpu-clock,
- perf:task-clock, perf:page-fault, perf:faults,
- perf:major-faults, perf:minor-faults,
- perf:context-switches, perf:cs,
- perf:cpu-migrations, perf:migrations,
- perf:alignment-faults, perf:emulation-faults
-Example:
-This command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events
-in the trace data output:
-# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -s mysession -c channel0 -e sched_kthread_stop_ret -k -t prio -t perf:branch-misses -t perf:cache-misses
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel context perf:cache-misses added to event sched_kthread_stop_ret channel mychannel
-kernel context perf:branch-misses added to event sched_kthread_stop_ret channel mychannel
-kernel context prio added to channel event sched_kthread_stop_ret mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- myevent (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- syscalls (type: syscall) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: splice()
-
- Events:
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent5 (type: probe) [enabled]
- offset: 0x2000
- symbol: create_dev
- myevent4 (type: function) [enabled]
- offset: 0x0
- symbol: create_dev
- myevent3 (type: probe) [enabled]
- offset: 0x1000
- symbol: init_post
- myevent2 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- myevent1 (type: probe) [enabled]
- addr: 0xc0101280
- syscalls (type: syscall) [enabled]
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng calibrate -k --function
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel calibration done
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-<SCENARIO>
-Scenario4
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel -u -s mysession --overwrite --subbuf-size 16384 --num-subbuf 4 --switch-timer 100 --read-timer 200
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel2 -u -s mysession --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel2 enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust_tests_hello:tptest_sighandler created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event ust_tests_hello:tptest -u -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust_tests_hello:tptest created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -u -s mysession -c mychannel2 --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All UST events created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- None
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event "ust*" -u -s mysession -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust* created in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- ust* (type: tracepoint) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event "ust*" -u -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust* created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- ust* (type: tracepoint) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust* (type: tracepoint) [enabled]
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event "u*" -u -s mysession --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event u* created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- ust* (type: tracepoint) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- u* (type: tracepoint) [enabled]
- ust* (type: tracepoint) [enabled]
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-
-<COMMAND_INPUT>
-lttng enable-event myevent1 -u -s mysession --loglevel TRACE_WARNING
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event myevent1 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- ust* (type: tracepoint) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent1 (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [enabled]
- u* (type: tracepoint) [enabled]
- ust* (type: tracepoint) [enabled]
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent2 -u -s mysession --loglevel-only TRACE_DEBUG_FUNCTION
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event myevent2 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- ust* (type: tracepoint) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent2 (loglevel == TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
- myevent1 (loglevel <= TRACE_WARNING (4)) (type: loglevel) [enabled]
- u* (type: tracepoint) [enabled]
- ust* (type: tracepoint) [enabled]
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent0 -u -s mysession -c mychannel --loglevel-only TRACE_DEBUG_FUNCTION
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event myevent0 created in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20120314-132824
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 16384
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- myevent0 (loglevel <= TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
- ust* (type: tracepoint) [enabled]
-
-- mychannel2: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 32768
- number of subbufers: 2
- switch timer interval: 100
- read timer interval: 200
- output: mmap()
-
- Events:
- * (type: tracepoint) [enabled]
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- myevent2 (loglevel <= TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
- myevent1 (loglevel == TRACE_WARNING (4)) (type: loglevel) [enabled]
- u* (type: tracepoint) [enabled]
- ust* (type: tracepoint) [enabled]
- ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
- ust_tests_hello:tptest (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-
-
-</SCENARIO>
-
-
-
+++ /dev/null
-####################################################################
-# Copyright (c) 2013 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:
-# Bernd Hufmann - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Initialize
-####################################################################
-<SCENARIO>
-Initialize
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.2.0 - Cuda
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Currently no available tracing session
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Session and channel with per-UID UST buffers
-####################################################################
-<SCENARIO>
-ScenPerUidTest
-<COMMAND_INPUT>
-lttng create mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in /home/user/lttng-traces/mysession-20130812-113358
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20130812-113358
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session my destroyed.
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel -u -s mysession --buffers-uid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20130812-113358
-
-=== Domain: UST global ===
-
-Buffer type: per UID
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 8388608
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 0
- output: mmap()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Session and channel with per-PID UST buffers
-####################################################################
-<SCENARIO>
-ScenPerPidTest
-<COMMAND_INPUT>
-lttng create mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in /home/user/lttng-traces/mysession-20130812-113358
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20130812-113358
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel -u -s mysession --buffers-pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20130812-113358
-
-=== Domain: UST global ===
-
-Buffer type: per PID
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 8388608
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 0
- output: mmap()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Session and channel with per-PID UST buffers with option -C -W
-####################################################################
-<SCENARIO>
-ScenBufSizeTest
-<COMMAND_INPUT>
-lttng create mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in /home/user/lttng-traces/mysession-20130812-113358
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20130812-113358
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel -u -s mysession -C 1024 -W 10
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Warning: Tracefile size rounded up from (1024) to subbuffer size (8388608)
-</COMMAND_ERROR_OUTPUT>
-UST channel mychannel enabled for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [inactive]
- Trace path: /home/user/lttng-traces/mysession-20130812-113358
-
-=== Domain: UST global ===
-
-Buffer type: per PID
-
-Channels:
--------------
-- mychannel: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 8388608
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 0
- output: mmap()
-
- Events:
- None
-
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-
-
+++ /dev/null
-####################################################################
-# Copyright (c) 2014 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:
-# Jonathan Rajotte - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Test lttng not installed
-####################################################################
-<SCENARIO>
-LttngNotInstalled
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Command not found
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng version
-####################################################################
-<SCENARIO>
-LttngVersion
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.1.0 - Basse Messe
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng version
-# output with prompt
-####################################################################
-<SCENARIO>
-LttngVersionWithPrompt
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Prompt> lttng version 2.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng version (unsupported version)
-####################################################################
-<SCENARIO>
-LttngUnsupportedVersion
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 200.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test lttng version (noversion)
-####################################################################
-<SCENARIO>
-LttngNoVersion
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test no sessions available
-####################################################################
-<SCENARIO>
-NoSessionAvailable
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command><name>list</name><output><sessions/></output></command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test get sessions
-####################################################################
-<SCENARIO>
-GetSessionNames1
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession1</name>
- <path>home/user/lttng-traces/mysession1-20120123-083928</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- <session>
- <name>mysession</name>
- <path>home/user/lttng-traces/mysession-20120123-083318</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng list <name> where session doesn't exist
-####################################################################
-<SCENARIO>
-GetSessionNameNotExist
-<COMMAND_INPUT>
-lttng --mi xml list test
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command><name>list</name><output><sessions/></output></command>
-<COMMAND_ERROR_OUTPUT>
-Error: Session 'test' not found
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng -vvv list <name> where session doesn't exist
-####################################################################
-<SCENARIO>
-GetSessionNameNotExistVerbose
-<COMMAND_INPUT>
-lttng --mi xml -vvv list test
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command><name>list</name><output><sessions/></output></command>
-<COMMAND_ERROR_OUTPUT>
-Error: Session 'test' not found
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng list with garbage output
-####################################################################
-<SCENARIO>
-GetSessionGarbageOut
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-asdfaereafsdcv 12333456434&*89**(())(^%$*
-@#$%^&*()@#$%^&*()0834523094578kj;djkfs
-a;sdf094v5u dsafj;sd9
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng list <name> with sample outputs
-####################################################################
-<SCENARIO>
-GetSession1
-<COMMAND_INPUT>
-lttng --mi xml list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/home/user/lttng-traces/mysession-20120129-084256</path>
- <enabled>true</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- <domains>
- <domain>
- <type>KERNEL</type>
- <buffer_type>PER_PID</buffer_type>
- <channels>
- <channel>
- <name>channel0</name>
- <enabled>true</enabled>
- <attributes>
- <overwrite_mode>DISCARD</overwrite_mode>
- <subbuffer_size>262144</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>0</switch_timer_interval>
- <read_timer_interval>200</read_timer_interval>
- <output_type>SPLICE</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>0</live_timer_interval>
- </attributes>
- <events>
- <event>
- <name>block_rq_remap</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- <event>
- <name>block_bio_remap</name>
- <type>TRACEPOINT</type>
- <enabled>false</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- </events>
- </channel>
- <channel>
- <name>channel1</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>524288</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>100</switch_timer_interval>
- <read_timer_interval>400</read_timer_interval>
- <output_type>SPLICE</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <events/>
- </channel>
- </channels>
- </domain>
- <domain>
- <type>UST</type>
- <buffer_type>PER_UID</buffer_type>
- <channels>
- <channel>
- <name>mychannel1</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>8192</subbuffer_size>
- <subbuffer_count>8</subbuffer_count>
- <switch_timer_interval>200</switch_timer_interval>
- <read_timer_interval>100</read_timer_interval>
- <output_type>MMAP</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>0</live_timer_interval>
- </attributes>
- <events/>
- </channel>
- <channel>
- <name>channel0</name>
- <enabled>true</enabled>
- <attributes>
- <overwrite_mode>DISCARD</overwrite_mode>
- <subbuffer_size>4096</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>0</switch_timer_interval>
- <read_timer_interval>200</read_timer_interval>
- <output_type>MMAP</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>0</live_timer_interval>
- </attributes>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>false</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_LINE</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- <event>
- <name>*</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <exclusion>false</exclusion>
- </event>
- </events>
- </channel>
- </channels>
- </domain>
- </domains>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-<COMMAND_INPUT>
-lttng --mi xml list mysession1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession1</name>
- <path>/home/user/lttng-traces/mysession1-20120203-133225</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- <domains/>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng list -k" with sample output
-####################################################################
-<SCENARIO>
-GetKernelProvider1
-<COMMAND_INPUT>
-lttng --mi xml list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <domains>
- <domain>
- <type>KERNEL</type>
- <buffer_type>PER_PID</buffer_type>
- <events>
- <event>
- <name>sched_kthread_stop</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- <event>
- <name>sched_kthread_stop_ret</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- <event>
- <name>sched_wakeup_new</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- </event>
- </events>
- </domain>
- </domains>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -k" with no kernel and no session daemon
-####################################################################
-<SCENARIO>
-ListWithNoKernel1
-<COMMAND_INPUT>
-lttng --mi xml list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Spawning session daemon
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -k" with no kernel and with session daemon
-####################################################################
-<SCENARIO>
-ListWithNoKernel2
-<COMMAND_INPUT>
-lttng --mi xml list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with sample output
-####################################################################
-<SCENARIO>
-GetUstProvider1
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <domains>
- <domain>
- <type>UST</type>
- <buffer_type>PER_PID</buffer_type>
- <pids>
- <pid>
- <id>9379</id>
- <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_MODULE</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields/>
- </event>
- <event>
- <name>ust_tests_hello:tptest</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_INFO</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields>
- <event_field>
- <name>doublefield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>floatfield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>stringfield</name>
- <type>STRING</type>
- <nowrite>0</nowrite>
- </event_field>
- </event_fields>
- </event>
- </events>
- </pid>
- <pid>
- <id>4852</id>
- <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_WARNING</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields/>
- </event>
- <event>
- <name>ust_tests_hello:tptest</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields>
- <event_field>
- <name>doublefield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>floatfield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>stringfield</name>
- <type>STRING</type>
- <nowrite>0</nowrite>
- </event_field>
- </event_fields>
- </event>
- </events>
- </pid>
- </pids>
- </domain>
- </domains>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no UST provider available
-####################################################################
-<SCENARIO>
-GetUstProvider2
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <domains>
- <domain>
- <type>UST</type>
- <buffer_type>PER_PID</buffer_type>
- <pids/>
- </domain>
- </domains>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
-####################################################################
-<SCENARIO>
-ListWithNoUst1
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command><name>list</name><output/></command>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-####################################################################
-# Scenario: Test "lttng list -u" with no UST available and no session daemon
-####################################################################
-<SCENARIO>
-ListWithNoUst2
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command><name>list</name><output/></command>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-####################################################################
-# Scenario: Test "lttng list -" with no kernel and with session daemon
-####################################################################
-<SCENARIO>
-ListWithNoUst3
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command><name>list</name><output/></command>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events: Tracing the kernel requires a root lttng-sessiond daemon, as well as "tracing" group membership or root user ID for the lttng client.
-Error: Command Error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u -f" with sample output (version 2.6.0)
-####################################################################
-<SCENARIO>
-GetUstProvider3
-<COMMAND_INPUT>
-lttng --mi xml list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <domains>
- <domain>
- <type>UST</type>
- <buffer_type>PER_PID</buffer_type>
- <pids>
- <pid>
- <id>9379</id>
- <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_MODULE</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields/>
- </event>
- <event>
- <name>ust_tests_hello:tptest</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_INFO</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields>
- <event_field>
- <name>doublefield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>floatfield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>stringfield</name>
- <type>STRING</type>
- <nowrite>0</nowrite>
- </event_field>
- </event_fields>
- </event>
- </events>
- </pid>
- <pid>
- <id>4852</id>
- <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_WARNING</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields/>
- </event>
- <event>
- <name>ust_tests_hello:tptest</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <event_fields>
- <event_field>
- <name>doublefield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>floatfield</name>
- <type>FLOAT</type>
- <nowrite>0</nowrite>
- </event_field>
- <event_field>
- <name>stringfield</name>
- <type>STRING</type>
- <nowrite>0</nowrite>
- </event_field>
- </event_fields>
- </event>
- </events>
- </pid>
- </pids>
- </domain>
- </domains>
- </output>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-####################################################################
-# Scenario: Test "lttng create <session>
-####################################################################
-<SCENARIO>
-CreateSession1
-<COMMAND_INPUT>
-lttng --mi xml create mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession2</name>
- <path>/home/user/lttng-traces/mysession2-20120209-095418</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session>
-####################################################################
-<SCENARIO>
-CreateSessionWithPrompt
-<COMMAND_INPUT>
-lttng --mi xml create mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Prompt> Session mysession2 created.
-Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> with different variants
-# and errors
-####################################################################
-<SCENARIO>
-CreateSessionVariants
-<COMMAND_INPUT>
-lttng --mi xml create alreadyExist
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output/>
- <success>false</success>
-</command>
-<COMMAND_ERROR_OUTPUT>
-Warning: Session mysession2 already exists
-Error: Session name already exists
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create "session with spaces"
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>session with spaces</name>
- <path>/home/user/lttng-traces/session with spaces-20120209-095418</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create wrongName
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>auto</name>
- <path>/home/user/lttng-traces/auto-20120209-095418</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create wrongPath -o /home/user/hallo
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>wrongPath</name>
- <path>/home/user/lttng-traces/wrongPath-20120209-095418</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create pathWithSpaces -o "/home/user/hallo user/here"
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>pathWithSpaces</name>
- <path>/home/user/hallo user/here/pathWithSpaces-20120209-095418</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng destroy <session>
-####################################################################
-
-<SCENARIO>
-DestroySession1
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession2</name>
- <path>/home/user/lttng-traces/mysession2-20140812-160632</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng enable-channel ..." with different inputs
-####################################################################
-
-<SCENARIO>
-ChannelHandling
-<COMMAND_INPUT>
-lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel0 enabled for session mysession2
-Kernel channel mychannel1 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-channel</name>
- <output>
- <channels>
- <channel>
- <name>mychannel0</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>16384</subbuffer_size>
- <subbuffer_count>2</subbuffer_count>
- <switch_timer_interval>200</switch_timer_interval>
- <read_timer_interval>100</read_timer_interval>
- <output_type>SPLICE</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- <channel>
- <name>mychannel1</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>16384</subbuffer_size>
- <subbuffer_count>2</subbuffer_count>
- <switch_timer_interval>200</switch_timer_interval>
- <read_timer_interval>100</read_timer_interval>
- <output_type>SPLICE</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel channel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-channel</name>
- <output>
- <channels>
- <channel>
- <name>ustChannel</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>32768</subbuffer_size>
- <subbuffer_count>2</subbuffer_count>
- <switch_timer_interval>100</switch_timer_interval>
- <read_timer_interval>200</read_timer_interval>
- <output_type>MMAP</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel channel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-channel</name>
- <output>
- <channels>
- <channel>
- <name>ustChannel</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>4096</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>0</switch_timer_interval>
- <read_timer_interval>0</read_timer_interval>
- <output_type>MMAP</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200 --buffers-uid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-channel</name>
- <output>
- <channels>
- <channel>
- <name>ustChannel</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>OVERWRITE</overwrite_mode>
- <subbuffer_size>32768</subbuffer_size>
- <subbuffer_count>2</subbuffer_count>
- <switch_timer_interval>100</switch_timer_interval>
- <read_timer_interval>200</read_timer_interval>
- <output_type>MMAP</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-channel</name>
- <output>
- <channels>
- <channel>
- <name>mychannel0</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>DISCARD</overwrite_mode>
- <subbuffer_size>262144</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>0</switch_timer_interval>
- <read_timer_interval>200000</read_timer_interval>
- <output_type>SPLICE</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- <channel>
- <name>mychannel1</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>DISCARD</overwrite_mode>
- <subbuffer_size>262144</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>0</switch_timer_interval>
- <read_timer_interval>200000</read_timer_interval>
- <output_type>SPLICE</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-channel ustChannel -u -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-channel</name>
- <output>
- <channels>
- <channel>
- <name>ustChannel</name>
- <enabled>false</enabled>
- <attributes>
- <overwrite_mode>DISCARD</overwrite_mode>
- <subbuffer_size>131072</subbuffer_size>
- <subbuffer_count>4</subbuffer_count>
- <switch_timer_interval>0</switch_timer_interval>
- <read_timer_interval>0</read_timer_interval>
- <output_type>MMAP</output_type>
- <tracefile_size>0</tracefile_size>
- <tracefile_count>0</tracefile_count>
- <live_timer_interval>4294967295</live_timer_interval>
- </attributes>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml disable-channel mychannel0,mychannel1 -k -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>disable-channel</name>
- <output>
- <channels>
- <channel>
- <name>mychannel0</name>
- <enabled>false</enabled>
- <success>true</success>
- </channel>
- <channel>
- <name>mychannel1</name>
- <enabled>false</enabled>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml disable-channel ustChannel -u -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>disable-channel</name>
- <output>
- <channels>
- <channel>
- <name>ustChannel</name>
- <enabled>false</enabled>
- <success>true</success>
- </channel>
- </channels>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng --mi xml enable-events ..." with different inputs
-####################################################################
-<SCENARIO>
-EventHandling
-
-# Tracepoint test cases
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>block_rq_remap</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- <event>
- <name>block_bio_remap</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- <event>
- <name>softirq_entry</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>*</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_EMERG</loglevel>
- <loglevel_type>ALL</loglevel_type>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10'
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>ust_tests_hello:tptest_sighandler</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>true</filter>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event -a -u -s mysession2 -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>*</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-# Syscall test cases
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event -a -k -s mysession2 --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>*</name>
- <type>SYSCALL</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>*</name>
- <type>SYSCALL</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-# dynamic probe/function probe test cases
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event myevent0 -k -s mysession2 --function 0xc0101340
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>myevent0</name>
- <type>FUNCTION</type>
- <enabled>false</enabled>
- <filter>false</filter>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>myevent1</name>
- <type>PROBE</type>
- <enabled>false</enabled>
- <filter>false</filter>
- <offset>0</offset>
- <symbol_name>init_post</symbol_name>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-
-</COMMAND_OUTPUT>
-
-# log level test cases
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>myevent4</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG</loglevel>
- <loglevel_type>SINGLE</loglevel_type>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>enable-event</name>
- <output>
- <events>
- <event>
- <name>myevent5</name>
- <type>TRACEPOINT</type>
- <enabled>true</enabled>
- <filter>false</filter>
- <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
- <loglevel_type>RANGE</loglevel_type>
- <exclusion>false</exclusion>
- <success>true</success>
- </event>
- </events>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
-####################################################################
-
-<SCENARIO>
-ContextHandling
-
-<COMMAND_INPUT>
-lttng --mi xml add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
-
-If no channel is given (-c), the context is added to
-all channels.
-
-Otherwise the context is added only to the channel (-c).
-
-Exactly one domain (-k or -u) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
-
-Context:
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
-Note that the vpid, vppid and vtid context types represent the virtual process id,
-virtual parent process id and virtual thread id as seen from the current execution context
-as opposed to the pid, ppid and tid which are kernel internal data structures.
-
-Example:
-This command will add the context information 'prio' and two per-cpu
-perf counters (hardware branch misses and cache misses), to all channels
-in the trace data output:
-# lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
-UST context pid added to event sched_kthread_stop_ret channel mychannel
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-<SCENARIO>
-ContextErrorHandling
-
-<COMMAND_INPUT>
-lttng --mi xml add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE
-
-If no channel and no event is given (-c/-e), the context
-will be added to all events and all channels.
-Otherwise the context will be added only to the channel (-c)
-and/or event (-e) indicated.
-Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -e, --event NAME Apply to event
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
-Example:
-This command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events
-in the trace data output:
-# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
-UST context pid added to event sched_kthread_stop_ret channel mychannel
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-<SCENARIO>
-CalibrateHandling
-<COMMAND_INPUT>
-lttng --mi xml calibrate -k --function
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>calibrate</name>
- <output>
- <calibrate>
- <type>FUNCTION</type>
- </calibrate>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml calibrate -u --function
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>calibrate</name>
- <output>
- <calibrate>
- <type>FUNCTION</type>
- </calibrate>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> with LTTng 2.1 options
-####################################################################
-<SCENARIO>
-CreateSessionLttng2.1
-
-<COMMAND_INPUT>
-lttng --mi xml create mysession -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create mysession -U file:///tmp
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>/tmp</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml create mysession -U 172.0.0.1:1234:2345
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/home/user/lttng-traces/mysession-20140818-100114</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng --mi xml -vvv create mysession -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
-DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
-DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
-DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
-Session mysession created.
-Traces will be written in net://172.0.0.1
-DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
-####################################################################
-<SCENARIO>
-CreateSessionSnapshot
-<COMMAND_INPUT>
-lttng --mi xml create mysession --snapshot
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path/>
- <enabled>false</enabled>
- <snapshot_mode>1</snapshot_mode>
- <live_timer_interval>4294967295</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml snapshot list-output -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>snapshot</name>
- <output>
- <snapshot_action>
- <name>list-output</name>
- <output>
- <session>
- <name>mysession</name>
- <snapshots>
- <snapshot>
- <id>1</id>
- <name>snapshot-1</name>
- <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
- <data_url/>
- <max_size>0</max_size>
- </snapshot>
- </snapshots>
- </session>
- </output>
- </snapshot_action>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path/>
- <enabled>false</enabled>
- <snapshot_mode>1</snapshot_mode>
- <live_timer_interval>4294967295</live_timer_interval>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- Snapshot recorded successfully for session mysession
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/home/user/lttng-traces/mysession-20140818-100114</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
-####################################################################
-<SCENARIO>
-CreateSessionStreamedSnapshot
-<COMMAND_INPUT>
-lttng --mi xml create mysession --snapshot -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Default snapshot output set to: net://172.0.0.1
-Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml snapshot list-output -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Snapshot output list for session mysession
- [2] snapshot-2: net4://172.0.0.1:5342/
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- 1) mysession () [inactive snapshot]
-
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- Snapshot recorded successfully for session mysession
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/home/user/lttng-traces/mysession-20140818-100114</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
-####################################################################
-<SCENARIO>
-CreateSessionSnapshotErrors
-<COMMAND_INPUT>
-lttng --mi xml snapshot list-output -s blabla
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>snapshot</name>
- <output>
- <snapshot_action>
- <name>list-output</name>
- <output/>
- </snapshot_action>
- </output>
- <success>false</success>
-</command>
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-#next is not an error case but good to be tested
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path/>
- <enabled>true</enabled>
- <snapshot_mode>1</snapshot_mode>
- <live_timer_interval>4294967295</live_timer_interval>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml snapshot record -s blabla
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
- Error: Session name not found
-</COMMAND_ERROR_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>snapshot</name>
- <output>
- <snapshot_action>
- <name>record</name>
- <output/>
- </snapshot_action>
- </output>
- <success>false</success>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
- Error: Session needs to be started once
-</COMMAND_ERROR_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>snapshot</name>
- <output>
- <snapshot_action>
- <name>record</name>
- <output/>
- </snapshot_action>
- </output>
- <success>false</success>
-</command>
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
-####################################################################
-<SCENARIO>
-CreateSessionLive
-<COMMAND_INPUT>
-lttng --mi xml create mysession --live -U net://127.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>create</name>
- <output>
- <session>
- <name>mysession</name>
- <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>1000000</live_timer_interval>
- </session>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>list</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>1000000</live_timer_interval>
- </session>
- </sessions>
- </output>
-</command>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<?xml version="1.0" encoding="UTF-8"?>
-<command>
- <name>destroy</name>
- <output>
- <sessions>
- <session>
- <name>mysession</name>
- <path>/home/user/lttng-traces/mysession-20140818-100114</path>
- <enabled>false</enabled>
- <snapshot_mode>0</snapshot_mode>
- <live_timer_interval>0</live_timer_interval>
- </session>
- </sessions>
- </output>
- <success>true</success>
-</command>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
-####################################################################
-<SCENARIO>
-CreateSessionLiveErrors
-<COMMAND_INPUT>
-lttng --mi xml create mysession --live --snapshot
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Snapshot and live modes are mutually exclusive.
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml create mysession --live -U blah
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: URI parse unknown protocol blah
-Error: Unable to parse the URL blah
-Error: Invalid parameter
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng --mi xml create mysession --live -C net://127.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: You need both control and data URL.
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
\ No newline at end of file
+++ /dev/null
-####################################################################
-# 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:
-# Bernd Hufmann - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Test lttng not installed
-####################################################################
-<SCENARIO>
-LttngNotInstalled
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Command not found
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng version
-####################################################################
-<SCENARIO>
-LttngVersion
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.1.0 - Basse Messe
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng version
-# output with prompt
-####################################################################
-<SCENARIO>
-LttngVersionWithPrompt
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Prompt> lttng version 2.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng version (unsupported version)
-####################################################################
-<SCENARIO>
-LttngUnsupportedVersion
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 200.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test lttng version (noversion)
-####################################################################
-<SCENARIO>
-LttngNoVersion
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test no sessions available
-####################################################################
-<SCENARIO>
-NoSessionAvailable
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Currently no available tracing session
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test get sessions
-####################################################################
-<SCENARIO>
-GetSessionNames1
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Available tracing sessions:
- 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
- 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
-
- Use lttng list <session_name> for more details
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng list <name> where session doesn't exist
-####################################################################
-<SCENARIO>
-GetSessionNameNotExist
-<COMMAND_INPUT>
-lttng list test
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session test not found
-<COMMAND_ERROR_OUTPUT>
-Error: Session name not found
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng -vvv list <name> where session doesn't exist
-####################################################################
-<SCENARIO>
-GetSessionNameNotExistVerbose
-<COMMAND_INPUT>
-lttng -vvv list test
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG2: Session name: test [in cmd_list() at commands/list.c:618]
-DEBUG1: Session count 1 [in list_sessions() at commands/list.c:485]
-<COMMAND_ERROR_OUTPUT>
-Error: Session 'test' not found
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng list with garbage output
-####################################################################
-<SCENARIO>
-GetSessionGarbageOut
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-asdfaereafsdcv 12333456434&*89**(())(^%$*
-@#$%^&*()@#$%^&*()0834523094578kj;djkfs
-a;sdf094v5u dsafj;sd9
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test lttng list <name> with sample outputs
-####################################################################
-<SCENARIO>
-GetSession1
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [active]
- Trace path: /home/user/lttng-traces/mysession-20120129-084256
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
-
-- channel1: [disabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 524288
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 400
- output: splice()
-
- Events:
- None
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel1: [disabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 8192
- number of subbufers: 8
- switch timer interval: 200
- read timer interval: 100
- output: mmap()
-
- Events:
- None
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 4096
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled]
- * (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-<COMMAND_INPUT>
-lttng list mysession1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession1: [inactive]
- Trace path: /home/user/lttng-traces/mysession1-20120203-133225
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng list -k" with sample output
-####################################################################
-<SCENARIO>
-GetKernelProvider1
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -k" with no kernel and no session daemon
-####################################################################
-<SCENARIO>
-ListWithNoKernel1
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Spawning session daemon
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -k" with no kernel and with session daemon
-####################################################################
-<SCENARIO>
-ListWithNoKernel2
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -k" with no kernel, with session daemon and verbose
-####################################################################
-<SCENARIO>
-ListWithNoKernelVerbose
-<COMMAND_INPUT>
-lttng -vvv list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
-DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events
-</COMMAND_ERROR_OUTPUT>
-DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with sample output
-####################################################################
-<SCENARIO>
-GetUstProvider1
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no UST provider available
-####################################################################
-<SCENARIO>
-GetUstProvider2
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-None
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
-####################################################################
-<SCENARIO>
-ListWithNoUst1
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-None
-Segmentation Fault
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no UST available and no session daemon
-####################################################################
-<SCENARIO>
-ListWithNoUst2
-<COMMAND_INPUT>
-lttng list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Spawning a session daemon
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list UST events: Listing UST events failed
-Error: Command Error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no ust and with session daemon
-####################################################################
-<SCENARIO>
-ListWithNoUst3
-<COMMAND_INPUT>
-lttng list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list UST events: Listing UST events failed
-Error: Command Error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng list -u" with no kernel, with session daemon and verbose
-####################################################################
-<SCENARIO>
-ListWithNoUstVerbose
-<COMMAND_INPUT>
-lttng -vvv list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
-DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
-Spawning a session daemon
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list UST events: Listing UST events failed
-Error: Command Error
-</COMMAND_ERROR_OUTPUT>
-DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng list -u -f" with sample output (version 2.1.0)
-####################################################################
-<SCENARIO>
-GetUstProvider3
-<COMMAND_INPUT>
-lttng list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
- field: doublefield (float)
- field: floatfield (float)
- field: stringfield (string)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
- field: doublefield (float)
- field: floatfield (float)
- field: stringfield (string)
-
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng create <session>
-####################################################################
-<SCENARIO>
-CreateSession1
-<COMMAND_INPUT>
-lttng create mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession2 created.
-Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session>
-####################################################################
-<SCENARIO>
-CreateSessionWithPrompt
-<COMMAND_INPUT>
-lttng create mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Prompt> Session mysession2 created.
-Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> with different variants
-# and errors
-####################################################################
-<SCENARIO>
-CreateSessionVariants
-<COMMAND_INPUT>
-lttng create alreadyExist
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Session name already exist
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create "session with spaces"
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session session with spaces created.
-Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create wrongName
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session auto created.
-Traces will be written in /home/user/lttng-traces/auto-20120209-095418
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create wrongPath -o /home/user/hallo
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session wrongPath created.
-Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create pathWithSpaces -o "/home/user/hallo user/here"
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session pathWithSpaces created.
-Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng destroy <session>
-####################################################################
-
-<SCENARIO>
-DestroySession1
-<COMMAND_INPUT>
-lttng destroy mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession2 destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng -vvv destroy <session>"
-####################################################################
-
-<SCENARIO>
-DestroySessionVerbose
-<COMMAND_INPUT>
-lttng -vvv destroy mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG2: Config file path found: /home/eedbhu [in get_session_name() at utils.c:98]
-DEBUG1: Session name found: mysession2 [in get_session_name() at utils.c:99]
-Session mysession2 destroyed at /home/eedbhu
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng enable-channel ..." with different inputs
-####################################################################
-
-<SCENARIO>
-ChannelHandling
-<COMMAND_INPUT>
-lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel0 enabled for session mysession2
-Kernel channel mychannel1 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel0 enabled for session mysession2
-Kernel channel mychannel1 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel channel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel channel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel channel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel ustChannel enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel channel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-
-<COMMAND_INPUT>
-lttng enable-channel mychannel0,mychannel1 -k -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel0 enabled for session mysession2
-Kernel channel mychannel1 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-channel ustChannel -u -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng disable-channel mychannel0,mychannel1 -k -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel channel mychannel0 disabled for session mysession2
-Kernel channel mychannel1 disabled for session mysession2
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng disable-channel ustChannel -u -s mysession2
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST channel mychannel0 enabled for session mysession2
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng enable-events ..." with different inputs
-####################################################################
-<SCENARIO>
-EventHandling
-
-# Tracepoint test cases
-
-<COMMAND_INPUT>
-lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event block_rq_remap created in channel channel0
-kernel event block_bio_remap created in channel channel0
-kernel event softirq_entry created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel tracepoints are enabled in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust_tests_hello:tptest_sighandler created in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10'
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event ust_tests_hello:tptest_sighandler created in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All UST tracepoints are enabled in channel mychannel
-</COMMAND_OUTPUT>
-
-# Syscall test cases
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession2 --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel system calls are enabled in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event -a -k -s mysession2 -c mychannel --syscall
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-All kernel system calls are enabled in channel mychannel
-</COMMAND_OUTPUT>
-
-# dynamic probe/function probe test cases
-
-<COMMAND_INPUT>
-lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent0 created in channel mychannel
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-kernel event myevent1 created in channel mychannel
-</COMMAND_OUTPUT>
-
-# log level test cases
-
-<COMMAND_INPUT>
-lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event myevent4 created in channel channel0
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST event myevent5 created in channel mychannel
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs
-####################################################################
-
-<SCENARIO>
-ContextHandling
-
-<COMMAND_INPUT>
-lttng add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE
-
-If no channel and no event is given (-c/-e), the context
-will be added to all events and all channels.
-Otherwise the context will be added only to the channel (-c)
-and/or event (-e) indicated.
-Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -e, --event NAME Apply to event
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
-Example:
-This command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events
-in the trace data output:
-# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
-UST context pid added to event sched_kthread_stop_ret channel mychannel
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-<SCENARIO>
-ContextErrorHandling
-
-<COMMAND_INPUT>
-lttng add-context -h
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-usage: lttng add-context -t TYPE
-
-If no channel and no event is given (-c/-e), the context
-will be added to all events and all channels.
-Otherwise the context will be added only to the channel (-c)
-and/or event (-e) indicated.
-Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
-
-Options:
- -h, --help Show this help
- --list-options Simple listing of options
- -s, --session NAME Apply to session name
- -c, --channel NAME Apply to channel
- -e, --event NAME Apply to event
- -k, --kernel Apply to the kernel tracer
- -u, --userspace Apply to the user-space tracer
- -t, --type TYPE Context type. You can repeat that option on
- the command line to specify multiple contexts at once.
- (--kernel preempts --userspace)
- TYPE can be one of the strings below:
- pid, procname, prio, nice, vpid, tid, pthread_id,
- vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
-Example:
-This command will add the context information 'prio' and two perf
-counters (hardware branch misses and cache misses), to all events
-in the trace data output:
-# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
-UST context pid added to event sched_kthread_stop_ret channel mychannel
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-<SCENARIO>
-CalibrateHandling
-<COMMAND_INPUT>
-lttng calibrate -k --function
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel calibration done
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng calibrate -u --function
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel calibration done
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> with LTTng 2.1 options
-####################################################################
-<SCENARIO>
-CreateSessionLttng2.1
-
-<COMMAND_INPUT>
-lttng create mysession -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in net://172.0.0.1
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create mysession -U file:///tmp
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in file:///tmp
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Control URL tcp://172.0.0.1 set for session mysession
-Data URL tcp://172.0.0.1:5343 set for session mysession
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng create mysession -U net://172.0.0.1:1234:2345
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in net://172.0.0.1:1234:2345
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng -vvv create mysession -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
-DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
-DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
-DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
-Session mysession created.
-Traces will be written in net://172.0.0.1
-DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options"
-####################################################################
-<SCENARIO>
-CreateSessionLttngVerbose2.1
-<COMMAND_INPUT>
-lttng -vvv create mysession -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
-DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
-DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
-DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
-Session mysession created.
-Traces will be written in net://172.0.0.1
-DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng -vvv destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
-####################################################################
-<SCENARIO>
-CreateSessionSnapshot
-<COMMAND_INPUT>
-lttng create mysession --snapshot
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
-Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot list-output -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Snapshot output list for session mysession
- [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- 1) mysession () [inactive snapshot]
-
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- Snapshot recorded successfully for session mysession
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
-####################################################################
-<SCENARIO>
-CreateSessionStreamedSnapshot
-<COMMAND_INPUT>
-lttng create mysession --snapshot -U net://172.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Default snapshot output set to: net://172.0.0.1
-Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot list-output -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Snapshot output list for session mysession
- [2] snapshot-2: net4://172.0.0.1:5342/
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- 1) mysession () [inactive snapshot]
-
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- Snapshot recorded successfully for session mysession
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
-####################################################################
-<SCENARIO>
-CreateSessionSnapshotErrors
-<COMMAND_INPUT>
-lttng snapshot list-output -s blabla
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Session name not found
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-#next is not an error case but good to be tested
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- 1) mysession () [active snapshot]
-
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot record -s blabla
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
- Error: Session name not found
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
- Error: Session needs to be started once
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-####################################################################
-# Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
-####################################################################
-<SCENARIO>
-CreateSessionLive
-<COMMAND_INPUT>
-lttng create mysession --live -U net://127.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Traces will be written in net://127.0.0.1
-Live timer set to 1000000 usec
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Available tracing sessions:
- 1) mysession (net4://127.0.0.1:5342/ [data: 5343]) [inactive]
-
-Use lttng list <session_name> for more details
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
-
-####################################################################
-# Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
-####################################################################
-<SCENARIO>
-CreateSessionLiveErrors
-<COMMAND_INPUT>
-lttng create mysession --live --snapshot
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Snapshot and live modes are mutually exclusive.
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng create mysession --live -U blah
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: URI parse unknown protocol blah
-Error: Unable to parse the URL blah
-Error: Invalid parameter
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng create mysession --live -C net://127.0.0.1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: You need both control and data URL.
-Error: Command error
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-</SCENARIO>
-####################################################################
-# Scenario: Test "lttng create <session> --snapshot (LTTng 2.5)
-####################################################################
-<SCENARIO>
-CreateSessionSnapshot2.5
-<COMMAND_INPUT>
-lttng create mysession --snapshot
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession created.
-Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
-Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot list-output -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Snapshot output list for session mysession
- [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651 (max-size: 0)
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- 1) mysession () [inactive snapshot]
-
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng snapshot record -s mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
- Snapshot recorded successfully for session mysession
-</COMMAND_OUTPUT>
-#------------------------------------------------------------------------------
-<COMMAND_INPUT>
-lttng destroy mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Session mysession destroyed.
-</COMMAND_OUTPUT>
-</SCENARIO>
+++ /dev/null
-####################################################################
-# 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:
-# Bernd Hufmann - Initial API and implementation
-####################################################################
-####################################################################
-# Scenario: Test lttng list <name> with sample outputs
-####################################################################
-<SCENARIO>
-ListInfoTest
-
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.1.0 - Basse Messe
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Available tracing sessions:
- 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
- 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
-
- Use lttng list <session_name> for more details
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list mysession
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession: [active]
- Trace path: /home/user/lttng-traces/mysession-20120129-084256
-
-=== Domain: Kernel ===
-
-Channels:
--------------
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 262144
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: splice()
-
- Events:
- block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
- block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
- myevent2 (type: probe) [enabled]
- addr: 0xc0101340
- myevent0 (type: probe) [enabled]
- offset: 0x0
- symbol: init_post
- syscalls (type: syscall) [enabled]
-
-- channel1: [disabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 524288
- number of subbufers: 4
- switch timer interval: 100
- read timer interval: 400
- output: splice()
-
- Events:
- None
-
-=== Domain: UST global ===
-
-Channels:
--------------
-- mychannel1: [disabled]
-
- Attributes:
- overwrite mode: 1
- subbufers size: 8192
- number of subbufers: 8
- switch timer interval: 200
- read timer interval: 100
- output: mmap()
-
- Events:
- None
-
-- channel0: [enabled]
-
- Attributes:
- overwrite mode: 0
- subbufers size: 4096
- number of subbufers: 4
- switch timer interval: 0
- read timer interval: 200
- output: mmap()
-
- Events:
- ust_tests_hello:tptest_sighandler (loglevel == TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled] [with filter]
- ust_tests_hello:tptest_sighandler1 (loglevel <= TRACE_INFO (7)) (type: tracepoint) [disabled] [with filter]
- ust_tests_hello:tptest_sighandler2 (loglevel: TRACE_DEBUG_SYSTEM (8)) (type: tracepoint) [disabled] [with filter]
- * (type: tracepoint) [enabled]
-
-</COMMAND_OUTPUT>
-<COMMAND_INPUT>
-lttng list mysession1
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Tracing session mysession1: [inactive]
- Trace path: /home/user/lttng-traces/mysession1-20120203-133225
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Kernel events
--------------
- sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
- sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u -f
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
- field: doublefield (float)
- field: floatfield (float)
- field: stringfield (string)
-
-PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
- field: doublefield (float)
- field: floatfield (float)
- field: stringfield (string)
-
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
-
-####################################################################
-# Scenario: Test "lttng list -k" with no kernel and no session daemon
-####################################################################
-<SCENARIO>
-ListInfoTestNoKernel
-
-<COMMAND_INPUT>
-lttng version
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-lttng version 2.0.0 - Annedd'ale
-Web site: http://lttng.org/
-
-lttng is free software and under the GPL license and part LGPL
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-Currently no available tracing session
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -k
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-1
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-<COMMAND_ERROR_OUTPUT>
-Error: Unable to list kernel events
-</COMMAND_ERROR_OUTPUT>
-</COMMAND_OUTPUT>
-
-<COMMAND_INPUT>
-lttng list -u
-</COMMAND_INPUT>
-<COMMAND_RESULT>
-0
-</COMMAND_RESULT>
-<COMMAND_OUTPUT>
-UST events:
--------------
-
-PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
- ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
-
-</COMMAND_OUTPUT>
-
-</SCENARIO>
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.control.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.control.ui;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.control.ui.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.core.expressions,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.lttng2.control.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core,
- org.eclipse.tracecompass.ctf.core
-Export-Package: org.eclipse.linuxtools.internal.lttng2.control.ui;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.control.ui.views;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.control.ui.tests,org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.model;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;x-friends:="org.eclipse.linuxtools.lttng2.control.ui.tests"
-Import-Package: com.google.common.collect,
- org.eclipse.rse.core,
- org.eclipse.rse.core.model,
- org.eclipse.rse.core.subsystems,
- org.eclipse.rse.services,
- org.eclipse.rse.services.clientserver.messages,
- org.eclipse.rse.services.files,
- org.eclipse.rse.services.shells,
- org.eclipse.rse.services.terminals,
- org.eclipse.rse.subsystems.files.core.servicesubsystem,
- org.eclipse.rse.subsystems.files.core.subsystems
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- about.html,\
- plugin.properties
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.control.ui
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Control UI Plug-in
-
-views.category.name = LTTng
-control.view.name = Control
-events.view.name = Events
-timeframe.view.name = Time Frame
-controlflow.view.name = Control Flow
-resources.view.name = Resources
-statistics.view.name = Statistics
-histogram.view.name = Histogram
-latency.view.name = Latency View
-
-project.new.category.name = LTTng
-project.new.wizard.name = LTTng Project
-project.new.wizard.description = Create a new LTTng project
-
-project.propertyPage.tracelibPath = LTTng Trace Library Path
-action.set.label = LTTng Action Set
-action.set.description = LTTng Action Set
-
-tracetype.category.lttng= LTTng
-tracetype.type.kernel = Kernel Trace
-
-#Commands and Menus
-commands.trace.category.name = LTTng Trace Commands
-commands.trace.category.description = LTTng Trace Commands
-commands.trace.import = Import Trace
-commands.trace.import.description = Import an LTTng Trace
-commands.trace.open = Open Trace
-commands.trace.open.description = Open an LTTng Trace
-commands.trace.rename = Rename Trace
-commands.trace.rename.description = Rename an LTTng Trace
-commands.trace.delete = Delete Trace
-commands.trace.delete.description = Delete an LTTng Trace
-commands.trace.selectparser = Select Parser
-
-commands.experiment.category.name = LTTng Experiment Commands
-commands.experiment.category.description = LTTng Experiment Commands
-commands.experiment.new = New Experiment
-commands.experiment.new.description = Create a new LTTng Experiment
-commands.experiment.selecttraces = Select Traces
-commands.experiment.selecttraces.description = Select LTTng Traces
-commands.experiment.open = Open Experiment
-commands.experiment.open.description = Open an LTTng Experiment
-commands.experiment.rename = Rename Experiment
-commands.experiment.rename.description = Rename an LTTng Experiment
-commands.experiment.delete = Delete Experiment
-commands.experiment.delete.description = Delete an LTTng Experiment
-
-# LTTng 2.0 trace control commands
-trace.control.rse.system.type.name=LTTng (v2.0)
-trace.control.rse.system.type.description=LTTng Trace Control (v2.0)
-
-commands.control.category=LTTng Trace Control Commands
-commands.control.category.description=LTTng Trace Control Commands
-
-commands.control.new=New Connection...
-commands.control.new.description=New Connection to Target Node
-
-commands.control.connect=Connect
-commands.control.connect.description=Connect to Target Node
-
-commands.control.disconnect=Disconnect
-commands.control.disconnect.description=Disconnect to Target Node
-
-commands.control.refresh=Refresh
-commands.control.refresh.description=Refresh Node Configuration
-
-commands.control.delete=Delete
-commands.control.delete.description=Delete Target Node
-
-commands.control.create.session=Create Session...
-commands.control.create.session.description=Create a Trace Session
-
-commands.control.execute.command.script=Execute Command Script...
-commands.control.execute.command.script.description=Execute Command Script
-
-commands.control.destroy.session=Destroy Session...
-commands.control.destroy.session.description=Destroy a Trace Session
-
-commands.control.enable.channelOnSession=Enable Channel...
-commands.control.enable.channelOnSession.description=Enable a Trace Channel
-
-commands.control.enable.channelOnDomain=Enable Channel...
-commands.control.enable.channelOnDomain.description=Enable a Trace Channel
-
-commands.control.enable.channel=Enable Channel
-commands.control.enable.channel.description=Enable a Trace Channel
-
-commands.control.disable.channel=Disable Channel
-commands.control.disable.channel.description=Disable a Trace Channel
-
-commands.control.start=Start
-commands.control.start.description=Start Trace Session
-
-commands.control.stop=Stop
-commands.control.stop.description=Stop Trace Session
-
-commands.control.assign.event=Enable Event...
-commands.control.assign.event.description=Assign Event to Session and Channel and Enable Event
-
-commands.control.enable.event=Enable Event
-commands.control.enable.event.description=Enable Event
-
-commands.control.enable.eventOnChannel=Enable Event...
-commands.control.enable.eventOnChannel.description=Enable Event
-
-commands.control.enable.eventOnDomain=Enable Event (default channel)...
-commands.control.enable.eventOnDomain.description=Enable Event on Default Channel
-
-commands.control.enable.eventOnSession=Enable Event (default channel)...
-commands.control.enable.eventOnSession.description=Enable Event on Default Channel
-
-commands.control.disable.event=Disable Event
-commands.control.disable.event.description=Disable Event
-
-commands.control.add.context=Add Context...
-commands.control.add.context.description=Add Context to Channel(s) and/or Event(s)
-
-commands.control.import=Import...
-commands.control.import.description=Import Traces to LTTng Project
-
-commands.control.calibrate=Calibrate
-commands.control.calibrate.description=Quantify LTTng overhead
-
-commands.control.snapshot=Record Snapshot
-commands.control.snapshot.description=Record a snapshot
-
-preference.page.control.name=LTTng Tracer Control Preferences
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- id="org.eclipse.linuxtools.lttng2.ui.views"
- point="org.eclipse.ui.views">
- <category
- id="org.eclipse.linuxtools.lttng2.ui.views.category"
- name="%views.category.name">
- </category>
- <view
- allowMultiple="false"
- category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView"
- icon="icons/eview16/control_view.gif"
- id="org.eclipse.linuxtools.internal.lttng2.ui.views.control"
- name="%control.view.name"
- restorable="true">
- </view>
- </extension>
-
- <extension
- point="org.eclipse.ui.commands">
- <category
- description="%commands.control.category.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- name="%commands.control.category">
- </category>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.new.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.newConnection"
- name="%commands.control.new">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.connect.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect"
- name="%commands.control.connect">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.disconnect.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect"
- name="%commands.control.disconnect">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.refresh.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh"
- name="%commands.control.refresh">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.delete.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete"
- name="%commands.control.delete">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.create.session.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession"
- name="%commands.control.create.session">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.execute.command.script.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.executeScript"
- name="%commands.control.execute.command.script">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.destroy.session.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession"
- name="%commands.control.destroy.session">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.import.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
- name="%commands.control.import">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.channelOnSession.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnSession"
- name="%commands.control.enable.channelOnSession">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.channelOnDomain.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnDomain"
- name="%commands.control.enable.channelOnDomain">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.channel.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannel"
- name="%commands.control.enable.channel">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.disable.channel.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableChannel"
- name="%commands.control.disable.channel">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.start.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start"
- name="%commands.control.start">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.stop.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop"
- name="%commands.control.stop">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.assign.event.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.assign.event"
- name="%commands.control.assign.event">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.event.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEvent"
- name="%commands.control.enable.event">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.disable.event.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableEvent"
- name="%commands.control.disable.event">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.eventOnChannel.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnChannel"
- name="%commands.control.enable.eventOnChannel">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.eventOnDomain.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnDomain"
- name="%commands.control.enable.eventOnDomain">
- </command>
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.enable.eventOnSession.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnSession"
- name="%commands.control.enable.eventOnSession">
- </command>
-
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.add.context.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnDomain"
- name="%commands.control.add.context">
- </command>
-
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.add.context.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnChannel"
- name="%commands.control.add.context">
- </command>
-
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.add.context.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnEvent"
- name="%commands.control.add.context">
- </command>
-
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.import.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
- name="%commands.control.import">
- </command>
-
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.calibrate.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.calibrate"
- name="%commands.control.calibrate">
- </command>
-
- <command
- categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
- description="%commands.control.snapshot.description"
- id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot"
- name="%commands.control.snapshot">
- </command>
-
- </extension>
- <extension
- point="org.eclipse.ui.menus">
- <menuContribution
- allPopups="false"
- locationURI="toolbar:org.eclipse.linuxtools.internal.lttng2.ui.views.control">
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.newConnection"
- icon="icons/elcl16/target_add.gif"
- label="%commands.control.new"
- style="push">
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect"
- icon="icons/elcl16/connect.gif"
- label="%commands.control.connect"
- style="push">
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect"
- icon="icons/elcl16/disconnect.gif"
- label="%commands.control.disconnect"
- style="push">
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh"
- icon="icons/elcl16/refresh.gif"
- label="%commands.control.refresh"
- style="push">
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete"
- icon="icons/elcl16/target_delete.gif"
- label="%commands.control.delete"
- style="push">
- </command>
- <separator
- name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator1"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start"
- icon="icons/elcl16/start_trace.gif"
- label="%commands.control.start"
- style="push">
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop"
- icon="icons/elcl16/pause_trace.gif"
- label="%commands.control.stop"
- style="push">
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession"
- icon="icons/elcl16/delete_trace.gif"
- label="%commands.control.destroy.session"
- style="push">
- </command>
- <separator
- name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator2"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot"
- icon="icons/elcl16/snapshot.gif"
- label="%commands.control.snapshot"
- style="push">
- </command>
- <separator
- name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator3"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
- icon="icons/elcl16/import_trace.gif"
- label="%commands.control.import"
- style="push">
- </command>
-
- </menuContribution>
- <menuContribution
- allPopups="false"
- locationURI="popup:org.eclipse.linuxtools.internal.lttng2.ui.views.control">
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect"
- icon="icons/elcl16/connect.gif"
- label="%commands.control.connect"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect"
- icon="icons/elcl16/disconnect.gif"
- label="%commands.control.disconnect"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh"
- icon="icons/elcl16/refresh.gif"
- label="%commands.control.refresh"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete"
- icon="icons/elcl16/target_delete.gif"
- label="%commands.control.delete"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession"
- icon="icons/elcl16/add_button.gif"
- label="%commands.control.create.session"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.executeScript"
- icon="icons/elcl16/add_button.gif"
- label="%commands.control.execute.command.script"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start"
- icon="icons/elcl16/start_trace.gif"
- label="%commands.control.start"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop"
- icon="icons/elcl16/pause_trace.gif"
- label="%commands.control.stop"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession"
- icon="icons/elcl16/delete_trace.gif"
- label="%commands.control.destroy.session"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <separator
- name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.popup.separator1"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
- icon="icons/elcl16/import_trace.gif"
- label="%commands.control.import"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <separator
- name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.popup.separator2"
- visible="true">
- </separator>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnSession"
- icon="icons/elcl16/add_button.gif"
- label="%commands.control.enable.channelOnSession"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- <not>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- </not>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnSession"
- icon="icons/obj16/event_enabled.gif"
- label="%commands.control.enable.eventOnDomain"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnDomain"
- icon="icons/elcl16/add_button.gif"
- label="%commands.control.enable.channelOnDomain"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- <not>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </not>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnDomain"
- icon="icons/elcl16/enable_event.gif"
- label="%commands.control.enable.eventOnDomain"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannel"
- icon="icons/elcl16/enable.gif"
- label="%commands.control.enable.channel"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableChannel"
- icon="icons/elcl16/disable.gif"
- label="%commands.control.disable.channel"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
-
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.assign.event"
- icon="icons/elcl16/enable_event.gif"
- label="%commands.control.assign.event"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
-
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEvent"
- icon="icons/elcl16/enable_event.gif"
- label="%commands.control.enable.event"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
-
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableEvent"
- icon="icons/elcl16/disable_event.gif"
- label="%commands.control.disable.event"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
- </instanceof>
- </iterate>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnChannel"
- icon="icons/elcl16/enable_event.gif"
- label="%commands.control.enable.eventOnChannel"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnDomain"
- icon="icons/elcl16/add-context.gif"
- label="%commands.control.add.context"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnChannel"
- icon="icons/elcl16/add-context.gif"
- label="%commands.control.add.context"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnEvent"
- icon="icons/elcl16/add-context.gif"
- label="%commands.control.add.context"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <count
- value="1">
- </count>
- <iterate
- ifEmpty="false"
- operator="and">
- <and>
- <or>
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
- </instanceof>
- </or>
- <test
- forcePluginActivation="true"
- property="org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.isAddContextOnEventSupported">
- </test>
- </and>
- </iterate>
- </and>
- </with>
- </visibleWhen>
- </command>
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.calibrate"
- icon="icons/elcl16/calibrate.gif"
- label="%commands.control.calibrate"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
-
- <command
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot"
- icon="icons/elcl16/snapshot.gif"
- label="%commands.control.snapshot"
- style="push">
- <visibleWhen
- checkEnabled="false">
- <with
- variable="activeMenuSelection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </visibleWhen>
- </command>
-
- </menuContribution>
-
- </extension>
- <extension
- point="org.eclipse.ui.handlers">
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.NewConnectionHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.newConnection">
- <activeWhen>
- <with
- variable="activePart">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView">
- </instanceof>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.ConnectHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DisconnectHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.RefreshHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DeleteHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.CreateSessionHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.ExecuteCommandScriptHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.executeScript">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DestroySessionHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.ImportHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import">
- <activeWhen>
- <with
- variable="selection">
- <and>
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- <count
- value="1">
- </count>
- </and>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableChannelOnSessionHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnSession">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableChannelOnDomainHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnDomain">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableChannelHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannel">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DisableChannelHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableChannel">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.StartHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.StopHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.SnaphshotHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AssignEventHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.assign.event">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEvent">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DisableEventHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableEvent">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventOnChannelHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnChannel">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventOnDomainHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnDomain">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventOnSessionHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnSession">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AddContextOnDomainHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnDomain">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.CalibrateHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.calibrate">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AddContextOnChannelHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnChannel">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- <handler
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AddContextOnEventHandler"
- commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnEvent">
- <activeWhen>
- <with
- variable="selection">
- <iterate
- operator="or">
- <instanceof
- value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
- </instanceof>
- </iterate>
- </with>
- </activeWhen>
- </handler>
-
- </extension>
-
- <extension
- point="org.eclipse.rse.core.systemTypes">
- <systemType
- description="%trace.control.rse.system.type.description"
- icon="icons/obj16/systemlttng2.gif"
- iconLive="icons/obj16/systemlttng2-live.gif"
- id="org.eclipse.linuxtools.internal.lttng2.ui.control.systemType"
- label="%trace.control.rse.system.type.name"
- name="org.eclipse.linuxtools.internal.lttng2.ui.control.systemType"
- subsystemConfigurationIds="ssh.shells;ssh.files;ssh.terminals;processes.shell.linux">
- </systemType>
- </extension>
-
- <extension
- point="org.eclipse.ui.preferencePages">
- <page
- category="org.eclipse.linuxtools.tmf.ui.TmfTracingPreferences"
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferencePage"
- id="org.eclipse.linuxtools.internal.lttng2.ui.views.control.preferences"
- name="%preference.page.control.name">
- </page>
- </extension>
- <extension
- point="org.eclipse.core.runtime.preferences">
- <initializer
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferenceInitializer">
- </initializer>
- </extension>
- <extension
- point="org.eclipse.core.expressions.propertyTesters">
- <propertyTester
- class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlPropertyTester"
- id="org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.propertyTester"
- namespace="org.eclipse.linuxtools.internal.lttng2.ui.views.control.model"
- properties="isAddContextOnEventSupported"
- type="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent">
- </propertyTester>
- </extension>
-
-
-</plugin>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.control.ui</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools LTTng Control UI Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConnectionManager;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.control.ui"; //$NON-NLS-1$
-
- /**
- * The shared instance
- */
- private static Activator plugin;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ------------------------------------------------------------------------
- // AbstractUIPlugin
- // ------------------------------------------------------------------------
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- ControlPreferences.getInstance().init(getPreferenceStore());
- // This registers the connection manager with the signal manager
- LttngRelaydConnectionManager.getInstance();
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- ControlPreferences.getInstance().dispose();
- LttngRelaydConnectionManager.getInstance().dispose();
- plugin = null;
- super.stop(context);
- }
-
- @Override
- protected void initializeImageRegistry(ImageRegistry reg) {
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Gets an image object using given path within plug-in.
- *
- * @param path path to image file
- *
- * @return image object
- */
- public Image getImageFromPath(String path) {
- return getImageDescripterFromPath(path).createImage();
- }
-
- /**
- * Gets an image descriptor using given path within plug-in.
- *
- * @param path path to image file
- *
- * @return image descriptor object
- */
- public ImageDescriptor getImageDescripterFromPath(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * Gets a image object from the image registry based on the given path.
- * If the image is not in the registry it will be registered.
- *
- * @param path to the image file
- * @return image object
- */
- public Image getImageFromImageRegistry(String path) {
- Image icon = getImageRegistry().get(path);
- if (icon == null) {
- icon = getImageDescripterFromPath(path).createImage();
- plugin.getImageRegistry().put(path, icon);
- }
- return icon;
- }
-
- /**
- * Loads the image in the plug-ins image registry (if necessary) and returns the image
- * @param url - URL relative to the Bundle
- * @return the image
- */
- public Image loadIcon(String url) {
- String key = plugin.getBundle().getSymbolicName() + "/" + url; //$NON-NLS-1$
- Image icon = plugin.getImageRegistry().get(key);
- if (icon == null) {
- URL imageURL = plugin.getBundle().getResource(url);
- ImageDescriptor descriptor = ImageDescriptor.createFromURL(imageURL);
- icon = descriptor.createImage();
- plugin.getImageRegistry().put(key, icon);
- }
- return icon;
- }
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logInfo(String message) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logInfo(String message, Throwable exception) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logWarning(String message) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logWarning(String message, Throwable exception) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logError(String message) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logError(String message, Throwable exception) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Marc-Andre Laperle - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
-
-/**
- * A class that holds information about the relayd connection.
- *
- * @author Marc-Andre Laperle
- * @since 3.1
- */
-public final class LttngRelaydConnectionInfo {
-
- private final String fHost;
- private final int fPort;
- private final String fSessionName;
-
- /**
- * Constructs a connection information.
- *
- * @param host
- * the host string
- * @param port
- * the port number
- * @param sessionName
- * the session name
- */
- public LttngRelaydConnectionInfo(String host, int port, String sessionName) {
- fHost = host;
- fPort = port;
- fSessionName = sessionName;
- }
-
- /**
- * Get the host string.
- *
- * @return the host string
- */
- public String getHost() {
- return fHost;
- }
-
- /**
- * Get the port number.
- *
- * @return the port number
- */
- public int getPort() {
- return fPort;
- }
-
- /**
- * Get the session name.
- *
- * @return the session name
- */
- public String getSessionName() {
- return fSessionName;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((fHost == null) ? 0 : fHost.hashCode());
- result = prime * result + fPort;
- result = prime * result + ((fSessionName == null) ? 0 : fSessionName.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- LttngRelaydConnectionInfo other = (LttngRelaydConnectionInfo) obj;
- if (fHost == null) {
- if (other.fHost != null) {
- return false;
- }
- } else if (!fHost.equals(other.fHost)) {
- return false;
- }
- if (fPort != other.fPort) {
- return false;
- }
- if (fSessionName == null) {
- if (other.fSessionName != null) {
- return false;
- }
- } else if (!fSessionName.equals(other.fSessionName)) {
- return false;
- }
- return true;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Marc-Andre Laperle - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
-import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfConstants;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * Manages relayd connections. When a trace is opened, it creates a connection
- * if the trace was started with live support. When a trace is closed, is closes
- * the connection.
- *
- * @author Marc-Andre Laperle
- * @since 3.1
- */
-public final class LttngRelaydConnectionManager {
- private static LttngRelaydConnectionManager fConnectionManager;
- private Map<LttngRelaydConnectionInfo, LttngRelaydConsumer> fConnections = new HashMap<>();
-
- /**
- * Get an instance of the trace manager.
- *
- * @return The trace manager
- */
- public static synchronized LttngRelaydConnectionManager getInstance() {
- if (fConnectionManager == null) {
- fConnectionManager = new LttngRelaydConnectionManager();
- TmfSignalManager.register(fConnectionManager);
- }
- return fConnectionManager;
- }
-
- /**
- * Get the cosumer for the given relayd connection information.
- *
- * @param connectionInfo
- * the connection information
- *
- * @return the consumer
- */
- public LttngRelaydConsumer getConsumer(final LttngRelaydConnectionInfo connectionInfo) {
- if (!fConnections.containsKey(connectionInfo)) {
- LttngRelaydConsumer lttngRelaydConsumer = new LttngRelaydConsumer(connectionInfo);
- fConnections.put(connectionInfo, lttngRelaydConsumer);
- return lttngRelaydConsumer;
- }
-
- return fConnections.get(connectionInfo);
- }
-
- private static LttngRelaydConnectionInfo getEntry(final ITmfTrace trace) throws CoreException {
- if (trace instanceof CtfTmfTrace) {
- CtfTmfTrace ctfTmfTrace = (CtfTmfTrace) trace;
- if (!ctfTmfTrace.isComplete()) {
- IResource resource = ctfTmfTrace.getResource();
- String host = resource.getPersistentProperty(CtfConstants.LIVE_HOST);
- String port = resource.getPersistentProperty(CtfConstants.LIVE_PORT);
- String sessionName = resource.getPersistentProperty(CtfConstants.LIVE_SESSION_NAME);
- if (host != null && port != null && sessionName != null && !sessionName.isEmpty()) {
- LttngRelaydConnectionInfo entry = new LttngRelaydConnectionInfo(host, Integer.parseInt(port), sessionName);
- return entry;
- }
- }
- }
-
- return null;
- }
-
- /**
- * Listen to trace opened so that we can start the relayd job if necessary.
- *
- * @param signal
- * the signal to be processed
- */
- @TmfSignalHandler
- public void traceOpened(final TmfTraceOpenedSignal signal) {
-
- try {
- LttngRelaydConnectionInfo entry = getEntry(signal.getTrace());
- if (entry != null) {
- LttngRelaydConsumer consumer = getConsumer(entry);
- consumer.connect();
- consumer.run((CtfTmfTrace) signal.getTrace());
- }
- } catch (CoreException e) {
- Activator.getDefault().logError(Messages.LttngRelaydConnectionManager_ConnectionError, e);
- ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), null, Messages.LttngRelaydConnectionManager_ConnectionError, new Status(IStatus.WARNING,
- Activator.PLUGIN_ID, e.getLocalizedMessage(), e));
- }
- }
-
- /**
- * Listen to trace closed so that we can stop the relayd job.
- *
- * @param signal
- * the signal to be processed
- */
- @TmfSignalHandler
- public void traceClosed(final TmfTraceClosedSignal signal) {
- LttngRelaydConnectionInfo entry;
- try {
- entry = getEntry(signal.getTrace());
- if (entry != null) {
- LttngRelaydConsumer comsumer = getConsumer(entry);
- if (comsumer != null) {
- comsumer.dispose();
- }
- fConnections.remove(entry);
- }
- } catch (CoreException e) {
- // Something went wrong with the resource. That's OK, the trace is
- // getting closed anyway.
- }
- }
-
- /**
- * Dispose of all the manager's resources (i.e. its connections).
- */
- public void dispose() {
- for (LttngRelaydConsumer consumer : fConnections.values()) {
- consumer.dispose();
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.Socket;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.LttngRelaydConnectorFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachReturnCode;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionReturnCode;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NextIndexReturnCode;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
-import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTimestamp;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-
-/**
- * Consumer of the relay d.
- *
- * @author Matthew Khouzam
- * @since 3.1
- */
-public final class LttngRelaydConsumer {
-
- private static final int SIGNAL_THROTTLE_NANOSEC = 10_000_000;
- private static final String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
-
- private Job fConsumerJob;
- private CtfTmfTrace fCtfTmfTrace;
- private CTFTrace fCtfTrace;
- private long fTimestampEnd;
- private AttachSessionResponse fSession;
- private Socket fConnection;
- private ILttngRelaydConnector fRelayd;
- private String fTracePath;
- private long fLastSignal = 0;
- private final LttngRelaydConnectionInfo fConnectionInfo;
-
- /**
- * Start a lttng consumer.
- *
- * @param address
- * the ip address in string format
- * @param port
- * the port, an integer
- * @param sessionName
- * the session name
- * @param project
- * the default project
- */
- LttngRelaydConsumer(final LttngRelaydConnectionInfo connectionInfo) {
- fConnectionInfo = connectionInfo;
- fTimestampEnd = 0;
- }
-
- /**
- * Connects to the relayd at the given address and port then attaches to the
- * given session name.
- *
- * @throws CoreException
- * If something goes wrong during the connection
- * <ul>
- * <li>
- * Connection could not be established (Socket could not be
- * opened, etc)</li>
- * <li>
- * Connection timeout</li>
- * <li>
- * The session was not found</li>
- * <li>
- * Could not create viewer session</li>
- * <li>
- * Invalid trace (no metadata, no streams)</li>
- * </ul>
- */
- public void connect() throws CoreException {
- if (fConnection != null) {
- return;
- }
-
- try {
- fConnection = new Socket(fConnectionInfo.getHost(), fConnectionInfo.getPort());
- fRelayd = LttngRelaydConnectorFactory.getNewConnector(fConnection);
- List<SessionResponse> sessions = fRelayd.getSessions();
- SessionResponse selectedSession = null;
- for (SessionResponse session : sessions) {
- String asessionName = nullTerminatedByteArrayToString(session.getSessionName().getBytes());
-
- if (asessionName.equals(fConnectionInfo.getSessionName())) {
- selectedSession = session;
- break;
- }
- }
-
- if (selectedSession == null) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_SessionNotFound));
- }
-
- CreateSessionResponse createSession = fRelayd.createSession();
- if (createSession.getStatus() != CreateSessionReturnCode.LTTNG_VIEWER_CREATE_SESSION_OK) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_CreateViewerSessionError + createSession.getStatus().toString()));
- }
-
- AttachSessionResponse attachedSession = fRelayd.attachToSession(selectedSession);
- if (attachedSession.getStatus() != AttachReturnCode.VIEWER_ATTACH_OK) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_AttachSessionError + attachedSession.getStatus().toString()));
- }
-
- String metadata = fRelayd.getMetadata(attachedSession);
- if (metadata == null) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_NoMetadata));
- }
-
- List<StreamResponse> attachedStreams = attachedSession.getStreamList();
- if (attachedStreams.isEmpty()) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_NoStreams));
- }
-
- fTracePath = nullTerminatedByteArrayToString(attachedStreams.get(0).getPathName().getBytes());
-
- fSession = attachedSession;
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_ErrorConnecting + (e.getMessage() != null ? e.getMessage() : ""))); //$NON-NLS-1$
- }
- }
-
- /**
- * Run the consumer operation for a give trace.
- *
- * @param trace
- * the trace
- */
- public void run(final CtfTmfTrace trace) {
- if (fSession == null) {
- return;
- }
-
- fCtfTmfTrace = trace;
- fCtfTrace = trace.getCTFTrace();
- fConsumerJob = new Job("RelayD consumer") { //$NON-NLS-1$
-
- @Override
- protected IStatus run(final IProgressMonitor monitor) {
- try {
- while (!monitor.isCanceled()) {
- List<StreamResponse> attachedStreams = fSession.getStreamList();
- for (StreamResponse stream : attachedStreams) {
- if (stream.getMetadataFlag() != 1) {
- IndexResponse indexReply = fRelayd.getNextIndex(stream);
- if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_OK) {
- long nanoTimeStamp = fCtfTrace.timestampCyclesToNanos(indexReply.getTimestampEnd());
- if (nanoTimeStamp > fTimestampEnd) {
- CtfTmfTimestamp endTime = new CtfTmfTimestamp(nanoTimeStamp);
- TmfTimeRange range = new TmfTimeRange(fCtfTmfTrace.getStartTime(), endTime);
-
- long currentTime = System.nanoTime();
- if (currentTime - fLastSignal > SIGNAL_THROTTLE_NANOSEC) {
- TmfTraceRangeUpdatedSignal signal = new TmfTraceRangeUpdatedSignal(LttngRelaydConsumer.this, fCtfTmfTrace, range);
- fCtfTmfTrace.broadcastAsync(signal);
- fLastSignal = currentTime;
- }
- fTimestampEnd = nanoTimeStamp;
- }
- } else if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_HUP) {
- // The trace is now complete because the trace session was destroyed
- fCtfTmfTrace.setComplete(true);
- TmfTraceRangeUpdatedSignal signal = new TmfTraceRangeUpdatedSignal(LttngRelaydConsumer.this, fCtfTmfTrace, new TmfTimeRange(fCtfTmfTrace.getStartTime(), new CtfTmfTimestamp(fTimestampEnd)));
- fCtfTmfTrace.broadcastAsync(signal);
- return Status.OK_STATUS;
- }
- }
- }
- }
- } catch (IOException e) {
- Activator.getDefault().logError("Error during live trace reading", e); //$NON-NLS-1$
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_ErrorLiveReading + (e.getMessage() != null ? e.getMessage() : "")); //$NON-NLS-1$
- }
-
- return Status.OK_STATUS;
- }
- };
- fConsumerJob.setSystem(true);
- fConsumerJob.schedule();
- }
-
- /**
- * Dispose the consumer and it's resources (sockets, etc).
- */
- public void dispose() {
- try {
- if (fConsumerJob != null) {
- fConsumerJob.cancel();
- fConsumerJob.join();
- }
- if (fConnection != null) {
- fConnection.close();
- }
- if (fRelayd != null) {
- fRelayd.close();
- }
- } catch (IOException e) {
- // Ignore
- } catch (InterruptedException e) {
- // Ignore
- }
- }
-
- /**
- * Once the consumer is connected to the relayd session, it knows the trace
- * path. This can be useful to know exactly where the trace is so that it
- * can be imported into the workspace and it can be opened.
- *
- * @return the trace path
- */
- public String getTracePath() {
- return fTracePath;
- }
-
- private static String nullTerminatedByteArrayToString(final byte[] byteArray) throws UnsupportedEncodingException {
- // Find length of null terminated string
- int length = 0;
- while (length < byteArray.length && byteArray[length] != 0) {
- length++;
- }
-
- String asessionName = new String(byteArray, 0, length, ENCODING_UTF_8);
- return asessionName;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Marc-Andre Laperle - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Messages for the relayd connection.
- *
- * @author Marc-Andre Laperle
- */
-public final class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.messages"; //$NON-NLS-1$
-
- /**
- * Error occurred establishing the connection.
- */
- public static String LttngRelaydConnectionManager_ConnectionError;
-
- /**
- * Error occurred attaching to the session.
- */
- public static String LttngRelaydConsumer_AttachSessionError;
-
- /**
- * Error occurred creating the viewer session.
- */
- public static String LttngRelaydConsumer_CreateViewerSessionError;
-
- /**
- * Error occurred connecting to the relayd.
- */
- public static String LttngRelaydConsumer_ErrorConnecting;
-
- /**
- * Error (generic) during live reading.
- */
- public static String LttngRelaydConsumer_ErrorLiveReading;
-
- /**
- * No metadata for this trace session.
- */
- public static String LttngRelaydConsumer_NoMetadata;
-
- /**
- * No streams for this trace session.
- */
- public static String LttngRelaydConsumer_NoStreams;
-
- /**
- * The session was not found by the relayd.
- */
- public static String LttngRelaydConsumer_SessionNotFound;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2014 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:
-# Marc-Andre Laperle - initial API and implementation
-###############################################################################
-
-LttngRelaydConnectionManager_ConnectionError=The connection to the relayd could not be established. The trace cannot be opened in Live mode.
-LttngRelaydConsumer_AttachSessionError=Error, could not attach to session, error code:
-LttngRelaydConsumer_CreateViewerSessionError=Error, could not create viewer session, error code:
-LttngRelaydConsumer_ErrorConnecting=Error connecting to live trace session.
-LttngRelaydConsumer_ErrorLiveReading=Error during live trace reading.
-LttngRelaydConsumer_NoMetadata=Error, trace has no metadata.
-LttngRelaydConsumer_NoStreams=Error, has no streams.
-LttngRelaydConsumer_SessionNotFound=Error, live session not found
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2009, 2013 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:
- * Francois Chouinard - Initial API and implementation
- * Bernd Hufmann - Filled with content
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlContentProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlLabelProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlRoot;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Menu;
-import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * <p>
- * View implementation for Trace Control.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ControlView extends ViewPart implements ITraceControlComponentChangedListener {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * View ID.
- */
- public static final String ID = "org.eclipse.linuxtools.internal.lttng2.ui.views.control"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The tree viewer.
- */
- private TreeViewer fTreeViewer = null;
-
- /**
- * The trace control root node. This provides access to the whole model.
- */
- private ITraceControlComponent fRoot = null;
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the trace control tree node (model)
- *
- * @return the trace control tree node (model).
- */
- public ITraceControlComponent getTraceControlRoot() {
- return fRoot;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void createPartControl(Composite parent) {
- // Create tree viewer
- fTreeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- ColumnViewerToolTipSupport.enableFor(fTreeViewer);
-
- fTreeViewer.setContentProvider(new TraceControlContentProvider());
- fTreeViewer.setLabelProvider(new TraceControlLabelProvider());
-
- // Create model root
- fRoot = new TraceControlRoot();
- fRoot.addComponentListener(this);
- fTreeViewer.setInput(fRoot);
-
- // Create context menu for the tree viewer
- createContextMenu();
-
- getSite().setSelectionProvider(fTreeViewer);
-
- RSECorePlugin.getTheSystemRegistry(); // to load RSE
- }
-
- @Override
- public void setFocus() {
- fTreeViewer.getControl().setFocus();
- }
-
- @Override
- public void componentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
- componentChanged(parent);
- }
-
- @Override
- public void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
- componentChanged(parent);
- }
-
- @Override
- public void componentChanged(final ITraceControlComponent component) {
- if (fTreeViewer.getTree().isDisposed()) {
- return;
- }
-
- UIJob myJob = new UIJob("Refresh") { //$NON-NLS-1$
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- if (fTreeViewer.getTree().isDisposed()) {
- return Status.OK_STATUS;
- }
-
- fTreeViewer.refresh(component);
-
- // Change selection needed
- final ISelection sel = fTreeViewer.getSelection();
- fTreeViewer.setSelection(null);
- fTreeViewer.setSelection(sel);
-
- // Show component that was changed
- fTreeViewer.reveal(component);
-
- return Status.OK_STATUS;
- }
- };
- myJob.setUser(false);
- myJob.setSystem(true);
- myJob.schedule();
- }
-
- /**
- * Sets the selected component in the tree
- * @param component - component to select
- */
- public void setSelection(ITraceControlComponent component) {
- ITraceControlComponent[] components = new ITraceControlComponent[1];
- components[0] = component;
- setSelection(components);
- }
-
- /**
- * Sets the selected components in the tree
- * @param components - array of components to select
- */
- public void setSelection(ITraceControlComponent[] components) {
- final StructuredSelection selection = new StructuredSelection(components);
- UIJob myJob = new UIJob("Select") { //$NON-NLS-1$
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
- fTreeViewer.setSelection(selection);
- return Status.OK_STATUS;
- }
- };
- myJob.setUser(false);
- myJob.schedule();
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
- /**
- * Creates the context sensitive menu.
- */
- private void createContextMenu() {
- // First we create a menu Manager
- final MenuManager menuManager = new MenuManager();
- final Menu menu = menuManager.createContextMenu(fTreeViewer.getTree());
- // Set the MenuManager
- fTreeViewer.getTree().setMenu(menu);
- getSite().registerContextMenu(menuManager, fTreeViewer);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * <p>
- * Dialog box for collecting information about contexts to be added to channels/events.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class AddContextDialog extends Dialog implements IAddContextDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * The icon file for this dialog box.
- */
- public static final String ADD_CONTEXT_ICON_FILE = "icons/elcl16/add-context.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * A tree viewer for displaying and selection of available contexts.
- */
- private CheckboxTreeViewer fContextsViewer;
-
- /**
- * A Tree model for the checkbox tree viewer.
- */
- private final ContextModel fContextModel = new ContextModel();
-
- /**
- * The contexts to add.
- */
- private final List<String> fSelectedContexts = new ArrayList<>();
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public AddContextDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public void setAvalibleContexts(List<String> contexts) {
- fContextModel.setAvalibleContexts(contexts);
- }
-
- @Override
- public List<String> getContexts() {
- List<String> ret = new ArrayList<>();
- ret.addAll(fSelectedContexts);
- return ret;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_AddContextDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(ADD_CONTEXT_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- Composite dialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- dialogComposite.setLayout(layout);
- dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // Contexts list
- Group contextGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- contextGroup.setText(Messages.TraceControl_AddContextAvailableContextsLabel);
- layout = new GridLayout(1, true);
- contextGroup.setLayout(layout);
- contextGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- fContextsViewer = new CheckboxTreeViewer(contextGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- fContextsViewer.getTree().setToolTipText(Messages.TraceControl_AddContextAvailableContextsTooltip);
-
- fContextsViewer.setContentProvider(new ContextsContentProvider());
- fContextsViewer.setLabelProvider(new ContextsLabelProvider());
- fContextsViewer.addCheckStateListener(new ContextCheckListener());
- fContextsViewer.setInput(fContextModel);
- fContextsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
-
- getShell().setMinimumSize(new Point(500, 450));
-
- return dialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- @Override
- protected void okPressed() {
- fSelectedContexts.clear();
-
- Object[] checkedElements = fContextsViewer.getCheckedElements();
- for (int i = 0; i < checkedElements.length; i++) {
- IContextModelComponent component = (IContextModelComponent)checkedElements[i];
- if (!Messages.TraceControl_AddContextAllLabel.equals(component.getName())) {
- fSelectedContexts.add(component.getName());
- }
- }
-
- // validation successful -> call super.okPressed()
- super.okPressed();
- }
-
- // ------------------------------------------------------------------------
- // Helper classes and methods
- // ------------------------------------------------------------------------
- /**
- * Content provider for the contexts tree
- */
- public static final class ContextsContentProvider implements ITreeContentProvider {
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof IContextModelComponent) {
- return ((IContextModelComponent)parentElement).getChildren();
- }
- return null;
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof IContextModelComponent) {
- return ((IContextModelComponent)element).getParent();
- }
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof IContextModelComponent) {
- return ((IContextModelComponent)element).hasChildren();
- }
- return false;
- }
- }
-
- /**
- * Label provider for the contexts tree
- */
- public static final class ContextsLabelProvider extends ColumnLabelProvider {
- @Override
- public String getText(Object element) {
-
- if ((element != null) && (element instanceof IContextModelComponent)) {
- return ((IContextModelComponent)element).getName();
- }
-
- return "";//$NON-NLS-1$
- }
- }
-
- /**
- * Check state listener for the contexts tree.
- */
- public final class ContextCheckListener implements ICheckStateListener {
- @Override
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- if (event.getElement() instanceof AllContexts) {
- fContextsViewer.setSubtreeChecked(event.getElement(), true);
- }
- } else {
- if (event.getElement() instanceof AllContexts) {
- fContextsViewer.setSubtreeChecked(event.getElement(), false);
- } else {
- IContextModelComponent component = (IContextModelComponent) event.getElement();
- fContextsViewer.setChecked(component.getParent(), false);
- }
- }
- }
- }
-
- /**
- * Model for the context tree viewer (root component)
- */
- public static class ContextModel implements IContextModelComponent {
-
- private final AllContexts fAllContexts;
-
- /**
- * Constructor
- */
- public ContextModel() {
- fAllContexts = new AllContexts(this);
- }
-
- /**
- * Sets the available contexts
- *
- * @param contexts
- * The contexts to set
- */
- public void setAvalibleContexts(List<String> contexts) {
- fAllContexts.setAvalibleContexts(contexts);
- }
-
- @Override
- public String getName() {
- return "root"; //$NON-NLS-1$
- }
-
- @Override
- public Object getParent() {
- return null;
- }
-
- @Override
- public Object[] getChildren() {
- Object[] ret = new Object[1];
- ret[0] = fAllContexts;
- return ret;
- }
-
- @Override
- public boolean hasChildren() {
- return true;
- }
- }
-
- /**
- * Model element (to select/deselect) all contexts) for the context tree viewer
- */
- public static class AllContexts implements IContextModelComponent {
- /**
- * The available list of contexts.
- */
- private List<Context> fAvailableContexts;
-
- private final IContextModelComponent fParent;
-
- /**
- * Constructor
- *
- * @param parent
- * The parent component
- */
- public AllContexts(IContextModelComponent parent) {
- fParent = parent;
- }
-
- /**
- * Sets the available contexts
- *
- * @param contexts
- * The contexts to set
- */
- public void setAvalibleContexts(List<String> contexts) {
- fAvailableContexts = new ArrayList<>();
- if (contexts != null) {
- for (Iterator<String> iterator = contexts.iterator(); iterator.hasNext();) {
- String name = iterator.next();
- fAvailableContexts.add(new Context(this, name));
- }
- }
- }
-
- @Override
- public String getName() {
- return Messages.TraceControl_AddContextAllLabel;
- }
-
- @Override
- public Object[] getChildren() {
- return fAvailableContexts.toArray();
- }
-
- @Override
- public Object getParent() {
- return fParent;
- }
-
- @Override
- public boolean hasChildren() {
- return true;
- }
- }
-
- /**
- * Model element (the context) for the context tree viewer
- */
- public static class Context implements IContextModelComponent {
-
- private final String fContextName;
- private final IContextModelComponent fParent;
-
- /**
- * Constructor
- *
- * @param parent
- * The parent component
- * @param name
- * The name of this context
- */
- public Context(IContextModelComponent parent, String name) {
- fParent = parent;
- fContextName = name;
- }
-
- @Override
- public String getName() {
- return fContextName;
- }
-
- @Override
- public Object getParent() {
- return fParent;
- }
-
- @Override
- public Object[] getChildren() {
- return null;
- }
-
- @Override
- public boolean hasChildren() {
- return false;
- }
- }
-
- /**
- * Interface for the tree model used for the context tree viewer.
- */
- public interface IContextModelComponent {
-
- /**
- * @return The name of this component
- */
- String getName();
-
- /**
- * @return The parent component
- */
- Object getParent();
-
- /**
- * @return The array of children of this component
- */
- Object[] getChildren();
-
- /**
- * @return If this component has children or not
- */
- boolean hasChildren();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * <p>
- * Confirmation dialog implementation.
- * </p>
- *
- * @author Bernd Hufmann
- */
-
-public class ConfirmDialog implements IConfirmDialog {
-
- @Override
- public boolean openConfirm(Shell parent, String title, String message) {
- return MessageDialog.openConfirm(parent,
- Messages.TraceControl_DestroyConfirmationTitle,
- Messages.TraceControl_DestroyConfirmationMessage);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.TitleAreaDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.ModifyEvent;
-import org.eclipse.swt.events.ModifyListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * <p>
- * Dialog box for collecting session creation information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class CreateSessionDialog extends TitleAreaDialog implements ICreateSessionDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The icon file for this dialog box.
- */
- public static final String CREATE_SESSION_ICON_FILE = "icons/elcl16/add_button.gif"; //$NON-NLS-1$
-
- /**
- * To indicate that the default value will be used for this field
- */
- private static final String DEFAULT_TEXT = "<" + Messages.EnableChannelDialog_DefaultMessage + ">"; //$NON-NLS-1$ //$NON-NLS-2$
-
- /**
- * The default port for the connection to Relayd. This actual value is
- * needed because this is not an optional argument to a command; this is
- * what is used to connect directly to Relayd from Java through a socket.
- * There is also currently no way to know the default value by issuing a
- * command.
- */
- private static final int DEFAULT_LIVE_PORT = 5344;
-
- /**
- * The default address for the connection to Relayd. Only local is supported
- * for now. See above comment for why it's needed.
- */
- private static final String DEFAULT_LIVE_URL = "127.0.0.1"; //$NON-NLS-1$
-
- /**
- * Supported network protocols for streaming
- */
- private enum StreamingProtocol {
- /** Default network protocol for IPv4 (TCP)*/
- net,
- /** Default network protocol for IPv6 (TCP)*/
- net6,
- /** File */
- file,
- }
-
- /**
- * Supported network protocols for Live tracing
- */
- private enum LiveProtocol {
- /** Default network protocol for IPv4 (TCP)*/
- net,
- /** Default network protocol for IPv6 (TCP)*/
- net6
- }
-
- private enum StreamingProtocol2 {
- /** Default network protocol for IPv4 (TCP)*/
- net,
- /** Default network protocol for IPv6 (TCP)*/
- net6,
- /** TCP network protocol for IPv4*/
- tcp,
- /** TCP network protocol for IPv6*/
- tcp6 }
-
- /**
- * Index of last supported streaming protocol for common URL configuration.
- */
- private static final int COMMON_URL_LAST_INDEX = 1;
- /**
- * Index of default streaming protocol.
- */
- private static final int DEFAULT_URL_INDEX = 0;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The dialog composite.
- */
- private Composite fDialogComposite = null;
- /**
- * The text widget for the session name
- */
- private Text fSessionNameText = null;
- /**
- * The label widget for the session path.
- */
- private Label fSessionPathLabel = null;
- /**
- * The text widget for the session path.
- */
- private Text fSessionPathText = null;
- /**
- * The button widget to select a normal session
- */
- private Button fNormalModeButton = null;
- /**
- * The button widget to select a snapshot session
- */
- private Button fSnapshotButton = null;
- /**
- * The group that contains the mutually exclusive mode buttons
- */
- private Group fModeButtonGroup = null;
- /**
- * The button widget to select a live session
- */
- private Button fLiveButton = null;
-
- /**
- * The text widget to set a live delay
- */
- private Text fLiveDelayText = null;
- /**
- * The Group for advanced configuration.
- */
- private Group fAdvancedGroup = null;
- /**
- * The button to show advanced options.
- */
- private Button fAdvancedButton = null;
- /**
- * The composite with streaming configuration parameter.
- */
- private Composite fStreamingComposite = null;
- /**
- * The text widget for the trace path.
- */
- private Text fTracePathText = null;
- /**
- * The button to link data protocol/Address with control protocol.
- */
- private Button fLinkDataWithControlButton = null;
- /**
- * The Combo box for channel protocol selection.
- */
- private CCombo fControlProtocolCombo = null;
- /**
- * A selection listener that copies the protocol from control to data when being linked.
- */
- private ControlProtocolSelectionListener fCopyProtocolSelectionListener;
- /**
- * A selection listener updates the control port text depending on the control protocol selected.
- */
- private ProtocolComboSelectionListener fControlProtocolSelectionListener;
- /**
- * A selection listener updates the data port text depending on the data protocol selected.
- */
- private ProtocolComboSelectionListener fDataProtocolSelectionListener;
- /**
- * The text box for the host/IP address of the control channel.
- */
- private Text fControlHostAddressText = null;
- /**
- * A key listener that copies the host address from control to data when being linked.
- */
- private CopyModifyListener fControlUrlKeyListener;
- /**
- * A modify listener that updates the enablement of the dialog.
- */
- private UpdateEnablementModifyListener fUpdateEnablementModifyListener;
- /**
- * The text box for the control port.
- */
- private Text fControlPortText = null;
- /**
- * The Combo box for data protocol selection.
- */
- private CCombo fDataProtocolCombo = null;
- /**
- * The text box for the host/IP address of the data channel.
- */
- private Text fDataHostAddressText = null;
- /**
- * The text box for the data port.
- */
- private Text fDataPortText = null;
- /**
- * The parent where the new node should be added.
- */
- private TraceSessionGroup fParent = null;
- /**
- * The session name string.
- */
- private String fSessionName = ""; //$NON-NLS-1$;
- /**
- * The session path string.
- */
- private String fSessionPath = null;
- /**
- * Flag whether the session is snapshot or not
- */
- private boolean fIsSnapshot = false;
- /**
- * Flag whether the session is live or not
- */
- private boolean fIsLive = false;
- /**
- * The text box for the live address (relayd).
- */
- private Text fLiveHostAddressText = null;
- /**
- * The text box for the live port (relayd).
- */
- private Text fLivePortText = null;
- /**
- * The live delay
- */
- private Integer fLiveDelay = 0;
- /**
- * The live url.
- */
- private String fLiveUrl = null;
- /**
- * The live port.
- */
- private Integer fLivePort = 0;
- /**
- * Flag whether default location (path) shall be used or not
- */
- private boolean fIsDefaultPath = true;
- /**
- * Flag whether the advanced options are enabled or not
- */
- private boolean fIsAdvancedEnabled = false;
- /**
- * The network URL in case control and data is configured together.
- * If set, fControlUrl and fDataUrl will be null.
- */
- private String fNetworkUrl = null;
- /**
- * The control URL in case control and data is configured separately.
- * If set, fDataUrl will be set too and fNetworkUrl will be null.
- */
- private String fControlUrl = null;
- /**
- * The data URL in case control and data is configured separately.
- * If set, fControlUrl will be set too and fNetworkUrl will be null.
- */
- private String fDataUrl = null;
- /**
- * The trace path string.
- */
- private String fTracePath = null;
- /**
- * The Group for advanced configuration of Live mode.
- */
- private Group fLiveGroup = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public CreateSessionDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public void initialize(TraceSessionGroup group) {
- fParent = group;
- fStreamingComposite = null;
- fLiveGroup = null;
- fLiveButton = null;
- fIsLive = false;
- fSnapshotButton = null;
- fSessionName = ""; //$NON-NLS-1$
- fSessionPath = null;
- fIsSnapshot = false;
- fIsDefaultPath = true;
- fIsAdvancedEnabled = false;
- fNetworkUrl = null;
- fControlUrl = null;
- fDataUrl = null;
- }
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_CreateSessionDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(CREATE_SESSION_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
- Composite dialogAreaa = (Composite) super.createDialogArea(parent);
- setTitle(Messages.TraceControl_CreateSessionDialogTitle);
- setMessage(Messages.TraceControl_CreateSessionDialogMessage);
-
- // Main dialog panel
- fDialogComposite = new Composite(dialogAreaa, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- fDialogComposite.setLayout(layout);
- fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Group sessionGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- sessionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- sessionGroup.setLayout(new GridLayout(4, true));
-
- fUpdateEnablementModifyListener = new UpdateEnablementModifyListener();
-
- Label sessionNameLabel = new Label(sessionGroup, SWT.RIGHT);
- sessionNameLabel.setText(Messages.TraceControl_CreateSessionNameLabel);
- fSessionNameText = new Text(sessionGroup, SWT.NONE);
- fSessionNameText.setToolTipText(Messages.TraceControl_CreateSessionNameTooltip);
- fSessionNameText.addModifyListener(fUpdateEnablementModifyListener);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- fSessionNameText.setLayoutData(data);
-
- fSessionPathLabel = new Label(sessionGroup, SWT.RIGHT);
- fSessionPathLabel.setText(Messages.TraceControl_CreateSessionPathLabel);
- fSessionPathText = new Text(sessionGroup, SWT.NONE);
- fSessionPathText.setToolTipText(Messages.TraceControl_CreateSessionPathTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 3;
- fSessionPathText.setLayoutData(data);
- fSessionPathText.addModifyListener(fUpdateEnablementModifyListener);
-
- if (fParent.isSnapshotSupported() || fParent.isLiveSupported()) {
- fModeButtonGroup = new Group(sessionGroup, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- fModeButtonGroup.setLayoutData(data);
- fModeButtonGroup.setLayout(new GridLayout(3, true));
-
- SelectionAdapter modeChangedListener = new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fLiveButton != null) {
- if (fLiveButton.getSelection()) {
- createAdvancedLiveGroup();
- updateSessionPathEnablement();
- updateProtocolComboItems();
- } else {
- disposeLiveGroup();
- updateSessionPathEnablement();
- updateProtocolComboItems();
- }
- }
- updateEnablement();
- }
- };
-
- fNormalModeButton = new Button(fModeButtonGroup, SWT.RADIO);
- fNormalModeButton.setText(Messages.TraceControl_CreateSessionNormalLabel);
- fNormalModeButton.setToolTipText(Messages.TraceControl_CreateSessionNormalTooltip);
- fNormalModeButton.setSelection(true);
- fNormalModeButton.addSelectionListener(modeChangedListener);
-
- if (fParent.isSnapshotSupported()) {
- fSnapshotButton = new Button(fModeButtonGroup, SWT.RADIO);
- fSnapshotButton.setText(Messages.TraceControl_CreateSessionSnapshotLabel);
- fSnapshotButton.setToolTipText(Messages.TraceControl_CreateSessionSnapshotTooltip);
- fSnapshotButton.addSelectionListener(modeChangedListener);
- }
-
- if (fParent.isLiveSupported()) {
- fLiveButton = new Button(fModeButtonGroup, SWT.RADIO);
- fLiveButton.setText(Messages.TraceControl_CreateSessionLiveLabel);
- fLiveButton.setToolTipText(Messages.TraceControl_CreateSessionLiveTooltip);
- fLiveButton.addSelectionListener(modeChangedListener);
- }
- }
-
- if (fParent.isNetworkStreamingSupported() || fParent.isLiveSupported()) {
- createAdvancedOptionsComposite();
- }
-
- return fDialogComposite;
- }
-
- private void createAdvancedOptionsComposite() {
-
- fAdvancedGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- fAdvancedGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
- fAdvancedGroup.setLayout(new GridLayout(1, true));
-
- fAdvancedButton = new Button(fAdvancedGroup, SWT.PUSH);
- fAdvancedButton.setText(Messages.TraceControl_CreateSessionConfigureStreamingButtonText + " >>>"); //$NON-NLS-1$
- fAdvancedButton.setToolTipText(Messages.TraceControl_CreateSessionConfigureStreamingButtonTooltip);
- fAdvancedButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fIsAdvancedEnabled) {
- fIsAdvancedEnabled = false;
- fAdvancedButton.setText(">>> " + Messages.TraceControl_CreateSessionConfigureStreamingButtonText); //$NON-NLS-1$
- fAdvancedButton.setToolTipText(Messages.TraceControl_CreateSessionConfigureStreamingButtonTooltip);
-
- if (fParent.isNetworkStreamingSupported()) {
- updateSessionPathEnablement();
- disposeConfigureStreamingComposite();
- }
-
- if (fParent.isLiveSupported()) {
- disposeLiveGroup();
- }
- } else {
- fIsAdvancedEnabled = true;
- fAdvancedButton.setText("<<< " + Messages.TraceControl_CreateSessionNoStreamingButtonText); //$NON-NLS-1$
- fAdvancedButton.setToolTipText(Messages.TraceControl_CreateSessionNoStreamingButtonTooltip);
-
- if (fParent.isNetworkStreamingSupported()) {
- updateSessionPathEnablement();
- createConfigureStreamingComposite();
- }
- if (fLiveButton != null && fLiveButton.getSelection()) {
- createAdvancedLiveGroup();
- }
- }
-
- updateEnablement();
- getShell().pack();
- }
- });
- }
-
- private void updateSessionPathEnablement() {
- if (fIsAdvancedEnabled || fIsLive) {
- fSessionPathText.setEnabled(false);
- fSessionPathText.setText(""); //$NON-NLS-1$
- fSessionPathLabel.setText(""); //$NON-NLS-1$
- } else {
- fSessionPathText.setEnabled(true);
- fSessionPathLabel.setText(Messages.TraceControl_CreateSessionPathLabel);
- }
- }
-
- private void updateProtocolComboItems() {
- if (fControlProtocolCombo == null || fControlProtocolCombo.isDisposed()) {
- return;
- }
-
- int currentSelection = fControlProtocolCombo.getSelectionIndex() <= COMMON_URL_LAST_INDEX ?
- fControlProtocolCombo.getSelectionIndex() : DEFAULT_URL_INDEX;
-
- fControlProtocolCombo.removeAll();
- Enum<? extends Enum<?>>[] values;
- if (fIsLive) {
- values = LiveProtocol.values();
- } else if (fLinkDataWithControlButton.getSelection()) {
- values = StreamingProtocol.values();
- } else {
- values = StreamingProtocol2.values();
- }
-
- String[] controlItems = new String[values.length];
- for (int i = 0; i < controlItems.length; i++) {
- controlItems[i] = values[i].name();
- }
- fControlProtocolCombo.setItems(controlItems);
- fDataProtocolCombo.setItems(controlItems);
-
- // Set selection
- if (currentSelection != -1) {
- fControlProtocolCombo.select(currentSelection);
- fDataProtocolCombo.select(currentSelection);
- }
- }
-
- private void createConfigureStreamingComposite() {
- if (fStreamingComposite == null) {
- fStreamingComposite = new Group(fAdvancedGroup, SWT.SHADOW_NONE);
- GridLayout layout = new GridLayout(1, true);
- fStreamingComposite.setLayout(layout);
- fStreamingComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- layout = new GridLayout(7, true);
- fStreamingComposite.setLayout(layout);
- fStreamingComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label tracePathLabel = new Label(fStreamingComposite, SWT.RIGHT);
- tracePathLabel.setText(Messages.TraceControl_CreateSessionTracePathText);
- fTracePathText = new Text(fStreamingComposite, SWT.NONE);
- fTracePathText.setToolTipText(Messages.TraceControl_CreateSessionTracePathTooltip);
-
- // layout widgets
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 6;
- fTracePathText.setLayoutData(data);
- fTracePathText.addModifyListener(fUpdateEnablementModifyListener);
-
- fLinkDataWithControlButton = new Button(fStreamingComposite, SWT.CHECK);
- fLinkDataWithControlButton.setText(Messages.TraceControl_CreateSessionLinkButtonText);
- fLinkDataWithControlButton.setToolTipText(Messages.TraceControl_CreateSessionLinkButtonTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 7;
- fLinkDataWithControlButton.setLayoutData(data);
- fLinkDataWithControlButton.setSelection(true);
-
- Label label = new Label(fStreamingComposite, SWT.NONE);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- label.setLayoutData(data);
-
- label = new Label(fStreamingComposite, SWT.NONE);
- label.setText(Messages.TraceControl_CreateSessionProtocolLabelText);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- label.setLayoutData(data);
-
- label = new Label(fStreamingComposite, SWT.NONE);
- label.setText(Messages.TraceControl_CreateSessionAddressLabelText);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- label.setLayoutData(data);
-
- label = new Label(fStreamingComposite, SWT.NONE);
- label.setText(Messages.TraceControl_CreateSessionPortLabelText);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- label.setLayoutData(data);
-
- label = new Label(fStreamingComposite, SWT.RIGHT);
- label.setText(Messages.TraceControl_CreateSessionControlUrlLabel);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- label.setLayoutData(data);
-
- fControlProtocolCombo = new CCombo(fStreamingComposite, SWT.READ_ONLY);
- fControlProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionCommonProtocolTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- fControlProtocolCombo.setLayoutData(data);
- fControlProtocolCombo.addModifyListener(fUpdateEnablementModifyListener);
-
- fControlHostAddressText = new Text(fStreamingComposite, SWT.NONE);
- fControlHostAddressText.setToolTipText(Messages.TraceControl_CreateSessionControlAddressTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- fControlHostAddressText.setLayoutData(data);
- fControlHostAddressText.addModifyListener(fUpdateEnablementModifyListener);
-
- fControlPortText = new Text(fStreamingComposite, SWT.NONE);
- fControlPortText.setToolTipText(Messages.TraceControl_CreateSessionControlPortTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- fControlPortText.setLayoutData(data);
- fControlPortText.addModifyListener(fUpdateEnablementModifyListener);
-
- label = new Label(fStreamingComposite, SWT.RIGHT);
- label.setText(Messages.TraceControl_CreateSessionDataUrlLabel);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- label.setLayoutData(data);
-
- fDataProtocolCombo = new CCombo(fStreamingComposite, SWT.READ_ONLY);
- fDataProtocolCombo.setEnabled(false);
- fDataProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionProtocolTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- fDataProtocolCombo.setLayoutData(data);
- fDataProtocolCombo.addModifyListener(fUpdateEnablementModifyListener);
-
- updateProtocolComboItems();
-
- fDataHostAddressText = new Text(fStreamingComposite, SWT.NONE);
- fDataHostAddressText.setEnabled(false);
- fDataHostAddressText.setToolTipText(Messages.TraceControl_CreateSessionDataAddressTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- fDataHostAddressText.setLayoutData(data);
- fDataHostAddressText.addModifyListener(fUpdateEnablementModifyListener);
-
- fDataPortText = new Text(fStreamingComposite, SWT.NONE);
- fDataPortText.setEnabled(true);
- fDataPortText.setToolTipText(Messages.TraceControl_CreateSessionDataPortTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- fDataPortText.setLayoutData(data);
- fDataPortText.addModifyListener(fUpdateEnablementModifyListener);
-
- fCopyProtocolSelectionListener = new ControlProtocolSelectionListener();
- fControlProtocolSelectionListener = new ProtocolComboSelectionListener(fControlProtocolCombo, fControlPortText);
- fDataProtocolSelectionListener = new ProtocolComboSelectionListener(fDataProtocolCombo, fDataPortText);
-
- fControlProtocolCombo.addSelectionListener(fCopyProtocolSelectionListener);
-
- fControlUrlKeyListener = new CopyModifyListener(fControlHostAddressText, fDataHostAddressText);
- fControlHostAddressText.addModifyListener(fControlUrlKeyListener);
-
- fControlProtocolCombo.select(DEFAULT_URL_INDEX);
- fDataProtocolCombo.select(DEFAULT_URL_INDEX);
-
- fLinkDataWithControlButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fLinkDataWithControlButton.getSelection()) {
- // Set enablement control data channel inputs
- fDataProtocolCombo.setEnabled(false);
- fDataHostAddressText.setEnabled(false);
- fControlPortText.setEnabled(true);
- fDataPortText.setEnabled(true);
-
- // Update listeners
- fControlProtocolCombo.removeSelectionListener(fControlProtocolSelectionListener);
- fDataProtocolCombo.removeSelectionListener(fDataProtocolSelectionListener);
- fControlProtocolCombo.addSelectionListener(fCopyProtocolSelectionListener);
- fControlHostAddressText.addModifyListener(fControlUrlKeyListener);
-
- updateProtocolComboItems();
-
- fDataHostAddressText.setText(fControlHostAddressText.getText());
-
- // Update tool tips
- fControlProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionCommonProtocolTooltip);
- } else {
- // Enable data channel inputs
- fDataProtocolCombo.setEnabled(true);
- fDataHostAddressText.setEnabled(true);
-
- // Update listeners
- fControlProtocolCombo.removeSelectionListener(fCopyProtocolSelectionListener);
- fControlProtocolCombo.addSelectionListener(fControlProtocolSelectionListener);
- fDataProtocolCombo.addSelectionListener(fDataProtocolSelectionListener);
- fControlHostAddressText.removeModifyListener(fControlUrlKeyListener);
-
- updateProtocolComboItems();
-
- // Update tool tips
- fDataProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionProtocolTooltip);
- fControlProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionProtocolTooltip);
-
- // Update control/data port enablement and input
- if (fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net.name()) ||
- fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net6.name())) {
- fControlPortText.setText(""); //$NON-NLS-1$
- fControlPortText.setEnabled(false);
- } else {
- fControlPortText.setEnabled(true);
- }
-
- if (fDataProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net.name()) ||
- fDataProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net6.name())) {
- fDataPortText.setText(""); //$NON-NLS-1$
- fDataPortText.setEnabled(false);
- } else {
- fDataPortText.setEnabled(true);
- }
- }
- }
- });
- }
- }
-
- private void createAdvancedLiveGroup() {
- if (fLiveGroup == null && fIsAdvancedEnabled) {
- GridLayout layout = new GridLayout(7, true);
- fLiveGroup = new Group(fAdvancedGroup, SWT.NONE);
- fLiveGroup.setLayout(layout);
- GridData layoutData = new GridData(GridData.FILL_BOTH);
- fLiveGroup.setLayoutData(layoutData);
-
- Label label = new Label(fLiveGroup, SWT.NONE);
- label.setText(Messages.TraceControl_CreateSessionLiveConnectionLabel);
- layoutData = new GridData(GridData.FILL_HORIZONTAL);
- layoutData.horizontalSpan = 2;
- label.setLayoutData(layoutData);
-
- fLiveHostAddressText = new Text(fLiveGroup, SWT.NONE);
- fLiveHostAddressText.setText(DEFAULT_LIVE_URL);
- fLiveHostAddressText.setEnabled(false);
- fLiveHostAddressText.setToolTipText(Messages.TraceControl_CreateSessionLiveConnectionUrlTooltip);
- layoutData = new GridData(GridData.FILL_HORIZONTAL);
- layoutData.horizontalSpan = 4;
- fLiveHostAddressText.setLayoutData(layoutData);
-
- fLivePortText = new Text(fLiveGroup, SWT.NONE);
- fLivePortText.setText(Integer.toString(DEFAULT_LIVE_PORT));
- fLivePortText.setToolTipText(Messages.TraceControl_CreateSessionLiveConnectionPortTooltip);
- layoutData = new GridData(GridData.FILL_HORIZONTAL);
- fLivePortText.setLayoutData(layoutData);
-
- Label liveDelayLabel = new Label(fLiveGroup, SWT.NONE);
- layoutData = new GridData(GridData.FILL_HORIZONTAL);
- liveDelayLabel.setText(Messages.TraceControl_CreateSessionLiveDelayLabel);
- liveDelayLabel.setLayoutData(layoutData);
- fLiveDelayText = new Text(fLiveGroup, SWT.NONE);
- fLiveDelayText.setText(DEFAULT_TEXT);
- fLiveDelayText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- fLiveDelayText.setToolTipText(Messages.TraceControl_CreateSessionLiveDelayTooltip);
- fLiveDelayText.addVerifyListener(new VerifyListener() {
- @Override
- public void verifyText(VerifyEvent e) {
- // only numbers and default are allowed.
- e.doit = e.text.matches("[0-9]*") || e.text.matches(DEFAULT_TEXT); //$NON-NLS-1$
- updateEnablement();
- }
- });
- fLiveDelayText.addModifyListener(new ModifyListener() {
- @Override
- public void modifyText(ModifyEvent event) {
- updateEnablement();
- }
- });
-
- fLiveDelayText.addFocusListener(new FocusListener() {
-
- @Override
- public void focusLost(FocusEvent e) {
- Text focusLostWidget = (Text) e.widget;
- if (focusLostWidget.getText().isEmpty()) {
- focusLostWidget.setText(DEFAULT_TEXT);
- focusLostWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- }
- }
-
- @Override
- public void focusGained(FocusEvent e) {
- Text focusGainedWidget = (Text) e.widget;
- if (focusGainedWidget.getText().equals(DEFAULT_TEXT)) {
- focusGainedWidget.setText(""); //$NON-NLS-1$
- focusGainedWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_BLACK));
- }
- }
- });
-
- layoutData = new GridData(GridData.FILL_HORIZONTAL);
- layoutData.grabExcessHorizontalSpace = true;
- layoutData.horizontalSpan = 6;
- fLiveDelayText.setLayoutData(layoutData);
- getShell().pack();
- }
- }
-
- private void disposeLiveGroup() {
- if (fLiveGroup != null) {
- fLiveGroup.dispose();
- fLiveGroup = null;
- getShell().pack();
- }
- }
-
- private void disposeConfigureStreamingComposite() {
- if (fStreamingComposite != null) {
- fStreamingComposite.dispose();
- fStreamingComposite = null;
- }
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- private void updateEnablement() {
- validate();
- getButton(IDialogConstants.OK_ID).setEnabled(getErrorMessage() == null);
- }
-
- private void validate() {
- // Validate input data
- fSessionName = fSessionNameText.getText();
- fSessionPath = fSessionPathText.getText();
- setErrorMessage(null);
-
- if (fParent.isLiveSupported() && fLiveButton != null) {
- fIsLive = fLiveButton.getSelection();
- fLiveDelay = LTTngControlServiceConstants.UNUSED_VALUE;
- fLiveUrl = DEFAULT_LIVE_URL;
- fLivePort = DEFAULT_LIVE_PORT;
- }
-
- if (!"".equals(fSessionPath)) { //$NON-NLS-1$
- // validate sessionPath
- if (!fIsAdvancedEnabled && !fIsLive) {
- TargetNodeComponent node = (TargetNodeComponent)fParent.getParent();
- IRemoteSystemProxy proxy = node.getRemoteSystemProxy();
- IFileServiceSubSystem fsss = proxy.getFileServiceSubSystem();
- if (fsss != null) {
- try {
- IRemoteFile remoteFolder = fsss.getRemoteFileObject(fSessionPath, new NullProgressMonitor());
-
- if (remoteFolder == null) {
- setErrorMessage(Messages.TraceControl_InvalidSessionPathError + " (" + fSessionPath + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- if (remoteFolder.exists()) {
- setErrorMessage(Messages.TraceControl_SessionPathAlreadyExistsError + " (" + fSessionPath + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- } catch (SystemMessageException e) {
- setErrorMessage(Messages.TraceControl_FileSubSystemError + "\n" + e); //$NON-NLS-1$
- return;
- }
- }
- }
- fIsDefaultPath = false;
- }
-
- if (fParent.isSnapshotSupported()) {
- fIsSnapshot = fSnapshotButton.getSelection();
- }
-
- fNetworkUrl = null;
- fControlUrl = null;
- fDataUrl = null;
-
- if (fIsAdvancedEnabled && fStreamingComposite != null) {
- // Validate input data
-
- if (fIsLive && fLiveGroup != null) {
- String liveDelayText = fLiveDelayText.getText();
- try {
- fLiveDelay = liveDelayText.equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.valueOf(liveDelayText);
- fLivePort = Integer.valueOf(fLivePortText.getText());
- fLiveUrl = fLiveHostAddressText.getText();
- } catch (NumberFormatException e) {
- setErrorMessage(Messages.TraceControl_InvalidLiveDelayError);
- return;
- }
- }
-
- fTracePath = fTracePathText.getText();
-
- if (fControlProtocolCombo.getSelectionIndex() < 0) {
- setErrorMessage("Control Protocol Text is empty\n"); //$NON-NLS-1$
- return;
- }
-
- if ("".equals(fControlHostAddressText.getText())) { //$NON-NLS-1$
- setErrorMessage("Control Address Text is empty\n"); //$NON-NLS-1$
- return;
- }
-
- if (!fLinkDataWithControlButton.getSelection()) {
- if (fDataProtocolCombo.getSelectionIndex() < 0) {
- setErrorMessage("Data Protocol Text is empty\n"); //$NON-NLS-1$
- return;
- }
-
- if ("".equals(fDataHostAddressText.getText())) { //$NON-NLS-1$
- setErrorMessage("Data Address Text is empty\n"); //$NON-NLS-1$
- return;
- }
-
- fControlUrl = getUrlString(fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()),
- fControlHostAddressText.getText(),
- fControlPortText.getText(),
- null,
- fTracePath);
-
- fDataUrl = getUrlString(fDataProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()),
- fDataHostAddressText.getText(),
- null,
- fDataPortText.getText(),
- fTracePath);
- } else {
- fNetworkUrl = getUrlString(fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()),
- fControlHostAddressText.getText(),
- fControlPortText.getText(),
- fDataPortText.getText(),
- fTracePath);
- }
- }
-
- if (fIsLive && fNetworkUrl == null && fControlUrl == null && fDataUrl == null) {
- fNetworkUrl = SessionInfo.DEFAULT_LIVE_NETWORK_URK;
- }
-
- // Check for invalid names
- if (!"".equals(fSessionName) && !fSessionName.matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$ //$NON-NLS-2$
- setErrorMessage(Messages.TraceControl_InvalidSessionNameError + " (" + fSessionName + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // Check if node with name already exists in parent
- if(fParent.containsChild(fSessionName)) {
- setErrorMessage(Messages.TraceControl_SessionAlreadyExistsError + " (" + fSessionName + ")"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
- }
-
- private static String getUrlString(String proto, String host, String ctrlPort, String dataPort, String sessionPath) {
- //proto://[HOST|IP][:PORT1[:PORT2]][/TRACE_PATH]
- StringBuilder stringBuilder = new StringBuilder();
- stringBuilder.append(proto);
- stringBuilder.append("://"); //$NON-NLS-1$
- stringBuilder.append(host);
-
- if ((ctrlPort != null) && (!"".equals(ctrlPort))) { //$NON-NLS-1$
- stringBuilder.append(":"); //$NON-NLS-1$
- stringBuilder.append(ctrlPort);
- }
-
- if ((dataPort != null) && (!"".equals(dataPort))) { //$NON-NLS-1$
- stringBuilder.append(":"); //$NON-NLS-1$
- stringBuilder.append(dataPort);
- }
-
- if ((sessionPath != null) && (!"".equals(sessionPath))) { //$NON-NLS-1$
- stringBuilder.append("/"); //$NON-NLS-1$
- stringBuilder.append(sessionPath);
- }
- return stringBuilder.toString();
- }
-
- private static class CopyModifyListener implements ModifyListener {
- private Text fSource;
- private Text fDestination;
-
- public CopyModifyListener(Text source, Text destination) {
- fSource = source;
- fDestination = destination;
- }
-
- @Override
- public void modifyText(ModifyEvent e) {
- fDestination.setText(fSource.getText());
- }
- }
-
- private class ControlProtocolSelectionListener extends SelectionAdapter {
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- fDataProtocolCombo.select(fControlProtocolCombo.getSelectionIndex());
- if (fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.file.name())) {
- fControlPortText.setText(""); //$NON-NLS-1$
- fDataPortText.setText(""); //$NON-NLS-1$
- fControlPortText.setEnabled(false);
- fDataPortText.setEnabled(false);
- } else {
- fControlPortText.setEnabled(true);
- fDataPortText.setEnabled(true);
- }
- }
- }
-
- private class ProtocolComboSelectionListener extends SelectionAdapter {
-
- private CCombo fCombo;
- private Text fPortText;
-
- public ProtocolComboSelectionListener(CCombo combo, Text portText) {
- fCombo = combo;
- fPortText = portText;
- }
-
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fCombo.getItem(fCombo.getSelectionIndex()).equals(StreamingProtocol.net.name()) ||
- fCombo.getItem(fCombo.getSelectionIndex()).equals(StreamingProtocol.net6.name())) {
- fPortText.setText(""); //$NON-NLS-1$
- fPortText.setEnabled(false);
- } else {
- fPortText.setEnabled(true);
- }
- }
- }
-
- @Override
- public ISessionInfo getParameters() {
- ISessionInfo sessionInfo = new SessionInfo(fSessionName);
-
- boolean isStreaming = (fIsAdvancedEnabled && fStreamingComposite != null) || fIsLive;
- if (isStreaming) {
- sessionInfo.setNetworkUrl(fNetworkUrl);
- sessionInfo.setControlUrl(fControlUrl);
- sessionInfo.setDataUrl(fDataUrl);
- sessionInfo.setStreamedTrace(true);
- } else if (!fIsDefaultPath) {
- sessionInfo.setSessionPath(fSessionPath);
- }
-
- sessionInfo.setLive(fIsLive);
- sessionInfo.setLiveUrl(fLiveUrl);
- sessionInfo.setLivePort(fLivePort);
- sessionInfo.setLiveDelay(fLiveDelay);
- sessionInfo.setSnapshot(fIsSnapshot);
-
- return sessionInfo;
- }
-
- private final class UpdateEnablementModifyListener implements ModifyListener {
- @Override
- public void modifyText(ModifyEvent e) {
- updateEnablement();
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Simon Delisle - Updated for support of LTTng Tools 2.2
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.FocusEvent;
-import org.eclipse.swt.events.FocusListener;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * <p>
- * Dialog box for collecting channel information when enabling a channel (which will be created).
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableChannelDialog extends Dialog implements IEnableChannelDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The icon file for this dialog box.
- */
- public static final String ENABLE_CHANNEL_ICON_FILE = "icons/elcl16/add_button.gif"; //$NON-NLS-1$
-
- /**
- * To indicate that the default value will be used for this field
- */
- private static final String DEFAULT_TEXT = "<" + Messages.EnableChannelDialog_DefaultMessage + ">"; //$NON-NLS-1$ //$NON-NLS-2$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The text widget for the channel name
- */
- private Text fChannelNameText = null;
- /**
- * The discard mode of the channel.
- */
- private Button fDiscardModeButton = null;
- /**
- * The overwrite mode of the channel.
- */
- private Button fOverwriteModeButton = null;
- /**
- * The sub-buffer size of the channel.
- */
- private Text fSubBufferSizeText = null;
- /**
- * The number of sub-buffers of the channel.
- */
- private Text fNumberOfSubBuffersText = null;
- /**
- * The switch timer interval of the channel.
- */
- private Text fSwitchTimerText = null;
- /**
- * The read timer interval of the channel.
- */
- private Text fReadTimerText = null;
- /**
- * Radio button for selecting kernel domain.
- */
- private Button fKernelButton = null;
- /**
- * Radio button for selecting UST domain.
- */
- private Button fUstButton = null;
- /**
- * The parent domain component where the channel node should be added.
- * Null in case of creation on session level.
- */
- private TraceDomainComponent fDomain = null;
- /**
- * The target node component
- */
- private TargetNodeComponent fTargetNodeComponent = null;
- /**
- * Common verify listener for numeric text input.
- */
- private VerifyListener fVerifyListener = null;
- /**
- * Common focus listener
- */
- private FocusListener fFocusListener = null;
- /**
- * Output channel information.
- */
- private IChannelInfo fChannelInfo = null;
- /**
- * Output domain information. True in case of Kernel domain. False for UST.
- */
- private boolean fIsKernel;
- /**
- * Flag which indicates whether Kernel domain is available or not
- */
- private boolean fHasKernel;
- /**
- * Maximum size of trace files of the channel.
- */
- private Text fMaxSizeTraceText = null;
- /**
- * Maximum number of trace files of the channel.
- */
- private Text fMaxNumberTraceText = null;
- /**
- * CheckBox for selecting shared buffers (kernel onlyu).
- */
- private Button fSharedBuffersButton = null;
- /**
- * CheckBox for selecting per UID buffers.
- */
- private Button fPIDBuffersButton = null;
- /**
- * CheckBox for selecting per UID buffers.
- */
- private Button fUIDBuffersButton = null;
- /**
- * CheckBox to configure metadata channel
- */
- private Button fMetadataChannelButton = null;
- /**
- * Previous channel name
- */
- private String fPreviousChannelName = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public EnableChannelDialog(Shell shell) {
- super(shell);
- fIsKernel = true;
-
- // Common verify listener
- fVerifyListener = new VerifyListener() {
- @Override
- public void verifyText(VerifyEvent e) {
- // only numbers and default are allowed.
- e.doit = e.text.matches("[0-9]*") || e.text.matches(DEFAULT_TEXT); //$NON-NLS-1$
- }
- };
-
- // Common focus listener
- fFocusListener = new FocusListener() {
-
- @Override
- public void focusLost(FocusEvent e) {
- Text focusLostWidget = (Text) e.widget;
- if (focusLostWidget.getText().isEmpty()) {
- focusLostWidget.setText(DEFAULT_TEXT);
- focusLostWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- }
- }
-
- @Override
- public void focusGained(FocusEvent e) {
- Text focusGainedWidget = (Text) e.widget;
- if (focusGainedWidget.getText().equals(DEFAULT_TEXT)) {
- focusGainedWidget.setText(""); //$NON-NLS-1$
- focusGainedWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_BLACK));
- }
- }
- };
-
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public IChannelInfo getChannelInfo() {
- return fChannelInfo;
- }
-
- @Override
- public void setDomainComponent(TraceDomainComponent domain) {
- fDomain = domain;
- if (fDomain != null) {
- fIsKernel = fDomain.isKernel();
- } else {
- fIsKernel = true;
- }
- }
-
- @Override
- public boolean isKernel() {
- return fIsKernel;
- }
-
- @Override
- public void setHasKernel(boolean hasKernel) {
- if (fDomain != null) {
- fIsKernel = fDomain.isKernel();
- } else {
- fIsKernel = hasKernel;
- }
-
- fHasKernel = hasKernel;
- }
-
- @Override
- public void setTargetNodeComponent(TargetNodeComponent node) {
- fTargetNodeComponent = node;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_EnableChannelDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(ENABLE_CHANNEL_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- int numColumn = 2;
- if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
- numColumn = 3;
- }
-
- // Main dialog panel
- Composite dialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- dialogComposite.setLayout(layout);
-
- Composite commonModeGroup = new Composite(dialogComposite, SWT.NONE);
- layout = new GridLayout(3, true);
- commonModeGroup.setLayout(layout);
-
- Label channelNameLabel = new Label(commonModeGroup, SWT.RIGHT);
- channelNameLabel.setText(Messages.TraceControl_EnableChannelNameLabel);
- fChannelNameText = new Text(commonModeGroup, SWT.NONE);
- fChannelNameText.setToolTipText(Messages.TraceControl_EnableChannelNameTooltip);
-
- Label subBufferSizeLabel = new Label(commonModeGroup, SWT.RIGHT);
- subBufferSizeLabel.setText(Messages.TraceControl_SubBufferSizePropertyName);
- fSubBufferSizeText = new Text(commonModeGroup, SWT.NONE);
- fSubBufferSizeText.setToolTipText(Messages.TraceControl_EnableChannelSubBufferSizeTooltip);
- fSubBufferSizeText.addVerifyListener(fVerifyListener);
- fSubBufferSizeText.addFocusListener(fFocusListener);
- fSubBufferSizeText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
-
- Label numSubBufferLabel = new Label(commonModeGroup, SWT.RIGHT);
- numSubBufferLabel.setText(Messages.TraceControl_NbSubBuffersPropertyName);
- fNumberOfSubBuffersText = new Text(commonModeGroup, SWT.NONE);
- fNumberOfSubBuffersText.setToolTipText(Messages.TraceControl_EnableChannelNbSubBuffersTooltip);
- fNumberOfSubBuffersText.addVerifyListener(fVerifyListener);
- fNumberOfSubBuffersText.addFocusListener(fFocusListener);
-
- Label switchTimerLabel = new Label(commonModeGroup, SWT.RIGHT);
- switchTimerLabel.setText(Messages.TraceControl_SwitchTimerPropertyName);
- fSwitchTimerText = new Text(commonModeGroup, SWT.NONE);
- fSwitchTimerText.setToolTipText(Messages.TraceControl_EnableChannelSwitchTimerTooltip);
- fSwitchTimerText.addVerifyListener(fVerifyListener);
- fSwitchTimerText.addFocusListener(fFocusListener);
-
- Label readTimerLabel = new Label(commonModeGroup, SWT.RIGHT);
- readTimerLabel.setText(Messages.TraceControl_ReadTimerPropertyName);
- fReadTimerText = new Text(commonModeGroup, SWT.NONE);
- fReadTimerText.setToolTipText(Messages.TraceControl_EnableChannelReadTimerTooltip);
- fReadTimerText.addVerifyListener(fVerifyListener);
- fReadTimerText.addFocusListener(fFocusListener);
-
- if (fTargetNodeComponent.isTraceFileRotationSupported()) {
- Label maxSizeTraceFilesLabel = new Label(commonModeGroup, SWT.RIGHT);
- maxSizeTraceFilesLabel.setText(Messages.TraceControl_MaxSizeTraceFilesPropertyName);
- fMaxSizeTraceText = new Text(commonModeGroup, SWT.NONE);
- fMaxSizeTraceText.setToolTipText(Messages.TraceControl_EnbleChannelMaxSizeTraceFilesTooltip);
- fMaxSizeTraceText.addVerifyListener(fVerifyListener);
- fMaxSizeTraceText.addFocusListener(fFocusListener);
-
- Label maxNumTraceFilesLabel = new Label(commonModeGroup, SWT.RIGHT);
- maxNumTraceFilesLabel.setText(Messages.TraceControl_MaxNumTraceFilesPropertyName);
- fMaxNumberTraceText = new Text(commonModeGroup, SWT.NONE);
- fMaxNumberTraceText.setToolTipText(Messages.TraceControl_EnbleChannelMaxNumTraceFilesTooltip);
- fMaxNumberTraceText.addVerifyListener(fVerifyListener);
- fMaxNumberTraceText.addFocusListener(fFocusListener);
- }
-
- if (fTargetNodeComponent.isPeriodicalMetadataFlushSupported()) {
- fMetadataChannelButton = new Button(commonModeGroup, SWT.CHECK);
- fMetadataChannelButton.setText(Messages.TraceControl_ConfigureMetadataChannelName);
- fMetadataChannelButton.setSelection(false);
-
- fMetadataChannelButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fMetadataChannelButton.getSelection()) {
- fPreviousChannelName = fChannelNameText.getText();
- fChannelNameText.setText("metadata"); //$NON-NLS-1$
- fChannelNameText.setEnabled(false);
- } else {
- fChannelNameText.setText(fPreviousChannelName);
- fChannelNameText.setEnabled(true);
- }
- }
- });
- }
- Group discardModeGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- discardModeGroup.setText(Messages.TraceControl_EnableChannelDiscardModeGroupName);
- layout = new GridLayout(numColumn, true);
- discardModeGroup.setLayout(layout);
-
- fDiscardModeButton = new Button(discardModeGroup, SWT.RADIO);
- fDiscardModeButton.setText(Messages.TraceControl_EnableChannelDiscardModeLabel);
- fDiscardModeButton.setToolTipText(Messages.TraceControl_EnableChannelDiscardModeTooltip);
- fDiscardModeButton.setSelection(true);
-
- fOverwriteModeButton = new Button(discardModeGroup, SWT.RADIO);
- fOverwriteModeButton.setText(Messages.TraceControl_EnableChannelOverwriteModeLabel);
- fOverwriteModeButton.setToolTipText(Messages.TraceControl_EnableChannelOverwriteModeTooltip);
- fOverwriteModeButton.setSelection(false);
-
- Group domainGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- domainGroup.setText(Messages.TraceControl_DomainDisplayName);
- layout = new GridLayout(numColumn, true);
- domainGroup.setLayout(layout);
-
- fKernelButton = new Button(domainGroup, SWT.RADIO);
- fKernelButton.setText(Messages.TraceControl_KernelDomainDisplayName);
- fKernelButton.setSelection(fIsKernel);
- fUstButton = new Button(domainGroup, SWT.RADIO);
- fUstButton.setText(Messages.TraceControl_UstDisplayName);
- fUstButton.setSelection(!fIsKernel);
-
- if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
- Group bufferTypeGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- bufferTypeGroup.setText(Messages.TraceControl_BufferTypeDisplayName);
- layout = new GridLayout(numColumn, true);
- bufferTypeGroup.setLayout(layout);
-
- GridData data = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
- data.horizontalSpan = 3;
- bufferTypeGroup.setLayoutData(data);
-
- fSharedBuffersButton = new Button(bufferTypeGroup, SWT.RADIO);
- fSharedBuffersButton.setText(Messages.TraceControl_SharedBuffersDisplayName);
- fSharedBuffersButton.setSelection(fIsKernel);
- fSharedBuffersButton.setEnabled(false);
-
- fPIDBuffersButton = new Button(bufferTypeGroup, SWT.RADIO);
- fPIDBuffersButton.setText(Messages.TraceControl_PerPidBuffersDisplayName);
- fPIDBuffersButton.setToolTipText(Messages.TraceControl_PerPidBuffersTooltip);
- fPIDBuffersButton.setSelection(false);
-
- fUIDBuffersButton = new Button(bufferTypeGroup, SWT.RADIO);
- fUIDBuffersButton.setText(Messages.TraceControl_PerUidBuffersDisplayName);
- fUIDBuffersButton.setToolTipText(Messages.TraceControl_PerPidBuffersTooltip);
- fUIDBuffersButton.setSelection(false);
-
- fUIDBuffersButton.setEnabled(!fIsKernel);
- fPIDBuffersButton.setEnabled(!fIsKernel);
-
- // Update buffers type buttons depending on UST or Kernel
- fUstButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fUstButton.getSelection()) {
- fSharedBuffersButton.setSelection(false);
- fPIDBuffersButton.setSelection(false);
- fUIDBuffersButton.setSelection(false);
- fPIDBuffersButton.setEnabled(true);
- fUIDBuffersButton.setEnabled(true);
- } else {
- fSharedBuffersButton.setSelection(true);
- fPIDBuffersButton.setSelection(false);
- fUIDBuffersButton.setSelection(false);
- fPIDBuffersButton.setEnabled(false);
- fUIDBuffersButton.setEnabled(false);
- }
- }
- });
- }
-
- if ((fDomain != null) || (!fHasKernel)) {
- fKernelButton.setEnabled(false);
- fUstButton.setEnabled(false);
-
- if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
- fSharedBuffersButton.setEnabled(false);
- fUIDBuffersButton.setEnabled(!fHasKernel);
- fPIDBuffersButton.setEnabled(!fHasKernel);
- setBufferTypeButtonSelection();
- }
- }
-
- // layout widgets
- GridData data = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
- data.horizontalSpan = 3;
- discardModeGroup.setLayoutData(data);
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fDiscardModeButton.setLayoutData(data);
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fOverwriteModeButton.setLayoutData(data);
-
- data = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
- data.horizontalSpan = 3;
- domainGroup.setLayoutData(data);
-
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fKernelButton.setLayoutData(data);
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fUstButton.setLayoutData(data);
- if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fSharedBuffersButton.setLayoutData(data);
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fPIDBuffersButton.setLayoutData(data);
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fUIDBuffersButton.setLayoutData(data);
- }
-
- if (fTargetNodeComponent.isPeriodicalMetadataFlushSupported()) {
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- data.horizontalSpan = numColumn;
- fMetadataChannelButton.setLayoutData(data);
- }
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
-
- fChannelNameText.setLayoutData(data);
- fSubBufferSizeText.setLayoutData(data);
- fNumberOfSubBuffersText.setLayoutData(data);
- fSwitchTimerText.setLayoutData(data);
- fReadTimerText.setLayoutData(data);
- if (fTargetNodeComponent.isTraceFileRotationSupported()) {
- fMaxNumberTraceText.setLayoutData(data);
- fMaxSizeTraceText.setLayoutData(data);
- }
-
- setDefaults();
-
- return dialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.DETAILS_ID, "&Default", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- @Override
- protected void okPressed() {
- // Set channel information
- ChannelInfo channelInfo = new ChannelInfo(fChannelNameText.getText());
- channelInfo.setSubBufferSize(fSubBufferSizeText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.parseLong(fSubBufferSizeText.getText()));
- channelInfo.setNumberOfSubBuffers(fNumberOfSubBuffersText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.parseInt(fNumberOfSubBuffersText.getText()));
- channelInfo.setSwitchTimer(fSwitchTimerText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.parseLong(fSwitchTimerText.getText()));
- channelInfo.setReadTimer(fReadTimerText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.parseLong(fReadTimerText.getText()));
- channelInfo.setOverwriteMode(fOverwriteModeButton.getSelection());
- if (fTargetNodeComponent.isTraceFileRotationSupported()) {
- channelInfo.setMaxSizeTraceFiles(fMaxSizeTraceText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.parseInt(fMaxSizeTraceText.getText()));
- channelInfo.setMaxNumberTraceFiles(fMaxNumberTraceText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.parseInt(fMaxNumberTraceText.getText()));
- }
- if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
- if (fSharedBuffersButton.getSelection()) {
- channelInfo.setBufferType(BufferType.BUFFER_SHARED);
- } else if (fPIDBuffersButton.getSelection()) {
- channelInfo.setBufferType(BufferType.BUFFER_PER_PID);
- } else if (fUIDBuffersButton.getSelection()) {
- channelInfo.setBufferType(BufferType.BUFFER_PER_UID);
- } else {
- channelInfo.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
- }
- }
-
- fIsKernel = fKernelButton.getSelection();
-
- // Check for invalid names
- if (!channelInfo.getName().matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableChannelDialogTitle,
- Messages.TraceControl_InvalidChannelNameError + " (" + channelInfo.getName() + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // Check for duplicate names
- if (fDomain != null && fDomain.containsChild(channelInfo.getName())) {
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableChannelDialogTitle,
- Messages.TraceControl_ChannelAlreadyExistsError + " (" + channelInfo.getName() + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- fChannelInfo = channelInfo;
-
- // validation successful -> call super.okPressed()
- super.okPressed();
- }
-
- @Override
- protected void buttonPressed(int buttonId) {
- if (buttonId == IDialogConstants.DETAILS_ID) {
- setDefaults();
- return;
- }
- super.buttonPressed(buttonId);
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
-
- /**
- * Sets default value depending on Kernel or UST
- */
- private void setDefaults() {
- fSwitchTimerText.setText(DEFAULT_TEXT);
- fSwitchTimerText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- fReadTimerText.setText(DEFAULT_TEXT);
- fReadTimerText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- fOverwriteModeButton.setSelection(IChannelInfo.DEFAULT_OVERWRITE_MODE);
- if (fTargetNodeComponent.isTraceFileRotationSupported()) {
- fMaxSizeTraceText.setText(DEFAULT_TEXT);
- fMaxSizeTraceText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- fMaxNumberTraceText.setText(DEFAULT_TEXT);
- fMaxNumberTraceText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- }
- fSubBufferSizeText.setText(DEFAULT_TEXT);
- fSubBufferSizeText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- fNumberOfSubBuffersText.setText(DEFAULT_TEXT);
- fNumberOfSubBuffersText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
- if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
- setBufferTypeButtonSelection();
- }
- }
-
- private void setBufferTypeButtonSelection() {
- if ((fDomain != null) && fDomain.getBufferType() != null) {
- switch (fDomain.getBufferType()) {
- case BUFFER_PER_PID:
- fPIDBuffersButton.setSelection(true);
- break;
- case BUFFER_PER_UID:
- fUIDBuffersButton.setSelection(true);
- break;
- case BUFFER_SHARED:
- fSharedBuffersButton.setSelection(true);
- break;
- //$CASES-OMITTED$
- default:
- break;
- }
- }
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.List;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * <p>
- * Dialog box for collecting information events to be enabled.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableEventsDialog extends Dialog implements IEnableEventsDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * The icon file for this dialog box.
- */
- public static final String ENABLE_EVENT_ICON_FILE = "icons/elcl16/enable_event.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The dialog composite.
- */
- private Composite fDialogComposite;
- /**
- * The composite with widgets for collecting information about kernel events.
- */
- private EnableKernelEventComposite fKernelComposite;
- /**
- * The composite with widgets for collecting information about UST events.
- */
- private EnableUstEventsComposite fUstComposite;
- /**
- * Radio button for selecting kernel domain.
- */
- private Button fKernelButton;
- /**
- * Radio button for selecting UST domain.
- */
- private Button fUstButton;
- /**
- * The referenced trace provider group containing the kernel provider and UST
- * provider component which contains a list of available tracepoints.
- */
- private TraceProviderGroup fProviderGroup;
- /**
- * The parent domain component where the channel node should be added.
- * Null in case the domain is not known (i.e. on session level).
- */
- private TraceDomainComponent fDomain;
- /**
- * Output domain information. True in case of Kernel domain. False for UST.
- */
- private boolean fIsKernel;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public EnableEventsDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public boolean isTracepoints() {
- if (fIsKernel) {
- return fKernelComposite.isTracepoints();
- }
- return fUstComposite.isTracepoints();
- }
-
- @Override
- public boolean isAllTracePoints() {
- if (fIsKernel) {
- return fKernelComposite.isAllTracePoints();
- }
- return fUstComposite.isAllTracePoints();
- }
-
- @Override
- public boolean isSysCalls() {
- if (fIsKernel) {
- return fKernelComposite.isSysCalls();
- }
- return false;
- }
-
- @Override
- public boolean isAllSysCalls() {
- if (fIsKernel) {
- return fKernelComposite.isSysCalls();
- }
- return false;
- }
-
- @Override
- public List<String> getEventNames() {
- if (fIsKernel) {
- return fKernelComposite.getEventNames();
- }
- return fUstComposite.getEventNames();
- }
-
- @Override
- public boolean isDynamicProbe() {
- if (fIsKernel) {
- return fKernelComposite.isDynamicProbe();
- }
- return false;
- }
-
- @Override
- public String getProbeName() {
- if (fIsKernel) {
- return fKernelComposite.getProbeName();
- }
- return null;
- }
-
- @Override
- public String getProbeEventName() {
- if (fIsKernel) {
- return fKernelComposite.getProbeEventName();
- }
- return null;
- }
-
- @Override
- public boolean isDynamicFunctionProbe() {
- if (fIsKernel) {
- return fKernelComposite.isDynamicFunctionProbe();
- }
- return false;
- }
-
- @Override
- public String getFunctionEventName() {
- if (fIsKernel) {
- return fKernelComposite.getFunctionEventName();
- }
- return null;
- }
-
- @Override
- public String getFunction() {
- if (fIsKernel) {
- return fKernelComposite.getFunction();
- }
- return null;
- }
-
- @Override
- public boolean isWildcard() {
- if (!fIsKernel) {
- return fUstComposite.isWildcard();
- }
- return false;
- }
-
- @Override
- public String getWildcard() {
- if (!fIsKernel) {
- return fUstComposite.getWildcard();
- }
- return null;
- }
-
- @Override
- public boolean isLogLevel() {
- if (!fIsKernel) {
- return fUstComposite.isLogLevel();
- }
- return false;
- }
-
- @Override
- public LogLevelType getLogLevelType() {
- if (!fIsKernel) {
- return fUstComposite.getLogLevelType();
- }
- return null;
- }
-
- @Override
- public TraceLogLevel getLogLevel() {
- if (!fIsKernel) {
- return fUstComposite.getLogLevel();
- }
- return null;
- }
-
- @Override
- public String getLogLevelEventName() {
- if (!fIsKernel) {
- return fUstComposite.getLogLevelEventName();
- }
- return null;
- }
-
- @Override
- public boolean isKernel() {
- return fIsKernel;
- }
-
- @Override
- public void setTraceProviderGroup(TraceProviderGroup providerGroup) {
- fProviderGroup = providerGroup;
- }
-
- @Override
- public void setTraceDomainComponent(TraceDomainComponent domain) {
- fDomain = domain;
- if (fDomain != null) {
- fIsKernel = fDomain.isKernel();
- } else {
- fIsKernel = fProviderGroup != null ? fProviderGroup.hasKernelProvider() : true;
- }
- }
-
- @Override
- public String getFilterExpression() {
- if (!fIsKernel) {
- return fUstComposite.getFilterExpression();
- }
- return null;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_EnableEventsDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(ENABLE_EVENT_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- fDialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- fDialogComposite.setLayout(layout);
- fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // ------------------------------------------------------------------------
- // Domain Group
- // ------------------------------------------------------------------------
- Group domainGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- domainGroup.setText(Messages.TraceControl_DomainDisplayName);
- layout = new GridLayout(2, true);
- domainGroup.setLayout(layout);
-
- fKernelButton = new Button(domainGroup, SWT.RADIO);
- fKernelButton.setText(Messages.TraceControl_KernelDomainDisplayName);
- fKernelButton.setSelection(fIsKernel);
- fUstButton = new Button(domainGroup, SWT.RADIO);
- fUstButton.setText(Messages.TraceControl_UstDisplayName);
- fUstButton.setSelection(!fIsKernel);
-
- if ((fDomain != null) || ((fProviderGroup != null) && (!fProviderGroup.hasKernelProvider()))) {
- fKernelButton.setEnabled(false);
- fUstButton.setEnabled(false);
- }
-
- // layout widgets
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- domainGroup.setLayoutData(data);
-
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fKernelButton.setLayoutData(data);
- data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
- fUstButton.setLayoutData(data);
-
- // ------------------------------------------------------------------------
- // Kernel or UST event data group
- // ------------------------------------------------------------------------
- fUstComposite = null;
- fKernelComposite = null;
- if (fIsKernel) {
- createKernelComposite();
- fUstComposite = null;
- } else {
- createUstComposite();
- }
-
- fKernelButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fKernelButton.getSelection()) {
- disposeUstComposite();
- createKernelComposite();
- fDialogComposite.layout();
- }
- }
- });
-
- fUstButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fUstButton.getSelection()) {
- disposeKernelComposite();
- createUstComposite();
- fDialogComposite.layout();
- }
- }
- });
-
- getShell().setMinimumSize(new Point(500, 650));
-
- return fDialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- @Override
- protected void okPressed() {
- fIsKernel = fKernelButton.getSelection();
-
- // Validate kernel composite in case of kernel domain
- if (fKernelComposite != null && !fKernelComposite.isValid()) {
- return;
- }
-
- // Validate UST composite in case of UST domain
- if (fUstComposite != null && !fUstComposite.isValid()) {
- return;
- }
-
- // validation successful -> call super.okPressed()
- super.okPressed();
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
-
- /**
- * Creates the kernel composite (if not existing)
- */
- private void createKernelComposite() {
- if (fKernelComposite == null) {
- fKernelComposite = new EnableKernelEventComposite(fDialogComposite, SWT.NONE, fProviderGroup);
- GridLayout layout = new GridLayout(1, true);
- fKernelComposite.setLayout(layout);
- fKernelComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- fKernelComposite.createContent();
- }
- }
-
- /**
- * Disposes the kernel composite (if existing)
- */
- private void disposeKernelComposite() {
- if (fKernelComposite != null) {
- fKernelComposite.dispose();
- fKernelComposite = null;
- }
- }
-
- /**
- * Creates the UST composite (if not existing)
- */
- private void createUstComposite() {
- if (fUstComposite == null) {
- fUstComposite = new EnableUstEventsComposite(fDialogComposite, SWT.NONE, fProviderGroup);
- GridLayout layout = new GridLayout(1, true);
- fUstComposite.setLayout(layout);
- fUstComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- fUstComposite.createContent();
- }
- }
-
- /**
- * Disposes the UST composite (if existing)
- */
- private void disposeUstComposite() {
- if (fUstComposite != null) {
- fUstComposite.dispose();
- fUstComposite = null;
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Marc-Andre Laperle - Add filtering textbox
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlContentProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlLabelProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-/**
- * <p>
- * A composite for collecting information about kernel events to be enabled.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableKernelEventComposite extends Composite implements IEnableKernelEvents {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- private enum KernelGroupEnum { TRACEPOINTS, SYSCALLS, PROBE, FUNCTION }
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * A button to enable/disable the tracepoints group
- */
- private Button fTracepointsActivateButton;
- /**
- * A tree viewer for displaying and selection of available tracepoints.
- */
- private CheckboxTreeViewer fTracepointsViewer;
- /**
- * A button to enable/disable the syscalls group
- */
- private Button fSysCallsActivateButton;
- /**
- * A button to enable or disable the dynamic probe group.
- */
- private Button fProbeActivateButton;
- /**
- * The text field for the event name for the dynamic probe.
- */
- private Text fProbeEventNameText;
- /**
- * The text field for the dynamic probe.
- */
- private Text fProbeText;
- /**
- * A button to enable or disable the dynamic function probe group.
- */
- private Button fFunctionActivateButton;
- /**
- * The text field for the event name for the dynamic probe.
- */
- private Text fFunctionEventNameText;
- /**
- * The text field for the dynamic function entry/return probe.
- */
- private Text fFunctionText;
- /**
- * The referenced trace provider group containing the kernel provider
- * component which contains a list of available tracepoints.
- */
- private final TraceProviderGroup fProviderGroup;
- /**
- * The flag indicating that tracepoints are selected.
- */
- private boolean fIsTracepoints;
- /**
- * The flag indicating that all tracepoints are selected.
- */
- private boolean fIsAllTracepoints;
- /**
- * The flag indicating that syscalls are selected.
- */
- private boolean fIsSysCalls;
- /**
- * The list of tracepoints to be enabled.
- */
- private List<String> fSelectedEvents;
- /**
- * The flag indicating that dynamic probe is selected.
- */
- private boolean fIsDynamicProbe;
- /**
- * The event name of the dynamic probe.
- */
- private String fProbeEventName;
- /**
- * The dynamic probe.
- */
- private String fProbeString;
- /**
- * The flag indicating that the dynamic function probe is selected.
- */
- private boolean fIsDynamicFunctionProbe;
- /**
- * The event name of the dynamic function entry/return probe.
- */
- private String fFunctionEventName;
- /**
- * The dynamic function entry/return probe.
- */
- private String fFunctionString;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param parent
- * The parent composite
- * @param style
- * The index of the style for this event composite
- * @param providerGroup
- * The trace provider group
- */
- public EnableKernelEventComposite(Composite parent, int style, TraceProviderGroup providerGroup) {
- super(parent, style);
- fProviderGroup = providerGroup;
- }
-
- // ------------------------------------------------------------------------
- // Acessors
- // ------------------------------------------------------------------------
-
- @Override
- public boolean isTracepoints() {
- return fIsTracepoints;
- }
-
- @Override
- public boolean isAllTracePoints() {
- return fIsAllTracepoints;
- }
-
- @Override
- public boolean isSysCalls() {
- return fIsSysCalls;
- }
-
- @Override
- public boolean isAllSysCalls() {
- return fIsSysCalls;
- }
-
- @Override
- public List<String> getEventNames() {
- return new ArrayList<>(fSelectedEvents);
- }
-
- @Override
- public boolean isDynamicProbe() {
- return fIsDynamicProbe;
- }
-
- @Override
- public String getProbeName() {
- return fProbeString;
- }
-
- @Override
- public String getProbeEventName() {
- return fProbeEventName;
- }
-
- @Override
- public boolean isDynamicFunctionProbe() {
- return fIsDynamicFunctionProbe;
- }
-
- @Override
- public String getFunctionEventName() {
- return fFunctionEventName;
- }
-
- @Override
- public String getFunction() {
- return fFunctionString;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Creates the composite content
- */
- public void createContent() {
-
- // Tracepoints Group
- createTracepointsGroup();
-
- // Syscalls Group
- createSysCallsGroup();
-
- // Dynamic Probe Group
- createDynamicProbeGroup();
-
- // Dynamic Function Probe Group
- createDynamicFunctionPropeGroup();
-
- // Set default enablements
- setKernelEnablements(KernelGroupEnum.TRACEPOINTS);
- }
-
- /**
- * Validates the kernel composite input data.
- * @return true if configured data is valid and can be retrieved.
- */
- public boolean isValid() {
- fIsTracepoints = fTracepointsActivateButton.getSelection();
- fIsSysCalls = fSysCallsActivateButton.getSelection();
- fIsDynamicProbe = fProbeActivateButton.getSelection();
- fIsDynamicFunctionProbe = fFunctionActivateButton.getSelection();
-
- // initialize tracepoint fields
- fIsAllTracepoints = false;
- fSelectedEvents = new ArrayList<>();
-
- if (fIsTracepoints) {
- List<ITraceControlComponent> comps = fProviderGroup.getChildren(KernelProviderComponent.class);
- fIsAllTracepoints = fTracepointsViewer.getChecked(comps.get(0));
-
- Object[] checkedElements = fTracepointsViewer.getCheckedElements();
- for (int i = 0; i < checkedElements.length; i++) {
- ITraceControlComponent component = (ITraceControlComponent)checkedElements[i];
- if (component instanceof BaseEventComponent) {
- fSelectedEvents.add(component.getName());
- }
- }
- }
-
- if (fIsDynamicProbe) {
- String temp = fProbeEventNameText.getText();
- if (temp.isEmpty() ||
- fProbeText.getText().matches("\\s*") || //$NON-NLS-1$
- (!temp.matches("^[\\s]{0,}$") && !temp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableEventsDialogTitle,
- Messages.TraceControl_InvalidProbeNameError + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return false;
- }
-
- fProbeEventName = temp;
- // fProbeString will be validated by lttng-tools
- fProbeString = fProbeText.getText();
- }
-
- // initialize function string
- fFunctionEventName = null;
- fFunctionString = null;
- if (fIsDynamicFunctionProbe) {
- String functionTemp = fFunctionEventNameText.getText();
- if (functionTemp.isEmpty() ||
- functionTemp.matches("\\s*") || //$NON-NLS-1$
- (!functionTemp.matches("^[\\s]{0,}$") && !functionTemp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableEventsDialogTitle,
- Messages.TraceControl_InvalidProbeNameError + " (" + functionTemp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return false;
- }
-
- fFunctionEventName = functionTemp;
- // fFunctionString will be validated by lttng-tools
- fFunctionString = fFunctionText.getText();
- }
-
- return true;
- }
-
- /**
- * Creates tracepoints group.
- */
- private void createTracepointsGroup() {
-
- GridLayout layout;
- GridData data;
- Group tpMainGroup = new Group(this, SWT.SHADOW_NONE);
- tpMainGroup.setText(Messages.TraceControl_EnableEventsTracepointGroupName);
- layout = new GridLayout(2, false);
- tpMainGroup.setLayout(layout);
- data = new GridData(GridData.FILL_BOTH);
- tpMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(tpMainGroup, SWT.NONE);
- layout = new GridLayout(1, true);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fTracepointsActivateButton = new Button(buttonComposite, SWT.RADIO);
- fTracepointsActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fTracepointsActivateButton.setLayoutData(data);
- fTracepointsActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setKernelEnablements(KernelGroupEnum.TRACEPOINTS);
- }
- });
-
- Group tracepointsGroup = new Group(tpMainGroup, SWT.SHADOW_NONE);
- layout = new GridLayout(1, true);
- tracepointsGroup.setLayout(layout);
- data = new GridData(GridData.FILL_BOTH);
- tracepointsGroup.setLayoutData(data);
-
- new FilteredTree(tracepointsGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, new PatternFilter(), true) {
- @Override
- protected TreeViewer doCreateTreeViewer(Composite aparent, int style) {
- fTracepointsViewer = new CheckboxTreeViewer(aparent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- fTracepointsViewer.getTree().setToolTipText(Messages.TraceControl_EnableEventsTracepointTreeTooltip);
-
- fTracepointsViewer.setContentProvider(new KernelContentProvider());
- fTracepointsViewer.setLabelProvider(new KernelLabelProvider());
- fTracepointsViewer.addCheckStateListener(new KernelCheckListener());
- fTracepointsViewer.setInput(fProviderGroup);
-
- fTracepointsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- return fTracepointsViewer;
- }
- };
- }
-
- /**
- * Creates syscalls group.
- */
- private void createSysCallsGroup() {
- GridLayout layout;
- GridData data;
- Group sysCallsMainGroup = new Group(this, SWT.SHADOW_NONE);
- sysCallsMainGroup.setText(Messages.TraceControl_EnableEventsSyscallName);
- sysCallsMainGroup.setToolTipText(Messages.TraceControl_EnableEventsSyscallTooltip);
- layout = new GridLayout(2, false);
- sysCallsMainGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- sysCallsMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(sysCallsMainGroup, SWT.NONE);
- layout = new GridLayout(1, false);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fSysCallsActivateButton = new Button(buttonComposite, SWT.RADIO);
- fSysCallsActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- fSysCallsActivateButton.setToolTipText(Messages.TraceControl_EnableEventsSyscallTooltip);
- fSysCallsActivateButton.setSelection(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fSysCallsActivateButton.setLayoutData(data);
- fSysCallsActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setKernelEnablements(KernelGroupEnum.SYSCALLS);
- }
- });
- }
-
- /**
- * Creates dynamic probe group.
- */
- private void createDynamicProbeGroup() {
- GridLayout layout;
- GridData data;
- Group probeMainGroup = new Group(this, SWT.SHADOW_NONE);
- probeMainGroup.setText(Messages.TraceControl_EnableEventsProbeGroupName);
- layout = new GridLayout(2, false);
- probeMainGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- probeMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(probeMainGroup, SWT.NONE);
- layout = new GridLayout(1, false);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fProbeActivateButton = new Button(buttonComposite, SWT.RADIO);
- fProbeActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- fProbeActivateButton.setSelection(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fProbeActivateButton.setLayoutData(data);
- fProbeActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setKernelEnablements(KernelGroupEnum.PROBE);
- }
- });
-
- Group probeGroup = new Group(probeMainGroup, SWT.SHADOW_NONE);
- layout = new GridLayout(4, true);
- probeGroup.setLayout(layout);
- probeGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label probeNameLabel = new Label(probeGroup, SWT.LEFT);
- probeNameLabel.setText(Messages.TraceControl_EnableEventsEventNameLabel);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 1;
- probeNameLabel.setLayoutData(data);
-
- fProbeEventNameText = new Text(probeGroup, SWT.LEFT);
- fProbeEventNameText.setToolTipText(Messages.TraceControl_EnableEventsProbeEventNameTooltip);
-
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 3;
- fProbeEventNameText.setLayoutData(data);
-
- Label probeLabel = new Label(probeGroup, SWT.LEFT);
- probeLabel.setText(Messages.TraceControl_EnableEventsProbeNameLabel);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 1;
- probeLabel.setLayoutData(data);
-
- fProbeText = new Text(probeGroup, SWT.LEFT);
- fProbeText.setToolTipText(Messages.TraceControl_EnableEventsProbeNameTooltip);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 3;
- fProbeText.setLayoutData(data);
- }
-
- /**
- * Creates dynamic function entry/return probe group.
- */
- private void createDynamicFunctionPropeGroup() {
- GridLayout layout;
- GridData data;
- Group functionMainGroup = new Group(this, SWT.SHADOW_NONE);
- functionMainGroup.setText(Messages.TraceControl_EnableEventsFucntionGroupName);
- layout = new GridLayout(2, false);
- functionMainGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- functionMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(functionMainGroup, SWT.NONE);
- layout = new GridLayout(1, false);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fFunctionActivateButton = new Button(buttonComposite, SWT.RADIO);
- fFunctionActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- fFunctionActivateButton.setSelection(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fFunctionActivateButton.setLayoutData(data);
- fFunctionActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setKernelEnablements(KernelGroupEnum.FUNCTION);
- }
- });
-
- Group functionGroup = new Group(functionMainGroup, SWT.SHADOW_NONE);
- layout = new GridLayout(4, true);
- functionGroup.setLayout(layout);
- functionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label functionNameLabel = new Label(functionGroup, SWT.LEFT);
- functionNameLabel.setText(Messages.TraceControl_EnableEventsEventNameLabel);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 1;
- functionNameLabel.setLayoutData(data);
-
- fFunctionEventNameText = new Text(functionGroup, SWT.LEFT);
- fFunctionEventNameText.setToolTipText(Messages.TraceControl_EnableEventsFunctionEventNameTooltip);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 3;
- fFunctionEventNameText.setLayoutData(data);
-
- Label functionLabel = new Label(functionGroup, SWT.LEFT);
- functionLabel.setText(Messages.TraceControl_EnableEventsFunctionNameLabel);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 1;
- functionLabel.setLayoutData(data);
-
- fFunctionText = new Text(functionGroup, SWT.LEFT);
- fFunctionText.setToolTipText(Messages.TraceControl_EnableEventsProbeNameTooltip);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 3;
- fFunctionText.setLayoutData(data);
- }
-
- /**
- * Enable/selects widgets depending on the group specified.
- * @param group - group to enable.
- */
- private void setKernelEnablements(KernelGroupEnum group) {
- fTracepointsActivateButton.setSelection(group == KernelGroupEnum.TRACEPOINTS);
- fTracepointsViewer.getTree().setEnabled(group == KernelGroupEnum.TRACEPOINTS);
-
- fSysCallsActivateButton.setSelection(group == KernelGroupEnum.SYSCALLS);
-
- fProbeActivateButton.setSelection(group == KernelGroupEnum.PROBE);
- fProbeEventNameText.setEnabled(group == KernelGroupEnum.PROBE);
- fProbeText.setEnabled(group == KernelGroupEnum.PROBE);
-
- fFunctionActivateButton.setSelection(group == KernelGroupEnum.FUNCTION);
- fFunctionEventNameText.setEnabled(group == KernelGroupEnum.FUNCTION);
- fFunctionText.setEnabled(group == KernelGroupEnum.FUNCTION);
- }
-
- // ------------------------------------------------------------------------
- // Local classes
- // ------------------------------------------------------------------------
- /**
- * Content provider for the tracepoints tree.
- */
- public static final class KernelContentProvider extends TraceControlContentProvider {
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof TraceProviderGroup) {
- List<ITraceControlComponent> children = ((ITraceControlComponent)parentElement).getChildren(KernelProviderComponent.class);
- return children.toArray(new ITraceControlComponent[children.size()]);
- }
- if (parentElement instanceof ITraceControlComponent) {
- return ((ITraceControlComponent)parentElement).getChildren();
- }
- return new Object[0];
- }
- }
-
- /**
- * Content label for the tracepoints tree.
- */
- public static final class KernelLabelProvider extends TraceControlLabelProvider {
- @Override
- public Image getImage(Object element) {
- return null;
- }
- @Override
- public String getText(Object element) {
- if ((element != null) && (element instanceof KernelProviderComponent)) {
- return Messages.TraceControl_EnableEventsTracepointTreeAllLabel;
- }
- return super.getText(element);
- }
- }
-
- /**
- * Check state listener for the tracepoints tree.
- */
- public final class KernelCheckListener implements ICheckStateListener {
- @Override
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- if (event.getElement() instanceof KernelProviderComponent) {
- fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
- }
- } else {
- if (event.getElement() instanceof KernelProviderComponent) {
- fTracepointsViewer.setSubtreeChecked(event.getElement(), false);
- } else {
- ITraceControlComponent component = (ITraceControlComponent) event.getElement();
- fTracepointsViewer.setChecked(component.getParent(), false);
- }
- }
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Marc-Andre Laperle - Add filtering textbox
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.viewers.TreeViewer;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlContentProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlLabelProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.ui.dialogs.FilteredTree;
-import org.eclipse.ui.dialogs.PatternFilter;
-
-/**
- * <p>
- * A composite for collecting information about UST events to be enabled.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableUstEventsComposite extends Composite implements IEnableUstEvents {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- private enum GroupEnum { TRACEPOINTS, WILDCARD, LOGLEVEL }
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * A button to enable/disable the tracepoints group
- */
- private Button fTracepointsActivateButton;
- /**
- * A tree viewer for diplaying and selection of available tracepoints.
- */
- private CheckboxTreeViewer fTracepointsViewer;
- /**
- * A button to enable/disable the wildcard group
- */
- private Button fWildcardActivateButton;
- /**
- * A Text field for the event's wildcard.
- */
- private Text fWildcardText;
- /**
- * A button to enable/disable the log level group
- */
- private Button fLogLevelActivateButton;
- /**
- * A Text field for the event name for the log level enablement.
- */
- private Text fLogLevelEventNameText;
- /**
- * A Combo box for selecting the log level.
- */
- private CCombo fLogLevelCombo;
- /**
- * A button for selecting the log level (range 0 to level).
- */
- private Button fLogLevelButton;
- /**
- * A button for selecting the specified log level only.
- */
- private Button fLogLevelOnlyButton;
- /**
- * The filter text
- */
- private Text fFilterText;
-
- /**
- * The referenced trace provider group containing the UST providers
- * component which contains a list of available tracepoints.
- */
- private final TraceProviderGroup fProviderGroup;
- /**
- * The flag indicating that tracepoints are selected.
- */
- private boolean fIsTracepoints;
- /**
- * The flag indicating that all tracepoints (across providers) are selected.
- */
- private boolean fIsAllTracepoints;
- /**
- * The list of tracepoints to be enabled.
- */
- private List<String> fSelectedEvents;
- /**
- * The flag indicating that all wildcard are selected..
- */
- private boolean fIsWildcard;
- /**
- * The wildcard if wildcard is selected.
- */
- private String fWildcard;
- /**
- *The flag indicating that all log level are selected.
- */
- private boolean fIsLogLevel;
- /**
- * The event name for the log level enablement.
- */
- private String fLogLevelEventName;
- /**
- * The type of the log level (loglevel or loglevel-only)
- */
- private LogLevelType fLogLevelType;
- /**
- * The actual selected log level.
- */
- private TraceLogLevel fLogLevel;
- /**
- * The filter expression
- */
- private String fFilterExpression;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param parent - a parent composite
- * @param style - a composite style
- * @param providerGroup - the trace provider group
- */
- public EnableUstEventsComposite(Composite parent, int style, TraceProviderGroup providerGroup) {
- super(parent, style);
- fProviderGroup = providerGroup;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public boolean isTracepoints() {
- return fIsTracepoints;
- }
-
- @Override
- public boolean isAllTracePoints() {
- return fIsAllTracepoints;
- }
-
- @Override
- public List<String> getEventNames() {
- return new ArrayList<>(fSelectedEvents);
- }
-
- @Override
- public boolean isWildcard() {
- return fIsWildcard;
- }
-
- @Override
- public String getWildcard() {
- return fWildcard;
- }
-
- @Override
- public boolean isLogLevel() {
- return fIsLogLevel;
- }
-
- @Override
- public LogLevelType getLogLevelType() {
- return fLogLevelType;
- }
-
- @Override
- public TraceLogLevel getLogLevel() {
- return fLogLevel;
- }
-
- @Override
- public String getLogLevelEventName() {
- return fLogLevelEventName;
- }
-
- @Override
- public String getFilterExpression() {
- return fFilterExpression;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Create the contents of this event composite
- */
- public void createContent() {
-
- // Tracepoints Group
- createTracepointsGroup();
-
- // Wildcard Group
- createWildCardGroup();
-
- // Log Level Group
- createLogLevelGroup();
-
- // Filter Group
- createFilterGroup();
-
- // Set default enablements
- setEnablements(GroupEnum.TRACEPOINTS);
- }
-
- /**
- * Validates the UST composite input data.
- *
- * @return true if configured data is valid and can be retrieved.
- */
- public boolean isValid() {
-
- fIsTracepoints = fTracepointsActivateButton.getSelection();
- fIsWildcard = fWildcardActivateButton.getSelection();
- fIsLogLevel = fLogLevelActivateButton.getSelection();
-
- // initialize tracepoint fields
- fIsAllTracepoints = false;
- fSelectedEvents = new ArrayList<>();
- if (fIsTracepoints) {
- fIsAllTracepoints = fTracepointsViewer.getChecked(fProviderGroup);
- Set<String> set = new HashSet<>();
- Object[] checkedElements = fTracepointsViewer.getCheckedElements();
- for (int i = 0; i < checkedElements.length; i++) {
- ITraceControlComponent component = (ITraceControlComponent)checkedElements[i];
- if (!set.contains(component.getName()) && (component instanceof BaseEventComponent)) {
- set.add(component.getName());
- fSelectedEvents.add(component.getName());
- }
- }
- }
-
- // initialize log level event name string
- fLogLevelType = LogLevelType.LOGLEVEL_NONE;
- fLogLevelEventName = null;
-
- if (fIsLogLevel) {
- if (fLogLevelButton.getSelection()) {
- fLogLevelType = LogLevelType.LOGLEVEL;
- } else if (fLogLevelOnlyButton.getSelection()) {
- fLogLevelType = LogLevelType.LOGLEVEL_ONLY;
- }
-
- String temp = fLogLevelEventNameText.getText();
- if (temp.isEmpty() ||
- temp.matches("\\s*") || //$NON-NLS-1$
- (!temp.matches("^[\\s]{0,}$") && !temp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableEventsDialogTitle,
- Messages.TraceControl_InvalidLogLevelEventNameError + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return false;
- }
-
- fLogLevelEventName = temp;
-
- TraceLogLevel[] levels = TraceLogLevel.values();
- int id = fLogLevelCombo.getSelectionIndex();
-
- if (id < 0) {
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableEventsDialogTitle,
- Messages.TraceControl_InvalidLogLevel + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return false;
- }
- fLogLevel = levels[id];
- }
-
- // initialize wildcard with null
- fWildcard = null;
- if (fIsWildcard) {
- String tempWildcard = fWildcardText.getText();
- if (tempWildcard.isEmpty() ||
- tempWildcard.matches("\\s*") || //$NON-NLS-1$
- (!tempWildcard.matches("^[\\s]{0,}$") && !tempWildcard.matches("^[a-zA-Z0-9\\-\\_\\*]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableEventsDialogTitle,
- Messages.TraceControl_InvalidWildcardError + " (" + tempWildcard + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
-
- return false;
- }
-
- fWildcard = tempWildcard;
- }
-
- // initialize filter with null
- fFilterExpression = null;
- if (fProviderGroup.isEventFilteringSupported()) {
- String tempFilter = fFilterText.getText();
-
- if(!tempFilter.isEmpty() && !tempFilter.matches("\\s*")) { //$NON-NLS-1$
- fFilterExpression = tempFilter;
- }
- }
-
- // validation successful -> call super.okPressed()
- return true;
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
-
- /**
- * Creates tracepoints group.
- */
- private void createTracepointsGroup() {
- Group tpMainGroup = new Group(this, SWT.SHADOW_NONE);
- tpMainGroup.setText(Messages.TraceControl_EnableEventsTracepointGroupName);
- GridLayout layout = new GridLayout(2, false);
- tpMainGroup.setLayout(layout);
- GridData data = new GridData(GridData.FILL_BOTH);
- tpMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(tpMainGroup, SWT.NONE);
- layout = new GridLayout(1, true);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fTracepointsActivateButton = new Button(buttonComposite, SWT.RADIO);
- fTracepointsActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fTracepointsActivateButton.setLayoutData(data);
- fTracepointsActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setEnablements(GroupEnum.TRACEPOINTS);
- }
- });
-
- Group tpGroup = new Group(tpMainGroup, SWT.SHADOW_NONE);
- layout = new GridLayout(1, true);
- tpGroup.setLayout(layout);
- data = new GridData(GridData.FILL_BOTH);
- tpGroup.setLayoutData(data);
- new FilteredTree(tpGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, new PatternFilter(), true) {
- @Override
- protected TreeViewer doCreateTreeViewer(Composite aparent, int style) {
- fTracepointsViewer = new CheckboxTreeViewer(aparent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
- fTracepointsViewer.getTree().setToolTipText(Messages.TraceControl_EnableEventsTracepointTreeTooltip);
- fTracepointsViewer.setContentProvider(new UstContentProvider());
-
- fTracepointsViewer.setLabelProvider(new UstLabelProvider());
- fTracepointsViewer.addCheckStateListener(new UstCheckStateListener());
-
- fTracepointsViewer.setInput(fProviderGroup.getParent());
- fTracepointsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
- return fTracepointsViewer;
- }
- };
- }
-
- /**
- * Creates wildcard group.
- */
- private void createWildCardGroup() {
- Group wildcardMainGroup = new Group(this, SWT.SHADOW_NONE);
- wildcardMainGroup.setText(Messages.TraceControl_EnableEventsWildcardGroupName);
- GridLayout layout = new GridLayout(2, false);
- wildcardMainGroup.setLayout(layout);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- wildcardMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(wildcardMainGroup, SWT.NONE);
- layout = new GridLayout(1, false);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fWildcardActivateButton = new Button(buttonComposite, SWT.RADIO);
- fWildcardActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- fWildcardActivateButton.setSelection(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fWildcardActivateButton.setLayoutData(data);
- fWildcardActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setEnablements(GroupEnum.WILDCARD);
- }
- });
-
- Group wildcardGroup = new Group(wildcardMainGroup, SWT.SHADOW_NONE);
- layout = new GridLayout(3, true);
- wildcardGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- wildcardGroup.setLayoutData(data);
-
- Label wildcardLabel = new Label(wildcardGroup, SWT.LEFT);
- wildcardLabel.setText(Messages.TraceControl_EnableEventsWildcardLabel);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- wildcardLabel.setLayoutData(data);
-
- fWildcardText = new Text(wildcardGroup, SWT.LEFT);
- fWildcardText.setToolTipText(Messages.TraceControl_EnableEventsWildcardTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 2;
- fWildcardText.setLayoutData(data);
- }
-
- /**
- * Creates log level group.
- */
- private void createLogLevelGroup() {
- Group logLevelMainGroup = new Group(this, SWT.SHADOW_NONE);
- logLevelMainGroup.setText(Messages.TraceControl_EnableEventsLogLevelGroupName);
- GridLayout layout = new GridLayout(2, false);
- logLevelMainGroup.setLayout(layout);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- logLevelMainGroup.setLayoutData(data);
-
- Composite buttonComposite = new Composite(logLevelMainGroup, SWT.NONE);
- layout = new GridLayout(1, false);
- buttonComposite.setLayout(layout);
- data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
- buttonComposite.setLayoutData(data);
-
- fLogLevelActivateButton = new Button(buttonComposite, SWT.RADIO);
- fLogLevelActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
- fLogLevelActivateButton.setSelection(false);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fLogLevelActivateButton.setLayoutData(data);
- fLogLevelActivateButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setEnablements(GroupEnum.LOGLEVEL);
- }
- });
-
- Group logLevelGroup = new Group(logLevelMainGroup, SWT.SHADOW_NONE);
- layout = new GridLayout(3, true);
- logLevelGroup.setLayout(layout);
- logLevelGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- Label logLevelEventNameLabel = new Label(logLevelGroup, SWT.LEFT);
- logLevelEventNameLabel.setText(Messages.TraceControl_EnableEventsEventNameLabel);
-
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 1;
- logLevelEventNameLabel.setLayoutData(data);
-
- fLogLevelEventNameText = new Text(logLevelGroup, SWT.LEFT);
- fLogLevelEventNameText.setToolTipText(Messages.TraceControl_EnableEventsLoglevelEventNameTooltip);
- data = new GridData(GridData.FILL_BOTH);
- data.horizontalSpan = 2;
- fLogLevelEventNameText.setLayoutData(data);
-
- TraceLogLevel[] levels = TraceLogLevel.values();
-
- String[] levelNames = new String[levels.length - 1];
- int k = 0;
- for (int i = 0; i < levels.length; i++) {
- if (levels[i] != TraceLogLevel.LEVEL_UNKNOWN) {
- levelNames[k++] = levels[i].getInName();
- }
- }
-
- fLogLevelCombo = new CCombo(logLevelGroup, SWT.READ_ONLY);
- fLogLevelCombo.setItems(levelNames);
- fLogLevelCombo.setToolTipText(Messages.TraceControl_EnableEventsLogLevelTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- fLogLevelCombo.setLayoutData(data);
-
- fLogLevelButton = new Button(logLevelGroup, SWT.RADIO);
- fLogLevelButton.setText(Messages.TraceControl_EnableEventsLogLevelTypeName);
- fLogLevelButton.setToolTipText(Messages.TraceControl_EnableEventsLogLevelTypeTooltip);
- data = new GridData(GridData.FILL_BOTH);
- fLogLevelButton.setLayoutData(data);
- fLogLevelButton.setSelection(true);
-
- fLogLevelOnlyButton = new Button(logLevelGroup, SWT.RADIO);
- fLogLevelOnlyButton.setText(Messages.TraceControl_EnableEventsLogLevelOnlyTypeName);
- fLogLevelOnlyButton.setToolTipText(Messages.TraceControl_EnableEventsLogLevelOnlyTypeTooltip);
- data = new GridData(GridData.FILL_BOTH);
- fLogLevelButton.setLayoutData(data);
- }
-
- void createFilterGroup() {
- if (fProviderGroup.isEventFilteringSupported()) {
- Group filterMainGroup = new Group(this, SWT.SHADOW_NONE);
- filterMainGroup.setText(Messages.TraceControl_EnableEventsFilterGroupName);
- GridLayout layout = new GridLayout(3, false);
- filterMainGroup.setLayout(layout);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- filterMainGroup.setLayoutData(data);
-
- fFilterText = new Text(filterMainGroup, SWT.LEFT);
- fFilterText.setToolTipText(Messages.TraceControl_EnableEventsFilterTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fFilterText.setLayoutData(data);
- }
- }
-
- /**
- * Enable/selects widgets depending on the group specified.
- * @param group - group to enable.
- */
- private void setEnablements(GroupEnum group) {
-
- // Enable/disable trace point items
- fTracepointsActivateButton.setSelection(group == GroupEnum.TRACEPOINTS);
- fTracepointsViewer.getTree().setEnabled(group == GroupEnum.TRACEPOINTS);
-
- // Enable/disable wildcard items
- fWildcardActivateButton.setSelection(group == GroupEnum.WILDCARD);
- fWildcardText.setEnabled(group == GroupEnum.WILDCARD);
-
- // Enable/disable log level items
- fLogLevelActivateButton.setSelection(group == GroupEnum.LOGLEVEL);
- fLogLevelEventNameText.setEnabled(group == GroupEnum.LOGLEVEL);
- fLogLevelCombo.setEnabled(group == GroupEnum.LOGLEVEL);
- fLogLevelButton.setEnabled(group == GroupEnum.LOGLEVEL);
- fLogLevelOnlyButton.setEnabled(group == GroupEnum.LOGLEVEL);
- }
-
- // ------------------------------------------------------------------------
- // Local classes
- // ------------------------------------------------------------------------
- /**
- * Content provider for the tracepoints tree.
- */
- public static final class UstContentProvider extends TraceControlContentProvider {
- @Override
- public Object[] getChildren(Object parentElement) {
- if (parentElement instanceof TargetNodeComponent) {
- List<ITraceControlComponent> children = ((ITraceControlComponent)parentElement).getChildren(TraceProviderGroup.class);
- return children.toArray(new ITraceControlComponent[children.size()]);
- }
- if (parentElement instanceof TraceProviderGroup) {
- List<ITraceControlComponent> children = ((ITraceControlComponent)parentElement).getChildren(UstProviderComponent.class);
- return children.toArray(new ITraceControlComponent[children.size()]);
- }
- if (parentElement instanceof ITraceControlComponent) {
- return ((ITraceControlComponent)parentElement).getChildren();
- }
- return new Object[0];
- }
- }
-
- /**
- * Content label for the tracepoints tree.
- */
- public static final class UstLabelProvider extends TraceControlLabelProvider {
- @Override
- public Image getImage(Object element) {
- return null;
- }
- @Override
- public String getText(Object element) {
- if ((element != null) && (element instanceof TraceProviderGroup)) {
- return Messages.TraceControl_EnableEventsTracepointTreeAllLabel;
- }
-
- if ((element != null) && (element instanceof UstProviderComponent)) {
- return Messages.TraceControl_EnableEventsTracepointTreeAllLabel + " - " + ((UstProviderComponent)element).getName(); //$NON-NLS-1$
- }
- return super.getText(element);
- }
- }
-
- /**
- * Check state listener for the tracepoints tree.
- */
- public final class UstCheckStateListener implements ICheckStateListener {
- @Override
- public void checkStateChanged(CheckStateChangedEvent event) {
- if (event.getChecked()) {
- if (event.getElement() instanceof TraceProviderGroup) {
- fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
- }
- if (event.getElement() instanceof UstProviderComponent) {
- fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
- }
- } else {
- if (event.getElement() instanceof TraceProviderGroup) {
- fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
- }
- if (event.getElement() instanceof UstProviderComponent) {
- ITraceControlComponent component = (ITraceControlComponent) event.getElement();
- fTracepointsViewer.setSubtreeChecked(event.getElement(), false);
- fTracepointsViewer.setChecked(component.getParent(), false);
- } else {
- ITraceControlComponent component = (ITraceControlComponent) event.getElement();
- fTracepointsViewer.setChecked(component.getParent(), false);
- fTracepointsViewer.setChecked(component.getParent().getParent(), false);
- }
- }
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * <p>
- * Dialog box for collecting information about the events to enable.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class GetEventInfoDialog extends Dialog implements IGetEventInfoDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The icon file for this dialog box.
- */
- public static final String TARGET_NEW_CONNECTION_ICON_FILE = "icons/elcl16/enable_event.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The session combo box.
- */
- private CCombo fSessionsCombo = null;
- /**
- * The channel combo box.
- */
- private CCombo fChannelsCombo = null;
- /**
- * The filter text
- */
- private Text fFilterText;
- /**
- * The list of available sessions.
- */
- private TraceSessionComponent[] fSessions;
- /**
- * True for kernel, false for UST.
- */
- private boolean fIsKernel;
- /**
- * Index in session array (selected session).
- */
- private int fSessionIndex = 0;
- /**
- * The Channel where the events should be enabled.
- */
- private TraceChannelComponent fChannel;
- /**
- * List of available channels of the selected session.
- */
- private TraceChannelComponent[] fChannels;
- /**
- * The filter expression
- */
- private String fFilterExpression;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor of dialog box.
- * @param shell - the shell for the dialog box
- */
- public GetEventInfoDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public TraceSessionComponent getSession() {
- return fSessions[fSessionIndex];
- }
-
- @Override
- public TraceChannelComponent getChannel() {
- return fChannel;
- }
-
- @Override
- public void setIsKernel(boolean isKernel) {
- fIsKernel = isKernel;
- }
-
- @Override
- public void setSessions(TraceSessionComponent[] sessions) {
- fSessions = Arrays.copyOf(sessions, sessions.length);
- }
-
- @Override
- public String getFilterExpression() {
- return fFilterExpression;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_EnableEventsDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(TARGET_NEW_CONNECTION_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- Composite dialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- dialogComposite.setLayout(layout);
- dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Group sessionsGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- sessionsGroup.setText(Messages.TraceControl_EnableEventsSessionGroupName);
- layout = new GridLayout(1, true);
- sessionsGroup.setLayout(layout);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- sessionsGroup.setLayoutData(data);
-
- fSessionsCombo = new CCombo(sessionsGroup, SWT.READ_ONLY);
- fSessionsCombo.setToolTipText(Messages.TraceControl_EnableEventsSessionsTooltip);
- fSessionsCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- String items[] = new String[fSessions.length];
- for (int i = 0; i < items.length; i++) {
- items[i] = String.valueOf(fSessions[i].getName());
- }
-
- fSessionsCombo.setItems(items);
- fSessionsCombo.setEnabled(fSessions.length > 0);
-
- Group channelsGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- channelsGroup.setText(Messages.TraceControl_EnableEventsChannelGroupName);
- layout = new GridLayout(1, true);
- channelsGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- channelsGroup.setLayoutData(data);
-
- fChannelsCombo = new CCombo(channelsGroup, SWT.READ_ONLY);
- fChannelsCombo.setToolTipText(Messages.TraceControl_EnableEventsChannelsTooltip);
- fChannelsCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- fChannelsCombo.setEnabled(false);
-
- fSessionsCombo.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- fSessionIndex = fSessionsCombo.getSelectionIndex();
-
- if (fSessionIndex >= 0) {
- TraceDomainComponent domain = null;
- TraceDomainComponent[] domains = fSessions[fSessionIndex].getDomains();
- for (int i = 0; i < domains.length; i++) {
-
- if (domains[i].isKernel() == fIsKernel) {
- domain = domains[i];
- break;
- }
- }
-
- if (domain != null) {
- fChannels = domain.getChannels();
- String selectionItems[] = new String[fChannels.length];
- for (int i = 0; i < selectionItems.length; i++) {
- selectionItems[i] = String.valueOf(fChannels[i].getName());
- }
- fChannelsCombo.setItems(selectionItems);
- fChannelsCombo.setEnabled(fChannels.length > 0);
- } else {
- fChannelsCombo.setItems(new String[0]);
- fChannelsCombo.setEnabled(false);
- fChannels = null;
- }
- fChannelsCombo.getParent().getParent().layout();
- }
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- // take first session to test whether events filtering is supported or not
- if (fSessions[0].isEventFilteringSupported() && !fIsKernel) {
- Group filterMainGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- filterMainGroup.setText(Messages.TraceControl_EnableEventsFilterGroupName);
- layout = new GridLayout(2, false);
- filterMainGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- filterMainGroup.setLayoutData(data);
-
- fFilterText = new Text(filterMainGroup, SWT.LEFT);
- fFilterText.setToolTipText(Messages.TraceControl_EnableEventsFilterTooltip);
- data = new GridData(GridData.FILL_HORIZONTAL);
- fFilterText.setLayoutData(data);
- }
-
- getShell().setMinimumSize(new Point(300, 200));
-
- return dialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- @Override
- protected void okPressed() {
-
- if (fSessionsCombo.getSelectionIndex() < 0) {
- MessageDialog.openError(getShell(),
- Messages.TraceControl_EnableEventsDialogTitle,
- Messages.TraceControl_EnableEventsNoSessionError);
- return;
- }
-
- fSessionIndex = fSessionsCombo.getSelectionIndex();
-
- // if no channel is available or no channel is selected use default channel indicated by fChannel=null
- fChannel = null;
- if ((fChannels != null) && (fChannelsCombo.getSelectionIndex() >= 0)) {
- fChannel = fChannels[fChannelsCombo.getSelectionIndex()];
- }
-
- // initialize filter with null
- fFilterExpression = null;
- if (fSessions[0].isEventFilteringSupported() && !fIsKernel) {
- String tempFilter = fFilterText.getText();
-
- if(!tempFilter.isEmpty() && !tempFilter.matches("\\s*")) { //$NON-NLS-1$
- fFilterExpression = tempFilter;
- }
- }
-
- super.okPressed();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.List;
-
-/**
- * <p>
- * Interface for providing information about contexts to be added to channels/events.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IAddContextDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Sets the available contexts to choose from.
- * @param contexts - a list of available contexts.
- */
- void setAvalibleContexts(List<String> contexts);
-
- /**
- * @return array of contexts to be added
- */
- List<String> getContexts();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return returns the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.swt.widgets.Shell;
-
-/**
- * <p>
- * Interface for a confirmation dialog.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IConfirmDialog {
-
- /**
- * Open a confirmation dialog
- *
- * @param parent
- * The parent shell
- * @param title
- * The title of the dialog window
- * @param message
- * The message in the dialog window
- * @return If the user clicked OK (true) or Cancel (false)
- */
- boolean openConfirm(Shell parent, String title, String message);
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-
-/**
- * <p>
- * Interface for create session dialog.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ICreateSessionDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Get the parameters necessary for the creation of a LTTng session
- *
- * @return the parameters
- */
- ISessionInfo getParameters();
-
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Initializes the dialog box.
- * @param group - the session group
- */
- void initialize(TraceSessionGroup group);
-
- /**
- * @return the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-
-/**
- * <p>
- * Interface for the enable channel dialog when domain is known.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IEnableChannelDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the configuration info for the new channel.
- */
- IChannelInfo getChannelInfo();
-
- /**
- * Sets the domain component
- * @param domain - the trace domain component
- */
- void setDomainComponent(TraceDomainComponent domain);
-
- /**
- * Set the targent node component
- * @param node - the node component
- */
- void setTargetNodeComponent(TargetNodeComponent node);
-
- /**
- * @return true for Kernel domain. False for UST.
- */
- boolean isKernel();
-
- /**
- * Sets the whether dialog is for Kernel or UST
- * @param isKernel true for kernel domain else UST
- */
- void setHasKernel(boolean isKernel);
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-
-/**
- * <p>
- * Interface for providing information about Kernel or UST events to be enabled.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IEnableEventsDialog extends IEnableKernelEvents, IEnableUstEvents {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the session the events shall be enabled.
- */
- boolean isKernel();
-
- /**
- * Sets the trace provider group.
- * @param providerGroup - a trace provider group
- */
- void setTraceProviderGroup(TraceProviderGroup providerGroup);
-
- /**
- * Sets the trace domain component.
- * @param domain - a domain of the events (null if not known)
- */
- void setTraceDomainComponent(TraceDomainComponent domain);
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return returns the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.List;
-
-/**
- * <p>
- * Interface for providing information about kernel events to be enabled.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IEnableKernelEvents {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return a flag whether the tracepoints shall be configured.
- */
- boolean isTracepoints();
-
- /**
- * @return a flag indicating whether all tracepoints shall be enabled or not.
- */
- boolean isAllTracePoints();
-
- /**
- * @return a flag whether the syscalls shall be configured.
- */
- boolean isSysCalls();
-
- /**
- * @return a flag indicating whether syscalls shall be enabled or not.
- */
- boolean isAllSysCalls();
-
- /**
- * @return a list of event names to be enabled.
- */
- List<String> getEventNames();
-
- /**
- * @return a flag whether the dynamic probe shall be configured.
- */
- boolean isDynamicProbe();
-
- /**
- * @return event name of the dynamic probe (or null if no dynamic probe).
- */
- String getProbeEventName();
-
- /**
- * @return the dynamic probe (or null if no dynamic probe).
- */
- String getProbeName();
-
- /**
- * @return a flag whether the dynamic function entry/return probe shall be configured.
- */
- boolean isDynamicFunctionProbe();
-
- /**
- * @return event name of the dynamic function entry/exit probe (or null if no dynamic probe).
- */
- String getFunctionEventName();
-
- /**
- * @return the dynamic function entry/exit probe (or null if no dynamic probe).
- */
- String getFunction();
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-
-/**
- * <p>
- * Interface for providing information about UST events to be enabled.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IEnableUstEvents {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return a flag whether the tracepoints shall be configured.
- */
- boolean isTracepoints();
-
- /**
- * @return a flag indicating whether all tracepoints shall be enabled or not.
- */
- boolean isAllTracePoints();
-
- /**
- * @return a list of event names to be enabled.
- */
- List<String> getEventNames();
-
- /**
- * @return a flag whether events using wildcards should be enabled
- */
- boolean isWildcard();
-
- /**
- * @return a wildcard
- */
- String getWildcard();
-
- /**
- * @return a flag whether events using log levels should be enabled
- */
- boolean isLogLevel();
-
- /**
- * @return a log level type (loglevel or loglevel-only)
- */
- LogLevelType getLogLevelType();
-
- /**
- * @return a log level
- */
- TraceLogLevel getLogLevel();
-
- /**
- * @return a event name for the log level enable action
- */
- String getLogLevelEventName();
-
- /**
- * @return a filter expression
- */
- String getFilterExpression();
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * <p>
- * Interface for a dialog box for collecting information about the events to enable.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IGetEventInfoDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the session the events shall be enabled.
- */
- TraceSessionComponent getSession();
-
- /**
- * @return the channel the events shall be enabled. Null for default channel.
- */
- TraceChannelComponent getChannel();
-
- /**
- * Sets flag about domain.
- * @param isKernel - true for kernel, false for UST
- */
- void setIsKernel(boolean isKernel);
-
- /**
- * Sets available session.
- * @param sessions - a array of available sessions.
- */
- void setSessions(TraceSessionComponent[] sessions);
-
- /**
- * Returns the filter expression.
- * @return the filter expression or null for no filtering
- */
- String getFilterExpression();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return returns the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-/**
- * <p>
- * Interface for dialog box for updating file import information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IImportConfirmationDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @param name old trace name.
- */
- void setTraceName(String name);
-
- /**
- * @return the new trace name if not overwrite.
- */
- String getNewTraceName();
-
- /**
- *
- * @return true to overwrite existing trace.
- */
- boolean isOverwrite();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.List;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * <p>
- * Interface for import traces dialog.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IImportDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return a list of trace paths to import.
- */
- List<ImportFileInfo> getTracePathes();
-
- /**
- * @return the project to import the traces to
- */
- IProject getProject();
-
- /**
- * Sets the session containing the traces to import
- * @param session The trace session
- */
- void setSession(TraceSessionComponent session);
-
- /**
- * Sets the default project name to use
- *
- * @param defaultProject
- * the name of the default project to use
- */
- void setDefaultProject(String defaultProject);
-
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.rse.core.model.IHost;
-
-/**
- * <p>
- * Interface for connection information dialog.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface INewConnectionDialog {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the connection name (alias).
- */
- String getConnectionName();
-
- /**
- * @return the host name (IP address or DNS name)
- */
- String getHostName();
-
- /**
- * @return port of IP connection to be used
- */
- int getPort();
-
- /**
- * Sets the trace control root
- * @param parent - the trace control parent
- */
- void setTraceControlParent(ITraceControlComponent parent);
-
- /**
- * Sets the available hosts to select.
- * @param hosts - the available hosts
- */
- void setHosts(IHost[] hosts);
-
- /**
- * Set the port of the IP connection to be used.
- * @param port - the IP port to set
- */
- void setPort(int port);
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return returns the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.List;
-
-/**
- * Interface for dialog for selecting a command script.
- *
- * @author Bernd Hufmann
- *
- */
-public interface ISelectCommandScriptDialog {
- /**
- * @return a list of command
- */
- List<String> getCommands();
-
- /**
- * @return the open return value
- */
- int open();
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * <p>
- * Dialog box for collecting session creation information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ImportConfirmationDialog extends Dialog implements IImportConfirmationDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The icon file for this dialog box.
- */
- public static final String IMPORT_ICON_FILE = "icons/elcl16/import_trace.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The radio button for selecting the overwrite action
- */
- private Button fOverwriteButton = null;
- /**
- * The radio button for selecting the renaming action
- */
- private Button fRenameButton = null;
- /**
- * The text widget for the session name
- */
- private Text fNewTraceNameText = null;
- /**
- * The trace name which already exists in the project
- */
- private String fTraceName = null;
- /**
- * The session name string.
- */
- private String fNewTraceName = null;
- /**
- * Flag whether default location (path) shall be used or not
- */
- private boolean fIsOverride = true;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public ImportConfirmationDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public void setTraceName(String name) {
- fTraceName = name;
- }
-
- @Override
- public String getNewTraceName() {
- return fNewTraceName;
- }
-
- @Override
- public boolean isOverwrite() {
- return fIsOverride;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_ImportDialogConfirmationTitle);
- newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- Composite dialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- dialogComposite.setLayout(layout);
- dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Label sessionNameLabel = new Label(dialogComposite, SWT.RIGHT);
- sessionNameLabel.setText(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + fTraceName); //$NON-NLS-1$
-
- fOverwriteButton = new Button(dialogComposite, SWT.RADIO);
- fOverwriteButton.setText(Messages.TraceControl_ImportDialogConfirmationOverwriteLabel);
-
- fOverwriteButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- fNewTraceNameText.setEnabled(false);
- fNewTraceNameText.setText(fTraceName);
- }
- });
-
- fRenameButton = new Button(dialogComposite, SWT.RADIO);
- fRenameButton.setText(Messages.TraceControl_ImportDialogConfirmationRenameLabel);
-
- fRenameButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- fNewTraceNameText.setEnabled(true);
- }
- });
-
- fNewTraceNameText = new Text(dialogComposite, SWT.NONE);
- fNewTraceNameText.setToolTipText(Messages.TraceControl_ImportDialogConfirmationNewNameLabel);
- fNewTraceNameText.setText(fTraceName);
-
- // Default
- fOverwriteButton.setSelection(true);
- fNewTraceNameText.setEnabled(false);
-
-
- // layout widgets
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
-
- fNewTraceNameText.setLayoutData(data);
-
- getShell().setMinimumSize(new Point(300, 150));
-
- return dialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- @Override
- protected void okPressed() {
-
- fIsOverride = fOverwriteButton.getSelection();
-
- if (fIsOverride) {
- // new name is old name
- fNewTraceName = fTraceName;
- } else {
- fNewTraceName = fNewTraceNameText.getText();
- }
-
- // Check for invalid names
- if (!fNewTraceName.matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$
- MessageDialog.openError(getShell(),
- Messages.TraceControl_ImportDialogConfirmationTitle,
- Messages.TraceControl_InvalidTraceNameError + " (" + fNewTraceName + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
- return;
- }
-
- // validation successful -> call super.okPressed()
- super.okPressed();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Added handling of streamed traces
- * Marc-Andre Laperle - Use common method to get opened tmf projects
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.CheckStateChangedEvent;
-import org.eclipse.jface.viewers.CheckboxTreeViewer;
-import org.eclipse.jface.viewers.ICheckStateListener;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfTracesFolder;
-import org.eclipse.linuxtools.tmf.ui.project.model.TraceUtils;
-import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-import org.eclipse.swt.widgets.Tree;
-import org.eclipse.ui.model.WorkbenchContentProvider;
-import org.eclipse.ui.model.WorkbenchLabelProvider;
-
-/**
- * <p>
- * Dialog box for collecting trace import information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ImportDialog extends Dialog implements IImportDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /** The icon file for this dialog box. */
- public static final String IMPORT_ICON_FILE = "icons/elcl16/import_trace.gif"; //$NON-NLS-1$
-
- /** Parent directory for UST traces */
- public static final String UST_PARENT_DIRECTORY = "ust"; //$NON-NLS-1$
-
- /** Name of metadata file of trace */
- public static final String METADATA_FILE_NAME = "metadata"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The dialog composite.
- */
- private Composite fDialogComposite = null;
- /**
- * The checkbox tree viewer for selecting available traces
- */
- private CheckboxTreeViewer fFolderViewer;
- /**
- * The combo box for selecting a project.
- */
- private CCombo fCombo;
- /**
- * The overwrite button
- */
- private Button fOverwriteButton;
- /**
- * List of available LTTng 2.0 projects
- */
- private List<IProject> fProjects;
- /**
- * The parent where the new node should be added.
- */
- private TraceSessionComponent fSession = null;
- /**
- * The name of the default project name
- */
- private String fDefaultProjectName = null;
- /**
- * List of traces to import
- */
- private final List<ImportFileInfo> fTraces = new ArrayList<>();
- /**
- * Selection index in project combo box.
- */
- private int fProjectIndex;
- /**
- * Flag to indicate that something went wrong when creating the dialog box.
- */
- private boolean fIsError = false;
- /**
- * Children of the remote folder (can be null)
- */
- private Object[] fFolderChildren = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public ImportDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public List<ImportFileInfo> getTracePathes() {
- List<ImportFileInfo> retList = new ArrayList<>();
- retList.addAll(fTraces);
- return retList;
- }
-
- @Override
- public IProject getProject() {
- return fProjects.get(fProjectIndex);
- }
-
- @Override
- public void setSession(TraceSessionComponent session) {
- fSession = session;
- }
-
- @Override
- public void setDefaultProject(String defaultProject) {
- fDefaultProjectName = defaultProject;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_ImportDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- fDialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- fDialogComposite.setLayout(layout);
- fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- try {
- createRemoteComposite();
- } catch (SystemMessageException e) {
- createErrorComposite(parent, e.fillInStackTrace());
- return fDialogComposite;
- }
- return fDialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- Button selectAllButton = createButton(parent, IDialogConstants.SELECT_ALL_ID, Messages.TraceControl_ImportDialog_SelectAll, true);
- selectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setFolderChildrenChecked(true);
- }
- });
-
- Button deselectAllButton = createButton(parent, IDialogConstants.DESELECT_ALL_ID, Messages.TraceControl_ImportDialog_DeselectAll, true);
- deselectAllButton.addSelectionListener(new SelectionAdapter() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- setFolderChildrenChecked(false);
- }
- });
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- updateOKButtonEnablement();
- }
-
- @Override
- protected void okPressed() {
- if (!fIsError) {
-
- // Validate input data
- fTraces.clear();
-
- fProjectIndex = fCombo.getSelectionIndex();
-
- if (fProjectIndex < 0) {
- MessageDialog.openError(getShell(),
- Messages.TraceControl_ImportDialogTitle,
- Messages.TraceControl_ImportDialogNoProjectSelectedError);
- return;
- }
-
- IProject project = fProjects.get(fProjectIndex);
- IFolder traceFolder = project.getFolder(TmfTracesFolder.TRACES_FOLDER_NAME);
-
- if (!traceFolder.exists()) {
- // Invalid LTTng 2.0 project
- MessageDialog.openError(getShell(),
- Messages.TraceControl_ImportDialogTitle,
- Messages.TraceControl_ImportDialogInvalidTracingProject + " (" + TmfTracesFolder.TRACES_FOLDER_NAME + ")"); //$NON-NLS-1$//$NON-NLS-2$
- return;
- }
-
- boolean overwriteAll = fOverwriteButton.getSelection();
-
- Object[] checked = fFolderViewer.getCheckedElements();
- for (int i = 0; i < checked.length; i++) {
- IRemoteFile file = (IRemoteFile) checked[i];
- if (!file.isDirectory() && file.getName().equals(METADATA_FILE_NAME)) {
- IRemoteFile trace = file.getParentRemoteFile();
- IRemoteFile parent = trace.getParentRemoteFile();
-
- String path = fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : fSession.getSessionPath();
- path = getUnifiedPath(path);
- IPath sessionParentPath = new Path(path).removeLastSegments(1);
- IPath traceParentPath = new Path(parent.getAbsolutePath());
-
- IPath relativeTracePath = traceParentPath.makeRelativeTo(sessionParentPath);
-
- IFolder destinationFolder = traceFolder.getFolder(new Path(relativeTracePath.toOSString()));
-
- ImportFileInfo info = new ImportFileInfo(trace, trace.getName(), destinationFolder, overwriteAll);
- IFolder folder = destinationFolder.getFolder(trace.getName());
-
- // Verify if trace directory already exists (and not overwrite)
- if (folder.exists() && !overwriteAll) {
-
- // Ask user for overwrite or new name
- IImportConfirmationDialog conf = TraceControlDialogFactory.getInstance().getImportConfirmationDialog();
- conf.setTraceName(trace.getName());
-
- // Don't add trace to list if dialog was cancelled.
- if (conf.open() == Window.OK) {
- info.setOverwrite(conf.isOverwrite());
- if (!conf.isOverwrite()) {
- info.setLocalTraceName(conf.getNewTraceName());
- }
- fTraces.add(info);
- }
- } else {
- fTraces.add(info);
- }
- }
- }
-
- if (fTraces.isEmpty()) {
- MessageDialog.openError(getShell(),
- Messages.TraceControl_ImportDialogTitle,
- Messages.TraceControl_ImportDialogNoTraceSelectedError);
- return;
- }
- }
-
- // validation successful -> call super.okPressed()
- super.okPressed();
- }
-
- // ------------------------------------------------------------------------
- // Helper methods and classes
- // ------------------------------------------------------------------------
-
- /**
- * Helper class for the contents of a folder in a tracing project
- *
- * @author Bernd Hufmann
- */
- public static class FolderContentProvider extends WorkbenchContentProvider {
- @Override
- public Object[] getChildren(Object o) {
- if (o instanceof IRemoteFile) {
- IRemoteFile element = (IRemoteFile) o;
- // For our purpose, we need folders + files
- if (!element.isDirectory()) {
- return new Object[0];
- }
- }
- return super.getChildren(o);
- }
- }
-
- /**
- * Creates a dialog composite with an error message which can be used
- * when an exception occurred during creation time of the dialog box.
- * @param parent - a parent composite
- * @param e - a error causing exception
- */
- private void createErrorComposite(Composite parent, Throwable e) {
- fIsError = true;
- fDialogComposite.dispose();
-
- fDialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- fDialogComposite.setLayout(layout);
- fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Text errorText = new Text(fDialogComposite, SWT.MULTI);
- StringBuffer error = new StringBuffer();
- error.append(Messages.TraceControl_ImportDialogCreationError);
- error.append(System.getProperty("line.separator")); //$NON-NLS-1$
- error.append(System.getProperty("line.separator")); //$NON-NLS-1$
- error.append(e.toString());
- errorText.setText(error.toString());
- errorText.setLayoutData(new GridData(GridData.FILL_BOTH));
- }
-
- private void createRemoteComposite() throws SystemMessageException{
- Group contextGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- contextGroup.setText(Messages.TraceControl_ImportDialogTracesGroupName);
- GridLayout layout = new GridLayout(1, true);
- contextGroup.setLayout(layout);
- contextGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- IRemoteSystemProxy proxy = fSession.getTargetNode().getRemoteSystemProxy();
-
- IFileServiceSubSystem fsss = proxy.getFileServiceSubSystem();
-
- final String path = fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : fSession.getSessionPath();
- final IRemoteFile remoteFolder = fsss.getRemoteFileObject(path, new NullProgressMonitor());
- // make sure that remote directory is read and not cached
- remoteFolder.markStale(true, true);
-
- fFolderViewer = new CheckboxTreeViewer(contextGroup, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
- GridData data = new GridData(GridData.FILL_BOTH);
- Tree tree = fFolderViewer.getTree();
- tree.setLayoutData(data);
- tree.setFont(fDialogComposite.getFont());
- tree.setToolTipText(Messages.TraceControl_ImportDialogTracesTooltip);
-
- fFolderViewer.setContentProvider(new FolderContentProvider());
- fFolderViewer.setLabelProvider(new WorkbenchLabelProvider());
-
- fFolderViewer.addCheckStateListener(new ICheckStateListener() {
- @Override
- public void checkStateChanged(CheckStateChangedEvent event) {
- Object elem = event.getElement();
- if (elem instanceof IRemoteFile) {
- IRemoteFile element = (IRemoteFile) elem;
- if (!element.isDirectory()) {
- // A trick to keep selection of a file in sync with the directory
- boolean p = fFolderViewer.getChecked((element.getParentRemoteFile()));
- fFolderViewer.setChecked(element, p);
- } else {
- fFolderViewer.setSubtreeChecked(event.getElement(), event.getChecked());
- if (!event.getChecked()) {
- fFolderViewer.setChecked(element.getParentRemoteFile(), false);
- }
- }
- updateOKButtonEnablement();
- }
- }
- });
- fFolderViewer.setInput(remoteFolder);
-
- fFolderChildren = remoteFolder.getContents(RemoteChildrenContentsType.getInstance());
- // children can be null if there the path doesn't exist. This happens when a trace
- // session hadn't been started and no output was created.
- setFolderChildrenChecked(true);
-
- Group projectGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- projectGroup.setText(Messages.TraceControl_ImportDialogProjectsGroupName);
- layout = new GridLayout(1, true);
- projectGroup.setLayout(layout);
- projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- fProjects = new ArrayList<>();
- List<String> projectNames = new ArrayList<>();
-
- for (IProject project : TraceUtils.getOpenedTmfProjects()) {
- fProjects.add(project);
- projectNames.add(project.getName());
- }
-
- fCombo = new CCombo(projectGroup, SWT.READ_ONLY);
- fCombo.setToolTipText(Messages.TraceControl_ImportDialogProjectsTooltip);
- fCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1));
- fCombo.setItems(projectNames.toArray(new String[projectNames.size()]));
-
- if (fDefaultProjectName != null) {
- int select = projectNames.indexOf(fDefaultProjectName);
- fCombo.select(select);
- }
-
- Group overrideGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- layout = new GridLayout(1, true);
- overrideGroup.setLayout(layout);
- overrideGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- fOverwriteButton = new Button(overrideGroup, SWT.CHECK);
- fOverwriteButton.setText(Messages.TraceControl_ImportDialogOverwriteButtonText);
- getShell().setMinimumSize(new Point(500, 400));
- }
-
- private void setFolderChildrenChecked(boolean isChecked) {
- if (fFolderChildren != null) {
- for (Object child : fFolderChildren) {
- fFolderViewer.setSubtreeChecked(child, isChecked);
- }
- }
- updateOKButtonEnablement();
- }
-
- private void updateOKButtonEnablement() {
- Object[] checked = fFolderViewer.getCheckedElements();
- Button okButton = getButton(IDialogConstants.OK_ID);
- if (okButton != null) {
- okButton.setEnabled(checked.length > 0);
- }
- }
-
- private static String getUnifiedPath(String path) {
- // Use Path class to remove unnecessary slashes
- return new Path(path).removeTrailingSeparator().toString();
- }
- }
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-
-/**
- * <p>
- * Helper class for storing information about a remote file to import.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ImportFileInfo {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * Remote file reference
- */
- private IRemoteFile fRemoteFile;
- /**
- * Local Trace Name
- */
- private String fLocalTraceName;
- /**
- * Global overwrite flag
- */
- private boolean fIsOverwrite;
- /**
- * Destination folder to import the trace to (full workspace path)
- */
- private IFolder fDestinationFolder;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Standard constructor
- *
- * @param file
- * A remote file reference
- * @param traceName
- * A trace name
- * @param destinationFolder
- * The destination folder (full workspace path)
- * @param isOverwrite
- * global overwrite flag
- */
- public ImportFileInfo(IRemoteFile file, String traceName, IFolder destinationFolder, boolean isOverwrite) {
- fRemoteFile = file;
- fLocalTraceName = traceName;
- fDestinationFolder = destinationFolder;
- fIsOverwrite = isOverwrite;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return name of traces after importing
- */
- public String getLocalTraceName() {
- return fLocalTraceName;
- }
-
- /**
- * Sets the local trace name
- *
- * @param importTraceName
- * - local name of trace to set (name after importing)
- */
- public void setLocalTraceName(String importTraceName) {
- this.fLocalTraceName = importTraceName;
- }
- /**
- * @return true if local trace should be overwritten if a trace with the same name already exists.
- */
- public boolean isOverwrite() {
- return fIsOverwrite;
- }
- /**
- * Sets the overwrite flag.
- * @param isOverwrite If the Overwrite checkbox is checked or not
- */
- public void setOverwrite(boolean isOverwrite) {
- this.fIsOverwrite = isOverwrite;
- }
-
- /**
- * @return the remote file implementation.
- */
- public IRemoteFile getImportFile() {
- return fRemoteFile;
- }
-
- /**
- * Sets the remote file implementation
- *
- * @param remoteFile
- * The remote file implementation.
- */
- public void setRemoteFile(IRemoteFile remoteFile) {
- fRemoteFile = remoteFile;
- }
-
- /**
- * Returns the destination folder to import the trace to (full workspace path).
- *
- * @return destination folder
- */
- public IFolder getDestinationFolder() {
- return fDestinationFolder;
- }
-}
-
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.util.Arrays;
-
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.CCombo;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.events.VerifyEvent;
-import org.eclipse.swt.events.VerifyListener;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * <p>
- * Dialog box for connection information.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class NewConnectionDialog extends Dialog implements INewConnectionDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The icon file for this dialog box.
- */
- public static final String TARGET_NEW_CONNECTION_ICON_FILE = "icons/elcl16/target_add.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The host combo box.
- */
- private CCombo fExistingHostsCombo = null;
- /**
- * The check box button for enabling/disabling the text input.
- */
- private Button fButton = null;
- /**
- * The text widget for the node name (alias)
- */
- private Text fConnectionNameText = null;
- /**
- * The text widget for the node address (IP or DNS name)
- */
- private Text fHostNameText = null;
- /**
- * The text widget for the IP port
- */
- private Text fPortText = null;
- /**
- * The parent where the new node should be added.
- */
- private ITraceControlComponent fParent;
- /**
- * The node name (alias) string.
- */
- private String fConnectionName = null;
- /**
- * The node address (IP or DNS name) string.
- */
- private String fHostName = null;
- /**
- * The IP port of the connection.
- */
- private int fPort = IRemoteSystemProxy.INVALID_PORT_NUMBER;
- /**
- * Input list of existing RSE hosts available for selection.
- */
- private IHost[] fExistingHosts = new IHost[0];
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- *
- * @param shell
- * The shell
- */
- public NewConnectionDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getConnectionName() {
- return fConnectionName;
- }
-
- @Override
- public String getHostName() {
- return fHostName;
- }
-
- @Override
- public int getPort() {
- return fPort;
- }
-
- @Override
- public void setTraceControlParent(ITraceControlComponent parent) {
- fParent = parent;
- }
-
- @Override
- public void setHosts(IHost[] hosts) {
- if (hosts != null) {
- fExistingHosts = Arrays.copyOf(hosts, hosts.length);
- }
- }
-
- @Override
- public void setPort(int port) {
- fPort = port;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_NewDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(TARGET_NEW_CONNECTION_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- Composite dialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- dialogComposite.setLayout(layout);
- dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- // Existing connections group
- Group comboGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- comboGroup.setText(Messages.TraceControl_NewNodeExistingConnectionGroupName);
- layout = new GridLayout(2, true);
- comboGroup.setLayout(layout);
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- comboGroup.setLayoutData(data);
-
- fExistingHostsCombo = new CCombo(comboGroup, SWT.READ_ONLY);
- fExistingHostsCombo.setToolTipText(Messages.TraceControl_NewNodeComboToolTip);
- fExistingHostsCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
-
- String items[] = new String[fExistingHosts.length];
- for (int i = 0; i < items.length; i++) {
- items[i] = String.valueOf(fExistingHosts[i].getAliasName() + " - " + fExistingHosts[i].getHostName()); //$NON-NLS-1$
- }
-
- fExistingHostsCombo.setItems(items);
- fExistingHostsCombo.setEnabled(fExistingHosts.length > 0);
-
- // Node information grop
- Group textGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
- layout = new GridLayout(3, true);
- textGroup.setLayout(layout);
- data = new GridData(GridData.FILL_HORIZONTAL);
- textGroup.setLayoutData(data);
-
- fButton = new Button(textGroup, SWT.CHECK);
- fButton.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 3, 1));
- fButton.setText(Messages.TraceControl_NewNodeEditButtonName);
- fButton.setEnabled(fExistingHosts.length > 0);
-
- Label connectionNameLabel = new Label(textGroup, SWT.RIGHT);
- connectionNameLabel.setText(Messages.TraceControl_NewNodeConnectionNameLabel);
- fConnectionNameText = new Text(textGroup, SWT.NONE);
- fConnectionNameText.setToolTipText(Messages.TraceControl_NewNodeConnectionNameTooltip);
- fConnectionNameText.setEnabled(fExistingHosts.length == 0);
-
- Label hostNameLabel = new Label(textGroup, SWT.RIGHT);
- hostNameLabel.setText(Messages.TraceControl_NewNodeHostNameLabel);
- fHostNameText = new Text(textGroup, SWT.NONE);
- fHostNameText.setToolTipText(Messages.TraceControl_NewNodeHostNameTooltip);
- fHostNameText.setEnabled(fExistingHosts.length == 0);
-
- Label portLabel = new Label(textGroup, SWT.RIGHT);
- portLabel.setText(Messages.TraceControl_NewNodePortLabel);
- fPortText = new Text(textGroup, SWT.NONE);
- fPortText.setToolTipText(Messages.TraceControl_NewNodePortTooltip);
- fPortText.setEnabled(fExistingHosts.length == 0);
- fPortText.addVerifyListener(new VerifyListener() {
- @Override
- public void verifyText(VerifyEvent e) {
- // only numbers are allowed.
- e.doit = e.text.matches("[0-9]*"); //$NON-NLS-1$
- }
- });
-
- fButton.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- if (fButton.getSelection()) {
- fExistingHostsCombo.deselectAll();
- fExistingHostsCombo.setEnabled(false);
- fConnectionNameText.setEnabled(true);
- fHostNameText.setEnabled(true);
- fPortText.setEnabled(true);
- } else {
- fExistingHostsCombo.setEnabled(true);
- fConnectionNameText.setEnabled(false);
- fHostNameText.setEnabled(false);
- fPortText.setEnabled(false);
- }
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- fExistingHostsCombo.addSelectionListener(new SelectionListener() {
- @Override
- public void widgetSelected(SelectionEvent e) {
- int index = fExistingHostsCombo.getSelectionIndex();
- fConnectionNameText.setText(fExistingHosts[index].getAliasName());
- fHostNameText.setText(fExistingHosts[index].getHostName());
- fPortText.setText(""); //$NON-NLS-1$
- }
-
- @Override
- public void widgetDefaultSelected(SelectionEvent e) {
- }
- });
-
- // layout widgets
- data = new GridData(GridData.FILL_HORIZONTAL);
- fHostNameText.setText("666.666.666.666"); //$NON-NLS-1$
- Point minSize = fHostNameText.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
- int widthHint = minSize.x + 5;
- data.widthHint = widthHint;
- data.horizontalSpan = 2;
- fConnectionNameText.setLayoutData(data);
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = widthHint;
- data.horizontalSpan = 2;
- fHostNameText.setLayoutData(data);
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.widthHint = widthHint;
- data.horizontalSpan = 2;
- fPortText.setLayoutData(data);
-
- fHostNameText.setText(""); //$NON-NLS-1$
-
- return dialogComposite;
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
- createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
- }
-
- @Override
- protected void okPressed() {
- // Validate input data
- fConnectionName = fConnectionNameText.getText();
- fHostName = fHostNameText.getText();
- fPort = (fPortText.getText().length() > 0) ? Integer.parseInt(fPortText.getText()) : IRemoteSystemProxy.INVALID_PORT_NUMBER;
-
- if (!"".equals(fHostName)) { //$NON-NLS-1$
- // If no node name is specified use the node address as name
- if ("".equals(fConnectionName)) { //$NON-NLS-1$
- fConnectionName = fHostName;
- }
- // Check if node with name already exists in parent
- if(fParent.containsChild(fConnectionName)) {
- MessageDialog.openError(getShell(),
- Messages.TraceControl_NewDialogTitle,
- Messages.TraceControl_AlreadyExistsError + " (" + fConnectionName + ")"); //$NON-NLS-1$//$NON-NLS-2$
- return;
- }
- }
- else {
- return;
- }
- // validation successful -> call super.okPressed()
- super.okPressed();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Point;
-import org.eclipse.swt.graphics.Rectangle;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.FileDialog;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
-import org.eclipse.swt.widgets.Shell;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * <p>
- * Dialog box for selecting a command script. It parses the script and
- * provides a list of shell commands to be executed.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class OpenCommandScriptDialog extends Dialog implements ISelectCommandScriptDialog {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The icon file for this dialog box.
- */
- public static final String CREATE_SESSION_ICON_FILE = "icons/elcl16/add_button.gif"; //$NON-NLS-1$
-
- // Dialog settings constants
- private static final String DIALOG_SETTINGS_SECTION = "OpenCommandScriptDialog"; //$NON-NLS-1$
- private static final String FILE_NAME_ID = "STORE_FILE_NAME_ID"; //$NON-NLS-1$
- private static final int COMBO_HISTORY_LENGTH = 5;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // Dialog attributes
- private Control fControl = null;
- private Composite fDialogComposite = null;
- private Button fBrowseButton;
- private Label fFileNameLabel = null;
- private Combo fFileNameCombo = null;
-
- // Output list of commands
- private List<String> fCommands = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param shell - a shell for the display of the dialog
- */
- public OpenCommandScriptDialog(Shell shell) {
- super(shell);
- setShellStyle(SWT.RESIZE | getShellStyle());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- @NonNull public List<String> getCommands() {
- if (fCommands != null) {
- return fCommands;
- }
- return new ArrayList<>();
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected Control createContents(Composite parent) {
- fControl = super.createContents(parent);
-
- /* set the shell minimum size */
- Point clientArea = fControl.computeSize(SWT.DEFAULT, SWT.DEFAULT);
- Rectangle trim = getShell().computeTrim(0, 0, clientArea.x, clientArea.y);
- getShell().setMinimumSize(trim.width, trim.height);
-
- return fControl;
- }
-
- @Override
- protected void configureShell(Shell newShell) {
- super.configureShell(newShell);
- newShell.setText(Messages.TraceControl_ExecuteScriptDialogTitle);
- newShell.setImage(Activator.getDefault().loadIcon(CREATE_SESSION_ICON_FILE));
- }
-
- @Override
- protected Control createDialogArea(Composite parent) {
-
- // Main dialog panel
- fDialogComposite = new Composite(parent, SWT.NONE);
- GridLayout layout = new GridLayout(1, true);
- fDialogComposite.setLayout(layout);
- fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
-
- Group sessionGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
- sessionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- sessionGroup.setLayout(new GridLayout(6, true));
-
- fFileNameLabel = new Label(sessionGroup, SWT.RIGHT);
- fFileNameLabel.setText(Messages.TraceControl_ExecuteScriptSelectLabel);
- fFileNameCombo = new Combo(sessionGroup, SWT.BORDER);
-
- fBrowseButton = new Button(sessionGroup, SWT.PUSH);
- fBrowseButton.setText(Messages.TraceControl_ExecuteScriptBrowseText);
- fBrowseButton.addListener(SWT.Selection, new Listener() {
- @Override
- public void handleEvent(Event event) {
- handleFilePathBrowseButtonPressed(SWT.OPEN);
- }
- });
-
- // layout widgets
- GridData data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
- data.grabExcessHorizontalSpace = false;
- fFileNameLabel.setLayoutData(data);
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 4;
- fFileNameCombo.setLayoutData(data);
-
- data = new GridData(GridData.FILL_HORIZONTAL);
- data.horizontalSpan = 1;
-
- // Initialize a empty list
- fCommands = new ArrayList<>();
-
- restoreWidgetValues();
-
- return fDialogComposite;
- }
-
- private void restoreWidgetValues() {
- IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
- IDialogSettings settings = workbenchSettings.getSection(DIALOG_SETTINGS_SECTION);
- if (settings == null) {
- settings = workbenchSettings.addNewSection(DIALOG_SETTINGS_SECTION);
- }
- String[] fileNames = settings.getArray(FILE_NAME_ID);
- if ((fileNames != null) && (fileNames.length != 0)) {
- for (int i = 0; i < fileNames.length; i++) {
- fFileNameCombo.add(fileNames[i]);
- }
- }
- }
-
- private void saveWidgetValues() {
- IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
- IDialogSettings settings = workbenchSettings.getSection(DIALOG_SETTINGS_SECTION);
- if (settings != null) {
- // update file names history
- String[] fileNames = settings.getArray(FILE_NAME_ID);
- if (fileNames == null) {
- fileNames = new String[0];
- }
-
- fileNames = addToHistory(fileNames, fFileNameCombo.getText().trim());
- settings.put(FILE_NAME_ID, fileNames);
- }
- }
-
- /**
- * Adds an entry to a history, while taking care of duplicate history items
- * and excessively long histories. The assumption is made that all histories
- * should be of length <code>COMBO_HISTORY_LENGTH</code>.
- *
- * @param history the current history
- * @param newEntry the entry to add to the history
- */
- private static String[] addToHistory(String[] history, String newEntry) {
- List<String> list = new ArrayList<>(Arrays.asList(history));
- list.remove(newEntry);
- list.add(0, newEntry);
-
- // since only one new item was added, we can be over the limit
- // by at most one item
- if (list.size() > COMBO_HISTORY_LENGTH) {
- list.remove(COMBO_HISTORY_LENGTH);
- }
- String[] r = new String[list.size()];
- list.toArray(r);
- return r;
- }
-
- private void handleFilePathBrowseButtonPressed(int fileDialogStyle) {
- FileDialog dialog = new FileDialog(getShell(), fileDialogStyle | SWT.SHEET);
- dialog.setFilterExtensions(new String[] { "*.*", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$
- dialog.setText(Messages.TraceControl_ExecuteScriptDialogTitle);
- String selectedFileName = dialog.open();
- if (selectedFileName != null) {
- fFileNameCombo.setText(selectedFileName);
- }
- }
-
- @Override
- protected void createButtonsForButtonBar(Composite parent) {
- createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
- createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
- }
-
- @Override
- protected void okPressed() {
- // Validate input data
- String sessionPath = fFileNameCombo.getText();
-
- if (!"".equals(sessionPath)) { //$NON-NLS-1$
-
- ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
- try (BufferedRandomAccessFile rafile = new BufferedRandomAccessFile(sessionPath, "r")) { //$NON-NLS-1$
- String line = rafile.getNextLine();
- while (line != null) {
- builder.add(line);
- line = rafile.getNextLine();
- }
- } catch (IOException e) {
- ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage(), e));
- return;
- }
- saveWidgetValues();
- fCommands = builder.build();
- super.okPressed();
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
-
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Factory for generating dialog boxes. It allows to overwrite the dialog implementation.
- * Useful also for testing purposes.
- * </p>
- *
- * @author Bernd Hufmann
- *
- */
-public final class TraceControlDialogFactory {
-
- // ------------------------------------------------------------------------
- // Members
- // ------------------------------------------------------------------------
-
- /**
- * The factory instance.
- */
- private static TraceControlDialogFactory fInstance;
-
- /**
- * The new connection dialog reference.
- */
- private INewConnectionDialog fNewConnectionDialog;
-
- /**
- * The enable channel dialog
- */
- private IEnableChannelDialog fEnableChannelDialog;
-
- /**
- * The create session dialog.
- */
- private ICreateSessionDialog fCreateSessionDialog;
-
- /**
- * The command script selection dialog.
- */
- private ISelectCommandScriptDialog fCommandScriptDialog;
-
- /**
- * The enable events dialog.
- */
- private IEnableEventsDialog fEnableEventsDialog;
-
- /**
- * The get event info dialog.
- */
- private IGetEventInfoDialog fGetEventInfoDialog;
-
- /**
- * The confirmation dialog implementation.
- */
- private IConfirmDialog fConfirmDialog;
-
- /**
- * The add context dialog implementation.
- */
- private IAddContextDialog fAddContextDialog;
-
- /**
- * The import dialog implementation.
- */
- private IImportDialog fImportDialog;
-
- /**
- * The import confirmation dialog.
- */
- private IImportConfirmationDialog fImportConfirmationDialog;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor for R4EUIDialogFactory.
- */
- private TraceControlDialogFactory() {
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * @return TraceControlDialogFactory instance
- */
- public static synchronized TraceControlDialogFactory getInstance() {
- if (fInstance == null) {
- fInstance = new TraceControlDialogFactory();
- }
- return fInstance;
- }
-
- /**
- * @return new connection dialog
- */
- public INewConnectionDialog getNewConnectionDialog() {
- if (fNewConnectionDialog == null) {
- fNewConnectionDialog = new NewConnectionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fNewConnectionDialog;
- }
-
- /**
- * Sets a new connection dialog implementation.
- * @param newConnectionDialog - new connection dialog implementation
- */
- public void setNewConnectionDialog(INewConnectionDialog newConnectionDialog) {
- fNewConnectionDialog = newConnectionDialog;
- }
-
- /**
- * @return enable channel dialog
- */
- public IEnableChannelDialog getEnableChannelDialog() {
- if (fEnableChannelDialog == null) {
- fEnableChannelDialog = new EnableChannelDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fEnableChannelDialog;
- }
-
- /**
- * Sets a enable channel dialog implementation.
- * @param createEnableDialog - a create channel dialog implementation
- */
- public void setEnableChannelDialog(IEnableChannelDialog createEnableDialog) {
- fEnableChannelDialog = createEnableDialog;
- }
-
- /**
- * @return create session dialog implementation
- */
- public ICreateSessionDialog getCreateSessionDialog() {
- if (fCreateSessionDialog == null) {
- fCreateSessionDialog = new CreateSessionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fCreateSessionDialog;
- }
-
- /**
- * @return command script selection dialog implementation
- */
- public ISelectCommandScriptDialog getCommandScriptDialog() {
- if (fCommandScriptDialog == null) {
- fCommandScriptDialog = new OpenCommandScriptDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fCommandScriptDialog;
- }
-
- /**
- * Sets a create session dialog implementation.
- * @param createSessionDialog - a create session implementation.
- */
- public void setCreateSessionDialog(ICreateSessionDialog createSessionDialog) {
- fCreateSessionDialog = createSessionDialog;
- }
-
- /**
- * @return enable events dialog implementation.
- */
- public IEnableEventsDialog getEnableEventsDialog() {
- if (fEnableEventsDialog == null) {
- fEnableEventsDialog = new EnableEventsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fEnableEventsDialog;
- }
-
- /**
- * Sets a enable events dialog implementation.
- * @param enableEventsDialog - a enable events dialog implementation.
- */
- public void setEnableEventsDialog(IEnableEventsDialog enableEventsDialog) {
- fEnableEventsDialog = enableEventsDialog;
- }
-
- /**
- * @return get events info dialog implementation.
- */
- public IGetEventInfoDialog getGetEventInfoDialog() {
- if (fGetEventInfoDialog == null) {
- fGetEventInfoDialog = new GetEventInfoDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fGetEventInfoDialog;
- }
-
- /**
- * Sets a get events info dialog implementation.
- * @param getEventInfoDialog - a get events info dialog implementation
- */
- public void setGetEventInfoDialog(IGetEventInfoDialog getEventInfoDialog) {
- fGetEventInfoDialog = getEventInfoDialog;
- }
-
- /**
- * @return the confirmation dialog implementation
- */
- public IConfirmDialog getConfirmDialog() {
- if (fConfirmDialog == null) {
- fConfirmDialog = new ConfirmDialog();
- }
- return fConfirmDialog;
- }
-
- /**
- * Sets the confirmation dialog implementation
- * @param confirmDialog - a confirmation dialog implementation
- */
- public void setConfirmDialog(IConfirmDialog confirmDialog) {
- fConfirmDialog = confirmDialog;
- }
-
- /**
- * @return the add context dialog implementation
- */
- public IAddContextDialog getAddContextDialog() {
- if (fAddContextDialog == null) {
- fAddContextDialog = new AddContextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fAddContextDialog;
- }
-
- /**
- * Sets the add context dialog information
- * @param addContextDialog - a add context dialog implementation
- */
- public void setAddContextDialog(IAddContextDialog addContextDialog) {
- fAddContextDialog = addContextDialog;
- }
-
- /**
- * @return the import dialog implementation
- */
- public IImportDialog getImportDialog() {
- if (fImportDialog == null) {
- fImportDialog = new ImportDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fImportDialog;
- }
-
- /**
- * Sets the import dialog implementation.
- * @param importDialog - a import dialog implementation
- */
- public void setImportDialog(IImportDialog importDialog) {
- fImportDialog = importDialog;
- }
-
- /**
- * @return the import confirmation dialog implementation.
- */
- public IImportConfirmationDialog getImportConfirmationDialog() {
- if (fImportConfirmationDialog == null) {
- fImportConfirmationDialog = new ImportConfirmationDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
- }
- return fImportConfirmationDialog;
- }
-
- /**
- * Sets the import confirmation dialog implementation.
- * @param confirmDialog - a import confirmation dialog implementation.
- */
- public void setImportConfirmationDialog(IImportConfirmationDialog confirmDialog) {
- fImportConfirmationDialog = confirmDialog;
- }
-}
-
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to add contexts to a given channel and all of its events.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class AddContextOnChannelHandler extends BaseAddContextHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof ChannelCommandParameter) {
- TraceChannelComponent channel = ((ChannelCommandParameter)param).getChannel();
- channel.addContexts(contextNames, monitor);
- }
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceChannelComponent channel = null;
- TraceSessionComponent session = null;
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceChannelComponent) {
- // Add only if corresponding TraceSessionComponents is inactive and not destroyed
- TraceChannelComponent tmpChannel = (TraceChannelComponent) element;
- session = tmpChannel.getSession();
- if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
- channel = tmpChannel;
- }
- }
- }
- }
-
- boolean isEnabled = (channel != null);
- fLock.lock();
- try {
- fParam = null;
- if(isEnabled) {
- fParam = new ChannelCommandParameter(session, channel);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to add contexts to all channels and all events.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class AddContextOnDomainHandler extends BaseAddContextHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof DomainCommandParameter) {
- TraceDomainComponent domain = ((DomainCommandParameter)param).getDomain();
- domain.addContexts(contextNames, monitor);
- }
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceDomainComponent domain = null;
- TraceSessionComponent session = null;
-
- // Check if one domain is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceDomainComponent) {
- TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
- session = (TraceSessionComponent) tmpDomain.getParent();
-
- // Add only TraceDomainComponent whose TraceSessionComponent parent is inactive and not destroyed
- if ((session.getSessionState() == TraceSessionState.INACTIVE) && (!session.isDestroyed())) {
- domain = tmpDomain;
- }
- }
- }
- }
-
- boolean isEnabled = domain != null;
-
- fLock.lock();
- try {
- fParam = null;
- if (isEnabled) {
- fParam = new DomainCommandParameter(session, domain);
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to add contexts to a given event.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class AddContextOnEventHandler extends BaseAddContextHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof EventCommandParameter) {
- TraceEventComponent event = ((EventCommandParameter)param).getEvent();
- event.addContexts(contextNames, monitor);
- }
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceEventComponent event = null;
- TraceSessionComponent session = null;
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceEventComponent) {
- // Add only if corresponding TraceSessionComponents is inactive and not destroyed
- TraceEventComponent tmpEvent = (TraceEventComponent) element;
- session = tmpEvent.getSession();
- if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
- event = tmpEvent;
- }
- }
- }
- }
-
- boolean isEnabled = (event != null);
- fLock.lock();
- try {
- fParam = null;
- if(isEnabled) {
- fParam = new EventCommandParameter(session, event);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IGetEventInfoDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to assign events to a session and channel and enable/configure them.
- * This is done on the trace provider level.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class AssignEventHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The command execution parameter.
- */
- private Parameter fParam;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- fLock.lock();
- try {
- // Make a copy for thread safety
- final Parameter param = new Parameter(fParam);
-
- // Open dialog box to retrieve the session and channel where the events should be enabled in.
- final IGetEventInfoDialog dialog = TraceControlDialogFactory.getInstance().getGetEventInfoDialog();
- dialog.setIsKernel(param.isKernel());
- dialog.setSessions(param.getSessions());
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_EnableEventsJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
-
- Exception error = null;
-
- try {
- List<String> eventNames = new ArrayList<>();
- List<BaseEventComponent> events = param.getEvents();
- // Create list of event names
- for (Iterator<BaseEventComponent> iterator = events.iterator(); iterator.hasNext();) {
- BaseEventComponent baseEvent = iterator.next();
- eventNames.add(baseEvent.getName());
- }
-
- TraceChannelComponent channel = dialog.getChannel();
- if (channel == null) {
- // enable events on default channel (which will be created by lttng-tools)
- dialog.getSession().enableEvents(eventNames, param.isKernel(), dialog.getFilterExpression(), monitor);
- } else {
- channel.enableEvents(eventNames, dialog.getFilterExpression(), monitor);
- }
-
- } catch (ExecutionException e) {
- error = e;
- }
-
- // refresh in all cases
- refresh(new CommandParameter(dialog.getSession()));
-
- if (error != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_EnableEventsFailure, error);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
-
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- ArrayList<BaseEventComponent> events = new ArrayList<>();
- TraceSessionComponent[] sessions = null;
- Boolean isKernel = null;
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
-
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof BaseEventComponent) {
- BaseEventComponent event = (BaseEventComponent) element;
- ITraceControlComponent provider = event.getParent();
-
- // check for kernel or UST provider
- boolean temp = false;
- if (provider instanceof KernelProviderComponent) {
- temp = true;
- } else if (provider instanceof UstProviderComponent) {
- temp = false;
- } else {
- return false;
- }
- if (isKernel == null) {
- isKernel = Boolean.valueOf(temp);
- } else {
- // don't mix events from Kernel and UST provider
- if (isKernel.booleanValue() != temp) {
- return false;
- }
- }
-
- // Add BaseEventComponents
- events.add(event);
-
- if (sessions == null) {
- TargetNodeComponent root = (TargetNodeComponent)event.getParent().getParent().getParent();
- sessions = root.getSessions();
- }
- }
- }
- }
-
- boolean isEnabled = ((!events.isEmpty()) && (sessions != null) && (sessions.length > 0));
-
- // To avoid compiler warnings check for null even if isKernel is always not null when used below
- if (isKernel == null) {
- return false;
- }
-
- fLock.lock();
- try {
- fParam = null;
- if(isEnabled) {
- fParam = new Parameter(sessions, events, isKernel);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-
- /**
- * Class containing parameter for the command execution.
- */
- private static final class Parameter {
-
- /**
- * The list of event components the command is to be executed on.
- */
- private final List<BaseEventComponent> fEvents;
-
- /**
- * The list of available sessions.
- */
- final private TraceSessionComponent[] fSessions;
-
- /**
- * Flag for indicating Kernel or UST.
- */
- private final boolean fIsKernel;
-
- /**
- * Constructor
- *
- * @param sessions - a array of trace sessions
- * @param events - a lists of events to enable
- * @param isKernel - domain (true for kernel or UST)
- */
- public Parameter(TraceSessionComponent[] sessions, List<BaseEventComponent> events, boolean isKernel) {
- fSessions = Arrays.copyOf(sessions, sessions.length);
- fEvents = new ArrayList<>();
- fEvents.addAll(events);
- fIsKernel = isKernel;
- }
-
- /**
- * Copy constructor
- * @param other - a parameter to copy
- */
- public Parameter(Parameter other) {
- this(other.fSessions, other.fEvents, other.fIsKernel);
- }
-
- public TraceSessionComponent[] getSessions() {
- return fSessions;
- }
-
- public List<BaseEventComponent> getEvents() {
- return fEvents;
- }
-
- public boolean isKernel() {
- return fIsKernel;
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IAddContextDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.progress.UIJob;
-
-/**
- * <p>
- * Base command handler implementation to add contexts.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class BaseAddContextHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The command execution parameter.
- */
- protected CommandParameter fParam = null;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Adds contexts to channel(s) and/or event(s)
- *
- * @param param
- * - a parameter instance with data for the command execution
- * @param contextNames
- * - list contexts to add
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If something goes wrong
- */
- public abstract void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException;
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
- fLock.lock();
- try {
- // Make a copy for thread safety
- final CommandParameter param = fParam.clone();
-
- UIJob getJob = new UIJob(Messages.TraceControl_GetContextJob) {
- @Override
- public IStatus runInUIThread(IProgressMonitor monitor) {
-
- try {
- final List<String> availableContexts = param.getSession().getContextList(monitor);
- final IAddContextDialog dialog = TraceControlDialogFactory.getInstance().getAddContextDialog();
- dialog.setAvalibleContexts(availableContexts);
-
- if ((dialog.open() != Window.OK) || (dialog.getContexts().isEmpty())) {
- return Status.OK_STATUS;
- }
-
- Job addJob = new Job(Messages.TraceControl_AddContextJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor2) {
- Exception error = null;
-
- try {
- List<String> contextNames = dialog.getContexts();
- addContexts(param, contextNames, monitor2);
-
- } catch (ExecutionException e) {
- error = e;
- }
-
- // get session configuration in all cases
- refresh(param);
-
- if (error != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_AddContextFailure, error);
- }
- return Status.OK_STATUS;
- }
- };
- addJob.setUser(true);
- addJob.schedule();
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_GetContextFailure, e);
- }
-
- return Status.OK_STATUS;
- }
- };
- getJob.setUser(false);
- getJob.schedule();
-
- } finally {
- fLock.unlock();
- }
- return null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Abstract Command handler implementation for all control view handlers.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class BaseControlViewHandler extends AbstractHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The synchronization lock.
- */
- protected final ReentrantLock fLock = new ReentrantLock();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * @return returns the workbench page for the Control View
- */
- protected IWorkbenchPage getWorkbenchPage() {
- // Check if we are closing down
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- return null;
- }
-
- // Check if we are in the Project View
- IWorkbenchPage page = window.getActivePage();
- if (page == null) {
- return null;
- }
-
- IWorkbenchPart part = page.getActivePart();
- if (!(part instanceof ControlView)) {
- return null;
- }
- return page;
- }
-
- /**
- * Refreshes the session information based on given session (in CommandParameter)
- * @param param - command parameter containing the session to refresh
- */
- protected void refresh(final CommandParameter param) {
- Job job = new Job(Messages.TraceControl_RetrieveNodeConfigurationJob) {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- param.getSession().getConfigurationFromNode(monitor);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ListSessionFailure, e);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableChannelDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-
-/**
- * <p>
- * Base implementation of a command handler to enable a trace channel.
- * </p>
- *
- * @author Bernd Hufmann
- */
-abstract class BaseEnableChannelHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- protected CommandParameter fParam;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Enables channels with given names which are part of this domain. If a
- * given channel doesn't exists it creates a new channel with the given
- * parameters (or default values if given parameter is null).
- *
- * @param param
- * - a parameter instance with data for the command execution
- * @param channelNames
- * - a list of channel names to enable on this domain
- * @param info
- * - channel information to set for the channel (use null for
- * default)
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If something goes wrong when enabling the channel
- */
- public abstract void enableChannel(CommandParameter param,
- List<String> channelNames, IChannelInfo info, boolean isKernel,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * @param param - a parameter instance with data for the command execution
- * @return returns the relevant domain (null if domain is not known)
- */
- public abstract TraceDomainComponent getDomain(CommandParameter param);
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fLock.lock();
- try {
- final CommandParameter param = fParam.clone();
-
- final IEnableChannelDialog dialog = TraceControlDialogFactory.getInstance().getEnableChannelDialog();
- dialog.setTargetNodeComponent(param.getSession().getTargetNode());
- dialog.setDomainComponent(getDomain(param));
- dialog.setHasKernel(param.getSession().hasKernelProvider());
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_CreateChannelStateJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- Exception error = null;
-
- List<String> channelNames = new ArrayList<>();
- channelNames.add(dialog.getChannelInfo().getName());
-
- try {
- enableChannel(param, channelNames, dialog.getChannelInfo(), dialog.isKernel(), monitor);
- } catch (ExecutionException e) {
- error = e;
- }
-
- // refresh in all cases
- refresh(param);
-
- if (error != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateChannelStateFailure, error);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableEventsDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Base command handler implementation to enable events.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class BaseEnableEventHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The command execution parameter.
- */
- protected CommandParameter fParam = null;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Enables a list of events for given parameters.
- *
- * @param param
- * - a parameter instance with data for the command execution
- * @param eventNames
- * - list of event names
- * @param isKernel
- * - true if kernel domain else false
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails for some reason
- */
- public abstract void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Enables all syscall events.
- *
- * @param param
- * - a parameter instance with data for the command execution
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails for some reason
- */
- public abstract void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Enables a dynamic probe.
- *
- * @param param
- * - a parameter instance with data for the command execution
- * @param eventName
- * - a event name
- * @param isFunction
- * - true for dynamic function entry/return probe else false
- * @param probe
- * - a dynamic probe information
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails for some reason
- */
- public abstract void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Enables events using log level
- *
- * @param param
- * - a parameter instance with data for the command execution
- * @param eventName
- * - a event name
- * @param logLevelType
- * - a log level type
- * @param level
- * - a log level
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails for some reason
- */
- public abstract void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * @param param
- * - a parameter instance with data for the command execution
- * @return returns the relevant domain (null if domain is not known)
- */
- public abstract TraceDomainComponent getDomain(CommandParameter param);
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
- fLock.lock();
- try {
- // Make a copy for thread safety
- final CommandParameter param = fParam.clone();
-
- TargetNodeComponent node = param.getSession().getTargetNode();
- List<ITraceControlComponent> providers = node.getChildren(TraceProviderGroup.class);
-
- final IEnableEventsDialog dialog = TraceControlDialogFactory.getInstance().getEnableEventsDialog();
- dialog.setTraceProviderGroup((TraceProviderGroup)providers.get(0));
- dialog.setTraceDomainComponent(getDomain(param));
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_ChangeEventStateJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- Exception error = null;
-
- try {
- String filter = dialog.getFilterExpression();
-
- // Enable tracepoint events
- if (dialog.isTracepoints()) {
- if (dialog.isAllTracePoints()) {
- enableEvents(param, null, dialog.isKernel(), filter, monitor);
- } else {
- List<String> eventNames = dialog.getEventNames();
- if (!eventNames.isEmpty()) {
- enableEvents(param, eventNames, dialog.isKernel(), filter, monitor);
- }
- }
- }
-
- // Enable syscall events
- if (dialog.isAllSysCalls()) {
- enableSyscalls(param, monitor);
- }
-
- // Enable dynamic probe
- if (dialog.isDynamicProbe() && (dialog.getProbeEventName() != null) && (dialog.getProbeName() != null)) {
- enableProbe(param, dialog.getProbeEventName(), false, dialog.getProbeName(), monitor);
- }
-
- // Enable dynamic function probe
- if (dialog.isDynamicFunctionProbe() && (dialog.getFunctionEventName() != null) && (dialog.getFunction() != null)) {
- enableProbe(param, dialog.getFunctionEventName(), true, dialog.getFunction(), monitor);
- }
-
- // Enable event using a wildcard
- if (dialog.isWildcard()) {
- List<String> eventNames = dialog.getEventNames();
- eventNames.add(dialog.getWildcard());
-
- if (!eventNames.isEmpty()) {
- enableEvents(param, eventNames, dialog.isKernel(), filter, monitor);
- }
- }
-
- // Enable events using log level
- if (dialog.isLogLevel()) {
- enableLogLevel(param, dialog.getLogLevelEventName(), dialog.getLogLevelType(), dialog.getLogLevel(), filter, monitor);
- }
-
- } catch (ExecutionException e) {
- error = e;
- }
-
- // refresh in all cases
- refresh(param);
-
- if (error != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeEventStateFailure, error);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to delete a target host.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class BaseNodeHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The target node component the command is to be executed on.
- */
- protected TargetNodeComponent fTargetNode = null;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TargetNodeComponent node = null;
- // Check if the node component is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- Object element = ((StructuredSelection) selection).getFirstElement();
- node = (element instanceof TargetNodeComponent) ? (TargetNodeComponent) element : null;
- }
- boolean isEnabled = node != null;
- fLock.lock();
- try {
- if (isEnabled) {
- fTargetNode = node;
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-
-
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-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 {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The command execution parameter.
- */
- protected DomainCommandParameter fParam = null;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
- fLock.lock();
- try {
- // Make a copy for thread safety
- final DomainCommandParameter param = fParam.clone();
-
- Job addJob = new Job(Messages.TraceControl_AddCalibrateJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- param.getDomain().calibrate(monitor);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_AddCalibrateFailure, e);
- }
-
- return Status.OK_STATUS;
- }
- };
- addJob.setUser(true);
- addJob.schedule();
-
- } finally {
- fLock.unlock();
- }
- return Status.OK_STATUS;
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceDomainComponent domain = null;
- TraceSessionComponent session = null;
-
- // Check if one domain is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- 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;
- }
- }
- }
- }
-
- boolean isEnabled = domain != null;
-
- fLock.lock();
- try {
- fParam = null;
- if (isEnabled) {
- fParam = new DomainCommandParameter(session, domain);
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Abstract command handler implementation to enable or disabling a trace channel.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class ChangeChannelStateHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The command execution parameter.
- */
- protected Parameter fParam;
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the new state to set
- */
- protected abstract TraceEnablement getNewState();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Changes the state of the given channels.
- * @param domain - the domain of the channels.
- * @param channelNames - a list of channel names
- * @param monitor - a progress monitor
- * @throws ExecutionException If the command fails
- */
- protected abstract void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException;
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- fLock.lock();
- try {
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
-
- final Parameter param = new Parameter(fParam);
-
- Job job = new Job(Messages.TraceControl_ChangeChannelStateJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- Exception error = null;
-
- TraceSessionComponent session = null;
-
- try {
- TraceDomainComponent kernelDomain = param.getKernelDomain();
- List<TraceChannelComponent> kernelChannels = param.getKernelChannels();
-
- if (kernelDomain != null) {
- session = (TraceSessionComponent)kernelDomain.getParent();
- List<String> channelNames = new ArrayList<>();
- for (Iterator<TraceChannelComponent> iterator = kernelChannels.iterator(); iterator.hasNext();) {
- // Enable all selected channels which are disabled
- TraceChannelComponent channel = iterator.next();
- channelNames.add(channel.getName());
- }
-
- changeState(kernelDomain, channelNames, monitor);
-
- for (Iterator<TraceChannelComponent> iterator = kernelChannels.iterator(); iterator.hasNext();) {
- // Enable all selected channels which are disabled
- TraceChannelComponent channel = iterator.next();
- channel.setState(getNewState());
- }
- }
-
- TraceDomainComponent ustDomain = param.getUstDomain();
- List<TraceChannelComponent> ustChannels = param.getUstChannels();
- if (ustDomain != null) {
- if (session == null) {
- session = (TraceSessionComponent)ustDomain.getParent();
- }
-
- List<String> channelNames = new ArrayList<>();
- for (Iterator<TraceChannelComponent> iterator = ustChannels.iterator(); iterator.hasNext();) {
- // Enable all selected channels which are disabled
- TraceChannelComponent channel = iterator.next();
- channelNames.add(channel.getName());
- }
-
- changeState(ustDomain, channelNames, monitor);
-
- for (Iterator<TraceChannelComponent> iterator = ustChannels.iterator(); iterator.hasNext();) {
- // Enable all selected channels which are disabled
- TraceChannelComponent channel = iterator.next();
- channel.setState(getNewState());
- }
- }
- } catch (ExecutionException e) {
- error = e;
- }
-
- // In all cases notify listeners
- if (session != null) {
- session.fireComponentChanged(session);
- }
-
- if (error != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeChannelStateFailure, error);
- }
-
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
-
- return null;
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceDomainComponent kernelDomain = null;
- TraceDomainComponent ustDomain = null;
- List<TraceChannelComponent> kernelChannels = new ArrayList<>();
- List<TraceChannelComponent> ustChannels = new ArrayList<>();
-
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- String sessionName = null;
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
-
- if (element instanceof TraceChannelComponent) {
-
- // Add only TraceChannelComponents that are disabled
- TraceChannelComponent channel = (TraceChannelComponent) element;
- if (sessionName == null) {
- sessionName = String.valueOf(channel.getSessionName());
- }
-
- // Enable command only for channels of same session
- if (!sessionName.equals(channel.getSessionName())) {
- kernelChannels.clear();
- ustChannels.clear();
- break;
- }
-
- if ((channel.getState() != getNewState())) {
- if (channel.isKernel()) {
- kernelChannels.add(channel);
- if (kernelDomain == null) {
- kernelDomain = (TraceDomainComponent) channel.getParent();
- }
- } else {
- ustChannels.add(channel);
- if (ustDomain == null) {
- ustDomain = (TraceDomainComponent) channel.getParent();
- }
- }
- }
- }
- }
- }
-
- boolean isEnabled = (!kernelChannels.isEmpty() || !ustChannels.isEmpty());
- fLock.lock();
- try {
- if (isEnabled) {
- fParam = new Parameter(kernelDomain, ustDomain, kernelChannels, ustChannels);
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-
- /**
- * Class containing parameter for the command execution.
- */
- protected static class Parameter {
- /**
- * Kernel domain component reference.
- */
- protected final TraceDomainComponent fKernelDomain;
- /**
- * UST domain component reference.
- */
- protected final TraceDomainComponent fUstDomain;
- /**
- * The list of kernel channel components the command is to be executed on.
- */
- protected final List<TraceChannelComponent> fKernelChannels;
- /**
- * The list of UST channel components the command is to be executed on.
- */
- protected final List<TraceChannelComponent> fUstChannels;
-
- /**
- * Constructor
- * @param kernelDomain - a kernel domain component
- * @param ustDomain - a UST domain component
- * @param kernelChannels - list of available kernel channels
- * @param ustChannels - list of available UST channels
- */
- public Parameter(TraceDomainComponent kernelDomain, TraceDomainComponent ustDomain, List<TraceChannelComponent> kernelChannels, List<TraceChannelComponent> ustChannels) {
- fKernelDomain = kernelDomain;
- fUstDomain = ustDomain;
- fKernelChannels = new ArrayList<>();
- fKernelChannels.addAll(kernelChannels);
- fUstChannels = new ArrayList<>();
- fUstChannels.addAll(ustChannels);
- }
-
- /**
- * Copy constructor
- * @param other a parameter to copy
- */
- public Parameter(Parameter other) {
- this(other.fKernelDomain, other.fUstDomain, other.fKernelChannels, other.fUstChannels);
- }
-
- /**
- * @return the kernel domain component.
- */
- public TraceDomainComponent getKernelDomain() {
- return fKernelDomain;
- }
-
- /**
- * @return the UST domain component.
- */
- public TraceDomainComponent getUstDomain() {
- return fUstDomain;
- }
-
- /**
- * @return the list of kernel channel components.
- */
- public List<TraceChannelComponent> getKernelChannels() {
- return fKernelChannels;
- }
-
- /**
- * @return the list of UST channel components.
- */
- public List<TraceChannelComponent> getUstChannels() {
- return fUstChannels;
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Base Command handler implementation to enable or disabling a trace channel.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class ChangeEventStateHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The command execution parameter.
- */
- protected Parameter fParam;
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the new state to set
- */
- protected abstract TraceEnablement getNewState();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Change the state
- * @param channel - channel of events to be enabled
- * @param eventNames - list event names
- * @param monitor - a progress monitor
- * @throws ExecutionException If the command fails
- */
- protected abstract void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException;
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
-
- fLock.lock();
- try {
-
- final Parameter param = new Parameter(fParam);
-
- Job job = new Job(Messages.TraceControl_ChangeChannelStateJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- Exception error = null;
-
- TraceSessionComponent session = null;
-
- try {
- boolean isAll = false;
- if (param.getChannel() != null) {
- session = param.getChannel().getSession();
- List<String> eventNames = new ArrayList<>();
- List<TraceEventComponent> events = param.getEvents();
-
- for (Iterator<TraceEventComponent> iterator = events.iterator(); iterator.hasNext();) {
- // Enable/disable all selected channels which are disabled
- TraceEventComponent traceEvent = iterator.next();
-
- // Workaround for wildcard handling in lttng-tools
- if ("*".equals(traceEvent.getName())) { //$NON-NLS-1$
- isAll = true;
- } else {
- eventNames.add(traceEvent.getName());
- }
- }
- if (isAll) {
- changeState(param.getChannel(), null, monitor);
- }
-
- if (!eventNames.isEmpty()) {
- changeState(param.getChannel(), eventNames, monitor);
- }
-
- for (Iterator<TraceEventComponent> iterator = events.iterator(); iterator.hasNext();) {
- // Enable all selected channels which are disabled
- TraceEventComponent ev = iterator.next();
- ev.setState(getNewState());
- }
- }
- } catch (ExecutionException e) {
- error = e;
- }
-
- if (session != null) {
- // In all cases notify listeners
- session.fireComponentChanged(session);
- }
-
- if (error != null) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeEventStateFailure, error);
- }
-
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
-
- TraceChannelComponent channel = null;
- List<TraceEventComponent> events = new ArrayList<>();
-
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- String sessionName = null;
- String channelName = null;
-
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
-
- if (element instanceof TraceEventComponent) {
-
- TraceEventComponent event = (TraceEventComponent) element;
- if (sessionName == null) {
- sessionName = String.valueOf(event.getSessionName());
- }
-
- if (channel == null) {
- channel = (TraceChannelComponent)event.getParent();
- }
-
- if (channelName == null) {
- channelName = event.getChannelName();
- }
-
- // Enable command only for events of same session, same channel and domain
- if ((!sessionName.equals(event.getSessionName())) ||
- (!channelName.equals(event.getChannelName())) ||
- (channel.isKernel() != event.isKernel())) {
- events.clear();
- break;
- }
-
- if ((event.getState() != getNewState())) {
- events.add(event);
- }
- }
- }
- }
- boolean isEnabled = !events.isEmpty();
-
- fLock.lock();
- try {
- fParam = null;
- if (isEnabled) {
- fParam = new Parameter(channel, events);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-
- /**
- * Class containing parameter for the command execution.
- */
- protected static class Parameter {
- /**
- * Channel component reference.
- */
- private final TraceChannelComponent fChannel;
- /**
- * The list of kernel channel components the command is to be executed on.
- */
- private final List<TraceEventComponent> fEvents = new ArrayList<>();
-
- /**
- * Constructor
- * @param channel - a channel component
- * @param events - a list of event components
- */
- public Parameter(TraceChannelComponent channel, List<TraceEventComponent> events) {
- fChannel = channel;
- fEvents.addAll(events);
- }
-
- /**
- * Copy constructor
- * @param other - a parameter to copy
- */
- public Parameter(Parameter other) {
- this(other.fChannel, other.fEvents);
- }
-
- /**
- * @return the trace channel component.
- */
- public TraceChannelComponent getChannel() {
- return fChannel;
- }
-
- /**
- * @return a list of trace event components.
- */
- public List<TraceEventComponent> getEvents() {
- return fEvents;
- }
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Abstract command handler implementation to start or stop one or more trace sessions.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class ChangeSessionStateHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The list of session components the command is to be executed on.
- */
- protected List<TraceSessionComponent> fSessions = new ArrayList<>();
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return new required state.
- */
- public abstract TraceSessionState getNewState();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Performs the state change on given session.
- *
- * @param session
- * - a session which state is to be changed
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public abstract void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException;
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
-
- fLock.lock();
- try {
-
- final List<TraceSessionComponent> sessions = new ArrayList<>();
- sessions.addAll(fSessions);
-
- Job job = new Job(Messages.TraceControl_ChangeSessionStateJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- for (Iterator<TraceSessionComponent> iterator = sessions.iterator(); iterator.hasNext();) {
-
- // Start all selected sessions
- TraceSessionComponent session = iterator.next();
- changeState(session, monitor);
-
- // Set Session state
- session.setSessionState(getNewState());
- session.fireComponentChanged(session);
- }
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeSessionStateFailure, e);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- List<TraceSessionComponent> sessions = new ArrayList<>(0);
-
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceSessionComponent) {
- // Add only TraceSessionComponents that are inactive and not destroyed
- TraceSessionComponent session = (TraceSessionComponent) element;
- if ((session.getSessionState() != getNewState()) && (!session.isDestroyed())) {
- sessions.add(session);
- }
- }
- }
- }
- boolean isEnabled = !sessions.isEmpty();
- fLock.lock();
- try {
- fSessions = null;
- if (isEnabled) {
- fSessions = sessions;
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * Class containing parameter for the command execution.
- *
- * @author Bernd Hufmann
- */
-public class ChannelCommandParameter extends CommandParameter {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- private TraceChannelComponent fChannel;
-
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param session - a trace session component.
- * @param channel - a trace channel component
- */
- public ChannelCommandParameter(TraceSessionComponent session, TraceChannelComponent channel) {
- super(session);
- fChannel = channel;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return the trace channel component
- */
- public TraceChannelComponent getChannel() {
- return fChannel;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public ChannelCommandParameter clone() {
- ChannelCommandParameter clone = (ChannelCommandParameter) super.clone();
- clone.fChannel = fChannel;
- return clone;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * Class containing parameter for the command execution.
- *
- * @author Bernd Hufmann
- */
-public class CommandParameter implements Cloneable {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The trace session component.
- */
- private TraceSessionComponent fSession;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param session a trace session component.
- */
- public CommandParameter(TraceSessionComponent session) {
- fSession = session;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return the session component.
- */
- public TraceSessionComponent getSession() {
- return fSession;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public CommandParameter clone() {
- CommandParameter clone = null;
- try {
- clone = (CommandParameter) super.clone();
- clone.fSession = fSession;
- } catch (CloneNotSupportedException e) {
- }
- return clone;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-
-/**
- * <p>
- * Command handler implementation to connect to a target host.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ConnectHandler extends BaseNodeHandler {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fLock.lock();
- try {
- fTargetNode.connect();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- boolean isEnabled = false;
- fLock.lock();
- try {
- isEnabled = (super.isEnabled() && (fTargetNode.getTargetNodeState() == TargetNodeState.DISCONNECTED));
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ICreateSessionDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to create a trace session.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class CreateSessionHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The trace session group the command is to be executed on.
- */
- private TraceSessionGroup fSessionGroup = null;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- fLock.lock();
- try {
- final TraceSessionGroup sessionGroup = fSessionGroup;
-
- // Open dialog box for the node name and address
- final ICreateSessionDialog dialog = TraceControlDialogFactory.getInstance().getCreateSessionDialog();
- dialog.initialize(sessionGroup);
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_CreateSessionJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- sessionGroup.createSession(dialog.getParameters(), monitor);
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateSessionFailure, e);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceSessionGroup sessionGroup = null;
-
- // Check if the session group project is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- Object element = ((StructuredSelection) selection).getFirstElement();
- sessionGroup = (element instanceof TraceSessionGroup) ? (TraceSessionGroup) element : null;
- }
-
- boolean isEnabled = sessionGroup != null;
- fLock.lock();
- try {
- fSessionGroup = null;
- if(isEnabled) {
- fSessionGroup = sessionGroup;
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-
-/**
- * <p>
- * Command handler implementation to delete a target host.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class DeleteHandler extends BaseNodeHandler {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fLock.lock();
- try {
- ITraceControlComponent root = fTargetNode.getParent();
- fTargetNode.removeAllChildren();
- fTargetNode.deregister();
- root.removeChild(fTargetNode);
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- boolean isEnabled = false;
- fLock.lock();
- try {
- isEnabled = (super.isEnabled() && (fTargetNode.getTargetNodeState() == TargetNodeState.DISCONNECTED));
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IConfirmDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Command handler implementation to destroy one or more trace sessions.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class DestroySessionHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The list of session components the command is to be executed on.
- */
- private final List<TraceSessionComponent> fSessions = new ArrayList<>();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
- // Get user confirmation
- IConfirmDialog dialog = TraceControlDialogFactory.getInstance().getConfirmDialog();
- if (!dialog.openConfirm(window.getShell(),
- Messages.TraceControl_DestroyConfirmationTitle,
- Messages.TraceControl_DestroyConfirmationMessage)) {
-
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_DestroySessionJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- // Make a copy of the list of sessions to avoid ConcurrentModificationException when iterating
- // over fSessions, since fSessions is modified in another thread triggered by the tree viewer refresh
- // after removing a session.
- TraceSessionComponent[] sessions = fSessions.toArray(new TraceSessionComponent[fSessions.size()]);
-
- for (int i = 0; i < sessions.length; i++) {
- // Destroy all selected sessions
- TraceSessionComponent session = sessions[i];
- TraceSessionGroup sessionGroup = (TraceSessionGroup)session.getParent();
- sessionGroup.destroySession(session, monitor);
- }
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_DestroySessionFailure, e);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
-
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
- fSessions.clear();
-
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceSessionComponent) {
- // Add only TraceSessionComponents that are inactive and not destroyed
- TraceSessionComponent session = (TraceSessionComponent) element;
- if ((session.getSessionState() == TraceSessionState.INACTIVE) && (!session.isDestroyed())) {
- fSessions.add((TraceSessionComponent)element);
- }
- }
- }
- }
- return !fSessions.isEmpty();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-
-/**
- * <p>
- * Command handler implementation to disable one or more trace channels per session and domain.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class DisableChannelHandler extends ChangeChannelStateHandler {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- protected TraceEnablement getNewState() {
- return TraceEnablement.DISABLED;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException {
- domain.disableChannels(channelNames, monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-
-/**
- * <p>
- * Command handler implementation to disable one or more events session, domain and channel.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class DisableEventHandler extends ChangeEventStateHandler {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- protected TraceEnablement getNewState() {
- return TraceEnablement.DISABLED;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
- channel.disableEvent(eventNames, monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-
-/**
- * <p>
- * Command handler implementation to disconnect from a target host.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class DisconnectHandler extends BaseNodeHandler {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fLock.lock();
- try {
- fTargetNode.disconnect();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- boolean isEnabled = false;
- fLock.lock();
- try {
- isEnabled = super.isEnabled() && (fTargetNode.getTargetNodeState() == TargetNodeState.CONNECTED);
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * Class containing parameter for the command execution.
- *
- * @author Bernd Hufmann
- */
-public class DomainCommandParameter extends CommandParameter {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- private TraceDomainComponent fDomain;
-
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param session - a trace session component.
- * @param domain - a trace domain component
- */
- public DomainCommandParameter(TraceSessionComponent session, TraceDomainComponent domain) {
- super(session);
- fDomain = domain;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return the trace domain component
- */
- public TraceDomainComponent getDomain() {
- return fDomain;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public DomainCommandParameter clone() {
- DomainCommandParameter clone = (DomainCommandParameter) super.clone();
- clone.fDomain = fDomain;
- return clone;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-
-/**
- * <p>
- * Command handler implementation to enable one or more trace channels per session and domain.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableChannelHandler extends ChangeChannelStateHandler {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- protected TraceEnablement getNewState() {
- return TraceEnablement.ENABLED;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException {
- domain.enableChannels(channelNames, null, monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to enable a trace channel for known domain.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableChannelOnDomainHandler extends BaseEnableChannelHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void enableChannel(CommandParameter param, List<String> channelNames, IChannelInfo info, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof DomainCommandParameter) {
- ((DomainCommandParameter)param).getDomain().enableChannels(channelNames, info, monitor);
- }
- }
-
- @Override
- public TraceDomainComponent getDomain(CommandParameter param) {
- if (param instanceof DomainCommandParameter) {
- return ((DomainCommandParameter)param).getDomain();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceDomainComponent domain = null;
- TraceSessionComponent session = null;
-
- // Check if one domain is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceDomainComponent) {
- TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
- session = (TraceSessionComponent) tmpDomain.getParent();
-
- // Add only TraceDomainComponent whose TraceSessionComponent parent is inactive and not destroyed
- if ((session.getSessionState() == TraceSessionState.INACTIVE) && (!session.isDestroyed())) {
- domain = tmpDomain;
- }
- }
- }
- }
-
- boolean isEnabled = domain != null;
-
- fLock.lock();
- try {
- fParam = null;
- if (isEnabled) {
- fParam = new DomainCommandParameter(session, domain);
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to enable a trace channel for unknown domain
- * (on session level).
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableChannelOnSessionHandler extends BaseEnableChannelHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- @Override
- public void enableChannel(CommandParameter param, List<String> channelNames, IChannelInfo info, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
- param.getSession().enableChannels(channelNames, info, isKernel, monitor);
- }
-
- @Override
- public TraceDomainComponent getDomain(CommandParameter param) {
- return null;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceSessionComponent session = null;
- // Check if one session is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceSessionComponent) {
- // Add only TraceSessionComponents that are inactive and not destroyed
- TraceSessionComponent tmpSession = (TraceSessionComponent) element;
- if ((tmpSession.getSessionState() == TraceSessionState.INACTIVE) && (!tmpSession.isDestroyed())) {
- session = tmpSession;
- }
- }
- }
- }
- boolean isEnabled = session != null;
-
- fLock.lock();
- try {
- fParam = null;
- if (isEnabled) {
- fParam = new CommandParameter(session);
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-
-/**
- * <p>
- * Command handler implementation to enable one or more events session, domain and channel.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableEventHandler extends ChangeEventStateHandler {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- protected TraceEnablement getNewState() {
- return TraceEnablement.ENABLED;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
- channel.enableEvents(eventNames, monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to enable events for a known channel.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableEventOnChannelHandler extends BaseEnableEventHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExression, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof ChannelCommandParameter) {
- ((ChannelCommandParameter)param).getChannel().enableEvents(eventNames, filterExression, monitor);
- }
- }
-
- @Override
- public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof ChannelCommandParameter) {
- ((ChannelCommandParameter)param).getChannel().enableSyscalls(monitor);
- }
- }
-
- @Override
- public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof ChannelCommandParameter) {
- ((ChannelCommandParameter)param).getChannel().enableProbe(eventName, isFunction, probe, monitor);
- }
- }
-
- @Override
- public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExression, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof ChannelCommandParameter) {
- ((ChannelCommandParameter)param).getChannel().enableLogLevel(eventName, logLevelType, level, filterExression, monitor);
- }
- }
-
- @Override
- public TraceDomainComponent getDomain(CommandParameter param) {
- if (param instanceof ChannelCommandParameter) {
- return (TraceDomainComponent) ((ChannelCommandParameter)param).getChannel().getParent();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceChannelComponent channel = null;
- TraceSessionComponent session = null;
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceChannelComponent) {
- // Add only if corresponding TraceSessionComponents is inactive and not destroyed
- TraceChannelComponent tmpChannel = (TraceChannelComponent) element;
- session = tmpChannel.getSession();
- if(!session.isDestroyed()) {
- channel = tmpChannel;
- }
- }
- }
- }
-
- boolean isEnabled = (channel != null);
- fLock.lock();
- try {
- fParam = null;
- if(isEnabled) {
- fParam = new ChannelCommandParameter(session, channel);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
-
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to enable events for a known domain and default channel 'channel0'
- * (which will be created if doesn't exist).
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableEventOnDomainHandler extends BaseEnableEventHandler {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExression, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof DomainCommandParameter) {
- ((DomainCommandParameter)param).getDomain().enableEvents(eventNames, monitor);
- }
- }
-
- @Override
- public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof DomainCommandParameter) {
- ((DomainCommandParameter)param).getDomain().enableSyscalls(monitor);
- }
- }
-
- @Override
- public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof DomainCommandParameter) {
- ((DomainCommandParameter)param).getDomain().enableProbe(eventName, isFunction, probe, monitor);
- }
- }
-
- @Override
- public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExression, IProgressMonitor monitor) throws ExecutionException {
- if (param instanceof DomainCommandParameter) {
- ((DomainCommandParameter)param).getDomain().enableLogLevel(eventName, logLevelType, level, filterExression, monitor);
- }
- }
-
- @Override
- public TraceDomainComponent getDomain(CommandParameter param) {
- if (param instanceof DomainCommandParameter) {
- return ((DomainCommandParameter)param).getDomain();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceDomainComponent domain = null;
- TraceSessionComponent session = null;
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceDomainComponent) {
- // Add only if corresponding TraceSessionComponents is inactive and not destroyed
- TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
- session = tmpDomain.getSession();
- if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
- domain = tmpDomain;
- }
- }
- }
- }
-
- boolean isEnabled = (domain != null);
- fLock.lock();
- try {
- fParam = null;
- if(isEnabled) {
- fParam = new DomainCommandParameter(session, domain);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to enable events for a known session and default channel 'channel0'
- * (which will be created if doesn't exist).
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class EnableEventOnSessionHandler extends BaseEnableEventHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- //-------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
- param.getSession().enableEvents(eventNames, isKernel, filterExpression, monitor);
- }
-
- @Override
- public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
- param.getSession().enableSyscalls(monitor);
- }
-
- @Override
- public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
- param.getSession().enableProbe(eventName, isFunction, probe, monitor);
- }
-
- @Override
- public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
- param.getSession().enableLogLevel(eventName, logLevelType, level, filterExpression, monitor);
- }
-
- @Override
- public TraceDomainComponent getDomain(CommandParameter param) {
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceSessionComponent session = null;
- // Check if one session is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceSessionComponent) {
- // Add only if corresponding TraceSessionComponents is inactive and not destroyed
- TraceSessionComponent tmpSession = (TraceSessionComponent) element;
- if(tmpSession.getSessionState() == TraceSessionState.INACTIVE && !tmpSession.isDestroyed()) {
- session = tmpSession;
- }
- }
- }
- }
- boolean isEnabled = (session != null);
- fLock.lock();
- try {
- fParam = null;
- if(isEnabled) {
- fParam = new CommandParameter(session);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * Class containing parameter for a command execution.
- *
- * @author Bernd Hufmann
- */
-public class EventCommandParameter extends CommandParameter {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- private TraceEventComponent fEvent;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param session - a trace session component.
- * @param event - a trace event component
- */
- public EventCommandParameter(TraceSessionComponent session, TraceEventComponent event) {
- super(session);
- fEvent = event;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return the trace event component
- */
- public TraceEventComponent getEvent() {
- return fEvent;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public EventCommandParameter clone() {
- EventCommandParameter clone = (EventCommandParameter) super.clone();
- clone.fEvent = fEvent;
- return clone;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ISelectCommandScriptDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to execute commands of a command script.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ExecuteCommandScriptHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The trace session group the command is to be executed on.
- */
- private TraceSessionGroup fSessionGroup = null;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- fLock.lock();
- try {
- final TraceSessionGroup sessionGroup = fSessionGroup;
-
- // Open dialog box for the node name and address
- final ISelectCommandScriptDialog dialog = TraceControlDialogFactory.getInstance().getCommandScriptDialog();
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_ExecuteScriptJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- sessionGroup.executeCommands(monitor, dialog.getCommands());
- } catch (ExecutionException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateSessionFailure, e);
- }
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TraceSessionGroup sessionGroup = null;
-
- // Check if the session group project is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- Object element = ((StructuredSelection) selection).getFirstElement();
- sessionGroup = (element instanceof TraceSessionGroup) ? (TraceSessionGroup) element : null;
- }
-
- boolean isEnabled = sessionGroup != null;
- fLock.lock();
- try {
- fSessionGroup = null;
- if(isEnabled) {
- fSessionGroup = sessionGroup;
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of streamed traces
- * Patrick Tasse - Add support for source location
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.core.runtime.URIUtil;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
-import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConnectionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConnectionManager;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConsumer;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IImportDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ImportFileInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.internal.tmf.ui.project.wizards.importtrace.ImportTraceWizard;
-import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
-import org.eclipse.linuxtools.tmf.core.project.model.TmfTraceImportException;
-import org.eclipse.linuxtools.tmf.core.project.model.TraceTypeHelper;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfConstants;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfOpenTraceHelper;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectRegistry;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceTypeUIUtils;
-import org.eclipse.linuxtools.tmf.ui.project.model.TmfTracesFolder;
-import org.eclipse.linuxtools.tmf.ui.project.model.TraceUtils;
-import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
-import org.eclipse.rse.services.files.IFileService;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Command handler implementation to import traces from a (remote) session to a
- * tracing project.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ImportHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /** Name of default project to import traces to */
- public static final String DEFAULT_REMOTE_PROJECT_NAME = "Remote"; //$NON-NLS-1$
-
- /** The preference key to remeber whether or not the user wants the notification shown next time **/
- private static final String NOTIFY_IMPORT_STREAMED_PREF_KEY = "NOTIFY_IMPORT_STREAMED"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The command parameter
- */
- protected CommandParameter fParam;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
-
- if (window == null) {
- return false;
- }
-
- fLock.lock();
- try {
- final CommandParameter param = fParam.clone();
-
- // create default project
- IProject project = TmfProjectRegistry.createProject(DEFAULT_REMOTE_PROJECT_NAME, null, null);
-
- if (param.getSession().isLiveTrace()) {
- importLiveTrace(new LttngRelaydConnectionInfo(param.getSession().getLiveUrl(), param.getSession().getLivePort(), param.getSession().getName()), project);
- return null;
- } else if (param.getSession().isStreamedTrace()) {
-
- IPreferenceStore store = Activator.getDefault().getPreferenceStore();
- String notify = store.getString(NOTIFY_IMPORT_STREAMED_PREF_KEY);
- if (!MessageDialogWithToggle.ALWAYS.equals(notify)) {
- MessageDialogWithToggle.openInformation(window.getShell(), null, Messages.TraceControl_ImportDialogStreamedTraceNotification, Messages.TraceControl_ImportDialogStreamedTraceNotificationToggle, false, store, NOTIFY_IMPORT_STREAMED_PREF_KEY);
- }
-
- // Streamed trace
- TmfProjectElement projectElement = TmfProjectRegistry.getProject(project, true);
- TmfTraceFolder traceFolder = projectElement.getTracesFolder();
-
- ImportTraceWizard wizard = new ImportTraceWizard();
- wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(traceFolder));
- WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
- dialog.open();
- return null;
- }
-
- // Remote trace
- final IImportDialog dialog = TraceControlDialogFactory.getInstance().getImportDialog();
- dialog.setSession(param.getSession());
- dialog.setDefaultProject(DEFAULT_REMOTE_PROJECT_NAME);
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- Job job = new Job(Messages.TraceControl_ImportJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
-
- MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, Messages.TraceControl_ImportFailure, null);
- List<ImportFileInfo> traces = dialog.getTracePathes();
- IProject selectedProject = dialog.getProject();
- for (Iterator<ImportFileInfo> iterator = traces.iterator(); iterator.hasNext();) {
- try {
-
- if (monitor.isCanceled()) {
- status.add(Status.CANCEL_STATUS);
- break;
- }
-
- ImportFileInfo remoteFile = iterator.next();
-
- downloadTrace(remoteFile, selectedProject, monitor);
-
- // Set trace type
- IFolder traceFolder = remoteFile.getDestinationFolder();
-
- IResource file = traceFolder.findMember(remoteFile.getLocalTraceName());
-
- if (file != null) {
- TraceTypeHelper helper = null;
-
- try {
- helper = TmfTraceTypeUIUtils.selectTraceType(file.getLocation().toOSString(), null, null);
- } catch (TmfTraceImportException e) {
- // the trace did not match any trace type
- }
-
- if (helper != null) {
- status.add(TmfTraceTypeUIUtils.setTraceType(file, helper));
- }
-
- try {
- final String scheme = "sftp"; //$NON-NLS-1$
- String host = remoteFile.getImportFile().getHost().getName();
- int port = remoteFile.getImportFile().getParentRemoteFileSubSystem().getConnectorService().getPort();
- String path = remoteFile.getImportFile().getAbsolutePath();
- if (file instanceof IFolder) {
- path += IPath.SEPARATOR;
- }
- URI uri = new URI(scheme, null, host, port, path, null, null);
- String sourceLocation = URIUtil.toUnencodedString(uri);
- file.setPersistentProperty(TmfCommonConstants.SOURCE_LOCATION, sourceLocation);
- } catch (URISyntaxException e) {
- }
- }
- } catch (ExecutionException e) {
- status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ImportFailure, e));
- } catch (CoreException e) {
- status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ImportFailure, e));
- }
- }
- return status;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
- TraceSessionComponent session = null;
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceSessionComponent) {
- // Add only TraceSessionComponents that are inactive and not
- // destroyed
- TraceSessionComponent tmpSession = (TraceSessionComponent) element;
- if ((tmpSession.isSnapshotSession() || tmpSession.isLiveTrace() || (tmpSession.getSessionState() == TraceSessionState.INACTIVE)) && (!tmpSession.isDestroyed())) {
- session = tmpSession;
- }
- }
- }
- }
- boolean isEnabled = session != null;
-
- fLock.lock();
- try {
- fParam = null;
- if (isEnabled) {
- fParam = new CommandParameter(session);
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
-
- /**
- * Downloads a trace from the remote host to the given project.
- *
- * @param trace
- * - trace information of trace to import
- * @param project
- * - project to import to
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- */
- private static void downloadTrace(ImportFileInfo trace, IProject project, IProgressMonitor monitor)
- throws ExecutionException {
- try {
- IRemoteFileSubSystem fsss = trace.getImportFile().getParentRemoteFileSubSystem();
-
- IFolder traceFolder = project.getFolder(TmfTracesFolder.TRACES_FOLDER_NAME);
- if (!traceFolder.exists()) {
- throw new ExecutionException(Messages.TraceControl_ImportDialogInvalidTracingProject + " (" + TmfTracesFolder.TRACES_FOLDER_NAME + ")"); //$NON-NLS-1$//$NON-NLS-2$
- }
-
- IFolder destinationFolder = trace.getDestinationFolder();
- TraceUtils.createFolder(destinationFolder, monitor);
-
- String traceName = trace.getLocalTraceName();
- IFolder folder = destinationFolder.getFolder(traceName);
- if (folder.exists()) {
- if (!trace.isOverwrite()) {
- throw new ExecutionException(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + traceName); //$NON-NLS-1$
- }
- } else {
- folder.create(true, true, null);
- }
-
- IRemoteFile[] sources = fsss.list(trace.getImportFile(), IFileService.FILE_TYPE_FILES, new NullProgressMonitor());
- SubMonitor subMonitor = SubMonitor.convert(monitor, sources.length);
- subMonitor.beginTask(Messages.TraceControl_DownloadTask, sources.length);
-
- for (int i = 0; i < sources.length; i++) {
- if (subMonitor.isCanceled()) {
- monitor.setCanceled(true);
- return;
- }
- String destination = folder.getLocation().addTrailingSeparator().append(sources[i].getName()).toOSString();
- subMonitor.setTaskName(Messages.TraceControl_DownloadTask + ' ' + traceName + '/' + sources[i].getName());
- fsss.download(sources[i], destination, null, subMonitor.newChild(1));
- }
- } catch (SystemMessageException e) {
- throw new ExecutionException(e.toString(), e);
- } catch (CoreException e) {
- throw new ExecutionException(e.toString(), e);
- }
- }
-
- private static void importLiveTrace(final LttngRelaydConnectionInfo connectionInfo, final IProject project) {
- Job job = new Job(Messages.TraceControl_ImportJob) {
-
- @Override
- protected IStatus run(final IProgressMonitor monitor) {
- try {
- // We initiate the connection first so that we can retrieve the trace path
- LttngRelaydConsumer lttngRelaydConsumer = LttngRelaydConnectionManager.getInstance().getConsumer(connectionInfo);
- try {
- lttngRelaydConsumer.connect();
- } catch (CoreException e) {
- new Status(IStatus.ERROR, Activator.PLUGIN_ID, org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.Messages.LttngRelaydConnectionManager_ConnectionError, e);
- }
- initializeTraceResource(connectionInfo, lttngRelaydConsumer.getTracePath(), project);
- return Status.OK_STATUS;
- } catch (CoreException | TmfTraceImportException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ImportHandler_LiveTraceInitError, e);
- }
- }
-
- };
- job.setSystem(true);
- job.schedule();
- }
-
-
- private static void initializeTraceResource(final LttngRelaydConnectionInfo connectionInfo, final String tracePath, final IProject project) throws CoreException, TmfTraceImportException {
- IFolder folder = project.getFolder(TmfTracesFolder.TRACES_FOLDER_NAME);
- IFolder traceFolder = folder.getFolder(connectionInfo.getSessionName());
- Path location = new Path(tracePath);
- IStatus result = ResourcesPlugin.getWorkspace().validateLinkLocation(folder, location);
- if (result.isOK()) {
- traceFolder.createLink(location, IResource.REPLACE, new NullProgressMonitor());
- } else {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, result.getMessage()));
- }
-
- TraceTypeHelper selectedTraceType = TmfTraceTypeUIUtils.selectTraceType(location.toOSString(), null, null);
- // No trace type was determined.
- TmfTraceTypeUIUtils.setTraceType(traceFolder, selectedTraceType);
-
- final TmfProjectElement projectElement = TmfProjectRegistry.getProject(project, true);
- final TmfTraceFolder tracesFolder = projectElement.getTracesFolder();
- final List<TmfTraceElement> traces = tracesFolder.getTraces();
- TmfTraceElement found = null;
- for (TmfTraceElement candidate : traces) {
- if (candidate.getName().equals(connectionInfo.getSessionName())) {
- found = candidate;
- }
- }
-
- if (found == null) {
- throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ImportHandler_LiveTraceElementError));
- }
-
- // Properties used to be able to reopen a trace in live mode
- traceFolder.setPersistentProperty(CtfConstants.LIVE_HOST, connectionInfo.getHost());
- traceFolder.setPersistentProperty(CtfConstants.LIVE_PORT, Integer.toString(connectionInfo.getPort()));
- traceFolder.setPersistentProperty(CtfConstants.LIVE_SESSION_NAME, connectionInfo.getSessionName());
-
- final TmfTraceElement finalTrace = found;
- Display.getDefault().syncExec(new Runnable() {
-
- @Override
- public void run() {
- TmfOpenTraceHelper.openTraceFromElement(finalTrace);
- }
- });
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 Ericsson and others
- *
- * 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:
- * Bernd Hufmann - Initial API and implementation
- * Anna Dushistova(Montavista) - [382684] Allow reusing already defined connections that have Files and Shells subsystems
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.window.Window;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.INewConnectionDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
-import org.eclipse.rse.core.IRSESystemType;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchPart;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-
-/**
- * <p>
- * Command handler for creation new connection for trace control.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class NewConnectionHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * The trace control system type defined for LTTng version 2.0 and later.
- */
- public static final String TRACE_CONTROL_SYSTEM_TYPE = "org.eclipse.linuxtools.internal.lttng2.ui.control.systemType"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The parent trace control component the new node will be added to.
- */
- private ITraceControlComponent fRoot = null;
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- assert (fRoot != null);
-
- IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
- if (window == null) {
- return false;
- }
-
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
-
- // get system type definition for LTTng 2.x connection
- IRSESystemType sysType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(TRACE_CONTROL_SYSTEM_TYPE);
-
- // get all hosts for this system type
- IHost[] hosts = getSuitableHosts();
-
- // Open dialog box for the node name and address
- final INewConnectionDialog dialog = TraceControlDialogFactory.getInstance().getNewConnectionDialog();
- dialog.setTraceControlParent(fRoot);
- dialog.setHosts(hosts);
- dialog.setPort(IRemoteSystemProxy.INVALID_PORT_NUMBER);
-
- if (dialog.open() != Window.OK) {
- return null;
- }
-
- String hostName = dialog.getConnectionName();
- String hostAddress = dialog.getHostName();
- int port = dialog.getPort();
-
- // get the singleton RSE registry
- IHost host = null;
-
- for (int i = 0; i < hosts.length; i++) {
- if (hosts[i].getAliasName().equals(hostName)) {
- host = hosts[i];
- break;
- }
- }
-
- if (host == null) {
- // if there's no host then we will create it
- try {
- // create the host object as an SSH Only connection
- host = registry.createHost(
- sysType, //System Type Name
- hostName, //Connection name
- hostAddress, //IP Address
- "Connection to Host"); //description //$NON-NLS-1$
- }
- catch (Exception e) {
- MessageDialog.openError(window.getShell(),
- Messages.TraceControl_EclipseCommandFailure,
- Messages.TraceControl_NewNodeCreationFailure + " (" + hostName + ", " + hostAddress + ")" + ":\n" + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- return null;
- }
- }
-
- if (host != null) {
- fLock.lock();
- try {
- // successful creation of host
- TargetNodeComponent node = null;
- if (!fRoot.containsChild(hostName)) {
- node = new TargetNodeComponent(hostName, fRoot, host);
- node.setPort(port);
- fRoot.addChild(node);
- }
- else {
- node = (TargetNodeComponent)fRoot.getChild(hostName);
- }
-
- node.connect();
- } finally {
- fLock.unlock();
- }
- }
- return null;
- }
-
- private static IHost[] getSuitableHosts() {
- // need shells and files
- ArrayList<IHost> result = new ArrayList<>();
- ArrayList<IHost> shellConnections = new ArrayList<>(
- Arrays.asList(RSECorePlugin.getTheSystemRegistry()
- .getHostsBySubSystemConfigurationCategory("shells"))); //$NON-NLS-1$
-
- for (IHost connection : shellConnections) {
- ISubSystem[] subSystems = connection.getSubSystems();
- for (int i = 0; i < subSystems.length; i++) {
- if (subSystems[i] instanceof IFileServiceSubSystem) {
- result.add(connection);
- break;
- }
- }
- }
-
- return result.toArray(new IHost[result.size()]);
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- ITraceControlComponent root = null;
-
- // no need to verify part because it has been already done in getWorkbenchPage()
- IWorkbenchPart part = page.getActivePart();
- root = ((ControlView) part).getTraceControlRoot();
-
- boolean isEnabled = root != null;
-
- fLock.lock();
- try {
- fRoot = null;
- if (isEnabled) {
- fRoot = root;
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to refresh node configuration.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class RefreshHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The node component reference.
- */
- private TargetNodeComponent fNode;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fLock.lock();
- try {
- fNode.refresh();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
-
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- TargetNodeComponent node = null;
- // Check if one or more session are selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
-
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceControlComponent) {
- TraceControlComponent component = (TraceControlComponent) element;
- boolean isConnected = component.getTargetNodeState() == TargetNodeState.CONNECTED;
- if (isConnected) {
- while ((component != null) && component.getClass() != TargetNodeComponent.class) {
- component = (TraceControlComponent) component.getParent();
- }
- if (component != null) {
- node = (TargetNodeComponent) component;
- }
- }
- }
- }
- }
-
- boolean isEnabled = node != null;
-
- fLock.lock();
- try {
- fNode = null;
- if (isEnabled) {
- fNode = node;
- }
- } finally {
- fLock.unlock();
- }
-
- return isEnabled;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.MultiStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.ui.IWorkbenchPage;
-
-/**
- * <p>
- * Command handler implementation to record a snapshot.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class SnaphshotHandler extends BaseControlViewHandler {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The list of session components the command is to be executed on.
- */
- protected List<TraceSessionComponent> fSessions = new ArrayList<>();
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object execute(ExecutionEvent event) throws ExecutionException {
- fLock.lock();
- try {
- // Make a copy for thread safety
- final List<TraceSessionComponent> sessions = new ArrayList<>();
- sessions.addAll(fSessions);
-
- Job job = new Job(Messages.TraceControl_RecordSnapshotJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, null, null);
- for (Iterator<TraceSessionComponent> iterator = sessions.iterator(); iterator.hasNext();) {
- try {
- // record snapshot for all selected sessions sequentially
- TraceSessionComponent session = iterator.next();
- session.recordSnapshot(monitor);
- if (monitor.isCanceled()) {
- status.add(Status.CANCEL_STATUS);
- break;
- }
- } catch (ExecutionException e) {
- status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_RecordSnapshotFailure, e));
- }
- }
- return status;
- }
- };
- job.setUser(true);
- job.schedule();
- } finally {
- fLock.unlock();
- }
- return null;
- }
-
- @Override
- public boolean isEnabled() {
- // Get workbench page for the Control View
- IWorkbenchPage page = getWorkbenchPage();
- if (page == null) {
- return false;
- }
-
- List<TraceSessionComponent> sessions = new ArrayList<>(0);
-
- // Check if one session is selected
- ISelection selection = page.getSelection(ControlView.ID);
- if (selection instanceof StructuredSelection) {
- StructuredSelection structered = ((StructuredSelection) selection);
- for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
- Object element = iterator.next();
- if (element instanceof TraceSessionComponent) {
- // Add only if corresponding TraceSessionComponent is an active snapshot session and not destroyed
- TraceSessionComponent session = (TraceSessionComponent) element;
- if(session.isSnapshotSession() &&
- session.getSessionState() == TraceSessionState.ACTIVE &&
- !session.isDestroyed()) {
- sessions.add(session);
- }
- }
- }
- }
- boolean isEnabled = !sessions.isEmpty();
- fLock.lock();
- try {
- fSessions = null;
- if (isEnabled) {
- fSessions = sessions;
- }
- } finally {
- fLock.unlock();
- }
- return isEnabled;
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * <p>
- * Command handler implementation to start one or more trace sessions.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class StartHandler extends ChangeSessionStateHandler {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public TraceSessionState getNewState() {
- return TraceSessionState.ACTIVE;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
- session.startSession(monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-
-/**
- * <p>
- * Command handler implementation to stop one or more trace sessions.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class StopHandler extends ChangeSessionStateHandler {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public TraceSessionState getNewState() {
- return TraceSessionState.INACTIVE;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
- session.stopSession(monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte - Initial implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceMI;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * <p>
- * Error handler for xml xsd validation while using machine interface mode
- * in {@link LTTngControlServiceMI}.
- * </p>
- *
- * @author Jonathan Rajotte
- */
-public class XmlMiValidationErrorHandler implements ErrorHandler {
-
- @Override
- public void error(SAXParseException e) throws SAXException {
- Activator.getDefault().logError(Messages.TraceControl_XmlValidationError, e);
- throw new SAXException(Messages.TraceControl_XmlValidationError, e);
- }
-
- @Override
- public void fatalError(SAXParseException e) throws SAXException {
- Activator.getDefault().logError(Messages.TraceControl_XmlValidationError, e);
- throw new SAXException(Messages.TraceControl_XmlValidationError, e);
- }
-
- @Override
- public void warning(SAXParseException e) throws SAXException {
- Activator.getDefault().logWarning(Messages.TraceControl_XmlValidationWarning, e);
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging;
-
-import java.io.BufferedWriter;
-import java.io.FileWriter;
-import java.io.IOException;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-
-/**
- * <p>
- * Class to log control commands.
- * </p>
- *
- * @author Bernd Hufmann
- */
-final public class ControlCommandLogger {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The bufferd writer reference
- */
- private static BufferedWriter fTraceLog = null;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
- private ControlCommandLogger() {
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Initializes the logger class and opens the log file with the given parameter.
- * @param filename - file name of logger output
- * @param append - true to open log file in append mode else false (overwrite)
- */
- public static void init(String filename, boolean append) {
- if (fTraceLog != null) {
- close();
- }
- fTraceLog = openLogFile(filename, append);
- }
-
- /**
- * Closes the log file if open.
- */
- public static void close() {
- if (fTraceLog == null) {
- return;
- }
-
- try {
- fTraceLog.close();
- fTraceLog = null;
- } catch (IOException e) {
- Activator.getDefault().logWarning("Can't close log file of the trace control", e); //$NON-NLS-1$
- }
- }
-
- /**
- * Logs a message to the log file.
- * @param msg - message (e.g. command or command result) to log
- */
- @SuppressWarnings("nls")
- public static void log(String msg) {
- long currentTime = System.currentTimeMillis();
- StringBuilder message = new StringBuilder("[");
- message.append(currentTime / 1000);
- message.append(".");
- message.append(String.format("%1$03d", currentTime % 1000));
- message.append("] ");
- message.append(msg);
- if (fTraceLog != null) {
- try {
- fTraceLog.write(message.toString());
- fTraceLog.newLine();
- fTraceLog.flush();
- } catch (IOException e) {
- Activator.getDefault().logError("Can't log message in log file of the tracer control", e); //$NON-NLS-1$
- }
- }
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
- /**
- * Opens the trace log file with given name in the workspace root directory
- * @param filename - file name of logger output
- * @param append - true to open log file in append mode else false (overwrite)
- * @return the buffer writer class or null if not successful
- */
- private static BufferedWriter openLogFile(String filename, boolean append) {
- BufferedWriter outfile = null;
- try {
- outfile = new BufferedWriter(new FileWriter(filename, append));
- } catch (IOException e) {
- Activator.getDefault().logError("Can't open log file for logging of tracer control commands: " + filename, e); //$NON-NLS-1$
- }
- return outfile;
- }
-}
-
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Jonathan Rajotte - Updated for basic support of LTTng 2.6 machine interface
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Messages file for the trace control package.
- *
- * @author Bernd Hufmann
- */
-@SuppressWarnings("javadoc")
-public final class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.messages"; //$NON-NLS-1$
-
- public static String EnableChannelDialog_DefaultMessage;
-
- public static String ImportHandler_LiveTraceElementError;
-
- public static String ImportHandler_LiveTraceInitError;
-
- // Failures
- public static String TraceControl_ConnectionFailure;
- public static String TraceControl_DisconnectionFailure;
- public static String TraceControl_ExecutionCancelled;
- public static String TraceControl_ExecutionFailure;
- public static String TraceControl_ExecutionTimeout;
- public static String TraceControl_ShellNotConnected;
-
- public static String TraceControl_CommandShellError;
- public static String TraceControl_CommandError;
- public static String TraceControl_UnexpectedCommandOutputFormat;
- public static String TraceControl_UnexpectedNameError;
- public static String TraceControl_UnexpectedPathError;
- public static String TraceControl_UnexpectedNumberOfElementError;
- public static String TraceControl_UnexpectedValueError;
-
- public static String TraceControl_UnsupportedVersionError;
- public static String TraceControl_GettingVersionError;
-
- // Xml parsing related failures
- public static String TraceControl_InvalidSchemaError;
- public static String TraceControl_XmlDocumentBuilderError;
- public static String TraceControl_XmlParsingError;
- public static String TraceControl_XmlValidationError;
- public static String TraceControl_XmlValidationWarning;
-
- // Xml machine interface failures
- public static String TraceControl_MiInvalidNumberOfElementError;
- public static String TraceControl_MiInvalidProviderError;
- public static String TraceControl_MiMissingRequiredError;
- public static String TraceControl_MiInvalidElementError;
- public static String TraceControl_MiIllegalValueError;
-
- // Commands
- public static String TraceControl_ErrorTitle;
- public static String TraceControl_RetrieveNodeConfigurationJob;
- public static String TraceControl_RetrieveNodeConfigurationFailure;
- public static String TraceControl_ListSessionFailure;
- public static String TraceControl_EclipseCommandFailure;
- public static String TraceControl_NewNodeCreationFailure;
- public static String TraceControl_CreateSessionJob;
- public static String TraceControl_CreateSessionFailure;
-
- public static String TraceControl_DestroySessionJob;
- public static String TraceControl_DestroySessionFailure;
- public static String TraceControl_DestroyConfirmationTitle;
- public static String TraceControl_DestroyConfirmationMessage;
-
- public static String TraceControl_ImportJob;
- public static String TraceControl_DownloadTask;
- public static String TraceControl_ImportFailure;
-
- public static String TraceControl_ChangeSessionStateJob;
- public static String TraceControl_ChangeSessionStateFailure;
-
- public static String TraceControl_CreateChannelStateJob;
- public static String TraceControl_CreateChannelStateFailure;
-
- public static String TraceControl_ChangeChannelStateJob;
- public static String TraceControl_ChangeChannelStateFailure;
- public static String TraceControl_ChangeEventStateJob;
- public static String TraceControl_ChangeEventStateFailure;
-
- public static String TraceControl_EnableEventsJob;
- public static String TraceControl_EnableEventsFailure;
- public static String TraceControl_DisableEventsJob;
-
- public static String TraceControl_GetContextJob;
- public static String TraceControl_GetContextFailure;
-
- public static String TraceControl_AddContextJob;
- public static String TraceControl_AddContextFailure;
-
- public static String TraceControl_AddCalibrateJob;
- public static String TraceControl_AddCalibrateFailure;
-
- public static String TraceControl_RecordSnapshotJob;
- public static String TraceControl_RecordSnapshotFailure;
-
- // Dialogs
- public static String TraceControl_NewDialogTitle;
- public static String TraceControl_NewNodeExistingConnectionGroupName;
- public static String TraceControl_NewNodeEditButtonName;
- public static String TraceControl_NewNodeComboToolTip;
- public static String TraceControl_NewNodeConnectionNameLabel;
- public static String TraceControl_NewNodeConnectionNameTooltip;
- public static String TraceControl_NewNodeHostNameLabel;
- public static String TraceControl_NewNodeHostNameTooltip;
- public static String TraceControl_NewNodePortLabel;
- public static String TraceControl_NewNodePortTooltip;
- public static String TraceControl_AlreadyExistsError;
-
- public static String TraceControl_CreateSessionDialogTitle;
- public static String TraceControl_CreateSessionDialogMessage;
- public static String TraceControl_CreateSessionNameLabel;
- public static String TraceControl_CreateSessionNameTooltip;
- public static String TraceControl_CreateSessionPathLabel;
- public static String TraceControl_CreateSessionPathTooltip;
- public static String TraceControl_CreateSessionNormalLabel;
- public static String TraceControl_CreateSessionNormalTooltip;
- public static String TraceControl_CreateSessionSnapshotLabel;
- public static String TraceControl_CreateSessionSnapshotTooltip;
- public static String TraceControl_CreateSessionLiveLabel;
- public static String TraceControl_CreateSessionLiveTooltip;
-
- public static String TraceControl_CreateSessionConfigureStreamingButtonText;
- public static String TraceControl_CreateSessionConfigureStreamingButtonTooltip;
- public static String TraceControl_CreateSessionNoStreamingButtonText;
- public static String TraceControl_CreateSessionNoStreamingButtonTooltip;
- public static String TraceControl_CreateSessionTracePathText;
- public static String TraceControl_CreateSessionTracePathTooltip;
- public static String TraceControl_CreateSessionLinkButtonText;
- public static String TraceControl_CreateSessionLinkButtonTooltip;
- public static String TraceControl_CreateSessionProtocolLabelText;
- public static String TraceControl_CreateSessionAddressLabelText;
- public static String TraceControl_CreateSessionPortLabelText;
- public static String TraceControl_CreateSessionControlUrlLabel;
- public static String TraceControl_CreateSessionDataUrlLabel;
- public static String TraceControl_CreateSessionCommonProtocolTooltip;
- public static String TraceControl_CreateSessionControlAddressTooltip;
- public static String TraceControl_CreateSessionControlPortTooltip;
- public static String TraceControl_CreateSessionProtocolTooltip;
- public static String TraceControl_CreateSessionDataAddressTooltip;
- public static String TraceControl_CreateSessionDataPortTooltip;
- public static String TraceControl_CreateSessionNoConsumertText;
- public static String TraceControl_CreateSessionNoConsumertTooltip;
- public static String TraceControl_CreateSessionDisableConsumertText;
- public static String TraceControl_CreateSessionDisableConsumertTooltip;
- public static String TraceControl_CreateSessionLiveConnectionLabel;
- public static String TraceControl_CreateSessionLiveConnectionUrlTooltip;
- public static String TraceControl_CreateSessionLiveConnectionPortTooltip;
- public static String TraceControl_CreateSessionLiveDelayLabel;
- public static String TraceControl_CreateSessionLiveDelayTooltip;
-
- public static String TraceControl_InvalidSessionNameError;
- public static String TraceControl_SessionAlreadyExistsError;
- public static String TraceControl_SessionPathAlreadyExistsError;
- public static String TraceControl_InvalidSessionPathError;
- public static String TraceControl_InvalidLiveDelayError;
- public static String TraceControl_FileSubSystemError;
-
- public static String TraceControl_EnableChannelDialogTitle;
- public static String TraceControl_EnableChannelNameLabel;
- public static String TraceControl_EnableChannelNameTooltip;
- public static String TraceControl_EnableChannelSubBufferSizeTooltip;
- public static String TraceControl_EnableChannelNbSubBuffersTooltip;
- public static String TraceControl_EnableChannelSwitchTimerTooltip;
- public static String TraceControl_EnableChannelReadTimerTooltip;
- public static String TraceControl_EnableChannelOutputTypeTooltip;
- public static String TraceControl_EnableChannelDiscardModeGroupName;
- public static String TraceControl_EnableChannelDiscardModeLabel;
- public static String TraceControl_EnableChannelDiscardModeTooltip;
- public static String TraceControl_EnableChannelOverwriteModeLabel;
- public static String TraceControl_EnableChannelOverwriteModeTooltip;
- public static String TraceControl_EnbleChannelMaxSizeTraceFilesTooltip;
- public static String TraceControl_EnbleChannelMaxNumTraceFilesTooltip;
-
- public static String TraceControl_InvalidChannelNameError;
- public static String TraceControl_ChannelAlreadyExistsError;
-
- public static String TraceControl_EnableEventsDialogTitle;
- public static String TraceControl_EnableEventsSessionGroupName;
- public static String TraceControl_EnableEventsChannelGroupName;
- public static String TraceControl_EnableEventsSessionsTooltip;
- public static String TraceControl_EnableEventsChannelsTooltip;
- public static String TraceControl_EnableEventsNoSessionError;
- public static String TraceControl_EnableEventsNoChannelError;
-
- public static String TraceControl_EnableGroupSelectionName;
- public static String TraceControl_EnableEventsTracepointGroupName;
- public static String TraceControl_EnableEventsTracepointTreeTooltip;
- public static String TraceControl_EnableEventsTracepointTreeAllLabel;
- public static String TraceControl_EnableEventsSyscallName;
- public static String TraceControl_EnableEventsSyscallTooltip;
- public static String TraceControl_EnableEventsProbeGroupName;
- public static String TraceControl_EnableEventsEventNameLabel;
- public static String TraceControl_EnableEventsProbeEventNameTooltip;
- public static String TraceControl_EnableEventsProbeNameLabel;
- public static String TraceControl_EnableEventsProbeNameTooltip;
- public static String TraceControl_EnableEventsFucntionGroupName;
- public static String TraceControl_EnableEventsFunctionEventNameTooltip;
- public static String TraceControl_EnableEventsFunctionNameLabel;
-
- public static String TraceControl_EnableEventsWildcardGroupName;
- public static String TraceControl_EnableEventsWildcardLabel;
- public static String TraceControl_EnableEventsWildcardTooltip;
- public static String TraceControl_EnableEventsLogLevelGroupName;
- public static String TraceControl_EnableEventsLogLevelTypeName;
- public static String TraceControl_EnableEventsLogLevelTypeTooltip;
- public static String TraceControl_EnableEventsLogLevelOnlyTypeName;
- public static String TraceControl_EnableEventsLogLevelOnlyTypeTooltip;
- public static String TraceControl_EnableEventsLogLevelTooltip;
- public static String TraceControl_EnableEventsLoglevelEventNameTooltip;
- public static String TraceControl_EnableEventsFilterGroupName;
- public static String TraceControl_EnableEventsFilterTooltip;
-
- public static String TraceControl_InvalidProbeNameError;
- public static String TraceControl_InvalidWildcardError;
- public static String TraceControl_InvalidLogLevelEventNameError;
- public static String TraceControl_InvalidLogLevel;
-
- public static String TraceControl_AddContextDialogTitle;
- public static String TraceControl_AddContextAvailableContextsLabel;
- public static String TraceControl_AddContextAvailableContextsTooltip;
- public static String TraceControl_AddContextAllLabel;
-
- public static String TraceControl_ImportDialogStreamedTraceNotification;
- public static String TraceControl_ImportDialogStreamedTraceNotificationToggle;
- public static String TraceControl_ImportDialogTitle;
- public static String TraceControl_ImportDialogTracesGroupName;
- public static String TraceControl_ImportDialogTracesTooltip;
- public static String TraceControl_ImportDialogProjectsGroupName;
- public static String TraceControl_ImportDialogProjectsTooltip;
- public static String TraceControl_ImportDialogOverwriteButtonText;
- public static String TraceControl_ImportDialogCreationError;
- public static String TraceControl_ImportDialogNoProjectSelectedError;
- public static String TraceControl_ImportDialogInvalidTracingProject;
- public static String TraceControl_ImportDialogNoTraceSelectedError;
- public static String TraceControl_ImportDialog_SelectAll;
- public static String TraceControl_ImportDialog_DeselectAll;
-
- public static String TraceControl_ImportDialogConfirmationTitle;
- public static String TraceControl_ImportDialogConfirmationOverwriteLabel;
- public static String TraceControl_ImportDialogConfirmationRenameLabel;
- public static String TraceControl_ImportDialogConfirmationNewNameLabel;
- public static String TraceControl_InvalidTraceNameError;
- public static String TraceControl_ImportDialogTraceAlreadyExistError;
-
- // Tree structure strings
- public static String TraceControl_KernelDomainDisplayName;
- public static String TraceControl_UstDisplayName;
- public static String TraceControl_UstGlobalDomainDisplayName;
- public static String TraceControl_UnknownDomainDisplayName;
- public static String TraceControl_JULDomainDisplayName;
- public static String TraceControl_AllSessionsDisplayName;
- public static String TraceControl_SessionDisplayName;
- public static String TraceControl_DomainDisplayName;
- public static String TraceControl_BufferTypeDisplayName;
- public static String TraceControl_ChannelDisplayName;
- public static String TraceControl_EventDisplayName;
- public static String TraceControl_ProviderDisplayName;
- public static String TraceControl_KernelProviderDisplayName;
- public static String TraceControl_SharedBuffersDisplayName;
- public static String TraceControl_PerPidBuffersDisplayName;
- public static String TraceControl_PerPidBuffersTooltip;
- public static String TraceControl_PerUidBuffersDisplayName;
- public static String TraceControl_PerUidBuffersTooltip;
-
- // Property names
- public static String TraceControl_SessionNamePropertyName;
- public static String TraceControl_EventNamePropertyName;
- public static String TraceControl_EventTypePropertyName;
- public static String TraceControl_LogLevelPropertyName;
- public static String TraceControl_FieldsPropertyName;
- public static String TraceControl_FilterPropertyName;
- public static String TraceControl_StatePropertyName;
- public static String TraceControl_VersionPropertyName;
- public static String TraceControl_DomainNamePropertyName;
- public static String TraceControl_BufferTypePropertyName;
- public static String TraceControl_ChannelNamePropertyName;
- public static String TraceControl_OverwriteModePropertyName;
- public static String TraceControl_SubBufferSizePropertyName;
- public static String TraceControl_NbSubBuffersPropertyName;
- public static String TraceControl_SwitchTimerPropertyName;
- public static String TraceControl_ReadTimerPropertyName;
- public static String TraceControl_OutputTypePropertyName;
- public static String TraceControl_HostNamePropertyName;
- public static String TraceControl_HostAddressPropertyName;
- public static String TraceControl_SessionPathPropertyName;
- public static String TraceControl_SnapshotPathPropertyName;
- public static String TraceControl_SnapshotNamePropertyName;
- public static String TraceControl_SnapshotIdPropertyName;
- public static String TraceControl_ProviderNamePropertyName;
- public static String TraceControl_ProcessIdPropertyName;
- public static String TraceControl_ProbeAddressPropertyName;
- public static String TraceControl_ProbeOffsetPropertyName;
- public static String TraceControl_ProbeSymbolPropertyName;
- public static String TraceControl_MaxSizeTraceFilesPropertyName;
- public static String TraceControl_MaxNumTraceFilesPropertyName;
- public static String TraceControl_ConfigureMetadataChannelName;
-
- // Preferences
- public static String TraceControl_TracingGroupPreference;
- public static String TraceControl_LoggingPreference;
- public static String TraceControl_LogfilePath;
- public static String TraceControl_AppendLogfilePreference;
- public static String TraceControl_CommandTimeout;
-
- public static String TraceControl_VerboseLevelsPreference;
- public static String TraceControl_VerboseLevelNonePreference;
- public static String TraceControl_VerboseLevelVerbosePreference;
- public static String TraceControl_VerboseLevelVeryVerbosePreference;
- public static String TraceControl_VerboseLevelVeryVeryVerbosePreference;
-
- public static String TraceControl_ExecuteScriptJob;
- public static String TraceControl_ExecuteScriptError;
-
- public static String TraceControl_ExecuteScriptDialogTitle;
- public static String TraceControl_ExecuteScriptBrowseText;
- public static String TraceControl_ExecuteScriptSelectLabel;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2012, 2014 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:
-# Bernd Hufmann - initial API and implementation
-# Jonathan Rajotte - updated for basic support of LTTng 2.6 machine interface
-###############################################################################
-
-EnableChannelDialog_DefaultMessage=Default
-ImportHandler_LiveTraceElementError=Could not find trace element
-ImportHandler_LiveTraceInitError=Error initializing live trace.
-TraceControl_ConnectionFailure=Connecting to host failed
-TraceControl_DisconnectionFailure=Disconnection from host failed
-TraceControl_ExecutionCancelled=Command Execution cancelled
-TraceControl_ExecutionFailure=Command Execution failed
-TraceControl_ExecutionTimeout=Command Execution timed-out
-TraceControl_ShellNotConnected=Command shell not connected
-TraceControl_CommandShellError=Could not create HostShellProcessAdapter
-TraceControl_CommandError=Command failed! Command:
-TraceControl_UnexpectedCommandOutputFormat=Unexpected command output
-TraceControl_UnexpectedNameError=Unexpected session name returned
-TraceControl_UnexpectedPathError=Unexpected session path returned
-TraceControl_UnexpectedNumberOfElementError=Unexpected number of elements {0} returned
-TraceControl_UnexpectedValueError=Unexpected value. Returned {0} Expected: {1}
-
-TraceControl_UnsupportedVersionError=Unsupported LTTng Tracer Control version
-TraceControl_GettingVersionError=Could not get version of LTTng Tracer Control
-
-# Xml parsing related failures
-TraceControl_InvalidSchemaError=Could not open/validate xsd Schema
-TraceControl_XmlDocumentBuilderError=Unable to create the xml document builder
-TraceControl_XmlParsingError=Unable to parse the xml document
-TraceControl_XmlValidationError=Could not validate the xml response
-TraceControl_XmlValidationWarning=Xml validation warning
-
-# Xml machine interface failures
-TraceControl_MiInvalidNumberOfElementError=Invalid number of element
-TraceControl_MiInvalidProviderError=Invalid provider data
-TraceControl_MiMissingRequiredError=Missing required data
-TraceControl_MiIllegalValueError=Invalid value
-
-# Commands
-TraceControl_MiInvalidElementError=Invalid xml data
-
-TraceControl_ErrorTitle=Error
-TraceControl_ListSessionFailure=List sessions failed
-TraceControl_RetrieveNodeConfigurationJob=Retrieving Target Node Configuration...
-TraceControl_RetrieveNodeConfigurationFailure=Error retrieving node configuration
-TraceControl_EclipseCommandFailure=Command failed
-TraceControl_NewNodeCreationFailure=Creation of new connection failed
-TraceControl_CreateSessionJob=Creating Session...
-TraceControl_CreateSessionFailure=Command to create session failed
-
-TraceControl_DestroySessionJob=Destroying Session...
-TraceControl_DestroySessionFailure=Command to destroy session failed
-TraceControl_DestroyConfirmationTitle=Destroy Confirmation
-TraceControl_DestroyConfirmationMessage=Do you want to delete all selected sessions?
-
-TraceControl_ImportJob=Importing Traces...
-TraceControl_DownloadTask=Downloading
-TraceControl_ImportFailure=Command to import traces failed
-
-TraceControl_ChangeSessionStateJob=Changing Session State...
-TraceControl_ChangeSessionStateFailure=Command to change session state failed...
-
-TraceControl_CreateChannelStateJob=Enabling (creating) channel...
-TraceControl_CreateChannelStateFailure=Command to enable channel failed
-
-TraceControl_ChangeChannelStateJob=Changing State of Channels...
-TraceControl_ChangeChannelStateFailure=Command to change state of channels failed
-TraceControl_ChangeEventStateJob=Changing State of Events...
-TraceControl_ChangeEventStateFailure=Command to change state of events failed
-
-TraceControl_EnableEventsJob=Enabling Events...
-TraceControl_EnableEventsFailure=Command to enable events failed
-TraceControl_DisableEventsJob=Disabling Events...
-
-TraceControl_GetContextJob=Getting Available Contexts...
-TraceControl_GetContextFailure=Command to get available contexts failed
-
-TraceControl_AddContextJob=Adding Contexts...
-TraceControl_AddContextFailure=Command to add contexts failed
-
-TraceControl_AddCalibrateJob=Calibrating...
-TraceControl_AddCalibrateFailure=Command to calibrate failed
-
-TraceControl_RecordSnapshotJob=Record snapshot...
-TraceControl_RecordSnapshotFailure=Command to snapshot record failed
-
-# Dialogs
-TraceControl_NewDialogTitle=New Connection
-TraceControl_NewNodeExistingConnectionGroupName=Existing Connections
-TraceControl_NewNodeEditButtonName=Edit connection information
-TraceControl_NewNodeComboToolTip=List of existing connections (connection name - host name)
-TraceControl_NewNodeConnectionNameLabel=Connection Name
-TraceControl_NewNodeConnectionNameTooltip=Alias to be displayed for node to connect to.
-TraceControl_NewNodeHostNameLabel=Host Name
-TraceControl_NewNodeHostNameTooltip=IP Address or DNS name of node to connect to.
-TraceControl_NewNodePortLabel=Port Number
-TraceControl_NewNodePortTooltip=IP Port Number to be used for the connection. Leave empty for default port.
-TraceControl_AlreadyExistsError=Node name already exists in Control View
-
-TraceControl_CreateSessionDialogTitle=Create Session
-TraceControl_CreateSessionDialogMessage=Configure the new tracing session
-TraceControl_CreateSessionNameLabel=Session Name
-TraceControl_CreateSessionNameTooltip=The name of the session to be created.
-TraceControl_CreateSessionPathLabel=Session Path
-TraceControl_CreateSessionPathTooltip=The session path (keep empty for default location)
-TraceControl_CreateSessionNormalLabel=Normal Mode
-TraceControl_CreateSessionNormalTooltip=Configure session in normal mode
-TraceControl_CreateSessionSnapshotLabel=Snapshot Mode
-TraceControl_CreateSessionSnapshotTooltip=Configure session in snapshot mode
-TraceControl_CreateSessionLiveLabel=Live Mode
-TraceControl_CreateSessionLiveTooltip=Configure session in live mode
-
-
-TraceControl_CreateSessionConfigureStreamingButtonText=Advanced
-TraceControl_CreateSessionConfigureStreamingButtonTooltip=Configure advanced options
-TraceControl_CreateSessionNoStreamingButtonText=Basic
-TraceControl_CreateSessionNoStreamingButtonTooltip=Use basic options
-TraceControl_CreateSessionTracePathText=Trace Path
-TraceControl_CreateSessionTracePathTooltip=The trace path (keep empty for default location)
-TraceControl_CreateSessionLinkButtonText=Use same protocol and address for data and control
-TraceControl_CreateSessionLinkButtonTooltip=Use the same protocol and address for the data and control connection
-TraceControl_CreateSessionProtocolLabelText=Protocol
-TraceControl_CreateSessionAddressLabelText=Address
-TraceControl_CreateSessionPortLabelText=Port
-TraceControl_CreateSessionControlUrlLabel=Control URL
-TraceControl_CreateSessionDataUrlLabel=Data URL
-TraceControl_CreateSessionCommonProtocolTooltip=file - Local file system full path\n\
-net or net6 - Default network transport layer which is TCP for both control and data channel.
-TraceControl_CreateSessionControlAddressTooltip=IP Address or DNS name used for control channel.\n\
-NOTE: IPv6 address MUST be enclosed in brackets '[]' (rfc2732)
-TraceControl_CreateSessionControlPortTooltip=The control port (default: 5342).
-TraceControl_CreateSessionProtocolTooltip=file - Local file system full path\n\
-net or net6 - Default network transport layer which is TCP\n\
-tcp or tcp6 - TCP network transport
-TraceControl_CreateSessionDataAddressTooltip=IP Address or DNS name used for data channel.\n\
-NOTE: IPv6 address MUST be enclosed in brackets '[]' (rfc2732)
-TraceControl_CreateSessionDataPortTooltip=The data port (default: 5343).
-TraceControl_CreateSessionNoConsumertText=No Consumer
-TraceControl_CreateSessionNoConsumertTooltip=Don't activate a consumer for this session.
-TraceControl_CreateSessionDisableConsumertText=Disable Consumer
-TraceControl_CreateSessionDisableConsumertTooltip=Disable consumer for this session.
-TraceControl_CreateSessionLiveConnectionLabel=Live Connection
-TraceControl_CreateSessionLiveDelayLabel=Live Delay
-TraceControl_CreateSessionLiveDelayTooltip=The delay in micro seconds before the data is flushed and streamed
-TraceControl_CreateSessionLiveConnectionUrlTooltip=The URL for the live connection (Relayd)
-TraceControl_CreateSessionLiveConnectionPortTooltip=The port for the live connection (Relayd)
-
-TraceControl_InvalidSessionNameError=The session name is invalid
-TraceControl_SessionAlreadyExistsError=The session name already exists
-TraceControl_SessionPathAlreadyExistsError=Session path already exists
-TraceControl_InvalidSessionPathError=The session path is invalid
-TraceControl_InvalidLiveDelayError=Live Delay must be a valid positive number
-TraceControl_FileSubSystemError=File subsystem error in session creation dialog.
-
-TraceControl_EnableChannelDialogTitle=Enable Channel
-TraceControl_EnableChannelNameLabel=Channel Name
-TraceControl_EnableChannelNameTooltip=The name of the channel to be enabled.
-TraceControl_EnableChannelSubBufferSizeTooltip=The sub-buffers size of the channel. Needs to be a power of 2 for kernel and ust tracers (Only for versions prior to 2.2.0).
-TraceControl_EnableChannelNbSubBuffersTooltip=The number of sub-buffers of the channel. Needs to be a power of 2 for kernel and ust tracers (Only for versions prior to 2.2.0).
-TraceControl_EnableChannelSwitchTimerTooltip=The Switch subbuffer timer interval in usec (default: 0). Needs to be a power of 2 for kernel and ust tracers (Only for versions prior to 2.2.0).
-TraceControl_EnableChannelReadTimerTooltip=The Read timer interval in usec.
-TraceControl_EnableChannelOutputTypeTooltip=The output type of the channel.
-TraceControl_EnableChannelDiscardModeGroupName=Discard Mode
-TraceControl_EnableChannelDiscardModeLabel=Discard
-TraceControl_EnableChannelDiscardModeTooltip=Discard event when subbuffers are full
-TraceControl_EnableChannelOverwriteModeLabel=Overwrite
-TraceControl_EnableChannelOverwriteModeTooltip=Flight recorder mode : overwrites events when subbuffers are full
-TraceControl_EnbleChannelMaxSizeTraceFilesTooltip=Maximum size of each tracefile within a stream (in bytes). 0 means unlimited
-TraceControl_EnbleChannelMaxNumTraceFilesTooltip=Used in conjunction with the maximum size of trace files option, this will limit the number of files created to the specified count. 0 means unlimited
-
-TraceControl_InvalidChannelNameError=The channel name is invalid or empty
-TraceControl_ChannelAlreadyExistsError=Channel already exists
-
-TraceControl_EnableEventsDialogTitle=Enable Events
-TraceControl_EnableEventsSessionGroupName=Session List
-TraceControl_EnableEventsChannelGroupName=Channel List
-TraceControl_EnableEventsSessionsTooltip=List of available sessions.
-TraceControl_EnableEventsChannelsTooltip=List of available channels of selected session.\nIf no channel is available default channel will be created.
-TraceControl_EnableEventsNoSessionError=No session from session list is selected.
-TraceControl_EnableEventsNoChannelError=No channel from channel list is selected.
-
-TraceControl_EnableGroupSelectionName=Select
-TraceControl_EnableEventsTracepointGroupName=Tracepoint Events
-TraceControl_EnableEventsTracepointTreeTooltip=List of available kernel tracepoint events
-TraceControl_EnableEventsTracepointTreeAllLabel=All
-TraceControl_EnableEventsSyscallName=All Syscalls
-TraceControl_EnableEventsSyscallTooltip=Enable all Syscalls
-TraceControl_EnableEventsProbeGroupName=Dynamic Probe
-TraceControl_EnableEventsEventNameLabel=Event Name
-TraceControl_EnableEventsProbeEventNameTooltip=The name of the event for enabling a dynamic probe
-TraceControl_EnableEventsProbeNameLabel=Probe
-TraceControl_EnableEventsProbeNameTooltip=[addr | symbol | symbol+offset]\nAddr and offset can be octal (0NNN...),\ndecimal (NNN...) or hexadecimal (0xNNN...)
-TraceControl_EnableEventsFucntionGroupName=Dynamic Function Entry/Return Probe
-TraceControl_EnableEventsFunctionEventNameTooltip=The name of the event for enabling a dynamic function entry/return probe
-TraceControl_EnableEventsFunctionNameLabel=Function
-
-TraceControl_EnableEventsWildcardGroupName=Wildcard
-TraceControl_EnableEventsWildcardLabel=Wildcard
-TraceControl_EnableEventsWildcardTooltip=The wild card string of event names
-TraceControl_EnableEventsLogLevelGroupName=Log Level
-TraceControl_EnableEventsLogLevelTypeName=loglevel
-TraceControl_EnableEventsLogLevelTypeTooltip=The tracepoint log level range from 0 to loglevel
-TraceControl_EnableEventsLogLevelOnlyTypeName=loglevel-only
-TraceControl_EnableEventsLogLevelOnlyTypeTooltip=The tracepoint log level (only this loglevel)
-TraceControl_EnableEventsLogLevelTooltip=The available log levels
-TraceControl_EnableEventsLoglevelEventNameTooltip=Event name for enabling log levels
-TraceControl_EnableEventsFilterGroupName=Filter Expression
-TraceControl_EnableEventsFilterTooltip=Filter expression on event field.
-
-TraceControl_InvalidProbeNameError=The probe name is invalid or empty
-TraceControl_InvalidWildcardError=The wild card name is invalid or empty
-TraceControl_InvalidLogLevelEventNameError=The event name for log level is invalid or empty
-TraceControl_InvalidLogLevel=No log level selected
-
-TraceControl_AddContextDialogTitle=Add Contexts
-TraceControl_AddContextAvailableContextsLabel=Contexts
-TraceControl_AddContextAvailableContextsTooltip=Available Contexts
-TraceControl_AddContextAllLabel=All Contexts
-
-TraceControl_ImportDialogStreamedTraceNotification=You are importing a trace generated by a streamed session. By default the traces will be outputed to ~/lttng-traces/hostname/sessionname but the location can vary.
-TraceControl_ImportDialogStreamedTraceNotificationToggle=Do not warn me again
-TraceControl_ImportDialogTitle=Import Traces
-TraceControl_ImportDialogTracesGroupName=Available Traces
-TraceControl_ImportDialogTracesTooltip=The available traces of current session to import
-TraceControl_ImportDialogProjectsGroupName=Available Projects
-TraceControl_ImportDialogProjectsTooltip=The available projects to select from
-TraceControl_ImportDialogOverwriteButtonText=Overwrite existing trace without warning
-TraceControl_ImportDialogCreationError=Dialog box cannot be created
-TraceControl_ImportDialogNoProjectSelectedError=No tracing project selected or available
-TraceControl_ImportDialogInvalidTracingProject=Invalid tracing project. Missing directory
-TraceControl_ImportDialogNoTraceSelectedError=No trace selected or available
-
-TraceControl_ImportDialogConfirmationTitle=Import Confirmation Dialog
-TraceControl_ImportDialogConfirmationOverwriteLabel=Overwrite
-TraceControl_ImportDialogConfirmationRenameLabel=Rename
-TraceControl_ImportDialogConfirmationNewNameLabel=New Trace Name
-TraceControl_InvalidTraceNameError=Invalid trace name
-TraceControl_ImportDialogTraceAlreadyExistError=Trace already exists in project
-TraceControl_ImportDialog_SelectAll=Select All
-TraceControl_ImportDialog_DeselectAll=Deselect All
-
-
-# Tree structure strings
-TraceControl_KernelDomainDisplayName=Kernel
-TraceControl_JULDomainDisplayName=JUL
-TraceControl_UstGlobalDomainDisplayName=UST global
-TraceControl_UstDisplayName=UST
-TraceControl_UnknownDomainDisplayName=Unknown domain
-TraceControl_AllSessionsDisplayName=Sessions
-TraceControl_SessionDisplayName=Session
-TraceControl_DomainDisplayName=Domain
-TraceControl_BufferTypeDisplayName = Buffer Type
-TraceControl_ChannelDisplayName=Channel
-TraceControl_EventDisplayName=Event
-TraceControl_ProviderDisplayName=Provider
-TraceControl_KernelProviderDisplayName=Kernel
-TraceControl_SharedBuffersDisplayName=Global shared buffers
-TraceControl_PerPidBuffersDisplayName=Per PID buffers
-TraceControl_PerPidBuffersTooltip=Configure per PID buffers (UST only)
-TraceControl_PerUidBuffersDisplayName=Per UID buffers
-TraceControl_PerUidBuffersTooltip=Configure per UID buffers (UST only)
-
-# Property names
-TraceControl_SessionNamePropertyName=Session Name
-TraceControl_EventNamePropertyName=Event Name
-TraceControl_EventTypePropertyName=Event Type
-TraceControl_LogLevelPropertyName=Log Level
-TraceControl_FieldsPropertyName=Fields
-TraceControl_FilterPropertyName=Filter
-TraceControl_StatePropertyName=State
-TraceControl_VersionPropertyName=Version
-TraceControl_DomainNamePropertyName=Domain Name
-TraceControl_BufferTypePropertyName=Buffer type
-TraceControl_ChannelNamePropertyName=Channel Name
-TraceControl_OverwriteModePropertyName=Overwrite Mode
-TraceControl_SubBufferSizePropertyName=Sub Buffer Size
-TraceControl_NbSubBuffersPropertyName=Number of Sub Buffers
-TraceControl_SwitchTimerPropertyName=Switch Timer Interval
-TraceControl_ReadTimerPropertyName=Read Timer Interval
-TraceControl_OutputTypePropertyName=Output Type
-TraceControl_HostNamePropertyName=Connection Name
-TraceControl_HostAddressPropertyName=Host Name
-TraceControl_SessionPathPropertyName=Session Path
-TraceControl_SnapshotPathPropertyName=Snapshot Path
-TraceControl_SnapshotNamePropertyName=Snapshot Name
-TraceControl_SnapshotIdPropertyName=Snapshot ID
-TraceControl_ProviderNamePropertyName=Provider Name
-TraceControl_ProcessIdPropertyName=Process ID
-TraceControl_ProbeAddressPropertyName=Address
-TraceControl_ProbeOffsetPropertyName=Offset
-TraceControl_ProbeSymbolPropertyName=Symbol
-TraceControl_MaxSizeTraceFilesPropertyName=Maximum size of trace files
-TraceControl_MaxNumTraceFilesPropertyName=Maximum number of trace files
-TraceControl_ConfigureMetadataChannelName=Configure metadata channel
-
-# Preferences
-TraceControl_TracingGroupPreference=&Tracing Group
-TraceControl_LoggingPreference=&Logging
-TraceControl_LogfilePath=Log file
-TraceControl_CommandTimeout=Command Timeout (in seconds)
-TraceControl_AppendLogfilePreference=&Append
-TraceControl_VerboseLevelsPreference=&Verbose Level
-TraceControl_VerboseLevelNonePreference=None
-TraceControl_VerboseLevelVerbosePreference=Level 1
-TraceControl_VerboseLevelVeryVerbosePreference=Level 2
-TraceControl_VerboseLevelVeryVeryVerbosePreference=Level 3
-
-TraceControl_ExecuteScriptJob=Executing command script
-TraceControl_ExecuteScriptError=Error executing command script
-
-TraceControl_ExecuteScriptDialogTitle=Select command script
-TraceControl_ExecuteScriptBrowseText=Browse...
-TraceControl_ExecuteScriptSelectLabel=Select Script
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * <p>
- * Interface for trace control components that can be displayed in the
- * trace control tree viewer.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ITraceControlComponent extends IAdaptable {
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return the name of the component
- */
- String getName();
- /**
- * Sets the name of the component to the given value.
- * @param name - name to set
- */
- void setName(String name);
-
- /**
- * @return the image representing the component.
- */
- Image getImage();
- /**
- * Sets the image path of the component.
- * @param path - path to the image location
- */
- void setImage(String path);
- /**
- * Sets the image the component.
- * @param image - image to the image location
- */
- void setImage(Image image);
-
- /**
- * @return tool tip with information about the component.
- */
- String getToolTip();
- /**
- * Sets the tool tip with information about the component.
- * @param toolTip - the tool tip to set.
- */
- void setToolTip(String toolTip);
-
- /**
- * @return the node's connection state
- */
- TargetNodeState getTargetNodeState();
- /**
- * Sets the node's connection state.
- * @param state - the state to set
- */
- void setTargetNodeState(TargetNodeState state);
-
- /**
- * @return returns the parent component.
- */
- ITraceControlComponent getParent();
- /**
- * Sets the parent component.
- * @param parent - the parent to set.
- */
- void setParent(ITraceControlComponent parent);
-
- /**
- * @return the children components
- */
- ITraceControlComponent[] getChildren();
- /**
- * Sets the children components.
- * @param children - the children to set.
- */
- void setChildren(List<ITraceControlComponent> children);
- /**
- * Returns the child component with given name.
- * @param name - name of child to find.
- * @return child component or null.
- */
- ITraceControlComponent getChild(String name);
- /**
- * Gets children for given class type.
- * @param clazz - a class type to get
- * @return list of trace control components matching given class type.
- */
- List<ITraceControlComponent> getChildren(Class<? extends ITraceControlComponent> clazz);
-
- /**
- * @return the LTTng control service implementation.
- */
- ILttngControlService getControlService();
-
- /**
- * Sets the LTTng control service implementation.
- * @param service - the service to set.
- */
- void setControlService(ILttngControlService service);
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Dispose any resource.
- */
- void dispose();
-
- /**
- * Adds a child component.
- * @param component - child to add.
- */
- void addChild(ITraceControlComponent component);
-
- /**
- * Removes the given child component.
- * @param component - the child to remove.
- */
- void removeChild(ITraceControlComponent component);
-
- /**
- * Removes all children.
- */
- void removeAllChildren();
-
- /**
- * Checks if child with given name exists.
- * @param name - child name to search for.
- * @return - true if exists else false.
- */
- boolean containsChild(String name);
-
- /**
- * Checks for children.
- * @return true if one or more children exist else false
- */
- boolean hasChildren();
-
- /**
- * Adds a component listener for notification of component changes.
- * @param listener - listener interface implementation to add.
- */
- void addComponentListener(ITraceControlComponentChangedListener listener);
-
- /**
- * Removes a component listener for notification of component changes.
- * @param listener - listener interface implementation to remove.
- */
- void removeComponentListener(ITraceControlComponentChangedListener listener);
-
- /**
- * Notifies listeners about the addition of a child.
- * @param parent - the parent where the child was added.
- * @param component - the child that was added.
- */
- void fireComponentAdded(ITraceControlComponent parent, ITraceControlComponent component);
-
- /**
- * Notifies listeners about the removal of a child.
- * @param parent - the parent where the child was removed.
- * @param component - the child that was removed.
- */
- void fireComponentRemoved(ITraceControlComponent parent, ITraceControlComponent component);
-
- /**
- * Notifies listeners about the change of a component.
- * @param component - the component that was changed.
- */
- void fireComponentChanged(ITraceControlComponent component);
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model;
-
-/**
- * <p>
- * Listener interface a class can implement to be notified about changes
- * of components
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ITraceControlComponentChangedListener {
- /**
- * Interface for notifications about the addition of a component.
- * @param parent - the parent where the child was added.
- * @param component - the child that was added.
- */
- void componentAdded(ITraceControlComponent parent, ITraceControlComponent component);
-
- /**
- * Interface for notifications about the removal of a child.
- * @param parent - the parent where the child was removed.
- * @param component - the child that was removed.
- */
- void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component);
- /**
- * NInterface for notifications about the change of a component.
- * @param component - the component that was changed.
- */
- void componentChanged(ITraceControlComponent component);
-}
-
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.BaseEventPropertySource;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Implementation of the base trace event component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class BaseEventComponent extends TraceControlComponent {
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component.
- */
- public static final String TRACE_EVENT_ICON_FILE_ENABLED = "icons/obj16/event_enabled.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The Event information implementation.
- */
- private IBaseEventInfo fEventInfo;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public BaseEventComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_EVENT_ICON_FILE_ENABLED);
- fEventInfo = new EventInfo(name);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * Sets the event information.
- * @param eventInfo - the event info to set.
- */
- public void setEventInfo(IBaseEventInfo eventInfo) {
- fEventInfo = eventInfo;
- }
-
- /**
- * @return the event type.
- */
- public TraceEventType getEventType() {
- return fEventInfo.getEventType();
- }
-
- /**
- * Sets the event type to the given value.
- * @param type - type to set.
- */
- public void setEventType(TraceEventType type) {
- fEventInfo.setEventType(type);
- }
-
- /**
- * Sets the event type to the value specified by the give name.
- * @param typeName - the type name.
- */
- public void setEventType(String typeName) {
- fEventInfo.setEventType(typeName);
- }
-
- /**
- * @return the trace event log level
- */
- public TraceLogLevel getLogLevel() {
- return fEventInfo.getLogLevel();
- }
-
- /**
- * Sets the trace event log level to the given level
- * @param level - event log level to set
- */
- public void setLogLevel(TraceLogLevel level) {
- fEventInfo.setLogLevel(level);
- }
-
- /**
- * Sets the trace event log level to the level specified by the given name.
- * @param levelName - event log level name
- */
- public void setLogLevel(String levelName) {
- fEventInfo.setLogLevel(levelName);
- }
-
- /**
- * @return a String containing pairs if field name and data type
- */
- public String getFieldString() {
- IFieldInfo[] fields = fEventInfo.getFields();
- if ((fields != null) && (fields.length > 0)) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < fields.length; i++) {
- buffer.append(fields[i].getName());
- buffer.append("="); //$NON-NLS-1$
- buffer.append(fields[i].getFieldType());
- if (i != fields.length-1) {
- buffer.append(";"); //$NON-NLS-1$
- }
- }
- return buffer.toString();
- }
- return null;
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new BaseEventPropertySource(this);
- }
- return null;
- }
-
- /**
- * @return target node component.
- */
- public TargetNodeComponent getTargetNode() {
- return (TargetNodeComponent) getParent().getParent();
- }
-
- /**
- * @return if provider kernel or UST
- */
- public boolean isKernel() {
- return getParent() instanceof KernelProviderComponent;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.KernelProviderPropertySource;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Implementation of the Kernel provider component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class KernelProviderComponent extends TraceControlComponent {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * Path to icon file for this component.
- */
- public static final String KERNEL_PROVIDER_ICON_FILE = "icons/obj16/targets.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public KernelProviderComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setToolTip(Messages.TraceControl_ProviderDisplayName);
- setImage(KERNEL_PROVIDER_ICON_FILE);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Sets the events information for this component.
- * @param eventInfos - events information to set.
- */
- public void setEventInfo(List<IBaseEventInfo> eventInfos) {
- for (Iterator<IBaseEventInfo> iterator = eventInfos.iterator(); iterator.hasNext();) {
- IBaseEventInfo baseEventInfo = iterator.next();
- BaseEventComponent component = new BaseEventComponent(baseEventInfo.getName(), this);
- component.setEventInfo(baseEventInfo);
- addChild(component);
- }
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new KernelProviderPropertySource(this);
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TargetNodePropertySource;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.RemoteSystemProxy;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceFactory;
-import org.eclipse.rse.core.RSECorePlugin;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.model.ISystemRegistry;
-import org.eclipse.rse.core.subsystems.CommunicationsEvent;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Implementation of the trace node component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TargetNodeComponent extends TraceControlComponent implements ICommunicationsListener {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * Path to icon file for this component (state connected).
- */
- public static final String TARGET_NODE_CONNECTED_ICON_FILE = "icons/obj16/target_connected.gif"; //$NON-NLS-1$
- /**
- * Path to icon file for this component (state disconnected).
- */
- public static final String TARGET_NODE_DISCONNECTED_ICON_FILE = "icons/obj16/target_disconnected.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The node connection state.
- */
- private TargetNodeState fState = TargetNodeState.DISCONNECTED;
- /**
- * The image to be displayed in state disconnected.
- */
- private Image fDisconnectedImage = null;
- /**
- * The connection implementation.
- */
- private IHost fHost = null;
- /**
- * The remote proxy implementation.
- */
- private IRemoteSystemProxy fRemoteProxy = null;
- /**
- * The control service for LTTng specific commands.
- */
- private ILttngControlService fService = null;
- /**
- * The command shell for issuing commands.
- */
- private ICommandShell fShell = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param name - the name of the component
- * @param parent - the parent of the component
- * @param host - the host connection implementation
- * @param proxy - the remote proxy implementation
- */
- public TargetNodeComponent(String name, ITraceControlComponent parent, IHost host, IRemoteSystemProxy proxy) {
- super(name, parent);
- setImage(TARGET_NODE_CONNECTED_ICON_FILE);
- fDisconnectedImage = Activator.getDefault().loadIcon(TARGET_NODE_DISCONNECTED_ICON_FILE);
- fHost = host;
- fRemoteProxy = proxy;
- setToolTip(fHost.getHostName());
- }
-
- /**
- * Constructor (using default proxy)
- * @param name - the name of the component
- * @param parent - the parent of the component
- * @param host - the host connection implementation
- */
- public TargetNodeComponent(String name, ITraceControlComponent parent, IHost host) {
- this(name, parent, host, new RemoteSystemProxy(host));
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public Image getImage() {
- if (fState == TargetNodeState.CONNECTED) {
- return super.getImage();
- }
- return fDisconnectedImage;
- }
-
- @Override
- public TargetNodeState getTargetNodeState() {
- return fState;
- }
-
- @Override
- public void setTargetNodeState(TargetNodeState state) {
- fState = state;
- fireComponentChanged(TargetNodeComponent.this);
- }
-
- @Override
- public ILttngControlService getControlService() {
- return fService;
- }
-
- @Override
- public void setControlService(ILttngControlService service) {
- fService = service;
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new TargetNodePropertySource(this);
- }
- return null;
- }
-
- /**
- * @return remote host name
- */
- public String getHostName() {
- return fHost.getHostName();
- }
-
- /**
- * @return remote system proxy implementation
- */
- public IRemoteSystemProxy getRemoteSystemProxy() {
- return fRemoteProxy;
- }
-
- /**
- * @return port of IP connection (shell) to be used
- */
- public int getPort() {
- return fRemoteProxy.getPort();
- }
-
- /**
- * Sets the port of the IP connections of the shell
- * @param port - the IP port to set
- */
- public void setPort(int port) {
- fRemoteProxy.setPort(port);
- }
-
- /**
- * @return all available sessions.
- */
- public TraceSessionComponent[] getSessions() {
- List<ITraceControlComponent> compenents = getChildren(TraceSessionGroup.class);
- if (compenents.size() > 0) {
- TraceSessionGroup group = (TraceSessionGroup)compenents.get(0);
- List<ITraceControlComponent> sessions = group.getChildren(TraceSessionComponent.class);
- return sessions.toArray(new TraceSessionComponent[sessions.size()]);
- }
- return new TraceSessionComponent[0];
- }
-
- /**
- * @return node version
- */
- public String getNodeVersion() {
- // Control service is null during connection to node
- if (getControlService() != null) {
- return getControlService().getVersionString();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Returns if node supports filtering of events
- * @return <code>true</code> if node supports filtering else <code>false</code>
- */
- public boolean isEventFilteringSupported() {
- return getControlService().isVersionSupported("2.1.0"); //$NON-NLS-1$
- }
-
- /**
- * Returns if node supports networks streaming or not
- * @return <code>true</code> if node supports filtering else <code>false</code>
- *
- */
- public boolean isNetworkStreamingSupported() {
- return getControlService().isVersionSupported("2.1.0"); //$NON-NLS-1$
- }
-
- /**
- * Returns if node supports configuring buffer type or not
- * @return <code>true</code> if node supports buffer type configuration else <code>false</code>
- */
- public boolean isBufferTypeConfigSupported() {
- return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
- }
-
- /**
- * Returns if node supports trace file rotation or not
- * @return <code>true</code> if node supports trace file rotation else <code>false</code>
- */
- public boolean isTraceFileRotationSupported() {
- return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
- }
-
- /**
- * Returns if node supports periodical flush for metadata or not
- * @return <code>true</code> if node supports periodical flush for metadata else <code>false</code>
- */
- public boolean isPeriodicalMetadataFlushSupported() {
- return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
- }
- /**
- * Returns if node supports snapshots or not
- * @return <code>true</code> if it supports snapshots else <code>false</code>
- *
- */
- public boolean isSnapshotSupported() {
- return getControlService().isVersionSupported("2.3.0"); //$NON-NLS-1$
- }
- /**
- * Returns if node supports live or not
- * @return <code>true</code> if it supports live else <code>false</code>
- *
- */
- public boolean isLiveSupported() {
- return getControlService().isVersionSupported("2.4.0"); //$NON-NLS-1$;
- }
- /**
- * Returns if node supports adding contexts on event
- * @return <code>true</code> if it supports adding contexts on events else <code>false</code>
- *
- */
- public boolean isContextOnEventSupported() {
- return !getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void communicationsStateChange(CommunicationsEvent e) {
- if (e.getState() == CommunicationsEvent.AFTER_DISCONNECT ||
- e.getState() == CommunicationsEvent.CONNECTION_ERROR) {
- handleDisconnected();
- } if ((e.getState() == CommunicationsEvent.AFTER_CONNECT) && (fState != TargetNodeState.CONNECTING)) {
- handleConnected();
- }
- }
-
- @Override
- public boolean isPassiveCommunicationsListener() {
- return true;
- }
-
- @Override
- public void dispose() {
- fRemoteProxy.removeCommunicationListener(this);
- }
-
- /**
- * Method to connect this node component to the remote target node.
- */
- public void connect() {
- if (fState == TargetNodeState.DISCONNECTED) {
- try {
- setTargetNodeState(TargetNodeState.CONNECTING);
- fRemoteProxy.connect(new IRSECallback() {
- @Override
- public void done(IStatus status, Object result) {
- // Note: result might be null!
- if(status.isOK()) {
- handleConnected();
- } else {
- handleDisconnected();
- }
- }
- });
- } catch (Exception e) {
- setTargetNodeState(TargetNodeState.DISCONNECTED);
- Activator.getDefault().logError(Messages.TraceControl_ConnectionFailure + " (" + getName() + "). \n", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-
- /**
- * Method to disconnect this node component to the remote target node.
- */
- public void disconnect() {
- if (fState == TargetNodeState.CONNECTED) {
- try {
- setTargetNodeState(TargetNodeState.DISCONNECTING);
- fRemoteProxy.disconnect();
- } catch (Exception e) {
- Activator.getDefault().logError(Messages.TraceControl_DisconnectionFailure + " (" + getName() + "). \n", e); //$NON-NLS-1$ //$NON-NLS-2$
- } finally {
- handleDisconnected();
- }
- }
- }
-
- /**
- * Retrieves the trace configuration from the target node and populates the
- * information in the tree model. The execution is done in a own job.
- */
- public void getConfigurationFromNode() {
- Job job = new Job(Messages.TraceControl_RetrieveNodeConfigurationJob) {
- @Override
- protected IStatus run(IProgressMonitor monitor) {
-
- try {
- // Get provider information from node
- TraceProviderGroup providerGroup = new TraceProviderGroup(Messages.TraceControl_ProviderDisplayName, TargetNodeComponent.this);
- addChild(providerGroup);
- providerGroup.getProviderFromNode(monitor);
-
- // Get session information from node
- TraceSessionGroup sessionGroup = new TraceSessionGroup(Messages.TraceControl_AllSessionsDisplayName, TargetNodeComponent.this);
- addChild(sessionGroup);
- sessionGroup.getSessionsFromNode(monitor);
- } catch (ExecutionException e) {
- removeAllChildren();
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_RetrieveNodeConfigurationFailure, e);
- }
-
- return Status.OK_STATUS;
- }
- };
- job.setUser(true);
- job.schedule();
- }
-
- /**
- * Refresh the node configuration
- */
- public void refresh() {
- removeAllChildren();
- getConfigurationFromNode();
- }
-
- /**
- * Deregisters host from registry.
- */
- public void deregister() {
- ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
- // Don't remove local host because it cannot be recreated by
- // LTTng NewConnection Dialog
- if (!fRemoteProxy.isLocal()) {
- registry.deleteHost(fHost);
- }
- }
-
- // ------------------------------------------------------------------------
- // Helper function
- // ------------------------------------------------------------------------
-
- /**
- * @return returns the control service for LTTng specific commands.
- * @throws ExecutionException
- */
- private ILttngControlService createControlService() throws ExecutionException {
- if (fShell == null) {
- fShell = fRemoteProxy.createCommandShell();
- fRemoteProxy.addCommunicationListener(this);
- }
- fService = LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
- return fService;
- }
-
- /**
- * Handles the connected event.
- */
- private void handleConnected() {
- setTargetNodeState(TargetNodeState.CONNECTED);
- try {
- createControlService();
- getConfigurationFromNode();
- } catch (final ExecutionException e) {
- // Disconnect only if no control service, otherwise stay connected.
- if (getControlService() == null) {
- disconnect();
- }
-
- // Notify user
- Display.getDefault().asyncExec(new Runnable() {
- @Override
- public void run() {
- ErrorDialog er = new ErrorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- Messages.TraceControl_ErrorTitle, Messages.TraceControl_RetrieveNodeConfigurationFailure,
- new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e),
- IStatus.ERROR);
- er.open();
- }
- });
- Activator.getDefault().logError(Messages.TraceControl_RetrieveNodeConfigurationFailure + " (" + getName() + "). \n", e); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
-
- /**
- * Handles the disconnected event.
- */
- private void handleDisconnected() {
- removeAllChildren();
- setTargetNodeState(TargetNodeState.DISCONNECTED);
- fShell = null;
- fService = null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceChannelPropertySource;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * <p>
- * Implementation of the trace channel component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceChannelComponent extends TraceControlComponent {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * Path to icon file for this component (state enabled).
- */
- public static final String TRACE_CHANNEL_ICON_FILE_ENABLED = "icons/obj16/channel.gif"; //$NON-NLS-1$
- /**
- * Path to icon file for this component (state disabled).
- */
- public static final String TRACE_CHANNEL_ICON_FILE_DISABLED = "icons/obj16/channel_disabled.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The channel information.
- */
- private IChannelInfo fChannelInfo = null;
- /**
- * The image to be displayed in disabled state.
- */
- private Image fDisabledImage = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceChannelComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_CHANNEL_ICON_FILE_ENABLED);
- setToolTip(Messages.TraceControl_ChannelDisplayName);
- fChannelInfo = new ChannelInfo(name);
- fDisabledImage = Activator.getDefault().loadIcon(TRACE_CHANNEL_ICON_FILE_DISABLED);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public Image getImage() {
- if (fChannelInfo.getState() == TraceEnablement.DISABLED) {
- return fDisabledImage;
- }
- return super.getImage();
- }
-
- /**
- * Sets the channel information.
- *
- * @param channelInfo
- * The channel info to assign to this component
- */
- public void setChannelInfo(IChannelInfo channelInfo) {
- fChannelInfo = channelInfo;
- IEventInfo[] events = fChannelInfo.getEvents();
- List<ITraceControlComponent> eventComponents = new ArrayList<>();
- for (int i = 0; i < events.length; i++) {
- TraceEventComponent event = null;
- if (events[i].getClass() == ProbeEventInfo.class) {
- event = new TraceProbeEventComponent(events[i].getName(), this);
- } else {
- event = new TraceEventComponent(events[i].getName(), this);
- }
-
- eventComponents.add(event);
- event.setEventInfo(events[i]);
- }
- if (!eventComponents.isEmpty()) {
- setChildren(eventComponents);
- }
- }
-
- /**
- * @return the overwrite mode value.
- */
- public boolean isOverwriteMode() {
- return fChannelInfo.isOverwriteMode();
- }
- /**
- * Sets the overwrite mode value to the given mode.
- * @param mode - mode to set.
- */
- public void setOverwriteMode(boolean mode){
- fChannelInfo.setOverwriteMode(mode);
- }
- /**
- * @return the sub-buffer size.
- */
- public long getSubBufferSize() {
- return fChannelInfo.getSubBufferSize();
- }
- /**
- * Sets the sub-buffer size to the given value.
- * @param bufferSize - size to set to set.
- */
- public void setSubBufferSize(long bufferSize) {
- fChannelInfo.setSubBufferSize(bufferSize);
- }
- /**
- * @return the number of sub-buffers.
- */
- public int getNumberOfSubBuffers() {
- return fChannelInfo.getNumberOfSubBuffers();
- }
- /**
- * Sets the number of sub-buffers to the given value.
- * @param numberOfSubBuffers - value to set.
- */
- public void setNumberOfSubBuffers(int numberOfSubBuffers) {
- fChannelInfo.setNumberOfSubBuffers(numberOfSubBuffers);
- }
- /**
- * @return the switch timer interval.
- */
- public long getSwitchTimer() {
- return fChannelInfo.getSwitchTimer();
- }
- /**
- * Sets the switch timer interval to the given value.
- * @param timer - timer value to set.
- */
- public void setSwitchTimer(long timer) {
- fChannelInfo.setSwitchTimer(timer);
- }
- /**
- * @return the read timer interval.
- */
- public long getReadTimer() {
- return fChannelInfo.getReadTimer();
- }
- /**
- * Sets the read timer interval to the given value.
- * @param timer - timer value to set..
- */
- public void setReadTimer(long timer) {
- fChannelInfo.setReadTimer(timer);
- }
- /**
- * @return the output type.
- */
- public TraceChannelOutputType getOutputType() {
- return fChannelInfo.getOutputType();
- }
- /**
- * Sets the output type to the given value.
- * @param type - type to set.
- */
- public void setOutputType(TraceChannelOutputType type) {
- fChannelInfo.setOutputType(type);
- }
- /**
- * Sets the output type to the given value.
- * @param type - type to set.
- */
- public void setOutputType(String type) {
- fChannelInfo.setOutputType(type);
- }
-
- /**
- * @return the channel state (enabled or disabled).
- */
- public TraceEnablement getState() {
- return fChannelInfo.getState();
- }
- /**
- * Sets the channel state (enablement) to the given value.
- * @param state - state to set.
- */
- public void setState(TraceEnablement state) {
- fChannelInfo.setState(state);
- }
- /**
- * Sets the channel state (enablement) to the value specified by the given name.
- * @param stateName - state to set.
- */
- public void setState(String stateName) {
- fChannelInfo.setState(stateName);
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new TraceChannelPropertySource(this);
- }
- return null;
- }
-
- /**
- * @return session name from parent
- */
- public String getSessionName() {
- return ((TraceDomainComponent)getParent()).getSessionName();
- }
-
- /**
- * @return session from parent
- */
- public TraceSessionComponent getSession() {
- return ((TraceDomainComponent)getParent()).getSession();
- }
-
- /**
- * @return if domain is kernel or UST
- */
- public boolean isKernel() {
- return ((TraceDomainComponent)getParent()).isKernel();
- }
-
- /**
- * @return the parent target node
- */
- public TargetNodeComponent getTargetNode() {
- return ((TraceDomainComponent)getParent()).getTargetNode();
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Enables a list of events with no additional parameters.
- *
- * @param eventNames
- * - a list of event names to enabled.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableEvents(List<String> eventNames, IProgressMonitor monitor) throws ExecutionException {
- enableEvents(eventNames, null, monitor);
- }
-
- /**
- * Enables a list of events with no additional parameters.
- *
- * @param eventNames
- * - a list of event names to enabled.
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableEvents(List<String> eventNames, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableEvents(getSessionName(), getName(), eventNames, isKernel(), filterExpression, monitor);
- }
-
- /**
- * Enables all syscalls (for kernel domain)
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableSyscalls(IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableSyscalls(getSessionName(), getName(), monitor);
- }
-
- /**
- * Enables a dynamic probe (for kernel domain)
- *
- * @param eventName
- * - event name for probe
- * @param isFunction
- * - true for dynamic function entry/return probe else false
- * @param probe
- * - the actual probe
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableProbe(String eventName, boolean isFunction, String probe,
- IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableProbe(getSessionName(), getName(), eventName, isFunction, probe, monitor);
- }
-
- /**
- * Enables events using log level.
- *
- * @param eventName
- * - a event name
- * @param logLevelType
- * - a log level type
- * @param level
- * - a log level
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableLogLevel(String eventName, LogLevelType logLevelType,
- TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableLogLevel(getSessionName(), getName(), eventName, logLevelType, level, filterExpression, monitor);
- }
-
- /**
- * Enables a list of events with no additional parameters.
- *
- * @param eventNames
- * - a list of event names to enabled.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void disableEvent(List<String> eventNames, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().disableEvent(getParent().getParent().getName(),
- getName(), eventNames, isKernel(), monitor);
- }
-
- /**
- * Add contexts to given channels and or events
- *
- * @param contexts
- * - a list of contexts to add
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void addContexts(List<String> contexts, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().addContexts(getSessionName(), getName(), null,
- isKernel(), contexts, monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * <p>
- * Base implementation for trace control component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceControlComponent implements ITraceControlComponent {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The name of the component
- */
- private String fName = ""; //$NON-NLS-1$
- /**
- * The image to be displayed for the component.
- */
- private Image fImage = null;
- /**
- * The tool tip to be displayed for the component.
- */
- private String fToolTip = null;
- /**
- * The parent component.
- */
- private ITraceControlComponent fParent = null;
- /**
- * The list if children components.
- */
- private final List<ITraceControlComponent> fChildren = new ArrayList<>();
- /**
- * The list of listeners to be notified about changes.
- */
- private final ListenerList fListeners = new ListenerList();
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param name - the name of the component.
- */
- public TraceControlComponent(String name) {
- this(name, null);
- }
-
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent component.
- */
- public TraceControlComponent(String name, ITraceControlComponent parent) {
- fName = name;
- fParent = parent;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getName() {
- return fName;
- }
-
- @Override
- public void setName(String name) {
- fName = name;
- }
-
- @Override
- public Image getImage() {
- return fImage;
- }
-
- @Override
- public void setImage(String path) {
- fImage = Activator.getDefault().loadIcon(path);
- }
-
- @Override
- public void setImage(Image image) {
- fImage = image;
- }
-
- @Override
- public String getToolTip() {
- return fToolTip;
- }
-
- @Override
- public void setToolTip(String toolTip) {
- fToolTip = toolTip;
- }
-
- @Override
- public TargetNodeState getTargetNodeState() {
- if (getParent() != null) {
- return getParent().getTargetNodeState();
- }
- return TargetNodeState.DISCONNECTED;
- }
-
- @Override
- public void setTargetNodeState(TargetNodeState state) {
- if (getParent() != null) {
- getParent().setTargetNodeState(state);
- }
- }
-
- @Override
- public ITraceControlComponent getParent() {
- return fParent;
- }
-
- @Override
- public void setParent(ITraceControlComponent parent) {
- fParent = parent;
- }
-
- @Override
- public ITraceControlComponent[] getChildren() {
- return fChildren.toArray(new ITraceControlComponent[fChildren.size()]);
- }
-
- @Override
- public void setChildren(List<ITraceControlComponent> children) {
- for (Iterator<ITraceControlComponent> iterator = children.iterator(); iterator.hasNext();) {
- ITraceControlComponent traceControlComponent = iterator.next();
- fChildren.add(traceControlComponent);
- fireComponentChanged(this);
- }
- }
-
- @Override
- public ITraceControlComponent getChild(String name) {
- ITraceControlComponent child = null;
- for (int i = 0; i < fChildren.size(); i++) {
- if (fChildren.get(i).getName().equals(name)) {
- child = fChildren.get(i);
- break;
- }
- }
- return child;
- }
-
- @Override
- public List<ITraceControlComponent> getChildren(Class<? extends ITraceControlComponent> clazz) {
- List<ITraceControlComponent> list = new ArrayList<>();
-
- for (Iterator<ITraceControlComponent> iterator = fChildren.iterator(); iterator.hasNext();) {
- ITraceControlComponent child = iterator.next();
- if (child.getClass() == clazz) {
- list.add(child);
- }
- }
- return list;
- }
-
- @Override
- public ILttngControlService getControlService() {
- if (getParent() != null) {
- return getParent().getControlService();
- }
- return null;
- }
-
- @Override
- public void setControlService(ILttngControlService service) {
- if (getParent() != null) {
- getParent().setControlService(service);
- }
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void dispose() {
- // default implementation
- }
-
- @Override
- public void addChild(ITraceControlComponent component) {
- if (component != null) {
- fChildren.add(component);
- }
- fireComponentAdded(this, component);
- }
-
- @Override
- public void removeChild(ITraceControlComponent component) {
- if (component != null) {
- fChildren.remove(component);
- component.dispose();
- }
- fireComponentRemoved(this, component);
- }
-
- @Override
- public void removeAllChildren() {
- for (Iterator<ITraceControlComponent> iterator = fChildren.iterator(); iterator.hasNext();) {
- ITraceControlComponent child = iterator.next();
- child.removeAllChildren();
- }
- fChildren.clear();
-// fireCompenentChanged(this);
- }
-
- @Override
- public boolean containsChild(String name) {
- boolean retValue = false;
- for (int i = 0; i < fChildren.size(); i++) {
- if (fChildren.get(i).getName().equals(name)) {
- retValue = true;
- break;
- }
- }
- return retValue;
- }
-
- @Override
- public boolean hasChildren() {
- return !fChildren.isEmpty();
- }
-
- @Override
- public void addComponentListener(ITraceControlComponentChangedListener listener) {
- if (fParent != null) {
- fParent.addComponentListener(listener);
- } else {
- fListeners.add(listener);
- }
- }
-
- @Override
- public void removeComponentListener(ITraceControlComponentChangedListener listener) {
- if (fParent != null) {
- fParent.removeComponentListener(listener);
- } else {
- fListeners.remove(listener);
- }
- }
-
- @Override
- public void fireComponentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
- if (component == null) {
- return;
- }
-
- if (fParent != null) {
- fParent.fireComponentAdded(parent, component);
- } else {
- Object[] listeners = fListeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- ITraceControlComponentChangedListener listener = (ITraceControlComponentChangedListener) listeners[i];
- listener.componentAdded(parent, component);
- }
- }
- }
-
- @Override
- public void fireComponentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
- if (component == null) {
- return;
- }
-
- if (fParent != null) {
- fParent.fireComponentRemoved(parent, component);
- } else {
- Object[] listeners = fListeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- ITraceControlComponentChangedListener listener = (ITraceControlComponentChangedListener) listeners[i];
- listener.componentRemoved(parent, component);
- }
- }
- }
-
- @Override
- public void fireComponentChanged(ITraceControlComponent component) {
- if (component == null) {
- return;
- }
-
- if (fParent != null) {
- fParent.fireComponentChanged(component);
- } else {
- Object[] listeners = fListeners.getListeners();
- for (int i = 0; i < listeners.length; i++) {
- ITraceControlComponentChangedListener listener = (ITraceControlComponentChangedListener) listeners[i];
- listener.componentChanged(component);
- }
- }
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- return null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import org.eclipse.jface.viewers.ITreeContentProvider;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-
-/**
- * <p>
- * Tree content provider implementation for trace control view.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceControlContentProvider implements ITreeContentProvider {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void dispose() {
- }
-
- @Override
- public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
- }
-
- @Override
- public Object[] getElements(Object inputElement) {
- return getChildren(inputElement);
- }
-
- @Override
- public Object[] getChildren(Object parentElement) {
-
- if (parentElement instanceof ITraceControlComponent) {
- return ((ITraceControlComponent)parentElement).getChildren();
- }
- return new Object[0];
- }
-
- @Override
- public Object getParent(Object element) {
- if (element instanceof ITraceControlComponent) {
- return ((ITraceControlComponent)element).getParent();
- }
- return null;
- }
-
- @Override
- public boolean hasChildren(Object element) {
- if (element instanceof ITraceControlComponent) {
- return ((ITraceControlComponent)element).hasChildren();
- }
- return false;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import org.eclipse.jface.viewers.ColumnLabelProvider;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.swt.graphics.Image;
-
-/**
- * <p>
- * Label provider for trace control tree viewer.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceControlLabelProvider extends ColumnLabelProvider {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Image getImage(Object element) {
- if ((element != null) && (element instanceof ITraceControlComponent)) {
- return ((ITraceControlComponent) element).getImage();
- }
- return null;
- }
-
- @Override
- public String getText(Object element) {
- if ((element != null) && (element instanceof ITraceControlComponent)) {
- return ((ITraceControlComponent) element).getName();
- }
- return "";//$NON-NLS-1$
- }
-
- @Override
- public String getToolTipText(Object element) {
- if ((element != null) && (element instanceof ITraceControlComponent)) {
- return ((ITraceControlComponent) element).getToolTip();
- }
- return null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import org.eclipse.core.expressions.PropertyTester;
-
-/**
- *
- * Property Tester Implementation for Trace Control Components.
- *
- * @author Bernd Hufmann
- */
-public class TraceControlPropertyTester extends PropertyTester {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- private static final String ADD_CONTEXT_SUPPORT_PROPERTY = "isAddContextOnEventSupported"; //$NON-NLS-1$
-
-
- @Override
- public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
-
- // Check if node supports adding contexts on event level.
- if (ADD_CONTEXT_SUPPORT_PROPERTY.equals(property)) {
- if ((receiver != null) && (receiver instanceof TraceEventComponent)) {
- TraceEventComponent event = (TraceEventComponent) receiver;
- TargetNodeComponent node = event.getTargetNode();
- return node.isContextOnEventSupported();
- }
- }
- return false;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-
-/**
- * <p>
- * Root element in trace control tree.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceControlRoot extends TraceControlComponent {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The name of the root component
- */
- public static final String TRACE_CONTROL_ROOT_NAME = "trace_control_root"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Default constructor
- */
- public TraceControlRoot() {
- super(TRACE_CONTROL_ROOT_NAME);
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceDomainPropertySource;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Implementation of the trace domain component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceDomainComponent extends TraceControlComponent {
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component.
- */
- public static final String TRACE_DOMAIN_ICON_FILE = "icons/obj16/domain.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The domain information.
- */
- private IDomainInfo fDomainInfo = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceDomainComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_DOMAIN_ICON_FILE);
- setToolTip(Messages.TraceControl_DomainDisplayName);
- fDomainInfo = new DomainInfo(name);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * Sets the domain information.
- * @param domainInfo - the domain information to set.
- */
- public void setDomainInfo(IDomainInfo domainInfo) {
- fDomainInfo = domainInfo;
- IChannelInfo[] channels = fDomainInfo.getChannels();
- for (int i = 0; i < channels.length; i++) {
- TraceChannelComponent channel = new TraceChannelComponent(channels[i].getName(), this);
- channel.setChannelInfo(channels[i]);
- addChild(channel);
- }
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new TraceDomainPropertySource(this);
- }
- return null;
- }
-
- /**
- * @return session name from parent
- */
- public String getSessionName() {
- return ((TraceSessionComponent)getParent()).getName();
- }
-
- /**
- * @return session from parent
- */
- public TraceSessionComponent getSession() {
- return (TraceSessionComponent)getParent();
- }
-
- /**
- * @return true if domain is kernel, false for UST
- */
- public boolean isKernel() {
- return fDomainInfo.isKernel();
- }
-
- /**
- * Sets whether domain is Kernel domain or UST
- * @param isKernel true for kernel, false for UST
- */
- public void setIsKernel(boolean isKernel) {
- fDomainInfo.setIsKernel(isKernel);
- }
-
- /**
- * @return returns all available channels for this domain.
- */
- public TraceChannelComponent[] getChannels() {
- List<ITraceControlComponent> channels = getChildren(TraceChannelComponent.class);
- return channels.toArray(new TraceChannelComponent[channels.size()]);
- }
-
- /**
- * @return the parent target node
- */
- public TargetNodeComponent getTargetNode() {
- return ((TraceSessionComponent)getParent()).getTargetNode();
- }
-
- /**
- * @return the buffer type
- */
- public BufferType getBufferType(){
- return fDomainInfo.getBufferType();
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Retrieves the session configuration from the node.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void getConfigurationFromNode(IProgressMonitor monitor) throws ExecutionException {
- TraceSessionComponent session = (TraceSessionComponent) getParent();
- session.getConfigurationFromNode(monitor);
- }
-
- /**
- * Enables channels with given names which are part of this domain. If a
- * given channel doesn't exists it creates a new channel with the given
- * parameters (or default values if given parameter is null).
- *
- * @param channelNames
- * - a list of channel names to enable on this domain
- * @param info
- * - channel information to set for the channel (use null for
- * default)
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableChannels(List<String> channelNames, IChannelInfo info,
- IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableChannels(getParent().getName(), channelNames,
- isKernel(), info, monitor);
- }
-
- /**
- * Disables channels with given names which are part of this domain.
- *
- * @param channelNames
- * - a list of channel names to enable on this domain
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void disableChannels(List<String> channelNames,
- IProgressMonitor monitor) throws ExecutionException {
- getControlService().disableChannels(getParent().getName(),
- channelNames, isKernel(), monitor);
- }
-
- /**
- * Enables a list of events with no additional parameters.
- *
- * @param eventNames
- * - a list of event names to enabled.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableEvents(List<String> eventNames, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableEvents(getSessionName(), null, eventNames,
- isKernel(), null, monitor);
- }
-
- /**
- * Enables all syscalls (for kernel domain)
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
-
- public void enableSyscalls(IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableSyscalls(getSessionName(), null, monitor);
- }
-
- /**
- * Enables a dynamic probe (for kernel domain)
- *
- * @param eventName
- * - event name for probe
- * @param isFunction
- * - true for dynamic function entry/return probe else false
- * @param probe
- * - the actual probe
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableProbe(String eventName, boolean isFunction, String probe,
- IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableProbe(getSessionName(), null, eventName,
- isFunction, probe, monitor);
- }
-
- /**
- * Enables events using log level.
- *
- * @param eventName
- * - a event name
- * @param logLevelType
- * - a log level type
- * @param level
- * - a log level
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableLogLevel(String eventName, LogLevelType logLevelType,
- TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableLogLevel(getSessionName(), null, eventName,
- logLevelType, level, filterExpression, monitor);
- }
-
- /**
- * Add contexts to given channels and or events
- *
- * @param contexts
- * - a list of contexts to add
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void addContexts(List<String> contexts, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().addContexts(getSessionName(), null, null,
- isKernel(), contexts, monitor);
- }
-
- /**
- * Executes calibrate command to quantify LTTng overhead.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void calibrate(IProgressMonitor monitor) throws ExecutionException {
- getControlService().calibrate(isKernel(), monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceEventPropertySource;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * <p>
- * Implementation of the trace channel component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceEventComponent extends TraceControlComponent {
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component (enabled state).
- */
- public static final String TRACE_EVENT_ICON_FILE_ENABLED = "icons/obj16/event_enabled.gif"; //$NON-NLS-1$
- /**
- * Path to icon file for this component (disabled state).
- */
- public static final String TRACE_EVENT_ICON_FILE_DISABLED = "icons/obj16/event_disabled.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The event information.
- */
- protected IEventInfo fEventInfo = null;
- /**
- * The image to be displayed when in disabled state.
- */
- private Image fDisabledImage = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceEventComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_EVENT_ICON_FILE_ENABLED);
- setToolTip(Messages.TraceControl_EventDisplayName);
- fEventInfo = new EventInfo(name);
- fDisabledImage = Activator.getDefault().loadIcon(TRACE_EVENT_ICON_FILE_DISABLED);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public Image getImage() {
- if (fEventInfo.getState() == TraceEnablement.DISABLED) {
- return fDisabledImage;
- }
- return super.getImage();
- }
-
- /**
- * Sets the event information.
- * @param eventInfo - the event information to set.
- */
- public void setEventInfo(IEventInfo eventInfo) {
- fEventInfo = eventInfo;
- }
-
- /**
- * @return the trace event type
- */
- public TraceEventType getEventType() {
- return fEventInfo.getEventType();
- }
-
- /**
- * Sets the trace event type to the given type
- * @param type - type to set
- */
- public void setEventType(TraceEventType type) {
- fEventInfo.setEventType(type);
- }
-
- /**
- * Sets the trace event type to the type specified by the given name.
- * @param typeName - event type name
- */
- public void setEventType(String typeName) {
- fEventInfo.setEventType(typeName);
- }
-
- /**
- * @return the event state (enabled or disabled).
- */
- public TraceEnablement getState() {
- return fEventInfo.getState();
- }
-
- /**
- * Sets the event state (enablement) to the given value.
- * @param state - state to set.
- */
- public void setState(TraceEnablement state) {
- fEventInfo.setState(state);
- }
-
- /**
- * Sets the event state (enablement) to the value specified by the given name.
- * @param stateName - state to set.
- */
- public void setState(String stateName) {
- fEventInfo.setState(stateName);
- }
-
- /**
- * @return the trace event log level
- */
- public TraceLogLevel getLogLevel() {
- return fEventInfo.getLogLevel();
- }
-
- /**
- * Sets the trace event log level to the given level
- * @param level - event log level to set
- */
- public void setLogLevel(TraceLogLevel level) {
- fEventInfo.setLogLevel(level);
- }
-
- /**
- * Sets the trace event log level to the level specified by the given name.
- * @param levelName - event log level name
- */
- public void setLogLevel(String levelName) {
- fEventInfo.setLogLevel(levelName);
- }
-
- /**
- * Returns filter expression.
- * @return filter expression
- */
- public String getFilterExpression() {
- return fEventInfo.getFilterExpression();
- }
-
- /**
- * Sets the filter expression.
- * @param filter The filter expression to set
- */
- public void setFilterExpression(String filter) {
- fEventInfo.setFilterExpression(filter);
- }
-
- /**
- * Returns the log level type
- * @return event log level type
- */
- public LogLevelType getLogLevelType() {
- return fEventInfo.getLogLevelType();
- }
-
- /**
- * Sets the trace event log level type to the given level type
- * @param levelType - event log level type to set
- */
- public void setLogLevelType(LogLevelType levelType) {
- fEventInfo.setLogLevelType(levelType);
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new TraceEventPropertySource(this);
- }
- return null;
- }
-
- /**
- * @return target node component.
- */
- public TargetNodeComponent getTargetNode() {
- return ((TraceChannelComponent)getParent()).getTargetNode();
- }
-
- /**
- * @return session name from parent
- */
- public String getSessionName() {
- return ((TraceChannelComponent)getParent()).getSessionName();
- }
-
- /**
- * @return session from parent
- */
- public TraceSessionComponent getSession() {
- return ((TraceChannelComponent)getParent()).getSession();
- }
-
- /**
- * @return channel name from parent
- */
- public String getChannelName() {
- return getParent().getName();
- }
-
- /**
- * @return if domain is kernel or UST
- */
- public boolean isKernel() {
- return ((TraceChannelComponent)getParent()).isKernel();
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Add contexts to given channels and or events
- *
- * @param contexts
- * - a list of contexts to add
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void addContexts(List<String> contexts, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().addContexts(getSessionName(), getChannelName(),
- getName(), isKernel(), contexts, monitor);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceProbeEventPropertySource;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-
-/**
- * <p>
- * Implementation of the trace channel component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceProbeEventComponent extends TraceEventComponent {
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceProbeEventComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- fEventInfo = new ProbeEventInfo(name);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Sets the event information.
- * @param eventInfo - the event information to set.
- */
- @Override
- public void setEventInfo(IEventInfo eventInfo) {
- if (eventInfo instanceof ProbeEventInfo) {
- fEventInfo = eventInfo;
- return;
- }
- throw new IllegalArgumentException("Invalid type passed. Only class of type ProbeEventInfo allowed:\n" + eventInfo.getClass()); //$NON-NLS-1$
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new TraceProbeEventPropertySource(this);
- }
- return null;
- }
- /**
- * @return the address of the probe. (null if Symbol is used)
- */
- public String getAddress() {
- return getEventInfo().getAddress();
- }
- /**
- * Sets the address of the probe.
- * @param address - a address
- */
- public void setAddress(String address) {
- getEventInfo().setAddress(address);
- }
- /**
- * @return the offset applied to the symbol.
- */
- public String getOffset() {
- return getEventInfo().getOffset();
- }
- /**
- * Sets the offset applied to the symbol. (valid if symbol is used)
- * @param offset - a offset
- */
- public void setOffset(String offset) {
- getEventInfo().setOffset(offset);
- }
- /**
- * @return the symbol name. (null if address is used)
- */
- public String getSymbol() {
- return getEventInfo().getSymbol();
- }
- /**
- * Sets the symbol name.
- * @param symbol - a symbol name (null if address is used)
- */
- public void setSymbol(String symbol) {
- getEventInfo().setSymbol(symbol);
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
- private ProbeEventInfo getEventInfo() {
- return (ProbeEventInfo) fEventInfo;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.Iterator;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-
-/**
- * <p>
- * Implementation of the trace provider group.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceProviderGroup extends TraceControlComponent {
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component.
- */
- public static final String TRACE_PROVIDERS_ICON_FILE = "icons/obj16/providers.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceProviderGroup(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_PROVIDERS_ICON_FILE);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Gets the provider information from the target node.
- * @param monitor - a progress monitor
- * @throws ExecutionException If the command fails
- */
- public void getProviderFromNode(IProgressMonitor monitor) throws ExecutionException {
-
- List<IBaseEventInfo> eventInfos = getControlService().getKernelProvider(monitor);
-
- if (!eventInfos.isEmpty()) {
- KernelProviderComponent component = new KernelProviderComponent(Messages.TraceControl_KernelProviderDisplayName, this);
- addChild(component);
- component.setEventInfo(eventInfos);
- }
-
- List<IUstProviderInfo> allProviders = getControlService().getUstProvider(monitor);
-
- for (Iterator<IUstProviderInfo> iterator = allProviders.iterator(); iterator.hasNext();) {
- IUstProviderInfo ustProviderInfo = iterator.next();
- UstProviderComponent ustComponent = new UstProviderComponent(ustProviderInfo.getName(), this);
- addChild(ustComponent);
- ustComponent.setUstProvider(ustProviderInfo);
- }
- }
-
- /**
- * Returns whether the kernel provider is available or not
- * @return <code>true</code> if kernel provide is available or <code>false</code>
- */
- public boolean hasKernelProvider() {
- List<ITraceControlComponent> kernelList = getChildren(KernelProviderComponent.class);
- return !kernelList.isEmpty();
- }
-
- /**
- * Returns if node supports filtering of events
- * @return <code>true</code> if node supports filtering else <code>false</code>
- */
- public boolean isEventFilteringSupported() {
- return ((TargetNodeComponent)getParent()).isEventFilteringSupported();
- }
-}
-
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Marc-Andre Laperle - Support for opening a live session
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceSessionPropertySource;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Implementation of the trace session component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceSessionComponent extends TraceControlComponent {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component (inactive state).
- */
- public static final String TRACE_SESSION_ICON_FILE_INACTIVE = "icons/obj16/session_inactive.gif"; //$NON-NLS-1$
- /**
- * Path to icon file for this component (active state).
- */
- public static final String TRACE_SESSION_ICON_FILE_ACTIVE = "icons/obj16/session_active.gif"; //$NON-NLS-1$
- /**
- * Path to icon file for this component (destroyed state).
- */
- public static final String TRACE_SESSION_ICON_FILE_DESTROYED = "icons/obj16/session_destroyed.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The session information.
- */
- private ISessionInfo fSessionInfo = null;
- /**
- * A flag to indicate if session has been destroyed.
- */
- private boolean fIsDestroyed = false;
- /**
- * The image to be displayed in state active.
- */
- private Image fActiveImage = null;
- /**
- * The image to be displayed in state destroyed
- */
- private Image fDestroyedImage = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceSessionComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_SESSION_ICON_FILE_INACTIVE);
- setToolTip(Messages.TraceControl_SessionDisplayName);
- fSessionInfo = new SessionInfo(name);
- fActiveImage = Activator.getDefault().loadIcon(TRACE_SESSION_ICON_FILE_ACTIVE);
- fDestroyedImage = Activator.getDefault().loadIcon(TRACE_SESSION_ICON_FILE_DESTROYED);
- }
-
- /**
- * Constructor
- *
- * @param sessionInfo
- * the session information used to create the session
- * @param parent
- * the parent of this component.
- */
- public TraceSessionComponent(ISessionInfo sessionInfo, ITraceControlComponent parent) {
- this(sessionInfo.getName(), parent);
- copyLiveInfo(sessionInfo);
- }
-
- private void copyLiveInfo(ISessionInfo sessionInfo) {
- // Since we can't retrieve this information from the node, we copy it over
- fSessionInfo.setLive(sessionInfo.isLive());
- fSessionInfo.setLiveDelay(sessionInfo.getLiveDelay());
- fSessionInfo.setLivePort(sessionInfo.getLivePort());
- fSessionInfo.setLiveUrl(sessionInfo.getLiveUrl());
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public Image getImage() {
- if (fIsDestroyed) {
- return fDestroyedImage;
- }
-
- if (fSessionInfo.getSessionState() == TraceSessionState.INACTIVE) {
- return super.getImage();
- }
-
- return fActiveImage;
- }
-
- /**
- * @return the whether the session is destroyed or not.
- */
- public boolean isDestroyed() {
- return fIsDestroyed;
- }
-
- /**
- * Sets the session destroyed state to the given value.
- * @param destroyed - value to set.
- */
- public void setDestroyed(boolean destroyed) {
- fIsDestroyed = destroyed;
- }
-
- /**
- * @return the session state state (active or inactive).
- */
- public TraceSessionState getSessionState() {
- return fSessionInfo.getSessionState();
- }
-
- /**
- * Sets the session state to the given value.
- * @param state - state to set.
- */
- public void setSessionState(TraceSessionState state) {
- fSessionInfo.setSessionState(state);
- }
-
- /**
- * Sets the event state to the value specified by the given name.
- * @param stateName - state to set.
- */
- public void setSessionState(String stateName) {
- fSessionInfo.setSessionState(stateName);
- }
-
- /**
- * @return path string where session is located.
- */
- public String getSessionPath() {
- return fSessionInfo.getSessionPath();
- }
-
- /**
- * Sets the path string (where session is located) to the given value.
- * @param sessionPath - session path to set.
- */
- public void setSessionPath(String sessionPath) {
- fSessionInfo.setSessionPath(sessionPath);
- }
-
- /**
- * Returns if session is streamed over network
- * @return <code>true</code> if streamed over network else <code>false</code>
- */
- public boolean isStreamedTrace() {
- return fSessionInfo.isStreamedTrace();
- }
-
- /**
- * Sets whether the trace is streamed or not
- * @param isStreamedTrace <code>true</code> if streamed over network else <code>false</code>
- */
- public void setIsStreamedTrace(boolean isStreamedTrace) {
- fSessionInfo.setStreamedTrace(isStreamedTrace);
- }
-
- /**
- * Returns whether the session is snapshot session or not
- * @return <code>true</code> if it is snapshot session else <code>false</code>
- */
- public boolean isSnapshotSession() {
- return fSessionInfo.isSnapshotSession();
- }
-
- /**
- * Gets the snapshot information if available whether the session is a snapshot session or not
- * @return the snapshot information or null if it is not a snapshot session
- */
- public ISnapshotInfo getSnapshotInfo() {
- return fSessionInfo.getSnapshotInfo();
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new TraceSessionPropertySource(this);
- }
- return null;
- }
-
- /**
- * @return all available domains of this session.
- */
- public TraceDomainComponent[] getDomains() {
- List<ITraceControlComponent> sessions = getChildren(TraceDomainComponent.class);
- return sessions.toArray(new TraceDomainComponent[sessions.size()]);
- }
-
- /**
- * @return the parent target node
- */
- public TargetNodeComponent getTargetNode() {
- return ((TraceSessionGroup)getParent()).getTargetNode();
- }
-
- /**
- * Returns whether the kernel provider is available or not
- * @return <code>true</code> if kernel provide is available or <code>false</code>
- */
- public boolean hasKernelProvider() {
- List<ITraceControlComponent> providerGroups = getTargetNode().getChildren(TraceProviderGroup.class);
- return (!providerGroups.isEmpty() ? ((TraceProviderGroup) providerGroups.get(0)).hasKernelProvider() : false);
- }
-
- /**
- * Returns if node supports filtering of events
- * @return <code>true</code> if node supports filtering else <code>false</code>
- */
- public boolean isEventFilteringSupported() {
- return ((TargetNodeComponent)getParent().getParent()).isEventFilteringSupported();
- }
-
- /**
- * Returns if node supports snapshots or not
- * @return <code>true</code> if it supports snapshots else <code>false</code>
- *
- */
- public boolean isSnapshotSupported() {
- return ((TargetNodeComponent)getParent().getParent()).isSnapshotSupported();
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Retrieves the session configuration from the node.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void getConfigurationFromNode(IProgressMonitor monitor)
- throws ExecutionException {
- removeAllChildren();
- ISessionInfo oldSessionInfo = fSessionInfo;
- fSessionInfo = getControlService().getSession(getName(), monitor);
- copyLiveInfo(oldSessionInfo);
-
- IDomainInfo[] domains = fSessionInfo.getDomains();
- for (int i = 0; i < domains.length; i++) {
- TraceDomainComponent domainComponent = new TraceDomainComponent(
- domains[i].getName(), this);
- addChild(domainComponent);
- domainComponent.setDomainInfo(domains[i]);
- }
- }
-
- /**
- * Starts the session.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void startSession(IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().startSession(getName(), monitor);
- }
-
- /**
- * Starts the session.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void stopSession(IProgressMonitor monitor) throws ExecutionException {
- getControlService().stopSession(getName(), monitor);
- }
-
- /**
- * Enables channels with given names which are part of this domain. If a
- * given channel doesn't exists it creates a new channel with the given
- * parameters (or default values if given parameter is null).
- *
- * @param channelNames
- * - a list of channel names to enable on this domain
- * @param info
- * - channel information to set for the channel (use null for
- * default)
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableChannels(List<String> channelNames, IChannelInfo info,
- boolean isKernel, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableChannels(getName(), channelNames, isKernel,
- info, monitor);
- }
-
- /**
- * Enables a list of events with no additional parameters.
- *
- * @param eventNames
- * - a list of event names to enabled.
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableEvents(List<String> eventNames, boolean isKernel,
- String filterExpression, IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableEvents(getName(), null, eventNames, isKernel,
- filterExpression, monitor);
- }
-
- /**
- * Enables all syscalls (for kernel domain)
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableSyscalls(IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableSyscalls(getName(), null, monitor);
- }
-
- /**
- * Enables a dynamic probe (for kernel domain)
- *
- * @param eventName
- * - event name for probe
- * @param isFunction
- * - true for dynamic function entry/return probe else false
- * @param probe
- * - the actual probe
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableProbe(String eventName, boolean isFunction, String probe,
- IProgressMonitor monitor) throws ExecutionException {
- getControlService().enableProbe(getName(), null, eventName, isFunction,
- probe, monitor);
- }
-
- /**
- * Enables events using log level.
- *
- * @param eventName
- * - a event name
- * @param logLevelType
- * - a log level type
- * @param level
- * - a log level
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void enableLogLevel(String eventName, LogLevelType logLevelType,
- TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
- throws ExecutionException {
- getControlService().enableLogLevel(getName(), null, eventName,
- logLevelType, level, null, monitor);
- }
-
- /**
- * Gets all available contexts to be added to channels/events.
- *
- * @param monitor
- * The monitor that will indicate the progress
- * @return the list of available contexts
- * @throws ExecutionException
- * If the command fails
- */
- public List<String> getContextList(IProgressMonitor monitor)
- throws ExecutionException {
- return getControlService().getContextList(monitor);
- }
-
- /**
- * Records a snapshot.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void recordSnapshot(IProgressMonitor monitor) throws ExecutionException {
- getControlService().recordSnapshot(getName(), monitor);
- }
-
- /**
- * Returns if session is live.
- * @return <code>true</code> if session if live else <code>false</code>
- */
- public boolean isLiveTrace() {
- return fSessionInfo.isLive();
- }
-
- /**
- * Get the live URL.
- *
- * @return the live URL
- */
- public String getLiveUrl() {
- return fSessionInfo.getLiveUrl();
- }
-
- /**
- * Get the live port.
- *
- * @return the live port
- */
- public Integer getLivePort() {
- return fSessionInfo.getLivePort();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-
-/**
- * <p>
- * Implementation of the trace session group.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceSessionGroup extends TraceControlComponent {
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component.
- */
- public static final String TRACE_SESSIONS_ICON_FILE = "icons/obj16/sessions.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public TraceSessionGroup(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(TRACE_SESSIONS_ICON_FILE);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * @return the parent target node
- */
- public TargetNodeComponent getTargetNode() {
- return (TargetNodeComponent)getParent();
- }
-
- /**
- * Returns if node supports networks streaming or not
- * @return <code>true</code> if node supports filtering else <code>false</code>
- */
- public boolean isNetworkStreamingSupported() {
- return getTargetNode().isNetworkStreamingSupported();
- }
- /**
- * Returns if node supports snapshots or not
- * @return <code>true</code> if it supports snapshots else <code>false</code>
- *
- */ public boolean isSnapshotSupported() {
- return getTargetNode().isSnapshotSupported();
- }
-
- /**
- * Returns if node supports live or not
- *
- * @return <code>true</code> if it supports live else <code>false</code>
- */
- public boolean isLiveSupported() {
- return getTargetNode().isLiveSupported();
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Retrieves the sessions information from the node.
- *
- * @throws ExecutionException
- * If the command fails
- */
- public void getSessionsFromNode() throws ExecutionException {
- getSessionsFromNode(new NullProgressMonitor());
- }
-
- /**
- * Retrieves the sessions information from the node.
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void getSessionsFromNode(IProgressMonitor monitor)
- throws ExecutionException {
- String[] sessionNames = getControlService().getSessionNames(monitor);
- for (int i = 0; i < sessionNames.length; i++) {
- TraceSessionComponent session = new TraceSessionComponent(
- sessionNames[i], this);
- addChild(session);
- session.getConfigurationFromNode(monitor);
- }
- }
-
- /**
- * Creates a session with given session name and location.
- *
- * @param sessionInf
- * the session information used to create the session
- *
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void createSession(ISessionInfo sessionInf, IProgressMonitor monitor) throws ExecutionException {
- ISessionInfo sessionInfo = getControlService().createSession(sessionInf, monitor);
-
- if (sessionInfo != null) {
- TraceSessionComponent session = new TraceSessionComponent(sessionInfo, TraceSessionGroup.this);
- addChild(session);
- session.getConfigurationFromNode(monitor);
- }
- }
-
- /**
- * Command to execute a list of commands
- * @param monitor
- * - a progress monitor
- * @param commands
- * - a list of commands to execute
- * @throws ExecutionException
- * If the command fails
- */
- public void executeCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
- getControlService().runCommands(monitor, commands);
- getTargetNode().refresh();
- }
-
- /**
- * Destroys a session with given session name.
- *
- * @param session
- * - a session component to destroy
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- public void destroySession(TraceSessionComponent session,
- IProgressMonitor monitor) throws ExecutionException {
- getControlService().destroySession(session.getName(), monitor);
- session.removeAllChildren();
- removeChild(session);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.UstProviderPropertySource;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Implementation of the UST provider component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class UstProviderComponent extends TraceControlComponent {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Path to icon file for this component.
- */
- public static final String USTL_PROVIDER_ICON_FILE = "icons/obj16/targets.gif"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The UST provider information.
- */
- private IUstProviderInfo fProviderInfo = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param name - the name of the component.
- * @param parent - the parent of this component.
- */
- public UstProviderComponent(String name, ITraceControlComponent parent) {
- super(name, parent);
- setImage(USTL_PROVIDER_ICON_FILE);
- setToolTip(Messages.TraceControl_ProviderDisplayName);
- fProviderInfo = new UstProviderInfo(name);
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * Sets the UST provider information to the given value.
- * @param providerInfo - the provider information to set
- */
- public void setUstProvider(IUstProviderInfo providerInfo) {
- fProviderInfo = providerInfo;
- IBaseEventInfo[] events = providerInfo.getEvents();
- for (int i = 0; i < events.length; i++) {
- BaseEventComponent component = new BaseEventComponent(events[i].getName(), this);
- component.setEventInfo(events[i]);
- addChild(component);
- }
- setName(getName() + " [PID=" + fProviderInfo.getPid() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- /**
- * @return the process ID of the UST provider.
- */
- public int getPid() {
- return fProviderInfo.getPid();
- }
-
- /**
- * Sets the process ID of the UST provider to the given value.
- * @param pid - process ID to set
- */
- public void setPid(int pid) {
- fProviderInfo.setPid(pid);
- }
-
- @Override
- public Object getAdapter(Class adapter) {
- if (adapter == IPropertySource.class) {
- return new UstProviderPropertySource(this);
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;
-
-import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
-import org.eclipse.jface.preference.IPreferenceStore;
-
-/**
- * <p>
- * A class to initialize the preferences.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ControlPreferenceInitializer extends AbstractPreferenceInitializer {
-
- @Override
- public void initializeDefaultPreferences() {
- final IPreferenceStore store = ControlPreferences.getInstance().getPreferenceStore();
-
- //Set default User ID if none already stored in preferences
- store.setDefault(ControlPreferences.TRACE_CONTROL_TRACING_GROUP_PREF, ControlPreferences.TRACE_CONTROL_DEFAULT_TRACING_GROUP);
- store.setDefault(ControlPreferences.TRACE_CONTROL_LOG_APPEND_PREF, false);
- store.setDefault(ControlPreferences.TRACE_CONTROL_LOG_FILE_PATH_PREF, ControlPreferences.TRACE_CONTROL_DEFAULT_LOG_PATH);
- store.setDefault(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, false);
- store.setDefault(ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_PREF, ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_NONE);
- store.setDefault(ControlPreferences.TRACE_CONTROL_COMMAND_TIMEOUT_PREF, ControlPreferences.TRACE_CONTROL_DEFAULT_TIMEOUT_VALUE);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;
-
-import org.eclipse.jface.preference.BooleanFieldEditor;
-import org.eclipse.jface.preference.FieldEditor;
-import org.eclipse.jface.preference.FieldEditorPreferencePage;
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.jface.preference.IntegerFieldEditor;
-import org.eclipse.jface.preference.RadioGroupFieldEditor;
-import org.eclipse.jface.preference.StringFieldEditor;
-import org.eclipse.jface.util.PropertyChangeEvent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchPreferencePage;
-
-/**
- * <p>
- * Preference page implementation for configuring LTTng tracer control preferences.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ControlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private RadioGroupFieldEditor fVerboseLevel;
- private BooleanFieldEditor fIsAppend;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- */
- public ControlPreferencePage() {
- super(FieldEditorPreferencePage.GRID);
-
- // Set the preference store for the preference page.
- IPreferenceStore store = ControlPreferences.getInstance().getPreferenceStore();
- setPreferenceStore(store);
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void init(IWorkbench workbench) {
- }
-
- @Override
- protected void createFieldEditors() {
-
- StringFieldEditor tracingGroup = new StringFieldEditor(ControlPreferences.TRACE_CONTROL_TRACING_GROUP_PREF, Messages.TraceControl_TracingGroupPreference, getFieldEditorParent());
- addField(tracingGroup);
-
- BooleanFieldEditor logCommand = new BooleanFieldEditor(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, Messages.TraceControl_LoggingPreference, getFieldEditorParent());
- addField(logCommand);
-
- StringFieldEditor logfile = new StringFieldEditor(ControlPreferences.TRACE_CONTROL_LOG_FILE_PATH_PREF, Messages.TraceControl_LogfilePath, getFieldEditorParent());
- addField(logfile);
-
- fIsAppend = new BooleanFieldEditor(ControlPreferences.TRACE_CONTROL_LOG_APPEND_PREF, Messages.TraceControl_AppendLogfilePreference, getFieldEditorParent());
- addField(fIsAppend);
-
- fVerboseLevel = new RadioGroupFieldEditor (
- ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_PREF,
- Messages.TraceControl_VerboseLevelsPreference,
- 4,
- new String[][] {
- {
- Messages.TraceControl_VerboseLevelNonePreference,
- ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_NONE,
- },
- {
- Messages.TraceControl_VerboseLevelVerbosePreference,
- ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_VERBOSE
- },
- {
- Messages.TraceControl_VerboseLevelVeryVerbosePreference,
- ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_VERBOSE
- },
- {
- Messages.TraceControl_VerboseLevelVeryVeryVerbosePreference,
- ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE
- }
- },
- getFieldEditorParent(),
- true);
-
- addField(fVerboseLevel);
-
- Boolean enabled = ControlPreferences.getInstance().isLoggingEnabled();
- fVerboseLevel.setEnabled(enabled, getFieldEditorParent());
- fIsAppend.setEnabled(enabled, getFieldEditorParent());
- logfile.setEnabled(false, getFieldEditorParent());
-
- IntegerFieldEditor commandTimeout = new IntegerFieldEditor(ControlPreferences.TRACE_CONTROL_COMMAND_TIMEOUT_PREF, Messages.TraceControl_CommandTimeout, getFieldEditorParent());
- commandTimeout.setValidRange(ControlPreferences.TRACE_CONTROL_MIN_TIMEOUT_VALUE, ControlPreferences.TRACE_CONTROL_MAX_TIMEOUT_VALUE);
- addField(commandTimeout);
- }
-
- @Override
- public void propertyChange(PropertyChangeEvent event) {
-
- if (event.getProperty().equals(FieldEditor.VALUE)) {
- if (event.getSource() instanceof FieldEditor) {
- FieldEditor editor = (FieldEditor) event.getSource();
- if (editor.getPreferenceName().equals(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF)) {
- Boolean enabled = (Boolean)event.getNewValue();
- fVerboseLevel.setEnabled(enabled, getFieldEditorParent());
- fIsAppend.setEnabled(enabled, getFieldEditorParent());
- }
- }
- }
- super.propertyChange(event);
- }
-
- @Override
- protected void performDefaults() {
- super.performDefaults();
- fVerboseLevel.setEnabled(false, getFieldEditorParent());
- fIsAppend.setEnabled(false, getFieldEditorParent());
- }
-
- @Override
- public boolean performOk() {
- boolean ret = super.performOk();
- // open or close log file
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.init(ControlPreferences.getInstance().getLogfilePath(), ControlPreferences.getInstance().isAppend());
- } else {
- ControlCommandLogger.close();
- }
- return ret;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;
-
-import java.io.File;
-
-import org.eclipse.jface.preference.IPreferenceStore;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
-
-/**
- * <p>
- * Singleton class to access LTTng tracer control preferences.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class ControlPreferences {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Trace control log file
- */
- public static final String TRACE_CONTROL_LOG_FILENAME = "lttng_tracer_control.log"; //$NON-NLS-1$
-
- // Preference strings
- /**
- * The tracing group preference
- */
- public static final String TRACE_CONTROL_TRACING_GROUP_PREF = "trace.control.tracing.group"; //$NON-NLS-1$
- /**
- * The log commands preference
- */
- public static final String TRACE_CONTROL_LOG_COMMANDS_PREF = "trace.control.log.commands"; //$NON-NLS-1$
- /**
- * The log append preference
- */
- public static final String TRACE_CONTROL_LOG_APPEND_PREF = "trace.control.log.append"; //$NON-NLS-1$
- /**
- * The log file path preference
- */
- public static final String TRACE_CONTROL_LOG_FILE_PATH_PREF = "trace.control.log.path"; //$NON-NLS-1$
- /**
- * The verbose level preference
- */
- public static final String TRACE_CONTROL_VERBOSE_LEVEL_PREF = "trace.control.verbose.level"; //$NON-NLS-1$
- /**
- * The command time-out preference
- */
- public static final String TRACE_CONTROL_COMMAND_TIMEOUT_PREF = "trace.control.command.timeout"; //$NON-NLS-1$
- /**
- * The verbose level value for none
- */
- public static final String TRACE_CONTROL_VERBOSE_LEVEL_NONE = "trace.control.verbose.level.none"; //$NON-NLS-1$
- /**
- * The verbose level value for level 1 (-v)
- */
- public static final String TRACE_CONTROL_VERBOSE_LEVEL_VERBOSE = "trace.control.verbose.level.v"; //$NON-NLS-1$
- /**
- * The verbose level value for level 2 (-vv)
- */
- public static final String TRACE_CONTROL_VERBOSE_LEVEL_V_VERBOSE = "trace.control.verbose.level.vv"; //$NON-NLS-1$
- /**
- * The verbose level value for level 3 (-vvv)
- */
- public static final String TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE = "trace.control.verbose.level.vvv"; //$NON-NLS-1$
- /**
- * The default tracing group
- */
- public static final String TRACE_CONTROL_DEFAULT_TRACING_GROUP = "tracing"; //$NON-NLS-1$
- /**
- * The default tracing log file name with absolute path
- */
- public static final String TRACE_CONTROL_DEFAULT_LOG_PATH = System.getProperty("user.home") + File.separator + TRACE_CONTROL_LOG_FILENAME; //$NON-NLS-1$
- /**
- * Default timeout value used for executing commands, in seconds
- */
- public static final int TRACE_CONTROL_DEFAULT_TIMEOUT_VALUE = 15;
- /**
- * Minimum timeout value used for executing commands, in seconds
- */
- public static final int TRACE_CONTROL_MIN_TIMEOUT_VALUE = 5;
- /**
- * Maximum timeout value used for executing commands, in seconds
- */
- public static final int TRACE_CONTROL_MAX_TIMEOUT_VALUE = 600;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The trace control preferences singleton instance.
- */
- private static ControlPreferences fInstance = null;
- /**
- * The preference store reference
- */
- private IPreferenceStore fPreferenceStore = null;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
- /**
- * Private constructor
- */
- private ControlPreferences() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * Returns the trace control preferences singleton instance
- *
- * @return the trace control preferences singleton instance
- */
- public static synchronized ControlPreferences getInstance() {
- if (fInstance == null) {
- fInstance = new ControlPreferences();
- }
- return fInstance;
- }
-
- /**
- * @return the preference store
- */
- public IPreferenceStore getPreferenceStore() {
- return fPreferenceStore;
- }
-
- /**
- * @return true if tracing group is set to default
- */
- public boolean isDefaultTracingGroup() {
- return fPreferenceStore.getString(TRACE_CONTROL_TRACING_GROUP_PREF).equals(fPreferenceStore.getDefaultString(TRACE_CONTROL_TRACING_GROUP_PREF));
- }
-
- /**
- * @return value of tracing group preference
- */
- public String getTracingGroup() {
- return fPreferenceStore.getString(TRACE_CONTROL_TRACING_GROUP_PREF);
- }
-
- /**
- * @return whether is logging is enabled
- */
- public boolean isLoggingEnabled() {
- return fPreferenceStore.getBoolean(TRACE_CONTROL_LOG_COMMANDS_PREF);
- }
-
- /**
- * @return whether an existing log file will appended or not
- */
- public boolean isAppend() {
- return fPreferenceStore.getBoolean(ControlPreferences.TRACE_CONTROL_LOG_APPEND_PREF);
- }
-
- /**
- * @return verbose level preference
- */
- public String getVerboseLevel() {
- return fPreferenceStore.getString(TRACE_CONTROL_VERBOSE_LEVEL_PREF);
- }
-
- /**
- * @return absolute log file path
- */
- public String getLogfilePath() {
- return fPreferenceStore.getString(TRACE_CONTROL_LOG_FILE_PATH_PREF);
- }
-
- /**
- * @return command timeout value
- */
- public int getCommandTimeout() {
- return fPreferenceStore.getInt(TRACE_CONTROL_COMMAND_TIMEOUT_PREF);
- }
-
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Initializes the control preferences (e.g. enable open log file)
- *
- * @param preferenceStore
- * The preference store to assign
- */
- public void init(IPreferenceStore preferenceStore) {
- fPreferenceStore = preferenceStore;
-
- if (fPreferenceStore.getBoolean(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF)) {
- ControlCommandLogger.init(getLogfilePath(), isAppend());
- }
- }
-
- /**
- * Disposes any resource (e.g. close log file).
- */
- public void dispose() {
- ControlCommandLogger.close();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the base event component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class BaseEventPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * The base event 'name' property ID.
- */
- public static final String BASE_EVENT_NAME_PROPERTY_ID = "base.event.name"; //$NON-NLS-1$
- /**
- * The base event 'type' property ID.
- */
- public static final String BASE_EVENT_TYPE_PROPERTY_ID = "base.event.type"; //$NON-NLS-1$
- /**
- * The base event 'log level' property ID.
- */
- public static final String BASE_EVENT_LOGLEVEL_PROPERTY_ID = "base.event.loglevel"; //$NON-NLS-1$
- /**
- * The base event 'fields' property ID.
- */
- public static final String BASE_EVENT_FIELDS_PROPERTY_ID = "base.event.fields"; //$NON-NLS-1$
- /**
- * The base event 'name' property name.
- */
- public static final String BASE_EVENT_NAME_PROPERTY_NAME = Messages.TraceControl_EventNamePropertyName;
- /**
- * The base event 'type' property name.
- */
- public static final String BASE_EVENT_TYPE_PROPERTY_NAME = Messages.TraceControl_EventTypePropertyName;
- /**
- * The base event 'log level' property name.
- */
- public static final String BASE_EVENT_LOGLEVEL_PROPERTY_NAME = Messages.TraceControl_LogLevelPropertyName;
- /**
- * The base event 'fields' property name.
- */
- public static final String BASE_EVENT_FIELDS_PROPERTY_NAME = Messages.TraceControl_FieldsPropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The base event component which this property source is for.
- */
- private final BaseEventComponent fBaseEvent;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param component - the base event component
- */
- public BaseEventPropertySource(BaseEventComponent component) {
- fBaseEvent = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- List<IPropertyDescriptor> list = new ArrayList<> ();
- list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_NAME_PROPERTY_ID, BASE_EVENT_NAME_PROPERTY_NAME));
- list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_TYPE_PROPERTY_ID, BASE_EVENT_TYPE_PROPERTY_NAME));
- if (fBaseEvent.getLogLevel() != TraceLogLevel.LEVEL_UNKNOWN) {
- list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_LOGLEVEL_PROPERTY_ID, BASE_EVENT_LOGLEVEL_PROPERTY_NAME));
- }
- if (fBaseEvent.getFieldString() != null) {
- list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_FIELDS_PROPERTY_ID, BASE_EVENT_FIELDS_PROPERTY_NAME));
- }
- return list.toArray(new IPropertyDescriptor[list.size()]);
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(BASE_EVENT_NAME_PROPERTY_ID.equals(id)) {
- return fBaseEvent.getName();
- }
- if (BASE_EVENT_TYPE_PROPERTY_ID.equals(id)) {
- return fBaseEvent.getEventType().name();
- }
- if (BASE_EVENT_LOGLEVEL_PROPERTY_ID.equals(id)) {
- return fBaseEvent.getLogLevel().name();
- }
- if (BASE_EVENT_FIELDS_PROPERTY_ID.equals(id)) {
- return fBaseEvent.getFieldString();
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertySource;
-
-/**
- * <p>
- * Base property source implementation.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public abstract class BasePropertySource implements IPropertySource {
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Object getEditableValue() {
- return null;
- }
-
- @Override
- public abstract IPropertyDescriptor[] getPropertyDescriptors();
-
- @Override
- public abstract Object getPropertyValue(Object id);
-
- @Override
- public boolean isPropertySet(Object id) {
- return false;
- }
-
- @Override
- public void resetPropertyValue(Object id) {
- }
-
- @Override
- public void setPropertyValue(Object id, Object value) {
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the kernl provider component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class KernelProviderPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * The kernel provider 'name' property ID.
- */
- public static final String KERNEL_PROVIDER_NAME_PROPERTY_ID = "ust.provider.name"; //$NON-NLS-1$
- /**
- * The kernel provider 'name' property name.
- */
- public static final String KERNEL_PROVIDER_NAME_PROPERTY_NAME = Messages.TraceControl_ProviderNamePropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The kernel provider component which this property source is for.
- */
- private KernelProviderComponent fProvider;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param component - the kernel provider component
- */
- public KernelProviderPropertySource(KernelProviderComponent component) {
- fProvider = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return new IPropertyDescriptor[] {
- new ReadOnlyTextPropertyDescriptor(KERNEL_PROVIDER_NAME_PROPERTY_ID, KERNEL_PROVIDER_NAME_PROPERTY_NAME)};
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(KERNEL_PROVIDER_NAME_PROPERTY_ID.equals(id)) {
- return fProvider.getName();
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the target node component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TargetNodePropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The node name property ID.
- */
- public static final String TARGET_NODE_NAME_PROPERTY_ID = "target.node.name"; //$NON-NLS-1$
- /**
- * The node address property ID.
- */
- public static final String TARGET_NODE_ADDRESS_PROPERTY_ID = "target.node.address"; //$NON-NLS-1$
- /**
- * The state property ID.
- */
- public static final String TARGET_NODE_STATE_PROPERTY_ID = "target.node.state"; //$NON-NLS-1$
- /**
- * The node version property ID.
- */
- public static final String TARGET_NODE_VERSION_PROPERTY_ID = "target.node.version"; //$NON-NLS-1$
-
- /**
- * The node name property name.
- */
- public static final String TARGET_NODE_NAME_PROPERTY_NAME = Messages.TraceControl_HostNamePropertyName;
- /**
- * The node address property name.
- */
- public static final String TARGET_NODE_ADDRESS_PROPERTY_NAME = Messages.TraceControl_HostAddressPropertyName;
- /**
- * The state address property name.
- */
- public static final String TARGET_NODE_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
- /**
- * The node version property name.
- */
- public static final String TARGET_NODE_VERSION_PROPERTY_NAME = Messages.TraceControl_VersionPropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The node component which this property source is for.
- */
- private final TargetNodeComponent fTargetNode;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param component - the node component
- */
- public TargetNodePropertySource(TargetNodeComponent component) {
- fTargetNode = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return new IPropertyDescriptor[] {
- new ReadOnlyTextPropertyDescriptor(TARGET_NODE_NAME_PROPERTY_ID, TARGET_NODE_NAME_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TARGET_NODE_ADDRESS_PROPERTY_ID, TARGET_NODE_ADDRESS_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TARGET_NODE_STATE_PROPERTY_ID, TARGET_NODE_STATE_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TARGET_NODE_VERSION_PROPERTY_ID, TARGET_NODE_VERSION_PROPERTY_NAME)};
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(TARGET_NODE_NAME_PROPERTY_ID.equals(id)) {
- return fTargetNode.getName();
- }
- if (TARGET_NODE_ADDRESS_PROPERTY_ID.equals(id)) {
- return fTargetNode.getHostName();
- }
- if (TARGET_NODE_STATE_PROPERTY_ID.equals(id)) {
- return fTargetNode.getTargetNodeState().name();
- }
- if (TARGET_NODE_VERSION_PROPERTY_ID.equals(id)) {
- return fTargetNode.getNodeVersion();
- }
- return null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the trace channel component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceChannelPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The trace channel 'name' property ID.
- */
- public static final String TRACE_CHANNEL_NAME_PROPERTY_ID = "trace.channel.name"; //$NON-NLS-1$
- /**
- * The trace channel 'state' ID.
- */
- public static final String TRACE_CHANNEL_STATE_PROPERTY_ID = "trace.channel.state"; //$NON-NLS-1$
- /**
- * The trace channel 'overwrite mode' property ID.
- */
- public static final String TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID = "trace.channel.overwrite.mode"; //$NON-NLS-1$
- /**
- * The trace channel 'sub-buffer size' property ID.
- */
- public static final String TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID = "trace.channel.subbuffer.size"; //$NON-NLS-1$
- /**
- * The trace channel 'number of sub-buffers' property ID.
- */
- public static final String TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID = "trace.channel.no.subbuffers"; //$NON-NLS-1$
- /**
- * The trace channel 'switch timer interval' property ID.
- */
- public static final String TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID = "trace.channel.switch.timer"; //$NON-NLS-1$
- /**
- * The trace channel 'read timer interval' property ID.
- */
- public static final String TRACE_CHANNEL_READ_TIMER_PROPERTY_ID = "trace.channel.read.timer"; //$NON-NLS-1$
- /**
- * The trace channel 'output type' property ID.
- */
- public static final String TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID = "trace.channel.output.type"; //$NON-NLS-1$
- /**
- * The trace channel 'name' property name.
- */
- public static final String TRACE_CHANNEL_NAME_PROPERTY_NAME = Messages.TraceControl_ChannelNamePropertyName;
- /**
- * The trace channel 'state' property name.
- */
- public static final String TRACE_CHANNEL_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
- /**
- * The trace channel 'overwrite mode' property name.
- */
- public static final String TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_NAME = Messages.TraceControl_OverwriteModePropertyName;
- /**
- * The trace channel 'sub-buffer size' property name.
- */
- public static final String TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_NAME = Messages.TraceControl_SubBufferSizePropertyName;
- /**
- * The trace channel 'sub-buffer size' property name.
- */
- public static final String TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_NAME = Messages.TraceControl_NbSubBuffersPropertyName;
- /**
- * The trace channel 'switch timer interval' property name.
- */
- public static final String TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_NAME = Messages.TraceControl_SwitchTimerPropertyName;
- /**
- * The trace channel 'read timer interval' property name.
- */
- public static final String TRACE_CHANNEL_READ_TIMER_PROPERTY_NAME = Messages.TraceControl_ReadTimerPropertyName;
- /**
- * The trace channel 'output type' property name.
- */
- public static final String TRACE_CHANNEL_OUTPUT_TYPEPROPERTY_NAME = Messages.TraceControl_OutputTypePropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The channel component which this property source is for.
- */
- private final TraceChannelComponent fChannel;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
- /**
- * Constructor
- * @param component - the channel component
- */
- public TraceChannelPropertySource(TraceChannelComponent component) {
- fChannel = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return new IPropertyDescriptor[] {
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_NAME_PROPERTY_ID, TRACE_CHANNEL_NAME_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_STATE_PROPERTY_ID, TRACE_CHANNEL_STATE_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID, TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID, TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID, TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID, TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_READ_TIMER_PROPERTY_ID, TRACE_CHANNEL_READ_TIMER_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID, TRACE_CHANNEL_OUTPUT_TYPEPROPERTY_NAME)};
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(TRACE_CHANNEL_NAME_PROPERTY_ID.equals(id)) {
- return fChannel.getName();
- }
- if (TRACE_CHANNEL_STATE_PROPERTY_ID.equals(id)) {
- return fChannel.getState().name();
- }
- if(TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID.equals(id)) {
- return String.valueOf(fChannel.isOverwriteMode());
- }
- if(TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID.equals(id)) {
- return String.valueOf(fChannel.getSubBufferSize());
- }
- if(TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID.equals(id)) {
- return String.valueOf(fChannel.getNumberOfSubBuffers());
- }
- if(TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID.equals(id)) {
- return String.valueOf(fChannel.getSwitchTimer());
- }
- if(TRACE_CHANNEL_READ_TIMER_PROPERTY_ID.equals(id)) {
- return String.valueOf(fChannel.getReadTimer());
- }
- if(TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID.equals(id)) {
- return fChannel.getOutputType().getInName();
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the trace domain component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceDomainPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * The trace domain 'name' property ID.
- */
- public static final String TRACE_DOMAIN_NAME_PROPERTY_ID = "trace.domain.name"; //$NON-NLS-1$
- /**
- * The trace domain 'name' property name.
- */
- public static final String TRACE_DOMAIN_NAME_PROPERTY_NAME = Messages.TraceControl_DomainNamePropertyName;
- /**
- * The domain 'buffer type' property ID.
- */
- public static final String BUFFER_TYPE_PROPERTY_ID = "trace.domain.bufferType"; //$NON-NLS-1$
- /**
- * The domain 'buffer type' property name.
- */
- public static final String BUFER_TYPE_PROPERTY_NAME = Messages.TraceControl_BufferTypePropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The trace domain component which this property source is for.
- */
- private final TraceDomainComponent fDomain;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param component - the trace domain component
- */
- public TraceDomainPropertySource(TraceDomainComponent component) {
- fDomain = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- if (fDomain.getBufferType() == BufferType.BUFFER_TYPE_UNKNOWN) {
- return new IPropertyDescriptor[] {
- new ReadOnlyTextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID, TRACE_DOMAIN_NAME_PROPERTY_NAME) };
- }
-
- return new IPropertyDescriptor[] {
- new ReadOnlyTextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID, TRACE_DOMAIN_NAME_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(BUFFER_TYPE_PROPERTY_ID, BUFER_TYPE_PROPERTY_NAME) };
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(BUFFER_TYPE_PROPERTY_ID.equals(id)){
- return fDomain.getBufferType().getInName();
- }
-
- if(TRACE_DOMAIN_NAME_PROPERTY_ID.equals(id)) {
- return fDomain.getName();
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the trace event component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceEventPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The trace event 'name' property ID.
- */
- public static final String TRACE_EVENT_NAME_PROPERTY_ID = "trace.event.name"; //$NON-NLS-1$
- /**
- * The trace event 'type' property ID.
- */
- public static final String TRACE_EVENT_TYPE_PROPERTY_ID = "trace.event.type"; //$NON-NLS-1$
- /**
- * The trace event 'log level' property ID.
- */
- public static final String TRACE_EVENT_LOGLEVEL_PROPERTY_ID = "trace.event.loglevel"; //$NON-NLS-1$
- /**
- * The trace event 'state' property ID.
- */
- public static final String TRACE_EVENT_STATE_PROPERTY_ID = "trace.event.state"; //$NON-NLS-1$
- /**
- * The trace event 'filter' property ID.
- */
- public static final String TRACE_EVENT_FILTER_PROPERTY_ID = "trace.event.filter"; //$NON-NLS-1$
-
- /**
- * The trace event 'name' property name.
- */
- public static final String TRACE_EVENT_NAME_PROPERTY_NAME = Messages.TraceControl_EventNamePropertyName;
- /**
- * The trace event 'type' property name.
- */
- public static final String TRACE_EVENT_TYPE_PROPERTY_NAME = Messages.TraceControl_EventTypePropertyName;
- /**
- * The trace event 'log level' property name.
- */
- public static final String TRACE_EVENT_LOGLEVEL_PROPERTY_NAME = Messages.TraceControl_LogLevelPropertyName;
- /**
- * The trace event 'state' property name.
- */
- public static final String TRACE_EVENT_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
- /**
- * The trace event 'filter' property name.
- */
- public static final String TRACE_EVENT_FILTER_PROPERTY_NAME = Messages.TraceControl_FilterPropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The event component which this property source is for.
- */
- protected final TraceEventComponent fEvent;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param component - the base event component
- */
- public TraceEventPropertySource(TraceEventComponent component) {
- fEvent = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- List<IPropertyDescriptor> list = new ArrayList<> ();
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_NAME_PROPERTY_ID, TRACE_EVENT_NAME_PROPERTY_NAME));
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_TYPE_PROPERTY_ID, TRACE_EVENT_TYPE_PROPERTY_NAME));
- list.add( new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_STATE_PROPERTY_ID, TRACE_EVENT_STATE_PROPERTY_NAME));
- if (fEvent.getLogLevel() != TraceLogLevel.LEVEL_UNKNOWN) {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_LOGLEVEL_PROPERTY_ID, TRACE_EVENT_LOGLEVEL_PROPERTY_NAME));
- }
- if (fEvent.getFilterExpression() != null) {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_FILTER_PROPERTY_ID, TRACE_EVENT_FILTER_PROPERTY_NAME));
- }
- return list.toArray(new IPropertyDescriptor[list.size()]);
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(TRACE_EVENT_NAME_PROPERTY_ID.equals(id)) {
- return fEvent.getName();
- }
- if (TRACE_EVENT_TYPE_PROPERTY_ID.equals(id)) {
- return fEvent.getEventType().name();
- }
- if (TRACE_EVENT_LOGLEVEL_PROPERTY_ID.equals(id)) {
- StringBuffer buffer = new StringBuffer();
- if (fEvent.getLogLevelType() != LogLevelType.LOGLEVEL_NONE) {
- buffer.append(fEvent.getLogLevelType().getShortName()).append(' ');
- }
- buffer.append(fEvent.getLogLevel().name());
- return buffer.toString();
- }
- if (TRACE_EVENT_STATE_PROPERTY_ID.equals(id)) {
- return fEvent.getState().name();
- }
- if (TRACE_EVENT_FILTER_PROPERTY_ID.equals(id)) {
- return fEvent.getFilterExpression();
- }
-
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the trace probe event component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceProbeEventPropertySource extends TraceEventPropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The trace event 'probe address' property ID.
- */
- public static final String TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID = "trace.event.probe.address"; //$NON-NLS-1$
- /**
- * The trace event 'probe offset' property ID.
- */
- public static final String TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID = "trace.event.probe.offset"; //$NON-NLS-1$
- /**
- * The trace event 'probe symbol' property ID.
- */
- public static final String TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID = "trace.event.probe.symbol"; //$NON-NLS-1$
- /**
- * The trace event 'probe address' property name.
- */
- public static final String TRACE_EVENT_PROBE_ADDRESS_PROPERTY_NAME = Messages.TraceControl_ProbeAddressPropertyName;
- /**
- * The trace event 'probe offset' property ID.
- */
- public static final String TRACE_EVENT_PROBE_OFFSET_PROPERTY_NAME = Messages.TraceControl_ProbeOffsetPropertyName;
- /**
- * The trace event 'probe symbol' property ID.
- */
- public static final String TRACE_EVENT_PROBE_SYMBOL_PROPERTY_NAME = Messages.TraceControl_ProbeSymbolPropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param component
- * A trace event component
- */
- public TraceProbeEventPropertySource(TraceEventComponent component) {
- super(component);
- if (component.getClass() != TraceProbeEventComponent.class) {
- throw new IllegalArgumentException("Invalid type passed. Only class of type TraceProbeEventComponent allowed:\n" + component.getClass()); //$NON-NLS-1$
- }
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- IPropertyDescriptor[] superProperties = super.getPropertyDescriptors();
-
- List<IPropertyDescriptor> superList = Arrays.asList(superProperties);
- ArrayList<IPropertyDescriptor> list = new ArrayList<>();
- list.addAll(superList);
-
- if (fEvent instanceof TraceProbeEventComponent) {
- TraceProbeEventComponent event = (TraceProbeEventComponent) fEvent;
- if (event.getAddress() != null) {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID, TRACE_EVENT_PROBE_ADDRESS_PROPERTY_NAME));
- }
-
- if (event.getOffset() != null) {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID, TRACE_EVENT_PROBE_OFFSET_PROPERTY_NAME));
- }
-
- if (event.getSymbol() != null) {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID, TRACE_EVENT_PROBE_SYMBOL_PROPERTY_NAME));
- }
- }
- return list.toArray(new IPropertyDescriptor[list.size()]);
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID.equals(id)) {
- return ((TraceProbeEventComponent)fEvent).getAddress();
- }
- if (TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID.equals(id)) {
- return ((TraceProbeEventComponent)fEvent).getOffset();
- }
- if (TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID.equals(id)) {
- return ((TraceProbeEventComponent)fEvent).getSymbol();
- }
- return super.getPropertyValue(id);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the trace session component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class TraceSessionPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The trace session name property ID.
- */
- public static final String TRACE_SESSION_NAME_PROPERTY_ID = "trace.session.name"; //$NON-NLS-1$
- /**
- * The trace session path property ID.
- */
- public static final String TRACE_SESSION_PATH_PROPERTY_ID = "trace.session.path"; //$NON-NLS-1$
- /**
- * The trace session state ID.
- */
- public static final String TRACE_SESSION_STATE_PROPERTY_ID = "trace.session.state"; //$NON-NLS-1$
- /**
- * The trace snapshot path property ID.
- */
- public static final String TRACE_SNAPSHOT_PATH_PROPERTY_ID = "trace.snapshot.path"; //$NON-NLS-1$
- /**
- * The snapshot name property.
- */
- public static final String TRACE_SNAPSHOT_NAME_PROPERTY_ID = "trace.snapshot.name"; //$NON-NLS-1$
- /**
- * The snapshot ID property.
- */
- public static final String TRACE_SNAPSHOT_ID_PROPERTY_ID = "trace.snapshot.id"; //$NON-NLS-1$
-
- /**
- * The trace session name property name.
- */
- public static final String TRACE_SESSION_NAME_PROPERTY_NAME = Messages.TraceControl_SessionNamePropertyName;
- /**
- * The trace session path property name.
- */
- public static final String TRACE_SESSION_PATH_PROPERTY_NAME = Messages.TraceControl_SessionPathPropertyName;
- /**
- * The trace session state property name.
- */
- public static final String TRACE_SESSION_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
- /**
- * The snapshot path property name.
- */
- public static final String TRACE_SNAPSHOT_PATH_PROPERTY_NAME = Messages.TraceControl_SnapshotPathPropertyName;
- /**
- * The trace snapshot name property name.
- */
- public static final String TRACE_SNAPSHOT_NAME_PROPERTY_NAME = Messages.TraceControl_SnapshotNamePropertyName;
- /**
- * The trace snapshot ID property name.
- */
- public static final String TRACE_SNAPSHOT_ID_PROPERTY_NAME = Messages.TraceControl_SnapshotIdPropertyName;
-
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The session component which this property source is for.
- */
- private final TraceSessionComponent fSession;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param component - the session component
- */
- public TraceSessionPropertySource(TraceSessionComponent component) {
- fSession = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- List<IPropertyDescriptor> list = new ArrayList<>();
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_NAME_PROPERTY_ID, TRACE_SESSION_NAME_PROPERTY_NAME));
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_STATE_PROPERTY_ID, TRACE_SESSION_STATE_PROPERTY_NAME));
- if (fSession.isSnapshotSession()) {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_NAME_PROPERTY_ID, TRACE_SNAPSHOT_NAME_PROPERTY_NAME));
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_PATH_PROPERTY_ID, TRACE_SNAPSHOT_PATH_PROPERTY_NAME));
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_ID_PROPERTY_ID, TRACE_SNAPSHOT_ID_PROPERTY_NAME));
- } else {
- list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_PATH_PROPERTY_ID, TRACE_SESSION_PATH_PROPERTY_NAME));
- }
- return(list.toArray(new IPropertyDescriptor[list.size()]));
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(TRACE_SESSION_NAME_PROPERTY_ID.equals(id)) {
- return fSession.getName();
- }
- if(TRACE_SESSION_PATH_PROPERTY_ID.equals(id)) {
- return fSession.getSessionPath();
- }
- if (TRACE_SESSION_STATE_PROPERTY_ID.equals(id)) {
- return fSession.getSessionState().name();
- }
- if (TRACE_SNAPSHOT_PATH_PROPERTY_ID.equals(id)) {
- return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : ""); //$NON-NLS-1$
- }
- if (TRACE_SNAPSHOT_NAME_PROPERTY_ID.equals(id)) {
- return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getName() : ""); //$NON-NLS-1$
- }
- if (TRACE_SNAPSHOT_ID_PROPERTY_ID.equals(id)) {
- return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getId() : ""); //$NON-NLS-1$
- }
- return null;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
-import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
-import org.eclipse.ui.views.properties.IPropertyDescriptor;
-
-/**
- * <p>
- * Property source implementation for the UST provider component.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class UstProviderPropertySource extends BasePropertySource {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * The UST provider 'name' property ID.
- */
- public static final String UST_PROVIDER_NAME_PROPERTY_ID = "ust.provider.name"; //$NON-NLS-1$
- /**
- * The UST provider 'PID' property ID.
- */
- public static final String UST_PROVIDER_PID_PROPERTY_ID = "ust.provider.pid"; //$NON-NLS-1$
- /**
- * The UST provider 'name' property name.
- */
- public static final String UST_PROVIDER_NAME_PROPERTY_NAME = Messages.TraceControl_ProviderNamePropertyName;
- /**
- * The UST provider 'type' property name.
- */
- public static final String UST_PROVIDER_PID_PROPERTY_NAME = Messages.TraceControl_ProcessIdPropertyName;
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The UST provider component which this property source is for.
- */
- private UstProviderComponent fUstProvider;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- * @param component - the UST provider component
- */
- public UstProviderPropertySource(UstProviderComponent component) {
- fUstProvider = component;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IPropertyDescriptor[] getPropertyDescriptors() {
- return new IPropertyDescriptor[] {
- new ReadOnlyTextPropertyDescriptor(UST_PROVIDER_NAME_PROPERTY_ID, UST_PROVIDER_NAME_PROPERTY_NAME),
- new ReadOnlyTextPropertyDescriptor(UST_PROVIDER_PID_PROPERTY_ID, UST_PROVIDER_PID_PROPERTY_NAME)};
- }
-
- @Override
- public Object getPropertyValue(Object id) {
- if(UST_PROVIDER_NAME_PROPERTY_ID.equals(id)) {
- return fUstProvider.getName();
- }
- if (UST_PROVIDER_PID_PROPERTY_ID.equals(id)) {
- return String.valueOf(fUstProvider.getPid());
- }
- return null;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
-
-import java.util.Arrays;
-
-/**
- * <p>
- * Class containing command result of remote command execution.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class CommandResult implements ICommandResult {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The result of the command. 0 if successful else > 0
- */
- private int fResult;
-
- /**
- * The output as String array.
- */
- private String[] fOutput = new String[0];
- private String[] fErrorOutput = new String[0];
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param result
- * The result of the command
- * @param output
- * The output, as an array of strings
- * @param errorOutput
- * THe error output as an array of strings
- */
- public CommandResult(int result, String[] output, String[] errorOutput) {
- fResult = result;
- if (output != null) {
- fOutput = Arrays.copyOf(output, output.length);
- }
- if (errorOutput != null) {
- fErrorOutput = Arrays.copyOf(errorOutput, errorOutput.length);
- }
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public int getResult() {
- return fResult;
- }
-
- @Override
- public void setResult(int result) {
- fResult = result;
- }
-
- @Override
- public String[] getOutput() {
- return Arrays.copyOf(fOutput, fOutput.length);
- }
-
- @Override
- public void setOutput(String[] output) {
- fOutput = new String[0];
- if (output != null) {
- fOutput = Arrays.copyOf(output, output.length);
- }
- }
-
- @Override
- public String[] getErrorOutput() {
- return Arrays.copyOf(fErrorOutput, fErrorOutput.length);
- }
-
- @Override
- public void setErrorOutput(String[] output) {
- fErrorOutput = new String[0];
- if (output != null) {
- fErrorOutput = Arrays.copyOf(output, output.length);
- }
- }
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Patrick Tasse - Initial API and implementation
- * Bernd Hufmann - Updated using Executor Framework
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Random;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
-import org.eclipse.rse.services.shells.HostShellProcessAdapter;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-
-/**
- * <p>
- * Implementation of remote command execution using RSE's shell service.
- * </p>
- *
- * @author Patrick Tasse
- * @author Bernd Hufmann
- */
-public class CommandShell implements ICommandShell {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /** Sub-string to be echo'ed when running command in shell, used to indicate that the command has finished running */
- public static final String DONE_MARKUP_STRING = "--RSE:donedonedone:--"; //$NON-NLS-1$
-
- /** Sub-string to be echoed when running a command in shell. */
- public static final String BEGIN_END_TAG = "BEGIN-END-TAG:"; //$NON-NLS-1$
-
- /** Command delimiter for shell */
- public static final String CMD_DELIMITER = "\n"; //$NON-NLS-1$
-
- /** Shell "echo" command */
- public static final String SHELL_ECHO_CMD = " echo "; //$NON-NLS-1$
-
- /** Default command separator */
- public static final char CMD_SEPARATOR = ';';
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- private IRemoteSystemProxy fProxy = null;
- private IHostShell fHostShell = null;
- private BufferedReader fInputBufferReader = null;
- private BufferedReader fErrorBufferReader = null;
- private final ExecutorService fExecutor = Executors.newFixedThreadPool(1);
- private boolean fIsConnected = false;
- private final Random fRandom = new Random(System.currentTimeMillis());
- private int fReturnValue;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Create a new command shell
- *
- * @param proxy
- * The RSE proxy for this shell
- */
- public CommandShell(IRemoteSystemProxy proxy) {
- fProxy = proxy;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public void connect() throws ExecutionException {
- IShellService shellService = fProxy.getShellService();
- Process p = null;
- try {
- String[] env = new String[0];
-
- if (fProxy.isLocal()) {
- env = shellService.getHostEnvironment();
- }
-
- fHostShell = shellService.launchShell("", env, new NullProgressMonitor()); //$NON-NLS-1$
- p = new HostShellProcessAdapter(fHostShell);
- } catch (Exception e) {
- throw new ExecutionException(Messages.TraceControl_CommandShellError, e);
- }
- fInputBufferReader = new BufferedReader(new InputStreamReader(p.getInputStream()));
- fErrorBufferReader = new BufferedReader(new InputStreamReader(p.getErrorStream()));
- fIsConnected = true;
- }
-
- @Override
- public void disconnect() {
- fIsConnected = false;
- try {
- fInputBufferReader.close();
- fErrorBufferReader.close();
- } catch (IOException e) {
- // ignore
- }
- }
-
- @Override
- public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
- return executeCommand(command, monitor, true);
- }
-
- @Override
- public ICommandResult executeCommand(final String command, final IProgressMonitor monitor, final boolean checkReturnValue) throws ExecutionException {
- if (fIsConnected) {
- FutureTask<CommandResult> future = new FutureTask<>(new Callable<CommandResult>() {
- @Override
- public CommandResult call() throws IOException, CancellationException {
- final ArrayList<String> result = new ArrayList<>();
- final ArrayList<String> errorResult = new ArrayList<>();
-
- synchronized (fHostShell) {
- // Initialize return value which will be updated in isAliasEchoResult()
- fReturnValue = 0;
-
- int startAlias = fRandom.nextInt();
- int endAlias = fRandom.nextInt();
- fHostShell.writeToShell(formatShellCommand(command, startAlias, endAlias));
-
- String nextLine;
- boolean isStartFound = false;
- while ((nextLine = fInputBufferReader.readLine()) != null) {
-
- if (monitor.isCanceled()) {
- flushInput();
- throw new CancellationException();
- }
-
- // check if line contains echoed start alias
- if (isAliasEchoResult(nextLine, startAlias, true)) {
- isStartFound = true;
- continue;
- }
-
- // check if line contains is the end mark-up. This will retrieve also
- // the return value of the actual command.
- if (isAliasEchoResult(nextLine, endAlias, false)) {
- break;
- }
-
- // Ignore line if
- // 1) start hasn't been found or
- // 2) line is an echo of the command or
- // 3) line is an echo of the end mark-up
- if (!isStartFound ||
- isCommandEcho(nextLine, command) ||
- nextLine.contains(getEchoResult(endAlias)))
- {
- continue;
- }
-
- // Now it's time add to the result
- result.add(nextLine);
- }
-
- // Read any left over output
- flushInput();
-
- // Read error stream output when command failed.
- if (fReturnValue != 0) {
- while(fErrorBufferReader.ready()) {
- if ((nextLine = fErrorBufferReader.readLine()) != null) {
- errorResult.add(nextLine);
- }
- }
- // Workaround if error stream is not available and stderr output is written
- // in standard output above. This is true for the SshTerminalShell implementation.
- if (errorResult.isEmpty()) {
- errorResult.addAll(result);
- }
- }
- }
- return new CommandResult(fReturnValue, result.toArray(new String[result.size()]), errorResult.toArray(new String[errorResult.size()]));
- }
- });
-
- fExecutor.execute(future);
-
- try {
- return future.get(ControlPreferences.getInstance().getCommandTimeout(), TimeUnit.SECONDS);
- } catch (java.util.concurrent.ExecutionException ex) {
- throw new ExecutionException(Messages.TraceControl_ExecutionFailure, ex);
- } catch (InterruptedException ex) {
- throw new ExecutionException(Messages.TraceControl_ExecutionCancelled, ex);
- } catch (TimeoutException ex) {
- throw new ExecutionException(Messages.TraceControl_ExecutionTimeout, ex);
- }
- }
- throw new ExecutionException(Messages.TraceControl_ShellNotConnected, null);
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
- /**
- * Flushes the buffer reader
- * @throws IOException
- */
- private void flushInput() throws IOException {
- char[] cbuf = new char[1];
- while (fInputBufferReader.ready()) {
- if (fInputBufferReader.read(cbuf, 0, 1) == -1) {
- break;
- }
- }
- }
-
- /**
- * Format the command to be sent into the shell command with start and end marker strings.
- * The start marker is need to know when the actual command output starts. The end marker
- * string is needed so we can tell that end of output has been reached.
- *
- * @param cmd The actual command
- * @param startAlias The command alias for start marker
- * @param endAlias The command alias for end marker
- * @return formatted command string
- */
- private static String formatShellCommand(String cmd, int startAlias, int endAlias) {
- if (cmd == null || cmd.equals("")) { //$NON-NLS-1$
- return cmd;
- }
- StringBuffer formattedCommand = new StringBuffer();
- // Make multi-line command.
- // Wrap actual command with start marker and end marker to wrap actual command.
- formattedCommand.append(getEchoCmd(startAlias));
- formattedCommand.append(CMD_DELIMITER);
- formattedCommand.append(cmd);
- formattedCommand.append(CMD_DELIMITER);
- formattedCommand.append(getEchoCmd(endAlias));
- formattedCommand.append(CMD_DELIMITER);
- return formattedCommand.toString();
- }
-
- /**
- * Creates a echo command line in the format: echo <start tag> <alias> <end tag> $?
- *
- * @param alias The command alias integer to be included in the echoed message.
- * @return the echo command line
- */
- private static String getEchoCmd(int alias) {
- return SHELL_ECHO_CMD + getEchoResult(alias) + "$?"; //$NON-NLS-1$
- }
-
- /**
- * Creates the expected result for a given command alias:
- * <start tag> <alias> <end tag> $?
- *
- * @param alias The command alias integer to be included in the echoed message.
- * @return the expected echo result
- */
- private static String getEchoResult(int alias) {
- return BEGIN_END_TAG + String.valueOf(alias) + DONE_MARKUP_STRING;
- }
-
- /**
- * Verifies if given command line contains a command alias echo result.
- *
- * @param line The output line to test.
- * @param alias The command alias
- * @param checkReturnValue <code>true</code> to retrieve command result (previous command) <code>false</code>
- * @return <code>true</code> if output line is a command alias echo result else <code>false</code>
- */
- private boolean isAliasEchoResult(String line, int alias, boolean checkReturnValue) {
- String expected = getEchoResult(alias);
- if (line.startsWith(expected)) {
- if (!checkReturnValue) {
- try {
- int k = Integer.valueOf(line.substring(expected.length()));
- fReturnValue = k;
- } catch (NumberFormatException e) {
- // do nothing
- }
- }
- return true;
- }
- int index = line.indexOf(expected);
- if ((index > 0) && (line.indexOf(SHELL_ECHO_CMD) == -1)) {
- return true;
- }
-
- return false;
- }
-
- /**
- * Verifies if output line is an echo of the given command line. If the
- * output line is longer then the maximum line lengths (e.g. for ssh), the
- * shell adds a line break character. This method takes this in
- * consideration by comparing the command line without any whitespaces.
- *
- * @param line
- * The output line to verify
- * @param cmd
- * The command executed
- * @return <code>true</code> if it's an echoed command line else
- * <code>false</code>
- */
- @SuppressWarnings("nls")
- private static boolean isCommandEcho(String line, String cmd) {
- String s1 = line.replaceAll("\\s","");
- String s2 = cmd.replaceAll("\\s","");
- s2 = s2.replaceAll("(\\*)", "(\\\\*)");
- String patternStr = ".*(" + s2 +")$";
- return s1.matches(patternStr);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- *********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
-
-/**
- * <p>
- * Interface for providing command execution result.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ICommandResult {
- /**
- * The result of the command.
- *
- * @return 0 if successful else >0
- */
- int getResult();
-
- /**
- * Sets the command result value.
- *
- * @param result
- * The integer result to set
- */
- void setResult(int result);
-
- /**
- * @return returns the command output.
- */
- String[] getOutput();
-
- /**
- * Sets the command output.
- *
- * @param output
- * The output (as an array of Strings) to assign
- */
- void setOutput(String[] output);
-
- /**
- * The error output of the command.
- *
- * @return returns the command error output.
- */
- String[] getErrorOutput();
-
- /**
- * Sets the command output.
- *
- * @param output
- * The output (as an array of Strings) to assign
- */
- void setErrorOutput(String[] output);
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-
-/**
- * <p>
- * Interface for a command shell implementation
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface ICommandShell {
-
- /**
- * Method to connect the command shell.
- *
- * @throws ExecutionException
- * If the command fails
- */
- void connect() throws ExecutionException;
-
- /**
- * Method to disconnect the command shell.
- */
- void disconnect();
-
- /**
- * Method to execute a command on the command shell.
- *
- * @param command
- * - the command to executed
- * @param monitor
- * - a progress monitor
- * @return the command result
- * @throws ExecutionException
- * If the command fails
- */
- ICommandResult executeCommand(String command,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Method to execute a command on the command shell.
- *
- * @param command
- * - the command to executed
- * @param monitor
- * - a progress monitor
- * @param checkReturnValue
- * - flag to indicate that the command result should be checked.
- * If false the command result will be always 0.
- * @return the command result
- * @throws ExecutionException
- * If the command fails
- */
- ICommandResult executeCommand(final String command,
- final IProgressMonitor monitor, final boolean checkReturnValue)
- throws ExecutionException;
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-
-/**
- * <p>
- * Remote System Proxy interface.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface IRemoteSystemProxy {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Invalid port number for IP based connections.
- */
- static final int INVALID_PORT_NUMBER = -1;
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
- /**
- * Find the first shell service.
- *
- * @return shell service object, or <code>null</code> if not found.
- */
- IShellService getShellService();
-
- /**
- * Find the first terminal service.
- *
- * @return shell service object, or <code>null</code> if not found.
- */
- ITerminalService getTerminalService();
-
- /**
- * Find the first IShellServiceSubSystem service.
- *
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- ISubSystem getShellServiceSubSystem();
-
- /**
- * Find the first ITerminalServiceSubSystem service.
- *
- * @return shell service subsystem, or <code>null</code> if not found.
- */
- ISubSystem getTerminalServiceSubSystem();
-
- /**
- * Finds the File Service Subsystem.
- *
- * @return file service subsystem, or <code>null</code> if not found.
- */
- IFileServiceSubSystem getFileServiceSubSystem();
-
- /**
- * @return port of IP connection to be used
- */
- int getPort();
-
- /**
- * Sets the port of the IP connection.
- * @param port - the IP port to set
- */
- void setPort(int port);
-
- /**
- * Connects the shell service sub system.
- *
- * @param callback
- * - call-back method being called when connection was finished
- * @throws ExecutionException
- * If the connection fails
- */
- void connect(IRSECallback callback) throws ExecutionException;
-
- /**
- * Disconnects from the shell service sub system.
- *
- * @throws ExecutionException
- * If the disconnect command fails
- */
- void disconnect() throws ExecutionException;
-
- /**
- * Creates a command shell.
- *
- * @return the command shell implementation
- * @throws ExecutionException
- * If the command fails
- */
- ICommandShell createCommandShell() throws ExecutionException;
-
- /**
- * Method to add a communication listener to the connector service defined
- * for the given connection.
- *
- * @param listener
- * - listener to add
- */
- void addCommunicationListener(ICommunicationsListener listener);
-
- /**
- * Method to remove a communication listener from the connector service
- * defined for the given connection.
- *
- * @param listener
- * - listener to remove
- */
- void removeCommunicationListener(ICommunicationsListener listener);
-
- /**
- * Checks whether the local host connector service is used or not.
- *
- * @return <code>true</code> if local connection else <false>
- *
- */
- public boolean isLocal();
-}
\ No newline at end of file
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.model.IRSECallback;
-import org.eclipse.rse.core.subsystems.ICommunicationsListener;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.IService;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.services.terminals.ITerminalService;
-import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
-
-/**
- * <p>
- * RemoteSystemProxy implementation.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class RemoteSystemProxy implements IRemoteSystemProxy {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- private final IHost fHost;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param host
- * The host of this proxy
- */
- public RemoteSystemProxy(IHost host) {
- fHost = host;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public IShellService getShellService() {
- ISubSystem ss = getShellServiceSubSystem();
- if (ss != null) {
- return (IShellService)ss.getSubSystemConfiguration().getService(fHost).getAdapter(IShellService.class);
- }
- return null;
- }
-
- @Override
- public ITerminalService getTerminalService() {
- ISubSystem ss = getTerminalServiceSubSystem();
- if (ss != null) {
- return (ITerminalService)ss.getSubSystemConfiguration().getService(fHost).getAdapter(ITerminalService.class);
- }
- return null;
- }
-
- @Override
- public ISubSystem getShellServiceSubSystem() {
- if (fHost == null) {
- return null;
- }
- ISubSystem[] subSystems = fHost.getSubSystems();
- IShellService ssvc = null;
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- IService svc = subSystems[i].getSubSystemConfiguration().getService(fHost);
- if (svc!=null) {
- ssvc = (IShellService)svc.getAdapter(IShellService.class);
- if (ssvc != null) {
- return subSystems[i];
- }
- }
- }
- return null;
- }
-
- @Override
- public ISubSystem getTerminalServiceSubSystem() {
- if (fHost == null) {
- return null;
- }
- ISubSystem[] subSystems = fHost.getSubSystems();
- ITerminalService ssvc = null;
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- IService svc = subSystems[i].getSubSystemConfiguration().getService(fHost);
- if (svc!=null) {
- ssvc = (ITerminalService)svc.getAdapter(ITerminalService.class);
- if (ssvc != null) {
- return subSystems[i];
- }
- }
- }
- return null;
- }
-
- @Override
- public IFileServiceSubSystem getFileServiceSubSystem() {
- if (fHost == null) {
- return null;
- }
- ISubSystem[] subSystems = fHost.getSubSystems();
- for (int i = 0; subSystems != null && i < subSystems.length; i++) {
- if (subSystems[i] instanceof IFileServiceSubSystem) {
- return (IFileServiceSubSystem)subSystems[i];
- }
- }
- return null;
- }
-
- @Override
- public int getPort() {
- if (getShellServiceSubSystem() != null) {
- return getShellServiceSubSystem().getConnectorService().getPort();
- }
- return IRemoteSystemProxy.INVALID_PORT_NUMBER;
- }
-
- @Override
- public void setPort(int port) {
- if ((getShellServiceSubSystem() != null) && (port > 0)) {
- getShellServiceSubSystem().getConnectorService().setPort(port);
- }
- }
-
- @Override
- public void connect(IRSECallback callback) throws ExecutionException {
- ISubSystem shellSubSystem = getShellServiceSubSystem();
- if (shellSubSystem != null) {
- if (!shellSubSystem.isConnected()) {
- try {
- shellSubSystem.connect(false, callback);
- } catch (OperationCanceledException e) {
- callback.done(Status.CANCEL_STATUS, null);
- }
- catch (Exception e) {
- throw new ExecutionException(e.toString(), e);
- }
- } else {
- callback.done(Status.OK_STATUS, null);
- }
- }
- }
-
- @Override
- public void disconnect() throws ExecutionException {
- ISubSystem shellSubSystem = getShellServiceSubSystem();
- if (shellSubSystem != null) {
- try {
- shellSubSystem.disconnect();
- } catch (Exception e) {
- throw new ExecutionException(e.toString(), e);
- }
- }
- }
-
- @Override
- public ICommandShell createCommandShell() throws ExecutionException {
- ICommandShell shell = new CommandShell(this);
- shell.connect();
- return shell;
- }
-
- @Override
- public void addCommunicationListener(ICommunicationsListener listener) {
- IConnectorService[] css = fHost.getConnectorServices();
- for (IConnectorService cs : css) {
- cs.addCommunicationsListener(listener);
- }
- }
-
- @Override
- public void removeCommunicationListener(ICommunicationsListener listener) {
- IConnectorService[] css = fHost.getConnectorServices();
- for (IConnectorService cs : css) {
- cs.removeCommunicationsListener(listener);
- }
- }
-
- @Override
- public boolean isLocal() {
- return fHost.getSystemType().isLocal();
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2013 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-
-
-/**
-* <p>
-* Interface for LTTng trace control command service.
-* </p>
-*
-* @author Bernd Hufmann
-*/
-public interface ILttngControlService {
-
- /**
- * @return the LTTng version object
- */
- LttngVersion getVersion();
-
- /**
- * @return the version string
- */
- String getVersionString();
-
- /**
- * Checks if given version is supported by this ILTTngControlService implementation.
- *
- * @param version The version to check
- * @return <code>true</code> if version is supported else <code>false</code>
- */
- boolean isVersionSupported(String version);
-
- /**
- * Retrieves the existing sessions names from the node.
- *
- * @param monitor
- * - a progress monitor
- * @return an array with session names.
- * @throws ExecutionException
- * If the command fails
- */
- String[] getSessionNames(IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Retrieves the session information with the given name the node.
- *
- * @param sessionName
- * - the session name
- * @param monitor
- * - a progress monitor
- * @return session information
- * @throws ExecutionException
- * If the command fails
- */
- ISessionInfo getSession(String sessionName, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Retrieves the snapshot output information from the node
- * @param sessionName
- * - the session name
- * @param monitor
- * - a progress monitor
- * @return snapshot output information
- * @throws ExecutionException
- * if command fails
- */
- ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Retrieves the kernel provider information (i.e. the kernel events)
- *
- * @param monitor
- * - a progress monitor
- * @return the list of existing kernel events.
- * @throws ExecutionException
- * If the command fails
- */
- List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Retrieves the UST provider information from the node.
- *
- * @return - the UST provider information.
- * @throws ExecutionException
- * If the command fails
- */
- public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
-
- /**
- * Retrieves the UST provider information from the node.
- *
- * @param monitor
- * - a progress monitor
- * @return the UST provider information.
- * @throws ExecutionException
- * If the command fails
- */
- List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Creates a session with given session name and location.
- *
- * @param sessionInfo
- * the session information used to create the session
- * @param monitor
- * - a progress monitor
- *
- * @return the session information
- * @throws ExecutionException
- * If the command fails
- */
- ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Destroys a session with given session name.
- *
- * @param sessionName
- * - a session name to destroy
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void destroySession(String sessionName, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Starts a session with given session name.
- *
- * @param sessionName
- * - a session name to start
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void startSession(String sessionName, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Stops a session with given session name.
- *
- * @param sessionName
- * - a session name to stop
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void stopSession(String sessionName, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Enables a list of channels for given session and given channel
- * information (configuration).
- *
- * @param sessionName
- * - a session name to create
- * @param channelNames
- * - a list of channel names to be enabled
- * @param isKernel
- * - a flag to indicate Kernel or UST (true for Kernel, false for
- * UST)
- * @param info
- * - channel information used for creation of a channel (or null
- * for default)
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void enableChannels(String sessionName, List<String> channelNames,
- boolean isKernel, IChannelInfo info, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Disables a list of channels for given session and given channel
- * information (configuration).
- *
- * @param sessionName
- * - a session name to create
- * @param channelNames
- * - a list of channel names to be enabled
- * @param isKernel
- * - a flag to indicate Kernel or UST (true for Kernel, false for
- * UST)
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void disableChannels(String sessionName, List<String> channelNames,
- boolean isKernel, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Enables a list of events with no additional parameters.
- *
- * @param sessionName
- * - a session name
- * @param channelName
- * - a channel name or null for default channel
- * @param eventNames
- * - a list of event names to be enabled, or null (list of size =
- * 0)for all events .
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void enableEvents(String sessionName, String channelName,
- List<String> eventNames, boolean isKernel, String filterExpression,
- IProgressMonitor monitor)
- throws ExecutionException;
-
-
- /**
- * Enables all syscall events.
- *
- * @param sessionName
- * - a session name
- * @param channelName
- * - a channel name or null for default channel
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void enableSyscalls(String sessionName, String channelName,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Enables a dynamic probe or dynamic function entry/return probe.
- *
- * @param sessionName
- * - a session name
- * @param channelName
- * - a channel name or null for default channel
- * @param eventName
- * - a event name
- * @param isFunction
- * - true for dynamic function entry/return probe else false
- * @param probe
- * - a dynamic probe information
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void enableProbe(String sessionName, String channelName,
- String eventName, boolean isFunction, String probe,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Enables events using log level
- *
- * @param sessionName
- * - a session name
- * @param channelName
- * - a channel name (null for default channel)
- * @param eventName
- * - a event name
- * @param logLevelType
- * - a log level type
- * @param level
- * - a log level
- * @param filterExpression
- * - a filter expression
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void enableLogLevel(String sessionName, String channelName,
- String eventName, LogLevelType logLevelType, TraceLogLevel level,
- String filterExpression,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Disables a list of events with no additional parameters.
- *
- * @param sessionName
- * - a session name
- * @param channelName
- * - a channel name (null for default channel)
- * @param eventNames
- * - a list of event names to enabled.
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void disableEvent(String sessionName, String channelName,
- List<String> eventNames, boolean isKernel, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Gets all available context names to be added to channels/events.
- *
- * @param monitor
- * The progress monitor
- * @return the list of available contexts
- * @throws ExecutionException
- * If the command fails
- */
- List<String> getContextList(IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Add contexts to given channels and or events
- *
- * @param sessionName
- * - a session name
- * @param channelName
- * - a channel name (null for all channels)
- * @param eventName
- * - a event name (null for all events)
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param contexts
- * - a list of name of contexts to add
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void addContexts(String sessionName, String channelName,
- String eventName, boolean isKernel, List<String> contexts,
- IProgressMonitor monitor) throws ExecutionException;
-
- /**
- * Executes calibrate command to quantify LTTng overhead.
- *
- * @param isKernel
- * - a flag for indicating kernel or UST.
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void calibrate(boolean isKernel, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Records a snapshot.
- *
- * @param sessionName
- * - a session name
- * @param monitor
- * - a progress monitor
- * @throws ExecutionException
- * If the command fails
- */
- void recordSnapshot(String sessionName, IProgressMonitor monitor)
- throws ExecutionException;
-
- /**
- * Executes a list of commands
- *
- * @param monitor
- * - a progress monitor
- * @param commands
- * - array of commands
- * @throws ExecutionException
- * If a command fails
- */
- void runCommands(IProgressMonitor monitor, List<String> commands)
- throws ExecutionException;
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Simon Delisle - Updated for support of LTTng Tools 2.2
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
-
-/**
- * <p>
- * Service for sending LTTng trace control commands to remote host.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public class LTTngControlService implements ILttngControlService {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The command shell implementation
- */
- private final ICommandShell fCommandShell;
-
- /**
- * The version string.
- */
- private LttngVersion fVersion = null;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param shell
- * - the command shell implementation to use
- */
- public LTTngControlService(ICommandShell shell) {
- fCommandShell = shell;
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- @Override
- public String getVersionString() {
- if (fVersion == null) {
- return "Unknown"; //$NON-NLS-1$
- }
- return fVersion.toString();
- }
-
- @Override
- public LttngVersion getVersion() {
- return fVersion;
- }
-
- /**
- * Sets the version of the LTTng 2.0 control service.
- *
- * @param version
- * - a version to set
- */
- public void setVersion(String version) {
- fVersion = new LttngVersion(version);
- }
-
- /**
- * Sets the version of the LTTng 2.x control service.
- *
- * @param version
- * - a version to set
- */
- public void setVersion(LttngVersion version) {
- fVersion = version;
- }
-
- @Override
- public boolean isVersionSupported(String version) {
- LttngVersion tmp = new LttngVersion(version);
- return (fVersion != null && fVersion.compareTo(tmp) >= 0) ? true : false;
- }
-
- /**
- * Returns the command shell implementation.
- *
- * @return the command shell implementation
- */
- protected ICommandShell getCommandShell() {
- return fCommandShell;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST);
-
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- // Output:
- // Available tracing sessions:
- // 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928)
- // [inactive]
- // 2) mysession (/home/user/lttng-traces/mysession-20120123-083318)
- // [inactive]
- //
- // Use lttng list <session_name> for more details
-
- ArrayList<String> retArray = new ArrayList<>();
- int index = 0;
- while (index < result.getOutput().length) {
- String line = result.getOutput()[index];
- Matcher matcher = LTTngControlServiceConstants.SESSION_PATTERN.matcher(line);
- if (matcher.matches()) {
- retArray.add(matcher.group(2).trim());
- }
- index++;
- }
- return retArray.toArray(new String[retArray.size()]);
- }
-
- /**
- * Check if there is a pattern to be ignored into a sequence of string
- *
- * @param input
- * an arrays of string
- * @param pattern
- * the pattern to search for
- * @return if the pattern exist into the array of string
- */
- protected boolean ignoredPattern(String[] input, Pattern pattern) {
- for (String line : input) {
- Matcher matcher = pattern.matcher(line);
- if (matcher.matches()) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, sessionName);
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- int index = 0;
-
- // Output:
- // Tracing session mysession2: [inactive]
- // Trace path: /home/eedbhu/lttng-traces/mysession2-20120123-110330
- ISessionInfo sessionInfo = new SessionInfo(sessionName);
-
- while (index < result.getOutput().length) {
- // Tracing session mysession2: [inactive]
- // Trace path: /home/eedbhu/lttng-traces/mysession2-20120123-110330
- //
- // === Domain: Kernel ===
- //
- String line = result.getOutput()[index];
- Matcher matcher = LTTngControlServiceConstants.TRACE_SESSION_PATTERN.matcher(line);
- if (matcher.matches()) {
- sessionInfo.setSessionState(matcher.group(2));
- index++;
- continue;
- }
-
- matcher = LTTngControlServiceConstants.TRACE_SNAPSHOT_SESSION_PATTERN.matcher(line);
- if (matcher.matches()) {
- sessionInfo.setSessionState(matcher.group(2));
- // real name will be set later
- ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
- sessionInfo.setSnapshotInfo(snapshotInfo);
- index++;
- continue;
- }
-
- if (!sessionInfo.isSnapshotSession()) {
- matcher = LTTngControlServiceConstants.TRACE_NETWORK_PATH_PATTERN.matcher(line);
- if (matcher.matches()) {
- sessionInfo.setStreamedTrace(true);
- }
-
- matcher = LTTngControlServiceConstants.TRACE_SESSION_PATH_PATTERN.matcher(line);
- if (matcher.matches()) {
- sessionInfo.setSessionPath(matcher.group(1).trim());
- index++;
- continue;
- }
- }
-
- matcher = LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(line);
- if (matcher.matches()) {
- // Create Domain
- IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_KernelDomainDisplayName);
-
- // set kernel flag
- domainInfo.setIsKernel(true);
-
- // in domain kernel
- ArrayList<IChannelInfo> channels = new ArrayList<>();
- index = parseDomain(result.getOutput(), index, channels, domainInfo);
-
- if (channels.size() > 0) {
- // add domain
- sessionInfo.addDomain(domainInfo);
-
- // set channels
- domainInfo.setChannels(channels);
- }
- continue;
- }
-
- matcher = LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(line);
- if (matcher.matches()) {
- IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_UstGlobalDomainDisplayName);
-
- // set kernel flag
- domainInfo.setIsKernel(false);
-
- // in domain UST
- ArrayList<IChannelInfo> channels = new ArrayList<>();
- index = parseDomain(result.getOutput(), index, channels, domainInfo);
-
- if (channels.size() > 0) {
- // add domain
- sessionInfo.addDomain(domainInfo);
-
- // set channels
- domainInfo.setChannels(channels);
- }
- continue;
- }
- index++;
- }
-
- if (sessionInfo.isSnapshotSession()) {
- ISnapshotInfo snapshot = getSnapshotInfo(sessionName, monitor);
- sessionInfo.setSnapshotInfo(snapshot);
- }
-
- return sessionInfo;
- }
-
- @Override
- public ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_SNAPSHOT_OUTPUT, LTTngControlServiceConstants.OPTION_SESSION, sessionName);
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- int index = 0;
-
- // Output:
- // [1] snapshot-1: /home/user/lttng-traces/my-20130909-114431
- // or
- // [3] snapshot-3: net4://172.0.0.1/
- ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
-
- while (index < result.getOutput().length) {
- String line = result.getOutput()[index];
- Matcher matcher = LTTngControlServiceConstants.LIST_SNAPSHOT_OUTPUT_PATTERN.matcher(line);
- if (matcher.matches()) {
- snapshotInfo.setId(Integer.valueOf(matcher.group(1)));
- snapshotInfo.setName(matcher.group(2));
- snapshotInfo.setSnapshotPath(matcher.group(3));
-
- Matcher matcher2 = LTTngControlServiceConstants.SNAPSHOT_NETWORK_PATH_PATTERN.matcher(snapshotInfo.getSnapshotPath());
- if (matcher2.matches()) {
- snapshotInfo.setStreamedSnapshot(true);
- }
-
- index++;
- break;
- }
- index++;
- }
-
- return snapshotInfo;
- }
-
- @Override
- public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
- ICommandResult result = executeCommand(command.toString(), monitor, false);
-
- List<IBaseEventInfo> events = new ArrayList<>();
-
- if (result.getErrorOutput() != null) {
- // Ignore the following 2 cases:
- // Spawning a session daemon
- // Error: Unable to list kernel events
- // or:
- // Error: Unable to list kernel events
- //
- if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) {
- return events;
- }
- }
-
- if (isError(result)) {
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Kernel events:
- // -------------
- // sched_kthread_stop (type: tracepoint)
- getProviderEventInfo(result.getOutput(), 0, events);
- return events;
- }
-
- @Override
- public List<IUstProviderInfo> getUstProvider() throws ExecutionException {
- return getUstProvider(new NullProgressMonitor());
- }
-
- @Override
- public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_UST);
-
- if (isVersionSupported("2.1.0")) { //$NON-NLS-1$
- command.append(LTTngControlServiceConstants.OPTION_FIELDS);
- }
-
- ICommandResult result = executeCommand(command.toString(), monitor, false);
- List<IUstProviderInfo> allProviders = new ArrayList<>();
-
- // Workaround for versions 2.0.x which causes a segmentation fault for
- // this command
- // if LTTng Tools is compiled without UST support.
- if (!isVersionSupported("2.1.0") && (result.getResult() != 0)) { //$NON-NLS-1$
- return allProviders;
- }
-
- if (result.getErrorOutput() != null) {
- // Ignore the following 2 cases:
- // Spawning a session daemon
- // Error: Unable to list UST events: Listing UST events failed
- // or:
- // Error: Unable to list UST events: Listing UST events failed
- //
- if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_UST_NO_UST_PROVIDER_PATTERN)) {
- return allProviders;
- }
- }
-
- if (isError(result)) {
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Note that field print-outs exists for version >= 2.1.0
- //
- // UST events:
- // -------------
- //
- // PID: 3635 - Name:
- // /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- // ust_tests_hello:tptest_sighandler (loglevel: TRACE_EMERG0) (type:
- // tracepoint)
- // ust_tests_hello:tptest (loglevel: TRACE_EMERG0) (type: tracepoint)
- // field: doublefield (float)
- // field: floatfield (float)
- // field: stringfield (string)
- //
- // PID: 6459 - Name:
- // /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
- // ust_tests_hello:tptest_sighandler (loglevel: TRACE_EMERG0) (type:
- // tracepoint)
- // ust_tests_hello:tptest (loglevel: TRACE_EMERG0) (type: tracepoint)
- // field: doublefield (float)
- // field: floatfield (float)
- // field: stringfield (string)
-
- IUstProviderInfo provider = null;
-
- int index = 0;
- while (index < result.getOutput().length) {
- String line = result.getOutput()[index];
- Matcher matcher = LTTngControlServiceConstants.UST_PROVIDER_PATTERN.matcher(line);
- if (matcher.matches()) {
- provider = new UstProviderInfo(matcher.group(2).trim());
- provider.setPid(Integer.valueOf(matcher.group(1).trim()));
- List<IBaseEventInfo> events = new ArrayList<>();
- index = getProviderEventInfo(result.getOutput(), ++index, events);
- provider.setEvents(events);
- allProviders.add(provider);
- } else {
- index++;
- }
- }
- return allProviders;
- }
-
- @Override
- public ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
- if (sessionInfo.isStreamedTrace()) {
- return createStreamedSession(sessionInfo, monitor);
- }
-
- StringBuffer command = prepareSessionCreationCommand(sessionInfo);
-
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- // Session myssession2 created.
- // Traces will be written in
- // /home/user/lttng-traces/myssession2-20120209-095418
- String[] output = result.getOutput();
-
- // Get and session name and path
- String name = null;
- String path = null;
-
- int index = 0;
- while (index < output.length) {
- String line = output[index];
- Matcher nameMatcher = LTTngControlServiceConstants.CREATE_SESSION_NAME_PATTERN.matcher(line);
- Matcher pathMatcher = LTTngControlServiceConstants.CREATE_SESSION_PATH_PATTERN.matcher(line);
- if (nameMatcher.matches()) {
- name = String.valueOf(nameMatcher.group(1).trim());
- } else if (pathMatcher.matches()) {
- path = String.valueOf(pathMatcher.group(1).trim());
- }
- index++;
- }
-
- // Verify session name
- if ((name == null) || (!"".equals(sessionInfo.getName()) && !name.equals(sessionInfo.getName()))) { //$NON-NLS-1$
- // Unexpected name returned
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedNameError + ": " + name); //$NON-NLS-1$
- }
-
- sessionInfo.setName(name);
- // Verify session path
- if (!sessionInfo.isSnapshotSession() &&
- ((path == null) || ((sessionInfo.getSessionPath() != null) && (!path.contains(sessionInfo.getSessionPath()))))) {
- // Unexpected path
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$
- }
-
- if (sessionInfo.isSnapshotSession()) {
- // Make it a snapshot session - content of snapshot info need to
- // set afterwards using getSession() or getSnapshotInfo()
- sessionInfo.setSnapshotInfo(new SnapshotInfo("")); //$NON-NLS-1$
- } else {
- sessionInfo.setSessionPath(path);
- }
-
- return sessionInfo;
-
- }
-
- /**
- * Basic generation of command for session creation
- *
- * @param sessionInfo
- * the session to create
- * @return the basic command for command creation
- */
- protected StringBuffer prepareSessionCreationCommand(ISessionInfo sessionInfo) {
- String newName = formatParameter(sessionInfo.getName());
- String newPath = formatParameter(sessionInfo.getSessionPath());
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CREATE_SESSION, newName);
-
- if (newPath != null && !"".equals(newPath)) { //$NON-NLS-1$
- command.append(LTTngControlServiceConstants.OPTION_OUTPUT_PATH);
- command.append(newPath);
- }
-
- if (sessionInfo.isSnapshotSession()) {
- command.append(LTTngControlServiceConstants.OPTION_SNAPSHOT);
- }
- return command;
- }
-
- private ISessionInfo createStreamedSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
-
- StringBuffer command = prepareStreamedSessionCreationCommand(sessionInfo);
-
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- // Verify output
- String[] output = result.getOutput();
-
- // Get and session name and path
- String name = null;
- String path = null;
-
- int index = 0;
- while (index < output.length) {
- String line = output[index];
- Matcher nameMatcher = LTTngControlServiceConstants.CREATE_SESSION_NAME_PATTERN.matcher(line);
- Matcher pathMatcher = LTTngControlServiceConstants.CREATE_SESSION_PATH_PATTERN.matcher(line);
-
- if (nameMatcher.matches()) {
- name = String.valueOf(nameMatcher.group(1).trim());
- } else if (pathMatcher.matches() && (sessionInfo.getNetworkUrl() != null)) {
- path = String.valueOf(pathMatcher.group(1).trim());
- }
- index++;
- }
-
- // Verify session name
- if ((name == null) || (!"".equals(sessionInfo.getName()) && !name.equals(sessionInfo.getName()))) { //$NON-NLS-1$
- // Unexpected name returned
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedNameError + ": " + name); //$NON-NLS-1$
- }
-
- sessionInfo.setName(name);
-
- sessionInfo.setStreamedTrace(true);
-
- // Verify session path
- if (sessionInfo.getNetworkUrl() != null) {
- if (!sessionInfo.isSnapshotSession() && (path == null)) {
- // Unexpected path
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$
- }
-
- if (sessionInfo.isSnapshotSession()) {
- sessionInfo.setStreamedTrace(false);
- } else {
- sessionInfo.setSessionPath(path);
- // Check file protocol
- Matcher matcher = LTTngControlServiceConstants.TRACE_FILE_PROTOCOL_PATTERN.matcher(path);
- if (matcher.matches()) {
- sessionInfo.setStreamedTrace(false);
- }
- }
- }
-
- // When using controlUrl and dataUrl the full session path is not known
- // yet and will be set later on when listing the session
-
- return sessionInfo;
- }
-
- /**
- * Basic generation of command for streamed session creation
- *
- * @param sessionInfo
- * the session to create
- * @return the basic command for command creation
- */
- protected StringBuffer prepareStreamedSessionCreationCommand(ISessionInfo sessionInfo) {
- String newName = formatParameter(sessionInfo.getName());
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CREATE_SESSION, newName);
-
- if (sessionInfo.isSnapshotSession()) {
- command.append(LTTngControlServiceConstants.OPTION_SNAPSHOT);
- } else if (sessionInfo.isLive()) {
- command.append(LTTngControlServiceConstants.OPTION_LIVE);
- if (sessionInfo.getLiveDelay() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(sessionInfo.getLiveDelay());
- }
- }
-
- if (sessionInfo.getNetworkUrl() != null) {
- command.append(LTTngControlServiceConstants.OPTION_NETWORK_URL);
- command.append(sessionInfo.getNetworkUrl());
- } else {
- command.append(LTTngControlServiceConstants.OPTION_CONTROL_URL);
- command.append(sessionInfo.getControlUrl());
-
- command.append(LTTngControlServiceConstants.OPTION_DATA_URL);
- command.append(sessionInfo.getDataUrl());
- }
- return command;
- }
-
- @Override
- public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- String newName = formatParameter(sessionName);
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DESTROY_SESSION, newName);
-
- ICommandResult result = executeCommand(command.toString(), monitor, false);
- String[] errorOutput = result.getErrorOutput();
-
- boolean isError = isError(result);
- if (isError && (errorOutput != null)) {
- if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.SESSION_NOT_FOUND_ERROR_PATTERN)) {
- isError = false;
-
- }
- }
-
- if (isError) {
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Session <sessionName> destroyed
- }
-
- @Override
- public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
-
- String newSessionName = formatParameter(sessionName);
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_START_SESSION, newSessionName);
-
- executeCommand(command.toString(), monitor);
-
- // Session <sessionName> started
- }
-
- @Override
- public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- String newSessionName = formatParameter(sessionName);
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_STOP_SESSION, newSessionName);
-
- executeCommand(command.toString(), monitor);
-
- // Session <sessionName> stopped
-
- }
-
- @Override
- public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException {
-
- // no channels to enable
- if (channelNames.isEmpty()) {
- return;
- }
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_CHANNEL);
-
- for (Iterator<String> iterator = channelNames.iterator(); iterator.hasNext();) {
- String channel = iterator.next();
- command.append(channel);
- if (iterator.hasNext()) {
- command.append(',');
- }
- }
-
- if (isKernel) {
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_UST);
- }
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (info != null) {
- // --discard Discard event when buffers are full (default)
-
- // --overwrite Flight recorder mode
- if (info.isOverwriteMode()) {
- command.append(LTTngControlServiceConstants.OPTION_OVERWRITE);
- }
- // --subbuf-size SIZE Subbuffer size in bytes
- // (default: 4096, kernel default: 262144)
- if (info.getSubBufferSize() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(LTTngControlServiceConstants.OPTION_SUB_BUFFER_SIZE);
- command.append(String.valueOf(info.getSubBufferSize()));
- }
-
- // --num-subbuf NUM Number of subbufers
- if (info.getNumberOfSubBuffers() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(LTTngControlServiceConstants.OPTION_NUM_SUB_BUFFERS);
- command.append(String.valueOf(info.getNumberOfSubBuffers()));
- }
-
- // --switch-timer USEC Switch timer interval in usec
- if (info.getSwitchTimer() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(LTTngControlServiceConstants.OPTION_SWITCH_TIMER);
- command.append(String.valueOf(info.getSwitchTimer()));
- }
-
- // --read-timer USEC Read timer interval in usec
- if (info.getReadTimer() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(LTTngControlServiceConstants.OPTION_READ_TIMER);
- command.append(String.valueOf(info.getReadTimer()));
- }
-
- if (isVersionSupported("2.2.0")) { //$NON-NLS-1$
- // --buffers-uid Every application sharing the same UID use the
- // same buffers --buffers-pid Buffers are allocated per PID
- if (!isKernel) {
- if (info.getBufferType() == BufferType.BUFFER_PER_PID) {
- command.append(LTTngControlServiceConstants.OPTION_PER_PID_BUFFERS);
-
- } else if (info.getBufferType() == BufferType.BUFFER_PER_UID) {
- command.append(LTTngControlServiceConstants.OPTION_PER_UID_BUFFERS);
- }
- }
-
- // -C SIZE Maximum size of trace files in bytes
- if (info.getMaxSizeTraceFiles() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(LTTngControlServiceConstants.OPTION_MAX_SIZE_TRACE_FILES);
- command.append(String.valueOf(info.getMaxSizeTraceFiles()));
- }
-
- // -W NUM Maximum number of trace files
- if (info.getMaxNumberTraceFiles() != LTTngControlServiceConstants.UNUSED_VALUE) {
- command.append(LTTngControlServiceConstants.OPTION_MAX_TRACE_FILES);
- command.append(String.valueOf(info.getMaxNumberTraceFiles()));
- }
- }
- }
-
- executeCommand(command.toString(), monitor);
-
- }
-
- @Override
- public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
-
- // no channels to enable
- if (channelNames.isEmpty()) {
- return;
- }
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DISABLE_CHANNEL);
-
- for (Iterator<String> iterator = channelNames.iterator(); iterator.hasNext();) {
- String channel = iterator.next();
- command.append(channel);
- if (iterator.hasNext()) {
- command.append(',');
- }
- }
-
- if (isKernel) {
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_UST);
- }
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
-
- if (eventNames == null || eventNames.isEmpty()) {
- command.append(LTTngControlServiceConstants.OPTION_ALL);
- } else {
-
- StringBuffer eventNameParameter = new StringBuffer();
- for (Iterator<String> iterator = eventNames.iterator(); iterator.hasNext();) {
- String event = iterator.next();
- eventNameParameter.append(event);
- if (iterator.hasNext()) {
- eventNameParameter.append(',');
- }
- }
- command.append(formatParameter(eventNameParameter.toString()));
- }
-
- if (isKernel) {
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_UST);
- }
-
- String newSessionName = formatParameter(sessionName);
-
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (channelName != null) {
- command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
- command.append(channelName);
- }
-
- command.append(LTTngControlServiceConstants.OPTION_TRACEPOINT);
-
- if (filterExpression != null) {
- command.append(LTTngControlServiceConstants.OPTION_FILTER);
- command.append('\'');
- command.append(filterExpression);
- command.append('\'');
- }
-
- executeCommand(command.toString(), monitor);
-
- }
-
- @Override
- public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException {
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
-
- command.append(LTTngControlServiceConstants.OPTION_ALL);
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
-
- String newSessionName = formatParameter(sessionName);
-
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (channelName != null) {
- command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
- command.append(channelName);
- }
-
- command.append(LTTngControlServiceConstants.OPTION_SYSCALL);
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
-
- command.append(eventName);
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (channelName != null) {
- command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
- command.append(channelName);
- }
- if (isFunction) {
- command.append(LTTngControlServiceConstants.OPTION_FUNCTION_PROBE);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_PROBE);
- }
-
- command.append(probe);
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
-
- command.append(eventName);
- command.append(LTTngControlServiceConstants.OPTION_UST);
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (channelName != null) {
- command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
- command.append(channelName);
- }
-
- if (logLevelType == LogLevelType.LOGLEVEL) {
- command.append(LTTngControlServiceConstants.OPTION_LOGLEVEL);
- } else if (logLevelType == LogLevelType.LOGLEVEL_ONLY) {
- command.append(LTTngControlServiceConstants.OPTION_LOGLEVEL_ONLY);
-
- } else {
- return;
- }
- command.append(level.getInName());
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DISABLE_EVENT);
-
- if (eventNames == null) {
- command.append(LTTngControlServiceConstants.OPTION_ALL);
- } else {
- // no events to disable
- if (eventNames.isEmpty()) {
- return;
- }
-
- StringBuffer eventNameParameter = new StringBuffer();
- for (Iterator<String> iterator = eventNames.iterator(); iterator.hasNext();) {
- String event = iterator.next();
- eventNameParameter.append(event);
- if (iterator.hasNext()) {
- eventNameParameter.append(',');
- }
- }
- command.append(formatParameter(eventNameParameter.toString()));
- }
-
- if (isKernel) {
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_UST);
- }
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (channelName != null) {
- command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
- command.append(channelName);
- }
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException {
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ADD_CONTEXT, LTTngControlServiceConstants.OPTION_HELP);
-
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- String[] output = result.getOutput();
-
- List<String> contexts = new ArrayList<>(0);
-
- int index = 0;
- boolean inList = false;
- while (index < output.length) {
- String line = result.getOutput()[index];
-
- Matcher startMatcher = LTTngControlServiceConstants.ADD_CONTEXT_HELP_CONTEXTS_INTRO.matcher(line);
- Matcher endMatcher = LTTngControlServiceConstants.ADD_CONTEXT_HELP_CONTEXTS_END_LINE.matcher(line);
-
- if (startMatcher.matches()) {
- inList = true;
- } else if (endMatcher.matches()) {
- break;
- } else if (inList == true) {
- String[] tmp = line.split(","); //$NON-NLS-1$
- for (int i = 0; i < tmp.length; i++) {
- contexts.add(tmp[i].trim());
- }
- }
- index++;
- }
- return contexts;
- }
-
- @Override
- public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ADD_CONTEXT);
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- if (channelName != null) {
- command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
- command.append(channelName);
- }
-
- if (eventName != null) {
- command.append(LTTngControlServiceConstants.OPTION_EVENT);
- command.append(eventName);
- }
-
- if (isKernel) {
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_UST);
- }
-
- for (Iterator<String> iterator = contextNames.iterator(); iterator.hasNext();) {
- String context = iterator.next();
- command.append(LTTngControlServiceConstants.OPTION_CONTEXT_TYPE);
- command.append(context);
- }
-
- executeCommand(command.toString(), monitor);
-
- }
-
- @Override
- public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CALIBRATE);
-
- if (isKernel) {
- command.append(LTTngControlServiceConstants.OPTION_KERNEL);
- } else {
- command.append(LTTngControlServiceConstants.OPTION_UST);
- }
-
- command.append(LTTngControlServiceConstants.OPTION_FUNCTION_PROBE);
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public void recordSnapshot(String sessionName, IProgressMonitor monitor)
- throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_RECORD_SNAPSHOT);
-
- String newSessionName = formatParameter(sessionName);
- command.append(LTTngControlServiceConstants.OPTION_SESSION);
- command.append(newSessionName);
-
- executeCommand(command.toString(), monitor);
- }
-
- @Override
- public void runCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
- for (String command : commands) {
- if (monitor.isCanceled()) {
- return;
- }
-
- if (command.isEmpty() || command.startsWith("#")) { //$NON-NLS-1$
- continue;
- }
- executeCommand(command, monitor);
- }
- }
-
- // ------------------------------------------------------------------------
- // Helper methods
- // ------------------------------------------------------------------------
-
- /**
- * Checks if command result is an error result.
- *
- * @param result
- * - the command result to check
- * @return true if error else false
- */
- protected boolean isError(ICommandResult result) {
- // Check return code and length of returned strings
-
- if ((result.getResult()) != 0) {
- return true;
- }
-
- // Look for error pattern
- int index = 0;
- while (index < result.getErrorOutput().length) {
- String line = result.getErrorOutput()[index];
- Matcher matcher = LTTngControlServiceConstants.ERROR_PATTERN.matcher(line);
- if (matcher.matches()) {
- return true;
- }
- index++;
- }
-
- return false;
- }
-
- /**
- * Formats the output string as single string.
- *
- * @param result
- * - output array
- * @return - the formatted output
- */
- public static String formatOutput(ICommandResult result) {
- if ((result == null) || ((result.getOutput() == null || result.getOutput().length == 0) && (result.getErrorOutput() == null || result.getErrorOutput().length == 0))) {
- return ""; //$NON-NLS-1$
- }
- String[] output = result.getOutput();
- String[] errorOutput = result.getErrorOutput();
- StringBuffer ret = new StringBuffer();
- ret.append("Error Ouptut:\n"); //$NON-NLS-1$
- for (int i = 0; i < errorOutput.length; i++) {
- ret.append(errorOutput[i]).append("\n"); //$NON-NLS-1$
- }
- ret.append("Return Value: "); //$NON-NLS-1$
- ret.append(result.getResult());
- ret.append("\n"); //$NON-NLS-1$
- for (int i = 0; i < output.length; i++) {
- ret.append(output[i]).append("\n"); //$NON-NLS-1$
- }
- return ret.toString();
- }
-
- /**
- * Parses the domain information.
- *
- * @param output
- * - a command output array
- * @param currentIndex
- * - current index in command output array
- * @param channels
- * - list for returning channel information
- * @param domainInfo
- * - The domain information
- * @return the new current index in command output array
- */
- protected int parseDomain(String[] output, int currentIndex, List<IChannelInfo> channels, IDomainInfo domainInfo) {
- int index = currentIndex;
-
- // if kernel set the buffer type to shared
- if (domainInfo.isKernel()) {
- domainInfo.setBufferType(BufferType.BUFFER_SHARED);
- }
-
- // Channels:
- // -------------
- // - channnel1: [enabled]
- //
- // Attributes:
- // overwrite mode: 0
- // subbufers size: 262144
- // number of subbufers: 4
- // switch timer interval: 0
- // read timer interval: 200
- // output: splice()
-
- while (index < output.length) {
- String line = output[index];
-
- if (isVersionSupported("2.2.0")) { //$NON-NLS-1$
- Matcher bufferTypeMatcher = LTTngControlServiceConstants.BUFFER_TYPE_PATTERN.matcher(line);
- if (bufferTypeMatcher.matches()) {
- String bufferTypeString = getAttributeValue(line);
- if (BufferType.BUFFER_PER_PID.getInName().equals(bufferTypeString)) {
- domainInfo.setBufferType(BufferType.BUFFER_PER_PID);
- } else if (BufferType.BUFFER_PER_UID.getInName().equals(bufferTypeString)) {
- domainInfo.setBufferType(BufferType.BUFFER_PER_UID);
- } else {
- domainInfo.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
- }
- }
- } else {
- domainInfo.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
- }
- Matcher outerMatcher = LTTngControlServiceConstants.CHANNELS_SECTION_PATTERN.matcher(line);
- Matcher noKernelChannelMatcher = LTTngControlServiceConstants.DOMAIN_NO_KERNEL_CHANNEL_PATTERN.matcher(line);
- Matcher noUstChannelMatcher = LTTngControlServiceConstants.DOMAIN_NO_UST_CHANNEL_PATTERN.matcher(line);
- if (outerMatcher.matches()) {
- IChannelInfo channelInfo = null;
- while (index < output.length) {
- String subLine = output[index];
-
- Matcher innerMatcher = LTTngControlServiceConstants.CHANNEL_PATTERN.matcher(subLine);
- if (innerMatcher.matches()) {
- channelInfo = new ChannelInfo(""); //$NON-NLS-1$
- // get channel name
- channelInfo.setName(innerMatcher.group(1));
-
- // get channel enablement
- channelInfo.setState(innerMatcher.group(2));
-
- // set BufferType
- channelInfo.setBufferType(domainInfo.getBufferType());
-
- // add channel
- channels.add(channelInfo);
-
- } else if (LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE.matcher(subLine).matches()) {
- String value = getAttributeValue(subLine);
- if (channelInfo != null) {
- channelInfo.setOverwriteMode(!LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE_FALSE.equals(value));
- }
- } else if (LTTngControlServiceConstants.SUBBUFFER_SIZE_ATTRIBUTE.matcher(subLine).matches()) {
- if (channelInfo != null) {
- channelInfo.setSubBufferSize(Long.valueOf(getAttributeValue(subLine)));
- }
-
- } else if (LTTngControlServiceConstants.NUM_SUBBUFFERS_ATTRIBUTE.matcher(subLine).matches()) {
- if (channelInfo != null) {
- channelInfo.setNumberOfSubBuffers(Integer.valueOf(getAttributeValue(subLine)));
- }
-
- } else if (LTTngControlServiceConstants.SWITCH_TIMER_ATTRIBUTE.matcher(subLine).matches()) {
- if (channelInfo != null) {
- channelInfo.setSwitchTimer(Long.valueOf(getAttributeValue(subLine)));
- }
-
- } else if (LTTngControlServiceConstants.READ_TIMER_ATTRIBUTE.matcher(subLine).matches()) {
- if (channelInfo != null) {
- channelInfo.setReadTimer(Long.valueOf(getAttributeValue(subLine)));
- }
-
- } else if (LTTngControlServiceConstants.OUTPUT_ATTRIBUTE.matcher(subLine).matches()) {
- if (channelInfo != null) {
- channelInfo.setOutputType(getAttributeValue(subLine));
- }
-
- } else if (LTTngControlServiceConstants.EVENT_SECTION_PATTERN.matcher(subLine).matches()) {
- List<IEventInfo> events = new ArrayList<>();
- index = parseEvents(output, index, events);
- if (channelInfo != null) {
- channelInfo.setEvents(events);
- }
- // we want to stay at the current index to be able to
- // exit the domain
- continue;
- } else if (LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(subLine).matches()) {
- return index;
-
- } else if (LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(subLine).matches()) {
- return index;
- }
- index++;
- }
- } else if (noKernelChannelMatcher.matches() || noUstChannelMatcher.matches()) {
- // domain indicates that no channels were found -> return
- index++;
- return index;
- }
- index++;
- }
- return index;
- }
-
- /**
- * Parses the event information within a domain.
- *
- * @param output
- * - a command output array
- * @param currentIndex
- * - current index in command output array
- * @param events
- * - list for returning event information
- * @return the new current index in command output array
- */
- protected int parseEvents(String[] output, int currentIndex, List<IEventInfo> events) {
- int index = currentIndex;
-
- while (index < output.length) {
- String line = output[index];
- if (LTTngControlServiceConstants.CHANNEL_PATTERN.matcher(line).matches()) {
- // end of channel
- return index;
- } else if (LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(line).matches()) {
- // end of domain
- return index;
- } else if (LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(line).matches()) {
- // end of domain
- return index;
- }
-
- Matcher matcher = LTTngControlServiceConstants.EVENT_PATTERN.matcher(line);
- Matcher matcher2 = LTTngControlServiceConstants.WILDCARD_EVENT_PATTERN.matcher(line);
-
- if (matcher.matches()) {
- IEventInfo eventInfo = new EventInfo(matcher.group(1).trim());
- eventInfo.setLogLevelType(matcher.group(2).trim());
- eventInfo.setLogLevel(matcher.group(3).trim());
- eventInfo.setEventType(matcher.group(4).trim());
- eventInfo.setState(matcher.group(5));
- String filter = matcher.group(6);
- if (filter != null) {
- // remove '[' and ']'
- filter = filter.substring(1, filter.length() - 1);
- eventInfo.setFilterExpression(filter);
- }
- events.add(eventInfo);
- index++;
- } else if (matcher2.matches()) {
- IEventInfo eventInfo = new EventInfo(matcher2.group(1).trim());
- eventInfo.setLogLevel(TraceLogLevel.LEVEL_UNKNOWN);
- eventInfo.setEventType(matcher2.group(2).trim());
- eventInfo.setState(matcher2.group(3));
- String filter = matcher2.group(4);
- if (filter != null) {
- // remove '[' and ']'
- filter = filter.substring(1, filter.length() - 1);
- eventInfo.setFilterExpression(filter);
- }
-
- if ((eventInfo.getEventType() == TraceEventType.PROBE) ||
- (eventInfo.getEventType() == TraceEventType.FUNCTION)) {
- IProbeEventInfo probeEvent = new ProbeEventInfo(eventInfo.getName());
- probeEvent.setLogLevel(eventInfo.getLogLevel());
- probeEvent.setEventType(eventInfo.getEventType());
- probeEvent.setState(eventInfo.getState());
-
- // Overwrite eventinfo
- eventInfo = probeEvent;
-
- // myevent2 (type: probe) [enabled]
- // addr: 0xc0101340
- // myevent0 (type: function) [enabled]
- // offset: 0x0
- // symbol: init_post
- index++;
- while (index < output.length) {
- String probeLine = output[index];
- // parse probe
- Matcher addrMatcher = LTTngControlServiceConstants.PROBE_ADDRESS_PATTERN.matcher(probeLine);
- Matcher offsetMatcher = LTTngControlServiceConstants.PROBE_OFFSET_PATTERN.matcher(probeLine);
- Matcher symbolMatcher = LTTngControlServiceConstants.PROBE_SYMBOL_PATTERN.matcher(probeLine);
- if (addrMatcher.matches()) {
- String addr = addrMatcher.group(2).trim();
- probeEvent.setAddress(addr);
- } else if (offsetMatcher.matches()) {
- String offset = offsetMatcher.group(2).trim();
- probeEvent.setOffset(offset);
- } else if (symbolMatcher.matches()) {
- String symbol = symbolMatcher.group(2).trim();
- probeEvent.setSymbol(symbol);
- } else if ((LTTngControlServiceConstants.EVENT_PATTERN.matcher(probeLine).matches()) || (LTTngControlServiceConstants.WILDCARD_EVENT_PATTERN.matcher(probeLine).matches())) {
- break;
- } else if (LTTngControlServiceConstants.CHANNEL_PATTERN.matcher(probeLine).matches()) {
- break;
- } else if (LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(probeLine).matches()) {
- // end of domain
- break;
- } else if (LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(probeLine).matches()) {
- // end of domain
- break;
- }
- index++;
- }
- events.add(eventInfo);
- } else {
- events.add(eventInfo);
- index++;
- continue;
- }
- } else {
- index++;
- }
- }
-
- return index;
- }
-
- /**
- * Parses a line with attributes: <attribute Name>: <attribute value>
- *
- * @param line
- * - attribute line to parse
- * @return the attribute value as string
- */
- protected String getAttributeValue(String line) {
- String[] temp = line.split("\\: "); //$NON-NLS-1$
- return temp[1];
- }
-
- /**
- * Parses the event information within a provider.
- *
- * @param output
- * - a command output array
- * @param currentIndex
- * - current index in command output array
- * @param events
- * - list for returning event information
- * @return the new current index in command output array
- */
- protected int getProviderEventInfo(String[] output, int currentIndex, List<IBaseEventInfo> events) {
- int index = currentIndex;
- IBaseEventInfo eventInfo = null;
- while (index < output.length) {
- String line = output[index];
- Matcher matcher = LTTngControlServiceConstants.PROVIDER_EVENT_PATTERN.matcher(line);
- if (matcher.matches()) {
- // sched_kthread_stop (loglevel: TRACE_EMERG0) (type:
- // tracepoint)
- eventInfo = new BaseEventInfo(matcher.group(1).trim());
- eventInfo.setLogLevel(matcher.group(2).trim());
- eventInfo.setEventType(matcher.group(3).trim());
- events.add(eventInfo);
- index++;
- } else if (LTTngControlServiceConstants.EVENT_FIELD_PATTERN.matcher(line).matches()) {
- if (eventInfo != null) {
- List<IFieldInfo> fields = new ArrayList<>();
- index = getFieldInfo(output, index, fields);
- eventInfo.setFields(fields);
- } else {
- index++;
- }
- }
- else if (LTTngControlServiceConstants.UST_PROVIDER_PATTERN.matcher(line).matches()) {
- return index;
- } else {
- index++;
- }
- }
- return index;
- }
-
- /**
- * Parse a field's information.
- *
- * @param output
- * A command output array
- * @param currentIndex
- * The current index in the command output array
- * @param fields
- * List for returning the field information
- * @return The new current index in the command output array
- */
- protected int getFieldInfo(String[] output, int currentIndex, List<IFieldInfo> fields) {
- int index = currentIndex;
- IFieldInfo fieldInfo = null;
- while (index < output.length) {
- String line = output[index];
- Matcher matcher = LTTngControlServiceConstants.EVENT_FIELD_PATTERN.matcher(line);
- if (matcher.matches()) {
- // field: content (string)
- fieldInfo = new FieldInfo(matcher.group(2).trim());
- fieldInfo.setFieldType(matcher.group(3).trim());
- fields.add(fieldInfo);
- } else if (LTTngControlServiceConstants.PROVIDER_EVENT_PATTERN.matcher(line).matches()) {
- return index;
- } else if (LTTngControlServiceConstants.UST_PROVIDER_PATTERN.matcher(line).matches()) {
- return index;
- }
- index++;
- }
- return index;
- }
-
- /**
- * Formats a command parameter for the command execution i.e. adds quotes at
- * the beginning and end if necessary.
- *
- * @param parameter
- * - parameter to format
- * @return formated parameter
- */
- protected String formatParameter(String parameter) {
- if (parameter != null) {
- StringBuffer newString = new StringBuffer();
- newString.append(parameter);
-
- if (parameter.contains(" ") || parameter.contains("*")) { //$NON-NLS-1$ //$NON-NLS-2$
- newString.insert(0, "\""); //$NON-NLS-1$
- newString.append("\""); //$NON-NLS-1$
- }
- return newString.toString();
- }
- return null;
- }
-
- /**
- * @param strings
- * array of string that makes up a command line
- * @return string buffer with created command line
- */
- protected StringBuffer createCommand(String... strings) {
- StringBuffer command = new StringBuffer();
- command.append(LTTngControlServiceConstants.CONTROL_COMMAND);
- command.append(getTracingGroupOption());
- command.append(getVerboseOption());
- for (String string : strings) {
- command.append(string);
- }
- return command;
- }
-
- /**
- * @return the tracing group option if configured in the preferences
- */
- protected String getTracingGroupOption() {
- if (!ControlPreferences.getInstance().isDefaultTracingGroup() && !ControlPreferences.getInstance().getTracingGroup().equals("")) { //$NON-NLS-1$
- return LTTngControlServiceConstants.OPTION_TRACING_GROUP + ControlPreferences.getInstance().getTracingGroup();
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * @return the verbose option as configured in the preferences
- */
- protected String getVerboseOption() {
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- String level = ControlPreferences.getInstance().getVerboseLevel();
- if (ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_VERBOSE.equals(level)) {
- return LTTngControlServiceConstants.OPTION_VERBOSE;
- }
- if (ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_VERBOSE.equals(level)) {
- return LTTngControlServiceConstants.OPTION_VERY_VERBOSE;
- }
- if (ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE.equals(level)) {
- return LTTngControlServiceConstants.OPTION_VERY_VERY_VERBOSE;
- }
- }
- return ""; //$NON-NLS-1$
- }
-
- /**
- * Method that logs the command and command result if logging is enabled as
- * well as forwards the command execution to the shell.
- *
- * @param command
- * - the command to execute
- * @param monitor
- * - a progress monitor
- * @return the command result
- * @throws ExecutionException
- * If the command fails
- */
- protected ICommandResult executeCommand(String command,
- IProgressMonitor monitor) throws ExecutionException {
- return executeCommand(command, monitor, true);
- }
-
- /**
- * Method that logs the command and command result if logging is enabled as
- * well as forwards the command execution to the shell.
- *
- * @param command
- * - the command to execute
- * @param monitor
- * - a progress monitor
- * @param checkForError
- * - true to verify command result, else false
- * @return the command result
- * @throws ExecutionException
- * in case of error result
- */
- protected ICommandResult executeCommand(String command,
- IProgressMonitor monitor, boolean checkForError)
- throws ExecutionException {
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.log(command);
- }
-
- ICommandResult result = fCommandShell.executeCommand(
- command.toString(), monitor);
-
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.log(formatOutput(result));
- }
-
- if (checkForError && isError(result)) {
- throw new ExecutionException(Messages.TraceControl_CommandError
- + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- return result;
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Bernd Hufmann - Updated for support of LTTng Tools 2.1
- * Simon Delisle - Updated for support of LTTng Tools 2.2
- * Marc-Andre Laperle - Support for creating a live session
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import java.util.regex.Pattern;
-
-/**
- * <p>
- * Constants for LTTng Control Service.
- * </p>
- *
- * @author Bernd Hufmann
- */
-public interface LTTngControlServiceConstants {
-
- // ------------------------------------------------------------------------
- // Version constants
- // ------------------------------------------------------------------------
- /**
- * Pattern to match the LTTng toolchain version 2.x.y.
- */
- static final Pattern VERSION_2_PATTERN = Pattern.compile("(2\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
- /**
- * Unused value
- */
- static final int UNUSED_VALUE = -1;
- /**
- * String representation of numerical true element
- */
- static final String TRUE_NUMERICAL = "1"; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // LTTng Machine Interface constants
- // ------------------------------------------------------------------------
-
- /**
- * Name of the XSD to validate against the xml machine interface
- * output from LTTng
- */
- static final String MI_XSD_FILENAME = "mi_lttng.xsd"; //$NON-NLS-1$
- // ------------------------------------------------------------------------
- // Command constants
- // ------------------------------------------------------------------------
- /**
- * The lttng tools command.
- */
- static final String CONTROL_COMMAND = "lttng"; //$NON-NLS-1$
- /**
- * The lttng tools machine interface command.
- */
- static final String CONTROL_COMMAND_MI = CONTROL_COMMAND + " --mi"; //$NON-NLS-1$
- /**
- * The lttng tools XML machine interface command.
- */
- static final String CONTROL_COMMAND_MI_XML = CONTROL_COMMAND_MI + " xml"; //$NON-NLS-1$
- /**
- * Command: lttng version.
- */
- static final String COMMAND_VERSION = " version "; //$NON-NLS-1$
- /**
- * Command: lttng list.
- */
- static final String COMMAND_LIST = " list "; //$NON-NLS-1$
- /**
- * Command to list kernel tracer information.
- */
- static final String COMMAND_LIST_KERNEL = COMMAND_LIST + "-k"; //$NON-NLS-1$
- /**
- * Command to list user space trace information.
- */
- static final String COMMAND_LIST_UST = COMMAND_LIST + "-u"; //$NON-NLS-1$
- /**
- * Command to create a session.
- */
- static final String COMMAND_CREATE_SESSION = " create "; //$NON-NLS-1$
- /**
- * Command to destroy a session.
- */
- static final String COMMAND_DESTROY_SESSION = " destroy "; //$NON-NLS-1$
- /**
- * Command to destroy a session.
- */
- static final String COMMAND_START_SESSION = " start "; //$NON-NLS-1$
- /**
- * Command to destroy a session.
- */
- static final String COMMAND_STOP_SESSION = " stop "; //$NON-NLS-1$
- /**
- * Command to enable a channel.
- */
- static final String COMMAND_ENABLE_CHANNEL = " enable-channel "; //$NON-NLS-1$
- /**
- * Command to disable a channel.
- */
- static final String COMMAND_DISABLE_CHANNEL = " disable-channel "; //$NON-NLS-1$
- /**
- * Command to enable a event.
- */
- static final String COMMAND_ENABLE_EVENT = " enable-event "; //$NON-NLS-1$
- /**
- * Command to disable a event.
- */
- static final String COMMAND_DISABLE_EVENT = " disable-event "; //$NON-NLS-1$
- /**
- * Command to add a context to channels and/or events
- */
- static final String COMMAND_ADD_CONTEXT = " add-context "; //$NON-NLS-1$
- /**
- * Command to execute calibrate command to quantify LTTng overhead
- */
- static final String COMMAND_CALIBRATE = " calibrate "; //$NON-NLS-1$
- /**
- * Command to execute calibrate command to quantify LTTng overhead
- */
- static final String COMMAND_LIST_SNAPSHOT_OUTPUT = " snapshot list-output "; //$NON-NLS-1$
- /**
- * Command to execute calibrate command to quantify LTTng overhead
- */
- static final String COMMAND_RECORD_SNAPSHOT = " snapshot record "; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Command line options constants
- // ------------------------------------------------------------------------
- /**
- * Command line option to add tracing group of user.
- */
- static final String OPTION_TRACING_GROUP = " -g "; //$NON-NLS-1$
- /**
- * Command line option for verbose output.
- */
- static final String OPTION_VERBOSE = " -v "; //$NON-NLS-1$
- /**
- * Command line option for verbose output.
- */
- static final String OPTION_VERY_VERBOSE = " -vv "; //$NON-NLS-1$
- /**
- * Command line option for verbose output.
- */
- static final String OPTION_VERY_VERY_VERBOSE = " -vvv "; //$NON-NLS-1$
- /**
- * Command line option for output path.
- */
- static final String OPTION_OUTPUT_PATH = " -o "; //$NON-NLS-1$
- /**
- * Command line option for output path.
- */
- static final String OPTION_SNAPSHOT = " --snapshot "; //$NON-NLS-1$
- /**
- * Command line option for live
- */
- static final String OPTION_LIVE = " --live "; //$NON-NLS-1$
- /**
- * Command line option for kernel tracer.
- */
- static final String OPTION_KERNEL = " -k "; //$NON-NLS-1$
- /**
- * Command line option for UST tracer.
- */
- static final String OPTION_UST = " -u "; //$NON-NLS-1$
- /**
- * Command line option for specifying a session.
- */
- static final String OPTION_SESSION = " -s "; //$NON-NLS-1$
- /**
- * Command line option for specifying a channel.
- */
- static final String OPTION_CHANNEL = " -c "; //$NON-NLS-1$
- /**
- * Command line option for specifying a event.
- */
- static final String OPTION_EVENT = " -e "; //$NON-NLS-1$
- /**
- * Command line option for specifying all events.
- */
- static final String OPTION_ALL = " -a "; //$NON-NLS-1$
- /**
- * Command line option for specifying a context.
- */
- static final String OPTION_CONTEXT_TYPE = " -t "; //$NON-NLS-1$
- /**
- * Command line option for specifying tracepoint events.
- */
- static final String OPTION_TRACEPOINT = " --tracepoint "; //$NON-NLS-1$
- /**
- * Command line option for specifying syscall events.
- */
- static final String OPTION_SYSCALL = " --syscall "; //$NON-NLS-1$
- /**
- * Command line option for specifying a dynamic probe.
- */
- static final String OPTION_PROBE = " --probe "; //$NON-NLS-1$
- /**
- * Command line option for specifying a dynamic function entry/return probe.
- */
- static final String OPTION_FUNCTION_PROBE = " --function "; //$NON-NLS-1$
- /**
- * Command line option for specifying a log level range.
- */
- static final String OPTION_LOGLEVEL = " --loglevel "; //$NON-NLS-1$
- /**
- * Command line option for specifying a specific log level.
- */
- static final String OPTION_LOGLEVEL_ONLY = " --loglevel-only "; //$NON-NLS-1$
- /**
- * Optional command line option for configuring a channel's overwrite mode.
- */
- static final String OPTION_OVERWRITE = " --overwrite "; //$NON-NLS-1$
- /**
- * Optional command line option for configuring a channel's number of sub buffers.
- */
- static final String OPTION_NUM_SUB_BUFFERS = " --num-subbuf "; //$NON-NLS-1$
- /**
- * Optional command line option for configuring a channel's sub buffer size.
- */
- static final String OPTION_SUB_BUFFER_SIZE = " --subbuf-size "; //$NON-NLS-1$
- /**
- * Optional command line option for configuring a channel's switch timer interval.
- */
- static final String OPTION_SWITCH_TIMER = " --switch-timer "; //$NON-NLS-1$
- /**
- * Optional command line option for configuring a channel's read timer interval.
- */
- static final String OPTION_READ_TIMER = " --read-timer "; //$NON-NLS-1$
- /**
- * Command line option for printing the help of a specif command
- */
- static final String OPTION_HELP = " -h "; //$NON-NLS-1$
- /**
- * Command line option for listing the fields of UST tracepoints
- */
- static final String OPTION_FIELDS = " -f "; //$NON-NLS-1$
- /**
- * Command line option for configuring event's filter
- */
- static final String OPTION_FILTER = " --filter "; //$NON-NLS-1$
- /**
- * Command line option for configuring the streaming network URL (common for control and data channel).
- */
- static final String OPTION_NETWORK_URL = " -U "; //$NON-NLS-1$
- /**
- * Command line option for configuring the streaming control URL.
- */
- static final String OPTION_CONTROL_URL = " -C "; //$NON-NLS-1$
- /**
- * Command line option for configuring the streaming data URL.
- */
- static final String OPTION_DATA_URL = " -D "; //$NON-NLS-1$
- /**
- * Command line option for per UID buffers
- */
- static final String OPTION_PER_UID_BUFFERS = " --buffers-uid "; //$NON-NLS-1$
- /**
- * Command line option for per PID buffers
- */
- static final String OPTION_PER_PID_BUFFERS = " --buffers-pid "; //$NON-NLS-1$
- /**
- * Command line option for maximum size of trace files
- */
- static final String OPTION_MAX_SIZE_TRACE_FILES = " -C "; //$NON-NLS-1$
- /**
- * Command line option for maximum trace files
- */
- static final String OPTION_MAX_TRACE_FILES = " -W "; //$NON-NLS-1$
-
- // ------------------------------------------------------------------------
- // Parsing constants
- // ------------------------------------------------------------------------
- /**
- * Pattern to match the version.
- */
- static final Pattern VERSION_PATTERN = Pattern.compile(".*lttng\\s+version\\s+(\\d+\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
- /**
- * Pattern to match for error output
- */
- static final Pattern ERROR_PATTERN = Pattern.compile("\\s*Error\\:.*"); //$NON-NLS-1$
- /**
- * Pattern to match for session information (lttng list)
- */
- static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*"); //$NON-NLS-1$
- /**
- * Pattern to match for session information (lttng list <session>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final 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.
- */
- static final 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.
- */
- static final 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
- */
- static final Pattern TRACE_FILE_PROTOCOL_PATTERN = Pattern.compile("(file)\\:\\/\\/(.*)"); //$NON-NLS-1$
- /**
- * Pattern to match for kernel domain information (lttng list <session>)
- */
- static final Pattern DOMAIN_KERNEL_PATTERN = Pattern.compile("=== Domain: Kernel ==="); //$NON-NLS-1$
- /**
- * Pattern to match for ust domain information (lttng list <session>)
- */
- static final Pattern DOMAIN_UST_GLOBAL_PATTERN = Pattern.compile("=== Domain: UST global ==="); //$NON-NLS-1$
- /**
- * Pattern to match for matching warning about no kernel channel
- */
- static final 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
- */
- static final 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>)
- */
- static final Pattern BUFFER_TYPE_PATTERN = Pattern.compile("\\s*Buffer\\s+type\\:.*"); //$NON-NLS-1$
- /**
- * Pattern to match for channels section (lttng list <session>)
- */
- static final Pattern CHANNELS_SECTION_PATTERN = Pattern.compile("\\s*Channels\\:"); //$NON-NLS-1$
- /**
- * Pattern to match for channel information (lttng list <session>)
- */
- static final Pattern CHANNEL_PATTERN = Pattern.compile("\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]"); //$NON-NLS-1$
- /**
- * Pattern to match for events section information (lttng list <session>)
- */
- static final Pattern EVENT_SECTION_PATTERN = Pattern.compile("\\s*Events\\:"); //$NON-NLS-1$
- /**
- * Pattern to match for event information (lttng list <session>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final Pattern PROBE_SYMBOL_PATTERN = Pattern.compile("\\s+(symbol)\\:\\s+(.+)"); //$NON-NLS-1$
- /**
- * Pattern to match for channel (overwite mode) information (lttng list <session>)
- */
- static final Pattern OVERWRITE_MODE_ATTRIBUTE = Pattern.compile("\\s+overwrite\\s+mode\\:.*"); //$NON-NLS-1$
- /**
- * Pattern to match indicating false for overwrite mode
- */
- static final String OVERWRITE_MODE_ATTRIBUTE_FALSE = "0"; //$NON-NLS-1$
- /**
- * Pattern to match indicating false for overwrite mode in machine interface mode
- */
- static final String OVERWRITE_MODE_ATTRIBUTE_FALSE_MI = "DISCARD"; //$NON-NLS-1$
- /**
- * Pattern to match for channel (sub-buffer size) information (lttng list <session>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final Pattern OUTPUT_ATTRIBUTE = Pattern.compile("\\s+output\\:.*"); //$NON-NLS-1$
- /**
- * Pattern to match for provider information (lttng list -k/-u)
- */
- static final Pattern PROVIDER_EVENT_PATTERN = Pattern.compile("\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)"); //$NON-NLS-1$
- /**
- * Pattern to match event fields
- */
- static final Pattern EVENT_FIELD_PATTERN = Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)"); //$NON-NLS-1$
- /**
- * Pattern to match for UST provider information (lttng list -u)
- */
- static final 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>)
- */
- static final 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>)
- */
- static final 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".
- */
- static final 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.
- */
- static final 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.
- */
- static final 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.
- */
- static final 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.
- */
- static final 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)
- */
- static final Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = Pattern.compile("\\s+\\[(\\d+)\\]\\s+(\\S*)\\:\\s+(\\S*)(.*)"); //$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.
- */
- static final Pattern SNAPSHOT_NETWORK_PATH_PATTERN = Pattern.compile("(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2012, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Jonathan Rajotte - machine interface support
- **********************************************************************/
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import java.util.regex.Matcher;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
-
-/**
- * Factory to create LTTngControlService instances depending on the version of
- * the LTTng Trace Control installed on the remote host.
- *
- * @author Bernd Hufmann
- */
-public class LTTngControlServiceFactory {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
- /**
- * The singleton instance.
- */
- private static LTTngControlServiceFactory fInstance = null;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
- /**
- * Constructor
- */
- private LTTngControlServiceFactory() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
- /**
- * @return the LTTngControlServiceFactory singleton instance.
- */
- public static synchronized LTTngControlServiceFactory getInstance() {
- if (fInstance == null) {
- fInstance = new LTTngControlServiceFactory();
- }
- return fInstance;
- }
-
- // ------------------------------------------------------------------------
- // Factory method
- // ------------------------------------------------------------------------
- /**
- * Gets the LTTng Control Service implementation based on the version of the
- * remote LTTng Tools.
- *
- * @param shell
- * - the shell implementation to pass to the service
- * @return - LTTng Control Service implementation
- * @throws ExecutionException
- * If the command fails
- */
- public ILttngControlService getLttngControlService(ICommandShell shell) throws ExecutionException {
- // get the version
- boolean machineInterfaceMode = true;
- String command = LTTngControlServiceConstants.CONTROL_COMMAND + LTTngControlServiceConstants.COMMAND_VERSION;
- String commandMi = LTTngControlServiceConstants.CONTROL_COMMAND_MI_XML + LTTngControlServiceConstants.COMMAND_VERSION;
-
- // Logging
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.log(commandMi);
- }
-
- ICommandResult result = null;
-
- // Looking for a machine interface on LTTng side
- try {
- result = shell.executeCommand(commandMi, new NullProgressMonitor());
- } catch (ExecutionException e) {
- throw new ExecutionException(Messages.TraceControl_GettingVersionError, e);
- }
-
- // Output logging
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.log(LTTngControlService.formatOutput(result));
- }
-
- if (result.getResult() != 0) {
- machineInterfaceMode = false;
- // Fall back if no machine interface is present
-
- // Logging
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.log(command);
- }
-
- try {
- result = shell.executeCommand(command, new NullProgressMonitor());
- } catch (ExecutionException e) {
- throw new ExecutionException(Messages.TraceControl_GettingVersionError + ": " + e); //$NON-NLS-1$
- }
-
- // Output logging
- if (ControlPreferences.getInstance().isLoggingEnabled()) {
- ControlCommandLogger.log(LTTngControlService.formatOutput(result));
- }
- }
-
-
- if ((result != null) && (result.getResult() == 0) && (result.getOutput().length >= 1)) {
- if (machineInterfaceMode) {
- LTTngControlServiceMI service = new LTTngControlServiceMI(shell, LTTngControlService.class.getResource(LTTngControlServiceConstants.MI_XSD_FILENAME));
- service.setVersion(result.getOutput());
- return service;
- }
- int index = 0;
- while (index < result.getOutput().length) {
- String line = result.getOutput()[index];
- Matcher versionMatcher = LTTngControlServiceConstants.VERSION_PATTERN.matcher(line);
- if (versionMatcher.matches()) {
- String version = versionMatcher.group(1).trim();
- Matcher matcher = LTTngControlServiceConstants.VERSION_2_PATTERN.matcher(version);
- if (matcher.matches()) {
- LTTngControlService service = new LTTngControlService(shell);
- service.setVersion(version);
- return service;
- }
- throw new ExecutionException(Messages.TraceControl_UnsupportedVersionError + ": " + version); //$NON-NLS-1$
- }
- index++;
- }
- }
- throw new ExecutionException(Messages.TraceControl_GettingVersionError);
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte - Initial support for machine interface lttng 2.6
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import java.io.IOException;
-import java.io.StringReader;
-import java.math.BigInteger;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceDomainType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.XmlMiValidationErrorHandler;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.Document;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-
-/**
- * Service for sending LTTng trace control commands to remote host via machine
- * interface mode.
- *
- * @author Jonathan Rajotte
- */
-public class LTTngControlServiceMI extends LTTngControlService {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- private final DocumentBuilder fDocumentBuilder;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param shell
- * the command shell implementation to use
- * @param xsdUrl
- * the xsd schema file for validation
- * @throws ExecutionException
- * if the creation of the Schema and DocumentBuilder objects
- * fails
- */
- public LTTngControlServiceMI(ICommandShell shell, URL xsdUrl) throws ExecutionException {
- super(shell);
-
- DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
- docBuilderFactory.setValidating(false);
-
- // TODO: Add xsd validation for machine interface via mi_lttng.xsd from LTTng
- try {
- fDocumentBuilder = docBuilderFactory.newDocumentBuilder();
- } catch (ParserConfigurationException e) {
- throw new ExecutionException(Messages.TraceControl_XmlDocumentBuilderError, e);
- }
-
- fDocumentBuilder.setErrorHandler(new XmlMiValidationErrorHandler());
-
- }
-
- /**
- * Generate a Document object from an array of String.
- *
- * @param xmlStrings
- * array of strings representing an xml input
- * @return Document generated from strings input
- * @throws ExecutionException
- * when parsing has failed
- */
- private Document getDocumentFromStrings(String[] xmlStrings) throws ExecutionException {
- StringBuilder concatenedString = new StringBuilder();
- for (String string : xmlStrings) {
- concatenedString.append(string);
- }
- InputSource stream = new InputSource(new StringReader(concatenedString.toString()));
-
- Document document;
- try {
- document = fDocumentBuilder.parse(stream);
- } catch (SAXException | IOException e) {
- throw new ExecutionException(Messages.TraceControl_XmlParsingError, e);
- }
- return document;
-
- }
-
- /**
- * Parse, populate and set the internal LTTngVersion variable
- *
- * @param xmlOutput
- * the mi xml output of lttng version
- * @throws ExecutionException
- * when xml extraction fail
- */
- public void setVersion(String[] xmlOutput) throws ExecutionException {
- Document doc = getDocumentFromStrings(xmlOutput);
- NodeList element = doc.getElementsByTagName(MIStrings.VERSION);
- int major = 0;
- int minor = 0;
- int patchLevel = 0;
- String license = ""; //$NON-NLS-1$
- String commit = ""; //$NON-NLS-1$
- String name = ""; //$NON-NLS-1$
- String description = ""; //$NON-NLS-1$
- String url = ""; //$NON-NLS-1$
- String fullVersion = ""; //$NON-NLS-1$
- if (element.getLength() == 1) {
- NodeList child = element.item(0).getChildNodes();
- // Get basic information
- for (int i = 0; i < child.getLength(); i++) {
- Node node = child.item(i);
- switch (node.getNodeName()) {
- case MIStrings.VERSION_MAJOR:
- major = Integer.parseInt(node.getTextContent());
- break;
- case MIStrings.VERSION_MINOR:
- minor = Integer.parseInt(node.getTextContent());
- break;
- case MIStrings.VERSION_PATCH_LEVEL:
- patchLevel = Integer.parseInt(node.getTextContent());
- break;
- case MIStrings.VERSION_COMMIT:
- commit = node.getTextContent();
- break;
- case MIStrings.VERSION_DESCRIPTION:
- description = node.getTextContent();
- break;
- case MIStrings.VERSION_LICENSE:
- license = node.getTextContent();
- break;
- case MIStrings.VERSION_NAME:
- name = node.getTextContent();
- break;
- case MIStrings.VERSION_STR:
- fullVersion = node.getTextContent();
- break;
- case MIStrings.VERSION_WEB:
- url = node.getTextContent();
- break;
- default:
- break;
- }
- }
- setVersion(new LttngVersion(major, minor, patchLevel, license, commit, name, description, url, fullVersion));
- } else {
- throw new ExecutionException(Messages.TraceControl_UnsupportedVersionError);
- }
- }
-
- @Override
- public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST);
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- Document doc = getDocumentFromStrings(result.getOutput());
-
- NodeList elements = doc.getElementsByTagName(MIStrings.NAME);
-
- ArrayList<String> retArray = new ArrayList<>();
- for (int i = 0; i < elements.getLength(); i++) {
- Node node = elements.item(i);
- if (node.getParentNode().getNodeName().equalsIgnoreCase(MIStrings.SESSION)) {
- retArray.add(node.getTextContent());
- }
- }
- return retArray.toArray(new String[retArray.size()]);
- }
-
- @Override
- public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, sessionName);
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- ISessionInfo sessionInfo = new SessionInfo(sessionName);
- Document document = getDocumentFromStrings(result.getOutput());
-
- NodeList sessionsNode = document.getElementsByTagName(MIStrings.SESSION);
- // There should be only one session
- if (sessionsNode.getLength() != 1) {
- throw new ExecutionException(NLS.bind(Messages.TraceControl_MiInvalidNumberOfElementError, MIStrings.SESSION));
- }
-
- // Populate session information
- Node rawSession = sessionsNode.item(0);
- parseSession(sessionInfo, rawSession);
-
- // Fetch the snapshot info
- if (sessionInfo.isSnapshotSession()) {
- ISnapshotInfo snapshot = getSnapshotInfo(sessionName, monitor);
- sessionInfo.setSnapshotInfo(snapshot);
- }
-
- return sessionInfo;
- }
-
- /**
- * @param sessionInfo
- * @param rawSession
- * @throws ExecutionException
- */
- private void parseSession(ISessionInfo sessionInfo, Node rawSession) throws ExecutionException {
- if (!rawSession.getNodeName().equalsIgnoreCase(MIStrings.SESSION)) {
- throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
- }
- NodeList rawSessionInfos = rawSession.getChildNodes();
- for (int i = 0; i < rawSessionInfos.getLength(); i++) {
- Node rawInfo = rawSessionInfos.item(i);
- switch (rawInfo.getNodeName()) {
- case MIStrings.NAME:
- sessionInfo.setName(rawInfo.getTextContent());
- break;
- case MIStrings.PATH:
- sessionInfo.setSessionPath(rawInfo.getTextContent());
- break;
- case MIStrings.ENABLED:
- sessionInfo.setSessionState(rawInfo.getTextContent());
- break;
- case MIStrings.SNAPSHOT_MODE:
- if (rawInfo.getTextContent().equals(LTTngControlServiceConstants.TRUE_NUMERICAL)) {
- // real name will be set later
- ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
- sessionInfo.setSnapshotInfo(snapshotInfo);
- }
- break;
- case MIStrings.LIVE_TIMER_INTERVAL:
- // TODO : live mode not supported yet in TMF:lttng-control
- break;
- case MIStrings.DOMAINS:
- // Extract the domains node
- NodeList rawDomains = rawInfo.getChildNodes();
- IDomainInfo domain = null;
- for (int j = 0; j < rawDomains.getLength(); j++) {
- if (rawDomains.item(j).getNodeName().equalsIgnoreCase(MIStrings.DOMAIN)) {
- domain = parseDomain(rawDomains.item(j));
- sessionInfo.addDomain(domain);
- }
- }
- break;
- default:
- break;
- }
- }
-
- if (!sessionInfo.isSnapshotSession()) {
- Matcher matcher = LTTngControlServiceConstants.TRACE_NETWORK_PATTERN.matcher(sessionInfo.getSessionPath());
- if (matcher.matches()) {
- sessionInfo.setStreamedTrace(true);
- }
- }
- }
-
- /**
- * Parse a raw domain XML node to a IDomainInfo object
- *
- * @param rawDomain
- * a domain xml node
- * @return a populated {@link DomainInfo} object
- * @throws ExecutionException
- * when missing required xml element (type)
- */
- protected IDomainInfo parseDomain(Node rawDomain) throws ExecutionException {
- IDomainInfo domain = null;
- // Get the type
- Node rawType = getFirstOf(rawDomain.getChildNodes(), MIStrings.TYPE);
- if (rawType == null) {
- throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
- }
- String rawTypeString = rawType.getTextContent().toLowerCase();
- TraceDomainType domainType = TraceDomainType.valueOfString(rawTypeString);
- switch (domainType) {
- case KERNEL:
- domain = new DomainInfo(Messages.TraceControl_KernelProviderDisplayName);
- domain.setIsKernel(true);
- break;
- case UST:
- domain = new DomainInfo(Messages.TraceControl_UstGlobalDomainDisplayName);
- domain.setIsKernel(false);
- break;
- case JUL:
- /**
- * TODO: Support for JUL JUL substructure and semantic is not the
- * same as a regular UST or Kernel Domain There is no channel under
- * JUL domain only events. The channel is activated in UST Channel
- */
- domain = new DomainInfo(Messages.TraceControl_JULDomainDisplayName);
- domain.setIsKernel(false);
- break;
- case UNKNOWN:
- domain = new DomainInfo(Messages.TraceControl_UnknownDomainDisplayName);
- domain.setIsKernel(false);
- break;
- default:
- throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
- }
-
- NodeList rawInfos = rawDomain.getChildNodes();
- for (int i = 0; i < rawInfos.getLength(); i++) {
- Node rawInfo = rawInfos.item(i);
- switch (rawInfo.getNodeName()) {
- case MIStrings.BUFFER_TYPE:
- BufferType bufferType = BufferType.valueOfString(rawInfo.getTextContent());
- domain.setBufferType(bufferType);
- break;
- case MIStrings.CHANNELS:
- ArrayList<IChannelInfo> channels = new ArrayList<>();
- parseChannels(rawInfo.getChildNodes(), channels);
- if (channels.size() > 0) {
- domain.setChannels(channels);
- }
- break;
- default:
- break;
- }
- }
-
- return domain;
- }
-
- /**
- * Parse a list of raw channel XML node into an ArrayList of IChannelInfo
- *
- * @param rawChannes
- * List of raw channel XML node
- * @param channels
- * the parsed channels list
- * @throws ExecutionException
- * when missing required xml element (type)
- */
- private static void parseChannels(NodeList rawChannels, ArrayList<IChannelInfo> channels) throws ExecutionException {
- IChannelInfo channel = null;
- for (int i = 0; i < rawChannels.getLength(); i++) {
- Node rawChannel = rawChannels.item(i);
- if (rawChannel.getNodeName().equalsIgnoreCase(MIStrings.CHANNEL)) {
- channel = new ChannelInfo(""); //$NON-NLS-1$
-
- // Populate the channel
- NodeList rawInfos = rawChannel.getChildNodes();
- Node rawInfo = null;
- for (int j = 0; j < rawInfos.getLength(); j++) {
- rawInfo = rawInfos.item(j);
- switch (rawInfo.getNodeName()) {
- case MIStrings.NAME:
- channel.setName(rawInfo.getTextContent());
- break;
- case MIStrings.ENABLED:
- channel.setState(TraceEnablement.valueOfString(rawInfo.getTextContent()));
- break;
- case MIStrings.EVENTS:
- List<IEventInfo> events = new ArrayList<>();
- getEventInfo(rawInfo.getChildNodes(), events);
- channel.setEvents(events);
- break;
- case MIStrings.ATTRIBUTES:
- NodeList rawAttributes = rawInfo.getChildNodes();
- for (int k = 0; k < rawAttributes.getLength(); k++) {
- Node attribute = rawAttributes.item(k);
- switch (attribute.getNodeName()) {
- case MIStrings.OVERWRITE_MODE:
- channel.setOverwriteMode(!LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE_FALSE_MI.equalsIgnoreCase(attribute.getTextContent()));
- break;
- case MIStrings.SUBBUF_SIZE:
- channel.setSubBufferSize(Long.valueOf(attribute.getTextContent()));
- break;
- case MIStrings.NUM_SUBBUF:
- channel.setNumberOfSubBuffers(Integer.valueOf(attribute.getTextContent()));
- break;
- case MIStrings.SWITCH_TIMER_INTERVAL:
- channel.setSwitchTimer(Long.valueOf(attribute.getTextContent()));
- break;
- case MIStrings.READ_TIMER_INTERVAL:
- channel.setReadTimer(Long.valueOf(attribute.getTextContent()));
- break;
- case MIStrings.OUTPUT_TYPE:
- channel.setOutputType(attribute.getTextContent());
- break;
- case MIStrings.TRACEFILE_SIZE:
- channel.setMaxSizeTraceFiles(Integer.parseInt(attribute.getTextContent()));
- break;
- case MIStrings.TRACEFILE_COUNT:
- channel.setMaxNumberTraceFiles(Integer.parseInt(attribute.getTextContent()));
- break;
- case MIStrings.LIVE_TIMER_INTERVAL:
- // TODO: currently not supported by tmf
- break;
- default:
- break;
- }
- }
- break;
- default:
- break;
- }
- }
- channels.add(channel);
- }
- }
-
- }
-
- @Override
- public ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- // TODO A session can have multiple snapshot output. This need to be
- // supported in the future.
- // Currently the SessionInfo object does not support multiple snashot
- // output.
- // For now only keep the last one.
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_SNAPSHOT_OUTPUT, LTTngControlServiceConstants.OPTION_SESSION, sessionName);
- ICommandResult result = executeCommand(command.toString(), monitor);
- Document doc = getDocumentFromStrings(result.getOutput());
- NodeList rawSnapshotsOutputs = doc.getElementsByTagName(MIStrings.SNAPSHOT_OUTPUTS);
-
- ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
-
- // TODO: tmf does not have a notion of a ctrl url.
- for (int i = 0; i < rawSnapshotsOutputs.getLength(); i++) {
- NodeList rawSnapshotOutput = rawSnapshotsOutputs.item(i).getChildNodes();
- for (int j = 0; j < rawSnapshotOutput.getLength(); j++) {
- Node rawInfo = rawSnapshotOutput.item(j);
- switch (rawInfo.getNodeName()) {
- case MIStrings.ID:
- snapshotInfo.setId(Integer.parseInt(rawInfo.getTextContent()));
- break;
- case MIStrings.NAME:
- snapshotInfo.setName(rawInfo.getTextContent());
- break;
- case MIStrings.SNAPSHOT_CTRL_URL:
- // The use of the ctrl_url for the snapshot path is to assure
- // basic support. Refactoring is necessary in lttng and
- // tmf side.
- // See http://bugs.lttng.org/issues/828 (+comment)
- snapshotInfo.setSnapshotPath(rawInfo.getTextContent());
- break;
- default:
- break;
- }
- }
- }
-
- // Check if the snapshot output is Streamed
- Matcher matcher2 = LTTngControlServiceConstants.TRACE_NETWORK_PATTERN.matcher(snapshotInfo.getSnapshotPath());
- if (matcher2.matches()) {
- snapshotInfo.setStreamedSnapshot(true);
- }
-
- return snapshotInfo;
- }
-
- @Override
- public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
- ICommandResult result = executeCommand(command.toString(), monitor, false);
- List<IBaseEventInfo> events = new ArrayList<>();
-
- if (isError(result) && result.getErrorOutput() != null) {
- // Ignore the following 2 cases:
- // Spawning a session daemon
- // Error: Unable to list kernel events
- // or:
- // Error: Unable to list kernel events
- if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) {
- return events;
- }
- throw new ExecutionException(Messages.TraceControl_CommandError + LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
- }
-
- Document document = getDocumentFromStrings(result.getOutput());
- NodeList rawEvents = document.getElementsByTagName(MIStrings.EVENT);
- getBaseEventInfo(rawEvents, events);
- return events;
- }
-
- @Override
- public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException {
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_UST);
- // Get the field to
- command.append(LTTngControlServiceConstants.OPTION_FIELDS);
-
- // Execute
- ICommandResult result = executeCommand(command.toString(), monitor, false);
- List<IUstProviderInfo> allProviders = new ArrayList<>();
-
- if (isError(result) && result.getErrorOutput() != null) {
- // Ignore the following 2 cases:
- // Spawning a session daemon
- // Error: Unable to list UST events: Listing UST events failed
- // or:
- // Error: Unable to list UST events: Listing UST events failed
- if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_UST_NO_UST_PROVIDER_PATTERN)) {
- return allProviders;
- }
- throw new ExecutionException(Messages.TraceControl_CommandError + LTTngControlServiceConstants.COMMAND_LIST_UST);
- }
-
- Document document = getDocumentFromStrings(result.getOutput());
- NodeList rawProviders = document.getElementsByTagName(MIStrings.PID);
-
- IUstProviderInfo providerInfo = null;
-
- for (int i = 0; i < rawProviders.getLength(); i++) {
- Node provider = rawProviders.item(i);
- Node name = getFirstOf(provider.getChildNodes(), MIStrings.NAME);
- if (name == null) {
- throw new ExecutionException(Messages.TraceControl_MiInvalidProviderError);
- }
- providerInfo = new UstProviderInfo(name.getTextContent());
-
- // Populate provider
- NodeList infos = provider.getChildNodes();
- for (int j = 0; j < infos.getLength(); j++) {
- Node info = infos.item(j);
- switch (info.getNodeName()) {
- case MIStrings.PID_ID:
- providerInfo.setPid(Integer.parseInt(info.getTextContent()));
- break;
- case MIStrings.EVENTS:
- List<IBaseEventInfo> events = new ArrayList<>();
- NodeList rawEvents = info.getChildNodes();
- getBaseEventInfo(rawEvents, events);
- providerInfo.setEvents(events);
- break;
- default:
- break;
- }
- }
- allProviders.add(providerInfo);
- }
-
- return allProviders;
- }
-
- @Override
- public ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
- if (sessionInfo.isStreamedTrace()) {
- return createStreamedSession(sessionInfo, monitor);
- }
-
- StringBuffer command = prepareSessionCreationCommand(sessionInfo);
-
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- Document document = getDocumentFromStrings(result.getOutput());
- NodeList sessions = document.getElementsByTagName(MIStrings.SESSION);
-
- // Number of session should be equal to 1
- if (sessions.getLength() != 1) {
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" //$NON-NLS-1$//$NON-NLS-2$
- + NLS.bind(Messages.TraceControl_UnexpectedNumberOfElementError, MIStrings.SESSION) + " " + sessions.getLength()); //$NON-NLS-1$
- }
-
- // Fetch a session from output
- ISessionInfo outputSession = new SessionInfo(""); //$NON-NLS-1$
- parseSession(outputSession, sessions.item(0));
-
- // Verify session name
- if ((outputSession.getName().equals("")) || (!"".equals(sessionInfo.getName()) && !outputSession.getName().equals(sessionInfo.getName()))) { //$NON-NLS-1$ //$NON-NLS-2$
- // Unexpected name returned
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedNameError + ": " + outputSession.getName()); //$NON-NLS-1$
- }
-
- // Verify session path
- if (!sessionInfo.isSnapshotSession() &&
- ((outputSession.getSessionPath() == null) || ((sessionInfo.getSessionPath() != null) && (!outputSession.getSessionPath().contains(sessionInfo.getSessionPath()))))) {
- // Unexpected path
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedPathError + ": " + outputSession.getName()); //$NON-NLS-1$
- }
-
- if (sessionInfo.isSnapshotSession()) {
- // Make it a snapshot session - content of snapshot info need to
- // set afterwards using getSession() or getSnapshotInfo()
- outputSession.setSnapshotInfo(new SnapshotInfo("")); //$NON-NLS-1$
- }
-
- return outputSession;
- }
-
- private ISessionInfo createStreamedSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
-
- StringBuffer command = prepareStreamedSessionCreationCommand(sessionInfo);
-
- ICommandResult result = executeCommand(command.toString(), monitor);
-
- Document document = getDocumentFromStrings(result.getOutput());
- NodeList sessions = document.getElementsByTagName(MIStrings.SESSION);
-
- // Number of session should be equal to 1
- if (sessions.getLength() != 1) {
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" //$NON-NLS-1$//$NON-NLS-2$
- + NLS.bind(Messages.TraceControl_UnexpectedNumberOfElementError, MIStrings.SESSION) + " " + sessions.getLength()); //$NON-NLS-1$
- }
-
- // Fetch a session from output
- ISessionInfo outputSession = new SessionInfo(""); //$NON-NLS-1$
- parseSession(outputSession, sessions.item(0));
-
- // Verify session name
- if ((outputSession.getName().equals("")) || (!"".equals(sessionInfo.getName()) && !outputSession.getName().equals(sessionInfo.getName()))) { //$NON-NLS-1$ //$NON-NLS-2$
- // Unexpected name returned
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedNameError + ": " + outputSession.getName()); //$NON-NLS-1$
- }
-
- sessionInfo.setName(outputSession.getName());
- sessionInfo.setStreamedTrace(true);
-
- // Verify session path
- if (sessionInfo.getNetworkUrl() != null) {
- if (!sessionInfo.isSnapshotSession() && (outputSession.getSessionPath() == null)) {
- // Unexpected path
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
- Messages.TraceControl_UnexpectedPathError + ": " + outputSession.getName()); //$NON-NLS-1$
- }
-
- if (sessionInfo.isSnapshotSession()) {
- sessionInfo.setStreamedTrace(false);
- } else {
- sessionInfo.setSessionPath(outputSession.getSessionPath());
- // Check file protocol
- Matcher matcher = LTTngControlServiceConstants.TRACE_FILE_PROTOCOL_PATTERN.matcher(outputSession.getSessionPath());
- if (matcher.matches()) {
- sessionInfo.setStreamedTrace(false);
- }
- }
- }
-
- // When using controlUrl and dataUrl the full session path is not known
- // yet
- // and will be set later on when listing the session
- return sessionInfo;
-
- }
-
- @Override
- public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
- String newName = formatParameter(sessionName);
-
- StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DESTROY_SESSION, newName);
-
- ICommandResult result = executeCommand(command.toString(), monitor, false);
- String[] errorOutput = result.getErrorOutput();
-
- if (isError(result) && (errorOutput != null)) {
- // Don't treat this as an error
- if (ignoredPattern(errorOutput, LTTngControlServiceConstants.SESSION_NOT_FOUND_ERROR_PATTERN)) {
- return;
-
- }
- throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
- }
-
- // Check for action effect
- Document doc = getDocumentFromStrings(result.getOutput());
- NodeList sessions = doc.getElementsByTagName(MIStrings.SESSION);
- if (sessions.getLength() != 1) {
- throw new ExecutionException(NLS.bind(Messages.TraceControl_MiInvalidNumberOfElementError, MIStrings.SESSION));
- }
-
- Node rawSessionName = getFirstOf(sessions.item(0).getChildNodes(), MIStrings.NAME);
- if (rawSessionName == null) {
- throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
- }
-
- // Validity check
- if (!rawSessionName.getTextContent().equals(sessionName)) {
- throw new ExecutionException(NLS.bind(Messages.TraceControl_UnexpectedValueError, rawSessionName.getTextContent(), sessionName));
- }
- }
-
- /**
- * @param strings
- * array of string that make up a command line
- * @return string buffer with created command line
- */
- @Override
- protected StringBuffer createCommand(String... strings) {
- StringBuffer command = new StringBuffer();
- command.append(LTTngControlServiceConstants.CONTROL_COMMAND_MI_XML);
- command.append(getTracingGroupOption());
- for (String string : strings) {
- command.append(string);
- }
- return command;
- }
-
- /**
- * @param xmlBaseEvents
- * a Node list of base xml event element
- * @param events
- * list of event generated by the parsing of the xml event
- * element
- * @throws ExecutionException
- * when a raw event is not a complete/valid xml event
- */
- private static void getBaseEventInfo(NodeList xmlBaseEvents, List<IBaseEventInfo> events) throws ExecutionException {
- IBaseEventInfo eventInfo = null;
- for (int i = 0; i < xmlBaseEvents.getLength(); i++) {
- NodeList rawInfos = xmlBaseEvents.item(i).getChildNodes();
- // Search for name
- if (xmlBaseEvents.item(i).getNodeName().equalsIgnoreCase(MIStrings.EVENT)) {
- Node rawName = getFirstOf(rawInfos, MIStrings.NAME);
- if (rawName == null) {
- throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
- }
- eventInfo = new BaseEventInfo(rawName.getTextContent());
-
- // Populate the event
- for (int j = 0; j < rawInfos.getLength(); j++) {
- Node infoNode = rawInfos.item(j);
- switch (infoNode.getNodeName()) {
- case MIStrings.TYPE:
- eventInfo.setEventType(infoNode.getTextContent());
- break;
- case MIStrings.LOGLEVEL:
- eventInfo.setLogLevel(infoNode.getTextContent());
- break;
- case MIStrings.EVENT_FIELDS:
- List<IFieldInfo> fields = new ArrayList<>();
- getFieldInfo(infoNode.getChildNodes(), fields);
- eventInfo.setFields(fields);
- break;
- default:
- break;
- }
- }
- events.add(eventInfo);
- }
- }
- }
-
- /**
- * @param xmlBaseEvents
- * a Node list of xml event element linked to a session
- * @param events
- * list of event generated by the parsing of the xml event
- * element
- * @throws ExecutionException
- * when a raw event is not a complete/valid xml event
- */
- static void getEventInfo(NodeList xmlEvents, List<IEventInfo> events) throws ExecutionException {
- IEventInfo eventInfo = null;
- for (int i = 0; i < xmlEvents.getLength(); i++) {
- NodeList rawInfos = xmlEvents.item(i).getChildNodes();
- // Search for name
- if (xmlEvents.item(i).getNodeName().equalsIgnoreCase(MIStrings.EVENT)) {
- Node rawName = getFirstOf(rawInfos, MIStrings.NAME);
- if (rawName == null) {
- throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
- }
-
- eventInfo = new EventInfo(rawName.getTextContent());
-
- // Basic information
- for (int j = 0; j < rawInfos.getLength(); j++) {
- Node infoNode = rawInfos.item(j);
- switch (infoNode.getNodeName()) {
- case MIStrings.TYPE:
- eventInfo.setEventType(infoNode.getTextContent());
- break;
- case MIStrings.LOGLEVEL_TYPE:
- eventInfo.setLogLevelType(LogLevelType.valueOfString(infoNode.getTextContent()));
- break;
- case MIStrings.LOGLEVEL:
- eventInfo.setLogLevel(TraceLogLevel.valueOfString(infoNode.getTextContent()));
- break;
- case MIStrings.ENABLED:
- eventInfo.setState(TraceEnablement.valueOfString(infoNode.getTextContent()));
- break;
- case MIStrings.FILTER:
- // TODO
- // See bug 334 http://bugs.lttng.org/issues/334 from
- // LTTng
- // For now we emulate the non-mi behavior and simply put
- // "with filter"
- eventInfo.setFilterExpression("with filter"); //$NON-NLS-1$
- break;
- case MIStrings.EXCLUSION:
- // TODO: Currently not supported by tmf
- // ExclusionS element is ignored
- break;
- default:
- break;
- }
- }
-
- boolean isProbeFunction = (eventInfo.getEventType().equals(TraceEventType.PROBE)) || (eventInfo.getEventType().equals(TraceEventType.FUNCTION));
- if (isProbeFunction) {
- IProbeEventInfo probeEvent = new ProbeEventInfo(eventInfo);
- eventInfo = probeEvent;
-
- Node rawDataNode = null;
- switch (probeEvent.getEventType()) {
- case FUNCTION:
- case PROBE: {
- // get attributes
- Node rawAttributes = getFirstOf(rawInfos, MIStrings.ATTRIBUTES);
- if (rawAttributes == null) {
- throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
- }
- rawDataNode = getFirstOf(rawAttributes.getChildNodes(), MIStrings.PROBE_ATTRIBUTES);
- break;
- }
- case SYSCALL:
- case TRACEPOINT:
- case UNKNOWN:
- default:
- throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
- }
-
- if (rawDataNode == null) {
- throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
- }
-
- // Extract info
- NodeList rawDatas = rawDataNode.getChildNodes();
- for (int j = 0; j < rawDatas.getLength(); j++) {
- Node rawData = rawDatas.item(j);
- switch (rawData.getNodeName()) {
- case MIStrings.SYMBOL_NAME:
- probeEvent.setSymbol(rawData.getTextContent());
- break;
- case MIStrings.ADDRESS:
- probeEvent.setAddress(String.format("%#016x", new BigInteger(rawData.getTextContent()))); //$NON-NLS-1$
- break;
- case MIStrings.OFFSET:
- probeEvent.setOffset(String.format("%#016x", new BigInteger(rawData.getTextContent()))); //$NON-NLS-1$
- break;
- default:
- break;
- }
- }
- }
-
- // Syscalls does not have name.
- // Let put one to make sure this is user friendly via UI
- if (eventInfo.getEventType().equals(TraceEventType.SYSCALL)) {
- eventInfo.setName(TraceEventType.SYSCALL.getInName());
- }
-
- // Add the event
- events.add(eventInfo);
- }
- }
- }
-
- /**
- * @param fieldsList
- * a list of xml event_field element
- * @param fields
- * a list of field generated by xml parsing
- * @throws ExecutionException
- * when parsing fail or required elements are missing
- */
- private static void getFieldInfo(NodeList fieldsList, List<IFieldInfo> fields) throws ExecutionException {
- IFieldInfo fieldInfo = null;
- for (int i = 0; i < fieldsList.getLength(); i++) {
- Node field = fieldsList.item(i);
- if (field.getNodeName().equalsIgnoreCase(MIStrings.EVENT_FIELD)) {
- // Get name
- Node name = getFirstOf(field.getChildNodes(), MIStrings.NAME);
- if (name == null) {
- throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
- }
- fieldInfo = new FieldInfo(name.getTextContent());
-
- // Populate the field information
- NodeList infos = field.getChildNodes();
- for (int j = 0; j < infos.getLength(); j++) {
- Node info = infos.item(j);
- switch (info.getNodeName()) {
- case MIStrings.TYPE:
- fieldInfo.setFieldType(info.getTextContent());
- break;
- default:
- break;
- }
- }
- fields.add(fieldInfo);
- }
- }
- }
-
- /**
- * Retrieve the fist instance of a given node with tag name equal to tagName
- * parameter
- *
- * @param nodeList
- * the list of Node to search against
- * @param tagName
- * the tag name of the desired node
- * @return the first occurrence of a node with a tag name equals to tagName
- */
- private static Node getFirstOf(NodeList nodeList, String tagName) {
- Node node = null;
- for (int i = 0; i < nodeList.getLength(); i++) {
- if (nodeList.item(i).getNodeName() == tagName) {
- node = nodeList.item(i);
- break;
- }
- }
- return node;
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013, 2014 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:
- * Bernd Hufmann - Initial API and implementation
- * Jonathan Rajotte - Machine interface support and new information
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import org.osgi.framework.Version;
-
-/**
- * A version implementation with a special compareTo implementation to bypass
- * problems of older implementation of org.osgi.framework.Version.
- *
- * @author Bernd Hufmann
- */
-public class LttngVersion extends Version {
-
- private final String fLicense;
- private final String fCommit;
- private final String fName;
- private final String fDescription;
- private final String fUrl;
- private final String fFullVersion;
-
- /**
- * Constructor
- *
- * @param version
- * The version string
- */
- public LttngVersion(String version) {
- super(version);
- fLicense = ""; //$NON-NLS-1$
- fCommit = ""; //$NON-NLS-1$
- fName = ""; //$NON-NLS-1$
- fDescription = ""; //$NON-NLS-1$
- fUrl = ""; //$NON-NLS-1$
- fFullVersion = ""; //$NON-NLS-1$
- }
-
- /**
- * @param major
- * major version number
- * @param minor
- * minor version number
- * @param micro
- * micro version number
- * @param license
- * licence text of LTTng
- * @param commit
- * current git commit information about LTTng
- * @param name
- * name of the version
- * @param description
- * description of the version
- * @param url
- * url to website
- * @param fullVersion
- * complete string representation of the version
- */
- public LttngVersion(int major, int minor, int micro, String license, String commit, String name, String description, String url, String fullVersion) {
- super(major, minor, micro);
- fLicense = license;
- fCommit = commit;
- fName = name;
- fDescription = description;
- fUrl = url;
- fFullVersion = fullVersion;
- }
-
- /**
- * Special compareTo method to fix problem of older implementations of
- * org.osgi.framework.Version where {@code Version.compareTo} takes an
- * {@code Object} instead a {@code Version} as argument.
- *
- * @param other
- * - Other version to compare
- * @return a negative integer, zero, or a positive integer if this version
- * is less than, equal to, or greater than the specified
- * {@code LttngVersion} object.
- */
- public int compareTo(LttngVersion other) {
- if (other == this) { // quicktest
- return 0;
- }
- int result = getMajor() - other.getMajor();
- if (result != 0) {
- return result;
- }
-
- result = getMinor() - other.getMinor();
- if (result != 0) {
- return result;
- }
-
- result = getMicro() - other.getMicro();
- if (result != 0) {
- return result;
- }
- return getQualifier().compareTo(other.getQualifier());
- }
-
- /**
- * @return String representing the lttng license
- */
- public String getLicense() {
- return fLicense;
- }
-
- /**
- * @return commit id of lttng
- */
- public String getCommit() {
- return fCommit;
- }
-
- /**
- * @return name of lttng version
- */
- public String getName() {
- return fName;
- }
-
- /**
- * @return full description of lttng
- */
- public String getDescription() {
- return fDescription;
- }
-
- /**
- * @return url of lttng
- */
- public String getUrl() {
- return fUrl;
- }
-
- /**
- * @return the full_version
- */
- public String getFullVersion() {
- return fFullVersion;
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Jonathan Rajotte Julien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-
-/**
- * Non-externalized strings for use with the LTTng Control services. This
- * nformation is extracted from mi_lttng.xsd from lttng-tool libmi.
- *
- * @author Jonathan Rajotte
- */
-@SuppressWarnings("nls")
-@NonNullByDefault
-public interface MIStrings {
-
- /**
- * Represent the command_action xml element
- */
- String COMMAND_ACTION = "snapshot_action";
-
- /**
- * Represent the command_add_context xml element
- */
- String COMMAND_ADD_CONTEXT = "add-context";
-
- /**
- * Represent the command_calibrate xml element
- */
- String COMMAND_CALIBRATE = "calibrate";
-
- /**
- * Represent the command_create xml element
- */
- String COMMAND_CREATE = "create";
-
- /**
- * Represent the command_destroy xml element
- */
- String COMMAND_DESTROY = "destroy";
-
- /**
- * Represent the command_disable_channel xml element
- */
- String COMMAND_DISABLE_CHANNEL = "disable-channel";
-
- /**
- * Represent the command_disable_event xml element
- */
- String COMMAND_DISABLE_EVENT = "disable-event";
-
- /**
- * Represent the command_enable_channels xml element
- */
- String COMMAND_ENABLE_CHANNELS = "enable-channel";
-
- /**
- * Represent the command_enable_event xml element
- */
- String COMMAND_ENABLE_EVENT = "enable-event";
-
- /**
- * Represent the command_list xml element
- */
- String COMMAND_LIST = "list";
-
- /**
- * Represent the command_load xml element
- */
- String COMMAND_LOAD = "load";
-
- /**
- * Represent the command_name xml element
- */
- String COMMAND_NAME = "name";
-
- /**
- * Represent the command_output xml element
- */
- String COMMAND_OUTPUT = "output";
-
- /**
- * Represent the command_save xml element
- */
- String COMMAND_SAVE = "save";
-
- /**
- * Represent the command_set_session xml element
- */
- String COMMAND_SET_SESSION = "set-session";
-
- /**
- * Represent the command_snapshot xml element
- */
- String COMMAND_SNAPSHOT = "snapshot";
-
- /**
- * Represent the command_snapshot_add xml element
- */
- String COMMAND_SNAPSHOT_ADD = "add_snapshot";
-
- /**
- * Represent the command_snapshot_del xml element
- */
- String COMMAND_SNAPSHOT_DEL = "del_snapshot";
-
- /**
- * Represent the command_snapshot_list xml element
- */
- String COMMAND_SNAPSHOT_LIST = "list_snapshot";
-
- /**
- * Represent the command_snapshot_record xml element
- */
- String COMMAND_SNAPSHOT_RECORD = "record_snapshot";
-
- /**
- * Represent the command_start xml element
- */
- String COMMAND_START = "start";
-
- /**
- * Represent the command_stop xml element
- */
- String COMMAND_STOP = "stop";
-
- /**
- * Represent the command_success xml element
- */
- String COMMAND_SUCCESS = "success";
-
- /**
- * Represent the command_version xml element
- */
- String COMMAND_VERSION = "version";
-
- /**
- * Represent the version xml element
- */
- String VERSION = "version";
-
- /**
- * Represent the version_commit xml element
- */
- String VERSION_COMMIT = "commit";
-
- /**
- * Represent the version_description xml element
- */
- String VERSION_DESCRIPTION = "description";
-
- /**
- * Represent the version_license xml element
- */
- String VERSION_LICENSE = "license";
-
- /**
- * Represent the version_major xml element
- */
- String VERSION_MAJOR = "major";
-
- /**
- * Represent the version_minor xml element
- */
- String VERSION_MINOR = "minor";
-
- /**
- * Represent the version_patch_level xml element
- */
- String VERSION_PATCH_LEVEL = "patchLevel";
-
- /**
- * Represent the version_str xml element
- */
- String VERSION_STR = "string";
-
- /**
- * Represent the version_web xml element
- */
- String VERSION_WEB = "url";
-
- /**
- * Represent the version_name xml element
- */
- String VERSION_NAME = "name";
- /* String related to a lttng_event_field */
-
- /**
- * Represent the event_field xml element
- */
- String EVENT_FIELD = "event_field";
-
- /**
- * Represent the event_fields xml element
- */
- String EVENT_FIELDS = "event_fields";
-
- /**
- * Represent the perf_counter_context xml element
- */
- String PERF_COUNTER_CONTEXT = "perf_counter_context";
-
- // ------------------------------------------------------------------------
- // String related to pid
- // ------------------------------------------------------------------------/
-
- /**
- * Represent the pids xml element
- */
- String PIDS = "pids";
-
- /**
- * Represent the pid xml element
- */
- String PID = "pid";
-
- /**
- * Represent the pid_id xml element
- */
- String PID_ID = "id";
-
- // ------------------------------------------------------------------------
- // String related to save command
- // ------------------------------------------------------------------------
- /**
- * Represent the save xml element
- */
- String SAVE = "save";
-
- // ------------------------------------------------------------------------
- // String related to load command
- // ------------------------------------------------------------------------
- /**
- * Represent the load xml element
- */
- String LOAD = "load";
-
- // ------------------------------------------------------------------------
- // String related to general element of mi_lttng
- // ------------------------------------------------------------------------
- /**
- * Represent the empty xml element
- */
- String EMPTY = "";
-
- /**
- * Represent the id xml element
- */
- String ID = "id";
-
- /**
- * Represent the nowrite xml element
- */
- String NOWRITE = "nowrite";
-
- /**
- * Represent the success xml element
- */
- String SUCCESS = "success";
-
- /**
- * Represent the type_enum xml element
- */
- String TYPE_ENUM = "ENUM";
-
- /**
- * Represent the type_float xml element
- */
- String TYPE_FLOAT = "FLOAT";
-
- /**
- * Represent the type_integer xml element
- */
- String TYPE_INTEGER = "INTEGER";
-
- /**
- * Represent the type_other xml element
- */
- String TYPE_OTHER = "OTHER";
-
- /**
- * Represent the type_string xml element
- */
- String TYPE_STRING = "STRING";
-
- // ------------------------------------------------------------------------
- // String related to lttng_calibrate
- // ------------------------------------------------------------------------
- /**
- * Represent the calibrate xml element
- */
- String CALIBRATE = "calibrate";
-
- /**
- * Represent the calibrate_function xml element
- */
- String CALIBRATE_FUNCTION = "FUNCTION";
-
- // ------------------------------------------------------------------------
- // String related to a lttng_snapshot_output
- // ------------------------------------------------------------------------
- /**
- * Represent the snapshot_ctrl_url xml element
- */
- String SNAPSHOT_CTRL_URL = "ctrl_url";
-
- /**
- * Represent the snapshot_data_url xml element
- */
- String SNAPSHOT_DATA_URL = "data_url";
-
- /**
- * Represent the snapshot_max_size xml element
- */
-
- String SNAPSHOT_MAX_SIZE = "max_size";
-
- /**
- * Represent the snapshot_n_ptr xml element
- */
- String SNAPSHOT_N_PTR = "n_ptr";
-
- /**
- * Represent the snapshot_session_name xml element
- */
- String SNAPSHOT_SESSION_NAME = "session_name";
-
- /**
- * Represent the snapshots xml element
- */
- String SNAPSHOTS = "snapshots";
- /**
- * Represent the channel xml element
- */
- String CHANNEL = "channel";
-
- /**
- * Represent the channels xml element
- */
- String CHANNELS = "channels";
-
- /**
- * Represent the domain xml element
- */
- String DOMAIN = "domain";
-
- /**
- * Represent the domains xml element
- */
- String DOMAINS = "domains";
-
- /**
- * Represent the event xml element
- */
- String EVENT = "event";
-
- /**
- * Represent the events xml element
- */
- String EVENTS = "events";
-
- /**
- * Represent the context xml element
- */
- String CONTEXT = "context";
-
- /**
- * Represent the contexts xml element
- */
- String CONTEXTS = "contexts";
-
- /**
- * Represent the attributes xml element
- */
- String ATTRIBUTES = "attributes";
-
- /**
- * Represent the exclusion xml element
- */
- String EXCLUSION = "exclusion";
-
- /**
- * Represent the exclusions xml element
- */
- String EXCLUSIONS = "exclusions";
-
- /**
- * Represent the function_attributes xml element
- */
- String FUNCTION_ATTRIBUTES = "function_attributes";
-
- /**
- * Represent the probe_attributes xml element
- */
- String PROBE_ATTRIBUTES = "probe_attributes";
-
- /**
- * Represent the symbol_name xml element
- */
- String SYMBOL_NAME = "symbol_name";
-
- /**
- * Represent the address xml element
- */
- String ADDRESS = "address";
-
- /**
- * Represent the offset xml element
- */
- String OFFSET = "offset";
-
- /**
- * Represent the name xml element
- */
- String NAME = "name";
-
- /**
- * Represent the enabled xml element
- */
- String ENABLED = "enabled";
-
- /**
- * Represent the overwrite_mode xml element
- */
- String OVERWRITE_MODE = "overwrite_mode";
-
- /**
- * Represent the subbuf_size xml element
- */
- String SUBBUF_SIZE = "subbuffer_size";
-
- /**
- * Represent the num_subbuf xml element
- */
- String NUM_SUBBUF = "subbuffer_count";
-
- /**
- * Represent the switch_timer_interval xml element
- */
- String SWITCH_TIMER_INTERVAL = "switch_timer_interval";
-
- /**
- * Represent the read_timer_interval xml element
- */
- String READ_TIMER_INTERVAL = "read_timer_interval";
-
- /**
- * Represent the output xml element
- */
- String OUTPUT = "output";
-
- /**
- * Represent the output_type xml element
- */
- String OUTPUT_TYPE = "output_type";
-
- /**
- * Represent the tracefile_size xml element
- */
- String TRACEFILE_SIZE = "tracefile_size";
-
- /**
- * Represent the tracefile_count xml element
- */
- String TRACEFILE_COUNT = "tracefile_count";
-
- /**
- * Represent the live_timer_interval xml element
- */
- String LIVE_TIMER_INTERVAL = "live_timer_interval";
-
- /**
- * Represent the type xml element
- */
- String TYPE = "type";
-
- /**
- * Represent the buffer_type xml element
- */
- String BUFFER_TYPE = "buffer_type";
-
- /**
- * Represent the session xml element
- */
- String SESSION = "session";
-
- /**
- * Represent the sessions xml element
- */
- String SESSIONS = "sessions";
-
- /**
- * Represent the perf xml element
- */
- String PERF = "perf";
-
- /**
- * Represent the config xml element
- */
- String CONFIG = "config";
-
- /**
- * Represent the started xml element
- */
- String STARTED = "started";
-
- /**
- * Represent the snapshot_mode xml element
- */
- String SNAPSHOT_MODE = "snapshot_mode";
-
- /**
- * Represent the loglevel xml element
- */
- String LOGLEVEL = "loglevel";
-
- /**
- * Represent the loglevel_type xml element
- */
- String LOGLEVEL_TYPE = "loglevel_type";
-
- /**
- * Represent the filter xml element
- */
- String FILTER = "filter";
-
- /**
- * Represent the snapshot_outputs xml element
- */
- String SNAPSHOT_OUTPUTS = "snapshot";
-
- /**
- * Represent the consumer_output xml element
- */
- String CONSUMER_OUTPUT = "consumer_output";
-
- /**
- * Represent the destination xml element
- */
- String DESTINATION = "destination";
-
- /**
- * Represent the path xml element
- */
- String PATH = "path";
-
- /**
- * Represent the net_output xml element
- */
- String NET_OUTPUT = "net_output";
-
- /**
- * Represent the control_uri xml element
- */
- String CONTROL_URI = "control_uri";
-
- /**
- * Represent the data_uri xml element
- */
- String DATA_URI = "data_uri";
-
- /**
- * Represent the max_size xml element
- */
- String MAX_SIZE = "max_size";
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.control</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-bin.includes = feature.xml,\
- feature.properties,\
- p2.inf
-src.includes = sourceTemplateFeature/p2.inf
+++ /dev/null
-###############################################################################
-# Copyright (c) 2012, 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-featureName=Linux Tools LTTng Tracer Control
-
-description=Plug-ins to integrate LTTng tracer control into the workbench. \
-Includes the TMF (Tracing and Monitoring Framework) and CTF (Common Trace Format) features.
-
-featureProvider=Eclipse Linux Tools
-
-copyright=Copyright 2013 Ericsson
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.linuxtools.lttng2.control"
- label="%featureName"
- version="3.2.0.qualifier"
- provider-name="%featureProvider"
- license-feature="org.eclipse.license"
- license-feature-version="0.0.0">
-
- <description url="http://www.example.com/description">
- %description
- </description>
-
- <copyright url="http://www.example.com/copyright">
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="Linux Tools Update Site" url="http://download.eclipse.org/linuxtools/update"/>
- </url>
-
- <includes
- id="org.eclipse.linuxtools.tmf.ctf"
- version="0.0.0"/>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.linuxtools.lttng2.control.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.tmf.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.tmf.ui" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.help"/>
- <import feature="org.eclipse.rse" version="3.1.100" match="greaterOrEqual"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.lttng2.control.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.lttng2.control.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.lttng.help"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
+++ /dev/null
-instructions.configure=\
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
-
-update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.lttng2.feature.group' || pc.name == 'org.eclipse.linuxtools.lttng2.control.feature.group'))
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.control</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
-
- <name>Linux Tools LTTng (Linux Tracing Toolkit) Feature</name>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- <configuration>
- <excludes>
- <plugin id="org.eclipse.linuxtools.lttng.help"/>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attached-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+++ /dev/null
-instructions.configure=\
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
-
-update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.lttng2.source.feature.group' || pc.name == 'org.eclipse.linuxtools.lttng2.control.source.feature.group'))
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="src" path="perf"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.kernel.core.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.core.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core,
- org.eclipse.linuxtools.tmf.ctf.core.tests,
- org.eclipse.linuxtools.lttng2.kernel.core;bundle-version="3.1.0",
- org.eclipse.core.resources,
- org.eclipse.linuxtools.statesystem.core,
- org.eclipse.linuxtools.lttng2.control.core
-Export-Package: org.eclipse.linuxtools.lttng2.kernel.core.tests,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis;x-internal:=true,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;x-internal:=true,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.perf,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis;x-internal:=true,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;x-internal:=true
-Import-Package: com.google.common.collect,
- org.eclipse.test.performance
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/,\
- perf/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Alexandre Montplaisir - Initial implementation and API
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Run all performance test suites.
- *
- * @author Alexandre Montplaisir
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis.AllPerfTests.class,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching.AllPerfTests.class
-})
-public class AllPerfTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- AnalysisBenchmark.class
-})
-public class AllPerfTests {
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- * Alexandre Montplaisir - Convert to org.eclipse.test.performance test
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.File;
-
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
-import org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.linuxtools.tmf.core.tests.shared.TmfTestHelper;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.junit.Test;
-
-/**
- * This is a test of the time to build a kernel state system
- *
- * @author Genevieve Bastien
- */
-public class AnalysisBenchmark {
-
- private static final String TEST_ID = "org.eclipse.linuxtools#LTTng kernel analysis";
- private static final int LOOP_COUNT = 25;
-
- /**
- * Run the benchmark with "trace2"
- */
- @Test
- public void testTrace2() {
- runTest(CtfTmfTestTrace.TRACE2, "Trace2");
- }
-
- private static void runTest(CtfTmfTestTrace testTrace, String testName) {
- assumeTrue(testTrace.exists());
-
- Performance perf = Performance.getDefault();
- PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + '#' + testName);
- perf.tagAsSummary(pm, "LTTng Kernel Analysis: " + testName, Dimension.CPU_TIME);
-
- if (testTrace == CtfTmfTestTrace.TRACE2) {
- /* Do not show all traces in the global summary */
- perf.tagAsGlobalSummary(pm, "LTTng Kernel Analysis: " + testName, Dimension.CPU_TIME);
- }
-
- for (int i = 0; i < LOOP_COUNT; i++) {
- try (IAnalysisModule module = new LttngKernelAnalysisModule();
- LttngKernelTrace trace = new LttngKernelTrace()) {
- module.setId("test");
- trace.initTrace(null, testTrace.getPath(), CtfTmfEvent.class);
- module.setTrace(trace);
-
- pm.start();
- TmfTestHelper.executeAnalysis(module);
- pm.stop();
-
- /*
- * Delete the supplementary files, so that the next iteration
- * rebuilds the state system.
- */
- File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
- for (File file : suppDir.listFiles()) {
- file.delete();
- }
-
- } catch (TmfAnalysisException | TmfTraceException e) {
- fail(e.getMessage());
- }
-
- }
- pm.commit();
- testTrace.dispose();
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- EventMatchingBenchmark.class,
- TraceSynchronizationBenchmark.class
-})
-public class AllPerfTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching;
-
-import static org.junit.Assume.assumeTrue;
-
-import java.util.Set;
-
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Benchmark simple event matching, without trace synchronization
- *
- * @author Geneviève Bastien
- */
-public class EventMatchingBenchmark {
-
- private static final String TEST_ID = "org.eclipse.linuxtools#Event matching#";
- private static final String TIME = " (time)";
- private static final String MEMORY = " (memory usage)";
- private static final String TEST_SUMMARY = "Event matching";
-
- /**
- * Initialize some data
- */
- @BeforeClass
- public static void setUp() {
- TmfEventMatching.registerMatchObject(new TcpEventMatching());
- TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
- }
-
- /**
- * Run the benchmark with 2 small traces
- */
- @Test
- public void testSmallTraces() {
- assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
- assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
- Set<ITmfTrace> traces = ImmutableSet.of((ITmfTrace) trace1, trace2);
- runCpuTest(traces, "Match TCP events", 100);
- }
- }
-
- /**
- * Run the benchmark with 3 bigger traces
- */
- @Test
- public void testDjangoTraces() {
- assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
- assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
- assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
- CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();) {
- Set<ITmfTrace> traces = ImmutableSet.of((ITmfTrace) trace1, trace2, trace3);
- runCpuTest(traces, "Django traces", 10);
- runMemoryTest(traces, "Django traces", 10);
- }
- }
-
- private static void runCpuTest(Set<ITmfTrace> testTraces, String testName, int loop_count) {
- Performance perf = Performance.getDefault();
- PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + TIME);
- perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + TIME, Dimension.CPU_TIME);
-
- for (int i = 0; i < loop_count; i++) {
- TmfNetworkEventMatching traceMatch = new TmfNetworkEventMatching(testTraces);
-
- pm.start();
- traceMatch.matchEvents();
- pm.stop();
- }
- pm.commit();
-
- }
-
- /* Benchmark memory used by the algorithm */
- private static void runMemoryTest(Set<ITmfTrace> testTraces, String testName, int loop_count) {
- Performance perf = Performance.getDefault();
- PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + MEMORY);
- perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + MEMORY, Dimension.USED_JAVA_HEAP);
-
- for (int i = 0; i < loop_count; i++) {
- TmfNetworkEventMatching traceMatch = new TmfNetworkEventMatching(testTraces);
-
- System.gc();
- pm.start();
- traceMatch.matchEvents();
- System.gc();
- pm.stop();
- }
- pm.commit();
-
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assume.assumeTrue;
-
-import java.util.Arrays;
-
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
-import org.eclipse.linuxtools.tmf.core.synchronization.SynchronizationAlgorithm;
-import org.eclipse.linuxtools.tmf.core.synchronization.SynchronizationManager;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Benchmark trace synchronization
- *
- * @author Geneviève Bastien
- */
-public class TraceSynchronizationBenchmark {
-
- private static final String TEST_ID = "org.eclipse.linuxtools#Trace synchronization#";
- private static final String TIME = " (time)";
- private static final String MEMORY = " (memory usage)";
- private static final String TEST_SUMMARY = "Trace synchronization";
-
- /**
- * Initialize some data
- */
- @BeforeClass
- public static void setUp() {
- TmfEventMatching.registerMatchObject(new TcpEventMatching());
- TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
- }
-
- /**
- * Run the benchmark with 2 small traces
- */
- @Test
- public void testSmallTraces() {
- assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
- assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
- ITmfTrace[] traces = { trace1, trace2 };
- runCpuTest(traces, "Match TCP events", 40);
- }
- }
-
- /**
- * Run the benchmark with 3 bigger traces
- */
- @Test
- public void testDjangoTraces() {
- assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
- assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
- assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
- CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();) {
- ITmfTrace[] traces = { trace1, trace2, trace3 };
- runCpuTest(traces, "Django traces", 10);
- runMemoryTest(traces, "Django traces", 10);
- }
- }
-
- private static void runCpuTest(ITmfTrace[] testTraces, String testName, int loop_count) {
- Performance perf = Performance.getDefault();
- PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + TIME);
- perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + TIME, Dimension.CPU_TIME);
-
- for (int i = 0; i < loop_count; i++) {
- pm.start();
- SynchronizationManager.synchronizeTraces(null, Arrays.asList(testTraces), true);
- pm.stop();
- }
- pm.commit();
-
- }
-
- /* Benchmark memory used by the algorithm */
- private static void runMemoryTest(ITmfTrace[] testTraces, String testName, int loop_count) {
- Performance perf = Performance.getDefault();
- PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + MEMORY);
- perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + MEMORY, Dimension.USED_JAVA_HEAP);
-
- for (int i = 0; i < loop_count; i++) {
-
- System.gc();
- pm.start();
- SynchronizationAlgorithm algo = SynchronizationManager.synchronizeTraces(null, Arrays.asList(testTraces), true);
- assertNotNull(algo);
-
- System.gc();
- pm.stop();
- }
- pm.commit();
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.kernel.core.tests
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Kernel Analysis Core Tests Plug-in
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.kernel.core.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Kernel Analysis Core Tests Plug-in</name>
-
- <build>
- <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <id>prepare</id>
- <phase>validate</phase>
- <configuration>
- <target>
- <echo message="prepare phase" />
- </target>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <includes>
- <include>**/AllTests.*</include>
- </includes>
- <useUIHarness>false</useUIHarness>
- <useUIThread>false</useUIThread>
- <product>org.eclipse.platform.ide</product>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests;
-
-import junit.framework.TestCase;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * <b><u>ActivatorTest</u></b>
- * <p>
- * Test suite for the Activator class
- * <p>
- */
-@SuppressWarnings("javadoc")
-public class ActivatorTest extends TestCase {
-
- // ------------------------------------------------------------------------
- // JUnit
- // ------------------------------------------------------------------------
-
- @BeforeClass
- public static void setUpBeforeClass() {
- }
-
- @AfterClass
- public static void tearDownAfterClass() {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- @Override
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- @Override
- public void tearDown() throws Exception {
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#Activator()}.
- */
- @Test
- public void testActivator() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#getDefault()}.
- */
- @Test
- public void testGetDefault() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#start(org.osgi.framework.BundleContext)}.
- */
- @Test
- public void testStartBundleContext() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#stop(org.osgi.framework.BundleContext)}.
- */
- @Test
- public void testStopBundleContext() {
- assertTrue(true);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the lttng2.kernel unit tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ActivatorTest.class,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis.AllTests.class,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider.TestAll.class,
- org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync.AllTests.class
-})
-public class AllTests { }
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for org.eclipse.linuxtools.lttng2.kernel.core.analysis package
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- LttngKernelAnalysisTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
-import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.tests.shared.TmfTestHelper;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Test the {@link LttngKernelAnalysisModule} class
- *
- * @author Geneviève Bastien
- */
-public class LttngKernelAnalysisTest {
-
- private ITmfTrace fTrace;
- private LttngKernelAnalysisModule fKernelAnalysisModule;
-
- /**
- * Class setup
- */
- @BeforeClass
- public static void setUpClass() {
- assumeTrue(CtfTmfTestTrace.KERNEL.exists());
- }
-
- /**
- * Set-up the test
- */
- @Before
- public void setUp() {
- fKernelAnalysisModule = new LttngKernelAnalysisModule();
- fTrace = CtfTmfTestTrace.KERNEL.getTrace();
- }
-
- /**
- * Dispose test objects
- */
- @After
- public void tearDown() {
- fTrace.dispose();
- fKernelAnalysisModule.dispose();
- }
-
- /**
- * Test the LTTng kernel analysis execution
- */
- @Test
- public void testAnalysisExecution() {
- fKernelAnalysisModule.setId("test");
- try {
- fKernelAnalysisModule.setTrace(fTrace);
- } catch (TmfAnalysisException e) {
- fail(e.getMessage());
- }
- // Assert the state system has not been initialized yet
- ITmfStateSystem ss = fKernelAnalysisModule.getStateSystem();
- assertNull(ss);
-
- assertTrue(TmfTestHelper.executeAnalysis(fKernelAnalysisModule));
-
- ss = fKernelAnalysisModule.getStateSystem();
- assertNotNull(ss);
-
- List<Integer> quarks = ss.getQuarks("*");
- assertFalse(quarks.isEmpty());
- }
-
- /**
- * Test the canExecute method on valid and invalid traces
- */
- @Test
- public void testCanExecute() {
- /* Test with a valid kernel trace */
- assertNotNull(fTrace);
- assertTrue(fKernelAnalysisModule.canExecute(fTrace));
-
- /* Test with a CTF trace that does not have required events */
- assumeTrue(CtfTmfTestTrace.CYG_PROFILE.exists());
- try (CtfTmfTrace trace = CtfTmfTestTrace.CYG_PROFILE.getTrace();) {
- /*
- * TODO: This should be false, but for now there is no mandatory
- * events in the kernel analysis so it will return true.
- */
- assertTrue(fKernelAnalysisModule.canExecute(trace));
- }
- }
-
- /**
- * Test for {@link LttngKernelAnalysisModule#getAnalysisRequirements()}
- */
- @Test
- public void testGetAnalysisRequirements() {
- Iterable<TmfAnalysisRequirement> requirements = fKernelAnalysisModule.getAnalysisRequirements();
- assertNotNull(requirements);
-
- /* There should be the event and domain type */
- TmfAnalysisRequirement eventReq = null;
- TmfAnalysisRequirement domainReq = null;
- int numberOfRequirement = 0;
- for (TmfAnalysisRequirement requirement : requirements) {
- ++numberOfRequirement;
- if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_EVENT)) {
- eventReq = requirement;
- } else if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN)) {
- domainReq = requirement;
- }
- }
- assertNotNull(eventReq);
- assertNotNull(domainReq);
-
- /* There should be two requirements */
- assertEquals(2, numberOfRequirement);
-
- /* Verify the content of the requirements themselves */
- /* Domain should be kernel */
- assertEquals(1, domainReq.getValues().size());
- for (String domain : domainReq.getValues()) {
- assertEquals(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, domain);
- }
-
- /* Events */
- Set<String> expectedEvents = ImmutableSet.of(
- LttngStrings.EXIT_SYSCALL,
- LttngStrings.IRQ_HANDLER_ENTRY,
- LttngStrings.IRQ_HANDLER_EXIT,
- LttngStrings.SOFTIRQ_ENTRY,
- LttngStrings.SOFTIRQ_EXIT,
- LttngStrings.SOFTIRQ_RAISE,
- LttngStrings.SCHED_SWITCH,
- LttngStrings.SCHED_PROCESS_FORK,
- LttngStrings.SCHED_PROCESS_EXIT,
- LttngStrings.SCHED_PROCESS_FREE,
- LttngStrings.STATEDUMP_PROCESS_STATE,
- LttngStrings.SCHED_WAKEUP,
- LttngStrings.SCHED_WAKEUP_NEW,
- /* Add the prefix for syscalls */
- LttngStrings.SYSCALL_PREFIX
- );
-
- assertEquals(14, eventReq.getValues().size());
- for (String event : eventReq.getValues()) {
- assertTrue("Unexpected event " + event, expectedEvents.contains(event));
- }
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matching
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ExperimentSyncTest.class,
- MatchAndSyncTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
-import org.eclipse.linuxtools.tmf.core.synchronization.ITmfTimestampTransform;
-import org.eclipse.linuxtools.tmf.core.synchronization.SynchronizationAlgorithm;
-import org.eclipse.linuxtools.tmf.core.synchronization.TimestampTransformFactory;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Tests for experiment syncing
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings("nls")
-public class ExperimentSyncTest {
-
- private static final String EXPERIMENT = "MyExperiment";
- private static int BLOCK_SIZE = 1000;
-
- /**
- * Initialize some data
- */
- @BeforeClass
- public static void setUp() {
- TmfEventMatching.registerMatchObject(new TcpEventMatching());
- TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
- }
-
- /**
- * Testing experiment synchronization
- */
- @Test
- public void testExperimentSync() {
- assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
- assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
-
- ITmfTrace[] traces = { trace1, trace2 };
- TmfExperiment experiment = new TmfExperiment(traces[0].getEventType(), EXPERIMENT, traces, BLOCK_SIZE);
-
- SynchronizationAlgorithm syncAlgo = experiment.synchronizeTraces(true);
-
- ITmfTimestampTransform tt1 = syncAlgo.getTimestampTransform(trace1);
- ITmfTimestampTransform tt2 = syncAlgo.getTimestampTransform(trace2);
-
- trace1.setTimestampTransform(tt1);
- trace2.setTimestampTransform(tt2);
-
- assertEquals("TmfTimestampLinear [ slope = 0.9999413783703139011056845831168394, offset = 79796507913179.33347660124688298171 ]", tt1.toString());
- assertEquals(TimestampTransformFactory.getDefaultTransform(), tt2);
-
- assertEquals(syncAlgo.getTimestampTransform(trace1.getHostId()), trace1.getTimestampTransform());
- assertEquals(syncAlgo.getTimestampTransform(trace2.getHostId()), trace2.getTimestampTransform());
-
- }
- }
-
- /**
- * Testing synchronization with 3 traces, one of which synchronizes with
- * both other
- */
- @Test
- public void testDjangoExperimentSync() {
- assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
- assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
- assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
- CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();) {
- ITmfTrace[] traces = { trace1, trace2, trace3 };
- TmfExperiment experiment = new TmfExperiment(traces[0].getEventType(), EXPERIMENT, traces, BLOCK_SIZE);
-
- SynchronizationAlgorithm syncAlgo = experiment.synchronizeTraces(true);
-
- ITmfTimestampTransform tt1 = syncAlgo.getTimestampTransform(trace1);
- ITmfTimestampTransform tt2 = syncAlgo.getTimestampTransform(trace2);
- ITmfTimestampTransform tt3 = syncAlgo.getTimestampTransform(trace3);
-
- trace1.setTimestampTransform(tt1);
- trace2.setTimestampTransform(tt2);
- trace3.setTimestampTransform(tt3);
-
- assertEquals(TimestampTransformFactory.getDefaultTransform(), tt1);
- assertEquals("TmfTimestampLinear [ slope = 0.9999996313017589597204633828681240, offset = 498490309972.0038068817738527724192 ]", tt2.toString());
- assertEquals("TmfTimestampLinear [ slope = 1.000000119014882262265342419815932, offset = -166652893534.6189900382736187431134 ]", tt3.toString());
-
- }
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.Test;
-
-/**
- * Tests for {@link TcpEventMatching}
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings("nls")
-public class MatchAndSyncTest {
-
- /**
- * Testing the packet matching
- */
- @Test
- public void testMatching() {
- final String cr = System.getProperty("line.separator");
- assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
- assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
- try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
- CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
-
- List<ITmfTrace> tracearr = new LinkedList<>();
- tracearr.add(trace1);
- tracearr.add(trace2);
-
- TmfEventMatching.registerMatchObject(new TcpEventMatching());
- TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
-
- TmfNetworkEventMatching twoTraceMatch = new TmfNetworkEventMatching(tracearr);
- assertTrue(twoTraceMatch.matchEvents());
-
- String stats = twoTraceMatch.toString();
- assertEquals("TmfEventMatches [ Number of matches found: 46 ]" +
- "Trace 0:" + cr +
- " 3 unmatched incoming events" + cr +
- " 2 unmatched outgoing events" + cr +
- "Trace 1:" + cr +
- " 2 unmatched incoming events" + cr +
- " 1 unmatched outgoing events" + cr, stats);
-
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-
-/**
- * Small program to regenerate the values used in "TestValues.java" from the
- * current LTTng-kernel state provider.
- *
- * It will write its output the a file called 'TestValues<something>.java' in your
- * temporary files directory.
- *
- * @author Alexandre Montplaisir
- */
-public class GenerateTestValues {
-
- private static CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
- private static final long targetTimestamp = 18670067372290L + 1331649577946812237L;
- private static final String INDENT = " ";
-
- /**
- * Run the program
- *
- * @param args
- * Command-line arguments, unused.
- * @throws Exception
- * I'm messing with Exception. Come at me bro!
- */
- public static void main(String[] args) throws Exception {
- if (!testTrace.exists()) {
- System.err.println("Trace files not present.");
- return;
- }
-
- /* Prepare the files */
- File logFile = File.createTempFile("TestValues", ".java");
- try (final CtfTmfTrace trace = testTrace.getTrace();
- PrintWriter writer = new PrintWriter(new FileWriter(logFile), true);
- /* Build and query the state system */
- TmfStateSystemAnalysisModule module = new TmfStateSystemAnalysisModule() {
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngKernelStateProvider(trace);
- }
-
- @Override
- protected String getSsFileName() {
- return "test-values";
- }
- };) {
- module.setTrace(trace);
- module.setId("test-values");
- module.schedule();
- module.waitForCompletion();
- ITmfStateSystem ssq = module.getStateSystem();
- if (ssq == null) {
- throw new IllegalStateException();
- }
-
- List<ITmfStateInterval> fullState = ssq.queryFullState(targetTimestamp);
-
- /* Start printing the java file's contents */
- writer.println("interface TestValues {");
- writer.println();
- writer.println(INDENT + "static final int size = " + fullState.size() + ";");
- writer.println();
-
- /* Print the array contents */
- writer.println(INDENT + "static final long[] startTimes = {");
- for (ITmfStateInterval interval : fullState) {
- writer.println(INDENT + INDENT + String.valueOf(interval.getStartTime()) + "L,");
- }
- writer.println(INDENT + "};");
- writer.println();
-
- writer.println(INDENT + "static final long[] endTimes = {");
- for (ITmfStateInterval interval : fullState) {
- writer.println(INDENT + INDENT + String.valueOf(interval.getEndTime()) + "L,");
- }
- writer.println(INDENT + "};");
- writer.println();
-
- writer.println(INDENT + "static final ITmfStateValue[] values = {");
- for (ITmfStateInterval interval : fullState) {
- ITmfStateValue val = interval.getStateValue();
- writer.print(INDENT + INDENT);
-
- switch (val.getType()) {
- case NULL:
- writer.println("TmfStateValue.nullValue(),");
- break;
- case INTEGER:
- writer.println("TmfStateValue.newValueInt(" + val.unboxInt() + "),");
- break;
- case LONG:
- writer.println("TmfStateValue.newValueLong(" + val.unboxLong() + "),");
- break;
- case DOUBLE:
- writer.println("TmfStateValue.newValueDouble(" + val.unboxDouble() + "),");
- break;
- case STRING:
- writer.println("TmfStateValue.newValueString(\"" + val.unboxStr() + "\"),");
- break;
- default:
- writer.println(val.toString());
- break;
- }
- }
- writer.println(INDENT + "};");
-
- writer.println("}");
- writer.println();
-
- }
- System.exit(0);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 Ericsson
- * Copyright (c) 2010, 2011 École Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
- * 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
- *
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Tests for the {@link LttngKernelStateProvider}
- *
- * @author Alexandre Montplaisir
- */
-public class LttngKernelStateProviderTest {
-
- private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
-
- private static ITmfStateProvider input;
-
- /**
- * Set-up.
- */
- @BeforeClass
- public static void initialize() {
- assumeTrue(testTrace.exists());
- input = new LttngKernelStateProvider(testTrace.getTrace());
-
- }
-
- /**
- * Test loading the state provider.
- */
- @Test
- public void testOpening() {
- long testStartTime;
- testStartTime = input.getStartTime();
- assertEquals(testStartTime, StateSystemTest.startTime);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- * Bernd Hufmann - Use state system analysis module instead of factory
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.junit.After;
-import org.junit.Test;
-
-/**
- * State system tests using a partial history.
- *
- * @author Alexandre Montplaisir
- */
-public class PartialStateSystemTest extends StateSystemTest {
-
- private static final @NonNull String TEST_FILE_NAME = "test-partial";
-
- private File stateFile;
- private TestLttngKernelAnalysisModule module;
-
- @Override
- protected ITmfStateSystem initialize() {
- stateFile = new File(TmfTraceManager.getSupplementaryFileDir(testTrace.getTrace()) + TEST_FILE_NAME);
- if (stateFile.exists()) {
- stateFile.delete();
- }
-
- module = new TestLttngKernelAnalysisModule(TEST_FILE_NAME);
- try {
- module.setTrace(testTrace.getTrace());
- } catch (TmfAnalysisException e) {
- fail();
- }
- module.schedule();
- assertTrue(module.waitForCompletion());
- return module.getStateSystem();
- }
-
- /**
- * Class clean-up
- */
- @After
- public void cleanup() {
- if (module != null) {
- module.close();
- }
- if (stateFile != null) {
- stateFile.delete();
- }
- }
-
- /**
- * Partial histories cannot get the intervals' end times. The fake value that
- * is returned is equal to the query's timestamp. So override this here
- * so that {@link #testFullQueryThorough} keeps working.
- */
- @Override
- protected long getEndTimes(int idx) {
- return interestingTimestamp1;
- }
-
- // ------------------------------------------------------------------------
- // Skip tests using single-queries (unsupported in partial history)
- // ------------------------------------------------------------------------
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testSingleQuery1() {
- super.testSingleQuery1();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testRangeQuery1() {
- super.testRangeQuery1();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testRangeQuery2() {
- super.testRangeQuery2();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testRangeQuery3() {
- super.testRangeQuery3();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testSingleQueryInvalidTime1() throws TimeRangeException {
- super.testSingleQueryInvalidTime1();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testSingleQueryInvalidTime2() throws TimeRangeException {
- super.testSingleQueryInvalidTime2();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testRangeQueryInvalidTime1() throws TimeRangeException {
- super.testRangeQueryInvalidTime1();
- }
-
- @Override
- @Test(expected = UnsupportedOperationException.class)
- public void testRangeQueryInvalidTime2() throws TimeRangeException {
- super.testRangeQueryInvalidTime2();
- }
-
- @NonNullByDefault
- private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
- private final String htFileName;
-
- /**
- * Constructor adding the views to the analysis
- * @param htFileName
- * The History File Name
- */
- public TestLttngKernelAnalysisModule(String htFileName) {
- super();
- this.htFileName = htFileName;
- }
-
- @Override
- public void setTrace(@Nullable ITmfTrace trace) throws TmfAnalysisException {
- if (!(trace instanceof CtfTmfTrace)) {
- throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
- }
- super.setTrace(trace);
- }
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngKernelStateProvider(getTrace());
- }
-
- @Override
- protected StateSystemBackendType getBackendType() {
- return StateSystemBackendType.PARTIAL;
- }
-
- @Override
- protected String getSsFileName() {
- return htFileName;
- }
-
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- * Bernd Hufmann - Use state system analysis module instead of factory
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.junit.After;
-import org.junit.Test;
-
-/**
- * State system tests using a full history back-end and the LTTng kernel state
- * input.
- *
- * @author Alexandre Montplaisir
- */
-public class StateSystemFullHistoryTest extends StateSystemTest {
-
- private static final @NonNull String TEST_FILE_NAME = "test.ht";
- private static final @NonNull String BENCHMARK_FILE_NAME = "test.benchmark.ht";
-
- private File stateFile;
- private File stateFileBenchmark;
- private TestLttngKernelAnalysisModule module;
-
- @Override
- protected ITmfStateSystem initialize() {
- stateFile = createStateFile(TEST_FILE_NAME);
- stateFileBenchmark = createStateFile(BENCHMARK_FILE_NAME);
-
- module = new TestLttngKernelAnalysisModule(TEST_FILE_NAME);
- try {
- module.setTrace(testTrace.getTrace());
- } catch (TmfAnalysisException e) {
- fail();
- }
- module.schedule();
- assertTrue(module.waitForCompletion());
- return module.getStateSystem();
- }
-
- /**
- * Clean-up
- */
- @After
- public void cleanup() {
- if (module != null) {
- module.close();
- }
- if (stateFile != null) {
- stateFile.delete();
- }
- if (stateFileBenchmark != null) {
- stateFileBenchmark.delete();
- }
- }
-
- // ------------------------------------------------------------------------
- // Tests specific to a full-history
- // ------------------------------------------------------------------------
-
- /**
- * Rebuild independently so we can benchmark it. Too bad JUnit doesn't allow
- * us to @Test the @BeforeClass...
- */
- @Test
- public void testBuild() {
- try (TestLttngKernelAnalysisModule module2 =
- new TestLttngKernelAnalysisModule(BENCHMARK_FILE_NAME);) {
- try {
- module2.setTrace(testTrace.getTrace());
- } catch (TmfAnalysisException e) {
- fail();
- }
- module2.schedule();
- assertTrue(module2.waitForCompletion());
- ITmfStateSystem ssb2 = module2.getStateSystem();
-
- assertNotNull(ssb2);
- assertEquals(startTime, ssb2.getStartTime());
- assertEquals(endTime, ssb2.getCurrentEndTime());
- }
- }
-
- /**
- * Test re-opening the existing file.
- */
- @Test
- public void testOpenExistingStateFile() {
- /* 'newStateFile' should have already been created */
- try (TestLttngKernelAnalysisModule module2 = new TestLttngKernelAnalysisModule(TEST_FILE_NAME);) {
- try {
- module2.setTrace(testTrace.getTrace());
- } catch (TmfAnalysisException e) {
- fail();
- }
- module2.schedule();
- assertTrue(module2.waitForCompletion());
- ITmfStateSystem ssb2 = module2.getStateSystem();
-
- assertNotNull(ssb2);
- assertEquals(startTime, ssb2.getStartTime());
- assertEquals(endTime, ssb2.getCurrentEndTime());
- }
- }
-
- @NonNullByDefault
- private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
- private final String htFileName;
-
- /**
- * Constructor adding the views to the analysis
- * @param htFileName
- * The History File Name
- */
- public TestLttngKernelAnalysisModule(String htFileName) {
- super();
- this.htFileName = htFileName;
- }
-
- @Override
- public void setTrace(@Nullable ITmfTrace trace) throws TmfAnalysisException {
- if (!(trace instanceof CtfTmfTrace)) {
- throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
- }
- super.setTrace(trace);
- }
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngKernelStateProvider(getTrace());
- }
-
- @Override
- protected StateSystemBackendType getBackendType() {
- return StateSystemBackendType.FULL;
- }
-
- @Override
- protected String getSsFileName() {
- return htFileName;
- }
- }
-
- private static File createStateFile(String name) {
- File file = new File(TmfTraceManager.getSupplementaryFileDir(testTrace.getTrace()) + name);
- if (file.exists()) {
- file.delete();
- }
- return file;
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- * Bernd Hufmann - Use state system analysis module instead of factory
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.junit.After;
-
-/**
- * State system tests using the in-memory back-end.
- *
- * @author Alexandre Montplaisir
- */
-public class StateSystemInMemoryTest extends StateSystemTest {
-
- private TestLttngKernelAnalysisModule module;
-
- @Override
- protected ITmfStateSystem initialize() {
- module = new TestLttngKernelAnalysisModule();
- try {
- module.setTrace(testTrace.getTrace());
- } catch (TmfAnalysisException e) {
- fail();
- }
- module.schedule();
- assertTrue(module.waitForCompletion());
- return module.getStateSystem();
- }
-
- /**
- * Class cleanup
- */
- @After
- public void cleanup() {
- if (module != null) {
- module.close();
- }
- }
-
- private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
- /**
- * Constructor adding the views to the analysis
- */
- public TestLttngKernelAnalysisModule() {
- super();
- }
-
- @Override
- public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
- if (!(trace instanceof CtfTmfTrace)) {
- throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
- }
- super.setTrace(trace);
- }
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngKernelStateProvider(getTrace());
- }
-
- @Override
- protected StateSystemBackendType getBackendType() {
- return StateSystemBackendType.INMEM;
- }
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson
- * Copyright (c) 2010, 2011 École Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
- * 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
- *
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestRule;
-import org.junit.rules.Timeout;
-
-/**
- * Base unit tests for the StateHistorySystem. Extension can be made to test
- * different state back-end types or configurations.
- *
- * @author Alexandre Montplaisir
- */
-@SuppressWarnings("javadoc")
-public abstract class StateSystemTest {
-
- /** Timeout the tests after 2 minutes */
- @Rule
- public TestRule timeoutRule = new Timeout(120000);
-
- /** Test trace used for these tests */
- protected static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
-
- /** Expected start time of the test trace/state history */
- protected static final long startTime = 1331668247314038062L;
-
- /** Expected end time of the state history built from the test trace */
- protected static final long endTime = 1331668259054285979L;
-
- /** Offset in the trace + start time of the trace */
- protected static final long interestingTimestamp1 = 18670067372290L + 1331649577946812237L;
-
- /** Number of nanoseconds in one second */
- private static final long NANOSECS_PER_SEC = 1000000000L;
-
- private ITmfStateSystem fixture;
-
-
- /**
- * Class set-up
- */
- @Before
- public void setUp() {
- assumeTrue(testTrace.exists());
- fixture = this.initialize();
- assertNotNull(fixture);
- }
-
- protected abstract ITmfStateSystem initialize();
-
- @After
- public void tearDown() {
- if (fixture != null) {
- fixture.dispose();
- }
- fixture = null;
- }
-
- @Test
- public void testFullQuery1() {
- List<ITmfStateInterval> list;
- ITmfStateInterval interval;
- int quark, valueInt;
- String valueStr;
-
- try {
- list = fixture.queryFullState(interestingTimestamp1);
-
- quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- interval = list.get(quark);
- valueInt = interval.getStateValue().unboxInt();
- assertEquals(1397, valueInt);
-
- quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
- interval = list.get(quark);
- valueStr = interval.getStateValue().unboxStr();
- assertEquals("gdbus", valueStr);
-
- quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.SYSTEM_CALL);
- interval = list.get(quark);
- valueStr = interval.getStateValue().unboxStr();
- assertTrue(valueStr.equals("sys_poll"));
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test
- public void testSingleQuery1() {
- long timestamp = interestingTimestamp1;
- int quark;
- ITmfStateInterval interval;
- String valueStr;
-
- try {
- quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
- interval = fixture.querySingleState(timestamp, quark);
- valueStr = interval.getStateValue().unboxStr();
- assertEquals("gdbus", valueStr);
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- /**
- * Test a range query (with no resolution parameter, so all intervals)
- */
- @Test
- public void testRangeQuery1() {
- long time1 = interestingTimestamp1;
- long time2 = time1 + 1L * NANOSECS_PER_SEC;
- int quark;
- List<ITmfStateInterval> intervals;
-
- try {
- quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- intervals = fixture.queryHistoryRange(quark, time1, time2);
- assertEquals(487, intervals.size()); /* Number of context switches! */
- assertEquals(1685, intervals.get(100).getStateValue().unboxInt());
- assertEquals(1331668248427681372L, intervals.get(205).getEndTime());
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- /**
- * Range query, but with a t2 far off the end of the trace. The result
- * should still be valid.
- */
- @Test
- public void testRangeQuery2() {
- List<ITmfStateInterval> intervals;
-
- try {
- int quark = fixture.getQuarkAbsolute(Attributes.RESOURCES, Attributes.IRQS, "1");
- long ts1 = fixture.getStartTime(); /* start of the trace */
- long ts2 = startTime + 20L * NANOSECS_PER_SEC; /* invalid, but ignored */
-
- intervals = fixture.queryHistoryRange(quark, ts1, ts2);
-
- /* Activity of IRQ 1 over the whole trace */
- assertEquals(65, intervals.size());
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- /**
- * Test a range query with a resolution
- */
- @Test
- public void testRangeQuery3() {
- long time1 = interestingTimestamp1;
- long time2 = time1 + 1L * NANOSECS_PER_SEC;
- long resolution = 1000000; /* One query every millisecond */
- int quark;
- List<ITmfStateInterval> intervals;
-
- try {
- quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- intervals = fixture.queryHistoryRange(quark, time1, time2, resolution, null);
- assertEquals(126, intervals.size()); /* Number of context switches! */
- assertEquals(1452, intervals.get(50).getStateValue().unboxInt());
- assertEquals(1331668248815698779L, intervals.get(100).getEndTime());
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- /**
- * Ask for a time range outside of the trace's range
- */
- @Test(expected = TimeRangeException.class)
- public void testFullQueryInvalidTime1() throws TimeRangeException,
- StateSystemDisposedException {
- long ts = startTime + 20L * NANOSECS_PER_SEC;
- fixture.queryFullState(ts);
- }
-
- @Test(expected = TimeRangeException.class)
- public void testFullQueryInvalidTime2() throws TimeRangeException,
- StateSystemDisposedException {
- long ts = startTime - 20L * NANOSECS_PER_SEC;
- fixture.queryFullState(ts);
- }
-
- @Test(expected = TimeRangeException.class)
- public void testSingleQueryInvalidTime1() throws TimeRangeException {
- try {
- int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- long ts = startTime + 20L * NANOSECS_PER_SEC;
- fixture.querySingleState(ts, quark);
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test(expected = TimeRangeException.class)
- public void testSingleQueryInvalidTime2() throws TimeRangeException {
- try {
- int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- long ts = startTime - 20L * NANOSECS_PER_SEC;
- fixture.querySingleState(ts, quark);
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test(expected = TimeRangeException.class)
- public void testRangeQueryInvalidTime1() throws TimeRangeException {
- try {
- int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- long ts1 = startTime - 20L * NANOSECS_PER_SEC; /* invalid */
- long ts2 = startTime + 1L * NANOSECS_PER_SEC; /* valid */
- fixture.queryHistoryRange(quark, ts1, ts2);
-
- } catch (AttributeNotFoundException e) {
- fail();
- } catch (StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test(expected = TimeRangeException.class)
- public void testRangeQueryInvalidTime2() throws TimeRangeException {
- try {
- int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- long ts1 = startTime - 1L * NANOSECS_PER_SEC; /* invalid */
- long ts2 = startTime + 20L * NANOSECS_PER_SEC; /* invalid */
- fixture.queryHistoryRange(quark, ts1, ts2);
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- /**
- * Ask for a non-existing attribute
- *
- * @throws AttributeNotFoundException
- */
- @Test(expected = AttributeNotFoundException.class)
- public void testQueryInvalidAttribute() throws AttributeNotFoundException {
- fixture.getQuarkAbsolute("There", "is", "no", "cow", "level");
- }
-
- /**
- * Query but with the wrong State Value type
- */
- @Test(expected = StateValueTypeException.class)
- public void testQueryInvalidValuetype1() throws StateValueTypeException {
- List<ITmfStateInterval> list;
- ITmfStateInterval interval;
- int quark;
-
- try {
- list = fixture.queryFullState(interestingTimestamp1);
- quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- interval = list.get(quark);
-
- /* This is supposed to be an int value */
- interval.getStateValue().unboxStr();
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test(expected = StateValueTypeException.class)
- public void testQueryInvalidValuetype2() throws StateValueTypeException {
- List<ITmfStateInterval> list;
- ITmfStateInterval interval;
- int quark;
-
- try {
- list = fixture.queryFullState(interestingTimestamp1);
- quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
- interval = list.get(quark);
-
- /* This is supposed to be a String value */
- interval.getStateValue().unboxInt();
-
- } catch (AttributeNotFoundException | StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test
- public void testFullAttributeName() {
- try {
- int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- String name = fixture.getFullAttributePath(quark);
- assertEquals(name, "CPUs/0/Current_thread");
-
- } catch (AttributeNotFoundException e) {
- fail();
- }
- }
-
- @Test
- public void testGetQuarks_begin() {
- List<Integer> list = fixture.getQuarks("*", "1577", Attributes.EXEC_NAME);
-
- assertEquals(1, list.size());
- }
-
- @Test
- public void testGetQuarks_middle() {
- List<Integer> list = fixture.getQuarks(Attributes.THREADS, "*", Attributes.EXEC_NAME);
-
- /* Number of different kernel threads in the trace */
- assertEquals(168, list.size());
- }
-
- @Test
- public void testGetQuarks_end() {
- List<Integer> list = fixture.getQuarks(Attributes.THREADS, "1577", "*");
-
- /* There should be 4 sub-attributes for each Thread node */
- assertEquals(4, list.size());
- }
-
- // ------------------------------------------------------------------------
- // Tests verifying the *complete* results of a full queries
- // ------------------------------------------------------------------------
-
- protected long getStartTimes(int idx) {
- return TestValues.startTimes[idx];
- }
-
- protected long getEndTimes(int idx) {
- return TestValues.endTimes[idx];
- }
-
- protected ITmfStateValue getStateValues(int idx) {
- return TestValues.values[idx];
- }
-
- @Test
- public void testFullQueryThorough() {
- try {
- List<ITmfStateInterval> state = fixture.queryFullState(interestingTimestamp1);
- assertEquals(TestValues.size, state.size());
-
- for (int i = 0; i < state.size(); i++) {
- /* Test each component of the intervals */
- assertEquals(getStartTimes(i), state.get(i).getStartTime());
- assertEquals(getEndTimes(i), state.get(i).getEndTime());
- assertEquals(i, state.get(i).getAttribute());
- assertEquals(getStateValues(i), state.get(i).getStateValue());
- }
-
- } catch (StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test
- public void testFirstIntervalIsConsidered() {
- try {
- List<ITmfStateInterval> list = fixture.queryFullState(1331668248014135800L);
- ITmfStateInterval interval = list.get(233);
- assertEquals(1331668247516664825L, interval.getStartTime());
-
- int valueInt = interval.getStateValue().unboxInt();
- assertEquals(1, valueInt);
-
- } catch (StateSystemDisposedException e) {
- fail();
- }
- }
-
- @Test
- public void testParentAttribute() {
- String[] path = { "CPUs/0/Current_thread",
- "CPUs/0",
- "CPUs" };
- try {
- int q = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
- for (int i = 0; i < path.length; i++) {
- String name = fixture.getFullAttributePath(q);
- assertEquals(path[i], name);
- q = fixture.getParentAttributeQuark(q);
- }
- assertEquals(-1, q);
- q = fixture.getParentAttributeQuark(q);
- assertEquals(-1, q);
- } catch (AttributeNotFoundException e) {
- fail();
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Alexandre Montplaisir - Initial implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the LTTng kernel state system tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- LttngKernelStateProviderTest.class,
- PartialStateSystemTest.class,
- StateSystemFullHistoryTest.class,
- StateSystemInMemoryTest.class
-})
-public class TestAll {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
-
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
-
-/**
- * Expected return values of querying test trace #1's state system at time
- * "18670067372290L + 1331649577946812237L"
- *
- * @author Alexandre Montplaisir
- */
-interface TestValues {
-
- static final int size = 863;
-
- static final long[] startTimes = {
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248014145796L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247399757985L,
- 1331668247316320929L,
- 1331668247316334243L,
- 1331668247314046266L,
- 1331668247314038062L,
- 1331668248014183954L,
- 1331668247314038062L,
- 1331668247327098502L,
- 1331668247327098502L,
- 1331668247327098502L,
- 1331668247327098502L,
- 1331668247314038062L,
- 1331668247415001807L,
- 1331668247415001807L,
- 1331668247415001807L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248013353414L,
- 1331668248004935409L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248014184526L,
- 1331668248014130616L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248011125682L,
- 1331668247314038062L,
- 1331668247931793142L,
- 1331668247959041965L,
- 1331668248011129576L,
- 1331668247314038062L,
- 1331668247335106720L,
- 1331668247335106720L,
- 1331668247335106720L,
- 1331668247335106720L,
- 1331668247931782426L,
- 1331668247315274351L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247335112802L,
- 1331668247335112802L,
- 1331668247335112802L,
- 1331668247335112802L,
- 1331668247314038062L,
- 1331668248004705322L,
- 1331668247314038062L,
- 1331668248004935409L,
- 1331668248004925240L,
- 1331668247316553071L,
- 1331668247314038062L,
- 1331668247399743968L,
- 1331668247316925661L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247999256178L,
- 1331668247999250697L,
- 1331668247318567561L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247999336085L,
- 1331668247999327778L,
- 1331668247318631139L,
- 1331668247314038062L,
- 1331668247960265258L,
- 1331668247314038062L,
- 1331668247903884233L,
- 1331668247903869067L,
- 1331668247328403934L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247908495390L,
- 1331668247908464125L,
- 1331668247328921944L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247903840082L,
- 1331668247903831313L,
- 1331668247329404733L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247960291263L,
- 1331668247314038062L,
- 1331668247330548245L,
- 1331668247314038062L,
- 1331668247340039213L,
- 1331668247340083580L,
- 1331668247966976915L,
- 1331668247314038062L,
- 1331668248004729173L,
- 1331668247314038062L,
- 1331668247371137735L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247387196023L,
- 1331668247387191465L,
- 1331668247376420842L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247400231496L,
- 1331668247400218303L,
- 1331668247378430187L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247751186217L,
- 1331668247314038062L,
- 1331668247387136191L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247415047817L,
- 1331668247415047817L,
- 1331668247415047817L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247400095883L,
- 1331668247400085049L,
- 1331668247399991225L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247401441000L,
- 1331668247401428073L,
- 1331668247400779449L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247410754305L,
- 1331668247314038062L,
- 1331668247519727372L,
- 1331668247314038062L,
- 1331668247412887695L,
- 1331668247314038062L,
- 1331668247413704524L,
- 1331668247412877246L,
- 1331668247410583861L,
- 1331668247314038062L,
- 1331668247410735104L,
- 1331668247410594291L,
- 1331668247314038062L,
- 1331668247413682702L,
- 1331668247410844189L,
- 1331668247314038062L,
- 1331668247519712481L,
- 1331668247411099759L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247924029486L,
- 1331668247924012402L,
- 1331668247412302666L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247924105876L,
- 1331668247924098044L,
- 1331668247417574343L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248014184526L,
- 1331668248014130616L,
- 1331668247417635948L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247928627023L,
- 1331668247928621067L,
- 1331668247417978805L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247928556625L,
- 1331668247928529840L,
- 1331668247418470511L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247930341625L,
- 1331668247314038062L,
- 1331668248014184526L,
- 1331668248013793850L,
- 1331668247419578477L,
- 1331668247314038062L,
- 1331668247930328175L,
- 1331668247419655652L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248013753736L,
- 1331668248013749389L,
- 1331668247420382626L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247930579872L,
- 1331668247930574368L,
- 1331668247420451876L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247926378321L,
- 1331668247926367737L,
- 1331668247423543945L,
- 1331668247314038062L,
- 1331668247619316825L,
- 1331668247619491008L,
- 1331668247314038062L,
- 1331668247619505885L,
- 1331668247619495072L,
- 1331668247434248026L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247434551326L,
- 1331668247434546203L,
- 1331668247434365352L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247908325947L,
- 1331668247908319810L,
- 1331668247467380509L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247908677700L,
- 1331668247908640244L,
- 1331668247467447781L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247869556425L,
- 1331668247869544380L,
- 1331668247503177108L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247504321893L,
- 1331668247504319470L,
- 1331668247503423094L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668248014183954L,
- 1331668248014183954L,
- 1331668247512172527L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247539381562L,
- 1331668247539369787L,
- 1331668247539325848L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247735177820L,
- 1331668247735170303L,
- 1331668247735128110L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247735168206L,
- 1331668247735161964L,
- 1331668247735152717L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247775218227L,
- 1331668247314038062L,
- 1331668247775231079L,
- 1331668247775205377L,
- 1331668247775191569L,
- 1331668247314038062L,
- 1331668247775223776L,
- 1331668247775218227L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247869483379L,
- 1331668247869477795L,
- 1331668247869457807L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247941667986L,
- 1331668247941650415L,
- 1331668247941620894L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- 1331668247314038062L,
- };
-
- static final long[] endTimes = {
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014620024L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054130388L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014185078L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014620024L,
- 1331668248014620024L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014548923L,
- 1331668248014188534L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248015040151L,
- 1331668259054285979L,
- 1331668248482983146L,
- 1331668248015041609L,
- 1331668248015176320L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248483009726L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248015959980L,
- 1331668259054285979L,
- 1331668248016172023L,
- 1331668248016194935L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054136697L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248016556933L,
- 1331668248016592456L,
- 1331668252511012367L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248016623209L,
- 1331668248016645047L,
- 1331668252843104826L,
- 1331668259054285979L,
- 1331668248486545657L,
- 1331668259054285979L,
- 1331668248502954816L,
- 1331668248503000162L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248020364249L,
- 1331668248020419523L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248020866943L,
- 1331668248020888352L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248531200073L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668257323835062L,
- 1331668257323879563L,
- 1331668248021867385L,
- 1331668259054285979L,
- 1331668248175307354L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259051873438L,
- 1331668259051879701L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248751061201L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259051838247L,
- 1331668259051846351L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668257325265220L,
- 1331668257325277639L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668250005943125L,
- 1331668259054285979L,
- 1331668248014565260L,
- 1331668259054285979L,
- 1331668250006219013L,
- 1331668259054285979L,
- 1331668250004649129L,
- 1331668250006228246L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668250005962644L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668250004668081L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014624125L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248414826115L,
- 1331668248414875444L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248420327828L,
- 1331668248420342919L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248015353903L,
- 1331668248015428919L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248420617453L,
- 1331668248420709272L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248421112139L,
- 1331668248421137268L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248421291701L,
- 1331668259054285979L,
- 1331668248014188534L,
- 1331668248014188534L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248421940554L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014548923L,
- 1331668248014550770L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248422509298L,
- 1331668248422523601L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248424325503L,
- 1331668248424394073L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248140683324L,
- 1331668248140686546L,
- 1331668259054285979L,
- 1331668248140727269L,
- 1331668248140780012L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251031789570L,
- 1331668251031812282L,
- 1331668252047037657L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248269586770L,
- 1331668248269613258L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248141167328L,
- 1331668248141400164L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248141004006L,
- 1331668248141028631L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248141324868L,
- 1331668248141345677L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248014185078L,
- 1331668248014185078L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248539549580L,
- 1331668248539579511L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668255234884605L,
- 1331668255234905622L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668255234936617L,
- 1331668255234941684L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252778982101L,
- 1331668259054285979L,
- 1331668252779007563L,
- 1331668252781320133L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252781341690L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248869653287L,
- 1331668248869679933L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248941858743L,
- 1331668248941885421L,
- 1331668252782929207L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248207116451L,
- 1331668248207177650L,
- 1331668248207163589L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248207165629L,
- 1331668248207212201L,
- 1331668248207197204L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248763171129L,
- 1331668259054285979L,
- 1331668248763179780L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668248895005379L,
- 1331668248895062414L,
- 1331668248895035146L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668249000328909L,
- 1331668249000373092L,
- 1331668249000350716L,
- 1331668259054285979L,
- 1331668249548101920L,
- 1331668259054285979L,
- 1331668249947171998L,
- 1331668249947269897L,
- 1331668249947249018L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668249951033184L,
- 1331668249951077605L,
- 1331668249951058138L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668249959079406L,
- 1331668259054285979L,
- 1331668249959100633L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668249970937981L,
- 1331668259054285979L,
- 1331668249970963407L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668250007423753L,
- 1331668250007449251L,
- 1331668250007428034L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668250231124169L,
- 1331668250231169946L,
- 1331668250231148973L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668250326525622L,
- 1331668250329519305L,
- 1331668250329507458L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251063191270L,
- 1331668251063256143L,
- 1331668251063222335L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251065026369L,
- 1331668251065048462L,
- 1331668251065030498L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251065058051L,
- 1331668251065091761L,
- 1331668251065069765L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251065364590L,
- 1331668251065412381L,
- 1331668251065407607L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251065462500L,
- 1331668251065477027L,
- 1331668251065465604L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251065780572L,
- 1331668251065836719L,
- 1331668251065829440L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251065899750L,
- 1331668251065913891L,
- 1331668251065902892L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251066057402L,
- 1331668251066070617L,
- 1331668251066060363L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251066495616L,
- 1331668251066520321L,
- 1331668251066506338L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251066532840L,
- 1331668251066546436L,
- 1331668251066535866L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251066658006L,
- 1331668251066671812L,
- 1331668251066660635L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251066883302L,
- 1331668251066906446L,
- 1331668251066887423L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251067153808L,
- 1331668251067176405L,
- 1331668251067157534L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251067407214L,
- 1331668251067420770L,
- 1331668251067410220L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251067763731L,
- 1331668251067818612L,
- 1331668251067811009L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251067884367L,
- 1331668251067897382L,
- 1331668251067887136L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251068275691L,
- 1331668251068288692L,
- 1331668251068278423L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251068706355L,
- 1331668251068719015L,
- 1331668251068709290L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251069067645L,
- 1331668251069122518L,
- 1331668251069116275L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251069178617L,
- 1331668251069191305L,
- 1331668251069181300L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251069664884L,
- 1331668251069684555L,
- 1331668251069668097L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251069682852L,
- 1331668251069708201L,
- 1331668251069690226L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251715054925L,
- 1331668259054285979L,
- 1331668251715066022L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251803784493L,
- 1331668251803827591L,
- 1331668251803808547L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251983438636L,
- 1331668251983448709L,
- 1331668251983441583L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668251992993580L,
- 1331668251993008591L,
- 1331668251992998928L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252022091542L,
- 1331668252022091542L,
- 1331668252022091542L,
- 1331668252022091542L,
- 1331668259054285979L,
- 1331668252031771660L,
- 1331668252031777595L,
- 1331668252031773847L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252032463013L,
- 1331668252032502964L,
- 1331668252032497700L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252032506884L,
- 1331668252032559227L,
- 1331668252032539402L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252039535067L,
- 1331668259054285979L,
- 1331668252039537404L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252044008981L,
- 1331668252044014257L,
- 1331668252044010861L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252044059151L,
- 1331668252044064004L,
- 1331668252044060420L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252179391423L,
- 1331668252184781913L,
- 1331668252184772369L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252193425490L,
- 1331668252193432385L,
- 1331668252193427706L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252253575716L,
- 1331668252253592491L,
- 1331668252253581852L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252472449352L,
- 1331668252472474547L,
- 1331668252472458163L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252487295286L,
- 1331668252487300925L,
- 1331668252487297683L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252495759849L,
- 1331668252495766026L,
- 1331668252495762178L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252496219924L,
- 1331668252496245837L,
- 1331668252496228816L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252523291829L,
- 1331668252523482082L,
- 1331668252523469395L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252764810964L,
- 1331668252764829827L,
- 1331668252764814570L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252765021775L,
- 1331668252765026623L,
- 1331668252765023841L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252769399706L,
- 1331668259054285979L,
- 1331668252769401404L,
- 1331668259054285979L,
- 1331668252769446847L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252769456141L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252784988923L,
- 1331668259054285979L,
- 1331668252785262589L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252795062126L,
- 1331668259054285979L,
- 1331668252795122600L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252828832090L,
- 1331668259054285979L,
- 1331668252828859292L,
- 1331668252828904216L,
- 1331668252828866041L,
- 1331668259054285979L,
- 1331668252829060434L,
- 1331668252828992804L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252829505108L,
- 1331668259054285979L,
- 1331668252829527974L,
- 1331668252829719292L,
- 1331668252829638887L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252829643060L,
- 1331668259054285979L,
- 1331668252829660274L,
- 1331668259054285979L,
- 1331668252829683896L,
- 1331668259054285979L,
- 1331668252829799248L,
- 1331668259054285979L,
- 1331668252829802278L,
- 1331668259054285979L,
- 1331668252829821642L,
- 1331668259054285979L,
- 1331668252829840961L,
- 1331668259054285979L,
- 1331668252829859256L,
- 1331668259054285979L,
- 1331668252829976501L,
- 1331668252830107659L,
- 1331668252830085595L,
- 1331668259054285979L,
- 1331668252830154848L,
- 1331668252830139534L,
- 1331668259054285979L,
- 1331668252830212497L,
- 1331668252830194969L,
- 1331668259054285979L,
- 1331668252830382459L,
- 1331668252830368625L,
- 1331668259054285979L,
- 1331668252830526491L,
- 1331668252830499169L,
- 1331668259054285979L,
- 1331668252830576634L,
- 1331668252830564658L,
- 1331668259054285979L,
- 1331668252831112505L,
- 1331668252831083126L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252831228714L,
- 1331668252831318123L,
- 1331668252831301843L,
- 1331668259054285979L,
- 1331668252831543926L,
- 1331668252831527998L,
- 1331668259054285979L,
- 1331668252831834393L,
- 1331668252831817197L,
- 1331668259054285979L,
- 1331668252832056760L,
- 1331668252832046333L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252883172744L,
- 1331668252883172744L,
- 1331668252883172744L,
- 1331668252883172744L,
- 1331668259054285979L,
- 1331668252885827603L,
- 1331668252885827603L,
- 1331668252885827603L,
- 1331668252885827603L,
- 1331668259054285979L,
- 1331668252889337098L,
- 1331668259054285979L,
- 1331668252889396688L,
- 1331668252889396688L,
- 1331668252889396688L,
- 1331668252889396688L,
- 1331668252901232798L,
- 1331668252901118256L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252901540914L,
- 1331668252901540914L,
- 1331668252901540914L,
- 1331668252901540914L,
- 1331668259054285979L,
- 1331668252901573889L,
- 1331668252901586635L,
- 1331668252901577276L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252906764880L,
- 1331668252906764880L,
- 1331668252906764880L,
- 1331668252906764880L,
- 1331668259054285979L,
- 1331668252912042743L,
- 1331668259054285979L,
- 1331668252912048618L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668252927449371L,
- 1331668252927449371L,
- 1331668252927449371L,
- 1331668252927449371L,
- 1331668259054285979L,
- 1331668252947156908L,
- 1331668252947156908L,
- 1331668252947156908L,
- 1331668252947156908L,
- 1331668259054285979L,
- 1331668252947197386L,
- 1331668252947197386L,
- 1331668252947197386L,
- 1331668252947197386L,
- 1331668259054285979L,
- 1331668253035499713L,
- 1331668253035499713L,
- 1331668253035499713L,
- 1331668253035499713L,
- 1331668259054285979L,
- 1331668253036766769L,
- 1331668253036766769L,
- 1331668253036766769L,
- 1331668253036766769L,
- 1331668259054285979L,
- 1331668253037890651L,
- 1331668253037890651L,
- 1331668253037890651L,
- 1331668253037890651L,
- 1331668259054285979L,
- 1331668253051945128L,
- 1331668253051945128L,
- 1331668253051945128L,
- 1331668253051945128L,
- 1331668259054285979L,
- 1331668253054627961L,
- 1331668253054627961L,
- 1331668253054627961L,
- 1331668253054627961L,
- 1331668259054285979L,
- 1331668253057609433L,
- 1331668253057609433L,
- 1331668253057609433L,
- 1331668253057609433L,
- 1331668259054285979L,
- 1331668253062222314L,
- 1331668253062222314L,
- 1331668253062222314L,
- 1331668253062222314L,
- 1331668259054285979L,
- 1331668253097239708L,
- 1331668253097239708L,
- 1331668253097239708L,
- 1331668253097239708L,
- 1331668259054285979L,
- 1331668253097518746L,
- 1331668253097518746L,
- 1331668253097518746L,
- 1331668253097518746L,
- 1331668259054285979L,
- 1331668253267104284L,
- 1331668253267117055L,
- 1331668253267107624L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668253267342015L,
- 1331668253267378405L,
- 1331668253267367303L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668253278218713L,
- 1331668253278218713L,
- 1331668253278218713L,
- 1331668253278218713L,
- 1331668259054285979L,
- 1331668253324119756L,
- 1331668253324119756L,
- 1331668253324119756L,
- 1331668253324119756L,
- 1331668259054285979L,
- 1331668253614347227L,
- 1331668253614347227L,
- 1331668253614347227L,
- 1331668253614347227L,
- 1331668259054285979L,
- 1331668253619459320L,
- 1331668253619459320L,
- 1331668253619459320L,
- 1331668253619459320L,
- 1331668259054285979L,
- 1331668253619867625L,
- 1331668253619867625L,
- 1331668253619867625L,
- 1331668253619867625L,
- 1331668259054285979L,
- 1331668253621486721L,
- 1331668253621508851L,
- 1331668253621491536L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668253622429608L,
- 1331668253622429608L,
- 1331668253622429608L,
- 1331668253622429608L,
- 1331668259054285979L,
- 1331668253857465365L,
- 1331668253857465365L,
- 1331668253857465365L,
- 1331668253857465365L,
- 1331668259054285979L,
- 1331668253858125091L,
- 1331668253858125091L,
- 1331668253858125091L,
- 1331668253858125091L,
- 1331668259054285979L,
- 1331668253910194540L,
- 1331668253910194540L,
- 1331668253910194540L,
- 1331668253910194540L,
- 1331668259054285979L,
- 1331668253910329721L,
- 1331668253910329721L,
- 1331668253910329721L,
- 1331668253910329721L,
- 1331668259054285979L,
- 1331668253984922308L,
- 1331668253984922308L,
- 1331668253984922308L,
- 1331668253984922308L,
- 1331668259054285979L,
- 1331668254004098152L,
- 1331668254004098152L,
- 1331668254004098152L,
- 1331668254004098152L,
- 1331668259054285979L,
- 1331668254047839900L,
- 1331668254047839900L,
- 1331668254047839900L,
- 1331668254047839900L,
- 1331668259054285979L,
- 1331668254093066195L,
- 1331668254093066195L,
- 1331668254093066195L,
- 1331668254093066195L,
- 1331668259054285979L,
- 1331668254106326339L,
- 1331668254106326339L,
- 1331668254106326339L,
- 1331668254106326339L,
- 1331668259054285979L,
- 1331668255052411647L,
- 1331668255052411647L,
- 1331668255052411647L,
- 1331668255052411647L,
- 1331668259054285979L,
- 1331668255157088064L,
- 1331668255157101973L,
- 1331668255157091812L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668256244508635L,
- 1331668256244508635L,
- 1331668256244508635L,
- 1331668256244508635L,
- 1331668259054285979L,
- 1331668257246987050L,
- 1331668257247036372L,
- 1331668257247027684L,
- 1331668259054285979L,
- 1331668259054285979L,
- 1331668259045096840L,
- 1331668259045096840L,
- 1331668259045096840L,
- 1331668259045096840L,
- 1331668259054285979L,
- 1331668259052126585L,
- 1331668259052126585L,
- 1331668259052126585L,
- 1331668259052126585L,
- 1331668259054285979L,
- 1331668259053345550L,
- 1331668259054285979L,
- 1331668259053349544L,
- 1331668259054285979L,
- };
-
- static final ITmfStateValue[] values = {
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1397),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("lttng-consumerd"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(5),
- TmfStateValue.newValueString("swapper/1"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1432),
- TmfStateValue.newValueInt(2),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("lttng-consumerd"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_ppoll"),
- TmfStateValue.newValueString("alsa-sink"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_epoll_wait"),
- TmfStateValue.newValueString("lttng-sessiond"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("firefox"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("firefox"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gnome-terminal"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_select"),
- TmfStateValue.newValueString("Xorg"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("metacity"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("kworker/0:1"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("ksoftirqd/0"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_read"),
- TmfStateValue.newValueString("rsyslogd"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("rs:main Q:Reg"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("kworker/1:1"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_select"),
- TmfStateValue.newValueString("rsyslogd"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_read"),
- TmfStateValue.newValueString("bash"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("bamfdaemon"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gnome-settings-"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("unity-2d-shell"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("unity-2d-panel"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("indicator-multi"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gdbus"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("dbus-daemon"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gdbus"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("indicator-appli"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(3),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gdbus"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gdbus"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(5),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("unity-panel-ser"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("hud-service"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("gdbus"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("openvpn"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("firefox"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(2),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("gdbus"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_nanosleep"),
- TmfStateValue.newValueString("gvfs-afc-volume"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("rtkit-daemon"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("rtkit-daemon"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueString("sys_poll"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("thunderbird-bin"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.newValueInt(1),
- TmfStateValue.newValueString("sys_futex"),
- TmfStateValue.newValueString("firefox"),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- TmfStateValue.nullValue(),
- };
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-org.eclipse.linuxtools.lttng.core/debug=false
-org.eclipse.linuxtools.lttng.core/info=false
-org.eclipse.linuxtools.lttng.core/warn=false
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.kernel.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.core;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.tracecompass.ctf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core,
- org.eclipse.linuxtools.lttng2.control.core
-Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.core;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.kernel.core.tests",
- org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui,org.eclipse.linuxtools.lttng2.kernel.core.tests",
- org.eclipse.linuxtools.lttng2.kernel.core.analysis,
- org.eclipse.linuxtools.lttng2.kernel.core.cpuusage,
- org.eclipse.linuxtools.lttng2.kernel.core.event.matching,
- org.eclipse.linuxtools.lttng2.kernel.core.trace
-Import-Package: com.google.common.collect
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- plugin.xml
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.kernel.core
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Kernel Analysis Core Plug-in
-
-tracetype.type.kernel = LTTng Kernel Trace
-analysis.lttngkernel = LTTng Kernel Analysis
-
-cpuusage.lttng.kernel = CPU usage
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.linuxtools.tmf.core.tracetype">
- <type
- category="org.eclipse.linuxtools.tmf.ctf.core.category.ctf"
- event_type="org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent"
- id="org.eclipse.linuxtools.lttng2.kernel.tracetype"
- isDirectory="true"
- name="%tracetype.type.kernel"
- trace_type="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
- </type>
- </extension>
- <extension
- point="org.eclipse.linuxtools.tmf.core.analysis">
- <module
- analysis_module="org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule"
- automatic="true"
- id="org.eclipse.linuxtools.lttng2.kernel.analysis"
- name="%analysis.lttngkernel">
- <tracetype
- class="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
- </tracetype>
- </module>
- <module
- analysis_module="org.eclipse.linuxtools.lttng2.kernel.core.cpuusage.LttngKernelCpuUsageAnalysis"
- id="org.eclipse.linuxtools.lttng2.kernel.core.cpuusage"
- name="%cpuusage.lttng.kernel">
- <tracetype
- applies="true"
- class="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
- </tracetype>
- </module>
- </extension>
-</plugin>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.kernel.core</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools LTTng Kernel Analysis Core Plug-in</name>
-
- <build>
- <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
-import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
-import org.osgi.framework.BundleContext;
-
-/**
- * <b><u>Activator</u></b>
- * <p>
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
-
- /**
- * The shared instance
- */
- private static Activator plugin;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ------------------------------------------------------------------------
- // Operators
- // ------------------------------------------------------------------------
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- TmfEventMatching.registerMatchObject(new TcpEventMatching());
- TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logInfo(String message) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logInfo(String message, Throwable exception) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logWarning(String message) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logWarning(String message, Throwable exception) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logError(String message) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logError(String message, Throwable exception) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core;
-
-/**
- * This file defines all the attribute names used in the handler. Both the
- * construction and query steps should use them.
- *
- * These should not be externalized! The values here are used as-is in the
- * history file on disk, so they should be kept the same to keep the file format
- * compatible. If a view shows attribute names directly, the localization should
- * be done on the viewer side.
- *
- * @author alexmont
- *
- */
-@SuppressWarnings({"nls", "javadoc"})
-public interface Attributes {
-
- /* First-level attributes */
- static final String CPUS = "CPUs";
- static final String THREADS = "Threads";
- static final String RESOURCES = "Resources";
-
- /* Sub-attributes of the CPU nodes */
- static final String CURRENT_THREAD = "Current_thread";
- static final String STATUS = "Status";
-
- /* Sub-attributes of the Thread nodes */
- static final String PPID = "PPID";
- //static final String STATUS = "Status"
- static final String EXEC_NAME = "Exec_name";
- static final String SYSTEM_CALL = "System_call";
-
- /* Attributes under "Resources" */
- static final String IRQS = "IRQs";
- static final String SOFT_IRQS = "Soft_IRQs";
-
- /* Misc stuff */
- static final String UNKNOWN = "Unknown";
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core;
-
-/**
- * This file defines all the known event and field names for LTTng 2.0 kernel
- * traces.
- *
- * Once again, these should not be externalized, since they need to match
- * exactly what the tracer outputs. If you want to localize them in a view, you
- * should do a mapping in the viewer itself.
- *
- * @author alexmont
- */
-@SuppressWarnings({"javadoc", "nls"})
-public interface LttngStrings {
-
- /* Event names */
- static final String EXIT_SYSCALL = "exit_syscall";
- static final String IRQ_HANDLER_ENTRY = "irq_handler_entry";
- static final String IRQ_HANDLER_EXIT = "irq_handler_exit";
- static final String SOFTIRQ_ENTRY = "softirq_entry";
- static final String SOFTIRQ_EXIT = "softirq_exit";
- static final String SOFTIRQ_RAISE = "softirq_raise";
- static final String SCHED_SWITCH = "sched_switch";
- static final String SCHED_WAKEUP = "sched_wakeup";
- static final String SCHED_WAKEUP_NEW = "sched_wakeup_new";
- static final String SCHED_PROCESS_FORK = "sched_process_fork";
- static final String SCHED_PROCESS_EXIT = "sched_process_exit";
- static final String SCHED_PROCESS_FREE = "sched_process_free";
- static final String STATEDUMP_PROCESS_STATE = "lttng_statedump_process_state";
-
- /* System call names */
- static final String SYSCALL_PREFIX = "sys_";
- static final String COMPAT_SYSCALL_PREFIX = "compat_sys_";
- static final String SYS_CLONE = "sys_clone";
-
- /* Field names */
- static final String IRQ = "irq";
- static final String COMM = "comm";
- static final String NAME = "name";
- static final String PID = "pid";
- static final String TID = "tid";
- static final String PPID = "ppid";
- static final String STATUS = "status";
- static final String VEC = "vec";
- static final String PREV_COMM = "prev_comm";
- static final String PREV_TID = "prev_tid";
- static final String PREV_STATE = "prev_state";
- static final String NEXT_COMM = "next_comm";
- static final String NEXT_TID = "next_tid";
- static final String PARENT_TID = "parent_tid";
- static final String CHILD_COMM = "child_comm";
- static final String CHILD_TID = "child_tid";
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core;
-
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
-
-/**
- * State values that are used in the kernel event handler. It's much better to
- * use integer values whenever possible, since those take much less space in the
- * history file.
- *
- * @author alexmont
- *
- */
-@SuppressWarnings("javadoc")
-public interface StateValues {
-
- /* CPU Status */
- static final int CPU_STATUS_IDLE = 0;
- static final int CPU_STATUS_RUN_USERMODE = 1;
- static final int CPU_STATUS_RUN_SYSCALL = 2;
- static final int CPU_STATUS_IRQ = 3;
- static final int CPU_STATUS_SOFTIRQ = 4;
-
- static final ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
- static final ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
- static final ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
- static final ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
- static final ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
-
- /* Process status */
- static final int PROCESS_STATUS_UNKNOWN = 0;
- static final int PROCESS_STATUS_WAIT_BLOCKED = 1;
- static final int PROCESS_STATUS_RUN_USERMODE = 2;
- static final int PROCESS_STATUS_RUN_SYSCALL = 3;
- static final int PROCESS_STATUS_INTERRUPTED = 4;
- static final int PROCESS_STATUS_WAIT_FOR_CPU = 5;
-
- static final ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
- static final ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
- static final ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
- static final ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
- static final ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
- static final ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
-
- /* SoftIRQ-specific stuff. -1: null/disabled, >= 0: running on that CPU */
- static final int SOFT_IRQ_RAISED = -2;
-
- static final ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(SOFT_IRQ_RAISED);
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core;
-
-/**
- * This file defines all the known event and field names used to trace socket
- * connection for both the addons module method (
- * {@link org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching}
- * ) and the net_data_experimental branch (
- * {@link org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching}
- * ).
- *
- * These events should be eventually mainlined and when this happens, this class
- * won't be necessary anymore and they should be moved to {@link LttngStrings}
- * class
- *
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings({ "javadoc", "nls" })
-public interface TcpEventStrings {
-
- /* Event names */
- public static final String INET_CONNECT = "inet_connect";
- public static final String INET_SOCK_CREATE = "inet_sock_create";
- public static final String INET_SOCK_LOCAL_OUT = "inet_sock_local_out";
- public static final String INET_SOCK_LOCAL_IN = "inet_sock_local_in";
- public static final String INET_SOCK_CLONE = "inet_sock_clone";
- public static final String INET_ACCEPT = "inet_accept";
- public static final String INET_SOCK_DELETE = "inet_sock_delete";
- public static final String NETIF_RECEIVE_SKB = "netif_receive_skb";
- public static final String NET_DEV_QUEUE = "net_dev_queue";
-
- /* Field names */
- public static final String SEQ = "seq";
- public static final String SK = "sk";
- public static final String OSK = "osk";
- public static final String NSK = "nsk";
- public static final String SPORT = "sport";
- public static final String DPORT = "dport";
- public static final String SADDR = "saddr";
- public static final String DADDR = "daddr";
- public static final String ACKSEQ = "ack_seq";
- public static final String CHECK = "check";
- public static final String WINDOW = "window";
- public static final String FLAGS = "flags";
- public static final String TRANSPORT_FIELDS = "transport_fields";
- public static final String TYPE_TCP = "thtype_tcp";
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson
- * Copyright (c) 2010, 2011 École Polytechnique de Montréal
- * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
- * 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
- *
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-
-/**
- * This is the state change input plugin for TMF's state system which handles
- * the LTTng 2.0 kernel traces in CTF format.
- *
- * It uses the reference handler defined in CTFKernelHandler.java.
- *
- * @author alexmont
- *
- */
-public class LttngKernelStateProvider extends AbstractTmfStateProvider {
-
- /**
- * Version number of this state provider. Please bump this if you modify the
- * contents of the generated state history in some way.
- */
- private static final int VERSION = 4;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Instantiate a new state provider plugin.
- *
- * @param trace
- * The LTTng 2.0 kernel trace directory
- */
- public LttngKernelStateProvider(ITmfTrace trace) {
- super(trace, ITmfEvent.class, "LTTng Kernel"); //$NON-NLS-1$
- }
-
- // ------------------------------------------------------------------------
- // IStateChangeInput
- // ------------------------------------------------------------------------
-
- @Override
- public int getVersion() {
- return VERSION;
- }
-
- @Override
- public void assignTargetStateSystem(ITmfStateSystemBuilder ssb) {
- /* We can only set up the locations once the state system is assigned */
- super.assignTargetStateSystem(ssb);
- }
-
- @Override
- public LttngKernelStateProvider getNewInstance() {
- return new LttngKernelStateProvider(this.getTrace());
- }
-
- @Override
- protected void eventHandle(ITmfEvent event) {
- /*
- * AbstractStateChangeInput should have already checked for the correct
- * class type
- */
-
- final String eventName = event.getType().getName();
- final long ts = event.getTimestamp().getValue();
-
- try {
- /* Shortcut for the "current CPU" attribute node */
- final Integer currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(), event.getSource());
-
- /*
- * Shortcut for the "current thread" attribute node. It requires
- * querying the current CPU's current thread.
- */
- int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
- ITmfStateValue value = ss.queryOngoingState(quark);
- int thread = value.isNull() ? -1 : value.unboxInt();
- final Integer currentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(thread));
-
- /*
- * Feed event to the history system if it's known to cause a state
- * transition.
- */
- switch (eventName) {
-
- case LttngStrings.EXIT_SYSCALL:
- /* Fields: int64 ret */
- {
- /* Clear the current system call on the process */
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
- value = TmfStateValue.nullValue();
- ss.modifyAttribute(ts, value, quark);
-
- /* Put the process' status back to user mode */
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
- value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
- ss.modifyAttribute(ts, value, quark);
-
- /* Put the CPU's status back to user mode */
- quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
- value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
- ss.modifyAttribute(ts, value, quark);
- }
- break;
-
- case LttngStrings.IRQ_HANDLER_ENTRY:
- /* Fields: int32 irq, string name */
- {
- Integer irqId = ((Long) event.getContent().getField(LttngStrings.IRQ).getValue()).intValue();
-
- /* Mark this IRQ as active in the resource tree.
- * The state value = the CPU on which this IRQ is sitting */
- quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(), irqId.toString());
- value = TmfStateValue.newValueInt(Integer.parseInt(event.getSource()));
- ss.modifyAttribute(ts, value, quark);
-
- /* Change the status of the running process to interrupted */
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
- value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
- ss.modifyAttribute(ts, value, quark);
-
- /* Change the status of the CPU to interrupted */
- quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
- value = StateValues.CPU_STATUS_IRQ_VALUE;
- ss.modifyAttribute(ts, value, quark);
- }
- break;
-
- case LttngStrings.IRQ_HANDLER_EXIT:
- /* Fields: int32 irq, int32 ret */
- {
- Integer irqId = ((Long) event.getContent().getField(LttngStrings.IRQ).getValue()).intValue();
-
- /* Put this IRQ back to inactive in the resource tree */
- quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(), irqId.toString());
- value = TmfStateValue.nullValue();
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the previous process back to running */
- setProcessToRunning(ts, currentThreadNode);
-
- /* Set the CPU status back to running or "idle" */
- cpuExitInterrupt(ts, currentCPUNode, currentThreadNode);
- }
- break;
-
- case LttngStrings.SOFTIRQ_ENTRY:
- /* Fields: int32 vec */
- {
- Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
-
- /* Mark this SoftIRQ as active in the resource tree.
- * The state value = the CPU on which this SoftIRQ is processed */
- quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
- value = TmfStateValue.newValueInt(Integer.parseInt(event.getSource()));
- ss.modifyAttribute(ts, value, quark);
-
- /* Change the status of the running process to interrupted */
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
- value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
- ss.modifyAttribute(ts, value, quark);
-
- /* Change the status of the CPU to interrupted */
- quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
- value = StateValues.CPU_STATUS_SOFTIRQ_VALUE;
- ss.modifyAttribute(ts, value, quark);
- }
- break;
-
- case LttngStrings.SOFTIRQ_EXIT:
- /* Fields: int32 vec */
- {
- Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
-
- /* Put this SoftIRQ back to inactive (= -1) in the resource tree */
- quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
- value = TmfStateValue.nullValue();
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the previous process back to running */
- setProcessToRunning(ts, currentThreadNode);
-
- /* Set the CPU status back to "busy" or "idle" */
- cpuExitInterrupt(ts, currentCPUNode, currentThreadNode);
- }
- break;
-
- case LttngStrings.SOFTIRQ_RAISE:
- /* Fields: int32 vec */
- {
- Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
-
- /* Mark this SoftIRQ as *raised* in the resource tree.
- * State value = -2 */
- quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
- value = StateValues.SOFT_IRQ_RAISED_VALUE;
- ss.modifyAttribute(ts, value, quark);
- }
- break;
-
- case LttngStrings.SCHED_SWITCH:
- /*
- * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64 prev_state,
- * string next_comm, int32 next_tid, int32 next_prio
- */
- {
- ITmfEventField content = event.getContent();
- Integer prevTid = ((Long) content.getField(LttngStrings.PREV_TID).getValue()).intValue();
- Long prevState = (Long) content.getField(LttngStrings.PREV_STATE).getValue();
- String nextProcessName = (String) content.getField(LttngStrings.NEXT_COMM).getValue();
- Integer nextTid = ((Long) content.getField(LttngStrings.NEXT_TID).getValue()).intValue();
-
- Integer formerThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), prevTid.toString());
- Integer newCurrentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), nextTid.toString());
-
- /* Set the status of the process that got scheduled out. */
- quark = ss.getQuarkRelativeAndAdd(formerThreadNode, Attributes.STATUS);
- if (prevState != 0) {
- value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
- } else {
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- }
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the status of the new scheduled process */
- setProcessToRunning(ts, newCurrentThreadNode);
-
- /* Set the exec name of the new process */
- quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.EXEC_NAME);
- value = TmfStateValue.newValueString(nextProcessName);
- ss.modifyAttribute(ts, value, quark);
-
- /* Make sure the PPID and system_call sub-attributes exist */
- ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
- ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PPID);
-
- /* Set the current scheduled process on the relevant CPU */
- quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
- value = TmfStateValue.newValueInt(nextTid);
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the status of the CPU itself */
- if (nextTid > 0) {
- /* Check if the entering process is in kernel or user mode */
- quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
- if (ss.queryOngoingState(quark).isNull()) {
- value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
- } else {
- value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
- }
- } else {
- value = StateValues.CPU_STATUS_IDLE_VALUE;
- }
- quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
- ss.modifyAttribute(ts, value, quark);
- }
- break;
-
- case LttngStrings.SCHED_PROCESS_FORK:
- /* Fields: string parent_comm, int32 parent_tid,
- * string child_comm, int32 child_tid */
- {
- ITmfEventField content = event.getContent();
- // String parentProcessName = (String) event.getFieldValue("parent_comm");
- String childProcessName = (String) content.getField(LttngStrings.CHILD_COMM).getValue();
- // assert ( parentProcessName.equals(childProcessName) );
-
- Integer parentTid = ((Long) content.getField(LttngStrings.PARENT_TID).getValue()).intValue();
- Integer childTid = ((Long) content.getField(LttngStrings.CHILD_TID).getValue()).intValue();
-
- Integer parentTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), parentTid.toString());
- Integer childTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), childTid.toString());
-
- /* Assign the PPID to the new process */
- quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.PPID);
- value = TmfStateValue.newValueInt(parentTid);
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the new process' exec_name */
- quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.EXEC_NAME);
- value = TmfStateValue.newValueString(childProcessName);
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the new process' status */
- quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.STATUS);
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- ss.modifyAttribute(ts, value, quark);
-
- /* Set the process' syscall name, to be the same as the parent's */
- quark = ss.getQuarkRelativeAndAdd(parentTidNode, Attributes.SYSTEM_CALL);
- value = ss.queryOngoingState(quark);
- if (value.isNull()) {
- /*
- * Maybe we were missing info about the parent? At least we
- * will set the child right. Let's suppose "sys_clone".
- */
- value = TmfStateValue.newValueString(LttngStrings.SYS_CLONE);
- }
- quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.SYSTEM_CALL);
- ss.modifyAttribute(ts, value, quark);
- }
- break;
-
- case LttngStrings.SCHED_PROCESS_EXIT:
- /* Fields: string comm, int32 tid, int32 prio */
- break;
-
- case LttngStrings.SCHED_PROCESS_FREE:
- /* Fields: string comm, int32 tid, int32 prio */
- /*
- * A sched_process_free will always happen after the sched_switch
- * that will remove the process from the cpu for the last time. So
- * this is when we should delete everything wrt to the process.
- */
- {
- Integer tid = ((Long) event.getContent().getField(LttngStrings.TID).getValue()).intValue();
- /*
- * Remove the process and all its sub-attributes from the
- * current state
- */
- quark = ss.getQuarkRelativeAndAdd(getNodeThreads(), tid.toString());
- ss.removeAttribute(ts, quark);
- }
- break;
-
- case LttngStrings.STATEDUMP_PROCESS_STATE:
- /* Fields:
- * int32 type, int32 mode, int32 pid, int32 submode, int32 vpid,
- * int32 ppid, int32 tid, string name, int32 status, int32 vtid */
- {
- ITmfEventField content = event.getContent();
- int tid = ((Long) content.getField(LttngStrings.TID).getValue()).intValue();
- int pid = ((Long) content.getField(LttngStrings.PID).getValue()).intValue();
- int ppid = ((Long) content.getField(LttngStrings.PPID).getValue()).intValue();
- int status = ((Long) content.getField(LttngStrings.STATUS).getValue()).intValue();
- String name = (String) content.getField(LttngStrings.NAME).getValue();
- /*
- * "mode" could be interesting too, but it doesn't seem to be
- * populated with anything relevant for now.
- */
-
- int curThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(tid));
-
- /* Set the process' name */
- quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.EXEC_NAME);
- if (ss.queryOngoingState(quark).isNull()) {
- /* If the value didn't exist previously, set it */
- value = TmfStateValue.newValueString(name);
- ss.modifyAttribute(ts, value, quark);
- }
-
- /* Set the process' PPID */
- quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.PPID);
- if (ss.queryOngoingState(quark).isNull()) {
- if (pid == tid) {
- /* We have a process. Use the 'PPID' field. */
- value = TmfStateValue.newValueInt(ppid);
- } else {
- /* We have a thread, use the 'PID' field for the parent. */
- value = TmfStateValue.newValueInt(pid);
- }
- ss.modifyAttribute(ts, value, quark);
- }
-
- /* Set the process' status */
- quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.STATUS);
- if (ss.queryOngoingState(quark).isNull()) {
- /* "2" here means "WAIT_FOR_CPU", and "5" "WAIT_BLOCKED" in the LTTng kernel. */
- if (status == 2) {
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- } else if (status == 5) {
- value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
- } else {
- value = StateValues.PROCESS_STATUS_UNKNOWN_VALUE;
- }
- ss.modifyAttribute(ts, value, quark);
- }
- }
- break;
-
- case LttngStrings.SCHED_WAKEUP:
- case LttngStrings.SCHED_WAKEUP_NEW:
- /* Fields (same fields for both types):
- * string comm, int32 pid, int32 prio, int32 success,
- * int32 target_cpu */
- {
- final int tid = ((Long) event.getContent().getField(LttngStrings.TID).getValue()).intValue();
- final int threadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(tid));
-
- /*
- * The process indicated in the event's payload is now ready to
- * run. Assign it to the "wait for cpu" state, but only if it
- * was not already running.
- */
- quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.STATUS);
- int status = ss.queryOngoingState(quark).unboxInt();
-
- if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL &&
- status != StateValues.PROCESS_STATUS_RUN_USERMODE) {
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- ss.modifyAttribute(ts, value, quark);
- }
- }
- break;
-
- default:
- /* Other event types not covered by the main switch */
- {
- if (eventName.startsWith(LttngStrings.SYSCALL_PREFIX)
- || eventName.startsWith(LttngStrings.COMPAT_SYSCALL_PREFIX)) {
- /*
- * This is a replacement for the old sys_enter event. Now
- * syscall names are listed into the event type
- */
-
- /* Assign the new system call to the process */
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
- value = TmfStateValue.newValueString(eventName);
- ss.modifyAttribute(ts, value, quark);
-
- /* Put the process in system call mode */
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
- value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
- ss.modifyAttribute(ts, value, quark);
-
- /* Put the CPU in system call (kernel) mode */
- quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
- value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
- ss.modifyAttribute(ts, value, quark);
- }
- }
- break;
- } // End of big switch
-
- } catch (AttributeNotFoundException ae) {
- /*
- * This would indicate a problem with the logic of the manager here,
- * so it shouldn't happen.
- */
- ae.printStackTrace();
-
- } catch (TimeRangeException tre) {
- /*
- * This would happen if the events in the trace aren't ordered
- * chronologically, which should never be the case ...
- */
- System.err.println("TimeRangeExcpetion caught in the state system's event manager."); //$NON-NLS-1$
- System.err.println("Are the events in the trace correctly ordered?"); //$NON-NLS-1$
- tre.printStackTrace();
-
- } catch (StateValueTypeException sve) {
- /*
- * This would happen if we were trying to push/pop attributes not of
- * type integer. Which, once again, should never happen.
- */
- sve.printStackTrace();
- }
- }
-
- // ------------------------------------------------------------------------
- // Convenience methods for commonly-used attribute tree locations
- // ------------------------------------------------------------------------
-
- private int getNodeCPUs() {
- return ss.getQuarkAbsoluteAndAdd(Attributes.CPUS);
- }
-
- private int getNodeThreads() {
- return ss.getQuarkAbsoluteAndAdd(Attributes.THREADS);
- }
-
- private int getNodeIRQs() {
- return ss.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.IRQS);
- }
-
- private int getNodeSoftIRQs() {
- return ss.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.SOFT_IRQS);
- }
-
- // ------------------------------------------------------------------------
- // Advanced state-setting methods
- // ------------------------------------------------------------------------
-
- /**
- * When we want to set a process back to a "running" state, first check
- * its current System_call attribute. If there is a system call active, we
- * put the process back in the syscall state. If not, we put it back in
- * user mode state.
- */
- private void setProcessToRunning(long ts, int currentThreadNode)
- throws AttributeNotFoundException, TimeRangeException,
- StateValueTypeException {
- int quark;
- ITmfStateValue value;
-
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
- if (ss.queryOngoingState(quark).isNull()) {
- /* We were in user mode before the interruption */
- value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
- } else {
- /* We were previously in kernel mode */
- value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
- }
- quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
- ss.modifyAttribute(ts, value, quark);
- }
-
- /**
- * Similar logic as above, but to set the CPU's status when it's coming out
- * of an interruption.
- */
- private void cpuExitInterrupt(long ts, int currentCpuNode, int currentThreadNode)
- throws StateValueTypeException, AttributeNotFoundException,
- TimeRangeException {
- int quark;
- ITmfStateValue value;
-
- quark = ss.getQuarkRelativeAndAdd(currentCpuNode, Attributes.CURRENT_THREAD);
- if (ss.queryOngoingState(quark).unboxInt() > 0) {
- /* There was a process on the CPU */
- quark = ss.getQuarkRelative(currentThreadNode, Attributes.SYSTEM_CALL);
- if (ss.queryOngoingState(quark).isNull()) {
- /* That process was in user mode */
- value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
- } else {
- /* That process was in a system call */
- value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
- }
- } else {
- /* There was no real process scheduled, CPU was idle */
- value = StateValues.CPU_STATUS_IDLE_VALUE;
- }
- quark = ss.getQuarkRelativeAndAdd(currentCpuNode, Attributes.STATUS);
- ss.modifyAttribute(ts, value, quark);
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- * Mathieu Rail - Provide the requirements of the analysis
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
-import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
-import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
-import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement.ValuePriorityLevel;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * State System Module for lttng kernel traces
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class LttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
-
- /**
- * The file name of the History Tree
- */
- public static final @NonNull String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
-
- /** The ID of this analysis module */
- public static final @NonNull String ID = "org.eclipse.linuxtools.lttng2.kernel.analysis"; //$NON-NLS-1$
-
- /*
- * TODO: Decide which events should be mandatory for the analysis, once the
- * appropriate error messages and session setup are in place.
- */
- private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of();
-
- private static final ImmutableSet<String> OPTIONAL_EVENTS = ImmutableSet.of(
- LttngStrings.EXIT_SYSCALL,
- LttngStrings.IRQ_HANDLER_ENTRY,
- LttngStrings.IRQ_HANDLER_EXIT,
- LttngStrings.SOFTIRQ_ENTRY,
- LttngStrings.SOFTIRQ_EXIT,
- LttngStrings.SOFTIRQ_RAISE,
- LttngStrings.SCHED_PROCESS_FORK,
- LttngStrings.SCHED_PROCESS_EXIT,
- LttngStrings.SCHED_PROCESS_FREE,
- LttngStrings.SCHED_SWITCH,
- LttngStrings.STATEDUMP_PROCESS_STATE,
- LttngStrings.SCHED_WAKEUP,
- LttngStrings.SCHED_WAKEUP_NEW,
-
- /* FIXME Add the prefix for syscalls */
- LttngStrings.SYSCALL_PREFIX
- );
-
- /** The requirements as an immutable set */
- private static final ImmutableSet<TmfAnalysisRequirement> REQUIREMENTS;
-
- static {
- /* initialize the requirement: domain and events */
- TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
- domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY);
-
- TmfAnalysisRequirement eventReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
- eventReq.addValues(OPTIONAL_EVENTS, ValuePriorityLevel.OPTIONAL);
-
- REQUIREMENTS = ImmutableSet.of(domainReq, eventReq);
- }
-
- @Override
- @NonNull
- protected ITmfStateProvider createStateProvider() {
- return new LttngKernelStateProvider(getTrace());
- }
-
- @Override
- @NonNull
- protected String getSsFileName() {
- return HISTORY_TREE_FILE_NAME;
- }
-
- @Override
- protected String getFullHelpText() {
- return Messages.LttngKernelAnalysisModule_Help;
- }
-
- @Override
- public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
- return REQUIREMENTS;
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized message strings from the LTTng Kernel Analysis
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.kernel.core.analysis.messages"; //$NON-NLS-1$
-
- public static String LttngKernelAnalysisModule_Help;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2014 École Polytechnique de Montréal
-#
-# 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:
-# Geneviève Bastien - Initial API and implementation
-###############################################################################
-
-LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * François Rajotte - Initial API and implementation
- * Geneviève Bastien - Revision of the initial implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.cpuusage;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-
-/**
- * Creates a state system with the total time spent on CPU for each thread and
- * for each CPU from a kernel trace.
- *
- * This state system in itself keeps the total time on CPU since last time the
- * process was scheduled out. The state system queries will only be accurate
- * when the process is not in a running state. To have exact CPU usage when
- * running, this state system needs to be used along the LTTng Kernel analysis.
- *
- * It requires only the 'sched_switch' events enabled on the trace.
- *
- * @author François Rajotte
- * @since 3.0
- */
-public class LttngKernelCpuStateProvider extends AbstractTmfStateProvider {
-
- private static final int VERSION = 1;
-
- /* For each CPU, maps the last time a thread was scheduled in */
- private final Map<String, Long> fLastStartTimes = new HashMap<>();
- private final long fTraceStart;
-
- /**
- * Constructor
- *
- * @param trace
- * The trace from which to get the CPU usage
- */
- public LttngKernelCpuStateProvider(ITmfTrace trace) {
- super(trace, ITmfEvent.class, "LTTng Kernel CPU usage"); //$NON-NLS-1$
- fTraceStart = trace.getStartTime().getValue();
- }
-
- // ------------------------------------------------------------------------
- // ITmfStateProvider
- // ------------------------------------------------------------------------
-
- @Override
- public int getVersion() {
- return VERSION;
- }
-
- @Override
- public LttngKernelCpuStateProvider getNewInstance() {
- return new LttngKernelCpuStateProvider(this.getTrace());
- }
-
- @Override
- protected void eventHandle(ITmfEvent event) {
- final String eventName = event.getType().getName();
-
- if (eventName.equals(LttngStrings.SCHED_SWITCH)) {
- /*
- * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64
- * prev_state, string next_comm, int32 next_tid, int32 next_prio
- */
-
- ITmfEventField content = event.getContent();
- long ts = event.getTimestamp().getValue();
- String cpu = event.getSource();
-
- Long prevTid = (Long) content.getField(LttngStrings.PREV_TID).getValue();
-
- try {
- Integer currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(), cpu);
-
- /*
- * This quark contains the value of the cumulative time spent on
- * the source CPU by the currently running thread
- */
- Integer cumulativeTimeQuark = ss.getQuarkRelativeAndAdd(currentCPUNode, prevTid.toString());
- Long startTime = fLastStartTimes.get(cpu);
- /*
- * If start time is null, we haven't seen the start of the
- * process, so we assume beginning of the trace
- */
- if (startTime == null) {
- startTime = fTraceStart;
- }
-
- /*
- * We add the time from startTime until now to the cumulative
- * time of the thread
- */
- if (startTime != null) {
- ITmfStateValue value = ss.queryOngoingState(cumulativeTimeQuark);
-
- /*
- * Modify cumulative time for this CPU/TID combo: The total
- * time changes when the process is scheduled out. Nothing
- * happens when the process is scheduled in.
- */
- long prevCumulativeTime = value.unboxLong();
- long newCumulativeTime = prevCumulativeTime + (ts - startTime);
-
- value = TmfStateValue.newValueLong(newCumulativeTime);
- ss.modifyAttribute(ts, value, cumulativeTimeQuark);
- fLastStartTimes.put(cpu, ts);
- }
- } catch (AttributeNotFoundException e) {
- Activator.getDefault().logError("Attribute not found in LttngKernelCpuStateProvider", e); //$NON-NLS-1$
- }
-
- }
- }
-
- /* Shortcut for the "current CPU" attribute node */
- private int getNodeCPUs() {
- return ss.getQuarkAbsoluteAndAdd(Attributes.CPUS);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.cpuusage;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-
-/**
- * This analysis module computes the CPU usage of a system from a kernel trace.
- * It requires the LTTng Kernel analysis module to have accurate CPU usage data.
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class LttngKernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
-
- /** The ID of this analysis */
- public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.core.cpuusage"; //$NON-NLS-1$
-
- /** Text used to identify 'total' entries in the returned maps */
- public static final String TOTAL = "total"; //$NON-NLS-1$
- /** String used to separate elements in the returned maps */
- public static final String SPLIT_STRING = "/"; //$NON-NLS-1$
- /** Idle process thread ID */
- public static final String TID_ZERO = "0"; //$NON-NLS-1$
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngKernelCpuStateProvider(getTrace());
- }
-
- @Override
- protected StateSystemBackendType getBackendType() {
- return StateSystemBackendType.FULL;
- }
-
- @Override
- protected boolean executeAnalysis(IProgressMonitor monitor) {
- /*
- * This analysis depends on the LTTng kernel analysis, so we'll start
- * that build at the same time
- */
- LttngKernelAnalysisModule module = getTrace().getAnalysisModuleOfClass(LttngKernelAnalysisModule.class, LttngKernelAnalysisModule.ID);
- if (module != null) {
- module.schedule();
- }
- return super.executeAnalysis(monitor);
- }
-
- /**
- * Get a map of time spent on CPU by various threads during a time range.
- *
- * @param start
- * Start time of requested range
- * @param end
- * End time of requested range
- * @return A map of TID -> time spent on CPU in the [start, end] interval
- */
- public Map<String, Long> getCpuUsageInRange(long start, long end) {
- Map<String, Long> map = new HashMap<>();
- Map<String, Long> totalMap = new HashMap<>();
-
- ITmfTrace trace = getTrace();
- ITmfStateSystem cpuSs = getStateSystem();
- if (trace == null || cpuSs == null) {
- return map;
- }
- ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
- if (kernelSs == null) {
- return map;
- }
-
- /*
- * Make sure the start/end times are within the state history, so we
- * don't get TimeRange exceptions.
- */
- long startTime = Math.max(start, cpuSs.getStartTime());
- startTime = Math.max(startTime, kernelSs.getStartTime());
- long endTime = Math.min(end, cpuSs.getCurrentEndTime());
- endTime = Math.min(endTime, kernelSs.getCurrentEndTime());
- long totalTime = 0;
- if (endTime < startTime) {
- return map;
- }
-
- try {
- /* Get the list of quarks for each CPU and CPU's TIDs */
- int cpusNode = cpuSs.getQuarkAbsolute(Attributes.CPUS);
- Map<Integer, List<Integer>> tidsPerCpu = new HashMap<>();
- for (int cpuNode : cpuSs.getSubAttributes(cpusNode, false)) {
- tidsPerCpu.put(cpuNode, cpuSs.getSubAttributes(cpuNode, false));
- }
-
- /* Query full states at start and end times */
- List<ITmfStateInterval> kernelEndState = kernelSs.queryFullState(endTime);
- List<ITmfStateInterval> endState = cpuSs.queryFullState(endTime);
- List<ITmfStateInterval> kernelStartState = kernelSs.queryFullState(startTime);
- List<ITmfStateInterval> startState = cpuSs.queryFullState(startTime);
-
- long countAtStart, countAtEnd;
-
- for (Entry<Integer, List<Integer>> entry : tidsPerCpu.entrySet()) {
- int cpuNode = entry.getKey();
- List<Integer> tidNodes = entry.getValue();
-
- String curCpuName = cpuSs.getAttributeName(cpuNode);
- long cpuTotal = 0;
-
- /* Get the quark of the thread running on this CPU */
- int currentThreadQuark = kernelSs.getQuarkAbsolute(Attributes.CPUS, curCpuName, Attributes.CURRENT_THREAD);
- /* Get the currently running thread on this CPU */
- int startThread = kernelStartState.get(currentThreadQuark).getStateValue().unboxInt();
- int endThread = kernelEndState.get(currentThreadQuark).getStateValue().unboxInt();
-
- for (int tidNode : tidNodes) {
- String curTidName = cpuSs.getAttributeName(tidNode);
- int tid = Integer.parseInt(curTidName);
-
- countAtEnd = endState.get(tidNode).getStateValue().unboxLong();
- countAtStart = startState.get(tidNode).getStateValue().unboxLong();
- if (countAtStart == -1) {
- countAtStart = 0;
- }
- if (countAtEnd == -1) {
- countAtEnd = 0;
- }
-
- /*
- * Interpolate start and end time of threads running at
- * those times
- */
- if (tid == startThread || startThread == -1) {
- long runningTime = kernelStartState.get(currentThreadQuark).getEndTime() - kernelStartState.get(currentThreadQuark).getStartTime();
- long runningEnd = kernelStartState.get(currentThreadQuark).getEndTime();
-
- countAtStart = interpolateCount(countAtStart, startTime, runningEnd, runningTime);
- }
- if (tid == endThread) {
- long runningTime = kernelEndState.get(currentThreadQuark).getEndTime() - kernelEndState.get(currentThreadQuark).getStartTime();
- long runningEnd = kernelEndState.get(currentThreadQuark).getEndTime();
-
- countAtEnd = interpolateCount(countAtEnd, endTime, runningEnd, runningTime);
- }
- /*
- * If startThread is -1, we made the hypothesis that the
- * process running at start was the current one. If the
- * count is negative, we were wrong in this hypothesis. Also
- * if the time at end is 0, it either means the process
- * hasn't been on the CPU or that we still don't know who is
- * running. In both cases, that invalidates the hypothesis.
- */
- if ((startThread == -1) && ((countAtEnd - countAtStart < 0) || (countAtEnd == 0))) {
- countAtStart = 0;
- }
-
- long currentCount = countAtEnd - countAtStart;
- if (currentCount < 0) {
- Activator.getDefault().logWarning(String.format("Negative count: start %d, end %d", countAtStart, countAtEnd)); //$NON-NLS-1$
- currentCount = 0;
- } else if (currentCount > endTime - startTime) {
- Activator.getDefault().logWarning(String.format("CPU Usage: Spent more time on CPU than allowed: %s spent %d when max should be %d", curTidName, currentCount, endTime - startTime)); //$NON-NLS-1$
- currentCount = 0;
- }
- cpuTotal += currentCount;
- map.put(curCpuName + SPLIT_STRING + curTidName, currentCount);
- addToMap(totalMap, curTidName, currentCount);
- totalTime += (currentCount);
- }
- map.put(curCpuName, cpuTotal);
- }
-
- /* Add the totals to the map */
- for (Entry<String, Long> entry : totalMap.entrySet()) {
- map.put(TOTAL + SPLIT_STRING + entry.getKey(), entry.getValue());
- }
- map.put(TOTAL, totalTime);
-
- } catch (TimeRangeException | AttributeNotFoundException e) {
- /*
- * Assume there is no events or the attribute does not exist yet,
- * nothing will be put in the map.
- */
- } catch (StateValueTypeException | StateSystemDisposedException e) {
- /*
- * These other exception types would show a logic problem, so they
- * should not happen.
- */
- Activator.getDefault().logError("Error getting CPU usage in a time range", e); //$NON-NLS-1$
- }
-
- return map;
- }
-
- private static long interpolateCount(long count, long ts, long runningEnd, long runningTime) {
- long newCount = count;
-
- /* sanity check */
- if (runningTime > 0) {
-
- long runningStart = runningEnd - runningTime;
-
- if (ts < runningStart) {
- /*
- * This interval was not started, this can happen if the current
- * running thread is unknown and we execute this method. It just
- * means that this process was not the one running
- */
- return newCount;
- }
- newCount += (ts - runningStart);
- }
- return newCount;
- }
-
- /*
- * Add the value to the previous value in the map. If the key was not set,
- * assume 0
- */
- private static void addToMap(Map<String, Long> map, String key, Long value) {
- Long addTo = map.get(key);
- if (addTo == null) {
- map.put(key, value);
- } else {
- map.put(key, addTo + value);
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial implementation and API
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.event.matching;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.TcpEventStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.matching.ITmfNetworkMatchDefinition;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching.MatchingType;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching.Direction;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfEventTypeCollectionHelper;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Class to match tcp type events. This matching class applies to traces
- * obtained with the 'addons' lttng module. This module can be obtained with
- * lttng-modules to generate traces at
- * https://github.com/giraldeau/lttng-modules/tree/addons
- *
- * Note: this module only allows to generate traces to be read and analyzed by
- * TMF, no code from this module is being used here
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class TcpEventMatching implements ITmfNetworkMatchDefinition {
-
- private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of(
- TcpEventStrings.INET_SOCK_LOCAL_IN,
- TcpEventStrings.INET_SOCK_LOCAL_OUT);
-
- private static boolean canMatchPacket(final ITmfEvent event) {
- /* Make sure all required fields are present to match with this event */
- ITmfEventField content = event.getContent();
- if ((content.getField(TcpEventStrings.SEQ) != null) &&
- (content.getField(TcpEventStrings.ACKSEQ) != null) && (content.getField(TcpEventStrings.FLAGS) != null)) {
- return true;
- }
- return false;
- }
-
- @Override
- public Direction getDirection(ITmfEvent event) {
- String evname = event.getType().getName();
-
- if (!canMatchPacket(event)) {
- return null;
- }
-
- /* Is the event a tcp socket in or out event */
- if (evname.equals(TcpEventStrings.INET_SOCK_LOCAL_IN)) {
- return Direction.IN;
- } else if (evname.equals(TcpEventStrings.INET_SOCK_LOCAL_OUT)) {
- return Direction.OUT;
- }
- return null;
- }
-
- /**
- * The key to uniquely identify a TCP packet depends on many fields. This
- * method computes the key for a given event.
- *
- * @param event
- * The event for which to compute the key
- * @return the unique key for this event
- */
- @Override
- public List<Object> getUniqueField(ITmfEvent event) {
- List<Object> keys = new ArrayList<>();
-
- keys.add(event.getContent().getField(TcpEventStrings.SEQ).getValue());
- keys.add(event.getContent().getField(TcpEventStrings.ACKSEQ).getValue());
- keys.add(event.getContent().getField(TcpEventStrings.FLAGS).getValue());
-
- return keys;
- }
-
- @Override
- public boolean canMatchTrace(ITmfTrace trace) {
- if (!(trace instanceof CtfTmfTrace)) {
- return false;
- }
- CtfTmfTrace ktrace = (CtfTmfTrace) trace;
-
- Set<String> traceEvents = TmfEventTypeCollectionHelper.getEventNames(ktrace.getContainedEventTypes());
- traceEvents.retainAll(REQUIRED_EVENTS);
- return !traceEvents.isEmpty();
- }
-
- @Override
- public MatchingType[] getApplicableMatchingTypes() {
- MatchingType[] types = { MatchingType.NETWORK };
- return types;
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial implementation and API
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.event.matching;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.TcpEventStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
-import org.eclipse.linuxtools.tmf.core.event.matching.ITmfNetworkMatchDefinition;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching.MatchingType;
-import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching.Direction;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfEventTypeCollectionHelper;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Class to match tcp type events. This class applies to traces obtained with
- * the full network tracepoint data available from an experimental branch of
- * lttng-modules. This branch is often rebased on lttng-modules master and is
- * available at
- * http://git.dorsal.polymtl.ca/~gbastien?p=lttng-modules.git;a=summary
- * net_data_experimental branch.
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class TcpLttngEventMatching implements ITmfNetworkMatchDefinition {
-
- private static final String[] key_seq = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP, TcpEventStrings.SEQ };
- private static final String[] key_ackseq = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP, TcpEventStrings.ACKSEQ };
- private static final String[] key_flags = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP, TcpEventStrings.FLAGS };
-
- private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of(
- TcpEventStrings.NET_DEV_QUEUE,
- TcpEventStrings.NETIF_RECEIVE_SKB);
-
- private static boolean canMatchPacket(final ITmfEvent event) {
- TmfEventField field = (TmfEventField) event.getContent();
-
- String[] tcp_data = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP };
- ITmfEventField data = field.getSubField(tcp_data);
- if (data != null) {
- return (data.getValue() != null);
- }
- return false;
- }
-
- /**
- * The key to uniquely identify a TCP packet depends on many fields. This
- * method computes the key for a given event.
- *
- * @param event
- * The event for which to compute the key
- * @return the unique key for this event
- */
- @Override
- public List<Object> getUniqueField(ITmfEvent event) {
- List<Object> keys = new ArrayList<>();
-
- TmfEventField field = (TmfEventField) event.getContent();
- ITmfEventField data;
-
- data = field.getSubField(key_seq);
- if (data != null) {
- keys.add(data.getValue());
- }
- data = field.getSubField(key_ackseq);
- if (data != null) {
- keys.add(data.getValue());
- }
- data = field.getSubField(key_flags);
- if (data != null) {
- keys.add(data.getValue());
- }
-
- return keys;
- }
-
- @Override
- public boolean canMatchTrace(ITmfTrace trace) {
- if (!(trace instanceof CtfTmfTrace)) {
- return false;
- }
- CtfTmfTrace ktrace = (CtfTmfTrace) trace;
-
- Set<String> traceEvents = TmfEventTypeCollectionHelper.getEventNames(ktrace.getContainedEventTypes());
- traceEvents.retainAll(REQUIRED_EVENTS);
- return !traceEvents.isEmpty();
- }
-
- @Override
- public Direction getDirection(ITmfEvent event) {
- String evname = event.getType().getName();
-
- /* Is the event a tcp socket in or out event */
- if (evname.equals(TcpEventStrings.NETIF_RECEIVE_SKB) && canMatchPacket(event)) {
- return Direction.IN;
- } else if (evname.equals(TcpEventStrings.NET_DEV_QUEUE) && canMatchPacket(event)) {
- return Direction.OUT;
- }
- return null;
- }
-
- @Override
- public MatchingType[] getApplicableMatchingTypes() {
- MatchingType[] types = { MatchingType.NETWORK };
- return types;
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- * Matthew Khouzam - Improved validation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.trace;
-
-import java.nio.BufferOverflowException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator;
-import org.eclipse.linuxtools.tmf.core.trace.TraceValidationStatus;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-
-/**
- * This is the specification of CtfTmfTrace for use with LTTng 2.x kernel
- * traces.
- *
- * @author Alexandre Montplaisir
- * @since 2.0
- */
-public class LttngKernelTrace extends CtfTmfTrace {
-
- private static final int CONFIDENCE = 100;
-
- /**
- * Default constructor
- */
- public LttngKernelTrace() {
- super();
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This implementation sets the confidence to 100 if the trace is a valid
- * CTF trace in the "kernel" domain.
- */
- @Override
- public IStatus validate(final IProject project, final String path) {
- /*
- * Make sure the trace is openable as a CTF trace. We do this here
- * instead of calling super.validate() to keep the reference to "temp".
- */
- try (CTFTrace temp = new CTFTrace(path);) {
- /* Make sure the domain is "kernel" in the trace's env vars */
- String dom = temp.getEnvironment().get("domain"); //$NON-NLS-1$
- if (dom != null && dom.equals("\"kernel\"")) { //$NON-NLS-1$
- return new TraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID);
- }
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngKernelTrace_DomainError);
-
- } catch (CTFReaderException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
- } catch (NullPointerException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
- } catch (final BufferOverflowException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngKernelTrace_TraceReadError + ": " + Messages.LttngKernelTrace_MalformedTrace); //$NON-NLS-1$
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.core.trace;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message bundle for lttng2.kernel.core.trace
- *
- * @author Matthew Khouzam
- * @since 2.0
- */
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.kernel.core.trace.messages"; //$NON-NLS-1$
-
- /**
- * The domain is not "kernel"
- */
- public static String LttngKernelTrace_DomainError;
- /**
- * Malformed trace (buffer overflow maybe?)
- * @since 2.1
- */
- public static String LttngKernelTrace_MalformedTrace;
- /**
- * Trace read error
- * @since 2.1
- */
- public static String LttngKernelTrace_TraceReadError;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-LttngKernelTrace_DomainError=Domain mismatch, the environment should be 'kernel'.
-LttngKernelTrace_MalformedTrace=Buffer overflow exception, trace is malformed
-LttngKernelTrace_TraceReadError=Lttng trace read error
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-screenshots/
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Export-Package: org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests
-Require-Bundle: org.apache.log4j,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.lttng2.kernel.core,
- org.eclipse.linuxtools.lttng2.kernel.ui,
- org.eclipse.linuxtools.lttng2.control.ui,
- org.eclipse.linuxtools.tmf.core,
- org.eclipse.linuxtools.tmf.core.tests,
- org.eclipse.linuxtools.tmf.ctf.core,
- org.eclipse.linuxtools.tmf.ctf.core.tests,
- org.eclipse.linuxtools.tmf.ui,
- org.eclipse.linuxtools.tmf.ui.swtbot.tests,
- org.eclipse.swtbot.eclipse.finder,
- org.eclipse.swtbot.junit4_x,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.junit
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-source.. = src/
-bin.includes = META-INF/,\
- .,\
- plugin.properties
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Kernel UI SWTBot Tests Plug-in
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2013 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
--->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Kernel UI SWTBot Tests Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests</testSuite>
- <testClass>org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests.AllTests</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>false</useUIThread>
- <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
- <product>org.eclipse.platform.ide</product>
-<!-- Disable GTK3 with Luna because it makes the test hang (bug in IcedTea http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1736) -->
- <environmentVariables>
- <SWT_GTK3>0</SWT_GTK3>
- </environmentVariables>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for UI on the lttng kernel perspective
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ImportAndReadKernelSmokeTest.class,
- KernelPerspectiveChecker.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Matthew Khouzam - Initial API and implementation
- * Marc-Andre Laperle
- * Patrick Tasse - Add support for folder elements
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.SimpleLayout;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.eclipse.linuxtools.tmf.ui.editors.TmfEventsEditor;
-import org.eclipse.linuxtools.tmf.ui.swtbot.tests.SWTBotUtil;
-import org.eclipse.linuxtools.tmf.ui.swtbot.tests.conditions.ConditionHelpers;
-import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.results.BoolResult;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.hamcrest.Matcher;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * SWTBot Smoke test for LTTng Kernel UI.
- *
- * @author Matthew Khouzam
- */
-@RunWith(SWTBotJunit4ClassRunner.class)
-public class ImportAndReadKernelSmokeTest {
-
- private static final String TRACE_TYPE = "org.eclipse.linuxtools.lttng2.kernel.tracetype";
- private static final String KERNEL_PERSPECTIVE_ID = "org.eclipse.linuxtools.lttng2.kernel.ui.perspective";
- private static final String TRACE_PROJECT_NAME = "test";
-
- private static SWTWorkbenchBot fBot;
- public static CtfTmfTestTrace ctt = CtfTmfTestTrace.SYNTHETIC_TRACE;
- private ITmfEvent fDesired1;
- private ITmfEvent fDesired2;
-
- /** The Log4j logger instance. */
- private static final Logger fLogger = Logger.getRootLogger();
-
- /**
- * Test Class setup
- */
- @BeforeClass
- public static void init() {
- SWTBotUtil.failIfUIThread();
-
- /* set up for swtbot */
- SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
- fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
- fBot = new SWTWorkbenchBot();
-
- final List<SWTBotView> openViews = fBot.views();
- for (SWTBotView view : openViews) {
- if (view.getTitle().equals("Welcome")) {
- view.close();
- fBot.waitUntil(ConditionHelpers.ViewIsClosed(view));
- }
- }
- /* Switch perspectives */
- switchKernelPerspective();
- /* Finish waiting for eclipse to load */
- SWTBotUtil.waitForJobs();
- }
-
- private static void switchKernelPerspective() {
- final Exception retE[] = new Exception[1];
- if (!UIThreadRunnable.syncExec(new BoolResult() {
- @Override
- public Boolean run() {
- try {
- PlatformUI.getWorkbench().showPerspective(KERNEL_PERSPECTIVE_ID,
- PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- } catch (WorkbenchException e) {
- retE[0] = e;
- return false;
- }
- return true;
- }
- })) {
- fail(retE[0].getMessage());
- }
-
- }
-
- /**
- * Main test case
- */
- @Test
- public void test() {
- SWTBotUtil.createProject(TRACE_PROJECT_NAME);
- SWTBotUtil.openTrace(TRACE_PROJECT_NAME, ctt.getPath(), TRACE_TYPE);
- openEditor();
- testHV(getViewPart("Histogram"));
- testCFV((ControlFlowView) getViewPart("Control Flow"));
- testRV((ResourcesView) getViewPart("Resources"));
-
- fBot.closeAllEditors();
- SWTBotUtil.deleteProject(TRACE_PROJECT_NAME, fBot);
- }
-
- private void openEditor() {
- Matcher<IEditorReference> matcher = WidgetMatcherFactory.withPartName(ctt.getTrace().getName());
- IEditorPart iep = fBot.editor(matcher).getReference().getEditor(true);
- fDesired1 = getEvent(100);
- fDesired2 = getEvent(10000);
- final TmfEventsEditor tmfEd = (TmfEventsEditor) iep;
- UIThreadRunnable.syncExec(new VoidResult() {
- @Override
- public void run() {
- tmfEd.setFocus();
- tmfEd.selectionChanged(new SelectionChangedEvent(tmfEd, new StructuredSelection(fDesired1)));
- }
- });
-
- SWTBotUtil.waitForJobs();
- SWTBotUtil.delay(1000);
- assertNotNull(tmfEd);
- }
-
- private static void testCFV(ControlFlowView vp) {
- assertNotNull(vp);
- }
-
- private void testHV(IViewPart vp) {
- SWTBotView hvBot = (new SWTWorkbenchBot()).viewById(HistogramView.ID);
- List<SWTBotToolbarButton> hvTools = hvBot.getToolbarButtons();
- for (SWTBotToolbarButton hvTool : hvTools) {
- if (hvTool.getToolTipText().toLowerCase().contains("lost")) {
- hvTool.click();
- }
- }
- HistogramView hv = (HistogramView) vp;
- final TmfTimeSynchSignal signal = new TmfTimeSynchSignal(hv, fDesired1.getTimestamp());
- final TmfTimeSynchSignal signal2 = new TmfTimeSynchSignal(hv, fDesired2.getTimestamp());
- hv.updateTimeRange(100000);
- SWTBotUtil.waitForJobs();
- hv.currentTimeUpdated(signal);
- hv.broadcast(signal);
- SWTBotUtil.waitForJobs();
- SWTBotUtil.delay(1000);
-
- hv.updateTimeRange(1000000000);
- SWTBotUtil.waitForJobs();
- hv.currentTimeUpdated(signal2);
- hv.broadcast(signal2);
- SWTBotUtil.waitForJobs();
- SWTBotUtil.delay(1000);
- assertNotNull(hv);
- }
-
- private static void testRV(ResourcesView vp) {
- assertNotNull(vp);
- }
-
- private static CtfTmfEvent getEvent(int rank) {
- try (CtfTmfTrace trace = CtfTmfTestTrace.SYNTHETIC_TRACE.getTrace()) {
- ITmfContext ctx = trace.seekEvent(0);
- for (int i = 0; i < rank; i++) {
- trace.getNext(ctx);
- }
- return trace.getNext(ctx);
- }
-
- }
-
- private static IViewPart getViewPart(final String viewTile) {
- final IViewPart[] vps = new IViewPart[1];
- UIThreadRunnable.syncExec(new VoidResult() {
- @Override
- public void run() {
- IViewReference[] viewRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
- for (IViewReference viewRef : viewRefs) {
- IViewPart vp = viewRef.getView(true);
- if (vp.getTitle().equals(viewTile)) {
- vps[0] = vp;
- return;
- }
- }
- }
- });
-
- return vps[0];
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.PerspectiveFactory;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
-import org.eclipse.linuxtools.tmf.ui.swtbot.tests.AbstractPerspectiveChecker;
-import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
-import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
-import org.eclipse.ui.IPageLayout;
-import org.junit.Before;
-
-/**
- * Tracing perspective view checker
- *
- * @author Matthew Khouzam
- */
-public class KernelPerspectiveChecker extends AbstractPerspectiveChecker {
-
- /**
- * Set up arrays for test
- */
- @Before
- public void init() {
- fPerspectiveId = PerspectiveFactory.ID;
- fViewIds = new ArrayList<>();
- fViewIds.addAll(Arrays.asList(new String[] {
- // LTTng views
- HistogramView.ID,
- ControlView.ID,
- ControlFlowView.ID,
- ResourcesView.ID,
- TmfStatisticsView.ID,
- // Standard Eclipse views
- IPageLayout.ID_PROJECT_EXPLORER,
- IPageLayout.ID_PROP_SHEET,
- IPageLayout.ID_BOOKMARKS
- }));
- }
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.kernel.ui.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.ui.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.linuxtools.lttng2.kernel.ui;bundle-version="3.1.0"
-Export-Package: org.eclipse.linuxtools.lttng2.kernel.ui.tests
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties
-src.includes = about.html
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.kernel.ui.tests
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Kernel Analysis UI Tests Plug-in
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.kernel.ui.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Kernel Analysis UI Tests Plug-in</name>
-
- <build>
- <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.linuxtools.lttng2.kernel.ui.tests</testSuite>
- <testClass>org.eclipse.linuxtools.lttng2.kernel.ui.tests.AllTests</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
- <product>org.eclipse.platform.ide</product>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.ui.tests;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Test suite for the Activator class
- */
-public class ActivatorTest {
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#Activator()}.
- */
- @Test
- public void testActivator() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#getDefault()}.
- */
- @Test
- public void testGetDefault() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#start}.
- */
- @Test
- public void testStartBundleContext() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#stop}.
- */
- @Test
- public void testStopBundleContext() {
- assertTrue(true);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- * Alexandre Montplaisir - Port to JUnit4
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.kernel.ui.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Run the lttng2.ui unit tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ActivatorTest.class,
-})
-public class AllTests {
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-org.eclipse.linuxtools.lttng.ui/debug=false
-org.eclipse.linuxtools.lttng.ui/info=false
-org.eclipse.linuxtools.lttng.ui/warn=false
-
-org.eclipse.linuxtools.lttng.ui/cfv=false
-org.eclipse.linuxtools.lttng.ui/rv=false
-org.eclipse.linuxtools.lttng.ui/sv=false
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.kernel.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.kernel.ui;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
- org.eclipse.linuxtools.lttng2.control.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.lttng2.control.ui;bundle-version="3.1.0",
- org.eclipse.linuxtools.lttng2.kernel.core;bundle-version="3.1.0"
-Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.ui;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests",
- org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests",
- org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests",
- org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;x-friends:="org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests"
-Import-Package: com.google.common.collect
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- icons/,\
- about.html,\
- plugin.properties
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.kernel.ui
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Kernel Analysis UI Plug-in
-
-kernel.perspective.name = LTTng Kernel
-
-controlflow.view.name = Control Flow
-resources.view.name = Resources
-cpuusage.view.name = CPU Usage
-
-tracetype.type.kernel = LTTng Kernel Trace
-analysis.lttngkernel = LTTng Kernel Analysis
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.ui.perspectives">
- <perspective
- class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.PerspectiveFactory"
- icon="icons/obj16/garland16.png"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.perspective"
- name="%kernel.perspective.name">
- </perspective>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- allowMultiple="false"
- category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView"
- icon="icons/eview16/control_flow_view.gif"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow"
- name="%controlflow.view.name"
- restorable="true">
- </view>
- <view
- allowMultiple="false"
- category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView"
- icon="icons/eview16/resources_view.gif"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"
- name="%resources.view.name"
- restorable="true">
- </view>
- <view
- allowMultiple="false"
- category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage.CpuUsageView"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.views.cpuusage"
- name="%cpuusage.view.name"
- restorable="true">
- </view>
- </extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <commonWizard
- associatedExtensionId="org.eclipse.linuxtools.tmf.ui.navigator.content"
- menuGroupId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.menuGroupId"
- type="new"
- wizardId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.newProject">
- <enablement>
- <with variable="activeWorkbenchWindow.activePerspective">
- <equals
- value="org.eclipse.linuxtools.lttng2.kernel.ui.perspective">
- </equals>
- </with>
- </enablement>
- </commonWizard>
- </extension>
- <extension
- point="org.eclipse.linuxtools.tmf.core.analysis">
- <output
- class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow">
- <analysisId
- id="org.eclipse.linuxtools.lttng2.kernel.analysis">
- </analysisId>
- </output>
- <output
- class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.views.resources">
- <analysisId
- id="org.eclipse.linuxtools.lttng2.kernel.analysis">
- </analysisId>
- </output>
- <output
- class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
- id="org.eclipse.linuxtools.lttng2.kernel.ui.views.cpuusage">
- <analysisId
- id="org.eclipse.linuxtools.lttng2.kernel.core.cpuusage">
- </analysisId>
- </output>
- </extension>
- <extension
- point="org.eclipse.linuxtools.tmf.ui.tracetypeui">
- <type
- icon="icons/obj16/garland16.png"
- tracetype="org.eclipse.linuxtools.lttng2.kernel.tracetype">
- <eventTableColumns
- class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events.LttngEventTableColumns">
- </eventTableColumns>
- </type>
- </extension>
-</plugin>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.kernel.ui</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools LTTng Kernel Analysis UI Plug-in</name>
-
- <build>
- <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
- <resources>
- <resource>
- <directory>src</directory>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.kernel.ui"; //$NON-NLS-1$
-
- /**
- * The shared instance
- */
- private static Activator plugin;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ------------------------------------------------------------------------
- // AbstractUIPlugin
- // ------------------------------------------------------------------------
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- @Override
- protected void initializeImageRegistry(ImageRegistry reg) {
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Get the image object from a given path
- *
- * @param path
- * The path to the image file
- * @return The Image object
- */
- public Image getImageFromPath(String path) {
- return getImageDescripterFromPath(path).createImage();
- }
-
- /**
- * Get the ImageDescriptor from a given path
- *
- * @param path
- * The path to the image file
- * @return The ImageDescriptor object
- */
- public ImageDescriptor getImageDescripterFromPath(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * Get the Image from a registry
- *
- * @param path
- * The path to the image registry
- * @return The Image object
- */
- public Image getImageFromImageRegistry(String path) {
- Image icon = getImageRegistry().get(path);
- if (icon == null) {
- icon = getImageDescripterFromPath(path).createImage();
- plugin.getImageRegistry().put(path, icon);
- }
- return icon;
- }
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logInfo(String message) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logInfo(String message, Throwable exception) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logWarning(String message) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logWarning(String message, Throwable exception) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logError(String message) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logError(String message, Throwable exception) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Patrick Tassé - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui;
-
-import org.eclipse.osgi.util.NLS;
-
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.messages"; //$NON-NLS-1$
-
- public static String ControlFlowView_birthTimeColumn;
- public static String ControlFlowView_tidColumn;
- public static String ControlFlowView_ptidColumn;
- public static String ControlFlowView_processColumn;
- public static String ControlFlowView_traceColumn;
-
- public static String ControlFlowView_stateTypeName;
- public static String ControlFlowView_multipleStates;
- public static String ControlFlowView_nextProcessActionNameText;
- public static String ControlFlowView_nextProcessActionToolTipText;
- public static String ControlFlowView_previousProcessActionNameText;
- public static String ControlFlowView_previousProcessActionToolTipText;
- public static String ControlFlowView_followCPUBwdText;
- public static String ControlFlowView_followCPUFwdText;
-
- public static String ControlFlowView_attributeSyscallName;
- public static String ControlFlowView_attributeCpuName;
-
- public static String ResourcesView_stateTypeName;
- public static String ResourcesView_multipleStates;
- public static String ResourcesView_nextResourceActionNameText;
- public static String ResourcesView_nextResourceActionToolTipText;
- public static String ResourcesView_previousResourceActionNameText;
- public static String ResourcesView_previousResourceActionToolTipText;
- public static String ResourcesView_attributeCpuName;
- public static String ResourcesView_attributeIrqName;
- public static String ResourcesView_attributeSoftIrqName;
- public static String ResourcesView_attributeHoverTime;
- public static String ResourcesView_attributeTidName;
- public static String ResourcesView_attributeProcessName;
- public static String ResourcesView_attributeSyscallName;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-ControlFlowView_birthTimeColumn=Birth time
-ControlFlowView_tidColumn=TID
-ControlFlowView_ptidColumn=PTID
-ControlFlowView_processColumn=Process
-ControlFlowView_traceColumn=Trace
-
-ControlFlowView_stateTypeName=Process
-ControlFlowView_multipleStates=(multiple)
-ControlFlowView_nextProcessActionNameText=Next Process
-ControlFlowView_nextProcessActionToolTipText=Select Next Process
-ControlFlowView_previousProcessActionNameText=Previous Process
-ControlFlowView_previousProcessActionToolTipText=Select Previous Process
-ControlFlowView_followCPUBwdText=Follow CPU Backward
-ControlFlowView_followCPUFwdText=Follow CPU Forward
-
-ControlFlowView_attributeSyscallName=System Call
-ControlFlowView_attributeCpuName=CPU
-
-ResourcesView_stateTypeName=Resource
-ResourcesView_multipleStates=(multiple)
-ResourcesView_nextResourceActionNameText=Next Resource
-ResourcesView_nextResourceActionToolTipText=Select Next Resource
-ResourcesView_previousResourceActionNameText=Previous Resource
-ResourcesView_previousResourceActionToolTipText=Select Previous Resource
-ResourcesView_attributeCpuName=CPU
-ResourcesView_attributeIrqName=IRQ
-ResourcesView_attributeSoftIrqName=SOFT IRQ
-ResourcesView_attributeHoverTime=> Hover Time
-ResourcesView_attributeTidName=> TID
-ResourcesView_attributeProcessName=> Process
-ResourcesView_attributeSyscallName=> System Call
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;
-
-import java.util.Collection;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.ui.viewers.events.columns.ITmfEventTableColumns;
-import org.eclipse.linuxtools.tmf.ui.viewers.events.columns.TmfEventTableColumn;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * Event table columns for LTTng 2.x kernel traces
- */
-public class LttngEventTableColumns implements ITmfEventTableColumns {
-
- // ------------------------------------------------------------------------
- // Column definition
- // ------------------------------------------------------------------------
-
- @SuppressWarnings("null")
- private static final @NonNull String CHANNEL_HEADER = Messages.EventsTable_channelColumn;
-
- @SuppressWarnings("null")
- private static final @NonNull Collection<TmfEventTableColumn> LTTNG_COLUMNS =
- ImmutableList.<TmfEventTableColumn> of(
- TmfEventTableColumn.BaseColumns.TIMESTAMP,
- new LttngChannelColumn(),
- TmfEventTableColumn.BaseColumns.EVENT_TYPE,
- TmfEventTableColumn.BaseColumns.CONTENTS);
-
- private static class LttngChannelColumn extends TmfEventTableColumn {
-
- public LttngChannelColumn() {
- super(CHANNEL_HEADER);
- }
-
- @Override
- public String getItemString(ITmfEvent event) {
- String ret = event.getReference();
- return (ret == null ? EMPTY_STRING : ret);
- }
-
- @Override
- public String getFilterFieldId() {
- return ITmfEvent.EVENT_FIELD_REFERENCE;
- }
- }
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- @Override
- public Collection<? extends TmfEventTableColumn> getEventTableColumns() {
- return LTTNG_COLUMNS;
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Patrick Tassé - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;
-
-import org.eclipse.osgi.util.NLS;
-
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events.messages"; //$NON-NLS-1$
- public static String EventsTable_channelColumn;
- public static String EventsTable_timestampColumn;
- public static String EventsTable_typeColumn;
- public static String EventsTable_contentColumn;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-EventsTable_channelColumn=Channel
-EventsTable_timestampColumn=Timestamp
-EventsTable_typeColumn=Event Type
-EventsTable_contentColumn=Content
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2013 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:
- * Francois Chouinard - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;
-
-import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
-import org.eclipse.linuxtools.tmf.ui.project.wizards.NewTmfProjectWizard;
-import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
-import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
-import org.eclipse.ui.IFolderLayout;
-import org.eclipse.ui.IPageLayout;
-import org.eclipse.ui.IPerspectiveFactory;
-
-/**
- * The default LTTng perspective.
- */
-public class PerspectiveFactory implements IPerspectiveFactory {
-
- /** Perspective ID */
- public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.perspective"; //$NON-NLS-1$
-
- // LTTng views
- private static final String HISTOGRAM_VIEW_ID = HistogramView.ID;
- private static final String CONTROL_VIEW_ID = ControlView.ID;
- private static final String CONTROLFLOW_VIEW_ID = ControlFlowView.ID;
- private static final String RESOURCES_VIEW_ID = ResourcesView.ID;
- private static final String STATISTICS_VIEW_ID = TmfStatisticsView.ID;
-
- // Standard Eclipse views
- private static final String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
- private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
- private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
-
- @Override
- public void createInitialLayout(IPageLayout layout) {
-
- layout.setEditorAreaVisible(true);
-
- addFastViews(layout);
- addViewShortcuts(layout);
- addPerspectiveShortcuts(layout);
-
- // Create the top left folder
- IFolderLayout topLeftFolder = layout.createFolder(
- "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
- topLeftFolder.addView(PROJECT_VIEW_ID);
-
- // Create the bottom left folder
- IFolderLayout bottomLeftFolder = layout.createFolder(
- "bottomLeftFolder", IPageLayout.BOTTOM, 0.70f, "topLeftFolder"); //$NON-NLS-1$ //$NON-NLS-2$
- bottomLeftFolder.addView(CONTROL_VIEW_ID);
-
- // Create the top right folder
- IFolderLayout topRightFolder = layout.createFolder(
- "topRightFolder", IPageLayout.TOP, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
- topRightFolder.addView(CONTROLFLOW_VIEW_ID);
- topRightFolder.addView(RESOURCES_VIEW_ID);
- topRightFolder.addView(STATISTICS_VIEW_ID);
-
- // Create the bottom right folder
- IFolderLayout bottomRightFolder = layout.createFolder(
- "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
- bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
- bottomRightFolder.addView(PROPERTIES_VIEW_ID);
- bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
-
- layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
- }
-
- /**
- * Add fast views to the perspective
- *
- * @param layout
- */
- private void addFastViews(IPageLayout layout) {
- }
-
- /**
- * Add view shortcuts to the perspective
- *
- * @param layout
- */
- private void addViewShortcuts(IPageLayout layout) {
- }
-
- /**
- * Add perspective shortcuts to the perspective
- *
- * @param layout
- */
- private void addPerspectiveShortcuts(IPageLayout layout) {
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Patrick Tasse - Initial API and implementation
- * Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-
-/**
- * An entry in the Control Flow view
- */
-public class ControlFlowEntry extends TimeGraphEntry {
-
- private final @NonNull ITmfTrace fTrace;
- private final int fThreadId;
- private final int fParentThreadId;
- private final int fThreadQuark;
-
- /**
- * Constructor
- *
- * @param quark
- * The attribute quark matching the thread
- * @param trace
- * The trace on which we are working
- * @param execName
- * The exec_name of this entry
- * @param threadId
- * The TID of the thread
- * @param parentThreadId
- * the Parent_TID of this thread
- * @param startTime
- * The start time of this process's lifetime
- * @param endTime
- * The end time of this process
- */
- public ControlFlowEntry(int quark, @NonNull ITmfTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
- super(execName, startTime, endTime);
- fTrace = trace;
- fThreadId = threadId;
- fParentThreadId = parentThreadId;
- fThreadQuark = quark;
- }
-
- /**
- * Get this entry's thread ID
- *
- * @return The TID
- */
- public int getThreadId() {
- return fThreadId;
- }
-
- /**
- * Get the entry's trace
- *
- * @return the entry's trace
- */
- public @NonNull ITmfTrace getTrace() {
- return fTrace;
- }
-
- /**
- * Get this thread's parent TID
- *
- * @return The "PTID"
- */
- public int getParentThreadId() {
- return fParentThreadId;
- }
-
- /**
- * Get the quark of the attribute matching this thread's TID
- *
- * @return The quark
- */
- public int getThreadQuark() {
- return fThreadQuark;
- }
-
- @Override
- public String toString() {
- return getClass().getSimpleName() + '(' + getName() + '[' + fThreadId + "])"; //$NON-NLS-1$
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Patrick Tasse - Initial API and implementation
- * Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-
-/**
- * Presentation provider for the control flow view
- */
-public class ControlFlowPresentationProvider extends TimeGraphPresentationProvider {
-
- private enum State {
- UNKNOWN (new RGB(100, 100, 100)),
- WAIT_BLOCKED (new RGB(200, 200, 0)),
- WAIT_FOR_CPU (new RGB(200, 100, 0)),
- USERMODE (new RGB(0, 200, 0)),
- SYSCALL (new RGB(0, 0, 200)),
- INTERRUPTED (new RGB(200, 0, 100));
-
- public final RGB rgb;
-
- private State(RGB rgb) {
- this.rgb = rgb;
- }
-
- }
-
- /**
- * Default constructor
- */
- public ControlFlowPresentationProvider() {
- super(Messages.ControlFlowView_stateTypeName);
- }
-
- private static State[] getStateValues() {
- return State.values();
- }
-
- @Override
- public StateItem[] getStateTable() {
- State[] states = getStateValues();
- StateItem[] stateTable = new StateItem[states.length];
- for (int i = 0; i < stateTable.length; i++) {
- State state = states[i];
- stateTable[i] = new StateItem(state.rgb, state.toString());
- }
- return stateTable;
- }
-
- @Override
- public int getStateTableIndex(ITimeEvent event) {
- if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
- int status = ((TimeEvent) event).getValue();
- return getMatchingState(status).ordinal();
- }
- return TRANSPARENT;
- }
-
- @Override
- public String getEventName(ITimeEvent event) {
- if (event instanceof TimeEvent) {
- TimeEvent ev = (TimeEvent) event;
- if (ev.hasValue()) {
- return getMatchingState(ev.getValue()).toString();
- }
- }
- return Messages.ControlFlowView_multipleStates;
- }
-
- private static State getMatchingState(int status) {
- switch (status) {
- case StateValues.PROCESS_STATUS_WAIT_BLOCKED:
- return State.WAIT_BLOCKED;
- case StateValues.PROCESS_STATUS_WAIT_FOR_CPU:
- return State.WAIT_FOR_CPU;
- case StateValues.PROCESS_STATUS_RUN_USERMODE:
- return State.USERMODE;
- case StateValues.PROCESS_STATUS_RUN_SYSCALL:
- return State.SYSCALL;
- case StateValues.PROCESS_STATUS_INTERRUPTED:
- return State.INTERRUPTED;
- default:
- return State.UNKNOWN;
- }
- }
-
- @Override
- public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
- Map<String, String> retMap = new LinkedHashMap<>();
- if (!(event instanceof TimeEvent) || !((TimeEvent) event).hasValue() ||
- !(event.getEntry() instanceof ControlFlowEntry)) {
- return retMap;
- }
- ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- return retMap;
- }
- int tid = entry.getThreadId();
-
- try {
- // Find every CPU first, then get the current thread
- int cpusQuark = ssq.getQuarkAbsolute(Attributes.CPUS);
- List<Integer> cpuQuarks = ssq.getSubAttributes(cpusQuark, false);
- for (Integer cpuQuark : cpuQuarks) {
- int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
- ITmfStateInterval interval = ssq.querySingleState(event.getTime(), currentThreadQuark);
- if (!interval.getStateValue().isNull()) {
- ITmfStateValue state = interval.getStateValue();
- int currentThreadId = state.unboxInt();
- if (tid == currentThreadId) {
- retMap.put(Messages.ControlFlowView_attributeCpuName, ssq.getAttributeName(cpuQuark));
- break;
- }
- }
- }
-
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- int status = ((TimeEvent) event).getValue();
- if (status == StateValues.PROCESS_STATUS_RUN_SYSCALL) {
- try {
- int syscallQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
- ITmfStateInterval value = ssq.querySingleState(event.getTime(), syscallQuark);
- if (!value.getStateValue().isNull()) {
- ITmfStateValue state = value.getStateValue();
- retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
- }
-
- } catch (AttributeNotFoundException | TimeRangeException e) {
- Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- }
-
- return retMap;
- }
-
- @Override
- public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
- if (bounds.width <= gc.getFontMetrics().getAverageCharWidth()) {
- return;
- }
- if (!(event instanceof TimeEvent)) {
- return;
- }
- ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
- ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ss == null) {
- return;
- }
- int status = ((TimeEvent) event).getValue();
-
- if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
- return;
- }
- try {
- int syscallQuark = ss.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
- ITmfStateInterval value = ss.querySingleState(event.getTime(), syscallQuark);
- if (!value.getStateValue().isNull()) {
- ITmfStateValue state = value.getStateValue();
- gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
- Utils.drawText(gc, state.toString().substring(4), bounds.x, bounds.y - 2, bounds.width, true, true);
- }
- } catch (AttributeNotFoundException | TimeRangeException e) {
- Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Patrick Tasse - Initial API and implementation
- * Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
-
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IToolBarManager;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ui.views.timegraph.AbstractTimeGraphView;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ILinkEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeLinkEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
-
-/**
- * The Control Flow view main object
- *
- */
-public class ControlFlowView extends AbstractTimeGraphView {
-
- // ------------------------------------------------------------------------
- // Constants
- // ------------------------------------------------------------------------
-
- /**
- * View ID.
- */
- public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow"; //$NON-NLS-1$
-
- private static final String PROCESS_COLUMN = Messages.ControlFlowView_processColumn;
- private static final String TID_COLUMN = Messages.ControlFlowView_tidColumn;
- private static final String PTID_COLUMN = Messages.ControlFlowView_ptidColumn;
- private static final String BIRTH_TIME_COLUMN = Messages.ControlFlowView_birthTimeColumn;
- private static final String TRACE_COLUMN = Messages.ControlFlowView_traceColumn;
-
- private static final String[] COLUMN_NAMES = new String[] {
- PROCESS_COLUMN,
- TID_COLUMN,
- PTID_COLUMN,
- BIRTH_TIME_COLUMN,
- TRACE_COLUMN
- };
-
- private static final String[] FILTER_COLUMN_NAMES = new String[] {
- PROCESS_COLUMN,
- TID_COLUMN
- };
-
- // Timeout between updates in the build thread in ms
- private static final long BUILD_UPDATE_TIMEOUT = 500;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- */
- public ControlFlowView() {
- super(ID, new ControlFlowPresentationProvider());
- setTreeColumns(COLUMN_NAMES);
- setTreeLabelProvider(new ControlFlowTreeLabelProvider());
- setFilterColumns(FILTER_COLUMN_NAMES);
- setFilterLabelProvider(new ControlFlowFilterLabelProvider());
- setEntryComparator(new ControlFlowEntryComparator());
- }
-
- @Override
- protected void fillLocalToolBar(IToolBarManager manager) {
- super.fillLocalToolBar(manager);
- IDialogSettings settings = Activator.getDefault().getDialogSettings();
- IDialogSettings section = settings.getSection(getClass().getName());
- if (section == null) {
- section = settings.addNewSection(getClass().getName());
- }
-
- IAction hideArrowsAction = getTimeGraphCombo().getTimeGraphViewer().getHideArrowsAction(section);
- manager.add(hideArrowsAction);
-
- IAction followArrowBwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowBwdAction();
- followArrowBwdAction.setText(Messages.ControlFlowView_followCPUBwdText);
- followArrowBwdAction.setToolTipText(Messages.ControlFlowView_followCPUBwdText);
- manager.add(followArrowBwdAction);
-
- IAction followArrowFwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowFwdAction();
- followArrowFwdAction.setText(Messages.ControlFlowView_followCPUFwdText);
- followArrowFwdAction.setToolTipText(Messages.ControlFlowView_followCPUFwdText);
- manager.add(followArrowFwdAction);
- }
-
- @Override
- protected String getNextText() {
- return Messages.ControlFlowView_nextProcessActionNameText;
- }
-
- @Override
- protected String getNextTooltip() {
- return Messages.ControlFlowView_nextProcessActionToolTipText;
- }
-
- @Override
- protected String getPrevText() {
- return Messages.ControlFlowView_previousProcessActionNameText;
- }
-
- @Override
- protected String getPrevTooltip() {
- return Messages.ControlFlowView_previousProcessActionToolTipText;
- }
-
- private static class ControlFlowEntryComparator implements Comparator<ITimeGraphEntry> {
-
- @Override
- public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
-
- int result = 0;
-
- if ((o1 instanceof ControlFlowEntry) && (o2 instanceof ControlFlowEntry)) {
- ControlFlowEntry entry1 = (ControlFlowEntry) o1;
- ControlFlowEntry entry2 = (ControlFlowEntry) o2;
- result = entry1.getTrace().getStartTime().compareTo(entry2.getTrace().getStartTime());
- if (result == 0) {
- result = entry1.getTrace().getName().compareTo(entry2.getTrace().getName());
- }
- if (result == 0) {
- result = entry1.getThreadId() < entry2.getThreadId() ? -1 : entry1.getThreadId() > entry2.getThreadId() ? 1 : 0;
- }
- }
-
- if (result == 0) {
- result = o1.getStartTime() < o2.getStartTime() ? -1 : o1.getStartTime() > o2.getStartTime() ? 1 : 0;
- }
-
- return result;
- }
- }
-
- /**
- * @author gbastien
- *
- */
- protected static class ControlFlowTreeLabelProvider extends TreeLabelProvider {
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- ControlFlowEntry entry = (ControlFlowEntry) element;
-
- if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_processColumn)) {
- return entry.getName();
- } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_tidColumn)) {
- return Integer.toString(entry.getThreadId());
- } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_ptidColumn)) {
- if (entry.getParentThreadId() > 0) {
- return Integer.toString(entry.getParentThreadId());
- }
- } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_birthTimeColumn)) {
- return Utils.formatTime(entry.getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC);
- } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_traceColumn)) {
- return entry.getTrace().getName();
- }
- return ""; //$NON-NLS-1$
- }
-
- }
-
- private static class ControlFlowFilterLabelProvider extends TreeLabelProvider {
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- ControlFlowEntry entry = (ControlFlowEntry) element;
-
- if (columnIndex == 0) {
- return entry.getName();
- } else if (columnIndex == 1) {
- return Integer.toString(entry.getThreadId());
- }
- return ""; //$NON-NLS-1$
- }
-
- }
-
- // ------------------------------------------------------------------------
- // Internal
- // ------------------------------------------------------------------------
-
- @Override
- protected void buildEventList(final ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
- if (trace == null) {
- return;
- }
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- return;
- }
-
- List<ControlFlowEntry> entryList = new ArrayList<>();
- Map<Integer, ControlFlowEntry> entryMap = new HashMap<>();
-
- long start = ssq.getStartTime();
- setStartTime(Math.min(getStartTime(), start));
-
- boolean complete = false;
- while (!complete) {
- if (monitor.isCanceled()) {
- return;
- }
- complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
- if (ssq.isCancelled()) {
- return;
- }
- long end = ssq.getCurrentEndTime();
- if (start == end && !complete) { // when complete execute one last time regardless of end time
- continue;
- }
- setEndTime(Math.max(getEndTime(), end + 1));
- List<Integer> threadQuarks = ssq.getQuarks(Attributes.THREADS, "*"); //$NON-NLS-1$
- for (int threadQuark : threadQuarks) {
- if (monitor.isCanceled()) {
- return;
- }
- String threadName = ssq.getAttributeName(threadQuark);
- int threadId = -1;
- try {
- threadId = Integer.parseInt(threadName);
- } catch (NumberFormatException e1) {
- continue;
- }
- if (threadId <= 0) { // ignore the 'unknown' (-1) and swapper (0) threads
- continue;
- }
-
- int execNameQuark;
- List<ITmfStateInterval> execNameIntervals;
- try {
- execNameQuark = ssq.getQuarkRelative(threadQuark, Attributes.EXEC_NAME);
- execNameIntervals = ssq.queryHistoryRange(execNameQuark, start, end);
- } catch (AttributeNotFoundException e) {
- /* No information on this thread (yet?), skip it for now */
- continue;
- } catch (StateSystemDisposedException e) {
- /* State system is closing down, no point continuing */
- break;
- }
-
- for (ITmfStateInterval execNameInterval : execNameIntervals) {
- if (monitor.isCanceled()) {
- return;
- }
- ControlFlowEntry entry = entryMap.get(threadId);
- if (!execNameInterval.getStateValue().isNull() &&
- execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
- String execName = execNameInterval.getStateValue().unboxStr();
- long startTime = execNameInterval.getStartTime();
- long endTime = execNameInterval.getEndTime() + 1;
- if (entry == null) {
- ITmfStateInterval ppidInterval = null;
- try {
- int ppidQuark = ssq.getQuarkRelative(threadQuark, Attributes.PPID);
- ppidInterval = ssq.querySingleState(startTime, ppidQuark);
- } catch (AttributeNotFoundException e) {
- /* No info, keep PPID at -1 */
- } catch (StateSystemDisposedException e) {
- /* SS is closing down, time to bail */
- break;
- }
- int ppid = -1;
- if (!(ppidInterval == null) && !ppidInterval.getStateValue().isNull()) {
- ppid = ppidInterval.getStateValue().unboxInt();
- }
- entry = new ControlFlowEntry(threadQuark, trace, execName, threadId, ppid, startTime, endTime);
- entryList.add(entry);
- entryMap.put(threadId, entry);
- } else {
- // update the name of the entry to the latest
- // execName
- entry.setName(execName);
- entry.updateEndTime(endTime);
- }
- } else {
- entryMap.remove(threadId);
- }
- }
- }
-
- updateTree(entryList, parentTrace);
-
- if (parentTrace.equals(getTrace())) {
- refresh();
- }
-
- for (ControlFlowEntry entry : entryList) {
- if (monitor.isCanceled()) {
- return;
- }
- buildStatusEvents(entry.getTrace(), entry, monitor, start, end);
- }
-
- start = end;
- }
- }
-
- private void updateTree(List<ControlFlowEntry> entryList, ITmfTrace parentTrace) {
- List<TimeGraphEntry> rootListToAdd = new ArrayList<>();
- List<TimeGraphEntry> rootListToRemove = new ArrayList<>();
- List<TimeGraphEntry> rootList = getEntryList(parentTrace);
-
- for (ControlFlowEntry entry : entryList) {
- boolean root = (entry.getParent() == null);
- if (root && entry.getParentThreadId() > 0) {
- for (ControlFlowEntry parent : entryList) {
- if (parent.getThreadId() == entry.getParentThreadId() &&
- entry.getStartTime() >= parent.getStartTime() &&
- entry.getStartTime() <= parent.getEndTime()) {
- parent.addChild(entry);
- root = false;
- if (rootList != null && rootList.contains(entry)) {
- rootListToRemove.add(entry);
- }
- break;
- }
- }
- }
- if (root && (rootList == null || !rootList.contains(entry))) {
- rootListToAdd.add(entry);
- }
- }
-
- addToEntryList(parentTrace, rootListToAdd);
- removeFromEntryList(parentTrace, rootListToRemove);
- }
-
- private void buildStatusEvents(ITmfTrace trace, ControlFlowEntry entry, IProgressMonitor monitor, long start, long end) {
- if (start < entry.getEndTime() && end > entry.getStartTime()) {
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- return;
- }
-
- long startTime = Math.max(start, entry.getStartTime());
- long endTime = Math.min(end + 1, entry.getEndTime());
- long resolution = Math.max(1, (end - ssq.getStartTime()) / getDisplayWidth());
- List<ITimeEvent> eventList = getEventList(entry, startTime, endTime, resolution, monitor);
- if (eventList == null) {
- return;
- }
- for (ITimeEvent event : eventList) {
- entry.addEvent(event);
- }
- if (trace.equals(getTrace())) {
- redraw();
- }
- }
- for (ITimeGraphEntry child : entry.getChildren()) {
- if (monitor.isCanceled()) {
- return;
- }
- buildStatusEvents(trace, (ControlFlowEntry) child, monitor, start, end);
- }
- }
-
- @Override
- protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry tgentry, long startTime, long endTime, long resolution, IProgressMonitor monitor) {
- List<ITimeEvent> eventList = null;
- if (!(tgentry instanceof ControlFlowEntry)) {
- return eventList;
- }
- ControlFlowEntry entry = (ControlFlowEntry) tgentry;
- final long realStart = Math.max(startTime, entry.getStartTime());
- final long realEnd = Math.min(endTime, entry.getEndTime());
- if (realEnd <= realStart) {
- return null;
- }
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- return null;
- }
- try {
- int statusQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.STATUS);
- List<ITmfStateInterval> statusIntervals = ssq.queryHistoryRange(statusQuark, realStart, realEnd - 1, resolution, monitor);
- eventList = new ArrayList<>(statusIntervals.size());
- long lastEndTime = -1;
- for (ITmfStateInterval statusInterval : statusIntervals) {
- if (monitor.isCanceled()) {
- return null;
- }
- long time = statusInterval.getStartTime();
- long duration = statusInterval.getEndTime() - time + 1;
- int status = -1;
- try {
- status = statusInterval.getStateValue().unboxInt();
- } catch (StateValueTypeException e) {
- e.printStackTrace();
- }
- if (lastEndTime != time && lastEndTime != -1) {
- eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
- }
- eventList.add(new TimeEvent(entry, time, duration, status));
- lastEndTime = time + duration;
- }
- } catch (AttributeNotFoundException | TimeRangeException e) {
- e.printStackTrace();
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- return eventList;
- }
-
- /**
- * Returns a value corresponding to the selected entry.
- *
- * Used in conjunction with synchingToTime to change the selected entry. If
- * one of these methods is overridden in child class, then both should be.
- *
- * @param time
- * The currently selected time
- * @return a value identifying the entry
- */
- private int getSelectionValue(long time) {
- int thread = -1;
- ITmfTrace[] traces = TmfTraceManager.getTraceSet(getTrace());
- if (traces == null) {
- return thread;
- }
- for (ITmfTrace trace : traces) {
- if (thread > 0) {
- break;
- }
- if (trace == null) {
- continue;
- }
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- continue;
- }
- if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
- List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
- for (int currentThreadQuark : currentThreadQuarks) {
- try {
- ITmfStateInterval currentThreadInterval = ssq.querySingleState(time, currentThreadQuark);
- int currentThread = currentThreadInterval.getStateValue().unboxInt();
- if (currentThread > 0) {
- int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThread), Attributes.STATUS);
- ITmfStateInterval statusInterval = ssq.querySingleState(time, statusQuark);
- if (statusInterval.getStartTime() == time) {
- thread = currentThread;
- break;
- }
- }
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- e.printStackTrace();
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- }
- }
- }
- return thread;
- }
-
- @Override
- protected void synchingToTime(long time) {
- int selected = getSelectionValue(time);
- if (selected > 0) {
- for (Object element : getTimeGraphViewer().getExpandedElements()) {
- if (element instanceof ControlFlowEntry) {
- ControlFlowEntry entry = (ControlFlowEntry) element;
- if (entry.getThreadId() == selected) {
- getTimeGraphCombo().setSelection(entry);
- break;
- }
- }
- }
- }
- }
-
- @Override
- protected List<ILinkEvent> getLinkList(long startTime, long endTime, long resolution, IProgressMonitor monitor) {
- List<ILinkEvent> list = new ArrayList<>();
- ITmfTrace[] traces = TmfTraceManager.getTraceSet(getTrace());
- List<TimeGraphEntry> entryList = getEntryList(getTrace());
- if (traces == null || entryList == null) {
- return list;
- }
- for (ITmfTrace trace : traces) {
- if (trace == null) {
- continue;
- }
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- continue;
- }
- try {
- long start = Math.max(startTime, ssq.getStartTime());
- long end = Math.min(endTime, ssq.getCurrentEndTime());
- if (end < start) {
- continue;
- }
- List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
- for (int currentThreadQuark : currentThreadQuarks) {
- // adjust the query range to include the previous and following intervals
- long qstart = Math.max(ssq.querySingleState(start, currentThreadQuark).getStartTime() - 1, ssq.getStartTime());
- long qend = Math.min(ssq.querySingleState(end, currentThreadQuark).getEndTime() + 1, ssq.getCurrentEndTime());
- List<ITmfStateInterval> currentThreadIntervals = ssq.queryHistoryRange(currentThreadQuark, qstart, qend, resolution, monitor);
- int prevThread = 0;
- long prevEnd = 0;
- long lastEnd = 0;
- for (ITmfStateInterval currentThreadInterval : currentThreadIntervals) {
- if (monitor.isCanceled()) {
- return null;
- }
- long time = currentThreadInterval.getStartTime();
- if (time != lastEnd) {
- // don't create links where there are gaps in intervals due to the resolution
- prevThread = 0;
- prevEnd = 0;
- }
- int thread = currentThreadInterval.getStateValue().unboxInt();
- if (thread > 0 && prevThread > 0) {
- ITimeGraphEntry prevEntry = findEntry(entryList, trace, prevThread);
- ITimeGraphEntry nextEntry = findEntry(entryList, trace, thread);
- list.add(new TimeLinkEvent(prevEntry, nextEntry, prevEnd, time - prevEnd, 0));
- }
- lastEnd = currentThreadInterval.getEndTime() + 1;
- if (thread != 0) {
- prevThread = thread;
- prevEnd = lastEnd;
- }
- }
- }
- } catch (TimeRangeException | AttributeNotFoundException | StateValueTypeException e) {
- e.printStackTrace();
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- }
- return list;
- }
-
- private ControlFlowEntry findEntry(List<? extends ITimeGraphEntry> entryList, ITmfTrace trace, int threadId) {
- for (ITimeGraphEntry entry : entryList) {
- if (entry instanceof ControlFlowEntry) {
- ControlFlowEntry controlFlowEntry = (ControlFlowEntry) entry;
- if (controlFlowEntry.getThreadId() == threadId && controlFlowEntry.getTrace() == trace) {
- return controlFlowEntry;
- } else if (entry.hasChildren()) {
- controlFlowEntry = findEntry(entry.getChildren(), trace, threadId);
- if (controlFlowEntry != null) {
- return controlFlowEntry;
- }
- }
- }
- }
- return null;
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.jface.viewers.ViewerComparator;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.lttng2.kernel.core.cpuusage.LttngKernelCpuUsageAnalysis;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider;
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.ITmfTreeViewerEntry;
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeColumnData;
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeColumnData.ITmfColumnPercentageProvider;
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeViewerEntry;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Tree viewer to display CPU usage information in a specified time range. It
- * shows the process's TID, its name, the time spent on the CPU during that
- * range, in % and absolute value.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageComposite extends AbstractTmfTreeViewer {
-
- // Timeout between to wait for in the updateElements method
- private static final long BUILD_UPDATE_TIMEOUT = 500;
-
- private LttngKernelCpuUsageAnalysis fModule = null;
- private String fSelectedThread = null;
-
- private static final String[] COLUMN_NAMES = new String[] {
- Messages.CpuUsageComposite_ColumnTID,
- Messages.CpuUsageComposite_ColumnProcess,
- Messages.CpuUsageComposite_ColumnPercent,
- Messages.CpuUsageComposite_ColumnTime
- };
-
- /* A map that saves the mapping of a thread ID to its executable name */
- private final Map<String, String> fProcessNameMap = new HashMap<>();
-
- /** Provides label for the CPU usage tree viewer cells */
- protected static class CpuLabelProvider extends TreeLabelProvider {
-
- @Override
- public String getColumnText(Object element, int columnIndex) {
- CpuUsageEntry obj = (CpuUsageEntry) element;
- if (columnIndex == 0) {
- return obj.getTid();
- } else if (columnIndex == 1) {
- return obj.getProcessName();
- } else if (columnIndex == 2) {
- return String.format(Messages.CpuUsageComposite_TextPercent, obj.getPercent());
- } else if (columnIndex == 3) {
- return NLS.bind(Messages.CpuUsageComposite_TextTime, obj.getTime());
- }
-
- return element.toString();
- }
-
- }
-
- /**
- * Constructor
- *
- * @param parent
- * The parent composite that holds this viewer
- */
- public CpuUsageComposite(Composite parent) {
- super(parent, false);
- setLabelProvider(new CpuLabelProvider());
- }
-
- @Override
- protected ITmfTreeColumnDataProvider getColumnDataProvider() {
- return new ITmfTreeColumnDataProvider() {
-
- @Override
- public List<TmfTreeColumnData> getColumnData() {
- /* All columns are sortable */
- List<TmfTreeColumnData> columns = new ArrayList<>();
- TmfTreeColumnData column = new TmfTreeColumnData(COLUMN_NAMES[0]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- CpuUsageEntry n1 = (CpuUsageEntry) e1;
- CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
- return n1.getTid().compareTo(n2.getTid());
-
- }
- });
- columns.add(column);
- column = new TmfTreeColumnData(COLUMN_NAMES[1]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- CpuUsageEntry n1 = (CpuUsageEntry) e1;
- CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
- return n1.getProcessName().compareTo(n2.getProcessName());
-
- }
- });
- columns.add(column);
- column = new TmfTreeColumnData(COLUMN_NAMES[2]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- CpuUsageEntry n1 = (CpuUsageEntry) e1;
- CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
- return n1.getPercent().compareTo(n2.getPercent());
-
- }
- });
- column.setPercentageProvider(new ITmfColumnPercentageProvider() {
-
- @Override
- public double getPercentage(Object data) {
- CpuUsageEntry parent = (CpuUsageEntry) data;
- return parent.getPercent() / 100;
- }
- });
- columns.add(column);
- column = new TmfTreeColumnData(COLUMN_NAMES[3]);
- column.setComparator(new ViewerComparator() {
- @Override
- public int compare(Viewer viewer, Object e1, Object e2) {
- CpuUsageEntry n1 = (CpuUsageEntry) e1;
- CpuUsageEntry n2 = (CpuUsageEntry) e2;
-
- return n1.getTime().compareTo(n2.getTime());
-
- }
- });
- columns.add(column);
-
- return columns;
- }
-
- };
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- protected void contentChanged(ITmfTreeViewerEntry rootEntry) {
- String selectedThread = fSelectedThread;
- if (selectedThread != null) {
- /* Find the selected thread among the inputs */
- for (ITmfTreeViewerEntry entry : rootEntry.getChildren()) {
- if (entry instanceof CpuUsageEntry) {
- if (selectedThread.equals(((CpuUsageEntry) entry).getTid())) {
- @SuppressWarnings("null")
- @NonNull List<ITmfTreeViewerEntry> list = Collections.singletonList(entry);
- super.setSelection(list);
- return;
- }
- }
- }
- }
- }
-
- @Override
- public void initializeDataSource() {
- fModule = getTrace().getAnalysisModuleOfClass(LttngKernelCpuUsageAnalysis.class, LttngKernelCpuUsageAnalysis.ID);
- if (fModule == null) {
- return;
- }
- fModule.schedule();
- fModule.waitForInitialization();
- fProcessNameMap.clear();
- }
-
- @Override
- protected ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) {
- if (isSelection || (start == end)) {
- return null;
- }
- if (getTrace() == null || fModule == null) {
- return null;
- }
- fModule.waitForInitialization();
- ITmfStateSystem ss = fModule.getStateSystem();
- if (ss == null) {
- return null;
- }
-
- boolean complete = false;
- long currentEnd = start;
-
- while (!complete && currentEnd < end) {
- complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
- currentEnd = ss.getCurrentEndTime();
- }
-
- /* Initialize the data */
- Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, getStartTime()), Math.min(end, getEndTime()));
-
- TmfTreeViewerEntry root = new TmfTreeViewerEntry(""); //$NON-NLS-1$
- List<ITmfTreeViewerEntry> entryList = root.getChildren();
-
- for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
- /*
- * Process only entries representing the total of all CPUs and that
- * have time on CPU
- */
- if (entry.getValue() == 0) {
- continue;
- }
- if (!entry.getKey().startsWith(LttngKernelCpuUsageAnalysis.TOTAL)) {
- continue;
- }
- String[] strings = entry.getKey().split(LttngKernelCpuUsageAnalysis.SPLIT_STRING, 2);
-
- if ((strings.length > 1) && !(strings[1].equals(LttngKernelCpuUsageAnalysis.TID_ZERO))) {
- CpuUsageEntry obj = new CpuUsageEntry(strings[1], getProcessName(strings[1]), (double) entry.getValue() / (double) (end - start) * 100, entry.getValue());
- entryList.add(obj);
- }
- }
-
- return root;
- }
-
- /*
- * Get the process name from its TID by using the LTTng kernel analysis
- * module
- */
- private String getProcessName(String tid) {
- String execName = fProcessNameMap.get(tid);
- if (execName != null) {
- return execName;
- }
- ITmfTrace trace = getTrace();
- if (trace == null) {
- return tid;
- }
- ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
- if (kernelSs == null) {
- return tid;
- }
-
- try {
- int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS);
-
- /* Get the quarks for each cpu */
- List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false);
-
- for (Integer tidQuark : cpuNodes) {
- if (kernelSs.getAttributeName(tidQuark).equals(tid)) {
- int execNameQuark;
- List<ITmfStateInterval> execNameIntervals;
- try {
- execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME);
- execNameIntervals = kernelSs.queryHistoryRange(execNameQuark, getStartTime(), getEndTime());
- } catch (AttributeNotFoundException e) {
- /* No information on this thread (yet?), skip it for now */
- continue;
- } catch (StateSystemDisposedException e) {
- /* State system is closing down, no point continuing */
- break;
- }
-
- for (ITmfStateInterval execNameInterval : execNameIntervals) {
- if (!execNameInterval.getStateValue().isNull() &&
- execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
- execName = execNameInterval.getStateValue().unboxStr();
- fProcessNameMap.put(tid, execName);
- return execName;
- }
- }
- }
- }
-
- } catch (AttributeNotFoundException e) {
- /* can't find the process name, just return the tid instead */
- }
- return tid;
- }
-
- /**
- * Set the currently selected thread ID
- *
- * @param tid
- * The selected thread ID
- */
- public void setSelectedThread(String tid) {
- fSelectedThread = tid;
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
-
-import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeViewerEntry;
-
-/**
- * Represents an entry in the tree viewer of the CPU usage view. An entry is a
- * thread that occupied part of the CPU in the selected time range.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageEntry extends TmfTreeViewerEntry {
- private final String fTid;
- private final String fProcessName;
- private final Double fPercent;
- private final Long fTime;
-
- /**
- * Constructor
- *
- * @param tid
- * The TID of the process
- * @param name
- * The thread's name
- * @param percent
- * The percentage CPU usage
- * @param time
- * The total amount of time spent on CPU
- */
- public CpuUsageEntry(String tid, String name, double percent, long time) {
- super(tid);
- fTid = tid;
- fProcessName = name;
- fPercent = percent;
- fTime = time;
- }
-
- /**
- * Get the TID of the thread represented by this entry
- *
- * @return The thread's TID
- */
- public String getTid() {
- return fTid;
- }
-
- /**
- * Get the process name
- *
- * @return The process name
- */
- public String getProcessName() {
- return fProcessName;
- }
-
- /**
- * Get the percentage of time spent on CPU in the time interval represented
- * by this entry.
- *
- * @return The percentage of time spent on CPU
- */
- public Double getPercent() {
- return fPercent;
- }
-
- /**
- * Get the total time spent on CPU in the time interval represented by this
- * entry.
- *
- * @return The total time spent on CPU
- */
- public Long getTime() {
- return fTime;
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
-
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.views.TmfView;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.custom.SashForm;
-import org.eclipse.swt.layout.FillLayout;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * CPU usage view. It contains 2 viewers: one tree viewer showing all the
- * threads who were on the CPU in the time range, and one XY chart viewer
- * plotting the total time spent on CPU and the time of the threads selected in
- * the tree viewer.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageView extends TmfView {
-
- /** ID string */
- public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.cpuusage"; //$NON-NLS-1$
-
- private CpuUsageComposite fTreeViewer = null;
- private CpuUsageXYViewer fXYViewer = null;
-
- /**
- * Constructor
- */
- public CpuUsageView() {
- super(Messages.CpuUsageView_Title);
- }
-
- @Override
- public void createPartControl(Composite parent) {
-
- final SashForm sash = new SashForm(parent, SWT.NONE);
-
- fTreeViewer = new CpuUsageComposite(sash);
-
- /* Build the XY chart part of the view */
- fXYViewer = new CpuUsageXYViewer(sash);
-
- /* Add selection listener to tree viewer */
- fTreeViewer.addSelectionChangeListener(new ISelectionChangedListener() {
- @Override
- public void selectionChanged(SelectionChangedEvent event) {
- ISelection selection = event.getSelection();
- if (selection instanceof IStructuredSelection) {
- Object structSelection = ((IStructuredSelection) selection).getFirstElement();
- if (structSelection instanceof CpuUsageEntry) {
- CpuUsageEntry entry = (CpuUsageEntry) structSelection;
- fTreeViewer.setSelectedThread(entry.getTid());
- fXYViewer.setSelectedThread(Long.valueOf(entry.getTid()));
- }
- }
- }
- });
-
- sash.setLayout(new FillLayout());
-
- /* Initialize the viewers with the currently selected trace */
- ITmfTrace trace = getActiveTrace();
- if (trace != null) {
- TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace);
- fTreeViewer.traceSelected(signal);
- fXYViewer.traceSelected(signal);
- }
-
- }
-
- @Override
- public void setFocus() {
- }
-
- @Override
- public void dispose() {
- super.dispose();
- if (fTreeViewer != null) {
- fTreeViewer.dispose();
- }
- if (fXYViewer != null) {
- fXYViewer.dispose();
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
-import org.eclipse.linuxtools.lttng2.kernel.core.cpuusage.LttngKernelCpuUsageAnalysis;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.tmf.ui.viewers.xycharts.linecharts.TmfCommonXLineChartViewer;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * CPU usage viewer with XY line chart. It displays the total CPU usage and that
- * of the threads selected in the CPU usage tree viewer.
- *
- * @author Geneviève Bastien
- */
-public class CpuUsageXYViewer extends TmfCommonXLineChartViewer {
-
- private LttngKernelCpuUsageAnalysis fModule = null;
-
- /* Maps a thread ID to a list of y values */
- private final Map<String, double[]> fYValues = new LinkedHashMap<>();
- /*
- * To avoid up and downs CPU usage when process is in and out of CPU
- * frequently, use a smaller resolution to get better averages.
- */
- private static final double RESOLUTION = 0.4;
-
- // Timeout between updates in the updateData thread
- private static final long BUILD_UPDATE_TIMEOUT = 500;
-
- private long fSelectedThread = -1;
-
- /**
- * Constructor
- *
- * @param parent
- * parent composite
- */
- public CpuUsageXYViewer(Composite parent) {
- super(parent, Messages.CpuUsageXYViewer_Title, Messages.CpuUsageXYViewer_TimeXAxis, Messages.CpuUsageXYViewer_CpuYAxis);
- setResolution(RESOLUTION);
- }
-
- @Override
- protected void initializeDataSource() {
- if (getTrace() != null) {
- fModule = getTrace().getAnalysisModuleOfClass(LttngKernelCpuUsageAnalysis.class, LttngKernelCpuUsageAnalysis.ID);
- if (fModule == null) {
- return;
- }
- fModule.schedule();
- }
- }
-
- private static double[] zeroFill(int nb) {
- double[] arr = new double[nb];
- Arrays.fill(arr, 0.0);
- return arr;
- }
-
- @Override
- protected void updateData(long start, long end, int nb, IProgressMonitor monitor) {
- try {
- if (getTrace() == null || fModule == null) {
- return;
- }
- fModule.waitForInitialization();
- ITmfStateSystem ss = fModule.getStateSystem();
- if (ss == null) {
- return;
- }
- double[] xvalues = getXAxis(start, end, nb);
- if (xvalues.length == 0) {
- return;
- }
- setXAxis(xvalues);
-
- boolean complete = false;
- long currentEnd = start;
-
- while (!complete && currentEnd < end) {
-
- if (monitor.isCanceled()) {
- return;
- }
-
- long traceStart = getStartTime();
- long traceEnd = getEndTime();
- long offset = getTimeOffset();
- long selectedThread = fSelectedThread;
-
- complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
- currentEnd = ss.getCurrentEndTime();
-
- /* Initialize the data */
- Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, traceStart), Math.min(end, traceEnd));
- Map<String, String> totalEntries = new HashMap<>();
- fYValues.clear();
- fYValues.put(Messages.CpuUsageXYViewer_Total, zeroFill(xvalues.length));
- String stringSelectedThread = Long.toString(selectedThread);
- if (selectedThread != -1) {
- fYValues.put(stringSelectedThread, zeroFill(xvalues.length));
- }
-
- for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
- /*
- * Process only entries representing the total of all CPUs
- * and that have time on CPU
- */
- if (entry.getValue() == 0) {
- continue;
- }
- if (!entry.getKey().startsWith(LttngKernelCpuUsageAnalysis.TOTAL)) {
- continue;
- }
- String[] strings = entry.getKey().split(LttngKernelCpuUsageAnalysis.SPLIT_STRING, 2);
-
- if ((strings.length > 1) && !(strings[1].equals(LttngKernelCpuUsageAnalysis.TID_ZERO))) {
- /* This is the total cpu usage for a thread */
- totalEntries.put(strings[1], entry.getKey());
- }
- }
-
- double prevX = xvalues[0];
- long prevTime = (long) prevX + offset;
- /*
- * make sure that time is in the trace range after double to
- * long conversion
- */
- prevTime = Math.max(traceStart, prevTime);
- prevTime = Math.min(traceEnd, prevTime);
- /* Get CPU usage statistics for each x value */
- for (int i = 1; i < xvalues.length; i++) {
- if (monitor.isCanceled()) {
- return;
- }
- long totalCpu = 0;
- double x = xvalues[i];
- long time = (long) x + offset;
- time = Math.max(traceStart, time);
- time = Math.min(traceEnd, time);
-
- cpuUsageMap = fModule.getCpuUsageInRange(prevTime, time);
-
- /*
- * Calculate the sum of all total entries, and add a data
- * point to the selected one
- */
- for (Entry<String, String> entry : totalEntries.entrySet()) {
- Long cpuEntry = cpuUsageMap.get(entry.getValue());
- cpuEntry = cpuEntry != null ? cpuEntry : 0L;
-
- totalCpu += cpuEntry;
-
- if (entry.getKey().equals(stringSelectedThread)) {
- /* This is the total cpu usage for a thread */
- fYValues.get(entry.getKey())[i] = (double) cpuEntry / (double) (time - prevTime) * 100;
- }
-
- }
- fYValues.get(Messages.CpuUsageXYViewer_Total)[i] = (double) totalCpu / (double) (time - prevTime) * 100;
- prevTime = time;
- }
- for (Entry<String, double[]> entry : fYValues.entrySet()) {
- setSeries(entry.getKey(), entry.getValue());
- }
- if (monitor.isCanceled()) {
- return;
- }
- updateDisplay();
- }
- } catch (StateValueTypeException e) {
- Activator.getDefault().logError("Error updating the data of the CPU usage view", e); //$NON-NLS-1$
- }
-
- }
-
- /**
- * Set the selected thread ID, which will be graphed in this viewer
- *
- * @param tid
- * The selected thread ID
- */
- public void setSelectedThread(long tid) {
- cancelUpdate();
- deleteSeries(Long.toString(fSelectedThread));
- fSelectedThread = tid;
- updateContent();
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Messages used in the LTTng kernel CPU usage view and viewers.
- *
- * @author Geneviève Bastien
- */
-@SuppressWarnings("javadoc")
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage.messages"; //$NON-NLS-1$
- public static String CpuUsageComposite_ColumnPercent;
- public static String CpuUsageComposite_ColumnProcess;
- public static String CpuUsageComposite_ColumnTID;
- public static String CpuUsageComposite_ColumnTime;
- public static String CpuUsageComposite_TextPercent;
- public static String CpuUsageComposite_TextTime;
- public static String CpuUsageView_Title;
- public static String CpuUsageXYViewer_CpuYAxis;
- public static String CpuUsageXYViewer_TimeXAxis;
- public static String CpuUsageXYViewer_Title;
- public static String CpuUsageXYViewer_Total;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2014 École Polytechnique de Montréal
-#
-# 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:
-# Geneviève Bastien - Initial API and implementation
-###############################################################################
-
-CpuUsageComposite_ColumnPercent=%
-CpuUsageComposite_ColumnProcess=Process
-CpuUsageComposite_ColumnTID=TID
-CpuUsageComposite_ColumnTime=Time
-CpuUsageComposite_TextPercent=%1$.3f %%
-CpuUsageComposite_TextTime={0} ns
-CpuUsageView_Title=CPU Usage
-CpuUsageXYViewer_CpuYAxis=% CPU
-CpuUsageXYViewer_TimeXAxis=Time
-CpuUsageXYViewer_Title=CPU usage
-CpuUsageXYViewer_Total=Total
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Patrick Tasse - Initial API and implementation
- * Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-
-/**
- * An entry, or row, in the resource view
- *
- * @author Patrick Tasse
- */
-public class ResourcesEntry extends TimeGraphEntry implements Comparable<ITimeGraphEntry> {
-
- /** Type of resource */
- public static enum Type {
- /** Null resources (filler rows, etc.) */
- NULL,
- /** Entries for CPUs */
- CPU,
- /** Entries for IRQs */
- IRQ,
- /** Entries for Soft IRQ */
- SOFT_IRQ
- }
-
- private final int fId;
- private final @NonNull ITmfTrace fTrace;
- private final Type fType;
- private final int fQuark;
-
- /**
- * Constructor
- *
- * @param quark
- * The attribute quark matching the entry
- * @param trace
- * The trace on which we are working
- * @param name
- * The exec_name of this entry
- * @param startTime
- * The start time of this entry lifetime
- * @param endTime
- * The end time of this entry
- * @param type
- * The type of this entry
- * @param id
- * The id of this entry
- */
- public ResourcesEntry(int quark, @NonNull ITmfTrace trace, String name,
- long startTime, long endTime, Type type, int id) {
- super(name, startTime, endTime);
- fId = id;
- fTrace = trace;
- fType = type;
- fQuark = quark;
- }
-
- /**
- * Constructor
- *
- * @param trace
- * The trace on which we are working
- * @param name
- * The exec_name of this entry
- * @param startTime
- * The start time of this entry lifetime
- * @param endTime
- * The end time of this entry
- * @param id
- * The id of this entry
- */
- public ResourcesEntry(@NonNull ITmfTrace trace, String name,
- long startTime, long endTime, int id) {
- this(-1, trace, name, startTime, endTime, Type.NULL, id);
- }
-
- /**
- * Constructor
- *
- * @param quark
- * The attribute quark matching the entry
- * @param trace
- * The trace on which we are working
- * @param startTime
- * The start time of this entry lifetime
- * @param endTime
- * The end time of this entry
- * @param type
- * The type of this entry
- * @param id
- * The id of this entry
- */
- public ResourcesEntry(int quark, @NonNull ITmfTrace trace,
- long startTime, long endTime, Type type, int id) {
- this(quark, trace, type.toString() + " " + id, startTime, endTime, type, id); //$NON-NLS-1$
- }
-
- /**
- * Get the entry's id
- *
- * @return the entry's id
- */
- public int getId() {
- return fId;
- }
-
- /**
- * Get the entry's trace
- *
- * @return the entry's trace
- */
- public @NonNull ITmfTrace getTrace() {
- return fTrace;
- }
-
- /**
- * Get the entry Type of this entry. Uses the inner Type enum.
- *
- * @return The entry type
- */
- public Type getType() {
- return fType;
- }
-
- /**
- * Retrieve the attribute quark that's represented by this entry.
- *
- * @return The integer quark The attribute quark matching the entry
- */
- public int getQuark() {
- return fQuark;
- }
-
- @Override
- public boolean hasTimeEvents() {
- if (fType == Type.NULL) {
- return false;
- }
- return true;
- }
-
- @Override
- public int compareTo(ITimeGraphEntry other) {
- if (!(other instanceof ResourcesEntry)) {
- /* Should not happen, but if it does, put those entries at the end */
- return -1;
- }
- ResourcesEntry o = (ResourcesEntry) other;
-
- /*
- * Resources entry names should all be of type "ABC 123"
- *
- * We want to filter on the Type first (the "ABC" part), then on the ID
- * ("123") in numerical order (so we get 1,2,10 and not 1,10,2).
- */
- int ret = this.getType().compareTo(o.getType());
- if (ret != 0) {
- return ret;
- }
- return Integer.compare(this.getId(), o.getId());
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Patrick Tasse - Initial API and implementation
- * Geneviève Bastien - Move code to provide base classes for time graph view
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
-
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.NullTimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.graphics.Color;
-import org.eclipse.swt.graphics.GC;
-import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.graphics.Rectangle;
-
-/**
- * Presentation provider for the Resource view, based on the generic TMF
- * presentation provider.
- *
- * @author Patrick Tasse
- */
-public class ResourcesPresentationProvider extends TimeGraphPresentationProvider {
-
- private long fLastThreadId = -1;
- private Color fColorWhite;
- private Color fColorGray;
- private Integer fAverageCharWidth;
-
- private enum State {
- IDLE (new RGB(200, 200, 200)),
- USERMODE (new RGB( 0, 200, 0)),
- SYSCALL (new RGB( 0, 0, 200)),
- IRQ (new RGB(200, 0, 100)),
- SOFT_IRQ (new RGB(200, 150, 100)),
- IRQ_ACTIVE (new RGB(200, 0, 100)),
- SOFT_IRQ_RAISED (new RGB(200, 200, 0)),
- SOFT_IRQ_ACTIVE (new RGB(200, 150, 100));
-
- public final RGB rgb;
-
- private State(RGB rgb) {
- this.rgb = rgb;
- }
- }
-
- /**
- * Default constructor
- */
- public ResourcesPresentationProvider() {
- super();
- }
-
- private static State[] getStateValues() {
- return State.values();
- }
-
- private static State getEventState(TimeEvent event) {
- if (event.hasValue()) {
- ResourcesEntry entry = (ResourcesEntry) event.getEntry();
- int value = event.getValue();
-
- if (entry.getType() == Type.CPU) {
- if (value == StateValues.CPU_STATUS_IDLE) {
- return State.IDLE;
- } else if (value == StateValues.CPU_STATUS_RUN_USERMODE) {
- return State.USERMODE;
- } else if (value == StateValues.CPU_STATUS_RUN_SYSCALL) {
- return State.SYSCALL;
- } else if (value == StateValues.CPU_STATUS_IRQ) {
- return State.IRQ;
- } else if (value == StateValues.CPU_STATUS_SOFTIRQ) {
- return State.SOFT_IRQ;
- }
- } else if (entry.getType() == Type.IRQ) {
- return State.IRQ_ACTIVE;
- } else if (entry.getType() == Type.SOFT_IRQ) {
- if (value == StateValues.SOFT_IRQ_RAISED) {
- return State.SOFT_IRQ_RAISED;
- }
- return State.SOFT_IRQ_ACTIVE;
- }
- }
- return null;
- }
-
- @Override
- public int getStateTableIndex(ITimeEvent event) {
- State state = getEventState((TimeEvent) event);
- if (state != null) {
- return state.ordinal();
- }
- if (event instanceof NullTimeEvent) {
- return INVISIBLE;
- }
- return TRANSPARENT;
- }
-
- @Override
- public StateItem[] getStateTable() {
- State[] states = getStateValues();
- StateItem[] stateTable = new StateItem[states.length];
- for (int i = 0; i < stateTable.length; i++) {
- State state = states[i];
- stateTable[i] = new StateItem(state.rgb, state.toString());
- }
- return stateTable;
- }
-
- @Override
- public String getEventName(ITimeEvent event) {
- State state = getEventState((TimeEvent) event);
- if (state != null) {
- return state.toString();
- }
- if (event instanceof NullTimeEvent) {
- return null;
- }
- return Messages.ResourcesView_multipleStates;
- }
-
- @Override
- public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) {
-
- Map<String, String> retMap = new LinkedHashMap<>();
- if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
-
- TimeEvent tcEvent = (TimeEvent) event;
- ResourcesEntry entry = (ResourcesEntry) event.getEntry();
-
- if (tcEvent.hasValue()) {
- ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ss == null) {
- return retMap;
- }
- // Check for IRQ or Soft_IRQ type
- if (entry.getType().equals(Type.IRQ) || entry.getType().equals(Type.SOFT_IRQ)) {
-
- // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display
- int cpu = tcEvent.getValue();
- if (cpu >= 0) {
- retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));
- }
- }
-
- // Check for type CPU
- else if (entry.getType().equals(Type.CPU)) {
- int status = tcEvent.getValue();
-
- if (status == StateValues.CPU_STATUS_IRQ) {
- // In IRQ state get the IRQ that caused the interruption
- int cpu = entry.getId();
-
- try {
- List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
- List<Integer> irqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
-
- for (int irqQuark : irqQuarks) {
- if (fullState.get(irqQuark).getStateValue().unboxInt() == cpu) {
- ITmfStateInterval value = ss.querySingleState(event.getTime(), irqQuark);
- if (!value.getStateValue().isNull()) {
- int irq = Integer.parseInt(ss.getAttributeName(irqQuark));
- retMap.put(Messages.ResourcesView_attributeIrqName, String.valueOf(irq));
- }
- break;
- }
- }
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
- // In SOFT_IRQ state get the SOFT_IRQ that caused the interruption
- int cpu = entry.getId();
-
- try {
- List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
- List<Integer> softIrqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
-
- for (int softIrqQuark : softIrqQuarks) {
- if (fullState.get(softIrqQuark).getStateValue().unboxInt() == cpu) {
- ITmfStateInterval value = ss.querySingleState(event.getTime(), softIrqQuark);
- if (!value.getStateValue().isNull()) {
- int softIrq = Integer.parseInt(ss.getAttributeName(softIrqQuark));
- retMap.put(Messages.ResourcesView_attributeSoftIrqName, String.valueOf(softIrq));
- }
- break;
- }
- }
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- } else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) {
- // In running state get the current tid
-
- try {
- retMap.put(Messages.ResourcesView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
- int cpuQuark = entry.getQuark();
- int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
- ITmfStateInterval interval = ss.querySingleState(hoverTime, currentThreadQuark);
- if (!interval.getStateValue().isNull()) {
- ITmfStateValue value = interval.getStateValue();
- int currentThreadId = value.unboxInt();
- retMap.put(Messages.ResourcesView_attributeTidName, Integer.toString(currentThreadId));
- int execNameQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.EXEC_NAME);
- interval = ss.querySingleState(hoverTime, execNameQuark);
- if (!interval.getStateValue().isNull()) {
- value = interval.getStateValue();
- retMap.put(Messages.ResourcesView_attributeProcessName, value.unboxStr());
- }
- if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
- int syscallQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.SYSTEM_CALL);
- interval = ss.querySingleState(hoverTime, syscallQuark);
- if (!interval.getStateValue().isNull()) {
- value = interval.getStateValue();
- retMap.put(Messages.ResourcesView_attributeSyscallName, value.unboxStr());
- }
- }
- }
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- }
- }
- }
- }
-
- return retMap;
- }
-
- @Override
- public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
- if (fColorGray == null) {
- fColorGray = gc.getDevice().getSystemColor(SWT.COLOR_GRAY);
- }
- if (fColorWhite == null) {
- fColorWhite = gc.getDevice().getSystemColor(SWT.COLOR_WHITE);
- }
- if (fAverageCharWidth == null) {
- fAverageCharWidth = gc.getFontMetrics().getAverageCharWidth();
- }
-
- ITmfTimeGraphDrawingHelper drawingHelper = getDrawingHelper();
- if (bounds.width <= fAverageCharWidth) {
- return;
- }
-
- if (!(event instanceof TimeEvent)) {
- return;
- }
- TimeEvent tcEvent = (TimeEvent) event;
- if (!tcEvent.hasValue()) {
- return;
- }
-
- ResourcesEntry entry = (ResourcesEntry) event.getEntry();
- if (!entry.getType().equals(Type.CPU)) {
- return;
- }
-
- int status = tcEvent.getValue();
- if (status != StateValues.CPU_STATUS_RUN_USERMODE && status != StateValues.CPU_STATUS_RUN_SYSCALL) {
- return;
- }
-
- ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ss == null) {
- return;
- }
- long time = event.getTime();
- try {
- while (time < event.getTime() + event.getDuration()) {
- int cpuQuark = entry.getQuark();
- int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
- ITmfStateInterval tidInterval = ss.querySingleState(time, currentThreadQuark);
- long startTime = Math.max(tidInterval.getStartTime(), event.getTime());
- int x = Math.max(drawingHelper.getXForTime(startTime), bounds.x);
- if (x >= bounds.x + bounds.width) {
- break;
- }
- if (!tidInterval.getStateValue().isNull()) {
- ITmfStateValue value = tidInterval.getStateValue();
- int currentThreadId = value.unboxInt();
- long endTime = Math.min(tidInterval.getEndTime() + 1, event.getTime() + event.getDuration());
- int xForEndTime = drawingHelper.getXForTime(endTime);
- if (xForEndTime > bounds.x) {
- int width = Math.min(xForEndTime, bounds.x + bounds.width) - x - 1;
- if (width > 0) {
- String attribute = null;
- int beginIndex = 0;
- if (status == StateValues.CPU_STATUS_RUN_USERMODE && currentThreadId != fLastThreadId) {
- attribute = Attributes.EXEC_NAME;
- } else if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
- attribute = Attributes.SYSTEM_CALL;
- beginIndex = 4; // skip the 'sys_'
- }
- if (attribute != null) {
- int quark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), attribute);
- ITmfStateInterval interval = ss.querySingleState(time, quark);
- if (!interval.getStateValue().isNull()) {
- value = interval.getStateValue();
- gc.setForeground(fColorWhite);
- int drawn = Utils.drawText(gc, value.unboxStr().substring(beginIndex), x + 1, bounds.y - 2, width, true, true);
- if (drawn > 0) {
- fLastThreadId = currentThreadId;
- }
- }
- }
- if (xForEndTime < bounds.x + bounds.width) {
- gc.setForeground(fColorGray);
- gc.drawLine(xForEndTime, bounds.y + 1, xForEndTime, bounds.y + bounds.height - 2);
- }
- }
- }
- }
- // make sure next time is at least at the next pixel
- time = Math.max(tidInterval.getEndTime() + 1, drawingHelper.getTimeAtX(x + 1));
- }
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- }
-
- @Override
- public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {
- fLastThreadId = -1;
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Patrick Tasse - Initial API and implementation
- * Geneviève Bastien - Move code to provide base classes for time graph views
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
-import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
-import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.views.timegraph.AbstractTimeGraphView;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.NullTimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
-import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
-
-/**
- * Main implementation for the LTTng 2.0 kernel Resource view
- *
- * @author Patrick Tasse
- */
-public class ResourcesView extends AbstractTimeGraphView {
-
- /** View ID. */
- public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"; //$NON-NLS-1$
-
- private static final String[] FILTER_COLUMN_NAMES = new String[] {
- Messages.ResourcesView_stateTypeName
- };
-
- // Timeout between updates in the build thread in ms
- private static final long BUILD_UPDATE_TIMEOUT = 500;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * Default constructor
- */
- public ResourcesView() {
- super(ID, new ResourcesPresentationProvider());
- setFilterColumns(FILTER_COLUMN_NAMES);
- }
-
- // ------------------------------------------------------------------------
- // Internal
- // ------------------------------------------------------------------------
-
- @Override
- protected String getNextText() {
- return Messages.ResourcesView_nextResourceActionNameText;
- }
-
- @Override
- protected String getNextTooltip() {
- return Messages.ResourcesView_nextResourceActionToolTipText;
- }
-
- @Override
- protected String getPrevText() {
- return Messages.ResourcesView_previousResourceActionNameText;
- }
-
- @Override
- protected String getPrevTooltip() {
- return Messages.ResourcesView_previousResourceActionToolTipText;
- }
-
- @Override
- protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
- if (trace == null) {
- return;
- }
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- return;
- }
- Comparator<ITimeGraphEntry> comparator = new Comparator<ITimeGraphEntry>() {
- @Override
- public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
- return ((ResourcesEntry) o1).compareTo(o2);
- }
- };
-
- Map<Integer, ResourcesEntry> entryMap = new HashMap<>();
- TimeGraphEntry traceEntry = null;
-
- long startTime = ssq.getStartTime();
- long start = startTime;
- setStartTime(Math.min(getStartTime(), startTime));
- boolean complete = false;
- while (!complete) {
- if (monitor.isCanceled()) {
- return;
- }
- complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
- if (ssq.isCancelled()) {
- return;
- }
- long end = ssq.getCurrentEndTime();
- if (start == end && !complete) { // when complete execute one last time regardless of end time
- continue;
- }
- long endTime = end + 1;
- setEndTime(Math.max(getEndTime(), endTime));
-
- if (traceEntry == null) {
- traceEntry = new ResourcesEntry(trace, trace.getName(), startTime, endTime, 0);
- traceEntry.sortChildren(comparator);
- List<TimeGraphEntry> entryList = Collections.singletonList(traceEntry);
- addToEntryList(parentTrace, entryList);
- } else {
- traceEntry.updateEndTime(endTime);
- }
-
- List<Integer> cpuQuarks = ssq.getQuarks(Attributes.CPUS, "*"); //$NON-NLS-1$
- for (Integer cpuQuark : cpuQuarks) {
- int cpu = Integer.parseInt(ssq.getAttributeName(cpuQuark));
- ResourcesEntry entry = entryMap.get(cpuQuark);
- if (entry == null) {
- entry = new ResourcesEntry(cpuQuark, trace, startTime, endTime, Type.CPU, cpu);
- entryMap.put(cpuQuark, entry);
- traceEntry.addChild(entry);
- } else {
- entry.updateEndTime(endTime);
- }
- }
- List<Integer> irqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
- for (Integer irqQuark : irqQuarks) {
- int irq = Integer.parseInt(ssq.getAttributeName(irqQuark));
- ResourcesEntry entry = entryMap.get(irqQuark);
- if (entry == null) {
- entry = new ResourcesEntry(irqQuark, trace, startTime, endTime, Type.IRQ, irq);
- entryMap.put(irqQuark, entry);
- traceEntry.addChild(entry);
- } else {
- entry.updateEndTime(endTime);
- }
- }
- List<Integer> softIrqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
- for (Integer softIrqQuark : softIrqQuarks) {
- int softIrq = Integer.parseInt(ssq.getAttributeName(softIrqQuark));
- ResourcesEntry entry = entryMap.get(softIrqQuark);
- if (entry == null) {
- entry = new ResourcesEntry(softIrqQuark, trace, startTime, endTime, Type.SOFT_IRQ, softIrq);
- entryMap.put(softIrqQuark, entry);
- traceEntry.addChild(entry);
- } else {
- entry.updateEndTime(endTime);
- }
- }
-
- if (parentTrace.equals(getTrace())) {
- refresh();
- }
- long resolution = Math.max(1, (endTime - ssq.getStartTime()) / getDisplayWidth());
- for (ITimeGraphEntry child : traceEntry.getChildren()) {
- if (monitor.isCanceled()) {
- return;
- }
- if (child instanceof TimeGraphEntry) {
- TimeGraphEntry entry = (TimeGraphEntry) child;
- List<ITimeEvent> eventList = getEventList(entry, start, endTime, resolution, monitor);
- if (eventList != null) {
- for (ITimeEvent event : eventList) {
- entry.addEvent(event);
- }
- }
- redraw();
- }
- }
-
- start = end;
- }
- }
-
- @Override
- protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry entry,
- long startTime, long endTime, long resolution,
- IProgressMonitor monitor) {
- ResourcesEntry resourcesEntry = (ResourcesEntry) entry;
- ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(resourcesEntry.getTrace(), LttngKernelAnalysisModule.ID);
- if (ssq == null) {
- return null;
- }
- final long realStart = Math.max(startTime, ssq.getStartTime());
- final long realEnd = Math.min(endTime, ssq.getCurrentEndTime() + 1);
- if (realEnd <= realStart) {
- return null;
- }
- List<ITimeEvent> eventList = null;
- int quark = resourcesEntry.getQuark();
-
- try {
- if (resourcesEntry.getType().equals(Type.CPU)) {
- int statusQuark = ssq.getQuarkRelative(quark, Attributes.STATUS);
- List<ITmfStateInterval> statusIntervals = ssq.queryHistoryRange(statusQuark, realStart, realEnd - 1, resolution, monitor);
- eventList = new ArrayList<>(statusIntervals.size());
- long lastEndTime = -1;
- for (ITmfStateInterval statusInterval : statusIntervals) {
- if (monitor.isCanceled()) {
- return null;
- }
- int status = statusInterval.getStateValue().unboxInt();
- long time = statusInterval.getStartTime();
- long duration = statusInterval.getEndTime() - time + 1;
- if (!statusInterval.getStateValue().isNull()) {
- if (lastEndTime != time && lastEndTime != -1) {
- eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
- }
- eventList.add(new TimeEvent(entry, time, duration, status));
- } else if (lastEndTime == -1 || time + duration >= endTime) {
- // add null event if it intersects the start or end time
- eventList.add(new NullTimeEvent(entry, time, duration));
- }
- lastEndTime = time + duration;
- }
- } else if (resourcesEntry.getType().equals(Type.IRQ)) {
- List<ITmfStateInterval> irqIntervals = ssq.queryHistoryRange(quark, realStart, realEnd - 1, resolution, monitor);
- eventList = new ArrayList<>(irqIntervals.size());
- long lastEndTime = -1;
- boolean lastIsNull = true;
- for (ITmfStateInterval irqInterval : irqIntervals) {
- if (monitor.isCanceled()) {
- return null;
- }
- long time = irqInterval.getStartTime();
- long duration = irqInterval.getEndTime() - time + 1;
- if (!irqInterval.getStateValue().isNull()) {
- int cpu = irqInterval.getStateValue().unboxInt();
- eventList.add(new TimeEvent(entry, time, duration, cpu));
- lastIsNull = false;
- } else {
- if (lastEndTime == -1) {
- // add null event if it intersects the start time
- eventList.add(new NullTimeEvent(entry, time, duration));
- } else {
- if (lastEndTime != time && lastIsNull) {
- /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
- eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
- }
- if (time + duration >= endTime) {
- // add null event if it intersects the end time
- eventList.add(new NullTimeEvent(entry, time, duration));
- }
- }
- lastIsNull = true;
- }
- lastEndTime = time + duration;
- }
- } else if (resourcesEntry.getType().equals(Type.SOFT_IRQ)) {
- List<ITmfStateInterval> softIrqIntervals = ssq.queryHistoryRange(quark, realStart, realEnd - 1, resolution, monitor);
- eventList = new ArrayList<>(softIrqIntervals.size());
- long lastEndTime = -1;
- boolean lastIsNull = true;
- for (ITmfStateInterval softIrqInterval : softIrqIntervals) {
- if (monitor.isCanceled()) {
- return null;
- }
- long time = softIrqInterval.getStartTime();
- long duration = softIrqInterval.getEndTime() - time + 1;
- if (!softIrqInterval.getStateValue().isNull()) {
- int cpu = softIrqInterval.getStateValue().unboxInt();
- eventList.add(new TimeEvent(entry, time, duration, cpu));
- } else {
- if (lastEndTime == -1) {
- // add null event if it intersects the start time
- eventList.add(new NullTimeEvent(entry, time, duration));
- } else {
- if (lastEndTime != time && lastIsNull) {
- /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
- eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
- }
- if (time + duration >= endTime) {
- // add null event if it intersects the end time
- eventList.add(new NullTimeEvent(entry, time, duration));
- }
- }
- lastIsNull = true;
- }
- lastEndTime = time + duration;
- }
- }
-
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- e.printStackTrace();
- } catch (StateSystemDisposedException e) {
- /* Ignored */
- }
- return eventList;
- }
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.kernel</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-bin.includes = feature.xml,\
- feature.properties,\
- p2.inf
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-
-
-
-
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Eclipse Public License - Version 1.0</title>
-
-<style type="text/css">
- body {
- size: 8.5in 11.0in;
- margin: 0.25in 0.5in 0.25in 0.5in;
- tab-interval: 0.5in;
- }
- p {
- margin-left: auto;
- margin-top: 0.5em;
- margin-bottom: 0.5em;
- }
- p.list {
- margin-left: 0.5in;
- margin-top: 0.05em;
- margin-bottom: 0.05em;
- }
- </style></head><body lang="EN-US">
-
-<p align="center"><b>Eclipse Public License - v 1.0</b></p>
-
-<p>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE
-PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS
-AGREEMENT.</p>
-
-<p><b>1. DEFINITIONS</b></p>
-
-<p>"Contribution" means:</p>
-
-<p class="list">a) in the case of the initial Contributor, the initial
-code and documentation distributed under this Agreement, and</p>
-<p class="list">b) in the case of each subsequent Contributor:</p>
-<p class="list">i) changes to the Program, and</p>
-<p class="list">ii) additions to the Program;</p>
-<p class="list">where such changes and/or additions to the Program
-originate from and are distributed by that particular Contributor. A
-Contribution 'originates' from a Contributor if it was added to the
-Program by such Contributor itself or anyone acting on such
-Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in
-conjunction with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.</p>
-
-<p>"Contributor" means any person or entity that distributes
-the Program.</p>
-
-<p>"Licensed Patents" mean patent claims licensable by a
-Contributor which are necessarily infringed by the use or sale of its
-Contribution alone or when combined with the Program.</p>
-
-<p>"Program" means the Contributions distributed in accordance
-with this Agreement.</p>
-
-<p>"Recipient" means anyone who receives the Program under
-this Agreement, including all Contributors.</p>
-
-<p><b>2. GRANT OF RIGHTS</b></p>
-
-<p class="list">a) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free copyright license to reproduce, prepare derivative works
-of, publicly display, publicly perform, distribute and sublicense the
-Contribution of such Contributor, if any, and such derivative works, in
-source code and object code form.</p>
-
-<p class="list">b) Subject to the terms of this Agreement, each
-Contributor hereby grants Recipient a non-exclusive, worldwide,
-royalty-free patent license under Licensed Patents to make, use, sell,
-offer to sell, import and otherwise transfer the Contribution of such
-Contributor, if any, in source code and object code form. This patent
-license shall apply to the combination of the Contribution and the
-Program if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to be covered
-by the Licensed Patents. The patent license shall not apply to any other
-combinations which include the Contribution. No hardware per se is
-licensed hereunder.</p>
-
-<p class="list">c) Recipient understands that although each Contributor
-grants the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe the
-patent or other intellectual property rights of any other entity. Each
-Contributor disclaims any liability to Recipient for claims brought by
-any other entity based on infringement of intellectual property rights
-or otherwise. As a condition to exercising the rights and licenses
-granted hereunder, each Recipient hereby assumes sole responsibility to
-secure any other intellectual property rights needed, if any. For
-example, if a third party patent license is required to allow Recipient
-to distribute the Program, it is Recipient's responsibility to acquire
-that license before distributing the Program.</p>
-
-<p class="list">d) Each Contributor represents that to its knowledge it
-has sufficient copyright rights in its Contribution, if any, to grant
-the copyright license set forth in this Agreement.</p>
-
-<p><b>3. REQUIREMENTS</b></p>
-
-<p>A Contributor may choose to distribute the Program in object code
-form under its own license agreement, provided that:</p>
-
-<p class="list">a) it complies with the terms and conditions of this
-Agreement; and</p>
-
-<p class="list">b) its license agreement:</p>
-
-<p class="list">i) effectively disclaims on behalf of all Contributors
-all warranties and conditions, express and implied, including warranties
-or conditions of title and non-infringement, and implied warranties or
-conditions of merchantability and fitness for a particular purpose;</p>
-
-<p class="list">ii) effectively excludes on behalf of all Contributors
-all liability for damages, including direct, indirect, special,
-incidental and consequential damages, such as lost profits;</p>
-
-<p class="list">iii) states that any provisions which differ from this
-Agreement are offered by that Contributor alone and not by any other
-party; and</p>
-
-<p class="list">iv) states that source code for the Program is available
-from such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for software
-exchange.</p>
-
-<p>When the Program is made available in source code form:</p>
-
-<p class="list">a) it must be made available under this Agreement; and</p>
-
-<p class="list">b) a copy of this Agreement must be included with each
-copy of the Program.</p>
-
-<p>Contributors may not remove or alter any copyright notices contained
-within the Program.</p>
-
-<p>Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.</p>
-
-<p><b>4. COMMERCIAL DISTRIBUTION</b></p>
-
-<p>Commercial distributors of software may accept certain
-responsibilities with respect to end users, business partners and the
-like. While this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-("Commercial Contributor") hereby agrees to defend and
-indemnify every other Contributor ("Indemnified Contributor")
-against any losses, damages and costs (collectively "Losses")
-arising from claims, lawsuits and other legal actions brought by a third
-party against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection with its
-distribution of the Program in a commercial product offering. The
-obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In
-order to qualify, an Indemnified Contributor must: a) promptly notify
-the Commercial Contributor in writing of such claim, and b) allow the
-Commercial Contributor to control, and cooperate with the Commercial
-Contributor in, the defense and any related settlement negotiations. The
-Indemnified Contributor may participate in any such claim at its own
-expense.</p>
-
-<p>For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor's responsibility
-alone. Under this section, the Commercial Contributor would have to
-defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any other
-Contributor to pay any damages as a result, the Commercial Contributor
-must pay those damages.</p>
-
-<p><b>5. NO WARRANTY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS
-PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with its
-exercise of rights under this Agreement , including but not limited to
-the risks and costs of program errors, compliance with applicable laws,
-damage to or loss of data, programs or equipment, and unavailability or
-interruption of operations.</p>
-
-<p><b>6. DISCLAIMER OF LIABILITY</b></p>
-
-<p>EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
-WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR
-DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
-HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
-
-<p><b>7. GENERAL</b></p>
-
-<p>If any provision of this Agreement is invalid or unenforceable under
-applicable law, it shall not affect the validity or enforceability of
-the remainder of the terms of this Agreement, and without further action
-by the parties hereto, such provision shall be reformed to the minimum
-extent necessary to make such provision valid and enforceable.</p>
-
-<p>If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging that the
-Program itself (excluding combinations of the Program with other
-software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the
-date such litigation is filed.</p>
-
-<p>All Recipient's rights under this Agreement shall terminate if it
-fails to comply with any of the material terms or conditions of this
-Agreement and does not cure such failure in a reasonable period of time
-after becoming aware of such noncompliance. If all Recipient's rights
-under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive.</p>
-
-<p>Everyone is permitted to copy and distribute copies of this
-Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The
-Agreement Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other than the
-Agreement Steward has the right to modify this Agreement. The Eclipse
-Foundation is the initial Agreement Steward. The Eclipse Foundation may
-assign the responsibility to serve as the Agreement Steward to a
-suitable separate entity. Each new version of the Agreement will be
-given a distinguishing version number. The Program (including
-Contributions) may always be distributed subject to the version of the
-Agreement under which it was received. In addition, after a new version
-of the Agreement is published, Contributor may elect to distribute the
-Program (including its Contributions) under the new version. Except as
-expressly stated in Sections 2(a) and 2(b) above, Recipient receives no
-rights or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under this
-Agreement are reserved.</p>
-
-<p>This Agreement is governed by the laws of the State of New York and
-the intellectual property laws of the United States of America. No party
-to this Agreement will bring a legal action under this Agreement more
-than one year after the cause of action arose. Each party waives its
-rights to a jury trial in any resulting litigation.</p>
-
-</body></html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2009, 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-featureName=LTTng Kernel Analysis
-
-description=Plug-ins to integrate LTTng kernel analysis tools into the workbench. \
-Includes the LTTng (Linux Tracing Toolkit), TMF (Tracing and Monitoring Framework) \
-and CTF (Common Trace Format) features.
-
-featureProvider=Eclipse Linux Tools
-
-copyright=Copyright 2013 Ericsson
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- For PDE build, remove "ws" and "arch" -->
-<feature
- id="org.eclipse.linuxtools.lttng2.kernel"
- label="%featureName"
- version="3.2.0.qualifier"
- provider-name="%featureProvider"
- license-feature="org.eclipse.license"
- license-feature-version="0.0.0">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="Linux Tools Update Site" url="http://download.eclipse.org/linuxtools/update"/>
- </url>
-
- <includes
- id="org.eclipse.linuxtools.lttng2.control"
- version="0.0.0"
- name="Linux Tracing Toolkit next generation (LTTng)"/>
-
- <includes
- id="org.eclipse.linuxtools.tmf.ctf"
- version="0.0.0"
- name="CTF Support for TMF"/>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.tracecompass.ctf.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.tmf.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.linuxtools.tmf.ui" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.lttng2.control.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.lttng2.control.ui" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.lttng2.kernel.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.help"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.lttng2.kernel.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.lttng2.kernel.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.lttng.help"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
+++ /dev/null
-<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"><head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>February 1, 2011</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse
- Foundation is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0
- ("EPL"). A copy of the EPL is provided with this Content and is also
- available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code,
-documentation and other files maintained in the Eclipse Foundation
-source code
- repository ("Repository") in software modules ("Modules") and made
-available as downloadable archives ("Downloads").</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to
-facilitate delivering, extending, and upgrading the Content. Typical
-modules may include plug-ins ("Plug-ins"), plug-in fragments
-("Fragments"), and features ("Features").</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or
-Fragments and associated material. Each Feature may be packaged as a
-sub-directory in a directory named "features". Within a Feature, files
-named "feature.xml" may contain a list of the names and version numbers
-of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features ("Included
-Features"). Within a Feature, files named "feature.xml" may contain a
-list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be
-contained in files named "about.html" ("Abouts"). The terms and
-conditions governing Features and
-Included Features should be contained in files named "license.html"
-("Feature Licenses"). Abouts and Feature Licenses may be located in any
- directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named "src" of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is
-installed using the Provisioning Technology (as defined below), you must
- agree to a license ("Feature Update License") during the
-installation process. If the Feature contains Included Features, the
-Feature Update License should either provide you with the terms and
-conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be
-found in the "license" property of files named "feature.properties"
-found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the
-terms and conditions (or references to such terms and conditions) that
-govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
-TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
- SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
-CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
-or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions
-govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software,
-examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager ("Provisioning Technology") for the purpose of
-allowing users to install software, documentation, information and/or
- other materials (collectively "Installable Software"). This
-capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about
-packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- ("Specification").</p>
-
-<p>You may use Provisioning Technology to allow other parties to install
- Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to
- be presented to, and accepted by, the users of the Provisioning
-Technology
- in accordance with the Specification. By using Provisioning
-Technology in such a manner and making it available in accordance with
-the
- Specification, you further acknowledge your agreement to, and the
-acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur ("Provisioning Process") in
-which a user may execute the Provisioning Technology
- on a machine ("Target Machine") with the intent of installing,
-extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology
-may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user
-the terms and conditions that govern the use of the Installable
- Software ("Installable Software Agreement") and such Installable
-Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable
-Software Agreement must inform the user of the terms and conditions that
- govern
- the Installable Software and must solicit acceptance by the end
-user in the manner prescribed in such Installable Software Agreement.
-Upon such
- indication of agreement by the user, the provisioning Technology
-will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are
- currently may have restrictions on the import, possession, and use,
-and/or re-export to
- another country, of encryption software. BEFORE using any encryption
-software, please check the country's laws, regulations and policies
-concerning the import,
- possession, or use, and re-export of encryption software, to see if
-this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-
-
-</body></html>
\ No newline at end of file
+++ /dev/null
-instructions.configure=\
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, Red Hat, Inc.
-
- 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.kernel</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
-
- <name>Linux Tools LTTng Kernel Analysis Feature</name>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- <configuration>
- <excludes>
- <plugin id="org.eclipse.linuxtools.lttng.help"/>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attached-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.ust.core.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.ust.core.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.tmf.core,
- org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core,
- org.eclipse.linuxtools.tmf.ctf.core.tests,
- org.eclipse.linuxtools.lttng2.ust.core,
- org.eclipse.linuxtools.lttng2.control.core
-Export-Package: org.eclipse.linuxtools.lttng2.ust.core.tests,
- org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack
-Import-Package: com.google.common.collect
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties
-src.includes = about.html
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.ust.core
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Userspace Tracer Analysis Core Tests Plug-in
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, 2013 Red Hat Inc., 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.ust.core.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Userspace Tracer Analysis Core Test Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <useUIHarness>false</useUIHarness>
- <useUIThread>false</useUIThread>
- <product>org.eclipse.platform.ide</product>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests;
-
-import junit.framework.TestCase;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * <b><u>ActivatorTest</u></b>
- * <p>
- * Test suite for the Activator class
- * <p>
- */
-@SuppressWarnings("javadoc")
-public class ActivatorTest extends TestCase {
-
- // ------------------------------------------------------------------------
- // JUnit
- // ------------------------------------------------------------------------
-
- @BeforeClass
- public static void setUpBeforeClass() {
- }
-
- @AfterClass
- public static void tearDownAfterClass() {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @Before
- @Override
- public void setUp() throws Exception {
- }
-
- /**
- * @throws java.lang.Exception
- */
- @After
- @Override
- public void tearDown() throws Exception {
- }
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#Activator()}.
- */
- @Test
- public void testActivator() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#getDefault()}.
- */
- @Test
- public void testGetDefault() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#start(org.osgi.framework.BundleContext)}.
- */
- @Test
- public void testStartBundleContext() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#stop(org.osgi.framework.BundleContext)}.
- */
- @Test
- public void testStopBundleContext() {
- assertTrue(true);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runner for the lttng2.kernel unit tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ActivatorTest.class,
- org.eclipse.linuxtools.lttng2.ust.core.tests.analysis.memory.AllTests.class,
- org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack.AllTests.class
-})
-public class AllTests { }
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests.analysis.memory;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- UstMemoryAnalysisModuleTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests.analysis.memory;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Set;
-
-import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.UstMemoryStrings;
-import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
-import org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.UstMemoryAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * Tests for the {@link UstMemoryAnalysisModule}
- *
- * @author Guilliano Molaire
- */
-public class UstMemoryAnalysisModuleTest {
-
- /** The analysis module */
- private UstMemoryAnalysisModule fUstAnalysisModule;
-
- /**
- * Set-up the test
- */
- @Before
- public void setup() {
- fUstAnalysisModule = new UstMemoryAnalysisModule();
- }
-
- /**
- * Test for {@link UstMemoryAnalysisModule#getAnalysisRequirements()}
- */
- @Test
- public void testGetAnalysisRequirements() {
- Iterable<TmfAnalysisRequirement> requirements = fUstAnalysisModule.getAnalysisRequirements();
- assertNotNull(requirements);
- assertTrue(requirements.iterator().hasNext());
-
- /* There should be the event and domain type */
- TmfAnalysisRequirement eventReq = null;
- TmfAnalysisRequirement domainReq = null;
- int numberOfRequirement = 0;
- for (TmfAnalysisRequirement requirement : requirements) {
- ++numberOfRequirement;
- if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_EVENT)) {
- eventReq = requirement;
- } else if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN)) {
- domainReq = requirement;
- }
- }
- assertNotNull(eventReq);
- assertNotNull(domainReq);
-
- /* There should be two requirements */
- assertEquals(2, numberOfRequirement);
-
- /* Verify the content of the requirements themselves */
- /* Domain should be kernel */
- assertEquals(1, domainReq.getValues().size());
- for (String domain : domainReq.getValues()) {
- assertEquals(SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST, domain);
- }
-
- /* Events */
- Set<String> expectedEvents = ImmutableSet.of(
- UstMemoryStrings.MALLOC,
- UstMemoryStrings.FREE,
- UstMemoryStrings.CALLOC,
- UstMemoryStrings.REALLOC,
- UstMemoryStrings.MEMALIGN,
- UstMemoryStrings.POSIX_MEMALIGN
- );
-
- assertEquals(6, eventReq.getValues().size());
- for (String event : eventReq.getValues()) {
- assertTrue("Unexpected event " + event, expectedEvents.contains(event));
- }
-
- Set<String> infos = eventReq.getInformation();
- assertEquals(2, infos.size());
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack.LttngUstCallStackProvider;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TestRule;
-import org.junit.rules.Timeout;
-
-/**
- * Base class for the UST callstack state provider tests.
- *
- * @author Alexandre Montplaisir
- */
-public abstract class AbstractProviderTest {
-
- /** Time-out tests after 20 seconds */
- @Rule public TestRule globalTimeout= new Timeout(20000);
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- private static final CtfTmfTestTrace otherUstTrace = CtfTmfTestTrace.HELLO_LOST;
-
- private CtfTmfTrace fTrace = null;
- private ITmfStateSystem fSS = null;
- private TestLttngCallStackModule fModule;
-
-
- // ------------------------------------------------------------------------
- // Abstract methods
- // ------------------------------------------------------------------------
-
- /**
- * @return The test trace to use for this test
- */
- protected abstract CtfTmfTestTrace getTestTrace();
-
- /**
- * @return The name of the executable process in that particular trace
- */
- protected abstract String getProcName();
-
- /**
- * Get the list of timestamps to query in that trace.
- *
- * @param index
- * Which of the test timestamps?
- * @return That particular timestamp
- */
- protected abstract long getTestTimestamp(int index);
-
- // ------------------------------------------------------------------------
- // Maintenance
- // ------------------------------------------------------------------------
-
- /**
- * Perform pre-class initialization.
- */
- @Before
- public void setUp() {
- CtfTmfTestTrace testTrace = getTestTrace();
-
- fTrace = testTrace.getTrace();
- fModule = new TestLttngCallStackModule();
- try {
- fModule.setTrace(fTrace);
- } catch (TmfAnalysisException e) {
- fail();
- }
- fModule.schedule();
- assertTrue(fModule.waitForCompletion());
-
- fSS = fModule.getStateSystem();
- assertNotNull(fSS);
- }
-
- /**
- * Perform post-class clean-up.
- */
- @After
- public void tearDown() {
- fModule.close();
- if (fTrace != null) {
- fTrace.dispose();
- File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(fTrace));
- deleteDirectory(suppDir);
- }
- }
-
- // ------------------------------------------------------------------------
- // Test methods
- // ------------------------------------------------------------------------
-
- /**
- * Test the handling of generic UST traces who do not contain the required
- * information.
- */
- @Test
- public void testOtherUstTrace() {
- /* Initialize the trace and analysis module */
- File suppDir;
- try (CtfTmfTrace ustTrace = otherUstTrace.getTrace();) {
- try (TestLttngCallStackModule module = new TestLttngCallStackModule();) {
- try {
- module.setTrace(ustTrace);
- } catch (TmfAnalysisException e) {
- fail();
- }
- module.schedule();
- assertTrue(module.waitForCompletion());
-
- /* Make sure the generated state system exists, but is empty */
- ITmfStateSystem ss = module.getStateSystem();
- assertNotNull(ss);
- assertTrue(ss.getStartTime() >= ustTrace.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue());
- assertEquals(0, ss.getNbAttributes());
- }
- suppDir = new File(TmfTraceManager.getSupplementaryFileDir(ustTrace));
- }
- deleteDirectory(suppDir);
- assertFalse(suppDir.exists());
- }
-
- /**
- * Test that the callstack state system is there and contains data.
- */
- @Test
- public void testConstruction() {
- assertNotNull(fSS);
- assertTrue(fSS.getNbAttributes() > 0);
- }
-
- /**
- * Test the callstack at the beginning of the state system.
- */
- @Test
- public void testCallStackBegin() {
- long start = fSS.getStartTime();
- String[] cs = getCallStack(fSS, getProcName(), start);
- assertEquals(1, cs.length);
-
- assertEquals("40472b", cs[0]);
- }
-
- /**
- * Test the callstack somewhere in the trace.
- */
- @Test
- public void testCallStack1() {
- String[] cs = getCallStack(fSS, getProcName(), getTestTimestamp(0));
- assertEquals(2, cs.length);
-
- assertEquals("40472b", cs[0]);
- assertEquals("403d60", cs[1]);
- }
-
- /**
- * Test the callstack somewhere in the trace.
- */
- @Test
- public void testCallStack2() {
- String[] cs = getCallStack(fSS, getProcName(), getTestTimestamp(1));
- assertEquals(3, cs.length);
-
- assertEquals("40472b", cs[0]);
- assertEquals("403b14", cs[1]);
- assertEquals("401b23", cs[2]);
- }
-
- /**
- * Test the callstack somewhere in the trace.
- */
- @Test
- public void testCallStack3() {
- String[] cs = getCallStack(fSS, getProcName(), getTestTimestamp(2));
- assertEquals(4, cs.length);
-
- assertEquals("40472b", cs[0]);
- assertEquals("4045c8", cs[1]);
- assertEquals("403760", cs[2]);
- assertEquals("401aac", cs[3]);
- }
-
- /**
- * Test the callstack at the end of the trace/state system.
- */
- @Test
- public void testCallStackEnd() {
- long end = fSS.getCurrentEndTime();
- String[] cs = getCallStack(fSS, getProcName(), end);
- assertEquals(3, cs.length);
-
- assertEquals("40472b", cs[0]);
- assertEquals("4045c8", cs[1]);
- assertEquals("403760", cs[2]);
- }
-
- // ------------------------------------------------------------------------
- // Utility methods
- // ------------------------------------------------------------------------
-
- /** Empty and delete a directory */
- private static void deleteDirectory(File dir) {
- /* Assuming the dir only contains file or empty directories */
- for (File file : dir.listFiles()) {
- file.delete();
- }
- dir.delete();
- }
-
- /** Get the callstack for the given timestamp, for this particular trace */
- private static String[] getCallStack(ITmfStateSystem ss, String processName, long timestamp) {
- try {
- int stackAttribute = ss.getQuarkAbsolute("Threads", processName, "CallStack");
- List<ITmfStateInterval> state = ss.queryFullState(timestamp);
- int depth = state.get(stackAttribute).getStateValue().unboxInt();
-
- int stackTop = ss.getQuarkRelative(stackAttribute, String.valueOf(depth));
- ITmfStateValue top = state.get(stackTop).getStateValue();
- assertEquals(top, ss.querySingleStackTop(timestamp, stackAttribute).getStateValue());
-
- String[] ret = new String[depth];
- for (int i = 0; i < depth; i++) {
- int quark = ss.getQuarkRelative(stackAttribute, String.valueOf(i + 1));
- ret[i] = state.get(quark).getStateValue().unboxStr();
- }
- return ret;
-
- } catch (AttributeNotFoundException e) {
- fail(e.getMessage());
- } catch (StateSystemDisposedException e) {
- fail(e.getMessage());
- }
- fail();
- return null;
- }
-
- private class TestLttngCallStackModule extends TmfStateSystemAnalysisModule {
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngUstCallStackProvider(getTrace());
- }
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- LttngUstCallStackProviderFastTest.class,
- LttngUstCallStackProviderTest.class
-})
-public class AllTests {
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
-
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.BeforeClass;
-
-/**
- * Test suite for the UST callstack state provider, using the trace of a program
- * instrumented with lttng-ust-cyg-profile-fast.so tracepoints. These do not
- * contain the function addresses in the func_exit events.
- *
- * @author Alexandre Montplaisir
- */
-public class LttngUstCallStackProviderFastTest extends AbstractProviderTest {
-
- private static final long[] timestamps = { 1379361250310000000L,
- 1379361250498400000L,
- 1379361250499759000L };
-
- /**
- * Class setup
- */
- @BeforeClass
- public static void setUpClass() {
- assumeTrue(CtfTmfTestTrace.CYG_PROFILE_FAST.exists());
- }
-
- @Override
- protected CtfTmfTestTrace getTestTrace() {
- return CtfTmfTestTrace.CYG_PROFILE_FAST;
- }
-
- @Override
- protected String getProcName() {
- return "glxgears-29822";
- }
-
- @Override
- protected long getTestTimestamp(int index) {
- return timestamps[index];
- }
-
-}
\ No newline at end of file
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
-
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
-import org.junit.BeforeClass;
-
-/**
- * Test suite for the UST callstack state provider, using the trace of a program
- * instrumented with lttng-ust-cyg-profile.so tracepoints.
- *
- * @author Alexandre Montplaisir
- */
-public class LttngUstCallStackProviderTest extends AbstractProviderTest {
-
- private static final long[] timestamps = { 1378850463600000000L,
- 1378850463770000000L,
- 1378850463868753000L };
-
- /**
- * Class setup
- */
- @BeforeClass
- public static void setUpClass() {
- assumeTrue(CtfTmfTestTrace.CYG_PROFILE.exists());
- }
-
- @Override
- protected CtfTmfTestTrace getTestTrace() {
- return CtfTmfTestTrace.CYG_PROFILE;
- }
-
- @Override
- protected String getProcName() {
- return "glxgears-16073";
- }
-
- @Override
- protected long getTestTimestamp(int index) {
- return timestamps[index];
- }
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.ust.core</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.ust.core;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.ust.core.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Export-Package: org.eclipse.linuxtools.internal.lttng2.ust.core;x-internal:=true,
- org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage;x-friends:="org.eclipse.linuxtools.lttng2.ust.ui,org.eclipse.linuxtools.lttng2.ust.core.tests",
- org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack;x-friends:="org.eclipse.linuxtools.lttng2.ust.ui,org.eclipse.linuxtools.lttng2.ust.core.tests",
- org.eclipse.linuxtools.lttng2.ust.core.analysis.memory,
- org.eclipse.linuxtools.lttng2.ust.core.trace
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.tracecompass.ctf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core,
- org.eclipse.linuxtools.lttng2.control.core
-Import-Package: com.google.common.collect
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- about.html,\
- plugin.properties,\
- plugin.xml
-src.includes = about.html
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.ust.core
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Userspace Tracer Analysis Core Plug-in
-
-tracetype.type.ust = LTTng UST Trace
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.linuxtools.tmf.core.tracetype">
- <type
- category="org.eclipse.linuxtools.tmf.ctf.core.category.ctf"
- event_type="org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent"
- id="org.eclipse.linuxtools.lttng2.ust.tracetype"
- isDirectory="true"
- name="%tracetype.type.ust"
- trace_type="org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace">
- </type>
- </extension>
- <extension
- point="org.eclipse.linuxtools.tmf.core.analysis">
- <module
- analysis_module="org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.UstMemoryAnalysisModule"
- id="org.eclipse.linuxtools.lttng2.ust.analysis.memory"
- name="Ust Memory">
- <tracetype
- class="org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace">
- </tracetype>
- </module>
- </extension>
-</plugin>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, 2013 Red Hat Inc., 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.ust.core</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools LTTng Userspace Tracer Analysis Core Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * <b><u>Activator</u></b>
- * <p>
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends Plugin {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.ust.core"; //$NON-NLS-1$
-
- /**
- * The shared instance
- */
- private static Activator plugin;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ------------------------------------------------------------------------
- // Operators
- // ------------------------------------------------------------------------
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logInfo(String message) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logInfo(String message, Throwable exception) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logWarning(String message) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logWarning(String message, Throwable exception) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logError(String message) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logError(String message, Throwable exception) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Matthew Khouzam - Initial API and implementation
- * Geneviève Bastien - Memory is per thread and only total is kept
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
-
-/**
- * State provider to track the memory of the threads using the UST libc wrapper
- * memory events.
- *
- * @author Matthew Khouzam
- * @author Geneviève Bastien
- */
-public class MemoryUsageStateProvider extends AbstractTmfStateProvider {
-
- /* Version of this state provider */
- private static final int VERSION = 1;
-
- /* Maps a pointer to a memory zone to the size of the memory */
- private final Map<Long, Long> fMemory = new HashMap<>();
-
- private static final Long MINUS_ONE = Long.valueOf(-1);
- private static final Long ZERO = Long.valueOf(0);
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
- /**
- * Constructor
- *
- * @param trace
- * trace
- */
- public MemoryUsageStateProvider(LttngUstTrace trace) {
- super(trace, CtfTmfEvent.class, "Ust:Memory"); //$NON-NLS-1$
- }
-
- @Override
- protected void eventHandle(ITmfEvent event) {
- String name = event.getType().getName();
- switch (name) {
- case UstMemoryStrings.MALLOC: {
- Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
- if (ZERO.equals(ptr)) {
- return;
- }
- Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
- setMem(event, ptr, size);
- }
- break;
- case UstMemoryStrings.FREE: {
- Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
- if (ZERO.equals(ptr)) {
- return;
- }
- setMem(event, ptr, ZERO);
- }
- break;
- case UstMemoryStrings.CALLOC: {
- Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
- if (ZERO.equals(ptr)) {
- return;
- }
- Long nmemb = (Long) event.getContent().getField(UstMemoryStrings.FIELD_NMEMB).getValue();
- Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
- setMem(event, ptr, size * nmemb);
- }
- break;
- case UstMemoryStrings.REALLOC: {
- Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
- if (ZERO.equals(ptr)) {
- return;
- }
- Long newPtr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_INPTR).getValue();
- Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
- setMem(event, ptr, ZERO);
- setMem(event, newPtr, size);
- }
- break;
- case UstMemoryStrings.MEMALIGN: {
- Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
- if (ZERO.equals(ptr)) {
- return;
- }
- Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
- setMem(event, ptr, size);
- }
- break;
- case UstMemoryStrings.POSIX_MEMALIGN: {
- Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_OUTPTR).getValue();
- if (ZERO.equals(ptr)) {
- return;
- }
- Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
- setMem(event, ptr, size);
- }
- break;
- default:
- break;
- }
-
- }
-
- @Override
- public ITmfStateProvider getNewInstance() {
- return new MemoryUsageStateProvider(getTrace());
- }
-
- @Override
- public LttngUstTrace getTrace() {
- return (LttngUstTrace) super.getTrace();
- }
-
- @Override
- public int getVersion() {
- return VERSION;
- }
-
- private static Long getVtid(ITmfEvent event) {
- ITmfEventField field = event.getContent().getField(UstMemoryStrings.CONTEXT_VTID);
- if (field == null) {
- return MINUS_ONE;
- }
- return (Long) field.getValue();
- }
-
- private static String getProcname(ITmfEvent event) {
- ITmfEventField field = event.getContent().getField(UstMemoryStrings.CONTEXT_PROCNAME);
- if (field == null) {
- return EMPTY_STRING;
- }
- return (String) field.getValue();
- }
-
- private void setMem(ITmfEvent event, Long ptr, Long size) {
- long ts = event.getTimestamp().getValue();
- Long tid = getVtid(event);
-
- Long memoryDiff = size;
- /* Size is 0, it means it was deleted */
- if (ZERO.equals(size)) {
- Long memSize = fMemory.remove(ptr);
- if (memSize == null) {
- return;
- }
- memoryDiff = -memSize;
- } else {
- fMemory.put(ptr, size);
- }
- try {
- int tidQuark = ss.getQuarkAbsoluteAndAdd(tid.toString());
- int tidMemQuark = ss.getQuarkRelativeAndAdd(tidQuark, UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE);
-
- ITmfStateValue prevMem = ss.queryOngoingState(tidMemQuark);
- /* First time we set this value */
- if (prevMem.isNull()) {
- int procNameQuark = ss.getQuarkRelativeAndAdd(tidQuark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE);
- String procName = getProcname(event);
- /*
- * No tid/procname for the event for the event, added to a
- * 'others' thread
- */
- if (tid.equals(MINUS_ONE)) {
- procName = UstMemoryStrings.OTHERS;
- }
- ss.modifyAttribute(ts, TmfStateValue.newValueString(procName), procNameQuark);
- prevMem = TmfStateValue.newValueLong(0);
- }
-
- long prevMemValue = prevMem.unboxLong();
- prevMemValue += memoryDiff.longValue();
- ss.modifyAttribute(ts, TmfStateValue.newValueLong(prevMemValue), tidMemQuark);
- } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
- throw new IllegalStateException(e);
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Matthew Khouzam, Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage;
-
-/**
- * Strings for the memory usage state system using the LTTng UST libc
- * instrumentation
- *
- * @author Matthew Khouzam
- * @author Geneviève Bastien
- */
-@SuppressWarnings({ "nls", "javadoc" })
-public interface UstMemoryStrings {
-
- /** Memory state system attribute name */
- static final String UST_MEMORY_MEMORY_ATTRIBUTE = "Memory"; //$NON-NLS-1$
- /** Procname state system attribute name */
- static final String UST_MEMORY_PROCNAME_ATTRIBUTE = "Procname"; //$NON-NLS-1$
- /** Name of the attribute to store memory usage of events with no context */
- static final String OTHERS = "Others";
-
- /* UST_libc event names */
- static final String MALLOC = "ust_libc:malloc";
- static final String CALLOC = "ust_libc:calloc";
- static final String REALLOC = "ust_libc:realloc";
- static final String FREE = "ust_libc:free";
- static final String MEMALIGN = "ust_libc:memalign";
- static final String POSIX_MEMALIGN = "ust_libc:posix_memalign";
-
- /* Possible contexts */
- static final String CONTEXT_VTID = "context._vtid";
- static final String CONTEXT_PROCNAME = "context._procname";
-
- /* Event fields */
- static final String FIELD_PTR = "ptr";
- static final String FIELD_NMEMB = "nmemb";
- static final String FIELD_SIZE = "size";
- static final String FIELD_OUTPTR = "out_ptr";
- static final String FIELD_INPTR = "in_ptr";
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013, 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- * Patrick Tasse - Add support for thread id
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.eclipse.linuxtools.tmf.core.callstack.CallStackStateProvider;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
-
-/**
- * Callstack provider for LTTng-UST traces.
- *
- * If the traces contains 'func_entry' and 'func_exit' event (see the
- * lttng-ust-cyg-profile manpage), AND contains vtid and procname contexts, we
- * can use this information to populate the TMF Callstack View.
- *
- * Granted, most UST traces will not contain this information. In this case,
- * this will simply build an empty state system, and the view will remain
- * unavailable.
- *
- * @author Alexandre Montplaisir
- */
-public class LttngUstCallStackProvider extends CallStackStateProvider {
-
- // ------------------------------------------------------------------------
- // Event strings
- // ------------------------------------------------------------------------
-
- /** Name of the fake field for the vtid contexts */
- private static final String CONTEXT_VTID = "context._vtid"; //$NON-NLS-1$
-
- /** Name of the fake field for the procname context */
- private static final String CONTEXT_PROCNAME = "context._procname"; //$NON-NLS-1$
-
- /** Field name for the target function address */
- private static final String FIELD_ADDR = "addr"; //$NON-NLS-1$
-
- /** Event names indicating function entry */
- private static final Set<String> FUNC_ENTRY_EVENTS = new HashSet<>();
-
- /** Event names indicating function exit */
- private static final Set<String> FUNC_EXIT_EVENTS = new HashSet<>();
-
- static {
- /* This seems overkill, but it will be checked every event. Gotta go FAST! */
- FUNC_ENTRY_EVENTS.add("lttng_ust_cyg_profile:func_entry"); //$NON-NLS-1$
- FUNC_ENTRY_EVENTS.add("lttng_ust_cyg_profile_fast:func_entry"); //$NON-NLS-1$
-
- FUNC_EXIT_EVENTS.add("lttng_ust_cyg_profile:func_exit"); //$NON-NLS-1$
- FUNC_EXIT_EVENTS.add("lttng_ust_cyg_profile_fast:func_exit"); //$NON-NLS-1$
- }
-
- /**
- * Version number of this state provider. Please bump this if you modify
- * the contents of the generated state history in some way.
- */
- private static final int VERSION = 2;
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Constructor
- *
- * @param trace
- * The UST trace
- */
- public LttngUstCallStackProvider(ITmfTrace trace) {
- super(trace);
- }
-
- // ------------------------------------------------------------------------
- // Methods from AbstractTmfStateProvider
- // ------------------------------------------------------------------------
-
- @Override
- public LttngUstCallStackProvider getNewInstance() {
- return new LttngUstCallStackProvider(getTrace());
- }
-
- @Override
- public int getVersion() {
- return VERSION;
- }
-
- // ------------------------------------------------------------------------
- // Methods from CallStackStateProvider
- // ------------------------------------------------------------------------
-
- /**
- * Check that this event contains the required information we need to be
- * used in the call stack view. We need at least the "procname" and "vtid"
- * contexts.
- */
- @Override
- protected boolean considerEvent(ITmfEvent event) {
- if (!(event instanceof CtfTmfEvent)) {
- return false;
- }
- ITmfEventField content = ((CtfTmfEvent) event).getContent();
- if (content.getField(CONTEXT_VTID) == null ||
- content.getField(CONTEXT_PROCNAME) == null) {
- return false;
- }
- return true;
- }
-
- @Override
- public String functionEntry(ITmfEvent event) {
- String eventName = event.getType().getName();
- if (!FUNC_ENTRY_EVENTS.contains(eventName)) {
- return null;
- }
- Long address = (Long) event.getContent().getField(FIELD_ADDR).getValue();
- return Long.toHexString(address);
- }
-
- @Override
- public String functionExit(ITmfEvent event) {
- String eventName = event.getType().getName();
- if (!FUNC_EXIT_EVENTS.contains(eventName)) {
- return null;
- }
- /*
- * The 'addr' field may or may not be present in func_exit events,
- * depending on if cyg-profile.so or cyg-profile-fast.so was used.
- */
- ITmfEventField field = event.getContent().getField(FIELD_ADDR);
- if (field == null) {
- return CallStackStateProvider.UNDEFINED;
- }
- Long address = (Long) field.getValue();
- return Long.toHexString(address);
- }
-
- @Override
- public String getThreadName(ITmfEvent event) {
- /* Class type and content was already checked if we get called here */
- ITmfEventField content = ((CtfTmfEvent) event).getContent();
- String procName = (String) content.getField(CONTEXT_PROCNAME).getValue();
- Long vtid = (Long) content.getField(CONTEXT_VTID).getValue();
-
- if (procName == null || vtid == null) {
- throw new IllegalStateException();
- }
-
- return new String(procName + '-' + vtid.toString());
- }
-
- @Override
- protected Long getThreadId(ITmfEvent event) {
- ITmfEventField content = ((CtfTmfEvent) event).getContent();
- return (Long) content.getField(CONTEXT_VTID).getValue();
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Guilliano Molaire - Initial API and implementation
- *******************************************************************************/
-package org.eclipse.linuxtools.lttng2.ust.core.analysis.memory;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message bundle for the ust memory analysis module
- *
- * @author Guilliano Molaire
- * @since 3.0
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.messages"; //$NON-NLS-1$
-
- /** Information regarding events loading prior to the analysis execution */
- public static String UstMemoryAnalysisModule_EventsLoadingInformation;
-
- /** Example of how to execute the application with the libc wrapper */
- public static String UstMemoryAnalysisModule_EventsLoadingExampleInformation;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- * Guilliano Molaire - Provide the requirements of the analysis
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.analysis.memory;
-
-import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.MemoryUsageStateProvider;
-import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.UstMemoryStrings;
-import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
-import org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace;
-import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
-import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement.ValuePriorityLevel;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-
-import com.google.common.collect.ImmutableSet;
-
-/**
- * This analysis build a state system from the libc memory instrumentation on a
- * UST trace
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class UstMemoryAnalysisModule extends TmfStateSystemAnalysisModule {
-
- /**
- * Analysis ID, it should match that in the plugin.xml file
- */
- public static String ID = "org.eclipse.linuxtools.lttng2.ust.analysis.memory"; //$NON-NLS-1$
-
- private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of(
- UstMemoryStrings.MALLOC,
- UstMemoryStrings.FREE,
- UstMemoryStrings.CALLOC,
- UstMemoryStrings.REALLOC,
- UstMemoryStrings.MEMALIGN,
- UstMemoryStrings.POSIX_MEMALIGN
- );
-
- /** The requirements as an immutable set */
- private static final ImmutableSet<TmfAnalysisRequirement> REQUIREMENTS;
-
- static {
- /* Initialize the requirements for the analysis: domain and events */
- TmfAnalysisRequirement eventsReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
- /*
- * In order to have these events, the libc wrapper with probes should be
- * loaded
- */
- eventsReq.addInformation(Messages.UstMemoryAnalysisModule_EventsLoadingInformation);
- eventsReq.addInformation(Messages.UstMemoryAnalysisModule_EventsLoadingExampleInformation);
-
- /* The domain type of the analysis */
- TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
- domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST, ValuePriorityLevel.MANDATORY);
-
- REQUIREMENTS = ImmutableSet.of(domainReq, eventsReq);
- }
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new MemoryUsageStateProvider(getTrace());
- }
-
- @Override
- public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
- if (!(trace instanceof LttngUstTrace)) {
- throw new IllegalStateException("UstMemoryAnalysisModule: trace should be of type LttngUstTrace"); //$NON-NLS-1$
- }
- super.setTrace(trace);
- }
-
- @Override
- protected LttngUstTrace getTrace() {
- return (LttngUstTrace) super.getTrace();
- }
-
- @Override
- public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
- return REQUIREMENTS;
- }
-}
+++ /dev/null
-UstMemoryAnalysisModule_EventsLoadingInformation=The libc wrapper should be loaded in order to get the events in the trace output.
-UstMemoryAnalysisModule_EventsLoadingExampleInformation=Start the application to trace with: LD_PRELOAD=/path/to/liblttng-ust-libc-wrapper.so ./myProgram.
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2013, 2014 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:
- * Matthew Khouzam - Initial API and implementation
- * Alexandre Montplaisir - Add UST callstack state system
- * Marc-Andre Laperle - Handle BufferOverflowException (Bug 420203)
- **********************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.trace;
-
-import java.nio.BufferOverflowException;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
-import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
-import org.eclipse.linuxtools.internal.lttng2.ust.core.Activator;
-import org.eclipse.linuxtools.tmf.core.trace.TraceValidationStatus;
-import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
-
-/**
- * Class to contain LTTng-UST traces
- *
- * @author Matthew Khouzam
- * @since 2.1
- */
-public class LttngUstTrace extends CtfTmfTrace {
-
- private static final int CONFIDENCE = 100;
-
- /**
- * Default constructor
- */
- public LttngUstTrace() {
- super();
- }
-
- /**
- * {@inheritDoc}
- * <p>
- * This implementation sets the confidence to 100 if the trace is a valid
- * CTF trace in the "ust" domain.
- */
- @Override
- public IStatus validate(final IProject project, final String path) {
- try (CTFTrace temp = new CTFTrace(path);) {
- /* Make sure the domain is "ust" in the trace's env vars */
- String dom = temp.getEnvironment().get("domain"); //$NON-NLS-1$
- if (dom != null && dom.equals("\"ust\"")) { //$NON-NLS-1$
- return new TraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID);
- }
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngUstTrace_DomainError);
-
- } catch (CTFReaderException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
- } catch (NullPointerException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
- } catch (final BufferOverflowException e) {
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngUstTrace_TraceReadError + ": " + Messages.LttngUstTrace_MalformedTrace); //$NON-NLS-1$
- }
- }
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.core.trace;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Message bundle for lttng2.kernel.core.trace
- *
- * @author Matthew Khouzam
- * @since 2.1
- */
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.ust.core.trace.messages"; //$NON-NLS-1$
-
- /**
- * The domain is not "ust"
- */
- public static String LttngUstTrace_DomainError;
-
- /**
- * Malformed trace (buffer overflow maybe?)
- */
- public static String LttngUstTrace_MalformedTrace;
-
- /**
- * Trace read error
- */
- public static String LttngUstTrace_TraceReadError;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-LttngUstTrace_DomainError=Domain mismatch, the environment should be 'ust'.
-LttngUstTrace_MalformedTrace=Buffer overflow exception, trace is malformed
-LttngUstTrace_TraceReadError=Lttng UST trace read error
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.ust.ui.tests</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.ust.ui.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.ui,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.linuxtools.lttng2.ust.ui;bundle-version="3.1.0"
-Export-Package: org.eclipse.linuxtools.lttng2.ust.ui.tests
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties
-src.includes = about.html
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.ust.ui.tests
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Userspace Tracer Analysis UI Tests Plug-in
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, 2013 Red Hat Inc., 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.ust.ui.tests</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-test-plugin</packaging>
-
- <name>Linux Tools LTTng Userspace Tracer Analysis UI Tests Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.linuxtools.lttng2.ust.ui.tests</testSuite>
- <testClass>org.eclipse.linuxtools.lttng2.ust.ui.tests.AllTests</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
- <product>org.eclipse.platform.ide</product>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.ui.tests;
-
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Test suite for the Activator class
- */
-public class ActivatorTest {
-
- // ------------------------------------------------------------------------
- // Tests
- // ------------------------------------------------------------------------
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#Activator()}.
- */
- @Test
- public void testActivator() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#getDefault()}.
- */
- @Test
- public void testGetDefault() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#start}.
- */
- @Test
- public void testStartBundleContext() {
- assertTrue(true);
- }
-
- /**
- * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#stop}.
- */
- @Test
- public void testStopBundleContext() {
- assertTrue(true);
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.ui.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Run the lttng2.ust.ui unit tests.
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
- ActivatorTest.class,
-})
-public class AllTests {
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.ust.ui</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+++ /dev/null
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-sp_cleanup.add_default_serial_version_id=true
-sp_cleanup.add_generated_serial_version_id=false
-sp_cleanup.add_missing_annotations=false
-sp_cleanup.add_missing_deprecated_annotations=true
-sp_cleanup.add_missing_methods=false
-sp_cleanup.add_missing_nls_tags=false
-sp_cleanup.add_missing_override_annotations=true
-sp_cleanup.add_missing_override_annotations_interface_methods=true
-sp_cleanup.add_serial_version_id=false
-sp_cleanup.always_use_blocks=true
-sp_cleanup.always_use_parentheses_in_expressions=false
-sp_cleanup.always_use_this_for_non_static_field_access=false
-sp_cleanup.always_use_this_for_non_static_method_access=false
-sp_cleanup.convert_to_enhanced_for_loop=false
-sp_cleanup.correct_indentation=false
-sp_cleanup.format_source_code=false
-sp_cleanup.format_source_code_changes_only=false
-sp_cleanup.make_local_variable_final=false
-sp_cleanup.make_parameters_final=false
-sp_cleanup.make_private_fields_final=true
-sp_cleanup.make_type_abstract_if_missing_method=false
-sp_cleanup.make_variable_declarations_final=false
-sp_cleanup.never_use_blocks=false
-sp_cleanup.never_use_parentheses_in_expressions=true
-sp_cleanup.on_save_use_additional_actions=true
-sp_cleanup.organize_imports=false
-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
-sp_cleanup.remove_private_constructors=true
-sp_cleanup.remove_trailing_whitespaces=true
-sp_cleanup.remove_trailing_whitespaces_all=true
-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
-sp_cleanup.remove_unnecessary_casts=false
-sp_cleanup.remove_unnecessary_nls_tags=false
-sp_cleanup.remove_unused_imports=false
-sp_cleanup.remove_unused_local_variables=false
-sp_cleanup.remove_unused_private_fields=true
-sp_cleanup.remove_unused_private_members=false
-sp_cleanup.remove_unused_private_methods=true
-sp_cleanup.remove_unused_private_types=true
-sp_cleanup.sort_members=false
-sp_cleanup.sort_members_all=false
-sp_cleanup.use_blocks=true
-sp_cleanup.use_blocks_only_for_return_and_throw=false
-sp_cleanup.use_parentheses_in_expressions=false
-sp_cleanup.use_this_for_non_static_field_access=false
-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
-sp_cleanup.use_this_for_non_static_method_access=false
-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+++ /dev/null
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
+++ /dev/null
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
+++ /dev/null
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 3.1.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.lttng2.ust.ui;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.ui,
- org.eclipse.linuxtools.lttng2.ust.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
- org.eclipse.linuxtools.tmf.ctf.core
-Export-Package: org.eclipse.linuxtools.internal.lttng2.ust.ui;x-friends:="org.eclipse.linuxtools.lttng2.ust.ui.tests",
- org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;x-friends:="org.eclipse.linuxtools.lttng2.ust.ui.tests",
- org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack
+++ /dev/null
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, "Program" will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party ("Redistributor") and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- icons/,\
- .,\
- plugin.xml,\
- about.html,\
- plugin.properties
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013, 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.lttng2.ust.ui
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools LTTng Userspace Tracer Analysis UI Plug-in
-
-tracetype.type.ust = LTTng UST Trace
-memoryusage.view.name = UST Memory Usage
-
-analysis.callstack = LTTng-UST CallStack Analysis
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.linuxtools.tmf.ui.tracetypeui">
- <type
- icon="icons/obj16/garland16.png"
- tracetype="org.eclipse.linuxtools.lttng2.ust.tracetype">
- </type>
- </extension>
- <extension
- point="org.eclipse.ui.views">
- <view
- category="org.eclipse.linuxtools.lttng2.ui.views.category"
- class="org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage.MemoryUsageView"
- id="org.eclipse.linuxtools.lttng2.ust.memoryusage"
- name="%memoryusage.view.name"
- restorable="true">
- </view>
- </extension>
- <extension
- point="org.eclipse.linuxtools.tmf.core.analysis">
- <module
- analysis_module="org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack.LttngUstCallStackAnalysis"
- automatic="false"
- id="org.eclipse.linuxtools.lttng2.ust.analysis.callstack"
- name="%analysis.callstack">
- <tracetype
- applies="true"
- class="org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace">
- </tracetype>
- </module>
- <output
- class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
- id="org.eclipse.linuxtools.lttng2.ust.memoryusage">
- <analysisId
- id="org.eclipse.linuxtools.lttng2.ust.analysis.memory">
- </analysisId>
- </output>
- </extension>
-</plugin>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, 2013 Red Hat Inc., 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.ust.ui</artifactId>
- <version>3.1.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools LTTng Userspace Tracer Analysis UI Plug-in</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-</project>
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2013 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.ui;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.jface.resource.ImageRegistry;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // ------------------------------------------------------------------------
- // Attributes
- // ------------------------------------------------------------------------
-
- /**
- * The plug-in ID
- */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.ust.ui"; //$NON-NLS-1$
-
- /**
- * The shared instance
- */
- private static Activator plugin;
-
- // ------------------------------------------------------------------------
- // Constructors
- // ------------------------------------------------------------------------
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- // ------------------------------------------------------------------------
- // Accessors
- // ------------------------------------------------------------------------
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- // ------------------------------------------------------------------------
- // AbstractUIPlugin
- // ------------------------------------------------------------------------
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- @Override
- protected void initializeImageRegistry(ImageRegistry reg) {
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- /**
- * Get the image object from a given path
- *
- * @param path
- * The path to the image file
- * @return The Image object
- */
- public Image getImageFromPath(String path) {
- return getImageDescripterFromPath(path).createImage();
- }
-
- /**
- * Get the ImageDescriptor from a given path
- *
- * @param path
- * The path to the image file
- * @return The ImageDescriptor object
- */
- public ImageDescriptor getImageDescripterFromPath(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
- }
-
- /**
- * Get the Image from a registry
- *
- * @param path
- * The path to the image registry
- * @return The Image object
- */
- public Image getImageFromImageRegistry(String path) {
- Image icon = getImageRegistry().get(path);
- if (icon == null) {
- icon = getImageDescripterFromPath(path).createImage();
- plugin.getImageRegistry().put(path, icon);
- }
- return icon;
- }
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logInfo(String message) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity INFO in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logInfo(String message, Throwable exception) {
- getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logWarning(String message) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logWarning(String message, Throwable exception) {
- getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- */
- public void logError(String message) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
- }
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
- *
- * @param message A message to log
- * @param exception A exception to log
- */
- public void logError(String message, Throwable exception) {
- getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 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:
- * Matthew Khouzam - Initial API and implementation
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;
-
-import org.eclipse.linuxtools.tmf.ui.views.TmfChartView;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Memory Usage View
- *
- * @author Matthew Khouzam
- */
-public class MemoryUsageView extends TmfChartView {
-
- /** ID string */
- public static final String ID = "org.eclipse.linuxtools.lttng2.ust.memoryusage"; //$NON-NLS-1$
-
- /**
- * Constructor
- */
- public MemoryUsageView() {
- super(Messages.MemoryUsageView_Title);
- }
-
- @Override
- public void createPartControl(Composite parent) {
- setChartViewer( new MemoryUsageViewer(parent));
- super.createPartControl(parent);
- }
-
- @Override
- public void setFocus() {
- }
-}
+++ /dev/null
-/**********************************************************************
- * Copyright (c) 2014 Ericsson, École Polytechnique de Montréal
- *
- * 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:
- * Bernd Hufmann - Initial API and implementation
- * Geneviève Bastien - Create and use base class for XY plots
- **********************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.UstMemoryStrings;
-import org.eclipse.linuxtools.internal.tmf.core.Activator;
-import org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.UstMemoryAnalysisModule;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
-import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.eclipse.linuxtools.tmf.ui.viewers.xycharts.linecharts.TmfCommonXLineChartViewer;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * Memory usage view
- *
- * @author Matthew Khouzam
- */
-@SuppressWarnings("restriction")
-public class MemoryUsageViewer extends TmfCommonXLineChartViewer {
-
- private TmfStateSystemAnalysisModule fModule = null;
-
- private final Map<Integer, double[]> fYValues = new HashMap<>();
- private final Map<Integer, Integer> fMemoryQuarks = new HashMap<>();
- private final Map<Integer, String> fSeriesName = new HashMap<>();
-
- private static final int BYTES_TO_KB = 1024;
-
- // Timeout between updates in the updateData thread
- private static final long BUILD_UPDATE_TIMEOUT = 500;
-
- /**
- * Constructor
- *
- * @param parent
- * parent view
- */
- public MemoryUsageViewer(Composite parent) {
- super(parent, Messages.MemoryUsageViewer_Title, Messages.MemoryUsageViewer_XAxis, Messages.MemoryUsageViewer_YAxis);
- }
-
- @Override
- protected void initializeDataSource() {
- if (getTrace() != null) {
- fModule = getTrace().getAnalysisModuleOfClass(TmfStateSystemAnalysisModule.class, UstMemoryAnalysisModule.ID);
- if (fModule == null) {
- return;
- }
- fModule.schedule();
- }
- }
-
- @Override
- protected void updateData(long start, long end, int nb, IProgressMonitor monitor) {
- try {
- if (getTrace() == null || fModule == null) {
- return;
- }
- fModule.waitForInitialization();
- ITmfStateSystem ss = fModule.getStateSystem();
- /* Don't wait for the module completion, when it's ready, we'll know */
- if (ss == null) {
- return;
- }
-
- double[] xvalues = getXAxis(start, end, nb);
- setXAxis(xvalues);
-
- boolean complete = false;
- long currentEnd = start;
-
- while (!complete && currentEnd < end) {
- if (monitor.isCanceled()) {
- return;
- }
- complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
- currentEnd = ss.getCurrentEndTime();
- List<Integer> tidQuarks = ss.getSubAttributes(-1, false);
- long traceStart = getStartTime();
- long traceEnd = getEndTime();
- long offset = this.getTimeOffset();
-
- /* Initialize quarks and series names */
- for (int quark : tidQuarks) {
- fYValues.put(quark, new double[xvalues.length]);
- fMemoryQuarks.put(quark, ss.getQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE));
- int procNameQuark = ss.getQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE);
- try {
- ITmfStateValue procnameValue = ss.querySingleState(start, procNameQuark).getStateValue();
- String procname = new String();
- if (!procnameValue.isNull()) {
- procname = procnameValue.unboxStr();
- }
- fSeriesName.put(quark, new String(procname + ' ' + '(' + ss.getAttributeName(quark) + ')').trim());
- } catch (TimeRangeException e) {
- fSeriesName.put(quark, '(' + ss.getAttributeName(quark) + ')');
- }
- }
-
- /*
- * TODO: It should only show active threads in the time range. If a
- * tid does not have any memory value (only 1 interval in the time
- * range with value null or 0), then its series should not be
- * displayed.
- */
- double yvalue = 0.0;
- for (int i = 0; i < xvalues.length; i++) {
- if (monitor.isCanceled()) {
- return;
- }
- double x = xvalues[i];
- long time = (long) x + offset;
- // make sure that time is in the trace range after double to
- // long conversion
- time = time < traceStart ? traceStart : time;
- time = time > traceEnd ? traceEnd : time;
-
- for (int quark : tidQuarks) {
- try {
- yvalue = ss.querySingleState(time, fMemoryQuarks.get(quark)).getStateValue().unboxLong() / BYTES_TO_KB;
- fYValues.get(quark)[i] = yvalue;
- } catch (TimeRangeException e) {
- fYValues.get(quark)[i] = 0;
- }
- }
- }
- for (int quark : tidQuarks) {
- setSeries(fSeriesName.get(quark), fYValues.get(quark));
- }
- updateDisplay();
- }
- } catch (AttributeNotFoundException | StateValueTypeException | StateSystemDisposedException e) {
- Activator.logError("Error updating the data of the Memory usage view", e); //$NON-NLS-1$
- }
- }
-
-}
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 École Polytechnique de Montréal
- *
- * 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:
- * Geneviève Bastien - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Translatable strings for the ust memory usage view
- *
- * @author Geneviève Bastien
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage.messages"; //$NON-NLS-1$
- /** Title of the memory usage xy view */
- public static String MemoryUsageView_Title;
-
- /** Title of the memory viewer */
- public static String MemoryUsageViewer_Title;
- /** X axis caption */
- public static String MemoryUsageViewer_XAxis;
- /** Y axis caption */
- public static String MemoryUsageViewer_YAxis;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
+++ /dev/null
-###############################################################################
-# Copyright (c) 2014 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-MemoryUsageView_Title=Memory Usage
-MemoryUsageViewer_Title=Memory Allocation vs Time
-MemoryUsageViewer_XAxis=Time
-MemoryUsageViewer_YAxis=Usage (KB)
+++ /dev/null
-/*******************************************************************************
- * Copyright (c) 2014 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:
- * Alexandre Montplaisir - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack;
-
-import org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack.LttngUstCallStackProvider;
-import org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace;
-import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.eclipse.linuxtools.tmf.ui.views.callstack.AbstractCallStackAnalysis;
-
-/**
- * Call-stack analysis to populate the TMF CallStack View from UST cyg-profile
- * events.
- *
- * @author Alexandre Montplaisir
- * @since 3.0
- */
-public class LttngUstCallStackAnalysis extends AbstractCallStackAnalysis {
-
- @Override
- public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
- if (!(trace instanceof LttngUstTrace)) {
- throw new IllegalArgumentException("Trace should be of type LttngUstTrace"); //$NON-NLS-1$
- }
- super.setTrace(trace);
- }
-
- @Override
- protected LttngUstTrace getTrace() {
- return (LttngUstTrace) super.getTrace();
- }
-
- @Override
- protected ITmfStateProvider createStateProvider() {
- return new LttngUstCallStackProvider(getTrace());
- }
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.lttng2.ust</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
+++ /dev/null
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
+++ /dev/null
-eclipse.preferences.version=1
-line.separator=\n
+++ /dev/null
-###############################################################################
-# Copyright (c) 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-bin.includes = feature.xml,\
- feature.properties,\
- p2.inf
+++ /dev/null
-###############################################################################
-# Copyright (c) 2009, 2013 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:
-# Ericsson - Initial API and implementation
-###############################################################################
-
-featureName=Linux Tools LTTng Userspace Analysis
-
-description=Plug-ins to integrate LTTng-UST analysis tools into the workbench. \
-Includes the LTTng (Linux Tracing Toolkit), TMF (Tracing and Monitoring Framework) \
-and CTF (Common Trace Format) features.
-
-featureProvider=Eclipse Linux Tools
-
-copyright=Copyright 2013 Ericsson
-
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- For PDE build, remove "ws" and "arch" -->
-<feature
- id="org.eclipse.linuxtools.lttng2.ust"
- label="%featureName"
- version="3.2.0.qualifier"
- provider-name="%featureProvider"
- license-feature="org.eclipse.license"
- license-feature-version="0.0.0">
-
- <description>
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <url>
- <update label="Linux Tools Update Site" url="http://download.eclipse.org/linuxtools/update"/>
- </url>
-
- <includes
- id="org.eclipse.linuxtools.lttng2.control"
- version="0.0.0"
- name="Linux Tracing Toolkit next generation (LTTng)"/>
-
- <includes
- id="org.eclipse.linuxtools.tmf.ctf"
- version="0.0.0"
- name="CTF Support for TMF"/>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.tracecompass.ctf.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.linuxtools.tmf.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.ui"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.linuxtools.tmf.ui" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.help"/>
- </requires>
-
- <plugin
- id="org.eclipse.linuxtools.lttng2.ust.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.lttng2.ust.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.linuxtools.lttng.help"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
-</feature>
+++ /dev/null
-instructions.configure=\
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
-org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (C) 2011, 2013 Red Hat Inc., 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
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <artifactId>org.eclipse.tracecompass</artifactId>
- <groupId>org.eclipse.tracecompass</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.lttng2.ust</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- <packaging>eclipse-feature</packaging>
-
- <name>Linux Tools LTTng Userspace Tracer Analysis Feature</name>
-
- <groupId>org.eclipse.linuxtools.lttng2</groupId>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- <configuration>
- <excludes>
- <plugin id="org.eclipse.linuxtools.lttng.help"/>
- </excludes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attached-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
org.eclipse.linuxtools.internal.tmf.ui.project.dialogs;x-internal:=true,
org.eclipse.linuxtools.internal.tmf.ui.project.dialogs.offset;x-internal:=true,
org.eclipse.linuxtools.internal.tmf.ui.project.handlers;x-friends:="org.eclipse.linuxtools.tmf.ui.tests",
- org.eclipse.linuxtools.internal.tmf.ui.project.model;x-friends:="org.eclipse.linuxtools.lttng2.ui,org.eclipse.linuxtools.tmf.ui.tests,org.eclipse.linuxtools.tmf.ctf.ui.tests",
+ org.eclipse.linuxtools.internal.tmf.ui.project.model;x-friends:="org.eclipse.tracecompass.lttng2.ui,org.eclipse.linuxtools.tmf.ui.tests,org.eclipse.linuxtools.tmf.ctf.ui.tests",
org.eclipse.linuxtools.internal.tmf.ui.project.operations;x-internal:=true,
- org.eclipse.linuxtools.internal.tmf.ui.project.wizards.importtrace;x-friends:="org.eclipse.linuxtools.tmf.ctf.ui.swtbot.tests,org.eclipse.linuxtools.tmf.ui,org.eclipse.linuxtools.lttng2.control.ui",
+ org.eclipse.linuxtools.internal.tmf.ui.project.wizards.importtrace;x-friends:="org.eclipse.linuxtools.tmf.ctf.ui.swtbot.tests,org.eclipse.linuxtools.tmf.ui,org.eclipse.tracecompass.lttng2.control.ui",
org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg;x-internal:=true,
org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg.importexport;x-internal:=true,
org.eclipse.linuxtools.internal.tmf.ui.viewers.events.columns;x-internal:=true,
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.control.core.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.control.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.lttng2.control.core;bundle-version="3.1.0"
+Export-Package: org.eclipse.linuxtools.lttng2.control.core.tests;x-friends:="org.eclipse.linuxtools.lttng.alltests",
+ org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;x-internal:=true,
+ org.eclipse.linuxtools.lttng2.control.core.tests.relayd,
+ org.eclipse.linuxtools.lttng2.control.core.tests.session
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = about.html
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Control Core Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.control.core.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Control Core Tests Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.tracecompass.lttng2.control.core.tests</testSuite>
+ <testClass>org.eclipse.linuxtools.lttng2.control.core.tests.AllTests</testClass>
+ <useUIHarness>false</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <product>org.eclipse.platform.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Test stubs for the Activator.
+ */
+public class ActivatorTest {
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#Activator()}.
+ */
+ @Test
+ public void testActivator() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#getDefault()}.
+ */
+ @Test
+ public void testGetDefault() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#start(org.osgi.framework.BundleContext)}.
+ */
+ @Test
+ public void testStartBundleContext() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.core.Activator#stop(org.osgi.framework.BundleContext)}.
+ */
+ @Test
+ public void testStopBundleContext() {
+ assertTrue(true);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Run all the tests in the test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+ org.eclipse.linuxtools.lttng2.control.core.tests.model.impl.AllTests.class,
+ org.eclipse.linuxtools.lttng2.control.core.tests.session.AllTests.class,
+ org.eclipse.linuxtools.lttng2.control.core.tests.model.impl.AllTests.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ BaseEventInfoTest.class,
+ ChannelInfoTest.class,
+ DomainInfoTest.class,
+ EventInfoTest.class,
+ FieldInfoTest.class,
+ ProbeEventInfoTest.class,
+ SessionInfoTest.class,
+ TraceInfoTest.class,
+ UstProviderInfoTest.class,
+ SnapshotInfoTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>BaseEventInfoTest</code> contains test for the class
+ * <code>{@link BaseEventInfo}</code>.
+ */
+public class BaseEventInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IBaseEventInfo fEventInfo1 = null;
+ private IBaseEventInfo fEventInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fEventInfo1 = factory.getBaseEventInfo1();
+ fEventInfo2 = factory.getBaseEventInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the BaseEventInfo() constructor test.
+ */
+ @Test
+ public void testBaseEventInfo() {
+ BaseEventInfo fixture = new BaseEventInfo("event");
+ assertNotNull(fixture);
+
+ TraceEventType result = fixture.getEventType();
+
+ assertEquals("event", fixture.getName());
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ TraceLogLevel level = fixture.getLogLevel();
+ assertEquals("TRACE_DEBUG", level.getInName());
+ assertEquals("TRACE_DEBUG", level.name());
+ assertEquals("TRACE_DEBUG", level.toString());
+ assertEquals(14, level.ordinal());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventInfoCopy() {
+ BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo1);
+
+ assertEquals(fEventInfo1.getName(), info.getName());
+ assertEquals(fEventInfo1.getEventType(), info.getEventType());
+ assertEquals(fEventInfo1.getLogLevel(), info.getLogLevel());
+ assertEquals(fEventInfo1.getFilterExpression(), info.getFilterExpression());
+
+ IFieldInfo[] orignalFields = fEventInfo1.getFields();
+ IFieldInfo[] copiedFields = info.getFields();
+ assertEquals(orignalFields.length, copiedFields.length);
+
+ for (int i = 0; i < copiedFields.length; i++) {
+ assertEquals(orignalFields[i], copiedFields[i]);
+ }
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventCopy2() {
+ try {
+ BaseEventInfo info = null;
+ new BaseEventInfo(info);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the TraceEventType getEventType() method test.
+ */
+ @Test
+ public void testGetEventType_1() {
+ BaseEventInfo fixture = new BaseEventInfo("event");
+ fixture.setEventType("unknown");
+
+ TraceEventType result = fixture.getEventType();
+
+ assertNotNull(result);
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ fixture.setEventType("");
+ result = fixture.getEventType();
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ fixture.setEventType("tracepoint");
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("tracepoint", result.getInName());
+ assertEquals("TRACEPOINT", result.name());
+ assertEquals("TRACEPOINT", result.toString());
+ assertEquals(0, result.ordinal());
+
+ fixture.setEventType("syscall");
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("syscall", result.getInName());
+ assertEquals("SYSCALL", result.name());
+ assertEquals("SYSCALL", result.toString());
+ assertEquals(1, result.ordinal());
+
+ fixture.setEventType("probe");
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("probe", result.getInName());
+ assertEquals("PROBE", result.name());
+ assertEquals("PROBE", result.toString());
+ assertEquals(2, result.ordinal());
+
+ fixture.setEventType("function");
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("function", result.getInName());
+ assertEquals("FUNCTION", result.name());
+ assertEquals("FUNCTION", result.toString());
+ assertEquals(3, result.ordinal());
+
+
+ }
+
+ /**
+ * Run the void setEventType(TraceEventType) method test.
+ */
+ @Test
+ public void testSetEventType_2() {
+ BaseEventInfo fixture = new BaseEventInfo("event");
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+
+ TraceEventType result = fixture.getEventType();
+
+ assertNotNull(result);
+ assertEquals("tracepoint", result.getInName());
+ assertEquals("TRACEPOINT", result.name());
+ assertEquals("TRACEPOINT", result.toString());
+ assertEquals(0, result.ordinal());
+
+ fixture.setEventType(TraceEventType.UNKNOWN);
+ result = fixture.getEventType();
+
+ assertNotNull(result);
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ fixture.setEventType(TraceEventType.SYSCALL);
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("syscall", result.getInName());
+ assertEquals("SYSCALL", result.name());
+ assertEquals("SYSCALL", result.toString());
+ assertEquals(1, result.ordinal());
+
+ fixture.setEventType(TraceEventType.PROBE);
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("probe", result.getInName());
+ assertEquals("PROBE", result.name());
+ assertEquals("PROBE", result.toString());
+ assertEquals(2, result.ordinal());
+
+ fixture.setEventType(TraceEventType.FUNCTION);
+ result = fixture.getEventType();
+ assertNotNull(result);
+ assertEquals("function", result.getInName());
+ assertEquals("FUNCTION", result.name());
+ assertEquals("FUNCTION", result.toString());
+ assertEquals(3, result.ordinal());
+
+
+ }
+
+ /**
+ * Run the void setLogLevel(TraceLogLevel) method test.
+ * Run the TraceLogLevel getLogLevel() method test
+ */
+ @Test
+ public void testSetLogLevel1() {
+ BaseEventInfo fixture = new BaseEventInfo("event");
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+ fixture.setLogLevel(TraceLogLevel.TRACE_CRIT);
+
+ // 2 set/get-operations are enough to test the method
+ TraceLogLevel result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_CRIT", result.getInName());
+ assertEquals("TRACE_CRIT", result.name());
+ assertEquals("TRACE_CRIT", result.toString());
+ assertEquals(2, result.ordinal());
+
+ fixture.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_FUNCTION", result.getInName());
+ assertEquals("TRACE_DEBUG_FUNCTION", result.name());
+ assertEquals("TRACE_DEBUG_FUNCTION", result.toString());
+ assertEquals(12, result.ordinal());
+ }
+
+ /**
+ * Run the void setLogLevel(String) method test.
+ * Run the TraceLogLevel getLogLevel() method test
+ */
+ @Test
+ public void testSetLogLevel2() {
+ BaseEventInfo fixture = new BaseEventInfo("event");
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+ fixture.setLogLevel("TRACE_EMERG");
+
+ TraceLogLevel result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_EMERG", result.getInName());
+ assertEquals("TRACE_EMERG", result.name());
+ assertEquals(0, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_ALERT");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_ALERT", result.getInName());
+ assertEquals("TRACE_ALERT", result.name());
+ assertEquals(1, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_CRIT");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_CRIT", result.getInName());
+ assertEquals("TRACE_CRIT", result.name());
+ assertEquals(2, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_ERR");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_ERR", result.getInName());
+ assertEquals("TRACE_ERR", result.name());
+ assertEquals(3, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_WARNING");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_WARNING", result.getInName());
+ assertEquals("TRACE_WARNING", result.name());
+ assertEquals(4, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_NOTICE");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_NOTICE", result.getInName());
+ assertEquals("TRACE_NOTICE", result.name());
+ assertEquals(5, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_INFO");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_INFO", result.getInName());
+ assertEquals("TRACE_INFO", result.name());
+ assertEquals(6, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_SYSTEM");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_SYSTEM", result.getInName());
+ assertEquals("TRACE_DEBUG_SYSTEM", result.name());
+ assertEquals(7, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_PROGRAM");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_PROGRAM", result.getInName());
+ assertEquals("TRACE_DEBUG_PROGRAM", result.name());
+ assertEquals(8, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_PROCESS");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_PROCESS", result.getInName());
+ assertEquals("TRACE_DEBUG_PROCESS", result.name());
+ assertEquals(9, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_MODULE");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_MODULE", result.getInName());
+ assertEquals("TRACE_DEBUG_MODULE", result.name());
+ assertEquals(10, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_UNIT");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_UNIT", result.getInName());
+ assertEquals("TRACE_DEBUG_UNIT", result.name());
+ assertEquals(11, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_FUNCTION");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_FUNCTION", result.getInName());
+ assertEquals("TRACE_DEBUG_FUNCTION", result.name());
+ assertEquals(12, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG_LINE");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG_LINE", result.getInName());
+ assertEquals("TRACE_DEBUG_LINE", result.name());
+ assertEquals(13, result.ordinal());
+
+ //------------------------
+ fixture.setLogLevel("TRACE_DEBUG");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("TRACE_DEBUG", result.getInName());
+ assertEquals("TRACE_DEBUG", result.name());
+ assertEquals(14, result.ordinal());
+
+ //-------------------------
+ fixture.setLogLevel("LEVEL_UNKNOWN");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("LEVEL_UNKNOWN", result.getInName());
+ assertEquals("LEVEL_UNKNOWN", result.name());
+ assertEquals(15, result.ordinal());
+
+ fixture.setLogLevel("garbage");
+
+ result = fixture.getLogLevel();
+ assertNotNull(result);
+ assertEquals("LEVEL_UNKNOWN", result.getInName());
+ assertEquals("LEVEL_UNKNOWN", result.name());
+ assertEquals(15, result.ordinal());
+ }
+
+ /**
+ * test filter expression
+ */
+ @Test
+ public void testSetFields() {
+ BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo2);
+ info.setFilterExpression("stringfield==test");
+ assertEquals("stringfield==test", info.getFilterExpression());
+ }
+
+
+ /**
+ * test add field
+ */
+ @Test
+ public void testAddField() {
+ BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo2);
+
+ IFieldInfo field = new FieldInfo("intfield");
+ field.setFieldType("int");
+
+ info.addField(field);
+
+ // Verify the stored events
+ IFieldInfo[] result = info.getFields();
+
+ assertNotNull(result);
+ assertEquals(1, result.length);
+ assertNotNull(result[0]);
+ assertTrue(field.equals(result[0]));
+ }
+
+ /**
+ * test set fields
+ */
+ @Test
+ public void testFields() {
+ BaseEventInfo info = new BaseEventInfo((BaseEventInfo)fEventInfo2);
+
+ IFieldInfo field1 = new FieldInfo("intfield");
+ field1.setFieldType("int");
+
+ IFieldInfo field2 = new FieldInfo("stringfield");
+ field2.setFieldType("string");
+
+ List<IFieldInfo> fields = new LinkedList<>();
+ fields.add(field1);
+ fields.add(field2);
+ info.setFields(fields);
+
+ // Verify the stored events
+ IFieldInfo[] result = info.getFields();
+
+ assertNotNull(result);
+ assertEquals(2, result.length);
+
+ for (int i = 0; i < result.length; i++) {
+ assertNotNull(result[i]);
+ assertTrue(fields.get(i).equals(result[i]));
+ }
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ BaseEventInfo fixture = new BaseEventInfo("event");
+ fixture.setName("testName");
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+ fixture.setLogLevel(TraceLogLevel.TRACE_ERR);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("[BaseEventInfo([TraceInfo(Name=testName)],type=TRACEPOINT,level=TRACE_ERR)]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test the .equals() method.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fEventInfo1.equals(fEventInfo1));
+ assertTrue("equals", fEventInfo2.equals(fEventInfo2));
+
+ assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
+ assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
+ }
+
+ /**
+ * Test the .equals() method.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
+ BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo2);
+
+ assertTrue("equals", info1.equals(fEventInfo1));
+ assertTrue("equals", fEventInfo1.equals(info1));
+
+ assertTrue("equals", info2.equals(fEventInfo2));
+ assertTrue("equals", fEventInfo2.equals(info2));
+ }
+
+ /**
+ * Test the .equals() method.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
+ BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
+ BaseEventInfo info3 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
+
+ assertTrue("equals", info1.equals(info2));
+ assertTrue("equals", info2.equals(info3));
+ assertTrue("equals", info1.equals(info3));
+ }
+
+ /**
+ * Test the .equals() method.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fEventInfo1.equals(null));
+ assertTrue("equals", !fEventInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test the hashCode() method.
+ */
+ @Test
+ public void testHashCode() {
+ BaseEventInfo info1 = new BaseEventInfo((BaseEventInfo)fEventInfo1);
+ BaseEventInfo info2 = new BaseEventInfo((BaseEventInfo)fEventInfo2);
+
+ assertTrue("hashCode", fEventInfo1.hashCode() == info1.hashCode());
+ assertTrue("hashCode", fEventInfo2.hashCode() == info2.hashCode());
+
+ assertTrue("hashCode", fEventInfo1.hashCode() != info2.hashCode());
+ assertTrue("hashCode", fEventInfo2.hashCode() != info1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>ChannelInfoTest</code> contains tests for the class
+ * <code>{@link ChannelInfo}</code>.
+ */
+public class ChannelInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IChannelInfo fChannelInfo1 = null;
+ private IChannelInfo fChannelInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fChannelInfo1 = factory.getChannel1();
+ fChannelInfo2 = factory.getChannel2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the ChannelInfo() constructor test.
+ */
+ @Test
+ public void testChannelInfo() {
+ ChannelInfo result = new ChannelInfo("test");
+ assertNotNull(result);
+
+ assertEquals("test", result.getName());
+ assertEquals(0, result.getNumberOfSubBuffers());
+ assertEquals("unknown", result.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.UNKNOWN, result.getOutputType());
+ assertEquals(false, result.isOverwriteMode());
+ assertEquals(0, result.getReadTimer());
+ assertEquals("disabled", result.getState().getInName());
+ assertEquals(0, result.getSubBufferSize());
+ assertEquals(0, result.getSwitchTimer());
+ assertEquals(0, result.getMaxSizeTraceFiles());
+ assertEquals(0, result.getMaxNumberTraceFiles());
+ assertEquals(BufferType.BUFFER_TYPE_UNKNOWN, result.getBufferType());
+ }
+
+ /**
+ * Test copy constructor.
+ */
+ @Test
+ public void testChannelInfoCopy() {
+ ChannelInfo channelInfo = new ChannelInfo((ChannelInfo)fChannelInfo1);
+
+ assertEquals(fChannelInfo1.getName(), channelInfo.getName());
+ assertEquals(fChannelInfo1.getNumberOfSubBuffers(), channelInfo.getNumberOfSubBuffers());
+ assertEquals(fChannelInfo1.getOutputType(), channelInfo.getOutputType());
+ assertEquals(fChannelInfo1.isOverwriteMode(), channelInfo.isOverwriteMode());
+ assertEquals(fChannelInfo1.getReadTimer(), channelInfo.getReadTimer());
+ assertEquals(fChannelInfo1.getState(), channelInfo.getState());
+ assertEquals(fChannelInfo1.getSwitchTimer(), channelInfo.getSwitchTimer());
+ assertEquals(fChannelInfo1.getEvents().length, channelInfo.getEvents().length);
+ assertEquals(fChannelInfo1.getMaxSizeTraceFiles(), channelInfo.getMaxSizeTraceFiles());
+ assertEquals(fChannelInfo1.getMaxNumberTraceFiles(), channelInfo.getMaxNumberTraceFiles());
+ assertEquals(fChannelInfo1.getBufferType(), channelInfo.getBufferType());
+
+ IEventInfo[] orignalEvents = fChannelInfo1.getEvents();
+ IEventInfo[] resultEvents = channelInfo.getEvents();
+ for (int i = 0; i < orignalEvents.length; i++) {
+ assertEquals(orignalEvents[i], resultEvents[i]);
+ }
+ }
+
+ /**
+ * Test copy constructor with a null value.
+ */
+ @Test
+ public void testChannelCopy2() {
+ try {
+ ChannelInfo channel = null;
+ new ChannelInfo(channel);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the IEventInfo[] getEvents() method test.
+ */
+ @Test
+ public void testAddAndGetEvents_1() {
+ ChannelInfo fixture = new ChannelInfo("test");
+ fixture.setSwitchTimer(1L);
+ fixture.setOverwriteMode(true);
+ fixture.setReadTimer(1L);
+ fixture.setState(TraceEnablement.DISABLED);
+ fixture.setNumberOfSubBuffers(1);
+ fixture.setOutputType("");
+ fixture.setSubBufferSize(1L);
+
+ // add an event
+ IEventInfo event = new EventInfo("event");
+ fixture.addEvent(event);
+
+ // Verify the stored events
+ IEventInfo[] result = fixture.getEvents();
+
+ assertNotNull(result);
+ assertEquals(1, result.length);
+ assertNotNull(result[0]);
+ assertTrue(event.equals(result[0]));
+ }
+
+ /**
+ * Run the long getNumberOfSubBuffers() method test.
+ */
+ @Test
+ public void testGetAndSetters() {
+ ChannelInfo fixture = new ChannelInfo("test");
+ fixture.setSwitchTimer(2L);
+ fixture.setOverwriteMode(true);
+ fixture.setReadTimer(3L);
+ fixture.setState(TraceEnablement.DISABLED);
+ fixture.setNumberOfSubBuffers(4);
+ fixture.setOutputType("splice()");
+ fixture.setSubBufferSize(1L);
+ fixture.setMaxSizeTraceFiles(1024);
+ fixture.setMaxNumberTraceFiles(20);
+ fixture.setBufferType(BufferType.BUFFER_PER_UID);
+ fixture.addEvent(new EventInfo("event"));
+
+ long switchTimer = fixture.getSwitchTimer();
+ assertEquals(2L, switchTimer);
+
+ boolean mode = fixture.isOverwriteMode();
+ assertTrue(mode);
+
+ long readTimer = fixture.getReadTimer();
+ assertEquals(3L, readTimer);
+
+ TraceEnablement state = fixture.getState();
+ assertEquals("disabled", state.getInName());
+
+ long numSubBuffers = fixture.getNumberOfSubBuffers();
+ assertEquals(4, numSubBuffers);
+
+ String outputType = fixture.getOutputType().getInName();
+ assertEquals("splice()", outputType);
+
+ long subBufferSize = fixture.getSubBufferSize();
+ assertEquals(1L, subBufferSize);
+
+ int maxSizeTraceFiles = fixture.getMaxSizeTraceFiles();
+ assertEquals(1024, maxSizeTraceFiles);
+
+ int maxNumberTraceFiles = fixture.getMaxNumberTraceFiles();
+ assertEquals(20, maxNumberTraceFiles);
+
+ BufferType bufferType = fixture.getBufferType();
+ assertTrue(bufferType == BufferType.BUFFER_PER_UID);
+
+ fixture.setSwitchTimer(5L);
+ fixture.setOverwriteMode(false);
+ fixture.setReadTimer(6L);
+ fixture.setState(TraceEnablement.ENABLED);
+ fixture.setNumberOfSubBuffers(7);
+ fixture.setOutputType("mmap()");
+ fixture.setSubBufferSize(8L);
+ fixture.setMaxSizeTraceFiles(4096);
+ fixture.setMaxNumberTraceFiles(10);
+ fixture.setBufferType(BufferType.BUFFER_PER_PID);
+
+ switchTimer = fixture.getSwitchTimer();
+ assertEquals(5L, switchTimer);
+
+ mode = fixture.isOverwriteMode();
+ assertFalse(mode);
+
+ readTimer = fixture.getReadTimer();
+ assertEquals(6L, readTimer);
+
+ state = fixture.getState();
+ assertEquals("enabled", state.getInName());
+
+ numSubBuffers = fixture.getNumberOfSubBuffers();
+ assertEquals(7, numSubBuffers);
+
+ outputType = fixture.getOutputType().getInName();
+ assertEquals("mmap()", outputType);
+
+ subBufferSize = fixture.getSubBufferSize();
+ assertEquals(8L, subBufferSize);
+
+ maxSizeTraceFiles = fixture.getMaxSizeTraceFiles();
+ assertEquals(4096, maxSizeTraceFiles);
+
+ maxNumberTraceFiles = fixture.getMaxNumberTraceFiles();
+ assertEquals(10, maxNumberTraceFiles);
+
+ bufferType = fixture.getBufferType();
+ assertTrue(bufferType == BufferType.BUFFER_PER_PID);
+ }
+
+ /**
+ * Run the void setEvents(List<IEventInfo>) method test.
+ */
+ @Test
+ public void testSetEvents_1() {
+ ChannelInfo fixture = new ChannelInfo("test");
+ fixture.setSwitchTimer(1L);
+ fixture.setOverwriteMode(true);
+ fixture.setReadTimer(1L);
+ fixture.setState(TraceEnablement.DISABLED);
+ fixture.setNumberOfSubBuffers(1);
+ fixture.setOutputType("");
+ fixture.setSubBufferSize(1L);
+ List<IEventInfo> events = new LinkedList<>();
+
+ for (int i = 0; i < 2; i++) {
+ IEventInfo info = new EventInfo("event" + i);
+ info.setEventType("tracepoint");
+ info.setState((i % 2 == 0 ? "enabled" : "disabled"));
+ events.add(info);
+ }
+
+ fixture.setEvents(events);
+
+ IEventInfo[] infos = fixture.getEvents();
+
+ assertEquals(events.size(), infos.length);
+
+ for (int i = 0; i < infos.length; i++) {
+ assertEquals(events.get(i), infos[i]);
+ }
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ ChannelInfo fixture = new ChannelInfo("channel");
+ fixture.setSwitchTimer(1L);
+ fixture.setOverwriteMode(true);
+ fixture.setReadTimer(1L);
+ fixture.setState(TraceEnablement.DISABLED);
+ fixture.setNumberOfSubBuffers(1);
+ fixture.setOutputType("splice()");
+ fixture.setSubBufferSize(1L);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("[ChannelInfo([TraceInfo(Name=channel)],State=DISABLED,OverwriteMode=true,SubBuffersSize=1,NumberOfSubBuffers=1,SwitchTimer=1,ReadTimer=1,output=splice(),Events=None)]", result);
+ }
+
+ /**
+ * Run another String toString() method test.
+ */
+ @Test
+ public void testToString_2() {
+ String result = fChannelInfo1.toString();
+
+ // add additional test code here
+ assertEquals("[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fChannelInfo1.equals(fChannelInfo1));
+ assertTrue("equals", fChannelInfo2.equals(fChannelInfo2));
+
+ assertTrue("equals", !fChannelInfo1.equals(fChannelInfo2));
+ assertTrue("equals", !fChannelInfo2.equals(fChannelInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ ChannelInfo event1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
+ ChannelInfo event2 = new ChannelInfo((ChannelInfo)fChannelInfo2);
+
+ assertTrue("equals", event1.equals(fChannelInfo1));
+ assertTrue("equals", fChannelInfo1.equals(event1));
+
+ assertTrue("equals", event2.equals(fChannelInfo2));
+ assertTrue("equals", fChannelInfo2.equals(event2));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ ChannelInfo channel1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
+ ChannelInfo channel2 = new ChannelInfo((ChannelInfo)fChannelInfo1);
+ ChannelInfo channel3 = new ChannelInfo((ChannelInfo)fChannelInfo1);
+
+ assertTrue("equals", channel1.equals(channel2));
+ assertTrue("equals", channel2.equals(channel3));
+ assertTrue("equals", channel1.equals(channel3));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fChannelInfo1.equals(null));
+ assertTrue("equals", !fChannelInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ ChannelInfo channel1 = new ChannelInfo((ChannelInfo)fChannelInfo1);
+ ChannelInfo channel2 = new ChannelInfo((ChannelInfo)fChannelInfo2);
+
+ assertTrue("hashCode", fChannelInfo1.hashCode() == channel1.hashCode());
+ assertTrue("hashCode", fChannelInfo2.hashCode() == channel2.hashCode());
+
+ assertTrue("hashCode", fChannelInfo1.hashCode() != channel2.hashCode());
+ assertTrue("hashCode", fChannelInfo2.hashCode() != channel1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>ChannelInfoTest</code> contains tests for the class
+ * <code>{@link DomainInfo}</code>.
+ */
+public class DomainInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IDomainInfo fDomainInfo1 = null;
+ private IDomainInfo fDomainInfo2 = null;
+ private IChannelInfo fChannelInfo1 = null;
+ private IChannelInfo fChannelInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ // Get test instances from the factory
+ ModelImplFactory factory = new ModelImplFactory();
+ fChannelInfo1 = factory.getChannel1();
+ fChannelInfo2 = factory.getChannel2();
+ fDomainInfo1 = factory.getDomainInfo1();
+ fDomainInfo2 = factory.getDomainInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the ChannelInfo() constructor test.
+ */
+ @Test
+ public void testDomainInfo() {
+ DomainInfo result = new DomainInfo("test");
+ assertNotNull(result);
+
+ assertEquals("test", result.getName());
+ assertEquals(0, result.getChannels().length);
+ }
+
+ /**
+ * Test the copy constructor.
+ */
+ @Test
+ public void testDomainInfoCopy() {
+ DomainInfo channelInfo = new DomainInfo((DomainInfo)fDomainInfo1);
+ IChannelInfo[] orignalEvents = fDomainInfo1.getChannels();
+ IChannelInfo[] resultEvents = channelInfo.getChannels();
+ for (int i = 0; i < orignalEvents.length; i++) {
+ assertEquals(orignalEvents[i], resultEvents[i]);
+ }
+ }
+
+ /**
+ * Test the copy constructor.
+ */
+ @Test
+ public void testDomainlCopy2() {
+ try {
+ DomainInfo domain = null;
+ new DomainInfo(domain);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the long getNumberOfSubBuffers() method test.
+ */
+ @Test
+ public void testGetAndSetters() {
+
+ // Note that addChannel() has been executed in setUp()
+ // check get method here
+ assertEquals(1, fDomainInfo1.getChannels().length);
+ assertNotNull(fDomainInfo1.getChannels()[0]);
+ assertEquals(fChannelInfo1, fDomainInfo1.getChannels()[0]);
+
+ IDomainInfo domain = new DomainInfo("domain");
+ List<IChannelInfo> list = new LinkedList<>();
+ list.add(fChannelInfo1);
+ list.add(fChannelInfo2);
+ domain.setChannels(list);
+
+ IChannelInfo[] result = domain.getChannels();
+ assertEquals(2, result.length);
+ assertEquals(fChannelInfo1, result[0]);
+ assertEquals(fChannelInfo2, result[1]);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ DomainInfo fixture = new DomainInfo("domain");
+
+ String result = fixture.toString();
+
+ assertEquals("[DomainInfo([TraceInfo(Name=domain)],Channels=None,isKernel=false)]", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_2() {
+ String result = fDomainInfo1.toString();
+
+ assertEquals("[DomainInfo([TraceInfo(Name=test1)],Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])],isKernel=false)]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fDomainInfo1.equals(fDomainInfo1));
+ assertTrue("equals", fDomainInfo2.equals(fDomainInfo2));
+
+ assertTrue("equals", !fDomainInfo1.equals(fDomainInfo2));
+ assertTrue("equals", !fDomainInfo2.equals(fDomainInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ DomainInfo event1 = new DomainInfo((DomainInfo)fDomainInfo1);
+ DomainInfo event2 = new DomainInfo((DomainInfo)fDomainInfo2);
+
+ assertTrue("equals", event1.equals(fDomainInfo1));
+ assertTrue("equals", fDomainInfo1.equals(event1));
+
+ assertTrue("equals", event2.equals(fDomainInfo2));
+ assertTrue("equals", fDomainInfo2.equals(event2));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ DomainInfo channel1 = new DomainInfo((DomainInfo)fDomainInfo1);
+ DomainInfo channel2 = new DomainInfo((DomainInfo)fDomainInfo1);
+ DomainInfo channel3 = new DomainInfo((DomainInfo)fDomainInfo1);
+
+ assertTrue("equals", channel1.equals(channel2));
+ assertTrue("equals", channel2.equals(channel3));
+ assertTrue("equals", channel1.equals(channel3));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fDomainInfo1.equals(null));
+ assertTrue("equals", !fDomainInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ DomainInfo channel1 = new DomainInfo((DomainInfo)fDomainInfo1);
+ DomainInfo channel2 = new DomainInfo((DomainInfo)fDomainInfo2);
+
+ assertTrue("hashCode", fDomainInfo1.hashCode() == channel1.hashCode());
+ assertTrue("hashCode", fDomainInfo2.hashCode() == channel2.hashCode());
+
+ assertTrue("hashCode", fDomainInfo1.hashCode() != channel2.hashCode());
+ assertTrue("hashCode", fDomainInfo2.hashCode() != channel1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>EventInfoTest</code> contains test for the class
+ * <code>{@link EventInfo}</code>.
+ */
+public class EventInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IEventInfo fEventInfo1 = null;
+ private IEventInfo fEventInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fEventInfo1 = factory.getEventInfo1();
+ fEventInfo2 = factory.getEventInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the EventInfo() constructor test.
+ */
+ @Test
+ public void testBaseEventInfo() {
+ EventInfo fixture = new EventInfo("event");
+ assertNotNull(fixture);
+
+ TraceEventType result = fixture.getEventType();
+
+ assertEquals("event", fixture.getName());
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ TraceEnablement state = fixture.getState();
+ assertEquals("disabled", state.getInName());
+ assertEquals("DISABLED", state.name());
+ assertEquals("DISABLED", state.toString());
+ assertEquals(0, state.ordinal());
+
+ LogLevelType logType = fixture.getLogLevelType();
+ assertEquals("", logType.getShortName());
+ assertEquals("LOGLEVEL_NONE", logType.name());
+ assertEquals("LOGLEVEL_NONE", logType.toString());
+ assertEquals(0, state.ordinal());
+
+
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventInfoCopy() {
+ EventInfo info = new EventInfo((EventInfo)fEventInfo1);
+
+ assertEquals(fEventInfo1.getName(), info.getName());
+ assertEquals(fEventInfo1.getEventType(), info.getEventType());
+ assertEquals(fEventInfo1.getState(), info.getState());
+ assertEquals(fEventInfo1.getLogLevelType(), info.getLogLevelType());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventCopy2() {
+ try {
+ EventInfo info = null;
+ new EventInfo(info);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Getter/Setter tests
+ */
+ @Test
+ public void testGetAndSetter() {
+ EventInfo fixture = new EventInfo("event");
+
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+ TraceEventType result = fixture.getEventType();
+
+ // setEventType(TraceEventType type)
+ assertNotNull(result);
+ assertEquals("tracepoint", result.getInName());
+ assertEquals("TRACEPOINT", result.name());
+ assertEquals("TRACEPOINT", result.toString());
+ assertEquals(0, result.ordinal());
+
+ fixture.setEventType(TraceEventType.UNKNOWN);
+ result = fixture.getEventType();
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ // setEventType(String typeName)
+ String typeName = "";
+ fixture.setEventType(typeName);
+ result = fixture.getEventType();
+
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ typeName = "unknown";
+
+ fixture.setEventType(typeName);
+ result = fixture.getEventType();
+
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ // setState(String stateName)
+ fixture.setState("disabled");
+ TraceEnablement state = fixture.getState();
+ assertEquals("disabled", state.getInName());
+ assertEquals("DISABLED", state.name());
+ assertEquals("DISABLED", state.toString());
+ assertEquals(0, state.ordinal());
+
+ fixture.setState("false");
+ state = fixture.getState();
+ assertEquals("false", state.getInMiName());
+ assertEquals("DISABLED", state.name());
+ assertEquals("DISABLED", state.toString());
+ assertEquals(0, state.ordinal());
+
+ fixture.setState("bla");
+ state = fixture.getState();
+ assertEquals("disabled", state.getInName());
+ assertEquals("DISABLED", state.name());
+ assertEquals("DISABLED", state.toString());
+ assertEquals(0, state.ordinal());
+
+ fixture.setState("enabled");
+ state = fixture.getState();
+ assertEquals("enabled", state.getInName());
+ assertEquals("ENABLED", state.name());
+ assertEquals("ENABLED", state.toString());
+ assertEquals(1, state.ordinal());
+
+ fixture.setState("true");
+ state = fixture.getState();
+ assertEquals("true", state.getInMiName());
+ assertEquals("ENABLED", state.name());
+ assertEquals("ENABLED", state.toString());
+ assertEquals(1, state.ordinal());
+
+ // setState(TraceEnablement state)
+ fixture.setState(TraceEnablement.DISABLED);
+ state = fixture.getState();
+ assertEquals("disabled", state.getInName());
+ assertEquals("DISABLED", state.name());
+ assertEquals("DISABLED", state.toString());
+ assertEquals(0, state.ordinal());
+
+ fixture.setState(TraceEnablement.ENABLED);
+ state = fixture.getState();
+ assertEquals("enabled", state.getInName());
+ assertEquals("ENABLED", state.name());
+ assertEquals("ENABLED", state.toString());
+ assertEquals(1, state.ordinal());
+
+ // setLogLevelType(String name)
+ fixture.setLogLevelType("==");
+ assertEquals("LOGLEVEL_ONLY", fixture.getLogLevelType().name());
+ assertEquals("==", fixture.getLogLevelType().getShortName());
+
+ fixture.setLogLevelType("<=");
+ assertEquals("LOGLEVEL", fixture.getLogLevelType().name());
+ assertEquals("<=", fixture.getLogLevelType().getShortName());
+
+ fixture.setLogLevelType("");
+ assertEquals("LOGLEVEL_ALL", fixture.getLogLevelType().name());
+ assertEquals("", fixture.getLogLevelType().getShortName());
+
+ fixture.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
+ assertEquals("LOGLEVEL_ONLY", fixture.getLogLevelType().name());
+ assertEquals("==", fixture.getLogLevelType().getShortName());
+
+ fixture.setLogLevelType(LogLevelType.LOGLEVEL);
+ assertEquals("LOGLEVEL", fixture.getLogLevelType().name());
+ assertEquals("<=", fixture.getLogLevelType().getShortName());
+
+ fixture.setLogLevelType(LogLevelType.LOGLEVEL_ALL);
+ assertEquals("LOGLEVEL_ALL", fixture.getLogLevelType().name());
+ assertEquals("", fixture.getLogLevelType().getShortName());
+
+ fixture.setLogLevelType(LogLevelType.LOGLEVEL_NONE);
+ assertEquals("LOGLEVEL_NONE", fixture.getLogLevelType().name());
+ assertEquals("", fixture.getLogLevelType().getShortName());
+
+ // setLogLevelType(String name)
+ // machine interface
+ fixture.setLogLevelType("SINGLE");
+ assertEquals("LOGLEVEL_ONLY", fixture.getLogLevelType().name());
+ assertEquals("SINGLE", fixture.getLogLevelType().getMiName());
+
+ fixture.setLogLevelType("RANGE");
+ assertEquals("LOGLEVEL", fixture.getLogLevelType().name());
+ assertEquals("RANGE", fixture.getLogLevelType().getMiName());
+
+ fixture.setLogLevelType("ALL");
+ assertEquals("LOGLEVEL_ALL", fixture.getLogLevelType().name());
+ assertEquals("ALL", fixture.getLogLevelType().getMiName());
+
+ fixture.setLogLevelType("UNKNOWN");
+ assertEquals("LOGLEVEL_NONE", fixture.getLogLevelType().name());
+ assertEquals("UNKNOWN", fixture.getLogLevelType().getMiName());
+
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ EventInfo fixture = new EventInfo("event");
+ fixture.setName("testName");
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("[EventInfo([BaseEventInfo([TraceInfo(Name=testName)],type=TRACEPOINT,level=TRACE_DEBUG)],State=DISABLED,levelType=LOGLEVEL_NONE)]", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_2() {
+ EventInfo fixture = new EventInfo("event");
+ fixture.setName("testName");
+ fixture.setEventType(TraceEventType.TRACEPOINT);
+ fixture.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("[EventInfo([BaseEventInfo([TraceInfo(Name=testName)],type=TRACEPOINT,level=TRACE_DEBUG)],State=DISABLED,levelType=LOGLEVEL_ONLY)]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fEventInfo1.equals(fEventInfo1));
+ assertTrue("equals", fEventInfo2.equals(fEventInfo2));
+
+ assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
+ assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
+ EventInfo info2 = new EventInfo((EventInfo)fEventInfo2);
+
+ assertTrue("equals", info1.equals(fEventInfo1));
+ assertTrue("equals", fEventInfo1.equals(info1));
+
+ assertTrue("equals", info2.equals(fEventInfo2));
+ assertTrue("equals", fEventInfo2.equals(info2));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
+ EventInfo info2 = new EventInfo((EventInfo)fEventInfo1);
+ EventInfo info3 = new EventInfo((EventInfo)fEventInfo1);
+
+ assertTrue("equals", info1.equals(info2));
+ assertTrue("equals", info2.equals(info3));
+ assertTrue("equals", info1.equals(info3));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fEventInfo1.equals(null));
+ assertTrue("equals", !fEventInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ EventInfo info1 = new EventInfo((EventInfo)fEventInfo1);
+ EventInfo info2 = new EventInfo((EventInfo)fEventInfo2);
+
+ assertTrue("hashCode", fEventInfo1.hashCode() == info1.hashCode());
+ assertTrue("hashCode", fEventInfo2.hashCode() == info2.hashCode());
+
+ assertTrue("hashCode", fEventInfo1.hashCode() != info2.hashCode());
+ assertTrue("hashCode", fEventInfo2.hashCode() != info1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>FieldInfoTest</code> contains test for the class
+ * <code>{@link FieldInfo}</code>.
+ */
+public class FieldInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IFieldInfo fFieldInfo1 = null;
+ private IFieldInfo fFieldInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fFieldInfo1 = factory.getFieldInfo1();
+ fFieldInfo2 = factory.getFieldInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the BaseEventInfo() constructor test.
+ */
+ @Test
+ public void testFiledInfo() {
+ FieldInfo fixture = new FieldInfo("field");
+ assertNotNull(fixture);
+
+ assertEquals("field", fixture.getName());
+ assertNull(fixture.getFieldType());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventInfoCopy() {
+ FieldInfo info = new FieldInfo((FieldInfo)fFieldInfo1);
+
+ assertEquals(fFieldInfo1.getName(), info.getName());
+ assertEquals(fFieldInfo1.getFieldType(), info.getFieldType());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventCopy2() {
+ try {
+ FieldInfo info = null;
+ new FieldInfo(info);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the TraceEventType getEventType() method test.
+ */
+ @Test
+ public void testSetFieldType() {
+ FieldInfo info = new FieldInfo((FieldInfo)fFieldInfo1);
+
+ info.setFieldType("string");
+ assertEquals("string", info.getFieldType());
+ }
+
+ /**
+ * Run the toString() method test.
+ */
+ @Test
+ public void testToString() {
+ String result = fFieldInfo1.toString();
+
+ // add additional test code here
+ assertEquals("[FieldInfo([TraceInfo(Name=intfield)],type=int", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fFieldInfo1.equals(fFieldInfo1));
+ assertTrue("equals", fFieldInfo2.equals(fFieldInfo2));
+
+ assertTrue("equals", !fFieldInfo1.equals(fFieldInfo2));
+ assertTrue("equals", !fFieldInfo2.equals(fFieldInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ FieldInfo info1 = new FieldInfo((FieldInfo)fFieldInfo1);
+ FieldInfo info2 = new FieldInfo((FieldInfo)fFieldInfo2);
+
+ assertTrue("equals", info1.equals(fFieldInfo1));
+ assertTrue("equals", fFieldInfo1.equals(info1));
+
+ assertTrue("equals", info2.equals(fFieldInfo2));
+ assertTrue("equals", fFieldInfo2.equals(info2));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ FieldInfo info1 = new FieldInfo((FieldInfo)fFieldInfo1);
+ FieldInfo info2 = new FieldInfo((FieldInfo)fFieldInfo1);
+ FieldInfo info3 = new FieldInfo((FieldInfo)fFieldInfo1);
+
+ assertTrue("equals", info1.equals(info2));
+ assertTrue("equals", info2.equals(info3));
+ assertTrue("equals", info1.equals(info3));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fFieldInfo1.equals(null));
+ assertTrue("equals", !fFieldInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testHashCode() {
+ FieldInfo info1 = new FieldInfo((FieldInfo)fFieldInfo1);
+ FieldInfo info2 = new FieldInfo((FieldInfo)fFieldInfo2);
+
+ assertTrue("hashCode", fFieldInfo1.hashCode() == info1.hashCode());
+ assertTrue("hashCode", fFieldInfo2.hashCode() == info2.hashCode());
+
+ assertTrue("hashCode", fFieldInfo1.hashCode() != info2.hashCode());
+ assertTrue("hashCode", fFieldInfo2.hashCode() != info1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
+
+/**
+ * Test facility to constants across test case
+ */
+@SuppressWarnings("javadoc")
+public class ModelImplFactory {
+
+ private ISessionInfo fSessionInfo1 = null;
+ private ISessionInfo fSessionInfo2 = null;
+ private IDomainInfo fDomainInfo1 = null;
+ private IDomainInfo fDomainInfo2 = null;
+ private IChannelInfo fChannelInfo1 = null;
+ private IChannelInfo fChannelInfo2 = null;
+ private IEventInfo fEventInfo1 = null;
+ private IEventInfo fEventInfo2 = null;
+ private IEventInfo fEventInfo3 = null;
+ private IFieldInfo fFieldInfo1 = null;
+ private IFieldInfo fFieldInfo2 = null;
+ private IBaseEventInfo fBaseEventInfo1 = null;
+ private IBaseEventInfo fBaseEventInfo2 = null;
+ private IUstProviderInfo fUstProviderInfo1 = null;
+ private IUstProviderInfo fUstProviderInfo2 = null;
+ private IProbeEventInfo fProbeEventInfo1 = null;
+ private IProbeEventInfo fProbeEventInfo2 = null;
+ private ISnapshotInfo fSnapshotInfo1 = null;
+ private ISnapshotInfo fSnapshotInfo2 = null;
+
+ public ModelImplFactory() {
+
+ fFieldInfo1 = new FieldInfo("intfield");
+ fFieldInfo1.setFieldType("int");
+ fFieldInfo2 = new FieldInfo("stringfield");
+ fFieldInfo2.setFieldType("string");
+
+ fBaseEventInfo1 = new BaseEventInfo("event1");
+ fBaseEventInfo1.setEventType(TraceEventType.UNKNOWN);
+ fBaseEventInfo1.setLogLevel(TraceLogLevel.TRACE_ERR);
+ fBaseEventInfo1.addField(fFieldInfo1);
+ fBaseEventInfo1.addField(fFieldInfo2);
+ fBaseEventInfo1.setFilterExpression("intField==10");
+
+ fBaseEventInfo2 = new BaseEventInfo("event2");
+ fBaseEventInfo2.setEventType(TraceEventType.TRACEPOINT);
+ fBaseEventInfo1.setLogLevel(TraceLogLevel.TRACE_DEBUG);
+
+ fEventInfo1 = new EventInfo("event1");
+ fEventInfo1.setEventType(TraceEventType.TRACEPOINT);
+ fEventInfo1.setLogLevelType("==");
+ fEventInfo1.setLogLevel(TraceLogLevel.TRACE_DEBUG);
+ fEventInfo1.setState(TraceEnablement.ENABLED);
+
+ fEventInfo2 = new EventInfo("event2");
+ fEventInfo2.setLogLevelType("<=");
+ fEventInfo2.setLogLevel(TraceLogLevel.TRACE_INFO);
+ fEventInfo2.setEventType(TraceEventType.UNKNOWN);
+ fEventInfo2.setState(TraceEnablement.DISABLED);
+
+ fEventInfo3 = new EventInfo("event3");
+ fEventInfo3.setEventType(TraceEventType.TRACEPOINT);
+ fEventInfo3.setState(TraceEnablement.DISABLED);
+
+ fUstProviderInfo1 = new UstProviderInfo("myUST1");
+ fUstProviderInfo1.setPid(1234);
+ fUstProviderInfo1.addEvent(fBaseEventInfo1);
+
+ fUstProviderInfo2 = new UstProviderInfo("myUST2");
+ fUstProviderInfo2.setPid(2345);
+ fUstProviderInfo2.addEvent(fBaseEventInfo1);
+ fUstProviderInfo2.addEvent(fBaseEventInfo2);
+
+ fChannelInfo1 = new ChannelInfo("channel1");
+ fChannelInfo1.setSwitchTimer(10L);
+ fChannelInfo1.setOverwriteMode(true);
+ fChannelInfo1.setReadTimer(11L);
+ fChannelInfo1.setState(TraceEnablement.DISABLED);
+ fChannelInfo1.setNumberOfSubBuffers(12);
+ fChannelInfo1.setOutputType("splice()");
+ fChannelInfo1.setSubBufferSize(13L);
+ fChannelInfo1.addEvent(fEventInfo1);
+
+ fChannelInfo2 = new ChannelInfo("channel2");
+ fChannelInfo2.setSwitchTimer(1L);
+ fChannelInfo2.setOverwriteMode(false);
+ fChannelInfo2.setReadTimer(2L);
+ fChannelInfo2.setState(TraceEnablement.ENABLED);
+ fChannelInfo2.setNumberOfSubBuffers(3);
+ fChannelInfo2.setOutputType("mmap()");
+ fChannelInfo2.setSubBufferSize(4L);
+ fChannelInfo2.addEvent(fEventInfo2);
+ fChannelInfo2.addEvent(fEventInfo3);
+
+ fDomainInfo1 = new DomainInfo("test1");
+ fDomainInfo1.addChannel(fChannelInfo1);
+
+ fDomainInfo2 = new DomainInfo("test2");
+ fDomainInfo2.addChannel(fChannelInfo1);
+ fDomainInfo2.addChannel(fChannelInfo2);
+
+ fSessionInfo1 = new SessionInfo("session1");
+ fSessionInfo1.setSessionPath("/home/user");
+ fSessionInfo1.setSessionState(TraceSessionState.ACTIVE);
+ fSessionInfo1.addDomain(fDomainInfo1);
+
+ fSessionInfo2 = new SessionInfo("session2");
+ fSessionInfo2.setSessionPath("/home/user1");
+ fSessionInfo2.setSessionState(TraceSessionState.INACTIVE);
+ fSessionInfo2.addDomain(fDomainInfo1);
+ fSessionInfo2.addDomain(fDomainInfo2);
+ fSessionInfo2.setStreamedTrace(true);
+
+ fProbeEventInfo1 = new ProbeEventInfo("probeEvent1");
+ fProbeEventInfo1.setEventType(TraceEventType.TRACEPOINT);
+ fProbeEventInfo1.setState(TraceEnablement.ENABLED);
+ fProbeEventInfo1.setAddress("0xc1231234");
+
+ fProbeEventInfo2 = new ProbeEventInfo("probeEvent2");
+ fProbeEventInfo2.setEventType(TraceEventType.FUNCTION);
+ fProbeEventInfo2.setState(TraceEnablement.DISABLED);
+ fProbeEventInfo2.setOffset("0x100");
+ fProbeEventInfo2.setSymbol("init_post");
+
+ fSnapshotInfo1 = new SnapshotInfo("snapshot-1");
+ fSnapshotInfo1.setId(1);
+ fSnapshotInfo1.setSnapshotPath("/home/user/lttng-trace/mysession/");
+ fSnapshotInfo2 = new SnapshotInfo("other-snapshot");
+ fSnapshotInfo2.setId(1);
+ fSnapshotInfo2.setSnapshotPath("net4://172.0.0.1:1234/");
+ fSnapshotInfo2.setStreamedSnapshot(true);
+
+ fSessionInfo1.setSnapshotInfo(fSnapshotInfo1);
+ }
+
+ public ISessionInfo getSessionInfo1() {
+ return fSessionInfo1;
+ }
+
+ public ISessionInfo getSessionInfo2() {
+ return fSessionInfo2;
+ }
+
+ public IDomainInfo getDomainInfo1() {
+ return fDomainInfo1;
+ }
+
+ public IDomainInfo getDomainInfo2() {
+ return fDomainInfo2;
+ }
+
+ public IChannelInfo getChannel1() {
+ return fChannelInfo1;
+ }
+
+ public IChannelInfo getChannel2() {
+ return fChannelInfo2;
+ }
+
+ public IEventInfo getEventInfo1() {
+ return fEventInfo1;
+ }
+
+ public IEventInfo getEventInfo2() {
+ return fEventInfo2;
+ }
+
+ public IEventInfo getEventInfo3() {
+ return fEventInfo3;
+ }
+
+ public IBaseEventInfo getBaseEventInfo1() {
+ return fBaseEventInfo1;
+ }
+
+ public IBaseEventInfo getBaseEventInfo2() {
+ return fBaseEventInfo2;
+ }
+
+ public IUstProviderInfo getUstProviderInfo1() {
+ return fUstProviderInfo1;
+ }
+
+ public IUstProviderInfo getUstProviderInfo2() {
+ return fUstProviderInfo2;
+ }
+
+ public IProbeEventInfo getProbeEventInfo1() {
+ return fProbeEventInfo1;
+ }
+
+ public IProbeEventInfo getProbeEventInfo2() {
+ return fProbeEventInfo2;
+ }
+
+ public IFieldInfo getFieldInfo1() {
+ return fFieldInfo1;
+ }
+
+ public IFieldInfo getFieldInfo2() {
+ return fFieldInfo2;
+ }
+
+ public ISnapshotInfo getSnapshotInfo1() {
+ return fSnapshotInfo1;
+ }
+
+ public ISnapshotInfo getSnapshotInfo2() {
+ return fSnapshotInfo2;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>ProbEventInfoTest</code> contains test for the class
+ * <code>{@link ProbeEventInfo}</code>.
+ */
+public class ProbeEventInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IProbeEventInfo fEventInfo1 = null;
+ private IProbeEventInfo fEventInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fEventInfo1 = factory.getProbeEventInfo1();
+ fEventInfo2 = factory.getProbeEventInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the BaseEventInfo() constructor test.
+ */
+ @Test
+ public void testBaseEventInfo() {
+ ProbeEventInfo fixture = new ProbeEventInfo("event");
+ assertNotNull(fixture);
+
+ TraceEventType result = fixture.getEventType();
+
+ assertEquals("event", fixture.getName());
+ assertEquals("unknown", result.getInName());
+ assertEquals("UNKNOWN", result.name());
+ assertEquals("UNKNOWN", result.toString());
+ assertEquals(4, result.ordinal());
+
+ TraceEnablement state = fixture.getState();
+ assertEquals("disabled", state.getInName());
+ assertEquals("DISABLED", state.name());
+ assertEquals("DISABLED", state.toString());
+ assertEquals(0, state.ordinal());
+
+ assertNull(fixture.getAddress());
+ assertNull(fixture.getOffset());
+ assertNull(fixture.getSymbol());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventInfoCopy() {
+ ProbeEventInfo info = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
+
+ assertEquals(fEventInfo1.getName(), info.getName());
+ assertEquals(fEventInfo1.getEventType(), info.getEventType());
+ assertEquals(fEventInfo1.getState(), info.getState());
+ assertEquals(fEventInfo1.getAddress(), info.getAddress());
+ assertEquals(fEventInfo1.getOffset(), info.getOffset());
+ assertEquals(fEventInfo1.getSymbol(), info.getSymbol());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testEventCopy2() {
+ try {
+ ProbeEventInfo info = null;
+ new ProbeEventInfo(info);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Getter/Setter tests
+ */
+ @Test
+ public void testGetAndSetter() {
+ ProbeEventInfo fixture = new ProbeEventInfo("event");
+
+ fixture.setAddress("0xc12344321");
+ String result = fixture.getAddress();
+
+ assertNotNull(result);
+ assertEquals("0xc12344321", result);
+
+ fixture.setOffset("0x1000");
+ result = fixture.getOffset();
+
+ assertNotNull(result);
+ assertEquals("0x1000", result);
+
+ fixture.setSymbol("cpu_idle");
+ result = fixture.getSymbol();
+
+ assertNotNull(result);
+ assertEquals("cpu_idle", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ assertEquals("[ProbeEventInfo([EventInfo([BaseEventInfo([TraceInfo(Name=probeEvent1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_NONE)],fAddress=0xc1231234)]", fEventInfo1.toString());
+ assertEquals("[ProbeEventInfo([EventInfo([BaseEventInfo([TraceInfo(Name=probeEvent2)],type=FUNCTION,level=TRACE_DEBUG)],State=DISABLED,levelType=LOGLEVEL_NONE)],fOffset=0x100,fSymbol=init_post)]", fEventInfo2.toString());
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fEventInfo1.equals(fEventInfo1));
+ assertTrue("equals", fEventInfo2.equals(fEventInfo2));
+
+ assertTrue("equals", !fEventInfo1.equals(fEventInfo2));
+ assertTrue("equals", !fEventInfo2.equals(fEventInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
+ ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo2);
+
+ assertTrue("equals", info1.equals(fEventInfo1));
+ assertTrue("equals", fEventInfo1.equals(info1));
+
+ assertTrue("equals", info2.equals(fEventInfo2));
+ assertTrue("equals", fEventInfo2.equals(info2));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
+ ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
+ ProbeEventInfo info3 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
+
+ assertTrue("equals", info1.equals(info2));
+ assertTrue("equals", info2.equals(info3));
+ assertTrue("equals", info1.equals(info3));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fEventInfo1.equals(null));
+ assertTrue("equals", !fEventInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ ProbeEventInfo info1 = new ProbeEventInfo((ProbeEventInfo)fEventInfo1);
+ ProbeEventInfo info2 = new ProbeEventInfo((ProbeEventInfo)fEventInfo2);
+
+ assertTrue("hashCode", fEventInfo1.hashCode() == info1.hashCode());
+ assertTrue("hashCode", fEventInfo2.hashCode() == info2.hashCode());
+
+ assertTrue("hashCode", fEventInfo1.hashCode() != info2.hashCode());
+ assertTrue("hashCode", fEventInfo2.hashCode() != info1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>ChannelInfoTest</code> contains tests for the class
+ * <code>{@link SessionInfo}</code>.
+ */
+public class SessionInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private ISessionInfo fSessionInfo1 = null;
+ private ISessionInfo fSessionInfo2 = null;
+
+ private IDomainInfo fDomainInfo1 = null;
+ private IDomainInfo fDomainInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fSessionInfo1 = factory.getSessionInfo1();
+ fDomainInfo1 = factory.getDomainInfo1();
+ fSessionInfo2 = factory.getSessionInfo2();
+ fDomainInfo2 = factory.getDomainInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the ChannelInfo() constructor test.
+ */
+ @Test
+ public void testSessionInfo() {
+ ISessionInfo result = new SessionInfo("test");
+ assertNotNull(result);
+
+ assertEquals("test", result.getName());
+ assertEquals("", result.getSessionPath());
+ TraceSessionState state = result.getSessionState();
+ assertEquals("inactive", state.getInName());
+ assertEquals("INACTIVE", state.name());
+ assertEquals("INACTIVE", state.toString());
+ assertEquals(0, state.ordinal());
+ assertEquals(0, result.getDomains().length);
+ assertFalse(result.isSnapshotSession());
+ assertNull(result.getNetworkUrl());
+ assertNull(result.getControlUrl());
+ assertNull(result.getDataUrl());
+ }
+
+ /**
+ * Test copy constructor.
+ */
+ @Test
+ public void testSessionInfoCopy() {
+ SessionInfo sessionInfo = new SessionInfo((SessionInfo)fSessionInfo1);
+
+ assertEquals(sessionInfo.getName(), fSessionInfo1.getName());
+ assertEquals(sessionInfo.getSessionPath(), fSessionInfo1.getSessionPath());
+ assertEquals(sessionInfo.getSessionState(), fSessionInfo1.getSessionState());
+
+ IDomainInfo[] orignalDomains = fSessionInfo1.getDomains();
+ IDomainInfo[] resultDomains = sessionInfo.getDomains();
+ for (int i = 0; i < orignalDomains.length; i++) {
+ assertEquals(orignalDomains[i], resultDomains[i]);
+ }
+
+ assertEquals(sessionInfo.getNetworkUrl(), fSessionInfo1.getNetworkUrl());
+ assertEquals(sessionInfo.getControlUrl(), fSessionInfo1.getControlUrl());
+ assertEquals(sessionInfo.getDataUrl(), fSessionInfo1.getDataUrl());
+ }
+
+ /**
+ * Test copy constructor.
+ */
+ @Test
+ public void testSessionCopy2() {
+ try {
+ SessionInfo session = null;
+ new SessionInfo(session);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the long getNumberOfSubBuffers() method test.
+ */
+ @Test
+ public void testGetAndSetters() {
+
+ // Note that addDomain() has been executed in setUp()
+ // check get method here
+ assertEquals(1, fSessionInfo1.getDomains().length);
+ assertNotNull(fSessionInfo1.getDomains()[0]);
+ assertEquals(fDomainInfo1, fSessionInfo1.getDomains()[0]);
+
+ ISessionInfo session = new SessionInfo("session");
+ List<IDomainInfo> list = new LinkedList<>();
+ list.add(fDomainInfo1);
+ list.add(fDomainInfo2);
+ session.setDomains(list);
+
+ IDomainInfo[] result = session.getDomains();
+ assertEquals(2, result.length);
+ assertEquals(fDomainInfo1, result[0]);
+ assertEquals(fDomainInfo2, result[1]);
+
+ session.setSessionPath("/home/user");
+ assertEquals("/home/user", session.getSessionPath());
+
+ session.setSessionState("active");
+ TraceSessionState state = session.getSessionState();
+ state = session.getSessionState();
+ assertEquals("active", state.getInName());
+ assertEquals("ACTIVE", state.name());
+ assertEquals("ACTIVE", state.toString());
+ assertEquals(1, state.ordinal());
+
+ session.setSessionState("inactive");
+ state = session.getSessionState();
+ assertEquals("inactive", state.getInName());
+ assertEquals("INACTIVE", state.name());
+ assertEquals("INACTIVE", state.toString());
+ assertEquals(0, state.ordinal());
+
+ session.setSessionState("test");
+ state = session.getSessionState();
+ assertEquals("inactive", state.getInName());
+ assertEquals("INACTIVE", state.name());
+ assertEquals("INACTIVE", state.toString());
+ assertEquals(0, state.ordinal());
+
+ session.setSessionState(TraceSessionState.ACTIVE);
+ state = session.getSessionState();
+ assertEquals("active", state.getInName());
+ assertEquals("ACTIVE", state.name());
+ assertEquals("ACTIVE", state.toString());
+ assertEquals(1, state.ordinal());
+
+ session.setSessionState(TraceSessionState.INACTIVE);
+ state = session.getSessionState();
+ assertEquals("inactive", state.getInName());
+ assertEquals("INACTIVE", state.name());
+ assertEquals("INACTIVE", state.toString());
+ assertEquals(0, state.ordinal());
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ ISessionInfo fixture = new SessionInfo("sessionName");
+
+ String result = fixture.toString();
+
+ // add additional test code here
+ assertEquals("[SessionInfo([TraceInfo(Name=sessionName)],Path=,State=INACTIVE,isStreamedTrace=false,isSnapshot=false,Domains=,NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_2() {
+ String result = fSessionInfo1.toString();
+
+ // add additional test code here
+ assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,isSnapshot=false,snapshotInfo="
+ + "[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)],"
+ + "Domains=[DomainInfo([TraceInfo(Name=test1)],"
+ + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),"
+ + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])],"
+ + "isKernel=false)],NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_3() {
+ SessionInfo info = new SessionInfo((SessionInfo)fSessionInfo1);
+ info.setSnapshot(false);
+ info.setSnapshotInfo(null);
+ info.setSessionPath("/home/user/lttng-trace/mysession/");
+
+ String result = info.toString();
+
+ // add additional test code here
+ assertEquals("[SessionInfo([TraceInfo(Name=session1)],Path=/home/user/lttng-trace/mysession/,State=ACTIVE,isStreamedTrace=false,isSnapshot=false,"
+ + "Domains=[DomainInfo([TraceInfo(Name=test1)],"
+ + "Channels=[ChannelInfo([TraceInfo(Name=channel1)],State=DISABLED,OverwriteMode=true,SubBuffersSize=13,NumberOfSubBuffers=12,SwitchTimer=10,ReadTimer=11,output=splice(),"
+ + "Events=[EventInfo([BaseEventInfo([TraceInfo(Name=event1)],type=TRACEPOINT,level=TRACE_DEBUG)],State=ENABLED,levelType=LOGLEVEL_ONLY)])],"
+ + "isKernel=false)],NetworkUrl=null,ControlUrl=null,DataUrl=null)]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the {@link SessionInfo#equals} method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fSessionInfo1.equals(fSessionInfo1));
+ assertTrue("equals", fSessionInfo2.equals(fSessionInfo2));
+
+ assertTrue("equals", !fSessionInfo1.equals(fSessionInfo2));
+ assertTrue("equals", !fSessionInfo2.equals(fSessionInfo1));
+ }
+
+ /**
+ * Run the {@link SessionInfo#equals} method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ SessionInfo event1 = new SessionInfo((SessionInfo)fSessionInfo1);
+ SessionInfo event2 = new SessionInfo((SessionInfo)fSessionInfo2);
+
+ assertTrue("equals", event1.equals(fSessionInfo1));
+ assertTrue("equals", fSessionInfo1.equals(event1));
+
+ assertTrue("equals", event2.equals(fSessionInfo2));
+ assertTrue("equals", fSessionInfo2.equals(event2));
+ }
+
+ /**
+ * Run the {@link SessionInfo#equals} method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ SessionInfo channel1 = new SessionInfo((SessionInfo)fSessionInfo1);
+ SessionInfo channel2 = new SessionInfo((SessionInfo)fSessionInfo1);
+ SessionInfo channel3 = new SessionInfo((SessionInfo)fSessionInfo1);
+
+ assertTrue("equals", channel1.equals(channel2));
+ assertTrue("equals", channel2.equals(channel3));
+ assertTrue("equals", channel1.equals(channel3));
+ }
+
+ /**
+ * Run the {@link SessionInfo#equals} method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fSessionInfo1.equals(null));
+ assertTrue("equals", !fSessionInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the {@link SessionInfo#hashCode} method test.
+ */
+ @Test
+ public void testHashCode() {
+ SessionInfo channel1 = new SessionInfo((SessionInfo)fSessionInfo1);
+ SessionInfo channel2 = new SessionInfo((SessionInfo)fSessionInfo2);
+
+ assertTrue("hashCode", fSessionInfo1.hashCode() == channel1.hashCode());
+ assertTrue("hashCode", fSessionInfo2.hashCode() == channel2.hashCode());
+
+ assertTrue("hashCode", fSessionInfo1.hashCode() != channel2.hashCode());
+ assertTrue("hashCode", fSessionInfo2.hashCode() != channel1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.TraceInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>SnapshotInfoTest</code> contains test for the class
+ * <code>{@link SnapshotInfo}</code>.
+ */
+public class SnapshotInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private ISnapshotInfo fSnapshotInfo1 = null;
+ private ISnapshotInfo fSnapshotInfo2 = null;
+
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fSnapshotInfo1 = factory.getSnapshotInfo1();
+ fSnapshotInfo2 = factory.getSnapshotInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor test.
+ */
+ @Test
+ public void testSnapshotInfo() {
+ SnapshotInfo fixture = new SnapshotInfo("event");
+ assertNotNull(fixture);
+ assertEquals("event", fixture.getName());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testSnapshotInfo2() {
+ try {
+ String name = null;
+ new SnapshotInfo(name);
+ fail("null name in custructor");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testSnapshotCopy() {
+ SnapshotInfo info = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
+
+ assertEquals(fSnapshotInfo1.getName(), info.getName());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testTraceCopy2() {
+ try {
+ SnapshotInfo info = null;
+ new SnapshotInfo(info);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the void setEventType(String) method test.
+ */
+ @Test
+ public void testSetName() {
+ SnapshotInfo fixture = new SnapshotInfo("event");
+ fixture.setName("newName");
+ assertEquals("newName", fixture.getName());
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ String result = fSnapshotInfo1.toString();
+
+ // add additional test code here
+ assertEquals("[SnapshotInfo([TraceInfo(Name=snapshot-1)],snapshotPath=/home/user/lttng-trace/mysession/,ID=1,isStreamedSnapshot=false)]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fSnapshotInfo1.equals(fSnapshotInfo1));
+ assertTrue("equals", fSnapshotInfo2.equals(fSnapshotInfo2));
+
+ assertTrue("equals", !fSnapshotInfo1.equals(fSnapshotInfo2));
+ assertTrue("equals", !fSnapshotInfo2.equals(fSnapshotInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
+ SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo2);
+
+ assertTrue("equals", info1.equals(fSnapshotInfo1));
+ assertTrue("equals", fSnapshotInfo1.equals(info1));
+
+ assertTrue("equals", info2.equals(fSnapshotInfo2));
+ assertTrue("equals", fSnapshotInfo2.equals(info2));
+ }
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
+ SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
+ SnapshotInfo info3 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
+
+ assertTrue("equals", info1.equals(info2));
+ assertTrue("equals", info2.equals(info3));
+ assertTrue("equals", info1.equals(info3));
+ }
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fSnapshotInfo1.equals(null));
+ assertTrue("equals", !fSnapshotInfo2.equals(null));
+
+ SnapshotInfo info = new SnapshotInfo("snapshot-1");
+ assertTrue("equals", !fSnapshotInfo1.equals(info));
+
+ info.setSnapshotPath(null);
+ assertTrue("equals", !fSnapshotInfo1.equals(info));
+
+ info.setId(fSnapshotInfo1.getId());
+ assertTrue("equals", !info.equals(fSnapshotInfo1));
+
+ info.setSnapshotPath("/home/user/lttng-trace/mysession/");
+ assertTrue("equals", fSnapshotInfo1.equals(info));
+ info.setId(2);
+ assertTrue("equals", !fSnapshotInfo1.equals(info));
+
+ info.setId(fSnapshotInfo1.getId());
+ info.setStreamedSnapshot(true);
+ assertTrue("equals", !fSnapshotInfo1.equals(info));
+
+ assertTrue("equals", !fSnapshotInfo1.equals(new TraceInfo(fSnapshotInfo1.getName())));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ SnapshotInfo info1 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo1);
+ SnapshotInfo info2 = new SnapshotInfo((SnapshotInfo)fSnapshotInfo2);
+
+ assertTrue("hashCode", fSnapshotInfo1.hashCode() == info1.hashCode());
+ assertTrue("hashCode", fSnapshotInfo2.hashCode() == info2.hashCode());
+
+ assertTrue("hashCode", fSnapshotInfo1.hashCode() != info2.hashCode());
+ assertTrue("hashCode", fSnapshotInfo2.hashCode() != info1.hashCode());
+
+ // null values
+ SnapshotInfo info3 = new SnapshotInfo("snapshot-1");
+ assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode());
+
+ info3.setSnapshotPath(null);
+ assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode());
+
+ info3.setSnapshotPath("/home/user/lttng-trace/mysession/");
+ assertTrue("hashCode", fSnapshotInfo1.hashCode() != info3.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ITraceInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.TraceInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>TraceInfoTest</code> contains test for the class
+ * <code>{@link TraceInfo}</code>.
+ */
+public class TraceInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private ITraceInfo fTraceInfo1 = null;
+ private ITraceInfo fTraceInfo2 = null;
+
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ fTraceInfo1 = new TraceInfo("event1");
+ fTraceInfo2 = new TraceInfo("event2");
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the BaseEventInfo() constructor test.
+ */
+ @Test
+ public void testTraceInfo() {
+ TraceInfo fixture = new TraceInfo("event");
+ assertNotNull(fixture);
+
+ assertEquals("event", fixture.getName());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testTraceInfo2() {
+ try {
+ String name = null;
+ new TraceInfo(name);
+ fail("null name in custructor");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testTraceInfoCopy() {
+ TraceInfo info = new TraceInfo((TraceInfo)fTraceInfo1);
+
+ assertEquals(fTraceInfo1.getName(), info.getName());
+ }
+
+ /**
+ * Test Copy Constructor
+ */
+ @Test
+ public void testTraceCopy2() {
+ try {
+ TraceInfo info = null;
+ new TraceInfo(info);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the void setEventType(String) method test.
+ */
+ @Test
+ public void testSetName() {
+ TraceInfo fixture = new TraceInfo("event");
+ fixture.setName("newName");
+ assertEquals("newName", fixture.getName());
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ String result = fTraceInfo1.toString();
+
+ // add additional test code here
+ assertEquals("[TraceInfo(Name=event1)]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fTraceInfo1.equals(fTraceInfo1));
+ assertTrue("equals", fTraceInfo2.equals(fTraceInfo2));
+
+ assertTrue("equals", !fTraceInfo1.equals(fTraceInfo2));
+ assertTrue("equals", !fTraceInfo2.equals(fTraceInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
+ TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo2);
+
+ assertTrue("equals", info1.equals(fTraceInfo1));
+ assertTrue("equals", fTraceInfo1.equals(info1));
+
+ assertTrue("equals", info2.equals(fTraceInfo2));
+ assertTrue("equals", fTraceInfo2.equals(info2));
+ }
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
+ TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo1);
+ TraceInfo info3 = new TraceInfo((TraceInfo)fTraceInfo1);
+
+ assertTrue("equals", info1.equals(info2));
+ assertTrue("equals", info2.equals(info3));
+ assertTrue("equals", info1.equals(info3));
+ }
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fTraceInfo1.equals(null));
+ assertTrue("equals", !fTraceInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ TraceInfo info1 = new TraceInfo((TraceInfo)fTraceInfo1);
+ TraceInfo info2 = new TraceInfo((TraceInfo)fTraceInfo2);
+
+ assertTrue("hashCode", fTraceInfo1.hashCode() == info1.hashCode());
+ assertTrue("hashCode", fTraceInfo2.hashCode() == info2.hashCode());
+
+ assertTrue("hashCode", fTraceInfo1.hashCode() != info2.hashCode());
+ assertTrue("hashCode", fTraceInfo2.hashCode() != info1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.model.impl;
+
+import static org.junit.Assert.*;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * The class <code>ChannelInfoTest</code> contains tests for the class
+ * <code>{@link UstProviderInfo}</code>.
+ */
+public class UstProviderInfoTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private IUstProviderInfo fUstProviderInfo1 = null;
+ private IUstProviderInfo fUstProviderInfo2 = null;
+
+ private IBaseEventInfo fEventInfo1 = null;
+ private IBaseEventInfo fEventInfo2 = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ ModelImplFactory factory = new ModelImplFactory();
+ fUstProviderInfo1 = factory.getUstProviderInfo1();
+ fUstProviderInfo2 = factory.getUstProviderInfo2();
+ fEventInfo1 = factory.getBaseEventInfo1();
+ fEventInfo2 = factory.getBaseEventInfo2();
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the UstProviderInfo() constructor test.
+ */
+ @Test
+ public void testUstProviderInfo() {
+ IUstProviderInfo result = new UstProviderInfo("test");
+ assertNotNull(result);
+
+ assertEquals("test", result.getName());
+ assertEquals(0, result.getPid());
+ assertEquals(0, result.getEvents().length);
+ }
+
+ /**
+ * Test the copy constructor.
+ */
+ @Test
+ public void testUstProviderInfoCopy() {
+ IUstProviderInfo providerInf = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
+
+ assertEquals(fUstProviderInfo1.getName(), providerInf.getName());
+ assertEquals(fUstProviderInfo1.getPid(), providerInf.getPid());
+ assertEquals(fUstProviderInfo1.getEvents().length, providerInf.getEvents().length);
+
+ IBaseEventInfo[] orignalEvents = fUstProviderInfo1.getEvents();
+ IBaseEventInfo[] resultEvents = providerInf.getEvents();
+ for (int i = 0; i < orignalEvents.length; i++) {
+ assertEquals(orignalEvents[i], resultEvents[i]);
+ }
+ }
+
+ /**
+ * Test the copy constructor.
+ */
+ @Test
+ public void testUstProviderCopy2() {
+ try {
+ UstProviderInfo providerInfo = null;
+ new UstProviderInfo(providerInfo);
+ fail("null copy");
+ }
+ catch (IllegalArgumentException e) {
+ // Success
+ }
+ }
+
+ /**
+ * Run the IEventInfo[] getEvents() method test.
+ */
+ @Test
+ public void testGetAndSetters() {
+ IUstProviderInfo fixture = new UstProviderInfo("test");
+ fixture.setPid(2468);
+
+ // add an event
+ IBaseEventInfo event = new BaseEventInfo("event");
+ fixture.addEvent(event);
+
+ // Verify the stored events
+ IBaseEventInfo[] result = fixture.getEvents();
+
+ assertNotNull(result);
+ assertEquals(1, result.length);
+ assertNotNull(result[0]);
+ assertTrue(event.equals(result[0]));
+
+ assertEquals(2468, fixture.getPid());
+ }
+
+ /**
+ * Run the void setEvents(List<IBaseEventInfo>) method test.
+ */
+ @Test
+ public void testSetEvents_1() {
+ UstProviderInfo fixture = new UstProviderInfo("test");
+ fixture.setPid(2468);
+ List<IBaseEventInfo> events = new LinkedList<>();
+ events.add(fEventInfo1);
+ events.add(fEventInfo2);
+ fixture.setEvents(events);
+
+ IBaseEventInfo[] infos = fixture.getEvents();
+
+ assertEquals(events.size(), infos.length);
+
+ for (int i = 0; i < infos.length; i++) {
+ assertEquals(events.get(i), infos[i]);
+ }
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_1() {
+ UstProviderInfo fixture = new UstProviderInfo("test");
+ fixture.setPid(2468);
+ String result = fixture.toString();
+
+ assertEquals("[EventInfo([TraceInfo(Name=test)],PID=2468,Events=None)]", result);
+ }
+
+ /**
+ * Run the String toString() method test.
+ */
+ @Test
+ public void testToString_2() {
+ String result = fUstProviderInfo2.toString();
+ assertEquals("[EventInfo([TraceInfo(Name=myUST2)],PID=2345,Events=[BaseEventInfo([TraceInfo(Name=event1)]," +
+ "type=UNKNOWN,level=TRACE_DEBUG,Fields=[FieldInfo([TraceInfo(Name=intfield)],type=int[FieldInfo" +
+ "([TraceInfo(Name=stringfield)],type=string,Filter=intField==10)][BaseEventInfo([TraceInfo(Name=event2)]," +
+ "type=TRACEPOINT,level=TRACE_DEBUG)])]", result);
+ }
+
+ // ------------------------------------------------------------------------
+ // equals
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsReflexivity() {
+ assertTrue("equals", fUstProviderInfo1.equals(fUstProviderInfo1));
+ assertTrue("equals", fUstProviderInfo2.equals(fUstProviderInfo2));
+
+ assertTrue("equals", !fUstProviderInfo1.equals(fUstProviderInfo2));
+ assertTrue("equals", !fUstProviderInfo2.equals(fUstProviderInfo1));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsSymmetry() {
+ UstProviderInfo event1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
+ UstProviderInfo event2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo2);
+
+ assertTrue("equals", event1.equals(fUstProviderInfo1));
+ assertTrue("equals", fUstProviderInfo1.equals(event1));
+
+ assertTrue("equals", event2.equals(fUstProviderInfo2));
+ assertTrue("equals", fUstProviderInfo2.equals(event2));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsTransivity() {
+ UstProviderInfo UstProvider1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
+ UstProviderInfo UstProvider2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
+ UstProviderInfo UstProvider3 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
+
+ assertTrue("equals", UstProvider1.equals(UstProvider2));
+ assertTrue("equals", UstProvider2.equals(UstProvider3));
+ assertTrue("equals", UstProvider1.equals(UstProvider3));
+ }
+
+ /**
+ * Run the equals() method test.
+ */
+ @Test
+ public void testEqualsNull() {
+ assertTrue("equals", !fUstProviderInfo1.equals(null));
+ assertTrue("equals", !fUstProviderInfo2.equals(null));
+ }
+
+ // ------------------------------------------------------------------------
+ // hashCode
+ // ------------------------------------------------------------------------
+
+ /**
+ * Run the hashCode() method test.
+ */
+ @Test
+ public void testHashCode() {
+ UstProviderInfo UstProvider1 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo1);
+ UstProviderInfo UstProvider2 = new UstProviderInfo((UstProviderInfo)fUstProviderInfo2);
+
+ assertTrue("hashCode", fUstProviderInfo1.hashCode() == UstProvider1.hashCode());
+ assertTrue("hashCode", fUstProviderInfo2.hashCode() == UstProvider2.hashCode());
+
+ assertTrue("hashCode", fUstProviderInfo1.hashCode() != UstProvider2.hashCode());
+ assertTrue("hashCode", fUstProviderInfo2.hashCode() != UstProvider1.hashCode());
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.relayd;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.LttngRelaydConnectorFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.Command;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionReturnCode;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetNextIndex;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NextIndexReturnCode;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ViewerCommand;
+import org.junit.Test;
+
+/**
+ * Unit tests for lttng-relayd. It actually allows us to test the API.
+ *
+ * @author Matthew Khouzam
+ */
+public class LttngRelayd24Test {
+
+ private static final int PACKETS_TO_READ = 100;
+ private static final String ADDRESS = "127.0.0.1"; // change me //$NON-NLS-1$
+ private static final int PORT = 5344;
+
+ private static void getPackets(AttachSessionResponse attachedSession, Socket connection, ILttngRelaydConnector relayD) throws IOException {
+ int numPacketsReceived = 0;
+ DataOutputStream fOutNet = new DataOutputStream(connection.getOutputStream());
+ DataInputStream fInNet = new DataInputStream(connection.getInputStream());
+ while (numPacketsReceived < PACKETS_TO_READ) {
+ for (StreamResponse stream : attachedSession.getStreamList()) {
+ if (stream.getMetadataFlag() != 1) {
+ ConnectResponse connectPayload = new ConnectResponse(fInNet);
+ assertNotNull(connectPayload);
+
+ ViewerCommand connectCommand = new ViewerCommand(Command.VIEWER_GET_NEXT_INDEX, ConnectResponse.SIZE, 0);
+ fOutNet.write(connectCommand.serialize());
+ fOutNet.flush();
+
+ GetNextIndex indexRequest = new GetNextIndex(stream.getId());
+ fOutNet.write(indexRequest.serialize());
+ fOutNet.flush();
+
+ IndexResponse indexReply = new IndexResponse(fInNet);
+ // Nothing else supported for now
+ if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_OK) {
+ if (relayD.getPacketFromStream(indexReply, stream.getId()) != null) {
+ numPacketsReceived++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Test a connection
+ *
+ * @throws IOException
+ * network timeout?
+ */
+ @Test
+ public void testViewerConnection() throws IOException {
+ InetAddress addr = InetAddress.getByName(ADDRESS);
+ try (Socket connection = new Socket(addr, PORT);
+ ILttngRelaydConnector relayD = LttngRelaydConnectorFactory.getNewConnector(connection);) {
+
+ List<SessionResponse> sessions = relayD.getSessions();
+ assertTrue(sessions.size() > 0);
+ SessionResponse lttngViewerSession = sessions.get(0);
+ assertNotNull(lttngViewerSession);
+ CreateSessionResponse createSession = relayD.createSession();
+ assertEquals(createSession.getStatus(), CreateSessionReturnCode.LTTNG_VIEWER_CREATE_SESSION_OK);
+ AttachSessionResponse attachedSession = relayD.attachToSession(lttngViewerSession);
+
+ String metaData = relayD.getMetadata(attachedSession);
+ assertNotNull(metaData);
+
+ getPackets(attachedSession, connection, relayD);
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *********************************************************************/
+package org.eclipse.linuxtools.lttng2.control.core.tests.session;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Run all the tests in the lttng2.core.session plugin.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ SessionConfigGeneratorTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.tests.session;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.linuxtools.internal.lttng2.control.core.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigGenerator;
+import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
+import org.eclipse.linuxtools.lttng2.control.core.tests.model.impl.ModelImplFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * This class contains tests for the class {@link SessionConfigGenerator}.
+ */
+public class SessionConfigGeneratorTest {
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ /** Session files for validation */
+ private static final File VALID_SESSION_FILE = new File("../org.eclipse.tracecompass.lttng2.control.core.tests/test_session_config_files/test_valid.lttng");
+ private static final File INVALID_SESSION_FILE = new File("../org.eclipse.tracecompass.lttng2.control.core.tests/test_session_config_files/test_invalid.lttng");
+
+ private static final String SESSION_FILENAME = "test_session." + SessionConfigStrings.SESSION_CONFIG_FILE_EXTENSION;
+ private static final IPath SESSION_FILE_PATH = Activator.getDefault().getStateLocation().addTrailingSeparator().append(SESSION_FILENAME);
+ private static final String TRACE_SESSION_PATH = "/home/user/folder";
+
+ private static final String SESSION_NAME_1 = "session1";
+ private static final String SESSION_NAME_2 = "session2";
+ private static final String SESSION_NAME_3 = "session3";
+
+ /** Session informations for generation tests */
+ private ISessionInfo fValidSessionInfo = null;
+ private ISessionInfo fValidSessionSnapshotInfo = null;
+ private ISessionInfo fInvalidSessionInfo = null;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+ /**
+ * Perform pre-test initialization.
+ */
+ @Before
+ public void setUp() {
+ /* A valid domain with shared buffer type */
+ ModelImplFactory factory = new ModelImplFactory();
+ IDomainInfo domain = factory.getDomainInfo1();
+ domain.setBufferType(BufferType.BUFFER_SHARED);
+
+ /* The valid sessions */
+ fValidSessionInfo = new SessionInfo(SESSION_NAME_1);
+ fValidSessionInfo.setSessionPath(TRACE_SESSION_PATH);
+ fValidSessionInfo.setSessionState(TraceSessionState.ACTIVE);
+ fValidSessionInfo.addDomain(domain);
+
+ fValidSessionSnapshotInfo = new SessionInfo(SESSION_NAME_2);
+ fValidSessionSnapshotInfo.setSessionPath(TRACE_SESSION_PATH);
+ fValidSessionSnapshotInfo.setSessionState(TraceSessionState.ACTIVE);
+ fValidSessionSnapshotInfo.addDomain(domain);
+ fValidSessionSnapshotInfo.setSnapshotInfo(factory.getSnapshotInfo1());
+
+ /* The invalid session contains an event with an invalid type */
+ fInvalidSessionInfo = factory.getSessionInfo2();
+ fInvalidSessionInfo.setName(SESSION_NAME_3);
+ }
+
+ /**
+ * Delete the session file created
+ */
+ @After
+ public void tearUp() {
+ /* Tear up the file created if it exists */
+ File sessionConfigurationFile = SESSION_FILE_PATH.toFile();
+ if (sessionConfigurationFile.exists()) {
+ sessionConfigurationFile.delete();
+ }
+
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link SessionConfigGenerator#sessionValidate(File)}
+ */
+ @Test
+ public void testSessionValidate() {
+ File testSessionFile = VALID_SESSION_FILE;
+ if ((testSessionFile == null) || !testSessionFile.exists()) {
+ fail("Session test file does not exist");
+ }
+ IStatus status = SessionConfigGenerator.sessionValidate(testSessionFile);
+ if (!status.isOK()) {
+ fail(status.getMessage());
+ }
+
+ testSessionFile = INVALID_SESSION_FILE;
+ if ((testSessionFile == null) || !testSessionFile.exists()) {
+ fail("Session test file does not exist");
+ }
+ assertFalse(SessionConfigGenerator.sessionValidate(testSessionFile).isOK());
+ }
+
+ /**
+ * Test method for
+ * {@link SessionConfigGenerator#generateSessionConfig(Set, IPath)}
+ */
+ @Test
+ public void testGenerateSessionConfig() {
+ /* Should fail since it's empty */
+ final Set<ISessionInfo> sessions = new HashSet<>();
+ assertFalse(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
+
+ /* Add a valid session and validate */
+ sessions.add(fValidSessionInfo);
+ assertTrue(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
+ assertTrue(SessionConfigGenerator.sessionValidate(SESSION_FILE_PATH.toFile()).isOK());
+
+ /* Add a valid snapshot session and validate */
+ sessions.add(fValidSessionSnapshotInfo);
+ assertTrue(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
+ assertTrue(SessionConfigGenerator.sessionValidate(SESSION_FILE_PATH.toFile()).isOK());
+
+ /* Add an invalid session */
+ sessions.add(fInvalidSessionInfo);
+ assertFalse(SessionConfigGenerator.generateSessionConfig(sessions, SESSION_FILE_PATH).isOK());
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+ <!--***************************************************************************\r
+ * Copyright(C) 2014 École Polytechnique de Montréal\r
+ *\r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * Guilliano Molaire - Initial API and implementation\r
+ ***************************************************************************\r
+ This is an invalid session configuration file. The domain type\r
+ is missing.-->\r
+<sessions>\r
+ <session>\r
+ <name>auto-20140323-130527</name>\r
+ <started>false</started>\r
+ <domains>\r
+ <domain>\r
+ <buffer_type>GLOBAL</buffer_type>\r
+ <channels>\r
+ <channel>\r
+ <name>channel0</name>\r
+ <overwrite_mode>DISCARD</overwrite_mode>\r
+ <subbuffer_count>4</subbuffer_count>\r
+ <switch_timer_interval>0</switch_timer_interval>\r
+ <tracefile_size>0</tracefile_size>\r
+ <tracefile_count>0</tracefile_count>\r
+ <live_timer_interval>0</live_timer_interval>\r
+ <enabled>false</enabled>\r
+ <subbuffer_size>262144</subbuffer_size>\r
+ <read_timer_interval>200000</read_timer_interval>\r
+ <output_type>SPLICE</output_type>\r
+ <events>\r
+ <event>\r
+ <name>exit_syscall</name>\r
+ <enabled>true</enabled>\r
+ <type>TRACEPOINT</type>\r
+ </event>\r
+ </events>\r
+ </channel>\r
+ </channels>\r
+ </domain>\r
+ </domains>\r
+ <output>\r
+ <consumer_output>\r
+ <enabled>true</enabled>\r
+ <destination>\r
+ <path>/home/user/folder</path>\r
+ </destination>\r
+ </consumer_output>\r
+ </output>\r
+ </session>\r
+</sessions>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+ <!--***************************************************************************\r
+ * Copyright(C) 2014 École Polytechnique de Montréal\r
+ *\r
+ * All rights reserved. This program and the accompanying materials are\r
+ * made available under the terms of the Eclipse Public License v1.0 which\r
+ * accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ * Guilliano Molaire - Initial API and implementation\r
+ ***************************************************************************\r
+ This is a valid session configuration file. All mandatory\r
+ elements are provided.-->\r
+<sessions>\r
+ <session>\r
+ <name>auto-20140323-130527</name>\r
+ <started>false</started>\r
+ <domains>\r
+ <domain>\r
+ <type>KERNEL</type>\r
+ <buffer_type>GLOBAL</buffer_type>\r
+ <channels>\r
+ <channel>\r
+ <name>channel0</name>\r
+ <overwrite_mode>DISCARD</overwrite_mode>\r
+ <subbuffer_count>4</subbuffer_count>\r
+ <switch_timer_interval>0</switch_timer_interval>\r
+ <tracefile_size>0</tracefile_size>\r
+ <tracefile_count>0</tracefile_count>\r
+ <live_timer_interval>0</live_timer_interval>\r
+ <enabled>false</enabled>\r
+ <subbuffer_size>262144</subbuffer_size>\r
+ <read_timer_interval>200000</read_timer_interval>\r
+ <output_type>SPLICE</output_type>\r
+ <events>\r
+ <event>\r
+ <name>exit_syscall</name>\r
+ <enabled>true</enabled>\r
+ <type>TRACEPOINT</type>\r
+ </event>\r
+ </events>\r
+ </channel>\r
+ </channels>\r
+ </domain>\r
+ </domains>\r
+ <output>\r
+ <consumer_output>\r
+ <enabled>true</enabled>\r
+ <destination>\r
+ <path>/home/user/folder</path>\r
+ </destination>\r
+ </consumer_output>\r
+ </output>\r
+ </session>\r
+</sessions>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.control.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.control.core;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.control.core.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.tracecompass.ctf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core;bundle-version="3.1.0"
+Export-Package: org.eclipse.linuxtools.internal.lttng2.control.core;x-friends:="org.eclipse.tracecompass.lttng2.control.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.core.model;x-friends:="org.eclipse.tracecompass.lttng2.control.ui,org.eclipse.tracecompass.lttng2.control.ui.tests,org.eclipse.tracecompass.lttng2.control.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;x-friends:="org.eclipse.tracecompass.lttng2.control.ui,org.eclipse.tracecompass.lttng2.control.ui.tests,org.eclipse.tracecompass.lttng2.control.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.core.relayd;x-friends:="org.eclipse.tracecompass.lttng2.control.core.tests,org.eclipse.tracecompass.lttng2.control.ui,org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl;x-friends:="org.eclipse.tracecompass.lttng2.control.core.tests,org.eclipse.tracecompass.lttng2.control.ui,org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;x-friends:="org.eclipse.tracecompass.lttng2.control.core.tests,org.eclipse.tracecompass.lttng2.control.ui,org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.lttng2.control.core.session
+Import-Package: com.google.common.collect
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+#Properties file for org.eclipse.tracecompass.lttng2.control.core
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Control Core Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.control.core</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Trace Compass LTTng Control Core Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>Activator</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.control.core"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operators
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Logs a message with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logInfo(String message) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logInfo(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logWarning(String message) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logWarning(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logError(String message) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logError(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Interface for retrieval of basic trace event information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IBaseEventInfo extends ITraceInfo {
+
+ /**
+ * @return the trace event type
+ */
+ TraceEventType getEventType();
+
+ /**
+ * Sets the trace event type to the given type
+ * @param type - type to set
+ */
+ void setEventType(TraceEventType type);
+
+ /**
+ * Sets the trace event type to the type specified by the given name.
+ * @param typeName - event type name
+ */
+ void setEventType(String typeName);
+
+ /**
+ * @return the trace event log level
+ */
+ TraceLogLevel getLogLevel();
+
+ /**
+ * Sets the trace event log level to the given level
+ * @param level - event log level to set
+ */
+ void setLogLevel(TraceLogLevel level);
+
+ /**
+ * Sets the trace event log level to the level specified by the given name.
+ * @param levelName - event log level name
+ */
+ void setLogLevel(String levelName);
+
+ /**
+ * Returns the field information (if exists)
+ * @return the field information or null
+ */
+ IFieldInfo[] getFields();
+
+ /**
+ * @param field The field to add
+ */
+ void addField(IFieldInfo field);
+
+ /**
+ * Sets the fields
+ * @param fields The fields
+ */
+ void setFields(List<IFieldInfo> fields);
+
+ /**
+ * Returns filter expression.
+ * @return filter expression
+ */
+ String getFilterExpression();
+
+ /**
+ * Sets the filter expression.
+ * @param filter The filter expression to set
+ */
+ void setFilterExpression(String filter);
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Simon Delisle - Updated for support of LTTng Tools 2.2
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+
+/**
+ * <p>
+ * Interface for retrieval of trace channel information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IChannelInfo extends ITraceInfo {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Default value for overwrite mode.
+ */
+ public final static boolean DEFAULT_OVERWRITE_MODE = false;
+
+ /**
+ * @return the overwrite mode value.
+ */
+ boolean isOverwriteMode();
+ /**
+ * Sets the overwrite mode value to the given mode.
+ * @param mode - mode to set.
+ */
+ void setOverwriteMode(boolean mode);
+
+ /**
+ * @return the sub-buffer size.
+ */
+ long getSubBufferSize();
+ /**
+ * Sets the sub-buffer size to the given value.
+ * @param bufferSize - size to set to set.
+ */
+ void setSubBufferSize(long bufferSize);
+
+ /**
+ * @return the number of sub-buffers.
+ */
+ int getNumberOfSubBuffers();
+ /**
+ * Sets the number of sub-buffers to the given value.
+ * @param numberOfSubBuffers - value to set.
+ */
+ void setNumberOfSubBuffers(int numberOfSubBuffers);
+
+ /**
+ * @return the switch timer interval.
+ */
+ long getSwitchTimer();
+ /**
+ * Sets the switch timer interval to the given value.
+ * @param timer - timer value to set.
+ */
+ void setSwitchTimer(long timer);
+
+ /**
+ * @return the read timer interval.
+ */
+ long getReadTimer();
+ /**
+ * Sets the read timer interval to the given value.
+ * @param timer - timer value to set..
+ */
+ void setReadTimer(long timer);
+
+ /**
+ * @return the output type.
+ */
+ TraceChannelOutputType getOutputType();
+ /**
+ * Sets the output type to the given value.
+ * @param type - type to set.
+ */
+ void setOutputType(String type);
+ /**
+ * Sets the output type to the given value.
+ * @param type - type to set.
+ */
+ void setOutputType(TraceChannelOutputType type);
+
+ /**
+ * @return the channel state (enabled or disabled).
+ */
+ TraceEnablement getState();
+ /**
+ * Sets the channel state (enablement) to the given value.
+ * @param state - state to set.
+ */
+ void setState(TraceEnablement state);
+ /**
+ * Sets the channel state (enablement) to the value specified by the given name.
+ * @param stateName - state to set.
+ */
+ void setState(String stateName);
+
+ /**
+ * @return all event information as array.
+ */
+ IEventInfo[] getEvents();
+ /**
+ * Sets the event information specified by given list.
+ * @param events - all event information to set.
+ */
+ void setEvents(List<IEventInfo> events);
+ /**
+ * Adds a single event information.
+ * @param event - event information to add.
+ */
+ void addEvent(IEventInfo event);
+ /**
+ * Sets the maximum size of trace files
+ * @param maxSizeTraceFiles - maximum size
+ */
+ void setMaxSizeTraceFiles(int maxSizeTraceFiles);
+ /**
+ * Sets the maximum number of trace files
+ * @param maxNumberTraceFiles - maximum number
+ */
+ void setMaxNumberTraceFiles(int maxNumberTraceFiles);
+ /**
+ * @return maximum size of trace files
+ */
+ int getMaxSizeTraceFiles();
+ /**
+ * @return maximum number of trace files
+ */
+ int getMaxNumberTraceFiles();
+ /**
+ * Sets per UID buffers
+ * @param buffersUID - enable or not
+ */
+ void setBufferType(BufferType buffersUID);
+ /**
+ * @return the value of buffersUID (enable or not)
+ */
+ BufferType getBufferType();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+
+/**
+ * <p>
+ * Interface for retrieval of trace domain information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IDomainInfo extends ITraceInfo {
+
+ /**
+ * @return information about all channels
+ */
+ IChannelInfo[] getChannels();
+
+ /**
+ * Sets the channel information specified by given list.
+ * @param channels - all channel information to set.
+ */
+ void setChannels(List<IChannelInfo> channels);
+
+ /**
+ * Adds a single channel information.
+ * @param channel - channel information to add.
+ */
+ void addChannel(IChannelInfo channel);
+
+ /**
+ * @return true if domain is kernel, false for UST
+ */
+ boolean isKernel();
+
+ /**
+ * Sets whether domain is Kernel domain or UST
+ * @param isKernel true for kernel, false for UST
+ */
+ void setIsKernel(boolean isKernel);
+
+ /**
+ * @return Information about the buffer type
+ */
+ BufferType getBufferType();
+
+ /**
+ * Sets the buffer type
+ *
+ * @param bufferType
+ * The buffer type
+ */
+ void setBufferType(BufferType bufferType);
+
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * <p>
+ * Interface for retrieval of trace event information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IEventInfo extends IBaseEventInfo {
+
+ /**
+ * @return the event state (enabled or disabled).
+ */
+ TraceEnablement getState();
+
+ /**
+ * Sets the event state (enablement) to the given value.
+ * @param state - state to set.
+ */
+ void setState(TraceEnablement state);
+
+ /**
+ * Sets the event state (enablement) to the value specified by the given name.
+ * @param stateName - state to set.
+ */
+ void setState(String stateName);
+
+ /**
+ * Returns the log level type.
+ * @return log level type.
+ */
+ LogLevelType getLogLevelType();
+
+ /**
+ * Sets the LogLevelType.
+ * @param type - log level type
+ */
+ void setLogLevelType(LogLevelType type);
+
+ /**
+ * Sets the LogLevelType based on given short name.
+ * @param shortName - short name of type
+ */
+ void setLogLevelType(String shortName);
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * <p>
+ * Interface for retrieval of event field information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IFieldInfo extends ITraceInfo {
+
+ /**
+ * @return the event field type
+ */
+ String getFieldType();
+
+ /**
+ * Sets field type string
+ *
+ * @param fieldType - sting of event field type
+ */
+ void setFieldType(String fieldType);
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * <p>
+ * Interface for retrieval of probe event information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IProbeEventInfo extends IEventInfo {
+
+ /**
+ * @return the address of the probe. (null if not used)
+ */
+ String getAddress();
+
+ /**
+ * Sets the address of the probe.
+ * @param address - a address (null if not used)
+ */
+ void setAddress(String address);
+
+ /**
+ * @return the offset applied to the symbol (null if not used).
+ */
+ String getOffset();
+
+ /**
+ * Sets the offset applied to the symbol.
+ * @param offset - a offset ((null if not used)
+ */
+ void setOffset(String offset);
+
+ /**
+ * @return the symbol name. ((null if not used))
+ */
+ String getSymbol();
+
+ /**
+ * Sets the symbol name.
+ * @param symbol - a symbol name ((null if not used))
+ */
+ void setSymbol(String symbol);
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Interface for retrieval of trace session information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ISessionInfo extends ITraceInfo {
+
+ /**
+ * @return the session state state (active or inactive).
+ */
+ TraceSessionState getSessionState();
+ /**
+ * Sets the session state to the given value.
+ * @param state - state to set.
+ */
+ void setSessionState(TraceSessionState state);
+
+ /**
+ * Sets the event state to the value specified by the given name.
+ * @param stateName - state to set.
+ */
+ void setSessionState(String stateName);
+
+ /**
+ * @return path string where session is located.
+ */
+ String getSessionPath();
+
+ /**
+ * Sets the path string (where session is located) to the given value.
+ * @param path - session path to set.
+ */
+ void setSessionPath(String path);
+
+ /**
+ * @return all domain information as array.
+ */
+ IDomainInfo[] getDomains();
+
+ /**
+ * Sets all domain information specified by given list.
+ * @param domains - all domain information to set.
+ */
+ void setDomains(List<IDomainInfo> domains);
+
+ /**
+ * Adds a single domain information.
+ * @param domainInfo domain information to add.
+ */
+ void addDomain(IDomainInfo domainInfo);
+
+ /**
+ * Returns if session is streamed over network
+ * @return <code>true</code> if streamed over network else <code>false</code>
+ */
+ boolean isStreamedTrace();
+
+ /**
+ * Sets whether the trace is streamed or not
+ * @param isStreamedTrace <code>true</code> if streamed over network else <code>false</code>
+ */
+ void setStreamedTrace(boolean isStreamedTrace);
+
+ /**
+ * Returns whether the session is snapshot session or not
+ * @return <code>true</code> if it is snapshot session else <code>false</code>
+ */
+ boolean isSnapshotSession();
+
+ /**
+ * Set whether or not the session should be in snapshot mode
+ *
+ * @param isSnapshot
+ * true for snapshot mode, false otherwise
+ */
+ void setSnapshot(boolean isSnapshot);
+
+ /**
+ * Gets the snapshot information the session or null if it is not a
+ * snapshot session.
+ * @return snapshot information
+ */
+ ISnapshotInfo getSnapshotInfo();
+
+ /**
+ * Sets the snapshot information of the session
+ * @param setSnapshotInfo - the snapshot data to set.
+ */
+ void setSnapshotInfo(ISnapshotInfo setSnapshotInfo);
+
+ /**
+ * Get whether or not the session should be in Live mode
+ *
+ * @return <code>true</code> if is a live session else <code>false</code>
+ */
+ public boolean isLive();
+
+ /**
+ * Set whether or not the session should be in Live mode
+ *
+ * @param isLive
+ * true for Live mode, false otherwise
+ */
+ public void setLive(boolean isLive);
+
+ /**
+ * Get the live delay which is the delay in micro seconds before the data is
+ * flushed and streamed.
+ *
+ * @return the live delay or -1 if the default value should be used
+ */
+ public int getLiveDelay();
+
+ /**
+ * Set the live delay which is the delay in micro seconds before the data is
+ * flushed and streamed.
+ *
+ * @param liveDelay
+ * the live delay
+ */
+ public void setLiveDelay(int liveDelay);
+
+ /**
+ * Get the network URL in case control and data is configured together
+ * otherwise null If it returns a non-null value, getControlUrl() and
+ * getDataUrl() have to return null.
+ *
+ * @return The network URL or null.
+ */
+ String getNetworkUrl();
+
+ /**
+ * Set the network URL
+ *
+ * @param networkUrl
+ * the network URL
+ */
+ void setNetworkUrl(String networkUrl);
+
+ /**
+ * Get the control URL in case control and data is configured separately. If
+ * it returns a non-null value, getDataUrl() has to return a valid value too
+ * and getNetworkUrl() has to return null.
+ *
+ * @return The control URL or null.
+ */
+ String getControlUrl();
+
+ /**
+ * Set the control URL
+ *
+ * @param controlUrl
+ * the control URL
+ */
+ void setControlUrl(String controlUrl);
+
+ /**
+ * Get the data URL in case control and data is configured separately. If it
+ * returns a non-null value, getControlUrl() has to return a valid value too
+ * and getNetworkUrl() has to return null.
+ *
+ * @return The data URL or null.
+ */
+ String getDataUrl();
+
+ /**
+ * Set the data URL
+ *
+ * @param datalUrl
+ * the data URL
+ */
+ void setDataUrl(String datalUrl);
+
+ /**
+ * Get the live URL.
+ *
+ * @return the live URL
+ */
+ String getLiveUrl();
+
+ /**
+ * Set the live URL.
+ *
+ * @param liveUrl
+ * the live URL
+ */
+ void setLiveUrl(String liveUrl);
+
+ /**
+ * Get the live port.
+ *
+ * @return the live port
+ */
+ Integer getLivePort();
+
+ /**
+ * Set the live port.
+ *
+ * @param livePort
+ * the live port
+ */
+ void setLivePort(Integer livePort);
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+
+/**
+ * <p>
+ * Interface for retrieval of snapshot information of a session.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ISnapshotInfo extends ITraceInfo {
+
+ /**
+ * @return path string where snapshot is located.
+ */
+ String getSnapshotPath();
+
+ /**
+ * Sets the path string (where snapshot is located) to the given value.
+ * @param path - session path to set.
+ */
+ void setSnapshotPath(String path);
+
+ /**
+ * @return the snapshot ID.
+ */
+ int getId();
+
+ /**
+ * Sets the snapshot ID.
+ * @param id - the ID to set.
+ */
+ void setId(int id);
+
+ /**
+ * Sets whether snapshot is streamed over the network or stored locally
+ * at the tracers host.
+ *
+ * @param isStreamed - <code>true</code> if streamed else <code>false</code>
+ */
+ void setStreamedSnapshot(boolean isStreamed);
+
+ /**
+ * Gets whether snapshot is streamed over the network or stored locally
+ * at the tracers host.
+ *
+ * @return <code>true</code> if streamed else <code>false</code>
+ */
+ boolean isStreamedSnapshot();
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * <p>
+ * Interface for retrieve trace comon information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ITraceInfo {
+ /**
+ * @return the name of the information element.
+ */
+ String getName();
+
+ /**
+ * Sets the name of the information element.
+ *
+ * @param name
+ * The name to assign
+ */
+ void setName(String name);
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Interface for retrieval of UST provider information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IUstProviderInfo extends ITraceInfo {
+
+ /**
+ * @return the process ID of the UST provider.
+ */
+ int getPid();
+
+ /**
+ * Sets the process ID of the UST provider to the given value.
+ * @param pid - process ID to set
+ */
+ void setPid(int pid);
+
+ /**
+ * @return all event information as array.
+ */
+ IBaseEventInfo[] getEvents();
+
+ /**
+ * Sets the event information specified by given list.
+ * @param events - all event information to set.
+ */
+ void setEvents(List<IBaseEventInfo> events);
+
+ /**
+ * Adds a single event information.
+ * @param event - event information to add.
+ */
+ void addEvent(IBaseEventInfo event);
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ *********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+
+/**
+ * Type of log Level enumeration.
+ *
+ * @author Bernd Hufmann
+ */
+public enum LogLevelType {
+
+ // ------------------------------------------------------------------------
+ // Enum definition
+ // ------------------------------------------------------------------------
+ /** range of log levels [0,logLevel] */
+ LOGLEVEL("<=", "RANGE"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /** all log level */
+ LOGLEVEL_ALL("", "ALL"), //$NON-NLS-1$//$NON-NLS-2$
+
+ /** single log level */
+ LOGLEVEL_ONLY("==", "SINGLE"), //$NON-NLS-1$ //$NON-NLS-2$
+
+ /** no log level */
+ LOGLEVEL_NONE("", "UNKNOWN"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // ------------------------------------------------------------------------
+ // Constuctors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Private constructor
+ *
+ * @param name
+ * the name of state
+ */
+ private LogLevelType(String shortName, String miName) {
+ fShortName = shortName;
+ fMiName = miName;
+ }
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * Name of enum.
+ */
+ private final String fShortName;
+ private final String fMiName;
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return short string
+ */
+ public String getShortName() {
+ return fShortName;
+ }
+
+ /**
+ * @return machine interface name string
+ */
+ public String getMiName() {
+ return fMiName;
+ }
+
+ // ------------------------------------------------------------------------
+ // Utility
+ // ------------------------------------------------------------------------
+ /**
+ * Return the corresponding {@link LogLevelType} to String "name"
+ *
+ * @param name
+ * String to compare to retrieve the good LogLevelType
+ * @return the corresponding {@link LogLevelType}
+ */
+ public static LogLevelType valueOfString(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ for (LogLevelType lltype : LogLevelType.values()) {
+ if (!lltype.equals(LOGLEVEL_NONE)) {
+ boolean isEqual = lltype.fShortName.equalsIgnoreCase(name) || lltype.fMiName.equalsIgnoreCase(name);
+ if (isEqual) {
+ return lltype;
+ }
+ }
+ }
+
+ // No match
+ return LogLevelType.LOGLEVEL_NONE;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * <p>
+ * Enumeration for the node connection state.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public enum TargetNodeState {
+ /** State when disconnected */
+ DISCONNECTED,
+ /** State while disconnecting */
+ DISCONNECTING,
+ /** State when connected */
+ CONNECTED,
+ /** State while connecting */
+ CONNECTING;
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * Trace domain type enumeration.
+ *
+ * @author Jonathan Rajotte
+ */
+public enum TraceChannelOutputType {
+ /** Channel output type : splice */
+ SPLICE("splice()", "SPLICE" ), //$NON-NLS-1$ //$NON-NLS-2$
+ /** Channel output type : mmap */
+ MMAP("mmap()", "MMAP"), //$NON-NLS-1$ //$NON-NLS-2$
+ /** Channel output type : unknown */
+ UNKNOWN("unknown", "unknown"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ private final String fInName;
+ private final String fInMiName;
+
+ private TraceChannelOutputType(String name, String miName) {
+ fInName = name;
+ fInMiName = miName;
+ }
+
+ /**
+ * Get the type's name
+ *
+ * @return The type's name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ /**
+ * Get the type's name
+ *
+ * @return The type's name
+ */
+ public String getInMiName() {
+ return fInMiName;
+ }
+
+ /**
+ * Return the corresponding {@link TraceChannelOutputType} of string miName
+ *
+ * @param name
+ * name of the Trace domain type to look for
+ * @return the corresponding {@link TraceChannelOutputType}
+ */
+ public static TraceChannelOutputType valueOfString(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ for (TraceChannelOutputType tdType : TraceChannelOutputType.values()) {
+ boolean isEqual = tdType.getInName().equalsIgnoreCase(name) || tdType.getInMiName().equalsIgnoreCase(name);
+ if (isEqual) {
+ return tdType;
+ }
+ }
+ // Unknown domain
+ return UNKNOWN;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * Trace domain type enumeration.
+ *
+ * @author Jonathan Rajotte
+ */
+public enum TraceDomainType {
+ /** Domain type : ust */
+ UST("ust"), //$NON-NLS-1$
+ /** Domain type : kernel */
+ KERNEL("kernel"), //$NON-NLS-1$
+ /** Domain type : jul */
+ JUL("jul"), //$NON-NLS-1$
+ /** Unknown domain type */
+ UNKNOWN("Unknown domain type"); //$NON-NLS-1$
+
+ private final String fInName;
+
+ private TraceDomainType(String name) {
+ fInName = name;
+ }
+
+ /**
+ * Get the type's name
+ *
+ * @return The type's name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ /**
+ * Return the corresponding {@link TraceDomainType} of string miName
+ *
+ * @param miName
+ * name of the Trace domain type to look for
+ * @return the corresponding {@link TraceDomainType}
+ */
+ public static TraceDomainType valueOfString(String miName) {
+ if (miName == null) {
+ throw new IllegalArgumentException();
+ }
+ for (TraceDomainType tdType : TraceDomainType.values()) {
+ if (tdType.getInName().equalsIgnoreCase(miName)) {
+ return tdType;
+ }
+ }
+ // Unknown domain
+ return UNKNOWN;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Jonathan Rajotte - Machine interface support and utility function
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+import java.security.InvalidParameterException;
+
+/**
+ * Enumeration for enabled/disabled states.
+ *
+ * @author Bernd Hufmann
+ */
+public enum TraceEnablement {
+
+ // ------------------------------------------------------------------------
+ // Enum definition
+ // ------------------------------------------------------------------------
+ /** Tracing is disabled */
+ DISABLED("disabled", "false"), //$NON-NLS-1$ //$NON-NLS-2$
+ /** Tracing is enabled */
+ ENABLED("enabled", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * Name of enum
+ */
+ private final String fInName;
+ private final String fInMiName;
+
+ // ------------------------------------------------------------------------
+ // Constuctors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Private constructor
+ *
+ * @param name
+ * the name of state
+ */
+ private TraceEnablement(String name, String miName) {
+ fInName = name;
+ fInMiName = miName;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return state name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ /**
+ * @return state name
+ */
+ public String getInMiName() {
+ return fInMiName;
+ }
+
+ /**
+ * @param name
+ * name of the desired enum
+ * @return the corresponding {@link TraceEnablement} matching name
+ */
+ public static TraceEnablement valueOfString(String name) {
+ if (name == null) {
+ throw new InvalidParameterException();
+ }
+ for (TraceEnablement enablementType : TraceEnablement.values()) {
+ boolean exist = enablementType.fInName.equalsIgnoreCase(name) || enablementType.fInMiName.equalsIgnoreCase(name);
+ if (exist) {
+ return enablementType;
+ }
+ }
+ return DISABLED;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * Trace event type enumeration.
+ *
+ * @author Bernd Hufmann
+ */
+public enum TraceEventType {
+ /** Event type: tracepoint */
+ TRACEPOINT("tracepoint"), //$NON-NLS-1$
+ /** Event type: syscall */
+ SYSCALL("syscall"), //$NON-NLS-1$
+ /** Event type: probe */
+ PROBE("probe"), //$NON-NLS-1$
+ /** Event type: function */
+ FUNCTION("function"), //$NON-NLS-1$
+ /** Event type unknown */
+ UNKNOWN("unknown"); //$NON-NLS-1$
+
+ private final String fInName;
+
+ private TraceEventType(String name) {
+ fInName = name;
+ }
+
+ /**
+ * Get the type's name
+ *
+ * @return The type's name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ /**
+ * Return the corresponding {@link TraceEventType} of string miName
+ *
+ * @param name
+ * name of the {@link TraceEventType} to look for
+ * @return the corresponding {@link TraceEventType}
+ */
+ public static TraceEventType valueOfString(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ for (TraceEventType teType : TraceEventType.values()) {
+ if (teType.getInName().equalsIgnoreCase(name)) {
+ return teType;
+ }
+ }
+ return UNKNOWN;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Jonathan Rajotte - Utility function
+ *********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+
+/**
+ * Log Level enumeration.
+ *
+ * @author Bernd Hufmann
+ */
+@SuppressWarnings("nls")
+public enum TraceLogLevel {
+
+ // ------------------------------------------------------------------------
+ // Enum definition
+ // ------------------------------------------------------------------------
+ /** Log level 0 */
+ TRACE_EMERG("TRACE_EMERG"),
+ /** Log level 1 */
+ TRACE_ALERT("TRACE_ALERT"),
+ /** Log level 2 */
+ TRACE_CRIT("TRACE_CRIT"),
+ /** Log level 3 */
+ TRACE_ERR("TRACE_ERR"),
+ /** Log level 4 */
+ TRACE_WARNING("TRACE_WARNING"),
+ /** Log level 5 */
+ TRACE_NOTICE("TRACE_NOTICE"),
+ /** Log level 6 */
+ TRACE_INFO("TRACE_INFO"),
+ /** Log level 7 */
+ TRACE_DEBUG_SYSTEM("TRACE_DEBUG_SYSTEM"),
+ /** Log level 8 */
+ TRACE_DEBUG_PROGRAM("TRACE_DEBUG_PROGRAM"),
+ /** Log level 9 */
+ TRACE_DEBUG_PROCESS("TRACE_DEBUG_PROCESS"),
+ /** Log level 10 */
+ TRACE_DEBUG_MODULE("TRACE_DEBUG_MODULE"),
+ /** Log level 11 */
+ TRACE_DEBUG_UNIT("TRACE_DEBUG_UNIT"),
+ /** Log level 12 */
+ TRACE_DEBUG_FUNCTION("TRACE_DEBUG_FUNCTION"),
+ /** Log level 13 */
+ TRACE_DEBUG_LINE("TRACE_DEBUG_LINE"),
+ /** Log level 14 */
+ TRACE_DEBUG("TRACE_DEBUG"),
+ /** Log level 15 */
+ LEVEL_UNKNOWN("LEVEL_UNKNOWN");
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * Name of enum.
+ */
+ private final String fInName;
+
+ // ------------------------------------------------------------------------
+ // Constuctors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Private constructor
+ *
+ * @param name
+ * the name of state
+ */
+ private TraceLogLevel(String name) {
+ fInName = name;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return state name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ // ------------------------------------------------------------------------
+ // Utility
+ // ------------------------------------------------------------------------
+ /**
+ * Return the corresponding {@link TraceLogLevel} to String "name"
+ *
+ * @param name
+ * String to compare to retrieve the good {@link TraceLogLevel}
+ * @return the corresponding {@link TraceLogLevel}
+ */
+ public static TraceLogLevel valueOfString(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ for (TraceLogLevel tllevel : TraceLogLevel.values()) {
+ if (tllevel.getInName().equalsIgnoreCase(name)) {
+ return tllevel;
+ }
+ }
+ // No match
+ return LEVEL_UNKNOWN;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Jonathan Rajotte - machine interface support and utility function
+ *********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model;
+
+/**
+ * Session state enumeration.
+ *
+ * @author Bernd Hufmann
+ */
+public enum TraceSessionState {
+
+ // ------------------------------------------------------------------------
+ // Enum definition
+ // ------------------------------------------------------------------------
+ /** Trace session inactive */
+ INACTIVE("inactive", "false"), //$NON-NLS-1$ //$NON-NLS-2$
+ /** Trace session active */
+ ACTIVE("active", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * Name of enum.
+ */
+ private final String fInName;
+ private final String fMiName;
+
+ // ------------------------------------------------------------------------
+ // Constuctors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Private constructor
+ *
+ * @param name
+ * the name of state
+ */
+ private TraceSessionState(String name, String miName) {
+ fInName = name;
+ fMiName = miName;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return state name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ /**
+ * @return the machine interface name
+ */
+ public String getfMiName() {
+ return fMiName;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * Return the corresponding {@link TraceSessionState} to String "name"
+ *
+ * @param name
+ * String to compare to retrieve the good
+ * {@link TraceSessionState}
+ * @return the corresponding {@link TraceSessionState}
+ */
+ public static TraceSessionState valueOfString(String name) {
+ if (name == null) {
+ return INACTIVE;
+ }
+ for (TraceSessionState tst : TraceSessionState.values()) {
+ boolean isEqual = tst.fInName.equalsIgnoreCase(name) || tst.fMiName.equalsIgnoreCase(name);
+ if (isEqual) {
+ return tst;
+ }
+ }
+ // No match
+ return INACTIVE;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+
+/**
+* <p>
+* Implementation of the basic trace event interface (IEventInfo) to store event
+* related data.
+* </p>
+*
+* @author Bernd Hufmann
+*/
+public class BaseEventInfo extends TraceInfo implements IBaseEventInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The trace event type.
+ */
+ private TraceEventType fEventType = TraceEventType.UNKNOWN;
+ /**
+ * The trace log level.
+ */
+ private TraceLogLevel fLogLevel = TraceLogLevel.TRACE_DEBUG;
+ /**
+ * The Event fields
+ */
+ private final List<IFieldInfo> fFields = new ArrayList<>();
+ /**
+ * The filter expression.
+ */
+ private String fFilterExpression;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - name of base event
+ */
+ public BaseEventInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public BaseEventInfo(BaseEventInfo other) {
+ super(other);
+ fEventType = other.fEventType;
+ fLogLevel = other.fLogLevel;
+ for (Iterator<IFieldInfo> iterator = other.fFields.iterator(); iterator.hasNext();) {
+ IFieldInfo field = iterator.next();
+ if (field instanceof FieldInfo) {
+ fFields.add(new FieldInfo((FieldInfo)field));
+ } else {
+ fFields.add(field);
+ }
+ }
+ fFilterExpression = other.fFilterExpression;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public TraceEventType getEventType() {
+ return fEventType;
+ }
+
+ @Override
+ public void setEventType(TraceEventType type) {
+ fEventType = type;
+ }
+
+ @Override
+ public void setEventType(String typeName) {
+ if(TraceEventType.TRACEPOINT.getInName().equalsIgnoreCase(typeName)) {
+ fEventType = TraceEventType.TRACEPOINT;
+ } else if(TraceEventType.SYSCALL.getInName().equalsIgnoreCase(typeName)) {
+ fEventType = TraceEventType.SYSCALL;
+ } else if (TraceEventType.PROBE.getInName().equalsIgnoreCase(typeName)) {
+ fEventType = TraceEventType.PROBE;
+ } else if (TraceEventType.FUNCTION.getInName().equalsIgnoreCase(typeName)) {
+ fEventType = TraceEventType.FUNCTION;
+ } else {
+ fEventType = TraceEventType.UNKNOWN;
+ }
+ }
+
+ @Override
+ public TraceLogLevel getLogLevel() {
+ return fLogLevel;
+ }
+
+ @Override
+ public void setLogLevel(TraceLogLevel level) {
+ fLogLevel = level;
+ }
+
+ @Override
+ public void setLogLevel(String levelName) {
+ fLogLevel = TraceLogLevel.valueOfString(levelName);
+ }
+
+ @Override
+ public IFieldInfo[] getFields() {
+ return fFields.toArray(new IFieldInfo[fFields.size()]);
+ }
+
+ @Override
+ public void addField(IFieldInfo field) {
+ fFields.add(field);
+ }
+
+ @Override
+ public void setFields(List<IFieldInfo> fields) {
+ fFields.clear();
+ for (Iterator<IFieldInfo> iterator = fields.iterator(); iterator.hasNext();) {
+ IFieldInfo fieldInfo = iterator.next();
+ fFields.add(fieldInfo);
+ }
+ }
+
+ @Override
+ public String getFilterExpression() {
+ return fFilterExpression;
+ }
+
+ @Override
+ public void setFilterExpression(String filter) {
+ fFilterExpression = filter;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fEventType == null) ? 0 : fEventType.hashCode());
+ result = prime * result + fFields.hashCode();
+ result = prime * result + ((fFilterExpression == null) ? 0 : fFilterExpression.hashCode());
+ result = prime * result + ((fLogLevel == null) ? 0 : fLogLevel.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ BaseEventInfo other = (BaseEventInfo) obj;
+ if (fEventType != other.fEventType) {
+ return false;
+ }
+ if (!fFields.equals(other.fFields)) {
+ return false;
+ }
+ if (fFilterExpression == null) {
+ if (other.fFilterExpression != null) {
+ return false;
+ }
+ } else if (!fFilterExpression.equals(other.fFilterExpression)) {
+ return false;
+ }
+ if (fLogLevel != other.fLogLevel) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[BaseEventInfo(");
+ output.append(super.toString());
+ output.append(",type=");
+ output.append(fEventType);
+ output.append(",level=");
+ output.append(fLogLevel);
+ if (!fFields.isEmpty()) {
+ output.append(",Fields=");
+ for (Iterator<IFieldInfo> iterator = fFields.iterator(); iterator.hasNext();) {
+ IFieldInfo field = iterator.next();
+ output.append(field.toString());
+ }
+ }
+ if (fFilterExpression != null) {
+ output.append(",Filter=");
+ output.append(fFilterExpression);
+ }
+ output.append(")]");
+ return output.toString();
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Simon Delisle - Initial API and implementation
+ * Bernd Hufmann - Updated to enum definition
+ * Jonathan Rajotte - Updated enum definition for lttng machine interface
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+/**
+ * Constants for buffer type.
+ *
+ * @author Simon Delisle
+ * @author Bernd Hufmann
+ */
+
+public enum BufferType {
+ // ------------------------------------------------------------------------
+ // Enum definition
+ // ------------------------------------------------------------------------
+ /**
+ * Buffer type : per UID
+ */
+ BUFFER_PER_UID("per UID", "PER_UID"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * Buffer type : per PID
+ */
+ BUFFER_PER_PID("per PID", "PER_PID"), //$NON-NLS-1$ //$NON-NLS-2$
+ /**
+ * Buffer type : shared
+ */
+ BUFFER_SHARED("shared"), //$NON-NLS-1$
+ /**
+ * If the LTTng version doesn't show the buffer type
+ */
+ BUFFER_TYPE_UNKNOWN("information not unavailable"); //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * Name of enum
+ */
+ private final String fInName;
+
+ /**
+ * Name of the machine interface enum
+ */
+ private final String fInMiName;
+
+ // ------------------------------------------------------------------------
+ // Constuctors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Private constructor
+ *
+ * @param name
+ * the name of state
+ */
+ private BufferType(String name, String miName) {
+ fInName = name;
+ fInMiName = miName;
+ }
+
+ private BufferType(String name) {
+ fInName = name;
+ fInMiName = ""; //$NON-NLS-1$
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return state name
+ */
+ public String getInName() {
+ return fInName;
+ }
+
+ /**
+ * @return machine interface buffer name
+ */
+ public String getInMiName() {
+ return fInMiName;
+ }
+
+ // /
+ // ------------------------------------------------------------------------
+ // Utility function
+ // -------------------------------------------------------------------------
+ /**
+ * @param name
+ * the string representation of the type
+ * @return enum BufferType of the corresponding type
+ */
+ public static BufferType valueOfString(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ for (BufferType bufferType : BufferType.values()) {
+ boolean isEqual = bufferType.getInName().equalsIgnoreCase(name) || bufferType.getInMiName().equalsIgnoreCase(name);
+ if (isEqual) {
+ return bufferType;
+ }
+ }
+ return BUFFER_TYPE_UNKNOWN;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Simon Delisle - Updated for support of LTTng Tools 2.2
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+
+/**
+ * Implementation of the trace channel interface (IChannelInfo) to store channel
+ * related data.
+ *
+ * @author Bernd Hufmann
+ */
+public class ChannelInfo extends TraceInfo implements IChannelInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The overwrite mode of the channel.
+ */
+ private boolean fOverwriteMode;
+ /**
+ * The sub-buffer size of the channel.
+ */
+ private long fSubBufferSize;
+ /**
+ * The number of sub-buffers of the channel.
+ */
+ private int fNumberOfSubBuffers;
+ /**
+ * The switch timer interval of the channel.
+ */
+ private long fSwitchTimer;
+ /**
+ * The read timer interval of the channel.
+ */
+ private long fReadTimer;
+ /**
+ * The Output type of the channel.
+ */
+ private TraceChannelOutputType fOutputType = TraceChannelOutputType.UNKNOWN;
+ /**
+ * The channel enable state.
+ */
+ private TraceEnablement fState = TraceEnablement.DISABLED;
+ /**
+ * The events information of the channel.
+ */
+ private final List<IEventInfo> fEvents = new ArrayList<>();
+ /**
+ * The maximum size of trace files
+ */
+ private int fMaxSizeTraceFiles;
+ /**
+ * The maximum number of trace files
+ */
+ private int fMaxNumberTraceFiles;
+ /**
+ * The value of buffer type
+ */
+ private BufferType fBufferType = BufferType.BUFFER_TYPE_UNKNOWN;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ *
+ * @param name
+ * - name channel
+ */
+ public ChannelInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param other
+ * - the instance to copy
+ */
+ public ChannelInfo(ChannelInfo other) {
+ super(other);
+ fOverwriteMode = other.fOverwriteMode;
+ fSubBufferSize = other.fSubBufferSize;
+ fNumberOfSubBuffers = other.fNumberOfSubBuffers;
+ fSwitchTimer = other.fSwitchTimer;
+ fReadTimer = other.fReadTimer;
+ fMaxSizeTraceFiles = other.fMaxSizeTraceFiles;
+ fMaxNumberTraceFiles = other.fMaxNumberTraceFiles;
+ fBufferType = other.fBufferType;
+ fOutputType = (other.fOutputType == null ? null : other.fOutputType);
+ fState = other.fState;
+ for (Iterator<IEventInfo> iterator = other.fEvents.iterator(); iterator.hasNext();) {
+ IEventInfo event = iterator.next();
+ if (event instanceof EventInfo) {
+ fEvents.add(new EventInfo((EventInfo) event));
+ } else {
+ fEvents.add(event);
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public boolean isOverwriteMode() {
+ return fOverwriteMode;
+ }
+
+ @Override
+ public void setOverwriteMode(boolean mode) {
+ fOverwriteMode = mode;
+ }
+
+ @Override
+ public long getSubBufferSize() {
+ return fSubBufferSize;
+ }
+
+ @Override
+ public void setSubBufferSize(long bufferSize) {
+ fSubBufferSize = bufferSize;
+ }
+
+ @Override
+ public int getNumberOfSubBuffers() {
+ return fNumberOfSubBuffers;
+ }
+
+ @Override
+ public void setNumberOfSubBuffers(int numberOfSubBuffers) {
+ fNumberOfSubBuffers = numberOfSubBuffers;
+ }
+
+ @Override
+ public long getSwitchTimer() {
+ return fSwitchTimer;
+ }
+
+ @Override
+ public void setSwitchTimer(long timer) {
+ fSwitchTimer = timer;
+ }
+
+ @Override
+ public long getReadTimer() {
+ return fReadTimer;
+ }
+
+ @Override
+ public void setReadTimer(long timer) {
+ fReadTimer = timer;
+ }
+
+ @Override
+ public TraceChannelOutputType getOutputType() {
+ return fOutputType;
+ }
+
+ @Override
+ public void setOutputType(String type) {
+ fOutputType = TraceChannelOutputType.valueOfString(type);
+ }
+
+ @Override
+ public void setOutputType(TraceChannelOutputType type) {
+ fOutputType = type;
+ }
+
+ @Override
+ public TraceEnablement getState() {
+ return fState;
+ }
+
+ @Override
+ public void setState(TraceEnablement state) {
+ fState = state;
+ }
+
+ @Override
+ public void setState(String stateName) {
+ fState = TraceEnablement.valueOfString(stateName);
+ }
+
+ @Override
+ public IEventInfo[] getEvents() {
+ return fEvents.toArray(new IEventInfo[fEvents.size()]);
+ }
+
+ @Override
+ public void setEvents(List<IEventInfo> events) {
+ fEvents.clear();
+ for (Iterator<IEventInfo> iterator = events.iterator(); iterator.hasNext();) {
+ IEventInfo eventInfo = iterator.next();
+ fEvents.add(eventInfo);
+ }
+ }
+
+ @Override
+ public void addEvent(IEventInfo channel) {
+ fEvents.add(channel);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + fEvents.hashCode();
+ result = prime * result + fNumberOfSubBuffers;
+ result = prime * result + ((fOutputType == null) ? 0 : fOutputType.hashCode());
+ result = prime * result + (fOverwriteMode ? 1231 : 1237);
+ result = prime * result + (int) (fReadTimer ^ (fReadTimer >>> 32));
+ result = prime * result + ((fState == null) ? 0 : (fState.ordinal() + 1));
+ result = prime * result + (int) (fSubBufferSize ^ (fSubBufferSize >>> 32));
+ result = prime * result + (int) (fSwitchTimer ^ (fSwitchTimer >>> 32));
+ result = prime * result + ((fBufferType == null) ? 0 : (fBufferType.ordinal() + 1));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ ChannelInfo other = (ChannelInfo) obj;
+ if (!fEvents.equals(other.fEvents)) {
+ return false;
+ }
+ if (fNumberOfSubBuffers != other.fNumberOfSubBuffers) {
+ return false;
+ }
+ if (fOutputType == null) {
+ if (other.fOutputType != null) {
+ return false;
+ }
+ } else if (!fOutputType.equals(other.fOutputType)) {
+ return false;
+ }
+ if (fOverwriteMode != other.fOverwriteMode) {
+ return false;
+ }
+ if (fReadTimer != other.fReadTimer) {
+ return false;
+ }
+ if (fState != other.fState) {
+ return false;
+ }
+ if (fSubBufferSize != other.fSubBufferSize) {
+ return false;
+ }
+ if (fSwitchTimer != other.fSwitchTimer) {
+ return false;
+ }
+ if (fBufferType != other.fBufferType) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[ChannelInfo(");
+ output.append(super.toString());
+ output.append(",State=");
+ output.append(fState);
+ output.append(",OverwriteMode=");
+ output.append(fOverwriteMode);
+ output.append(",SubBuffersSize=");
+ output.append(fSubBufferSize);
+ output.append(",NumberOfSubBuffers=");
+ output.append(fNumberOfSubBuffers);
+ output.append(",SwitchTimer=");
+ output.append(fSwitchTimer);
+ output.append(",ReadTimer=");
+ output.append(fReadTimer);
+ output.append(",output=");
+ output.append(fOutputType.getInName());
+ if ((fBufferType != null) && !fBufferType.equals(BufferType.BUFFER_TYPE_UNKNOWN) && !fBufferType.equals(BufferType.BUFFER_SHARED)) {
+ output.append(",BufferType=");
+ output.append(fBufferType);
+ }
+ output.append(",Events=");
+ if (fEvents.isEmpty()) {
+ output.append("None");
+ } else {
+ for (Iterator<IEventInfo> iterator = fEvents.iterator(); iterator.hasNext();) {
+ IEventInfo event = iterator.next();
+ output.append(event.toString());
+ }
+ }
+ output.append(")]");
+ return output.toString();
+ }
+
+ @Override
+ public void setMaxSizeTraceFiles(int maxSizeTraceFiles) {
+ fMaxSizeTraceFiles = maxSizeTraceFiles;
+ }
+
+ @Override
+ public void setMaxNumberTraceFiles(int maxNumberTraceFiles) {
+ fMaxNumberTraceFiles = maxNumberTraceFiles;
+ }
+
+ @Override
+ public int getMaxSizeTraceFiles() {
+ return fMaxSizeTraceFiles;
+ }
+
+ @Override
+ public int getMaxNumberTraceFiles() {
+ return fMaxNumberTraceFiles;
+ }
+
+ @Override
+ public void setBufferType(BufferType bufferType) {
+ fBufferType = bufferType;
+ }
+
+ @Override
+ public BufferType getBufferType() {
+ return fBufferType;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+
+/**
+ * <p>
+ * Implementation of the trace domain interface (IDomainInfo) to store domain
+ * related data.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class DomainInfo extends TraceInfo implements IDomainInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The channels information of the domain.
+ */
+ private final List<IChannelInfo> fChannels = new ArrayList<>();
+ private boolean fIsKernel = false;
+ private BufferType fBufferType = BufferType.BUFFER_TYPE_UNKNOWN;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - name of domain
+ */
+ public DomainInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public DomainInfo(DomainInfo other) {
+ super(other);
+ for (int i = 0; i < other.fChannels.size(); i++) {
+ if (other.fChannels.get(i) instanceof ChannelInfo) {
+ fChannels.add(new ChannelInfo((ChannelInfo)other.fChannels.get(i)));
+ } else {
+ fChannels.add(other.fChannels.get(i));
+ }
+ }
+ fIsKernel = other.fIsKernel;
+ fBufferType = other.fBufferType;
+ }
+
+ @Override
+ public boolean isKernel() {
+ return fIsKernel;
+ }
+
+ @Override
+ public void setIsKernel(boolean isKernel) {
+ fIsKernel = isKernel;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IChannelInfo[] getChannels() {
+ return fChannels.toArray(new IChannelInfo[fChannels.size()]);
+ }
+
+ @Override
+ public void setChannels(List<IChannelInfo> channels) {
+ fChannels.clear();
+ for (Iterator<IChannelInfo> iterator = channels.iterator(); iterator.hasNext();) {
+ IChannelInfo channelInfo = iterator.next();
+ fChannels.add(channelInfo);
+ }
+ }
+
+ @Override
+ public void addChannel(IChannelInfo channel) {
+ fChannels.add(channel);
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + fChannels.hashCode();
+ result = prime * result + (fIsKernel ? 1231 : 1237);
+ result = prime * result + ((fBufferType == null) ? 0 : (fBufferType.ordinal() + 1));
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ DomainInfo other = (DomainInfo) obj;
+ if (!fChannels.equals(other.fChannels)) {
+ return false;
+ }
+ if (fIsKernel != other.fIsKernel) {
+ return false;
+ }
+ if (fBufferType != other.fBufferType) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public BufferType getBufferType() {
+ if (fIsKernel) {
+ return BufferType.BUFFER_SHARED;
+ }
+ return fBufferType;
+ }
+
+ @Override
+ public void setBufferType(BufferType bufferType) {
+ fBufferType = bufferType;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[DomainInfo(");
+ output.append(super.toString());
+ output.append(",Channels=");
+ if (fChannels.isEmpty()) {
+ output.append("None");
+ } else {
+ for (Iterator<IChannelInfo> iterator = fChannels.iterator(); iterator.hasNext();) {
+ IChannelInfo channel = iterator.next();
+ output.append(channel.toString());
+ }
+ }
+ output.append(",isKernel=");
+ output.append(String.valueOf(fIsKernel));
+ if ((fBufferType != null) && !fBufferType.equals(BufferType.BUFFER_TYPE_UNKNOWN) && !fBufferType.equals(BufferType.BUFFER_SHARED)) {
+ output.append(",BufferType=");
+ output.append(fBufferType);
+ }
+ output.append(")]");
+ return output.toString();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+
+/**
+* <p>
+* Implementation of the trace event interface (IEventInfo) to store event
+* related data.
+* </p>
+*
+* @author Bernd Hufmann
+*/
+public class EventInfo extends BaseEventInfo implements IEventInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The enable state of the event.
+ */
+ private TraceEnablement fState = TraceEnablement.DISABLED;
+ /**
+ * The log level type.
+ */
+ private LogLevelType fLogLevelType = LogLevelType.LOGLEVEL_NONE;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - name of event
+ */
+ public EventInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public EventInfo(EventInfo other) {
+ super(other);
+ fState = other.fState;
+ fLogLevelType = other.fLogLevelType;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public TraceEnablement getState() {
+ return fState;
+ }
+
+ @Override
+ public void setState(TraceEnablement state) {
+ fState = state;
+ }
+
+ @Override
+ public void setState(String stateName) {
+ fState = TraceEnablement.valueOfString(stateName);
+ }
+
+ @Override
+ public LogLevelType getLogLevelType() {
+ return fLogLevelType;
+ }
+
+ @Override
+ public void setLogLevelType(LogLevelType type) {
+ fLogLevelType = type;
+ }
+
+ @Override
+ public void setLogLevelType(String shortName) {
+ fLogLevelType = LogLevelType.valueOfString(shortName);
+ }
+
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fState == null) ? 0 : (fState.ordinal() + 1));
+ result = prime * result + ((fLogLevelType == null) ? 0 : fLogLevelType.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ EventInfo other = (EventInfo) obj;
+ if (fState != other.fState) {
+ return false;
+ }
+ if (fLogLevelType != other.fLogLevelType) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[EventInfo(");
+ output.append(super.toString());
+ output.append(",State=");
+ output.append(fState);
+ output.append(",levelType=");
+ output.append(fLogLevelType);
+ output.append(")]");
+ return output.toString();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+
+/**
+* <p>
+* Implementation of the basic trace event interface (IEventInfo) to store event
+* related data.
+* </p>
+*
+* @author Bernd Hufmann
+*/
+public class FieldInfo extends TraceInfo implements IFieldInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The trace event type.
+ */
+ private String fFieldType;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - name of base event
+ */
+ public FieldInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public FieldInfo(FieldInfo other) {
+ super(other);
+ fFieldType = other.fFieldType;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getFieldType() {
+ return fFieldType;
+ }
+
+ @Override
+ public void setFieldType(String fieldType) {
+ fFieldType = fieldType.toLowerCase();
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result
+ + ((fFieldType == null) ? 0 : fFieldType.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ FieldInfo other = (FieldInfo) obj;
+ if (fFieldType == null) {
+ if (other.fFieldType != null) {
+ return false;
+ }
+ } else if (!fFieldType.equals(other.fFieldType)) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[FieldInfo(");
+ output.append(super.toString());
+ output.append(",type=");
+ output.append(fFieldType);
+ return output.toString();
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
+
+/**
+ * Implementation of the trace event interface (IProbeEventInfo) to store probe
+ * event related data.
+ *
+ * @author Bernd Hufmann
+ */
+public class ProbeEventInfo extends EventInfo implements IProbeEventInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The dynamic probe address (null if symbol is used).
+ */
+ private String fAddress;
+ /**
+ * The dynamic probe offset (if symbol is used).
+ */
+ private String fOffset;
+
+ /**
+ * The symbol name (null if address is used)
+ */
+ private String fSymbol;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ *
+ * @param name
+ * - name of event
+ */
+ public ProbeEventInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param other
+ * - the instance to copy
+ */
+ public ProbeEventInfo(ProbeEventInfo other) {
+ super(other);
+ fAddress = other.fAddress;
+ fOffset = other.fOffset;
+ fSymbol = other.fSymbol;
+ }
+
+ /**
+ * Constructor from a {@link IEventInfo}
+ *
+ * @param eventInfo
+ * - the instance to copy
+ */
+ public ProbeEventInfo(IEventInfo eventInfo) {
+ super(eventInfo.getName());
+ setState(eventInfo.getState());
+ setLogLevelType(eventInfo.getLogLevelType());
+ setLogLevel(eventInfo.getLogLevel());
+ setFilterExpression(eventInfo.getFilterExpression());
+ setEventType(eventInfo.getEventType());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getAddress() {
+ return fAddress;
+ }
+
+ @Override
+ public void setAddress(String address) {
+ fAddress = address;
+ }
+
+ @Override
+ public String getOffset() {
+ return fOffset;
+ }
+
+ @Override
+ public void setOffset(String offset) {
+ fOffset = offset;
+ }
+
+ @Override
+ public String getSymbol() {
+ return fSymbol;
+ }
+
+ @Override
+ public void setSymbol(String symbol) {
+ fSymbol = symbol;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operation
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((fAddress == null) ? 0 : fAddress.hashCode());
+ result = prime * result + ((fOffset == null) ? 0 : fOffset.hashCode());
+ result = prime * result + ((fSymbol == null) ? 0 : fSymbol.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ ProbeEventInfo other = (ProbeEventInfo) obj;
+ if (fAddress == null) {
+ if (other.fAddress != null) {
+ return false;
+ }
+ } else if (!fAddress.equals(other.fAddress)) {
+ return false;
+ }
+ if (fOffset == null) {
+ if (other.fOffset != null) {
+ return false;
+ }
+ } else if (!fOffset.equals(other.fOffset)) {
+ return false;
+ }
+ if (fSymbol == null) {
+ if (other.fSymbol != null) {
+ return false;
+ }
+ } else if (!fSymbol.equals(other.fSymbol)) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[ProbeEventInfo(");
+ output.append(super.toString());
+ if (fAddress != null) {
+ output.append(",fAddress=");
+ output.append(fAddress);
+ } else {
+ output.append(",fOffset=");
+ output.append(fOffset);
+ output.append(",fSymbol=");
+ output.append(fSymbol);
+ }
+ output.append(")]");
+ return output.toString();
+ }
+
+}
--- /dev/null
+/**********************************************************************
+
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+
+/**
+ * Implementation of the trace session interface (ISessionInfo) to store session
+ * related data.
+ *
+ * @author Bernd Hufmann
+ */
+public class SessionInfo extends TraceInfo implements ISessionInfo {
+
+ /**
+ * The default network URL when creating a live session.
+ */
+ public static final String DEFAULT_LIVE_NETWORK_URK = "net://127.0.0.1"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The trace session state.
+ */
+ private TraceSessionState fState = TraceSessionState.INACTIVE;
+ /**
+ * The trace session path for storing traces.
+ */
+ private String fSessionPath = ""; //$NON-NLS-1$
+ /**
+ * The domains information of this session.
+ */
+ private final List<IDomainInfo> fDomains = new ArrayList<>();
+ /**
+ * Flag to indicate whether trace is streamed over network or not.
+ */
+ private boolean fIsStreamedTrace = false;
+ /**
+ * Flag to indicate whether the session is a snapshot session or not.
+ */
+ private boolean fIsSnapshot = false;
+ /**
+ * The snapshot information of the session
+ */
+ private ISnapshotInfo fSnapshotInfo = null;
+ /**
+ * The network URL for the session (-U)
+ */
+ private String fNetworkUrl = null;
+ /**
+ * The control URL for the session (-C)
+ */
+ private String fControlUrl = null;
+ /**
+ * The data URL for the session (-D)
+ */
+ private String fDataUrl = null;
+
+ /**
+ * Flag to indicate whether trace is live or not.
+ */
+ private boolean fIsLive = false;
+
+ /**
+ * The delay in micro seconds before the data is flushed and streamed.
+ */
+ private int fLiveDelay = -1;
+
+ /**
+ * The live connection url (Relayd).
+ */
+ private String fLiveUrl;
+
+ /**
+ * The live connection port (Relayd).
+ */
+ private Integer fLivePort;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ *
+ * @param name
+ * - name of base event
+ */
+ public SessionInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ *
+ * @param other
+ * - the instance to copy
+ */
+ public SessionInfo(SessionInfo other) {
+ super(other);
+ fState = other.fState;
+ fSessionPath = other.fSessionPath;
+ fIsStreamedTrace = other.fIsStreamedTrace;
+ fIsSnapshot = other.fIsSnapshot;
+ fSnapshotInfo = other.fSnapshotInfo;
+ fNetworkUrl = other.fNetworkUrl;
+ fControlUrl = other.fControlUrl;
+ fDataUrl = other.fDataUrl;
+
+ for (Iterator<IDomainInfo> iterator = other.fDomains.iterator(); iterator.hasNext();) {
+ IDomainInfo domain = iterator.next();
+ if (domain instanceof DomainInfo) {
+ fDomains.add(new DomainInfo((DomainInfo) domain));
+ } else {
+ fDomains.add(domain);
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public TraceSessionState getSessionState() {
+ return fState;
+ }
+
+ @Override
+ public void setSessionState(TraceSessionState state) {
+ fState = state;
+ }
+
+ @Override
+ public void setSessionState(String stateName) {
+ fState = TraceSessionState.valueOfString(stateName);
+ }
+
+ @Override
+ public String getSessionPath() {
+ if (isSnapshotSession() && fSnapshotInfo != null) {
+ return fSnapshotInfo.getSnapshotPath();
+ }
+ return fSessionPath;
+ }
+
+ @Override
+ public void setSessionPath(String path) {
+ fSessionPath = path;
+ }
+
+ @Override
+ public IDomainInfo[] getDomains() {
+ return fDomains.toArray(new IDomainInfo[fDomains.size()]);
+ }
+
+ @Override
+ public void setDomains(List<IDomainInfo> domains) {
+ fDomains.clear();
+ for (Iterator<IDomainInfo> iterator = domains.iterator(); iterator.hasNext();) {
+ IDomainInfo domainInfo = iterator.next();
+ fDomains.add(domainInfo);
+ }
+ }
+
+ @Override
+ public boolean isStreamedTrace() {
+ if (isSnapshotSession() && getSnapshotInfo() != null) {
+ return getSnapshotInfo().isStreamedSnapshot();
+ }
+ return fIsStreamedTrace;
+ }
+
+ @Override
+ public void setStreamedTrace(boolean isStreamedTrace) {
+ fIsStreamedTrace = isStreamedTrace;
+ }
+
+ @Override
+ public boolean isSnapshotSession() {
+ return fIsSnapshot || fSnapshotInfo != null;
+ }
+
+ @Override
+ public void setSnapshot(boolean isSnapshot) {
+ fIsSnapshot = isSnapshot;
+ }
+
+ @Override
+ public ISnapshotInfo getSnapshotInfo() {
+ return fSnapshotInfo;
+ }
+
+ @Override
+ public void setSnapshotInfo(ISnapshotInfo info) {
+ fSnapshotInfo = info;
+ }
+
+ @Override
+ public boolean isLive() {
+ return fIsLive;
+ }
+
+ @Override
+ public void setLive(boolean isLive) {
+ fIsLive = isLive;
+ }
+
+ @Override
+ public int getLiveDelay() {
+ return fLiveDelay;
+ }
+
+ @Override
+ public void setLiveDelay(int liveDelay) {
+ fLiveDelay = liveDelay;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void addDomain(IDomainInfo domainInfo) {
+ fDomains.add(domainInfo);
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[SessionInfo(");
+ output.append(super.toString());
+ output.append(",Path=");
+ output.append(getSessionPath());
+ output.append(",State=");
+ output.append(fState);
+ output.append(",isStreamedTrace=");
+ output.append(fIsStreamedTrace);
+ output.append(",isSnapshot=");
+ output.append(fIsSnapshot);
+
+ if (fSnapshotInfo != null) {
+ output.append(",snapshotInfo=");
+ output.append(fSnapshotInfo.toString());
+ }
+ output.append(",Domains=");
+ for (Iterator<IDomainInfo> iterator = fDomains.iterator(); iterator.hasNext();) {
+ IDomainInfo domain = iterator.next();
+ output.append(domain.toString());
+ }
+
+ output.append(",NetworkUrl=");
+ output.append(getNetworkUrl());
+ output.append(",ControlUrl=");
+ output.append(getControlUrl());
+ output.append(",DataUrl=");
+ output.append(getDataUrl());
+
+ output.append(")]");
+ return output.toString();
+ }
+
+ @Override
+ public String getNetworkUrl() {
+ return fNetworkUrl;
+ }
+
+ @Override
+ public void setNetworkUrl(String networkUrl) {
+ fNetworkUrl = networkUrl;
+ }
+
+ @Override
+ public String getControlUrl() {
+ return fControlUrl;
+ }
+
+ @Override
+ public void setControlUrl(String controlUrl) {
+ fControlUrl = controlUrl;
+ }
+
+ @Override
+ public void setDataUrl(String datalUrl) {
+ fDataUrl = datalUrl;
+ }
+
+ @Override
+ public String getDataUrl() {
+ return fDataUrl;
+ }
+
+ @Override
+ public void setLiveUrl(String liveUrl) {
+ fLiveUrl = liveUrl;
+ }
+
+ @Override
+ public void setLivePort(Integer livePort) {
+ fLivePort = livePort;
+ }
+
+ @Override
+ public String getLiveUrl() {
+ return fLiveUrl;
+ }
+
+ @Override
+ public Integer getLivePort() {
+ return fLivePort;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+
+/**
+ * <p>
+ * Implementation of the snapshot interface (ISnapshotInfo) to store snapshot
+ * related data.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class SnapshotInfo extends TraceInfo implements ISnapshotInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /** The snapshot path for storing traces. */
+ private String fPath = ""; //$NON-NLS-1$
+ /** The snapshot ID */
+ private int fId = -1;
+ /** Flag whether snapshot is stored over the network or locally */
+ private boolean fIsStreamed = false;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - name of base event
+ */
+ public SnapshotInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public SnapshotInfo(SnapshotInfo other) {
+ super(other);
+ fPath = other.fPath;
+ fId = other.fId;
+ fIsStreamed = other.fIsStreamed;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getSnapshotPath() {
+ return fPath;
+ }
+
+ @Override
+ public void setSnapshotPath(String path) {
+ fPath = path;
+ }
+
+ @Override
+ public int getId() {
+ return fId;
+ }
+
+ @Override
+ public void setId(int id) {
+ fId = id;
+ }
+
+ @Override
+ public void setStreamedSnapshot(boolean isStreamed) {
+ fIsStreamed = isStreamed;
+ }
+
+ @Override
+ public boolean isStreamedSnapshot() {
+ return fIsStreamed;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + fId;
+ result = prime * result + (fIsStreamed ? 1231 : 1237);
+ result = prime * result + ((fPath == null) ? 0 : fPath.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ SnapshotInfo other = (SnapshotInfo) obj;
+ if (fId != other.fId) {
+ return false;
+ }
+ if (fIsStreamed != other.fIsStreamed) {
+ return false;
+ }
+ if (fPath == null) {
+ if (other.fPath != null) {
+ return false;
+ }
+ } else if (!fPath.equals(other.fPath)) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[SnapshotInfo(");
+ output.append(super.toString());
+ output.append(",snapshotPath=");
+ output.append(fPath);
+ output.append(",ID=");
+ output.append(fId);
+ output.append(",isStreamedSnapshot=");
+ output.append(fIsStreamed);
+ output.append(")]");
+ return output.toString();
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ITraceInfo;
+
+/**
+ * <p>
+ * Implementation of the base trace information interface (ITraceInfo) to
+ * store common data.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceInfo implements ITraceInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The name of the element.
+ */
+ private String fName = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - name of trace element
+ */
+ public TraceInfo(String name) {
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+ fName = name;
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public TraceInfo(TraceInfo other) {
+ if (other == null) {
+ throw new IllegalArgumentException();
+ }
+ fName = String.valueOf(other.fName);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getName() {
+ return fName;
+ }
+
+ @Override
+ public void setName(String name) {
+ fName = name;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((fName == null) ? 0 : fName.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ TraceInfo other = (TraceInfo) obj;
+ if (fName == null) {
+ if (other.fName != null) {
+ return false;
+ }
+ } else if (!fName.equals(other.fName)) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[TraceInfo(");
+ output.append("Name=");
+ output.append(getName());
+ output.append(")]");
+ return output.toString();
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.core.model.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+
+/**
+ * <p>
+ * Implementation of the Ust Provider interface (IUstProviderInfo) to store UST
+ * provider related data.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class UstProviderInfo extends TraceInfo implements IUstProviderInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The process ID of the UST provider.
+ */
+ private int fPid = 0;
+
+ /**
+ * List of event information.
+ */
+ private final List<IBaseEventInfo> fEvents = new ArrayList<>();
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param name - name of UST provider
+ */
+ public UstProviderInfo(String name) {
+ super(name);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - the instance to copy
+ */
+ public UstProviderInfo(UstProviderInfo other) {
+ super(other);
+ fPid = other.fPid;
+ for (Iterator<IBaseEventInfo> iterator = other.fEvents.iterator(); iterator.hasNext();) {
+ IBaseEventInfo event = iterator.next();
+ if (event instanceof BaseEventInfo) {
+ fEvents.add(new BaseEventInfo((BaseEventInfo)event));
+ } else {
+ fEvents.add(event);
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int getPid() {
+ return fPid;
+ }
+
+ @Override
+ public void setPid(int pid) {
+ fPid = pid;
+ }
+
+ @Override
+ public IBaseEventInfo[] getEvents() {
+ return fEvents.toArray(new IBaseEventInfo[fEvents.size()]);
+ }
+
+ @Override
+ public void setEvents(List<IBaseEventInfo> events) {
+ fEvents.clear();
+ for (Iterator<IBaseEventInfo> iterator = events.iterator(); iterator.hasNext();) {
+ IBaseEventInfo eventInfo = iterator.next();
+ fEvents.add(eventInfo);
+ }
+ }
+
+ @Override
+ public void addEvent(IBaseEventInfo event) {
+ fEvents.add(event);
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + fEvents.hashCode();
+ result = prime * result + fPid;
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (!super.equals(obj)) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ UstProviderInfo other = (UstProviderInfo) obj;
+ if (!fEvents.equals(other.fEvents)) {
+ return false;
+ }
+ if (fPid != other.fPid) {
+ return false;
+ }
+ return true;
+ }
+
+ @SuppressWarnings("nls")
+ @Override
+ public String toString() {
+ StringBuffer output = new StringBuffer();
+ output.append("[EventInfo(");
+ output.append(super.toString());
+ output.append(",PID=");
+ output.append(fPid);
+ output.append(",Events=");
+ if (fEvents.isEmpty()) {
+ output.append("None");
+ } else {
+ for (Iterator<IBaseEventInfo> iterator = fEvents.iterator(); iterator.hasNext();) {
+ IBaseEventInfo event = iterator.next();
+ output.append(event.toString());
+ }
+ }
+ output.append(")]");
+ return output.toString();
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd;
+
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
+
+/**
+ * Connector for Lttng Relayd
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public interface ILttngRelaydConnector extends AutoCloseable {
+
+ /**
+ * Gets a list of active Lttng sessions
+ *
+ * @return the session List (we need the get function)
+ * @throws IOException
+ * timeout and such
+ */
+ List<SessionResponse> getSessions() throws IOException;
+
+ /**
+ * Create a session
+ *
+ * @return create session response
+ * @throws IOException
+ * timeout and such
+ */
+ CreateSessionResponse createSession() throws IOException;
+
+ /**
+ * Attach the trace viewer to a Session
+ *
+ * @param lttngViewerSession
+ * viewer session
+ * @return An AttachSessionResponse
+ * @throws IOException
+ * timeout and such
+ */
+ AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) throws IOException;
+
+ /**
+ * Get the metadata from the relayd
+ *
+ * @param attachedSession
+ * the attached session
+ * @return a chunk of TSDL metadata
+ * @throws IOException
+ * timeout and such
+ */
+ String getMetadata(AttachSessionResponse attachedSession) throws IOException;
+
+ /**
+ * Get the next index
+ *
+ * @param stream
+ * the stream
+ * @return the stream input packet entry
+ * @throws IOException
+ * timeout and such
+ */
+ IndexResponse getNextIndex(StreamResponse stream) throws IOException;
+
+ /**
+ * Get the next packet in a stream
+ *
+ * @param stream
+ * the stream response
+ * @return the packet response
+ * @throws IOException
+ * timeout and such
+ */
+ TracePacketResponse getNextPacket(StreamResponse stream) throws IOException;
+
+ /**
+ * Gets the packet from the stream
+ *
+ * @param index
+ * the index of the stream
+ * @param id
+ * the stream id
+ * @return the packet response
+ * @throws IOException
+ * timeout and such
+ */
+ TracePacketResponse getPacketFromStream(IndexResponse index, long id) throws IOException;
+
+ /**
+ * Gets the new streams
+ *
+ * @return a list of stream responses
+ * @throws IOException
+ * timeout and such
+ */
+ Iterable<StreamResponse> getNewStreams() throws IOException;
+
+ @Override
+ void close() throws IOException;
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.net.Socket;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl.LttngRelaydConnector_2_4;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl.LttngRelaydConnector_Unsupported;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.Command;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectionType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ViewerCommand;
+
+/**
+ * LTTng RelayD connector factory
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public final class LttngRelaydConnectorFactory {
+
+ private LttngRelaydConnectorFactory() {
+ }
+
+ /**
+ * Create a connection to a relayd
+ *
+ * @param myConnection
+ * a connection to the relayd
+ *
+ * @return A relayd connector
+ * @throws IOException
+ * caused by invalid sockets
+ */
+ public static ILttngRelaydConnector getNewConnector(Socket myConnection) throws IOException {
+ DataOutputStream outNet = new DataOutputStream(myConnection.getOutputStream());
+ DataInputStream inNet = new DataInputStream(myConnection.getInputStream());
+
+ ViewerCommand connectCommand = new ViewerCommand(Command.VIEWER_CONNECT, ConnectResponse.SIZE, 0);
+
+ outNet.write(connectCommand.serialize());
+ outNet.flush();
+
+ ConnectResponse payload = new ConnectResponse(0, 2, 4, ConnectionType.VIEWER_CLIENT_COMMAND);
+ outNet.write(payload.serialize());
+ outNet.flush();
+
+ ConnectResponse connectReply = new ConnectResponse(inNet);
+ switch (connectReply.getMajor()) {
+ case 2:
+ switch (connectReply.getMinor()) {
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ return new LttngRelaydConnector_Unsupported();
+ case 4:
+ default:
+ return new LttngRelaydConnector_2_4(inNet, outNet);
+ }
+ default:
+ return new LttngRelaydConnector_Unsupported();
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ * Marc-Andre Laperle - Create session and split getNextIndex from getNextPacket
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.List;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionRequest;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.Command;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ConnectResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetMetadata;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetNextIndex;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.GetPacket;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ListSessionsResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.MetadataPacketResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NewStreamsResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NextIndexReturnCode;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SeekCommand;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.ViewerCommand;
+
+/**
+ * Lttng 2.4 implementation
+ *
+ * @author Matthew Khouzam
+ */
+public class LttngRelaydConnector_2_4 implements ILttngRelaydConnector {
+
+ private final @NonNull DataInputStream fInNet;
+ private final @NonNull DataOutputStream fOutNet;
+
+ /**
+ * Constructor needs two network streams
+ *
+ * @param inNet
+ * network incoming data
+ * @param outNet
+ * network outgoing data
+ */
+ public LttngRelaydConnector_2_4(@NonNull DataInputStream inNet, @NonNull DataOutputStream outNet) {
+ fInNet = inNet;
+ fOutNet = outNet;
+ }
+
+ // ------------------------------------------------------------------------
+ // AutoCloseable
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void close() throws IOException {
+ fInNet.close();
+ fOutNet.close();
+ }
+
+ // ------------------------------------------------------------------------
+ // ILttngRelaydConnector
+ // ------------------------------------------------------------------------
+
+ @Override
+ public List<SessionResponse> getSessions() throws IOException {
+ ViewerCommand listSessionsCmd = new ViewerCommand(Command.VIEWER_LIST_SESSIONS, 0,0);
+
+ fOutNet.write(listSessionsCmd.serialize());
+ fOutNet.flush();
+
+ return new ListSessionsResponse(fInNet).getSessionsList();
+ }
+
+ @Override
+ public CreateSessionResponse createSession() throws IOException {
+ ViewerCommand listSessionsCmd = new ViewerCommand(Command.VIEWER_CREATE_SESSION, 0, 0);
+ fOutNet.write(listSessionsCmd.serialize());
+ fOutNet.flush();
+
+ return new CreateSessionResponse(fInNet);
+ }
+
+ @Override
+ public AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) throws IOException {
+ ViewerCommand listSessionsCmd = new ViewerCommand(Command.VIEWER_ATTACH_SESSION, 0,0);
+ fOutNet.write(listSessionsCmd.serialize());
+ /*
+ * only flush if you read after
+ */
+
+ AttachSessionRequest attachRequest = new AttachSessionRequest(lttngViewerSession.getId(), SeekCommand.VIEWER_SEEK_BEGINNING);
+ fOutNet.write(attachRequest.serialize());
+ fOutNet.flush();
+
+ return new AttachSessionResponse(fInNet);
+ }
+
+ @Override
+ public String getMetadata(AttachSessionResponse attachedSession) throws IOException {
+
+ for (StreamResponse stream : attachedSession.getStreamList()) {
+ if (stream.getMetadataFlag() == 1) {
+ issueCommand(Command.VIEWER_GET_METADATA);
+
+ GetMetadata metadataRequest = new GetMetadata(stream.getId());
+ fOutNet.write(metadataRequest.serialize());
+ fOutNet.flush();
+
+ MetadataPacketResponse metaDataPacket = new MetadataPacketResponse(fInNet);
+ return new String(metaDataPacket.getData());
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public TracePacketResponse getPacketFromStream(IndexResponse index, long id) throws IOException {
+
+ issueCommand(Command.VIEWER_GET_PACKET);
+
+ GetPacket packetRequest = new GetPacket(id, index.getOffset(), (int) (index.getPacketSize() / 8));
+ fOutNet.write(packetRequest.serialize());
+ fOutNet.flush();
+
+ return new TracePacketResponse(fInNet);
+ }
+
+ @Override
+ public TracePacketResponse getNextPacket(StreamResponse stream) throws IOException {
+ IndexResponse indexReply = getNextIndex(stream);
+
+ TracePacketResponse packet = null;
+ if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_OK) {
+ packet = getPacketFromStream(indexReply, stream.getId());
+ }
+ return packet;
+ }
+
+ @Override
+ public IndexResponse getNextIndex(StreamResponse stream) throws IOException {
+ issueCommand(Command.VIEWER_GET_NEXT_INDEX);
+
+ GetNextIndex indexRequest = new GetNextIndex(stream.getId());
+ fOutNet.write(indexRequest.serialize());
+ fOutNet.flush();
+
+ return new IndexResponse(fInNet);
+ }
+
+ @Override
+ public List<StreamResponse> getNewStreams() throws IOException {
+
+ Command viewerGetNewStreams = Command.VIEWER_GET_NEW_STREAMS;
+
+ issueCommand(viewerGetNewStreams);
+
+ return new NewStreamsResponse(fInNet).getStreamList();
+ }
+
+ private void issueCommand(Command command) throws IOException {
+ ViewerCommand connectCommand = new ViewerCommand(command, ConnectResponse.SIZE, 0);
+ fOutNet.write(connectCommand.serialize());
+ fOutNet.flush();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.impl;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
+
+/**
+ * Unsupported version of the relay daemon
+ *
+ * @author Matthew Khouzam
+ */
+public class LttngRelaydConnector_Unsupported implements ILttngRelaydConnector {
+
+ @Override
+ public List<SessionResponse> getSessions() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public String getMetadata(AttachSessionResponse attachedSession) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public TracePacketResponse getNextPacket(StreamResponse stream) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public TracePacketResponse getPacketFromStream(IndexResponse index, long id) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List<StreamResponse> getNewStreams() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public CreateSessionResponse createSession() {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public IndexResponse getNextIndex(StreamResponse stream) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void close() {
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Return codes for "viewer attach" command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum AttachReturnCode implements IBaseCommand {
+
+ /** If the attach command succeeded. */
+ VIEWER_ATTACH_OK(1),
+ /** If a viewer is already attached. */
+ VIEWER_ATTACH_ALREADY(2),
+ /** If the session ID is unknown. */
+ VIEWER_ATTACH_UNK(3),
+ /** If the session is not live. */
+ VIEWER_ATTACH_NOT_LIVE(4),
+ /** Seek error. */
+ VIEWER_ATTACH_SEEK_ERR(5),
+ /** No session */
+ VIEWER_ATTACH_NO_SESSION(6);
+
+ private final int fCode;
+
+ private AttachReturnCode(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * VIEWER_ATTACH_SESSION payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class AttachSessionRequest implements IRelayCommand {
+
+ /**
+ * Command size
+ *
+ * fSessionId + fOffset + fSeek
+ */
+ public static final int SIZE = (Long.SIZE + Long.SIZE) / 8 + SeekCommand.SIZE;
+ /** the id of a session */
+ private final long fSessionId;
+ /** unused for now */
+ private final long fOffset;
+ /** enum lttng_viewer_seek */
+ private final SeekCommand fSeek;
+
+ /**
+ * Attach session request constructor
+ *
+ * @param id
+ * the session id
+ * @param seekCommand
+ * the seek command
+ */
+ public AttachSessionRequest(long id, SeekCommand seekCommand) {
+ this(id, 0, seekCommand);
+ }
+
+ /**
+ * Attach session request constructor
+ *
+ * @param id
+ * the session id
+ * @param offset
+ * unused for now
+ * @param seekCommand
+ * the seek command
+ */
+
+ public AttachSessionRequest(long id, int offset, SeekCommand seekCommand) {
+ fSessionId = id;
+ fOffset = offset;
+ fSeek = seekCommand;
+
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(fSessionId);
+ bb.putLong(fOffset);
+ bb.putInt(fSeek.getCommand());
+ return data;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.List;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableList.Builder;
+
+/**
+ * Attach session response
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class AttachSessionResponse implements IRelayResponse {
+
+ /**
+ * Response size
+ *
+ * fStatus + fStreamsCount (first half of a packet) */
+ private static final int SIZE = (Integer.SIZE + Integer.SIZE) / 8;
+ /** enum lttng_viewer_attach_return_code */
+ private final AttachReturnCode fStatus;
+ /** how many streams are there */
+ private final int fStreamsCount;
+ /** public class lttng_viewer_stream */
+ private final List<StreamResponse> fStreamList;
+
+ /**
+ * Attach session response network constructor
+ *
+ * @param inNet
+ * network input stream
+ * @throws IOException
+ * network error
+ */
+ public AttachSessionResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data, 0, SIZE);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fStatus = AttachReturnCode.values()[bb.getInt() - 1];
+ fStreamsCount = bb.getInt();
+ Builder<StreamResponse> streamResponses = ImmutableList.builder();
+ for (int i = 0; i < getNbStreams(); i++) {
+ streamResponses.add(new StreamResponse(inNet));
+ }
+ fStreamList = streamResponses.build();
+
+ }
+
+ /**
+ * Gets the Status
+ *
+ * @return the Status
+ */
+ public AttachReturnCode getStatus() {
+ return fStatus;
+ }
+
+ /**
+ * Gets the StreamsCount
+ *
+ * @return the StreamsCount
+ */
+ public int getNbStreams() {
+ return fStreamsCount;
+ }
+
+ /**
+ * Gets the StreamList
+ *
+ * @return the StreamList
+ */
+ public List<StreamResponse> getStreamList() {
+ return fStreamList;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Viewer commands
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum Command implements IBaseCommand {
+
+ /** get version */
+ VIEWER_CONNECT(1),
+ /** list all lttng sessions */
+ VIEWER_LIST_SESSIONS(2),
+ /** attach to a session */
+ VIEWER_ATTACH_SESSION(3),
+ /** get the next index */
+ VIEWER_GET_NEXT_INDEX(4),
+ /** get packet */
+ VIEWER_GET_PACKET(5),
+ /** get metadata */
+ VIEWER_GET_METADATA(6),
+ /** get new streams */
+ VIEWER_GET_NEW_STREAMS(7),
+ /** create a new session */
+ VIEWER_CREATE_SESSION(8);
+
+ /**
+ * Command size (fCode)
+ */
+ public static final int SIZE = Integer.SIZE / 8;
+
+ private final int fCode;
+
+ private Command(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * CONNECT payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class ConnectResponse implements IRelayResponse, IRelayCommand {
+
+ /**
+ * Response or command size
+ *
+ * fViewerSessionId + fMajor + fMinor + fType
+ */
+ public static final int SIZE = (Long.SIZE + Integer.SIZE + Integer.SIZE + Integer.SIZE) / 8;
+ /** session id, counts from 1 and increments by session */
+ private final long fViewerSessionId;
+ /**
+ * Major version, hint, it's at least 2
+ */
+ private final int fMajor;
+ /**
+ * Minor version, hint, it's at least 4
+ */
+ private final int fMinor;
+ /**
+ * type of connect to {@link ConnectionType}
+ */
+ private final ConnectionType fType;
+
+ /**
+ * Connection response reply constructor
+ *
+ * @param inStream
+ * the data input stream
+ * @throws IOException
+ * a network error
+ */
+ public ConnectResponse(DataInputStream inStream) throws IOException {
+ byte data[] = new byte[SIZE];
+ inStream.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fViewerSessionId = bb.getLong();
+ fMajor = bb.getInt();
+ fMinor = bb.getInt();
+ bb.getInt(); // Should not be used, see http://bugs.lttng.org/issues/728
+ fType = ConnectionType.VIEWER_CLIENT_COMMAND;
+ }
+
+ /**
+ * Constructor for command
+ *
+ * @param sessionID
+ * session id
+ * @param major
+ * the major version
+ * @param minor
+ * the minor version
+ * @param connection
+ * the connection type, typically VIEWER_CLIENT_COMMAND
+ */
+ public ConnectResponse(long sessionID, int major, int minor, ConnectionType connection) {
+ fViewerSessionId = sessionID;
+ fMajor = major;
+ fMinor = minor;
+ fType = connection;
+ }
+
+ /**
+ * get the major version
+ *
+ * @return the major version
+ */
+ public int getMajor() {
+ return fMajor;
+ }
+
+ /**
+ * get the minor version
+ *
+ * @return the minor version
+ */
+ public int getMinor() {
+ return fMinor;
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(fViewerSessionId);
+ bb.putInt(fMajor);
+ bb.putInt(fMinor);
+ bb.putInt(fType.getCommand());
+ return data;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Get viewer connection type
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum ConnectionType implements IBaseCommand {
+
+ /** Command sent */
+ VIEWER_CLIENT_COMMAND(1),
+ /** Notification sent */
+ VIEWER_CLIENT_NOTIFICATION(2);
+
+ private final int fCode;
+
+ private ConnectionType(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * Response to a "create session" command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class CreateSessionResponse implements IRelayResponse {
+
+ /**
+ * Response size (fStatus)
+ */
+ public static final int SIZE = Integer.SIZE / 8;
+
+ /** enum lttng_viewer_create_session_return_code */
+ private final CreateSessionReturnCode fStatus;
+
+ /**
+ * Create session response network constructor
+ *
+ * @param inNet
+ * network input stream
+ * @throws IOException
+ * network error
+ */
+ public CreateSessionResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fStatus = (CreateSessionReturnCode.values()[bb.getInt() - 1]);
+ }
+
+ /**
+ * Get status
+ *
+ * @return the status
+ */
+ public CreateSessionReturnCode getStatus() {
+ return fStatus;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Create new session return code
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum CreateSessionReturnCode implements IBaseCommand {
+
+ /** If new streams are being sent. */
+ LTTNG_VIEWER_CREATE_SESSION_OK(1),
+ /** Fatal error on the server-side. */
+ LTTNG_VIEWER_CREATE_SESSION_ERR(2);
+
+ private final int fCode;
+
+ private CreateSessionReturnCode(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * VIEWER_GET_METADATA payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class GetMetadata implements IRelayCommand {
+
+ /**
+ * Command size (fStreamId)
+ */
+ public static final int SIZE = Long.SIZE / 8;
+
+ /**
+ * The stream id
+ */
+ private final long fStreamId;
+
+ /**
+ * Set the stream id
+ *
+ * @param streamId
+ * the stream id
+ */
+ public GetMetadata(long streamId) {
+ fStreamId = streamId;
+ }
+
+ /**
+ * Get the stream id
+ *
+ * @return the stream id
+ */
+ public long getStreamId() {
+ return fStreamId;
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(getStreamId());
+ return data;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Get metadata return code
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum GetMetadataReturnCode implements IBaseCommand {
+
+ /** Response was OK */
+ VIEWER_METADATA_OK(1),
+ /** Response was nothing new */
+ VIEWER_NO_NEW_METADATA(2),
+ /** Response was Error */
+ VIEWER_METADATA_ERR(3);
+
+ private final int fCode;
+
+ private GetMetadataReturnCode(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * VIEWER_GET_NEXT_INDEX payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class GetNextIndex implements IRelayCommand {
+
+ /**
+ * Command size (fStreamId)
+ */
+ public static final int SIZE = Long.SIZE / 8;
+ /**
+ * the id of the stream
+ */
+ private final long fStreamId;
+
+ /**
+ * Constructor
+ *
+ * @param streamId
+ * the index stream id
+ */
+ public GetNextIndex(long streamId) {
+ fStreamId = streamId;
+ }
+
+ /**
+ * Gets the stream id
+ *
+ * @return the stream id
+ */
+ public long getStreamId() {
+ return fStreamId;
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(getStreamId());
+ return data;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * VIEWER_GET_PACKET payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class GetPacket implements IRelayCommand {
+
+ /**
+ * Command size
+ *
+ * fStreamId + fOffset + fLength
+ */
+ public static final int SIZE = (Long.SIZE + Long.SIZE + Integer.SIZE) / 8;
+ /** the stream Id */
+ private final long fStreamId;
+ /** the offset */
+ private final long fOffset;
+ /** the length of the packet */
+ private final int fLength;
+
+ /**
+ * Get packet constructor
+ *
+ * @param streamId
+ * the stream id
+ * @param offset
+ * the offset
+ * @param length
+ * the packet length
+ */
+ public GetPacket(long streamId, long offset, int length) {
+ fStreamId = streamId;
+ fOffset = offset;
+ fLength = length;
+ }
+
+ /**
+ * Get the length of the packet
+ *
+ * @return the length of the packet in bytes
+ */
+ public int getLength() {
+ return fLength;
+ }
+
+ /**
+ * Gets the offset of the packet
+ *
+ * @return the offset
+ */
+ public long getOffset() {
+ return fOffset;
+ }
+
+ /**
+ * Gets the stream id
+ *
+ * @return the stream id
+ */
+ public long getStreamId() {
+ return fStreamId;
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(getStreamId());
+ bb.putLong(getOffset());
+ bb.putInt(getLength());
+ return data;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Get packet return code
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum GetPacketReturnCode implements IBaseCommand {
+
+ /** Response was OK */
+ VIEWER_GET_PACKET_OK(1),
+ /** Response was RETRY */
+ VIEWER_GET_PACKET_RETRY(2),
+ /** Response was ERROR */
+ VIEWER_GET_PACKET_ERR(3),
+ /** Response was End of File */
+ VIEWER_GET_PACKET_EOF(4);
+
+ private final int fCode;
+
+ private GetPacketReturnCode(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Instruction to send to relayd
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public interface IBaseCommand {
+
+ /**
+ * gets the numerical value of the command
+ *
+ * @return the numerical value of the command
+ */
+ int getCommand();
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+
+/**
+ * Command sent, needs a getBytes to stream the data
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public interface IRelayCommand {
+
+ /**
+ * Gets a byte array of the command so that it may be streamed
+ *
+ * @return the byte array of the command
+ */
+ byte[] serialize();
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Command response, this will allow sorting commands easier
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public interface IRelayResponse {
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * An Lttng packet index
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class IndexResponse implements IRelayResponse {
+
+ /**
+ * Command size
+ *
+ * Sum of the field sizes / 8 ( 7 longs and 2 ints):
+ * fOffset + fPacketSize + fContentSize + fTimestampBegin + fTimestampEnd +
+ * fEventsDiscarded + fStreamId + fStatus + fFlags
+ */
+ public final static int SIZE =
+ (Long.SIZE * 7 + Integer.SIZE * 2) / 8;
+
+ /** the offset */
+ private final long fOffset;
+ /** packet_size */
+ private final long fPacketSize;
+ /** the content size - how much of the packet is used */
+ private final long fContentSize;
+ /** timestamp of the beginning of the packet */
+ private final long fTimestampBegin;
+ /** timestamp of the end of the packet */
+ private final long fTimestampEnd;
+ /** number of discarded events BEFORE this packet */
+ private final long fEventsDiscarded;
+ /** the CTF stream id */
+ private final long fStreamId;
+ /** the status of the getNextIndex request */
+ private final NextIndexReturnCode fStatus;
+ /** whether there are new streams or metadata */
+ private final int fFlags;
+
+ /**
+ * IndexResposne from network
+ *
+ * @param inNet
+ * data input stream
+ * @throws IOException
+ * network error
+ */
+ public IndexResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fOffset = bb.getLong();
+ fPacketSize = bb.getLong();
+ fContentSize = bb.getLong();
+ fTimestampBegin = bb.getLong();
+ fTimestampEnd = bb.getLong();
+ fEventsDiscarded = bb.getLong();
+ fStreamId = bb.getLong();
+ fStatus = NextIndexReturnCode.values()[bb.getInt() - 1];
+ fFlags = bb.getInt();
+ }
+
+ /**
+ * Gets the offset
+ *
+ * @return the offset
+ */
+ public long getOffset() {
+ return fOffset;
+ }
+
+ /**
+ * Gets the packet size
+ *
+ * @return the packet size
+ */
+ public long getPacketSize() {
+ return fPacketSize;
+ }
+
+ /**
+ * Gets the content size - how much of the packet is used
+ *
+ * @return the content size
+ */
+ public long getContentSize() {
+ return fContentSize;
+ }
+
+ /**
+ * Gets the timestamp of the beginning of the packet
+ *
+ * @return the timestamp of the beginning of the packet
+ */
+ public long getTimestampBegin() {
+ return fTimestampBegin;
+ }
+
+ /**
+ * Gets the timestamp of the end of the packet
+ *
+ * @return the timestamp of the end of the packet
+ */
+ public long getTimestampEnd() {
+ return fTimestampEnd;
+ }
+
+ /**
+ * Gets the number of discarded events BEFORE this packet
+ *
+ * @return the number of discarded events BEFORE this packet
+ */
+ public long getEventsDiscarded() {
+ return fEventsDiscarded;
+ }
+
+ /**
+ * Gets the CTF stream id
+ *
+ * @return the CTF stream id
+ */
+ public long getStreamId() {
+ return fStreamId;
+ }
+
+ /**
+ * Gets the status
+ *
+ * @return the status
+ */
+ public NextIndexReturnCode getStatus() {
+ return fStatus;
+ }
+
+ /**
+ * Gets the flags that describe whether there are new streams or metadata
+ *
+ * @return the flags
+ */
+ public int getFlags() {
+ return fFlags;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.List;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableList.Builder;
+
+/**
+ * VIEWER_LIST_SESSIONS payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class ListSessionsResponse implements IRelayResponse {
+
+ /**
+ * Response size (nbSessions)
+ */
+ public static final int PACKET_FIXED_SIZE = Integer.SIZE / 8;
+
+ /** the list of sessions */
+ private final List<SessionResponse> fSessionList;
+
+ /**
+ * List Sessions response from network
+ *
+ * @param inNet
+ * the network stream
+ * @throws IOException
+ * network error
+ */
+ public ListSessionsResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[PACKET_FIXED_SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ int nbSessions = bb.getInt();
+ Builder<SessionResponse> sl = new ImmutableList.Builder<>();
+ for (int session = 0; session < nbSessions; session++) {
+ sl.add(new SessionResponse(inNet));
+ }
+ fSessionList = sl.build();
+ }
+
+ /**
+ * Gets the session list
+ *
+ * @return the sessions list
+ */
+ public List<SessionResponse> getSessionsList() {
+ return fSessionList;
+ }
+
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * LTTng Relay Daemon API. needs a TCP connection, API is defined from
+ * BSD-licensed implementation in Lttng tools: <a href=
+ * "http://git.lttng.org/?p=lttng-tools.git;a=blob;f=src/bin/lttng-relayd/lttng-viewer-abi.h"
+ * > src/bin/lttng-relayd/lttng-viewer-abi.h</a>
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public interface LttngViewerCommands {
+
+ /** Maximum path name length */
+ static final int LTTNG_VIEWER_PATH_MAX = 4096;
+ /** Maximum name length */
+ static final int LTTNG_VIEWER_NAME_MAX = 255;
+ /** Maximum host name length */
+ static final int LTTNG_VIEWER_HOST_NAME_MAX = 64;
+ /** New stream in the trace */
+ static final int NEW_STREAM = (1 << 1);
+ /** New metadata in the trace */
+ static final int NEW_METADATA = (1 << 0);
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * Metadata packet response containing a packet of metadata
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class MetadataPacketResponse implements IRelayResponse {
+
+ /**
+ * Response size
+ *
+ * fData.length + fStatus
+ */
+ private static final int SIZE = (Long.SIZE + Integer.SIZE) / 8;
+ /** status of the metadata request */
+ private final GetMetadataReturnCode fStatus;
+ /** the packet */
+ private final byte fData[];
+
+ /**
+ * Read new metadata packet from the network
+ *
+ * @param inNet
+ * network input reader
+ * @throws IOException
+ * network error
+ */
+ public MetadataPacketResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ long length = bb.getLong();
+ fStatus = GetMetadataReturnCode.values()[bb.getInt() - 1];
+ if (length >= Integer.MAX_VALUE) {
+ throw new IOException("Metadata Packet too big " + length); //$NON-NLS-1$
+ }
+ fData = new byte[(int) length];
+ inNet.readFully(fData);
+ }
+
+ /**
+ * Get the packet
+ *
+ * @return the packet
+ */
+ public byte[] getData() {
+ return fData;
+ }
+
+ /**
+ * Gets the status
+ *
+ * @return the status
+ */
+ public GetMetadataReturnCode getStatus() {
+ return fStatus;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * LTTNG_VIEWER_GET_NEW_STREAMS payload.
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class NewStreamsRequest implements IRelayCommand {
+
+ /**
+ * Command size (fSessionId)
+ */
+ public static final int SIZE = Long.SIZE / 8;
+
+ /** session ID */
+ private final long fSessionId;
+
+ /**
+ * Constructor
+ *
+ * @param sessionId
+ * the session id we want
+ */
+ public NewStreamsRequest(long sessionId) {
+ fSessionId = sessionId;
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(fSessionId);
+ return data;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.List;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * Response to a "new streams" command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class NewStreamsResponse implements IRelayResponse {
+
+ /**
+ * Response size
+ *
+ * fStatus + fNbStreams
+ */
+ private static final int SIZE = (Integer.SIZE + Integer.SIZE) / 8;
+ /** status of the request */
+ private final NewStreamsReturnCode fStatus;
+ /** the number of streams */
+ private final int fNbStreams;
+ /** the list of streams in the response */
+ private final List<StreamResponse> fStreamList;
+
+ /**
+ * New stream response network constructor
+ *
+ * @param inNet
+ * network stream
+ * @throws IOException
+ * network error
+ */
+ public NewStreamsResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fStatus = NewStreamsReturnCode.values()[bb.getInt() - 1];
+ fNbStreams = bb.getInt();
+ ImmutableList.Builder<StreamResponse> sl = new ImmutableList.Builder<>();
+ if (getStatus().equals(NewStreamsReturnCode.LTTNG_VIEWER_NEW_STREAMS_OK)) {
+ for (int stream = 0; stream < fNbStreams; stream++) {
+ sl.add(new StreamResponse(inNet));
+ }
+ }
+ fStreamList = sl.build();
+ }
+
+ /**
+ * Gets the status
+ *
+ * @return the status
+ */
+ public NewStreamsReturnCode getStatus() {
+ return fStatus;
+ }
+
+ /**
+ * gets the stream list
+ *
+ * @return the stream list
+ */
+ public List<StreamResponse> getStreamList() {
+ return fStreamList;
+ }
+
+ /**
+ * The number of streams
+ *
+ * @return the number of streams
+ */
+ public int getNbStreams() {
+ return fNbStreams;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Return codes for "new streams" command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum NewStreamsReturnCode implements IBaseCommand {
+
+ /** If new streams are being sent. */
+ LTTNG_VIEWER_NEW_STREAMS_OK(1),
+ /** If no new streams are available. */
+ LTTNG_VIEWER_NEW_STREAMS_NO_NEW(2),
+ /** Error. */
+ LTTNG_VIEWER_NEW_STREAMS_ERR(3),
+ /** Session closed. */
+ LTTNG_VIEWER_NEW_STREAMS_HUP(4);
+
+ private final int fCode;
+
+ private NewStreamsReturnCode(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Get next index return code (hope it's viewer_index_ok)
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum NextIndexReturnCode implements IBaseCommand {
+
+ /** Index is available. */
+ VIEWER_INDEX_OK(1),
+ /** Index not yet available. */
+ VIEWER_INDEX_RETRY(2),
+ /** Index closed (trace destroyed). */
+ VIEWER_INDEX_HUP(3),
+ /** Unknown error. */
+ VIEWER_INDEX_ERR(4),
+ /** Inactive stream beacon. */
+ VIEWER_INDEX_INACTIVE(5),
+ /** End of index file. */
+ VIEWER_INDEX_EOF(6);
+
+ private final int fCode;
+
+ private NextIndexReturnCode(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+/**
+ * Seek command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public enum SeekCommand implements IBaseCommand {
+
+ /** Receive the trace packets from the beginning. */
+ VIEWER_SEEK_BEGINNING(1),
+ /** Receive the trace packets from now. */
+ VIEWER_SEEK_LAST(2);
+
+ private final int fCode;
+
+ /**
+ * Command size (fCode)
+ */
+ public static final int SIZE = Integer.SIZE / 8;
+
+ private SeekCommand(int c) {
+ fCode = c;
+ }
+
+ @Override
+ public int getCommand() {
+ return fCode;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * Get viewer session response to command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class SessionResponse implements IRelayResponse {
+
+ /**
+ * Response size
+ *
+ * fHostname + fSessionName + fId + fLiveTimer + fClients + fStreams
+ */
+ public static final int SIZE =
+ LttngViewerCommands.LTTNG_VIEWER_HOST_NAME_MAX + LttngViewerCommands.LTTNG_VIEWER_NAME_MAX + (Long.SIZE + Integer.SIZE + Integer.SIZE + Integer.SIZE) / 8;
+ /** id of the session */
+ private final long fId;
+ /** live timer */
+ private final int fLiveTimer;
+ /** number of clients */
+ private final int fClients;
+ /** number streams */
+ private final int fStreams;
+ /** Hostname, like 'localhost' */
+ private final String fHostname;
+ /** Session name, like 'streaming session' */
+ private final String fSessionName;
+
+ /**
+ * Session response network constructor
+ *
+ * @param inNet
+ * input network stream
+ * @throws IOException
+ * network error
+ */
+ public SessionResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fId = bb.getLong();
+ fLiveTimer = bb.getInt();
+ fClients = bb.getInt();
+ fStreams = bb.getInt();
+ byte[] hostName = new byte[LttngViewerCommands.LTTNG_VIEWER_HOST_NAME_MAX];
+ byte[] sessionName = new byte[LttngViewerCommands.LTTNG_VIEWER_NAME_MAX];
+ bb.get(hostName, 0, hostName.length);
+ bb.get(sessionName, 0, sessionName.length);
+ fHostname = new String(hostName);
+ fSessionName = new String(sessionName);
+ }
+
+ /**
+ * Gets the id of the session
+ *
+ * @return the id of the session
+ */
+ public long getId() {
+ return fId;
+ }
+
+ /**
+ * Gets the live timer
+ *
+ * @return the live timer
+ */
+ public int getLiveTimer() {
+ return fLiveTimer;
+ }
+
+ /**
+ * Gets the number of clients
+ *
+ * @return the number of clients
+ */
+ public int getClients() {
+ return fClients;
+ }
+
+ /**
+ * Gets the number streams
+ *
+ * @return the number streams
+ */
+ public int getStreams() {
+ return fStreams;
+ }
+
+ /**
+ * Gets the Hostname
+ *
+ * @return the Hostname
+ */
+ public String getHostname() {
+ return fHostname;
+ }
+
+ /**
+ * Gets the session name
+ *
+ * @return the session name
+ */
+ public String getSessionName() {
+ return fSessionName;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * Get response of viewer stream
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class StreamResponse implements IRelayResponse {
+
+ /**
+ * Response size
+ *
+ * fId + fCtfTraceId + fMetadataFlag + fPathName + fChannelName
+ */
+ public static final int SIZE = (Long.SIZE + Long.SIZE + Integer.SIZE) / 8 + LttngViewerCommands.LTTNG_VIEWER_PATH_MAX + LttngViewerCommands.LTTNG_VIEWER_NAME_MAX;
+
+ /**
+ * id of the stream
+ */
+ private final long fId;
+ /**
+ * It is guaranteed to be unique, because the value is assigned sequentially
+ * by the relay.
+ */
+ private final long fCtfTraceId;
+ /**
+ * if the stream is a metadata stream
+ */
+ private final int fMetadataFlag;
+ /**
+ * the path
+ */
+ private final String fPathName;
+ /**
+ * The channel, traditionally channel0
+ */
+ private final String fChannelName;
+
+ /**
+ * Stream response
+ *
+ * @param inNet
+ * input data stream
+ * @throws IOException
+ * network time
+ */
+ public StreamResponse(DataInputStream inNet) throws IOException {
+ byte[] streamData = new byte[SIZE];
+ inNet.readFully(streamData, 0, SIZE);
+ ByteBuffer bb = ByteBuffer.wrap(streamData);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fId = (bb.getLong());
+ fCtfTraceId = bb.getLong();
+ fMetadataFlag = bb.getInt();
+ byte pathName[] = new byte[LttngViewerCommands.LTTNG_VIEWER_PATH_MAX];
+ byte channelName[] = new byte[LttngViewerCommands.LTTNG_VIEWER_NAME_MAX];
+ bb.get(pathName, 0, LttngViewerCommands.LTTNG_VIEWER_PATH_MAX);
+ bb.get(channelName, 0, LttngViewerCommands.LTTNG_VIEWER_NAME_MAX);
+ fPathName = new String(pathName);
+ fChannelName = new String(channelName);
+ }
+
+ /**
+ * Get the id
+ *
+ * @return the Id
+ */
+ public long getId() {
+ return fId;
+ }
+
+ /**
+ * Get the CtfTraceId
+ *
+ * @return the CtfTraceId
+ */
+ public long getCtfTraceId() {
+ return fCtfTraceId;
+ }
+
+ /**
+ * Get the metadata flag
+ *
+ * @return the MetadataFlag
+ */
+ public int getMetadataFlag() {
+ return fMetadataFlag;
+ }
+
+ /**
+ * Get the path name
+ *
+ * @return the PathName
+ */
+ public String getPathName() {
+ return fPathName;
+ }
+
+ /**
+ * get the Channel name
+ *
+ * @return the ChannelName
+ */
+ public String getChannelName() {
+ return fChannelName;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * Response to getpacket command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class TracePacketResponse implements IRelayResponse {
+
+ /**
+ * Command size
+ *
+ * fStatus + fData.length + fFlags
+ */
+ private static final int SIZE = (Integer.SIZE + Integer.SIZE + Integer.SIZE) / 8;
+ /** Enum lttng_viewer_get_packet_return_code */
+ private final GetPacketReturnCode fStatus;
+ /** flags: is there new metadata or new streams? */
+ private final int fFlags;
+ /** the packet */
+ private final byte[] fData;
+
+ /**
+ * Trace packet response network constructor
+ *
+ * @param inNet
+ * network input stream
+ * @throws IOException
+ * network error
+ */
+ public TracePacketResponse(DataInputStream inNet) throws IOException {
+ byte[] data = new byte[SIZE];
+ inNet.readFully(data);
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ fStatus = GetPacketReturnCode.values()[bb.getInt() - 1];
+ int length = bb.getInt();
+ fFlags = bb.getInt();
+ if (fStatus.equals(GetPacketReturnCode.VIEWER_GET_PACKET_OK)) {
+ fData = new byte[length];
+ inNet.readFully(fData);
+ } else {
+ fData = new byte[0];
+ }
+ }
+
+ /**
+ * Get the status
+ *
+ * @return the Status
+ */
+ public GetPacketReturnCode getStatus() {
+ return fStatus;
+ }
+
+ /**
+ * Get the flags
+ *
+ * @return the Flags
+ */
+ public int getFlags() {
+ return fFlags;
+ }
+
+ /**
+ * Get the packet data, please do not modify the data
+ *
+ * @return the Data
+ */
+ public byte[] getData() {
+ return fData;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation and API
+ * Marc-Andre Laperle - Initial implementation and API
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+/**
+ * The LTTng command
+ *
+ * @author Matthew Khouzam
+ * @since 3.0
+ */
+public class ViewerCommand implements IRelayCommand {
+
+ /**
+ * Command size
+ *
+ * fDataSize + fCmdVersion + fCmd
+ */
+ public static final int SIZE = (Long.SIZE + Integer.SIZE) / 8 + Command.SIZE;
+ /**
+ * data size following this header, you normally attach a payload that one,
+ * in bytes
+ */
+ private final long fDataSize;
+ /** enum lttcomm_relayd_command */
+ private final Command fCmd;
+ /** command version */
+ private final int fCmdVersion;
+
+ /**
+ * Sets the packet command
+ *
+ * @param viewerConnect
+ * the command
+ * @param size size of the command
+ * @param version the version number
+ */
+ public ViewerCommand(Command viewerConnect, long size, int version) {
+ fCmd = viewerConnect;
+ fDataSize = size;
+ fCmdVersion = version;
+ }
+
+ /**
+ * Get the data size
+ *
+ * @return the DataSize
+ */
+ public long getDataSize() {
+ return fDataSize;
+ }
+
+ /**
+ * Get the command
+ *
+ * @return the Cmd
+ */
+ public Command getCmd() {
+ return fCmd;
+ }
+
+ /**
+ * Get the command version
+ *
+ * @return the CmdVersion
+ */
+ public int getCmdVersion() {
+ return fCmdVersion;
+ }
+
+ @Override
+ public byte[] serialize() {
+ byte data[] = new byte[SIZE];
+ ByteBuffer bb = ByteBuffer.wrap(data);
+ bb.order(ByteOrder.BIG_ENDIAN);
+ bb.putLong(getDataSize());
+ bb.putInt(getCmd().getCommand());
+ bb.putInt(fCmdVersion);
+ return data;
+ }
+
+
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.core.session;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Externalized message strings from the lttng2.core.control.session
+ *
+ * @author Guilliano Molaire
+ * @since 3.0
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.control.core.session.messages"; //$NON-NLS-1$
+
+ public static String SessionConfigXML_BadRequirementType;
+ public static String SessionConfigXML_DomainTypeMissing;
+ public static String SessionConfigXML_EventTypeMissing;
+ public static String SessionConfigXML_InvalidSessionInfoList;
+ public static String SessionConfigXML_InvalidTraceSessionPath;
+ public static String SessionConfigXML_UnknownEventType;
+ public static String SessionConfigXML_UnknownDomainBufferType;
+ public static String SessionConfigXML_SessionConfigGenerationError;
+ public static String SessionConfigXML_XmlParseError;
+ public static String SessionConfigXML_XmlValidateError;
+ public static String SessionConfigXML_XmlValidationError;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *********************************************************************/
+package org.eclipse.linuxtools.lttng2.control.core.session;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Set;
+
+import javax.xml.XMLConstants;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Source;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.internal.lttng2.control.core.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.osgi.util.NLS;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * Class for generating a session configuration file. A session configuration is
+ * used to configure a trace session. It is a XML formatted file that contains
+ * values defining the behavior of that specific trace session.
+ * <p>
+ * Kernel session configuration example:
+ *
+ * <pre>
+ * {@code
+ * <sessions>
+ * <session>
+ * <name>test_kernel</name>
+ * <domains>
+ * <domain>
+ * <type>KERNEL</type>
+ * <buffer_type>GLOBAL</buffer_type>
+ * <channels>
+ * <channel>
+ * <name>channel0</name>
+ * <enabled>false</enabled>
+ * <overwrite_mode>DISCARD</overwrite_mode>
+ * <subbuffer_size>262144</subbuffer_size>
+ * <subbuffer_count>4</subbuffer_count>
+ * <switch_timer_interval>0</switch_timer_interval>
+ * <read_timer_interval>200000</read_timer_interval>
+ * <output_type>SPLICE</output_type>
+ * <tracefile_size>0</tracefile_size>
+ * <tracefile_count>0</tracefile_count>
+ * <live_timer_interval>0</live_timer_interval>
+ * <events>
+ * <event>
+ * <enabled>true</enabled>
+ * <type>SYSCALL</type>
+ * </event>
+ * <event>
+ * <name>snd_soc_cache_sync</name>
+ * <enabled>true</enabled>
+ * <type>TRACEPOINT</type>
+ * </event>
+ * </events>
+ * </channel>
+ * </channels>
+ * </domain>
+ * </domains>
+ * <started>false</started>
+ * <output>
+ * <consumer_output>
+ * <enabled>true</enabled>
+ * <destination>
+ * <path>/home/user/lttng-traces/test_kernel</path>
+ * </destination>
+ * </consumer_output>
+ * </output>
+ * </session>
+ * </sessions>
+ * }
+ * </pre>
+ *
+ * </p>
+ *
+ * @author Guilliano Molaire
+ * @since 3.0
+ */
+public final class SessionConfigGenerator {
+
+ /** The name of the session schema */
+ private static final String SESSION_XSD_FILENAME = "session.xsd"; //$NON-NLS-1$
+
+ /** The indent size used for the session configuration XML file */
+ private static final String INDENT_AMOUNT_PROPERTY_NAME = "{http://xml.apache.org/xslt}indent-amount"; //$NON-NLS-1$
+ private static final String INDENT_AMOUNT_PROPERTY_VALUE = "4"; //$NON-NLS-1$
+
+ /**
+ * Private constructor. The class should not be instantiated.
+ */
+ private SessionConfigGenerator() {
+ }
+
+ // ---------------------------------------------------------
+ // Methods to generate session configuration files
+ // ---------------------------------------------------------
+
+ /**
+ * Generates a session configuration file from a set of session information.
+ *
+ * @param sessions
+ * The session informations
+ * @param sessionFileDestination
+ * The path of the locally saved session configuration file
+ * @return The status of the session configuration generation
+ */
+ public static IStatus generateSessionConfig(Set<ISessionInfo> sessions, IPath sessionFileDestination) {
+ /* Parameters validation */
+ if (sessions == null || sessions.isEmpty()) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SessionConfigXML_InvalidSessionInfoList);
+ } else if (sessionFileDestination == null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SessionConfigXML_InvalidTraceSessionPath);
+ }
+
+ /* Generate the session configuration file */
+ try {
+ Document sessionConfigDocument = generateSessionConfig(sessions);
+
+ if (sessionConfigDocument != null) {
+ saveSessionConfig(sessionConfigDocument, sessionFileDestination.toString());
+ } else {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.SessionConfigXML_SessionConfigGenerationError);
+ }
+ } catch (TransformerException | IllegalArgumentException | ParserConfigurationException e) {
+ Activator.getDefault().logError("Error generating the session configuration file: " + sessionFileDestination.toString(), e); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage());
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Generates a session configuration from a set of session informations.
+ *
+ * @param sessions
+ * The session informations
+ * @return The document with all session configuration nodes
+ * @throws IllegalArgumentException
+ * On an illegal argument inside sessions
+ * @throws ParserConfigurationException
+ * On an parser configuration error
+ */
+ private static Document generateSessionConfig(Iterable<ISessionInfo> sessions) throws IllegalArgumentException, ParserConfigurationException {
+ DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
+
+ Document document = docBuilder.newDocument();
+
+ Element rootElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_SESSIONS);
+ document.appendChild(rootElement);
+
+ for (ISessionInfo session : sessions) {
+ /* All elements under "sessions" elements */
+ Element sessionElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_SESSION);
+
+ /* Contents of session element */
+ String enabled = session.getSessionState().equals(TraceSessionState.ACTIVE) ? SessionConfigStrings.CONFIG_STRING_TRUE : SessionConfigStrings.CONFIG_STRING_FALSE;
+
+ addElementContent(document, sessionElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, session.getName());
+ addElementContent(document, sessionElement, SessionConfigStrings.CONFIG_ELEMENT_STARTED, enabled);
+
+ if (session.isSnapshotSession()) {
+ /* If it's a snapshot, we must add an attribute telling it is */
+ Element attributesElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_ATTRIBUTES);
+ addElementContent(document, attributesElement, SessionConfigStrings.CONFIG_ELEMENT_SNAPSHOT_MODE, SessionConfigStrings.CONFIG_STRING_TRUE);
+ sessionElement.appendChild(attributesElement);
+ }
+
+ sessionElement.appendChild(getDomainsElement(document, session));
+ sessionElement.appendChild(getOutputElement(document, session));
+ rootElement.appendChild(sessionElement);
+ }
+
+ return document;
+ }
+
+ // ---------------------------------------------------------
+ // Getters for each element of the configuration file
+ // ---------------------------------------------------------
+
+ /**
+ * Gets the 'domains' element after creating it.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param session
+ * The session informations
+ * @return The domains element as an XML element
+ */
+ private static Element getDomainsElement(Document document, ISessionInfo session) {
+ Element domainsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_DOMAINS);
+
+ for (IDomainInfo domain : session.getDomains()) {
+ Element domainElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
+
+ /*
+ * Add everything specific to a domain
+ *
+ * TODO: We suppose here that domain is either kernel or UST. It
+ * will have to change if other domains are supported
+ */
+ String domainType = domain.isKernel() ? SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL : SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST;
+ addElementContent(document, domainElement, SessionConfigStrings.CONFIG_ELEMENT_TYPE, domainType);
+
+ String bufferType = null;
+ switch (domain.getBufferType()) {
+ case BUFFER_PER_UID:
+ bufferType = SessionConfigStrings.CONFIG_BUFFER_TYPE_PER_UID;
+ break;
+ case BUFFER_PER_PID:
+ bufferType = SessionConfigStrings.CONFIG_BUFFER_TYPE_PER_PID;
+ break;
+ case BUFFER_SHARED:
+ bufferType = SessionConfigStrings.CONFIG_BUFFER_TYPE_GLOBAL;
+ break;
+ case BUFFER_TYPE_UNKNOWN:
+ default:
+ throw new IllegalArgumentException(Messages.SessionConfigXML_UnknownDomainBufferType);
+ }
+ addElementContent(document, domainElement, SessionConfigStrings.CONFIG_ELEMENT_DOMAIN_BUFFER_TYPE, bufferType);
+
+ /* Add the channels */
+ domainElement.appendChild(getChannelsElement(document, domain.isKernel(), domain.getChannels()));
+ domainsElement.appendChild(domainElement);
+ }
+
+ return domainsElement;
+ }
+
+ /**
+ * Gets the 'output' element after creating it. If the session is a
+ * snapshot, it will be composed of a snapshot outputs element. Otherwise,
+ * it will contain the consumer output element.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param session
+ * The session informations
+ * @return The output element as an XML node
+ */
+ private static Element getOutputElement(Document document, ISessionInfo session) {
+ Element outputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_OUTPUT);
+
+ if (session.isSnapshotSession()) {
+ outputElement.appendChild(getSnapshotOuputsElement(document, session));
+ } else if (session.isStreamedTrace()) {
+ outputElement.appendChild(getNetOutputElement(document, session));
+ } else {
+ outputElement.appendChild(getConsumerOutputElement(document, session));
+ }
+
+ return outputElement;
+ }
+
+ /**
+ * Gets the 'channels' element after creating it.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param isKernel
+ * Is it a kernel domain type
+ * @param channels
+ * The channels to be added as elements
+ * @return The channels element as an XML element
+ */
+ private static Element getChannelsElement(Document document, boolean isKernel, IChannelInfo[] channels) {
+ Element channelsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_CHANNELS);
+
+ for (IChannelInfo channel : channels) {
+ Element channelElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_CHANNEL);
+
+ /* Add everything related to a channel */
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, channel.getName());
+
+ String overwriteMode = channel.isOverwriteMode() ? SessionConfigStrings.CONFIG_OVERWRITE_MODE_OVERWRITE : SessionConfigStrings.CONFIG_OVERWRITE_MODE_DISCARD;
+ String enabled = channel.getState().equals(TraceEnablement.ENABLED) ? SessionConfigStrings.CONFIG_STRING_TRUE : SessionConfigStrings.CONFIG_STRING_FALSE;
+
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_ENABLED, enabled);
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_OVERWRITE_MODE, overwriteMode);
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_SUBBUFFER_SIZE, channel.getSubBufferSize());
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_SUBBUFFER_COUNT, channel.getNumberOfSubBuffers());
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_SWITCH_TIMER_INTERVAL, channel.getSwitchTimer());
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_READ_TIMER_INTERVAL, channel.getReadTimer());
+
+ String outputType = channel.getOutputType().getInName().startsWith(SessionConfigStrings.CONFIG_OUTPUT_TYPE_MMAP) ?
+ outputType = SessionConfigStrings.CONFIG_OUTPUT_TYPE_MMAP : SessionConfigStrings.CONFIG_OUTPUT_TYPE_SPLICE;
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_OUTPUT_TYPE, outputType);
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_TRACEFILE_SIZE, channel.getMaxSizeTraceFiles());
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_TRACEFILE_COUNT, channel.getMaxNumberTraceFiles());
+
+ /*
+ * TODO: Replace the 0 value by the channel live timer property from
+ * SessionInfo once live session tracing is supported
+ */
+ addElementContent(document, channelElement, SessionConfigStrings.CONFIG_ELEMENT_LIVE_TIMER_INTERVAL, SessionConfigStrings.CONFIG_STRING_ZERO);
+
+ /* Add the events */
+ channelElement.appendChild(getEventsElement(document, isKernel, channel.getEvents()));
+ channelsElement.appendChild(channelElement);
+ }
+
+ return channelsElement;
+ }
+
+ /**
+ * Gets the 'events' element after creating it. It is composed of the event
+ * informations from a list of IEventInfo.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param isKernel
+ * Is the domain type kernel
+ * @param events
+ * The event informations to be added
+ * @return An element containing all the event informations as XML elements
+ */
+ private static Element getEventsElement(Document document, boolean isKernel, IEventInfo[] events) {
+ Element eventsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_EVENTS);
+
+ for (IEventInfo event : events) {
+ Element eventElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_EVENT);
+
+ /* Enabled attribute */
+ String enabled = event.getState().equals(TraceEnablement.ENABLED) ? SessionConfigStrings.CONFIG_STRING_TRUE : SessionConfigStrings.CONFIG_STRING_FALSE;
+
+ /* Add the attributes to the event node */
+ addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, event.getName());
+ addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_ENABLED, enabled);
+ TraceEventType eventType = event.getEventType();
+ if (!eventType.equals(TraceEventType.UNKNOWN)) {
+ addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_TYPE, eventType.getInName().toUpperCase());
+ } else {
+ throw new IllegalArgumentException(Messages.SessionConfigXML_UnknownEventType);
+ }
+
+ /* Specific to UST session config: the log level */
+ if (!isKernel && !event.getLogLevel().equals(TraceLogLevel.LEVEL_UNKNOWN)) {
+ addElementContent(document, eventElement, SessionConfigStrings.CONFIG_ELEMENT_LOGLEVEL, event.getLogLevel().ordinal());
+ }
+
+ /* Add the node to the parent node events */
+ eventsElement.appendChild(eventElement);
+ }
+
+ return eventsElement;
+ }
+
+ /**
+ * Gets the 'consumer_output' element after creating it.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param session
+ * The session informations
+ * @return The consumer output element with his informations as XML elements
+ */
+ private static Element getConsumerOutputElement(Document document, ISessionInfo session) {
+ Element consumerOutputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_CONSUMER_OUTPUT);
+ Element destinationElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_DESTINATION);
+
+ /* Value of consumer output element */
+ addElementContent(document, consumerOutputElement, SessionConfigStrings.CONFIG_ELEMENT_ENABLED, SessionConfigStrings.CONFIG_STRING_TRUE);
+
+ if (session.isStreamedTrace()) {
+ /* If it is a streamed session, add the net output element */
+ destinationElement.appendChild(getNetOutputElement(document, session));
+ } else {
+ addElementContent(document, destinationElement, SessionConfigStrings.CONFIG_ELEMENT_PATH, session.getSessionPath());
+ }
+
+ consumerOutputElement.appendChild(destinationElement);
+ return consumerOutputElement;
+ }
+
+ /**
+ * Gets the 'net_output' element after creating it. It is composed of the
+ * control and data URIs.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param session
+ * The session informations
+ * @return The net output element
+ */
+ private static Element getNetOutputElement(Document document, ISessionInfo session) {
+ Element netOutputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_NET_OUTPUT);
+
+ String networkUrl = session.getNetworkUrl();
+ String controlUri = networkUrl == null ? session.getControlUrl() : networkUrl;
+ String dataUri = networkUrl == null ? session.getDataUrl() : networkUrl;
+ addElementContent(document, netOutputElement, SessionConfigStrings.CONFIG_ELEMENT_CONTROL_URI, controlUri);
+ addElementContent(document, netOutputElement, SessionConfigStrings.CONFIG_ELEMENT_DATA_URI, dataUri);
+
+ return netOutputElement;
+ }
+
+ /**
+ * Gets the 'snapshot_outputs' element after creating it.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param session
+ * The session informations
+ * @return The snapshot outputs element with snapshot informations as XML
+ * elements
+ */
+ private static Element getSnapshotOuputsElement(Document document, ISessionInfo session) {
+ Element snapshotOutputsElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_SNAPSHOT_OUTPUTS);
+ Element outputElement = document.createElement(SessionConfigStrings.CONFIG_ELEMENT_OUTPUT);
+
+ /* Add the name of the snapshot and the max size element */
+ addElementContent(document, outputElement, SessionConfigStrings.CONFIG_ELEMENT_NAME, session.getSnapshotInfo().getName());
+
+ /*
+ * TODO: find the proper max size value of output element. For now it is
+ * set to the default 0 value which means unlimited for lttng.
+ */
+ addElementContent(document, outputElement, SessionConfigStrings.CONFIG_ELEMENT_MAX_SIZE, SessionConfigStrings.CONFIG_STRING_ZERO);
+ outputElement.appendChild(getConsumerOutputElement(document, session));
+
+ snapshotOutputsElement.appendChild(outputElement);
+ return snapshotOutputsElement;
+ }
+
+ // ---------------------------------------------------------
+ // Utilities
+ // ---------------------------------------------------------
+
+ /**
+ * Validates the session configuration file against its schema.
+ *
+ * @param sessionFile
+ * The session configuration file
+ * @return The status of the validation
+ */
+ public static IStatus sessionValidate(File sessionFile) {
+ URL url = SessionConfigGenerator.class.getResource(SESSION_XSD_FILENAME);
+ SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
+ Source xmlSource = new StreamSource(sessionFile);
+
+ try {
+ Schema schema = schemaFactory.newSchema(url);
+ Validator validator = schema.newValidator();
+ validator.validate(xmlSource);
+ } catch (SAXParseException e) {
+ String error = NLS.bind(Messages.SessionConfigXML_XmlParseError, e.getLineNumber(), e.getLocalizedMessage());
+ Activator.getDefault().logError(error);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
+ } catch (SAXException e) {
+ String error = NLS.bind(Messages.SessionConfigXML_XmlValidationError, e.getLocalizedMessage());
+ Activator.getDefault().logError(error);
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
+ } catch (IOException e) {
+ String error = Messages.SessionConfigXML_XmlValidateError;
+ Activator.getDefault().logError("IO exception occurred", e); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
+ }
+ return Status.OK_STATUS;
+ }
+
+ /**
+ * Saves the session configuration into a XML file.
+ *
+ * @param document
+ * The document representing the session configuration file
+ * @param destination
+ * The path of the locally saved session configuration file
+ * @throws TransformerException
+ * On an transformation process
+ */
+ private static void saveSessionConfig(Document document, String destination) throws TransformerException {
+ /* Write the content into a XML file */
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+ Transformer transformer = transformerFactory.newTransformer();
+
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
+ transformer.setOutputProperty(INDENT_AMOUNT_PROPERTY_NAME, INDENT_AMOUNT_PROPERTY_VALUE);
+
+ DOMSource source = new DOMSource(document);
+ StreamResult result = new StreamResult(new File(destination));
+
+ transformer.transform(source, result);
+ }
+
+ /**
+ * Adds to a parent node an element with his content.
+ *
+ * @param document
+ * The document in which the nodes are being added
+ * @param parent
+ * The parent node that contains the element and his content
+ * @param elementName
+ * The element container name
+ * @param elementContent
+ * The content itself
+ */
+ private static void addElementContent(Document document, Element parent, String elementName, Object elementContent) {
+ Element contentElement = document.createElement(elementName);
+ contentElement.appendChild(document.createTextNode(elementContent.toString()));
+ parent.appendChild(contentElement);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *********************************************************************/
+package org.eclipse.linuxtools.lttng2.control.core.session;
+
+/**
+ * This file defines most markers from a session configuration file used to
+ * configure a trace session. They can be found in the session configuration
+ * schema "session.xsd" in src/common/config/ folder of LTTng-tools.
+ *
+ * @author Guilliano Molaire
+ * @since 3.0
+ */
+@SuppressWarnings({ "javadoc", "nls" })
+public interface SessionConfigStrings {
+
+ /* Session configuration file extension */
+ static final String SESSION_CONFIG_FILE_EXTENSION = "lttng";
+
+ /* Elements of the session configuration file */
+ static final String CONFIG_ELEMENT_SESSIONS = "sessions";
+ static final String CONFIG_ELEMENT_SESSION = "session";
+ static final String CONFIG_ELEMENT_DOMAINS = "domains";
+ static final String CONFIG_ELEMENT_DOMAIN = "domain";
+ static final String CONFIG_ELEMENT_CHANNELS = "channels";
+ static final String CONFIG_ELEMENT_CHANNEL = "channel";
+ static final String CONFIG_ELEMENT_EVENTS = "events";
+ static final String CONFIG_ELEMENT_EVENT = "event";
+ static final String CONFIG_ELEMENT_OUTPUT = "output";
+ static final String CONFIG_ELEMENT_ATTRIBUTES = "attributes";
+ static final String CONFIG_ELEMENT_NET_OUTPUT = "net_output";
+ static final String CONFIG_ELEMENT_MAX_SIZE = "max_size";
+ static final String CONFIG_ELEMENT_SNAPSHOT_OUTPUTS = "snapshot_outputs";
+ static final String CONFIG_ELEMENT_CONSUMER_OUTPUT = "consumer_output";
+ static final String CONFIG_ELEMENT_DESTINATION = "destination";
+ static final String CONFIG_ELEMENT_CONTROL_URI = "control_uri";
+ static final String CONFIG_ELEMENT_DATA_URI = "data_uri";
+ static final String CONFIG_ELEMENT_SNAPSHOT_MODE = "snapshot_mode";
+ static final String CONFIG_ELEMENT_PATH = "path";
+ static final String CONFIG_ELEMENT_NAME = "name";
+ static final String CONFIG_ELEMENT_ENABLED = "enabled";
+ static final String CONFIG_ELEMENT_TYPE = "type";
+ static final String CONFIG_ELEMENT_STARTED = "started";
+ static final String CONFIG_ELEMENT_DOMAIN_BUFFER_TYPE = "buffer_type";
+ static final String CONFIG_ELEMENT_OVERWRITE_MODE = "overwrite_mode";
+ static final String CONFIG_ELEMENT_SUBBUFFER_SIZE = "subbuffer_size";
+ static final String CONFIG_ELEMENT_SUBBUFFER_COUNT = "subbuffer_count";
+ static final String CONFIG_ELEMENT_SWITCH_TIMER_INTERVAL = "switch_timer_interval";
+ static final String CONFIG_ELEMENT_READ_TIMER_INTERVAL = "read_timer_interval";
+ static final String CONFIG_ELEMENT_OUTPUT_TYPE = "output_type";
+ static final String CONFIG_ELEMENT_TRACEFILE_SIZE = "tracefile_size";
+ static final String CONFIG_ELEMENT_TRACEFILE_COUNT = "tracefile_count";
+ static final String CONFIG_ELEMENT_LIVE_TIMER_INTERVAL = "live_timer_interval";
+ static final String CONFIG_ELEMENT_LOGLEVEL_TYPE = "loglevel_type";
+ static final String CONFIG_ELEMENT_LOGLEVEL = "loglevel";
+
+ /* Common element values */
+ static final String CONFIG_STRING_TRUE = "true";
+ static final String CONFIG_STRING_FALSE = "false";
+ static final String CONFIG_STRING_ZERO = "0";
+
+ static final String CONFIG_DOMAIN_TYPE_KERNEL = "KERNEL";
+ static final String CONFIG_DOMAIN_TYPE_UST = "UST";
+
+ static final String CONFIG_BUFFER_TYPE_PER_UID = "PER_UID";
+ static final String CONFIG_BUFFER_TYPE_PER_PID = "PER_PID";
+ static final String CONFIG_BUFFER_TYPE_GLOBAL = "GLOBAL";
+
+ static final String CONFIG_OVERWRITE_MODE_DISCARD = "DISCARD";
+ static final String CONFIG_OVERWRITE_MODE_OVERWRITE = "OVERWRITE";
+
+ static final String CONFIG_OUTPUT_TYPE_SPLICE = "SPLICE";
+ static final String CONFIG_OUTPUT_TYPE_MMAP = "MMAP";
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2014 École Polytechnique de Montréal
+#
+# 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:
+# Guilliano Molaire - Initial API and implementation
+###############################################################################
+
+SessionConfigXML_BadRequirementType=The requirement type is not supported
+SessionConfigXML_DomainTypeMissing=The domain requirement type is missing
+SessionConfigXML_EventTypeMissing=The event requirement type is missing
+SessionConfigXML_InvalidSessionInfoList=The list of session is empty or null
+SessionConfigXML_InvalidTraceSessionPath=The trace session path is not valid
+SessionConfigXML_UnknownEventType=The event type is not handled by the session configuration
+SessionConfigXML_UnknownDomainBufferType=The domain buffer type is not handled by the session configuration
+SessionConfigXML_SessionConfigGenerationError=An error occurred while generating the session configuration file
+SessionConfigXML_XmlParseError=XML Parsing error at line {0}: {1}
+SessionConfigXML_XmlValidateError=An error occurred while validating the XML file.
+SessionConfigXML_XmlValidationError=Error validating XML file {0}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2014 - Jérémie Galarneau <jeremie.galarneau@efficios.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+elementFormDefault="qualified" version="2.5">
+
+<xs:simpleType name="name_type">
+ <xs:restriction base="xs:string">
+ <xs:maxLength value="255"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="uint64_type">
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="0"/>
+ <xs:maxInclusive value="18446744073709551615"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="uint32_type">
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="0"/>
+ <xs:maxInclusive value="4294967295"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:simpleType name="channel_overwrite_mode_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="DISCARD"/>
+ <xs:enumeration value="OVERWRITE"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<!-- Maps to the lttng_event_output enum -->
+<xs:simpleType name="event_output_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="SPLICE"/>
+ <xs:enumeration value="MMAP"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<!-- Maps to the lttng_loglevel_type enum -->
+<xs:simpleType name="loglevel_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ALL"/>
+ <xs:enumeration value="RANGE"/>
+ <xs:enumeration value="SINGLE"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<!-- Maps to the lttng_event_type enum -->
+<xs:simpleType name="event_type_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="ALL"/>
+ <xs:enumeration value="TRACEPOINT"/>
+ <xs:enumeration value="PROBE"/>
+ <xs:enumeration value="FUNCTION"/>
+ <xs:enumeration value="FUNCTION_ENTRY"/>
+ <xs:enumeration value="NOOP"/>
+ <xs:enumeration value="SYSCALL"/>
+ <xs:enumeration value="KPROBE"/>
+ <xs:enumeration value="KRETPROBE"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="event_probe_attributes_type">
+ <xs:all>
+ <xs:element name="symbol_name" type="name_type" minOccurs="0"/>
+ <xs:element name="address" type="uint64_type" minOccurs="0"/>
+ <xs:element name="offset" type="uint64_type" minOccurs="0"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="event_ftrace_attributes_type">
+ <xs:all>
+ <xs:element name="symbol_name" type="name_type"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="event_attributes_type">
+ <xs:choice>
+ <xs:element name="probe_attributes" type="event_probe_attributes_type"/>
+ <xs:element name="function_attributes" type="event_ftrace_attributes_type"/>
+ </xs:choice>
+</xs:complexType>
+
+<xs:complexType name="event_exclusion_list_type">
+ <xs:sequence>
+ <xs:element name="exclusion" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="event_type">
+ <xs:all>
+ <xs:element name="name" type="name_type" minOccurs="0"/>
+ <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
+ <xs:element name="type" type="event_type_type" default="TRACEPOINT" minOccurs="0"/>
+ <xs:element name="loglevel_type" type="loglevel_type" default="ALL" minOccurs="0"/>
+ <xs:element name="loglevel" type="xs:int" default="-1" minOccurs="0"/>
+ <xs:element name="filter" type="xs:string" minOccurs="0"/>
+ <xs:element name="exclusions" type="event_exclusion_list_type" minOccurs="0"/>
+ <xs:element name="attributes" type="event_attributes_type" minOccurs="0"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="event_list_type">
+ <xs:sequence>
+ <xs:element name="event" type="event_type" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="event_perf_context_type">
+ <xs:all>
+ <xs:element name="type" type="uint32_type"/>
+ <xs:element name="config" type="uint64_type"/>
+ <xs:element name="name" type="name_type"/>
+ </xs:all>
+</xs:complexType>
+
+<!-- Maps to the lttng_event_context_type enum -->
+<xs:simpleType name="event_context_type_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PID"/>
+ <xs:enumeration value="PROCNAME"/>
+ <xs:enumeration value="PRIO"/>
+ <xs:enumeration value="NICE"/>
+ <xs:enumeration value="VPID"/>
+ <xs:enumeration value="TID"/>
+ <xs:enumeration value="VTID"/>
+ <xs:enumeration value="PPID"/>
+ <xs:enumeration value="VPPID"/>
+ <xs:enumeration value="PTHREAD_ID"/>
+ <xs:enumeration value="HOSTNAME"/>
+ <xs:enumeration value="IP"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="event_context_type">
+ <xs:choice>
+ <xs:element name="type" type="event_context_type_type"/>
+ <xs:element name="perf" type="event_perf_context_type"/>
+ </xs:choice>
+</xs:complexType>
+
+<xs:complexType name="event_context_list_type">
+ <xs:sequence>
+ <xs:element name="context" type="event_context_type" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+
+<!-- Maps to struct lttng_channel -->
+<xs:complexType name="channel_type">
+ <xs:all>
+ <xs:element name="name" type="name_type"/>
+ <xs:element name="enabled" type="xs:boolean" default="true" minOccurs="0"/>
+ <xs:element name="overwrite_mode" type="channel_overwrite_mode_type" default="DISCARD" minOccurs="0"/>
+ <xs:element name="subbuffer_size" type="uint64_type" minOccurs="0"/> <!-- bytes -->
+ <xs:element name="subbuffer_count" type="uint64_type" default="4" minOccurs="0"/>
+ <xs:element name="switch_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
+ <xs:element name="read_timer_interval" type="uint32_type"/> <!-- usec -->
+ <xs:element name="output_type" type="event_output_type"/>
+ <xs:element name="tracefile_size" type="uint64_type" default="0" minOccurs="0"/> <!-- bytes -->
+ <xs:element name="tracefile_count" type="uint64_type" default="0" minOccurs="0"/>
+ <xs:element name="live_timer_interval" type="uint32_type" default="0" minOccurs="0"/> <!-- usec -->
+ <xs:element name="events" type="event_list_type" minOccurs="0"/>
+ <xs:element name="contexts" type="event_context_list_type" minOccurs="0"/>
+ </xs:all>
+</xs:complexType>
+
+<!-- Maps to the lttng_domain_type enum -->
+<xs:simpleType name="domain_type_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="KERNEL"/>
+ <xs:enumeration value="UST"/>
+ <xs:enumeration value="JUL"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<!-- Maps to the lttng_buffer_type enum -->
+<xs:simpleType name="domain_buffer_type">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="PER_PID"/>
+ <xs:enumeration value="PER_UID"/>
+ <xs:enumeration value="GLOBAL"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="channel_list_type">
+ <xs:sequence>
+ <xs:element name="channel" type="channel_type" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+
+<!-- Maps to struct lttng_domain and contains channels -->
+<xs:complexType name="domain_type">
+ <xs:all>
+ <xs:element name="type" type="domain_type_type"/>
+ <xs:element name="buffer_type" type="domain_buffer_type"/>
+ <xs:element name="channels" type="channel_list_type" minOccurs="0"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="session_attributes_type">
+ <xs:choice>
+ <xs:element name="snapshot_mode" type="xs:boolean"/>
+ <xs:element name="live_timer_interval" type="uint32_type"/> <!-- usec -->
+ </xs:choice>
+</xs:complexType>
+
+<xs:complexType name="domain_list_type">
+ <xs:sequence>
+ <xs:element name="domain" type="domain_type" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="net_output_type">
+ <xs:all>
+ <xs:element name="control_uri" type="xs:string"/>
+ <xs:element name="data_uri" type="xs:string"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="destination_type">
+ <xs:choice>
+ <xs:element name="path" type="xs:string"/>
+ <xs:element name="net_output" type="net_output_type"/>
+ </xs:choice>
+</xs:complexType>
+
+<xs:complexType name="consumer_output_type">
+ <xs:all>
+ <xs:element name="enabled" type="xs:boolean" default="true"/>
+ <xs:element name="destination" type="destination_type"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="snapshot_output_type">
+ <xs:all>
+ <xs:element name="name" type="name_type"/>
+ <xs:element name="max_size" type="uint64_type"/>
+ <xs:element name="consumer_output" type="consumer_output_type"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:complexType name="snapshot_output_list_type">
+ <xs:sequence>
+ <xs:element name="output" type="snapshot_output_type" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="session_output_type">
+ <xs:choice>
+ <xs:element name="snapshot_outputs" type="snapshot_output_list_type"/>
+ <xs:element name="consumer_output" type="consumer_output_type"/>
+ </xs:choice>
+</xs:complexType>
+
+<xs:complexType name="session_type">
+ <xs:all>
+ <xs:element name="name" type="name_type"/>
+ <xs:element name="domains" type="domain_list_type" minOccurs="0"/>
+ <xs:element name="started" type="xs:boolean" default="0" minOccurs="0"/>
+ <xs:element name="attributes" type="session_attributes_type" minOccurs="0"/>
+ <xs:element name="output" type="session_output_type" minOccurs="0"/>
+ </xs:all>
+</xs:complexType>
+
+<xs:element name="sessions">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="session" type="session_type" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+</xs:schema>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="stubs"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.control.ui.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.control.ui.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.commands,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.tracecompass.lttng2.control.core;bundle-version="3.1.0",
+ org.eclipse.tracecompass.lttng2.control.ui;bundle-version="3.1.0"
+Import-Package: org.eclipse.rse.core,
+ org.eclipse.rse.core.model,
+ org.eclipse.rse.core.subsystems,
+ org.eclipse.rse.services.shells,
+ org.eclipse.rse.services.terminals,
+ org.eclipse.rse.subsystems.files.core,
+ org.eclipse.rse.subsystems.files.core.servicesubsystem
+Export-Package: org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.control.stubs.service;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;x-internal:=true,
+ org.eclipse.linuxtools.lttng2.control.ui.tests;x-friends:="org.eclipse.linuxtools.lttng.alltests",
+ org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;x-internal:=true,
+ org.eclipse.linuxtools.lttng2.control.ui.tests.service;x-internal:=true
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/,\
+ stubs/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = about.html
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Control UI Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.control.ui.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Control UI Tests Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.tracecompass.lttng2.control.ui.tests</testSuite>
+ <testClass>org.eclipse.linuxtools.lttng2.control.ui.tests.AllTests</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
+ <product>org.eclipse.platform.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Test suite for the Activator class
+ */
+public class ActivatorTest {
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#Activator}.
+ */
+ @Test
+ public void testActivator() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#getDefault}.
+ */
+ @Test
+ public void testGetDefault() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#start}.
+ */
+ @Test
+ public void testStartBundleContext() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.control.ui.Activator#stop}.
+ */
+ @Test
+ public void testStopBundleContext() {
+ assertTrue(true);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+ org.eclipse.linuxtools.lttng2.control.ui.tests.model.component.AllTests.class,
+ org.eclipse.linuxtools.lttng2.control.ui.tests.service.AllTests.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the model.component unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ TraceControlComponentTest.class,
+ TraceControlCreateSessionTests.class,
+ TraceControlCreateSessionMiTests.class,
+ TraceControlKernelProviderTests.class,
+ TraceControlKernelSessionTests.class,
+ TraceControlPropertiesTest.class,
+ TraceControlTreeModelNoProvidersTest.class,
+ TraceControlTreeModelTest.class,
+ TraceControlUstProviderTests.class,
+ TraceControlUstSessionTests.class,
+ TraceControlUstSessionTests2.class,
+ TraceControlSnapshotSessionTests.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/**********************************************************************
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
+
+/**
+ * The class can be used to validate the listener interface.
+ */
+@SuppressWarnings("javadoc")
+public class ListenerValidator implements ITraceControlComponentChangedListener {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private boolean fisAddedCalled = false;
+ private boolean fisRemoveCalled = false;
+ private boolean fisChangedCalled = false;
+
+ private ITraceControlComponent fParent = null;
+ private ITraceControlComponent fChild = null;
+ private ITraceControlComponent fChangedComponent = null;
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ public boolean isAddedCalled() {
+ return fisAddedCalled;
+ }
+
+ public boolean isRemovedCalled() {
+ return fisRemoveCalled;
+ }
+
+ public boolean isChangedCalled() {
+ return fisChangedCalled;
+ }
+
+ public ITraceControlComponent getSavedParent() {
+ return fParent;
+ }
+
+ public ITraceControlComponent getSavedChild() {
+ return fChild;
+ }
+
+ public ITraceControlComponent getSavedComponent() {
+ return fChangedComponent;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ public void initialize() {
+ fisAddedCalled = false;
+ fisRemoveCalled = false;
+ fisChangedCalled = false;
+ fParent = null;
+ fChild = null;
+ fChangedComponent = null;
+ }
+
+ @Override
+ public void componentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
+ fisAddedCalled = true;
+ fParent = parent;
+ fChild = component;
+ }
+
+ @Override
+ public void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
+ fisRemoveCalled = true;
+ fParent = parent;
+ fChild = component;
+ }
+
+ @Override
+ public void componentChanged(ITraceControlComponent component) {
+ fisChangedCalled = true;
+ fParent = null;
+ fChangedComponent = component;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlRoot;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceMI;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.junit.Test;
+
+/**
+ * The class <code>TraceControlComponentTest</code> contains tests for the class
+ * <code>{@link TraceControlComponent}</code>.
+ */
+public class TraceControlComponentTest {
+
+ /**
+ * Run the TraceControlComponent(String) constructor test.
+ */
+ @Test
+ public void testTraceControlComponent_1() {
+
+ String name = "node";
+
+ TraceControlComponent result = new TraceControlComponent(name);
+
+ assertNotNull(result);
+ assertEquals(name, result.getName());
+ assertEquals(null, result.getParent());
+ assertEquals(false, result.hasChildren());
+ assertEquals(null, result.getImage());
+ assertEquals(null, result.getControlService());
+ assertEquals(null, result.getToolTip());
+ }
+
+ /**
+ * Run the TraceControlComponent(String,ITraceControlComponent) constructor test.
+ */
+ @Test
+ public void testTraceControlComponent_2() {
+ String name = "node";
+
+ ITraceControlComponent parent = new TraceControlRoot();
+ TraceControlComponent result = new TraceControlComponent(name, parent);
+
+ assertNotNull(result);
+ assertEquals(name, result.getName());
+ assertEquals(false, result.hasChildren());
+ assertEquals(null, result.getImage());
+ assertEquals(null, result.getControlService());
+ assertEquals(null, result.getToolTip());
+ }
+
+ /**
+ * Run the void addChild(ITraceControlComponent) method test.
+ */
+ @Test
+ public void testAddAndGetChild1() {
+ TraceControlComponent fixture = new TraceControlComponent("node", new TraceControlRoot());
+ fixture.setToolTip("This is the test node");
+ fixture.addChild(new TraceControlRoot());
+ ITraceControlComponent component = new TraceControlRoot();
+ fixture.addChild(component);
+
+ ITraceControlComponent child = fixture.getChild(TraceControlRoot.TRACE_CONTROL_ROOT_NAME);
+ assertNotNull(child);
+ assertEquals(TraceControlRoot.TRACE_CONTROL_ROOT_NAME, child.getName());
+ }
+
+ /**
+ * Run the void addChild(ITraceControlComponent) method test.
+ */
+ @Test
+ public void testAddAndGetChild2() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ ITraceControlComponent component = null;
+
+ fixture.addChild(component);
+ assertFalse(fixture.hasChildren());
+ }
+
+ /**
+ * Run the void addComponentListener(ITraceControlComponentChangedListener) method test.
+ */
+ @Test
+ public void testAddComponentListener_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", (ITraceControlComponent) null);
+ fixture.setToolTip("");
+
+ ListenerValidator validator = new ListenerValidator();
+ fixture.addComponentListener(validator);
+
+ TraceControlRoot root = new TraceControlRoot();
+ fixture.addChild(root);
+ assertTrue(validator.isAddedCalled());
+
+ fixture.removeChild(root);
+ assertTrue(validator.isRemovedCalled());
+
+ fixture.fireComponentChanged(fixture);
+ assertTrue(validator.isChangedCalled());
+ }
+
+ /**
+ * Run the boolean containsChild(String) method test.
+ */
+ @Test
+ public void testContainsChild_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+ String name = "node";
+
+ boolean result = fixture.containsChild(name);
+
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the boolean containsChild(String) method test.
+ */
+ @Test
+ public void testContainsChild_2() {
+ TraceControlComponent fixture = new TraceControlComponent("name", new TraceControlRoot());
+ fixture.setToolTip("");
+
+ boolean result = fixture.containsChild(TraceControlRoot.TRACE_CONTROL_ROOT_NAME);
+
+ assertEquals(false, result);
+ }
+
+ /**
+ * Run the void fireCompenentAdded(ITraceControlComponent,ITraceControlComponent) method test.
+ * Run the void fireCompenentRemoved(ITraceControlComponent,ITraceControlComponent) method test.
+ * Run the void fireCompenentChanged(ITraceControlComponent) method test
+ */
+ @Test
+ public void testFireCompenentUpdated() {
+ ITraceControlComponent parent = new TraceControlRoot();
+
+ TraceControlComponent fixture = new TraceControlComponent("node", parent);
+ fixture.setToolTip("");
+
+ ITraceControlComponent component = new TraceControlComponent("child");
+ fixture.addChild(component);
+
+ ListenerValidator validator = new ListenerValidator();
+ fixture.addComponentListener(validator);
+
+ fixture.fireComponentAdded(parent, component);
+ assertTrue(validator.isAddedCalled());
+ assertEquals(parent.getName(), validator.getSavedParent().getName());
+ assertEquals(component.getName(), validator.getSavedChild().getName());
+
+ validator.initialize();
+
+ fixture.fireComponentRemoved(parent, component);
+ assertTrue(validator.isRemovedCalled());
+ assertEquals(parent.getName(), validator.getSavedParent().getName());
+ assertEquals(component.getName(), validator.getSavedChild().getName());
+
+ validator.initialize();
+ fixture.fireComponentChanged(fixture);
+ assertTrue(validator.isChangedCalled());
+ assertEquals(fixture.getName(), validator.getSavedComponent().getName());
+ }
+
+ /**
+ * Run the Object getAdapter(Class) method test.
+ */
+ @Test
+ public void testGetAdapter() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+ Class<Object> adapter = Object.class;
+
+ Object result = fixture.getAdapter(adapter);
+
+ assertEquals(null, result);
+ }
+
+ /**
+ * Run the ITraceControlComponent[] getChildren() method test.
+ */
+ @Test
+ public void testGetChildren_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+
+ ITraceControlComponent[] result = fixture.getChildren();
+
+ assertNotNull(result);
+ assertEquals(1, result.length);
+ assertNotNull(result[0]);
+ assertEquals("trace_control_root", result[0].getName());
+ assertEquals(null, result[0].getParent());
+ assertEquals(false, result[0].hasChildren());
+ assertEquals(null, result[0].getImage());
+ assertEquals(null, result[0].getControlService());
+ assertEquals(null, result[0].getToolTip());
+ }
+
+ /**
+ * Run the ILttngControlService getControlService()/setControlService()
+ * method test.
+ *
+ * @throws ExecutionException
+ * Would fail the test
+ */
+ @Test
+ public void testGetAndSetControlService_1() throws ExecutionException {
+
+ TraceControlComponent parent = new TraceControlComponent("parent") {
+ ILttngControlService fService = null;
+
+ @Override
+ public void setControlService(ILttngControlService service ) {
+ fService = service;
+ }
+
+ @Override
+ public ILttngControlService getControlService() {
+ return fService;
+ }
+ };
+
+ TraceControlComponent fixture = new TraceControlComponent("", parent);
+ parent.addChild(fixture);
+ fixture.setToolTip("");
+ TraceControlComponent child = new TraceControlComponent("child", fixture);
+ fixture.addChild(child);
+
+ ILttngControlService result = fixture.getControlService();
+ assertEquals(null, result);
+
+ TestRemoteSystemProxy proxy = new TestRemoteSystemProxy();
+ ILttngControlService service = new LTTngControlService(proxy.createCommandShell());
+ fixture.setControlService(service);
+ result = fixture.getControlService();
+ assertNotNull(service);
+ assertEquals(service, result);
+
+ service = new LTTngControlServiceMI(proxy.createCommandShell(), LTTngControlServiceMI.class.getResource(LTTngControlServiceConstants.MI_XSD_FILENAME));
+ fixture.setControlService(service);
+ result = fixture.getControlService();
+ assertNotNull(service);
+ assertEquals(service, result);
+
+ result = fixture.getChildren()[0].getControlService();
+ assertNotNull(service);
+ assertEquals(service, result);
+ }
+
+ /**
+ * Run the Image getImage() method test.
+ */
+ @Test
+ public void testGetImage_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+
+ Image result = fixture.getImage();
+ assertEquals(null, result);
+
+ fixture.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FOLDER));
+ assertNotNull(fixture.getImage());
+ }
+
+ /**
+ * Run the boolean hasChildren() method test.
+ */
+ @Test
+ public void testHasChildren_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+
+ boolean result = fixture.hasChildren();
+
+ assertTrue(result);
+ }
+
+ /**
+ * Run the boolean hasChildren() method test.
+ */
+ @Test
+ public void testHasChildren_2() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+
+ boolean result = fixture.hasChildren();
+
+ assertFalse(result);
+ }
+
+ /**
+ * Run the void removeAllChildren() method test.
+ */
+ @Test
+ public void testRemoveAllChildren_2() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+
+ fixture.addChild(new TraceControlRoot());
+ fixture.addChild(new TraceControlComponent("child"));
+
+ fixture.removeAllChildren();
+ assertFalse(fixture.hasChildren());
+ }
+
+ /**
+ * Run the void removeChild(ITraceControlComponent) method test.
+ */
+ @Test
+ public void testRemoveChild_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ TraceControlComponent child = new TraceControlComponent("child", fixture);
+
+ fixture.addChild(child);
+ fixture.removeChild(child);
+ assertFalse(fixture.hasChildren());
+ }
+
+ /**
+ * Run the void removeChild(ITraceControlComponent) method test.
+ */
+ @Test
+ public void testRemoveChild_2() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+ ITraceControlComponent component = null;
+
+ fixture.removeChild(component);
+ assertTrue(fixture.hasChildren());
+ }
+
+ /**
+ * Run the void removeComponentListener(ITraceControlComponentChangedListener) method test.
+ */
+ @Test
+ public void testRemoveComponentListener_1() {
+ TraceControlComponent fixture = new TraceControlComponent("", (ITraceControlComponent) null);
+ fixture.setToolTip("");
+
+ ListenerValidator validator = new ListenerValidator();
+ fixture.addComponentListener(validator);
+
+ // Remove listener and check that validator is not called anymore
+ validator.initialize();
+ fixture.removeComponentListener(validator);
+ TraceControlRoot root = new TraceControlRoot();
+ fixture.addChild(root);
+ assertFalse(validator.isAddedCalled());
+
+ fixture.removeChild(root);
+ assertFalse(validator.isRemovedCalled());
+
+ fixture.fireComponentChanged(fixture);
+ assertFalse(validator.isChangedCalled());
+ }
+
+ /**
+ * Run the void removeComponentListener(ITraceControlComponentChangedListener) method test.
+ */
+ @Test
+ public void testRemoveComponentListener_2() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+ ITraceControlComponentChangedListener listener = new ControlView();
+
+ fixture.removeComponentListener(listener);
+
+ }
+
+ /**
+ * Run the void setChildren(List<ITraceControlComponent>)/ITraceControlComponent[] getChildren() method test.
+ */
+ @Test
+ public void testGetAndSetChildren() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ List<ITraceControlComponent> children = new LinkedList<>();
+ children.add(new TraceControlComponent("child1"));
+ children.add(new TraceControlComponent("child2"));
+
+ fixture.setChildren(children);
+
+ ITraceControlComponent[] result = fixture.getChildren();
+ assertEquals(2, result.length);
+ assertEquals("child1", result[0].getName());
+ assertEquals("child2", result[1].getName());
+ }
+
+ /**
+ * Run the void String getName()/setName(String) method tests.
+ */
+ @Test
+ public void testGetAndSetName() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+ String name = "node";
+
+ fixture.setName(name);
+ assertEquals(name,fixture.getName());
+
+ }
+
+ /**
+ * Run the void ITraceControlComponent getParent()/setParent(ITraceControlComponent) method tests.
+ */
+ @Test
+ public void testGetAndSetParent() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("");
+ fixture.addChild(new TraceControlRoot());
+ ITraceControlComponent parent = new TraceControlRoot();
+ parent.addChild(fixture);
+
+ fixture.setParent(parent);
+ ITraceControlComponent retrievedParent = fixture.getParent();
+ assertNotNull(retrievedParent);
+ assertEquals(parent.getName(), retrievedParent.getName());
+ assertEquals(TraceControlRoot.TRACE_CONTROL_ROOT_NAME, retrievedParent.getName());
+ assertEquals(null, retrievedParent.getParent());
+ assertEquals(true, retrievedParent.hasChildren());
+ }
+
+ /**
+ * Run the void TargetNodeState getTargetNodeState()/etTargetNodeState(TargetNodeState) method tests.
+ */
+ @Test
+ public void testGetAndSetTargetNodeState_1() {
+ TraceControlComponent parent = new TraceControlComponent("parent") {
+ private TargetNodeState fState;
+
+ @Override
+ public void setTargetNodeState(TargetNodeState state ) {
+ fState = state;
+ }
+
+ @Override
+ public TargetNodeState getTargetNodeState() {
+ return fState;
+ }
+ };
+
+ TraceControlComponent fixture = new TraceControlComponent("", parent);
+ parent.addChild(fixture);
+
+ fixture.setToolTip("");
+ TargetNodeState state = TargetNodeState.CONNECTED;
+
+ fixture.setTargetNodeState(state);
+ TargetNodeState result = fixture.getTargetNodeState();
+
+ assertNotNull(result);
+ assertEquals(state, result);
+ // Check also parent
+ assertEquals(state, fixture.getParent().getTargetNodeState());
+ assertEquals("CONNECTED", result.name());
+ assertEquals("CONNECTED", result.toString());
+ assertEquals(2, result.ordinal());
+
+ fixture.setTargetNodeState(TargetNodeState.DISCONNECTED);
+ result = fixture.getTargetNodeState();
+ assertNotNull(result);
+ assertEquals("DISCONNECTED", result.name());
+ assertEquals("DISCONNECTED", result.toString());
+ assertEquals(0, result.ordinal());
+
+ state = TargetNodeState.CONNECTING;
+
+ fixture.setTargetNodeState(state);
+ result = fixture.getTargetNodeState();
+ assertNotNull(result);
+ assertEquals("CONNECTING", result.name());
+ assertEquals("CONNECTING", result.toString());
+ assertEquals(3, result.ordinal());
+
+ fixture.setTargetNodeState(TargetNodeState.DISCONNECTING);
+ result = fixture.getTargetNodeState();
+ assertNotNull(result);
+ assertEquals("DISCONNECTING", result.name());
+ assertEquals("DISCONNECTING", result.toString());
+ assertEquals(1, result.ordinal());
+
+ }
+
+ /**
+ * Run the void setToolTip(String) method test.
+ */
+ @Test
+ public void testGetSndSetToolTip() {
+ TraceControlComponent fixture = new TraceControlComponent("", new TraceControlRoot());
+ fixture.setToolTip("This is a tooltip");
+ fixture.addChild(new TraceControlRoot());
+
+ String result = fixture.getToolTip();
+
+ assertEquals("This is a tooltip", result);
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte - Support for machine interface LTTng 2.6
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+/**
+ * Machine interface Kernel session manipulation handling test cases.
+ * LTTng 2.6
+ */
+public class TraceControlCreateSessionMiTests extends TraceControlCreateSessionTests {
+
+ private static final String TEST_STREAM = "CreateSessionTestMi.cfg";
+
+ @Override
+ protected String getTestStream() {
+ return TEST_STREAM;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Jonathan Rajotte - Support for LTTng 2.6
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class {@link TraceControlKernelSessionTests} contains Kernel
+ * session/channel/event handling test cases.
+ */
+public class TraceControlCreateSessionTests {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ private static final String TEST_STREAM = "CreateSessionTest.cfg";
+ private static final String SCEN_SCENARIO_FILE_PROTO_TEST = "CreateSessionFileProto";
+ private static final String SCEN_SCENARIO_CONTROL_DATA_TEST = "CreateSessionControlData";
+ private static final String SCEN_SCENARIO_NETWORK_TEST = "CreateSessionNetwork";
+ private static final String SCEN_SCENARIO_NETWORK2_TEST = "CreateSessionNetwork2";
+
+ private static final String SESSION = "mysession";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + getTestStream()), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Get the test stream file name to use for the test suite
+ *
+ * @return the name of the test stream file
+ */
+ protected String getTestStream() {
+ return TEST_STREAM;
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * on internal error
+ */
+ @Test
+ public void testTraceSessionTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+
+ root.addChild(node);
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+ int i = 0;
+ while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Verify that node is connected
+ assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
+
+ ILttngControlService controleService = node.getControlService();
+
+ // Get provider groups
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Initialize dialog implementations for command execution
+ CreateSessionDialogStub sessionDialogStub = new CreateSessionDialogStub();
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialogStub);
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // ------------------------------------------------------------------------
+ // Create session (--U file://...) and destroy
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(SCEN_SCENARIO_FILE_PROTO_TEST);
+
+ sessionDialogStub.setNetworkUrl("file:///tmp");
+ sessionDialogStub.setStreamedTrace(true);
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals(getSessionName(), session.getName());
+ if (controleService.isVersionSupported("2.6.0")) {
+ assertEquals("/tmp", session.getSessionPath());
+ } else {
+ assertEquals("file:///tmp", session.getSessionPath());
+ }
+
+ assertTrue(!session.isStreamedTrace());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+ sessionDialogStub.setNetworkUrl(null);
+ sessionDialogStub.setStreamedTrace(false);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ // ------------------------------------------------------------------------
+ // Create session (--U file://,,, and destroy
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(SCEN_SCENARIO_CONTROL_DATA_TEST);
+
+ sessionDialogStub.setControlUrl("tcp://172.0.0.1");
+ sessionDialogStub.setDataUrl("tcp://172.0.0.1:5343");
+ sessionDialogStub.setStreamedTrace(true);
+
+ session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals(getSessionName(), session.getName());
+ if (controleService.isVersionSupported("2.6.0")) {
+ assertEquals("tcp4://172.0.0.1:5342/ [data: 5343]", session.getSessionPath());
+ } else {
+ assertEquals("tcp://172.0.0.1:5342 [data: 5343]", session.getSessionPath());
+ }
+ assertTrue(session.isStreamedTrace());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+ sessionDialogStub.setControlUrl(null);
+ sessionDialogStub.setDataUrl(null);
+ sessionDialogStub.setStreamedTrace(false);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ // ------------------------------------------------------------------------
+ // Create session (--U file://... and destroy
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(SCEN_SCENARIO_NETWORK_TEST);
+
+ sessionDialogStub.setNetworkUrl("net://172.0.0.1:1234:2345");
+ sessionDialogStub.setStreamedTrace(true);
+
+ session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals(getSessionName(), session.getName());
+ if (controleService.isVersionSupported("2.6.0")) {
+ assertEquals("tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]", session.getSessionPath());
+ } else {
+ assertEquals("net://172.0.0.1:1234 [data: 2345]", session.getSessionPath());
+ }
+ assertTrue(session.isStreamedTrace());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+ sessionDialogStub.setNetworkUrl(null);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ // ------------------------------------------------------------------------
+ // Create session (--U net6://[...] and destroy
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(SCEN_SCENARIO_NETWORK2_TEST);
+
+ sessionDialogStub.setNetworkUrl("net6://[ffff::eeee:dddd:cccc:0]");
+ sessionDialogStub.setStreamedTrace(true);
+
+ session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals(getSessionName(), session.getName());
+ if (controleService.isVersionSupported("2.6.0")) {
+ assertEquals("tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]", session.getSessionPath());
+ } else {
+ assertEquals("net://[ffff::eeee:dddd:cccc:0]:5342/mysession-20130221-144451 [data: 5343]", session.getSessionPath());
+ }
+ assertTrue(session.isStreamedTrace());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+ sessionDialogStub.setNetworkUrl(null);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ // -------------------------------------------------------------------------
+ // Disconnect node
+ // -------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ // -------------------------------------------------------------------------
+ // Delete node
+ // -------------------------------------------------------------------------
+
+ fFacility.executeCommand(node, "delete");
+ assertEquals(0, fFacility.getControlView().getTraceControlRoot().getChildren().length);
+ }
+
+ private static String getSessionName() {
+ return SESSION;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlKernelProviderTests</code> contains UST provider
+ * handling test cases.
+ */
+public class TraceControlKernelProviderTests {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "CreateTreeTest.cfg";
+ private static final String SCEN_SCENARIO1_TEST = "Scenario1";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ fFacility.dispose();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * Would fail the test
+ */
+ @Test
+ public void testKernelProviderTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+
+ root.addChild(node);
+
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+ int i = 0;
+ while ((i < 20) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Verify that node is connected
+ assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
+
+ // Get provider and session group
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Check for kernel provider
+ TraceProviderGroup providerGroup = (TraceProviderGroup) groups[0];
+ assertTrue(providerGroup.hasKernelProvider());
+
+ // Get kernel provider
+ ITraceControlComponent[] providers = providerGroup.getChildren();
+ KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
+
+ // Get kernel provider events and select 2 events
+ ITraceControlComponent[] events = kernelProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(3, events.length);
+
+ BaseEventComponent baseEventInfo0 = (BaseEventComponent) events[0];
+ BaseEventComponent baseEventInfo1 = (BaseEventComponent) events[1];
+
+ // Initialize dialog implementations for command execution
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
+ TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ // ------------------------------------------------------------------------
+ // Create session
+ // ------------------------------------------------------------------------
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20120314-132824", session.getSessionPath());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ // ------------------------------------------------------------------------
+ // Enable event on default channel on created session above
+ // ------------------------------------------------------------------------
+ // Initialize scenario
+ fProxy.setScenario(SCEN_SCENARIO1_TEST);
+
+ ITraceControlComponent[] components = { baseEventInfo0, baseEventInfo1 };
+
+ fFacility.executeCommand(components, "assign.event");
+
+ // Verify that kernel domain was created
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("Kernel", domains[0].getName());
+
+ // Verify that channel0 was created with default values
+ ITraceControlComponent[] channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+ assertEquals("channel0", channel.getName());
+ assertEquals(4, channel.getNumberOfSubBuffers());
+ assertEquals("splice()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
+ assertEquals(false, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(262144, channel.getSubBufferSize());
+ assertEquals(0, channel.getSwitchTimer());
+
+ // Verify that event components were created
+ ITraceControlComponent[] channel0Events = channel.getChildren();
+ assertNotNull(channel0Events);
+ assertEquals(2, channel0Events.length);
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+ assertTrue(channel0Events[1] instanceof TraceEventComponent);
+
+ TraceEventComponent event = (TraceEventComponent) channel0Events[0];
+ assertEquals("sched_kthread_stop_ret", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ TraceEventComponent event1 = (TraceEventComponent) channel0Events[1];
+ assertEquals("sched_kthread_stop", event1.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event1.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event1.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event1.getState());
+
+ // ------------------------------------------------------------------------
+ // Disable event components
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] selection = { event, event1 };
+ fFacility.executeCommand(selection, "disableEvent");
+
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+ assertEquals(TraceEnablement.DISABLED, event1.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event component
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(event1, "enableEvent");
+
+ // Verify event state
+ assertEquals(TraceEnablement.ENABLED, event1.getState());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ //-------------------------------------------------------------------------
+ // Disconnect node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "delete");
+ assertEquals(0, fFacility.getControlView().getTraceControlRoot().getChildren().length);
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.AddContextDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableEventsDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlKernelSessionTests</code> contains Kernel
+ * session/channel/event handling test cases.
+ */
+public class TraceControlKernelSessionTests {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "CreateTreeTest.cfg";
+ private static final String SCEN_SCENARIO3_TEST = "Scenario3";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ fFacility.dispose();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * Would fail the test
+ */
+ @Test
+ public void testTraceSessionTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+
+ root.addChild(node);
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+ int i = 0;
+ while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Verify that node is connected
+ assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
+
+ // Get provider groups
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Initialize dialog implementations for command execution
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
+ TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ // ------------------------------------------------------------------------
+ // Create session
+ // ------------------------------------------------------------------------
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20120314-132824", session.getSessionPath());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ // Initialize scenario
+ fProxy.setScenario(SCEN_SCENARIO3_TEST);
+
+ // ------------------------------------------------------------------------
+ // Enable channel on session
+ // ------------------------------------------------------------------------
+ EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
+ channelStub.setIsKernel(true);
+ TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelStub);
+
+ fFacility.executeCommand(session, "enableChannelOnSession");
+
+ // Verify that Kernel domain was created
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("Kernel", domains[0].getName());
+
+ // Verify that channel was created with correct data
+ ITraceControlComponent[] channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+ assertEquals("mychannel", channel.getName());
+ assertEquals(4, channel.getNumberOfSubBuffers());
+ assertEquals("splice()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
+ assertEquals(true, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(16384, channel.getSubBufferSize());
+ assertEquals(100, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Create channel on domain
+ // ------------------------------------------------------------------------
+ ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
+ info.setName("mychannel2");
+ info.setOverwriteMode(false);
+ info.setSubBufferSize(32768);
+ info.setNumberOfSubBuffers(2);
+ info.setSwitchTimer(100);
+ info.setReadTimer(200);
+ channelStub.setChannelInfo(info);
+
+ fFacility.executeCommand(domains[0], "enableChannelOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ assertTrue(channels[1] instanceof TraceChannelComponent);
+ channel = (TraceChannelComponent) channels[1];
+ assertEquals("mychannel2", channel.getName());
+ assertEquals(2, channel.getNumberOfSubBuffers());
+ assertEquals("splice()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
+ assertEquals(false, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(32768, channel.getSubBufferSize());
+ assertEquals(100, channel.getSwitchTimer());
+
+ EnableEventsDialogStub eventsDialogStub = new EnableEventsDialogStub();
+ eventsDialogStub.setIsTracePoints(true);
+ List<String> events = new ArrayList<>();
+ events.add("sched_kthread_stop");
+ events.add("sched_kthread_stop_ret");
+ eventsDialogStub.setNames(events);
+ eventsDialogStub.setIsKernel(true);
+ TraceControlDialogFactory.getInstance().setEnableEventsDialog(eventsDialogStub);
+
+ // ------------------------------------------------------------------------
+ // disable channels
+ // ------------------------------------------------------------------------
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ fFacility.executeCommand(channels, "disableChannel");
+
+ assertEquals(TraceEnablement.DISABLED, ((TraceChannelComponent)channels[0]).getState());
+ assertEquals(TraceEnablement.DISABLED, ((TraceChannelComponent)channels[1]).getState());
+
+ // ------------------------------------------------------------------------
+ // enable channels
+ // ------------------------------------------------------------------------
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ fFacility.executeCommand(channels, "enableChannel");
+
+ assertEquals(TraceEnablement.ENABLED, ((TraceChannelComponent)channels[0]).getState());
+ assertEquals(TraceEnablement.ENABLED, ((TraceChannelComponent)channels[1]).getState());
+
+ // ------------------------------------------------------------------------
+ // enable event (tracepoints) on session
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(session, "enableEventOnSession");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(3, channels.length);
+
+ assertTrue(channels[2] instanceof TraceChannelComponent);
+ channel = (TraceChannelComponent) channels[2];
+ assertEquals("channel0", channel.getName());
+ // No need to check parameters of default channel because that has been done in other tests
+
+ ITraceControlComponent[] channel0Events = channel.getChildren();
+ assertEquals(2, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+ assertTrue(channel0Events[1] instanceof TraceEventComponent);
+
+ TraceEventComponent event = (TraceEventComponent) channel0Events[0];
+ assertEquals("sched_kthread_stop_ret", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ event = (TraceEventComponent) channel0Events[1];
+ assertEquals("sched_kthread_stop", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // enable event (tracepoints) on domain
+ // ------------------------------------------------------------------------
+ events.clear();
+ events.add("sched_wakeup_new");
+ eventsDialogStub.setNames(events);
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel = (TraceChannelComponent) channels[2];
+
+ channel0Events = channel.getChildren();
+ assertEquals(3, channel0Events.length);
+
+ assertTrue(channel0Events[2] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[2];
+ assertEquals("sched_wakeup_new", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // enable event (tracepoints) on channel
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setNames(events);
+ eventsDialogStub.setIsAllTracePoints(true);
+
+ fFacility.executeCommand(channels[1], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ // No need to check parameters of default channel because that has been done in other tests
+ channel = (TraceChannelComponent) channels[1];
+
+ channel0Events = channel.getChildren();
+ assertEquals(3, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+ assertTrue(channel0Events[1] instanceof TraceEventComponent);
+ assertTrue(channel0Events[2] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("sched_kthread_stop_ret", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ event = (TraceEventComponent) channel0Events[1];
+ assertEquals("sched_kthread_stop", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ event = (TraceEventComponent) channel0Events[2];
+ assertEquals("sched_wakeup_new", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // enable event (syscall) on channel
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setIsTracePoints(false);
+ eventsDialogStub.setIsAllTracePoints(false);
+ eventsDialogStub.setIsSysCalls(true);
+
+ fFacility.executeCommand(channels[0], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel = (TraceChannelComponent) channels[0];
+
+ channel0Events = channel.getChildren();
+ assertEquals(1, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("syscalls", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.SYSCALL, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // enable event (syscall) on domain
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel = (TraceChannelComponent) channels[2];
+
+ channel0Events = channel.getChildren();
+ assertEquals(4, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("syscalls", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.SYSCALL, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // enable event (syscall) on session
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(session, "enableEventOnSession");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel = (TraceChannelComponent) channels[2];
+
+ channel0Events = channel.getChildren();
+ assertEquals(4, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("syscalls", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.SYSCALL, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+
+ // ------------------------------------------------------------------------
+ // enable event (dynamic probe) on domain
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setIsSysCalls(false);
+ eventsDialogStub.setIsDynamicProbe(true);
+ eventsDialogStub.setDynamicProbe("0xc0101280");
+ eventsDialogStub.setProbeEventName("myevent1");
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(5, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
+
+ TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[0];
+ assertEquals("myevent1", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertNull(probeEvent.getOffset());
+ assertEquals("0xc0101280", probeEvent.getAddress());
+ assertNull(probeEvent.getSymbol());
+
+ // ------------------------------------------------------------------------
+ // enable event (dynamic probe) on channel
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setIsDynamicProbe(true);
+ eventsDialogStub.setDynamicProbe("init_post");
+ eventsDialogStub.setProbeEventName("myevent2");
+
+ fFacility.executeCommand(channels[2], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(6, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[0];
+ assertEquals("myevent2", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertEquals("0x0", probeEvent.getOffset());
+ assertNull(null, probeEvent.getAddress());
+ assertEquals("init_post", probeEvent.getSymbol());
+
+ // ------------------------------------------------------------------------
+ // enable event (dynamic probe) on session
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setIsDynamicProbe(true);
+ eventsDialogStub.setDynamicProbe("init_post:0x1000");
+ eventsDialogStub.setProbeEventName("myevent3");
+
+ fFacility.executeCommand(session, "enableEventOnSession");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(7, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[0];
+ assertEquals("myevent3", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertEquals("0x1000", probeEvent.getOffset());
+ assertNull(null, probeEvent.getAddress());
+ assertEquals("init_post", probeEvent.getSymbol());
+
+ // ------------------------------------------------------------------------
+ // enable event (dynamic function probe) on session
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setIsDynamicProbe(false);
+ eventsDialogStub.setDynamicProbe(null);
+ eventsDialogStub.setProbeEventName(null);
+ eventsDialogStub.setIsFunctionProbe(true);
+ eventsDialogStub.setFunctionEventName("myevent4");
+ eventsDialogStub.setFunctionProbe("create_dev");
+
+ fFacility.executeCommand(session, "enableEventOnSession");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(8, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[0];
+ assertEquals("myevent4", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ // Changed for Bug fix 419454 to function event which was introduced by LTTng 2.2
+ assertEquals(TraceEventType.FUNCTION, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertEquals("0x0", probeEvent.getOffset());
+ assertNull(null, probeEvent.getAddress());
+ assertEquals("create_dev", probeEvent.getSymbol());
+
+ // ------------------------------------------------------------------------
+ // enable event (dynamic function probe) on domain
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setIsFunctionProbe(true);
+ eventsDialogStub.setFunctionEventName("myevent5");
+ eventsDialogStub.setFunctionProbe("create_dev:0x2000");
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(9, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[0];
+ assertEquals("myevent5", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertEquals("0x2000", probeEvent.getOffset());
+ assertNull(null, probeEvent.getAddress());
+ assertEquals("create_dev", probeEvent.getSymbol());
+
+ // ------------------------------------------------------------------------
+ // enable event (dynamic function probe) on channel
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setIsFunctionProbe(true);
+ eventsDialogStub.setFunctionEventName("myevent");
+ eventsDialogStub.setFunctionProbe("create_dev:0x2000");
+
+ fFacility.executeCommand(channels[0], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(2, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceProbeEventComponent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[0];
+ assertEquals("myevent", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertEquals("0x2000", probeEvent.getOffset());
+ assertNull(null, probeEvent.getAddress());
+ assertEquals("create_dev", probeEvent.getSymbol());
+
+ // ------------------------------------------------------------------------
+ // Add Context on domain
+ // ------------------------------------------------------------------------
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ AddContextDialogStub addContextStub = new AddContextDialogStub();
+ List<String> contexts = new ArrayList<>();
+ contexts.add("prio");
+ contexts.add("perf:branch-misses");
+ contexts.add("perf:cache-misses");
+ addContextStub.setContexts(contexts);
+ TraceControlDialogFactory.getInstance().setAddContextDialog(addContextStub);
+
+ fFacility.executeCommand(domains[0], "addContextOnDomain");
+ // Currently there is nothing to verify because the list commands don't show any context information
+ // However, the execution of the command make sure that the correct service command line is build and executed.
+
+ // ------------------------------------------------------------------------
+ // Add Context on channel
+ // ------------------------------------------------------------------------
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ //Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+
+ try {
+ // The setContext() verifies that the contexts set are part of the available contexts
+ // The available contexts are set by the command handler addContextOnDomain above.
+ // So we indirectly test here that the parsing and setting of available contexts were
+ // done correctly above.
+ addContextStub.setContexts(contexts);
+ } catch (IllegalArgumentException e) {
+ fail("Exception caught - unknown context");
+ }
+
+ fFacility.executeCommand(channel, "addContextOnChannel");
+ // Currently there is nothing to verify because the list commands don't show any context information
+ // However, the execution of the command make sure that the correct service command line is build and executed.
+
+ // ------------------------------------------------------------------------
+ // Add Context on event
+ // ------------------------------------------------------------------------
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ //Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+
+ channel0Events = channel.getChildren();
+
+ event = (TraceEventComponent) channel0Events[6];
+
+ fFacility.executeCommand(event, "addContextOnEvent");
+ // Currently there is nothing to verify because the list commands don't show any context information
+ // However, the execution of the command make sure that the correct service command line is build and executed.
+
+ // ------------------------------------------------------------------------
+ // Calibrate
+ // ------------------------------------------------------------------------
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ fFacility.executeCommand(domains[0], "calibrate");
+ // There is nothing to verify here.
+ // However, the execution of the command make sure that the correct service command line is build and executed.
+
+ // ------------------------------------------------------------------------
+ // refresh
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(node, "refresh");
+ groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+ assertEquals(3, groups[0].getChildren().length); // provider
+ assertEquals(1, groups[1].getChildren().length); // sessions
+ assertEquals(1, groups[1].getChildren()[0].getChildren().length); // domains
+ assertEquals(3, groups[1].getChildren()[0].getChildren()[0].getChildren().length); // channels
+ assertEquals(2, groups[1].getChildren()[0].getChildren()[0].getChildren()[0].getChildren().length); // events (of channel[0])
+
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ session = (TraceSessionComponent)groups[1].getChildren()[0];
+
+ // ------------------------------------------------------------------------
+ // start session
+ // ------------------------------------------------------------------------
+ fFacility.startSession(session);
+ assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
+
+ // ------------------------------------------------------------------------
+ // stop session
+ // ------------------------------------------------------------------------
+ fFacility.stopSession(session);
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ //-------------------------------------------------------------------------
+ // Disconnect node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+
+ fFacility.executeCommand(node, "delete");
+ assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.BaseEventPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.KernelProviderPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TargetNodePropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceChannelPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceDomainPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceEventPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceProbeEventPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceSessionPropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.UstProviderPropertySource;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.junit.After;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlPropertiesTest</code> contains tests for the all
+ * property class</code>.
+ */
+public class TraceControlPropertiesTest {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String DIRECTORY = "testfiles";
+ private static final String TEST_STREAM = "ListInfoTest.cfg";
+ private static final String SCEN_LIST_INFO_TEST = "ListInfoTest";
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ TraceControlTestFacility.getInstance().waitForJobs();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testComponentProperties() throws Exception {
+
+ TestRemoteSystemProxy proxy = new TestRemoteSystemProxy();
+
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ proxy.setTestFile(testfile.getAbsolutePath());
+ proxy.setScenario(SCEN_LIST_INFO_TEST);
+
+ ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, proxy);
+
+ root.addChild(node);
+ node.connect();
+
+ TraceControlTestFacility.getInstance().waitForJobs();
+
+ // ------------------------------------------------------------------------
+ // Verify Node Properties (adapter)
+ // ------------------------------------------------------------------------
+ Object adapter = node.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TargetNodePropertySource);
+
+ TargetNodePropertySource source = (TargetNodePropertySource)adapter;
+
+ assertNull(source.getEditableValue());
+ assertFalse(source.isPropertySet(TargetNodePropertySource.TARGET_NODE_NAME_PROPERTY_ID));
+ assertNotNull(source.getPropertyDescriptors());
+
+ assertEquals("myNode", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_NAME_PROPERTY_ID));
+ assertEquals("LOCALHOST", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_ADDRESS_PROPERTY_ID));
+ assertEquals(TargetNodeState.CONNECTED.name(), source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_STATE_PROPERTY_ID));
+ assertEquals("2.1.0", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_VERSION_PROPERTY_ID));
+ assertNull(source.getPropertyValue("test"));
+
+ adapter = node.getAdapter(IChannelInfo.class);
+ assertNull(adapter);
+
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ ITraceControlComponent[] providers = groups[0].getChildren();
+
+ assertNotNull(providers);
+ assertEquals(3, providers.length);
+
+ // ------------------------------------------------------------------------
+ // Verify Kernel Provider Properties (adapter)
+ // ------------------------------------------------------------------------
+ KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
+
+ adapter = kernelProvider.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof KernelProviderPropertySource);
+
+ KernelProviderPropertySource kernelSource = (KernelProviderPropertySource)adapter;
+ assertNotNull(kernelSource.getPropertyDescriptors());
+
+ assertEquals("Kernel", kernelSource.getPropertyValue(KernelProviderPropertySource.KERNEL_PROVIDER_NAME_PROPERTY_ID));
+
+ // ------------------------------------------------------------------------
+ // Verify UST Provider Properties (adapter)
+ // ------------------------------------------------------------------------
+ UstProviderComponent ustProvider = (UstProviderComponent) providers[1];
+
+ adapter = ustProvider.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof UstProviderPropertySource);
+
+ UstProviderPropertySource ustSource = (UstProviderPropertySource)adapter;
+ assertNotNull(ustSource.getPropertyDescriptors());
+
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustSource.getPropertyValue(UstProviderPropertySource.UST_PROVIDER_NAME_PROPERTY_ID));
+ assertEquals(String.valueOf(9379), ustSource.getPropertyValue(UstProviderPropertySource.UST_PROVIDER_PID_PROPERTY_ID));
+
+ // ------------------------------------------------------------------------
+ // Verify Base Event Properties (adapter)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] events = ustProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ BaseEventComponent baseEventInfo = (BaseEventComponent) events[0];
+ assertNotNull(baseEventInfo);
+
+ adapter = baseEventInfo.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof BaseEventPropertySource);
+
+ BaseEventPropertySource baseSource = (BaseEventPropertySource)adapter;
+ assertNotNull(baseSource.getPropertyDescriptors());
+
+ assertEquals("ust_tests_hello:tptest_sighandler", baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_NAME_PROPERTY_ID));
+ assertEquals(TraceEventType.TRACEPOINT.name(), baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_TYPE_PROPERTY_ID));
+ assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE.name(), baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_LOGLEVEL_PROPERTY_ID));
+
+ baseEventInfo = (BaseEventComponent) events[1];
+ assertNotNull(baseEventInfo);
+
+ adapter = baseEventInfo.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof BaseEventPropertySource);
+ baseSource = (BaseEventPropertySource)adapter;
+ assertNotNull(baseSource.getPropertyDescriptors());
+ assertEquals("doublefield=float;floatfield=float;stringfield=string", baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_FIELDS_PROPERTY_ID));
+
+ // ------------------------------------------------------------------------
+ // Verify Session Properties (adapter)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] sessions = groups[1].getChildren();
+ assertNotNull(sessions);
+ assertEquals(2, sessions.length);
+
+ TraceSessionComponent session = (TraceSessionComponent)sessions[1];
+
+ adapter = session.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceSessionPropertySource);
+
+ TraceSessionPropertySource sessionSource = (TraceSessionPropertySource)adapter;
+ assertNotNull(sessionSource.getPropertyDescriptors());
+
+ assertEquals("mysession", sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_NAME_PROPERTY_ID));
+ assertEquals("/home/user/lttng-traces/mysession-20120129-084256", sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_PATH_PROPERTY_ID));
+ assertEquals(TraceSessionState.ACTIVE.name(), sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_STATE_PROPERTY_ID));
+
+ // ------------------------------------------------------------------------
+ // Verify Domain Provider Properties (adapter)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(2, domains.length);
+
+ TraceDomainComponent domain = (TraceDomainComponent) domains[0];
+ adapter = domain.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceDomainPropertySource);
+
+ TraceDomainPropertySource domainSource = (TraceDomainPropertySource)adapter;
+ assertNotNull(domainSource.getPropertyDescriptors());
+
+ assertEquals("Kernel", domainSource.getPropertyValue(TraceDomainPropertySource.TRACE_DOMAIN_NAME_PROPERTY_ID));
+ assertEquals(BufferType.BUFFER_SHARED.getInName(), domainSource.getPropertyValue(TraceDomainPropertySource.BUFFER_TYPE_PROPERTY_ID));
+
+ ITraceControlComponent[] channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ // ------------------------------------------------------------------------
+ // Verify Channel Properties (adapter)
+ // ------------------------------------------------------------------------
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+
+ adapter = channel.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceChannelPropertySource);
+
+ TraceChannelPropertySource channelSource = (TraceChannelPropertySource)adapter;
+ assertNotNull(channelSource.getPropertyDescriptors());
+
+ assertEquals("channel0", channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_NAME_PROPERTY_ID));
+ assertEquals(String.valueOf(4), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID));
+ assertEquals(TraceEnablement.ENABLED.name(), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_STATE_PROPERTY_ID));
+ assertEquals(String.valueOf(false), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID));
+ assertEquals("splice()", channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID));
+ assertEquals(String.valueOf(200), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_READ_TIMER_PROPERTY_ID));
+ assertEquals(String.valueOf(262144), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID));
+ assertEquals(String.valueOf(0), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID));
+
+ // ------------------------------------------------------------------------
+ // Verify Event Properties (adapter)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] channel0Events = channel.getChildren();
+ assertNotNull(channel0Events);
+ assertEquals(5, channel0Events.length);
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ TraceEventComponent event = (TraceEventComponent) channel0Events[0];
+
+ adapter = event.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceEventPropertySource);
+
+ TraceEventPropertySource eventSource = (TraceEventPropertySource)adapter;
+ assertNotNull(eventSource.getPropertyDescriptors());
+
+ assertEquals("block_rq_remap", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID));
+ assertEquals(TraceLogLevel.TRACE_EMERG.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
+ assertEquals(TraceEventType.TRACEPOINT.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID));
+ assertEquals(TraceEnablement.ENABLED.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID));
+
+ // ------------------------------------------------------------------------
+ // Verify Probe Event Properties (adapter)
+ // ------------------------------------------------------------------------
+ assertTrue(channel0Events[2] instanceof TraceProbeEventComponent);
+
+ TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[2];
+
+ adapter = probeEvent.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceProbeEventPropertySource);
+
+ TraceProbeEventPropertySource probeEventSource = (TraceProbeEventPropertySource)adapter;
+ assertNotNull(probeEventSource.getPropertyDescriptors());
+ assertEquals(4, probeEventSource.getPropertyDescriptors().length);
+
+ assertEquals("myevent2", probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID));
+ assertEquals(TraceEventType.PROBE.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID));
+ assertEquals(TraceEnablement.ENABLED.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID));
+ assertEquals("0xc0101340", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID));
+
+ assertTrue(channel0Events[3] instanceof TraceProbeEventComponent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[3];
+
+ adapter = probeEvent.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceProbeEventPropertySource);
+
+ probeEventSource = (TraceProbeEventPropertySource)adapter;
+ assertNotNull(probeEventSource.getPropertyDescriptors());
+ assertEquals(5, probeEventSource.getPropertyDescriptors().length);
+
+ assertEquals("myevent0", probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID));
+ assertEquals(TraceEventType.PROBE.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID));
+ assertEquals(TraceEnablement.ENABLED.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID));
+ assertEquals("0x0", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID));
+ assertEquals("init_post", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID));
+
+ //-------------------------------------------------------------------------
+ // Verify Filter of UST event
+ //-------------------------------------------------------------------------
+ event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[0];
+ adapter = event.getAdapter(IPropertySource.class);
+ assertEquals("with filter", event.getFilterExpression());
+
+ //-------------------------------------------------------------------------
+ // Verify Log Level Type of UST events (> LTTng 2.4)
+ //-------------------------------------------------------------------------
+ event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[0];
+ adapter = event.getAdapter(IPropertySource.class);
+ eventSource = (TraceEventPropertySource) adapter;
+ assertEquals("== TRACE_DEBUG_LINE", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
+
+ event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[1];
+ adapter = event.getAdapter(IPropertySource.class);
+ eventSource = (TraceEventPropertySource) adapter;
+ assertEquals("<= TRACE_INFO", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
+
+ event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[2];
+ adapter = event.getAdapter(IPropertySource.class);
+ eventSource = (TraceEventPropertySource) adapter;
+ assertEquals("TRACE_DEBUG_SYSTEM", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID));
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+ node.disconnect();
+ node.getParent().removeChild(node);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceSessionPropertySource;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlSnapshotSessionTests</code> contains Snapshot
+ * session test cases for support of LTTng Tools 2.3.
+ */
+public class TraceControlSnapshotSessionTests {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "CreateSessionTest2.cfg";
+ private static final String SCEN_CREATE_SESSION = "ScenCreateSession";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ fFacility.dispose();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testTraceSessionTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+
+ root.addChild(node);
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+ int i = 0;
+ while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Get provider groups
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Initialize dialog implementations for command execution
+ // --- snapshot session ---
+ CreateSessionDialogStub sessionDialog = new CreateSessionDialogStub();
+ sessionDialog.setSnapshot(true);
+
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialog);
+ TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // Initialize scenario
+ fProxy.setScenario(SCEN_CREATE_SESSION);
+
+ // ------------------------------------------------------------------------
+ // Create session
+ // ------------------------------------------------------------------------
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+ assertTrue(session.isSnapshotSession());
+ assertNotNull(session.getSnapshotInfo());
+ assertEquals("snapshot-1", session.getSnapshotInfo().getName());
+ assertEquals("/home/user/lttng-traces/mysession-20130913-141651", session.getSnapshotInfo().getSnapshotPath());
+ assertEquals(1, session.getSnapshotInfo().getId());
+
+ // ------------------------------------------------------------------------
+ // Start session
+ // ------------------------------------------------------------------------
+ fFacility.startSession(session);
+ assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
+
+ // verify properties
+ Object adapter = session.getAdapter(IPropertySource.class);
+ assertNotNull(adapter);
+ assertTrue(adapter instanceof TraceSessionPropertySource);
+
+ TraceSessionPropertySource sessionSource = (TraceSessionPropertySource)adapter;
+ IPropertyDescriptor[] descriptors = sessionSource.getPropertyDescriptors();
+ assertNotNull(descriptors);
+
+ Map<String,String> map = new HashMap<>();
+ map.put(TraceSessionPropertySource.TRACE_SESSION_NAME_PROPERTY_ID, "mysession");
+ map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_NAME_PROPERTY_ID, "snapshot-1");
+ map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_PATH_PROPERTY_ID, "/home/user/lttng-traces/mysession-20130913-141651");
+ map.put(TraceSessionPropertySource.TRACE_SNAPSHOT_ID_PROPERTY_ID, "1");
+ map.put(TraceSessionPropertySource.TRACE_SESSION_STATE_PROPERTY_ID, TraceSessionState.ACTIVE.name());
+
+ for (int j = 0; j < descriptors.length; j++) {
+ String expected = map.get(descriptors[j].getId());
+ assertNotNull(expected);
+ assertEquals(expected, sessionSource.getPropertyValue(descriptors[j].getId()).toString());
+ }
+
+ // ------------------------------------------------------------------------
+ // Record snapshot
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(session, "snapshot");
+
+ // ------------------------------------------------------------------------
+ // Stop snapshot
+ // ------------------------------------------------------------------------
+ fFacility.stopSession(session);
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ //-------------------------------------------------------------------------
+ // Disconnect node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+
+ fFacility.executeCommand(node, "delete");
+
+ assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
+ }
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.NotEnabledException;
+import org.eclipse.core.commands.NotHandledException;
+import org.eclipse.core.commands.common.NotDefinedException;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.handlers.IHandlerService;
+
+/**
+ * Singleton class to facilitate the test cases. Creates UML2SD view and loader objects as well as provides
+ * utility methods for interacting with the loader/view.
+ */
+@SuppressWarnings("javadoc")
+public class TraceControlTestFacility {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ public final static int WAIT_FOR_JOBS_DELAY = 50;
+ public final static int GUI_REFESH_DELAY = 500;
+
+ public final static String DIRECTORY = "testfiles";
+ public final static String COMMAND_CATEGORY_PREFIX = "org.eclipse.linuxtools.internal.lttng2.ui.commands.control.";
+ public final static String SCEN_INIT_TEST = "Initialize";
+ public final static String SCEN_SCENARIO_SESSION_HANDLING = "SessionHandling";
+ public final static String SCEN_SCENARIO_SESSION_HANDLING_WITH_PATH = "SessionHandlingWithPath";
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private static TraceControlTestFacility fInstance = null;
+ private ControlView fControlView = null;
+ private boolean fIsInitialized = false;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ private TraceControlTestFacility() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ public static TraceControlTestFacility getInstance() {
+ if (fInstance == null) {
+ fInstance = new TraceControlTestFacility();
+ }
+ return fInstance;
+ }
+
+ /**
+ * Initial the test facility.
+ */
+ public void init() {
+
+ if (!fIsInitialized) {
+
+ IViewPart view;
+ try {
+
+ view = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow()
+ .getActivePage()
+ .findView("org.eclipse.ui.internal.introview");
+
+ if (view != null) {
+ PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow()
+ .getActivePage().hideView(view);
+ }
+
+ view = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow()
+ .getActivePage()
+ .showView(ControlView.ID);
+
+ } catch (PartInitException e) {
+ throw new RuntimeException(e);
+ }
+
+ fControlView = (ControlView) view;
+
+ delay(3000);
+ fIsInitialized = true;
+ }
+ }
+
+
+ /**
+ * Disposes the facility (and GUI)
+ */
+ public void dispose() {
+ if (fIsInitialized) {
+ waitForJobs();
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(fControlView);
+ fIsInitialized = false;
+ }
+ }
+
+ /**
+ * Creates a delay for given time.
+ * @param waitTimeMillis - time in milli seconds
+ */
+ public void delay(long waitTimeMillis) {
+ Display display = Display.getCurrent();
+ if (display != null) {
+ long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+ while(System.currentTimeMillis() < endTimeMillis) {
+ if (!display.readAndDispatch()) {
+ // We do not use Display.sleep because it might never wake up
+ // if there is no user interaction
+ try {
+ Thread.sleep(Math.min(waitTimeMillis, 10));
+ } catch (final InterruptedException e) {
+ // Ignored
+ }
+ }
+ display.update();
+ }
+ } else {
+ try {
+ Thread.sleep(waitTimeMillis);
+ } catch (InterruptedException e) {
+ // Ignored
+ }
+ }
+ }
+
+ /**
+ * Waits for all Eclipse jobs to finish
+ */
+ public void waitForJobs() {
+ while (!Job.getJobManager().isIdle()) {
+ delay(WAIT_FOR_JOBS_DELAY);
+ }
+ }
+
+ /**
+ * @return current control view
+ */
+ public ControlView getControlView() {
+ return fControlView;
+ }
+
+ /**
+ * Executes an Eclipse command with command ID after selecting passed component
+ * @param component - component to select in the tree
+ * @param commandId - command ID
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public void executeCommand(ITraceControlComponent component, String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ setSelection(component);
+ executeCommand(commandId);
+ }
+
+ /**
+ * Executes an Eclipse command with command ID after selecting passed components
+ * @param components - array of components to select in the tree
+ * @param commandId - command ID
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public void executeCommand(ITraceControlComponent[] components, String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ setSelection(components);
+ executeCommand(commandId);
+ }
+
+ /**
+ * Executes an Eclipse command with command ID
+ * @param commandId
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public void executeCommand(String commandId) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ IHandlerService handlerService = (IHandlerService) fControlView.getSite().getService(IHandlerService.class);
+ handlerService.executeCommand(COMMAND_CATEGORY_PREFIX + commandId, null);
+ waitForJobs();
+ }
+
+ /**
+ * Selects passed component
+ * @param component - component to select in the tree
+ * @param commandId - command ID
+ */
+ public void setSelection(ITraceControlComponent component) {
+ fControlView.setSelection(component);
+ // Selection is done in own job
+ waitForJobs();
+ }
+
+
+ /**
+ * Selects passed components
+ * @param components - array of component to select in the tree
+ * @param commandId - command ID
+ */
+ public void setSelection(ITraceControlComponent[] components) {
+ fControlView.setSelection(components);
+
+ // Selection is done in own job
+ waitForJobs();
+ }
+
+ /**
+ * Creates session on passed session group.
+ * @param group - session group
+ * @return - trace session group if it's successful else null
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public TraceSessionComponent createSession(ITraceControlComponent group) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ executeCommand(group, "createSession");
+
+ ITraceControlComponent[] sessions = group.getChildren();
+ if ((sessions == null) || (sessions.length == 0)) {
+ return null;
+ }
+ return (TraceSessionComponent)sessions[0];
+ }
+
+ /**
+ * Destroys a given session.
+ * @param session - session to destroy
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public void destroySession(TraceSessionComponent session) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ executeCommand(session, "destroySession");
+ }
+
+ /**
+ * Starts a given session
+ * @param session - session to start
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public void startSession(TraceSessionComponent session) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ executeCommand(session, "start");
+ }
+
+ /**
+ * Stops a given session
+ * @param session - session to stop
+ * @throws ExecutionException
+ * @throws NotDefinedException
+ * @throws NotEnabledException
+ * @throws NotHandledException
+ */
+ public void stopSession(TraceSessionComponent session) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException {
+ executeCommand(session, "stop");
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlTreeModelNoProvidersTest</code> verifies that the
+ * Tracer Control can handle the case where no kernel provider and only UST
+ * provider are available.
+ */
+public class TraceControlTreeModelNoProvidersTest {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "ListInfoTest.cfg";
+ private static final String SCEN_LIST_INFO_TEST = "ListInfoTestNoKernel";
+ private static final String TARGET_NODE_NAME = "myNode";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ TraceControlTestFacility.getInstance().waitForJobs();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testTraceControlComponents() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(SCEN_LIST_INFO_TEST);
+
+ ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent(TARGET_NODE_NAME, root, host, fProxy);
+
+ root.addChild(node);
+ node.connect();
+
+ TraceControlTestFacility.getInstance().waitForJobs();
+
+ // ------------------------------------------------------------------------
+ // Verify Parameters of TargetNodeComponent
+ // ------------------------------------------------------------------------
+ assertEquals("LOCALHOST", node.getHostName()); // assigned in createLocalHost() above
+ assertEquals("LOCALHOST", node.getToolTip()); // assigned in createLocalHost() above
+ Image connectedImage = node.getImage();
+ assertNotNull(connectedImage);
+ assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
+ assertNotNull(node.getControlService());
+ ILttngControlService service = node.getControlService();
+ assertTrue(service instanceof LTTngControlService);
+ node.setControlService(service);
+ assertTrue(node.getControlService() instanceof LTTngControlService);
+
+ assertTrue(node.isPassiveCommunicationsListener());
+
+ // ------------------------------------------------------------------------
+ // Verify Children of TargetNodeComponent
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ assertTrue(groups[0] instanceof TraceProviderGroup);
+ assertTrue(groups[1] instanceof TraceSessionGroup);
+
+ // Check for kernel provider
+ TraceProviderGroup providerGroup = (TraceProviderGroup) groups[0];
+ assertFalse(providerGroup.hasKernelProvider());
+
+ assertEquals("Provider", providerGroup.getName());
+ assertEquals("Sessions", groups[1].getName());
+
+ // ------------------------------------------------------------------------
+ // Verify TraceProviderGroup
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] providers = groups[0].getChildren();
+
+ assertNotNull(providers);
+ assertEquals(1, providers.length);
+ assertTrue(providers[0] instanceof UstProviderComponent);
+
+ // disconnect
+ node.disconnect();
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+ assertNotNull(node.getImage());
+ assertNotSame(connectedImage, node.getImage());
+
+ node.getParent().removeChild(node);
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlTreeModelTest</code> contains tests for the tree
+ * component classes.
+ */
+public class TraceControlTreeModelTest {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "ListInfoTest.cfg";
+ private static final String SCEN_LIST_INFO_TEST = "ListInfoTest";
+ private static final String TARGET_NODE_NAME = "myNode";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ TraceControlTestFacility.getInstance().waitForJobs();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testTraceControlComponents() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(SCEN_LIST_INFO_TEST);
+
+ ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent(TARGET_NODE_NAME, root, host, fProxy);
+
+ root.addChild(node);
+ node.connect();
+
+ TraceControlTestFacility.getInstance().waitForJobs();
+
+ // ------------------------------------------------------------------------
+ // Verify Parameters of TargetNodeComponent
+ // ------------------------------------------------------------------------
+ assertEquals("LOCALHOST", node.getHostName()); // assigned in createLocalHost() above
+ assertEquals("LOCALHOST", node.getToolTip()); // assigned in createLocalHost() above
+ Image connectedImage = node.getImage();
+ assertNotNull(connectedImage);
+ assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
+ assertNotNull(node.getControlService());
+ ILttngControlService service = node.getControlService();
+ assertTrue(service instanceof LTTngControlService);
+ node.setControlService(service);
+ assertTrue(node.getControlService() instanceof LTTngControlService);
+
+ assertTrue(node.isPassiveCommunicationsListener());
+
+ // ------------------------------------------------------------------------
+ // Verify Children of TargetNodeComponent
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ assertTrue(groups[0] instanceof TraceProviderGroup);
+ assertTrue(groups[1] instanceof TraceSessionGroup);
+
+ assertEquals("Provider", groups[0].getName());
+ assertEquals("Sessions", groups[1].getName());
+
+ // ------------------------------------------------------------------------
+ // Verify TraceProviderGroup
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] providers = groups[0].getChildren();
+
+ assertNotNull(providers);
+ assertEquals(3, providers.length);
+
+ // ------------------------------------------------------------------------
+ // Verify KernelProviderComponent
+ // ------------------------------------------------------------------------
+ KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
+
+ // ------------------------------------------------------------------------
+ // Verify event info (kernel provider)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] events = kernelProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(3, events.length);
+
+ BaseEventComponent baseEventInfo = (BaseEventComponent) events[0];
+ assertNotNull(baseEventInfo);
+ assertEquals("sched_kthread_stop", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = (BaseEventComponent) events[1];
+ assertEquals("sched_kthread_stop_ret", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = (BaseEventComponent) events[2];
+ assertEquals("sched_wakeup_new", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ // ------------------------------------------------------------------------
+ // Verify UstProviderComponent
+ // ------------------------------------------------------------------------
+ UstProviderComponent ustProvider = (UstProviderComponent) providers[1];
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustProvider.getName());
+ assertEquals(9379, ustProvider.getPid());
+
+ // ------------------------------------------------------------------------
+ // Verify event info (UST provider)
+ // ------------------------------------------------------------------------
+ events = ustProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ baseEventInfo = (BaseEventComponent) events[0];
+ assertNotNull(baseEventInfo);
+ assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = (BaseEventComponent) events[1];
+ assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_INFO, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ // ------------------------------------------------------------------------
+ // Verify UstProviderComponent
+ // ------------------------------------------------------------------------
+ ustProvider = (UstProviderComponent) providers[2];
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=4852]", ustProvider.getName());
+ assertEquals(4852, ustProvider.getPid());
+
+ // verify getters and setter
+ verifyUstProviderGettersSetters(ustProvider);
+
+ // ------------------------------------------------------------------------
+ // Verify event info (UST provider)
+ // ------------------------------------------------------------------------
+ events = ustProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ baseEventInfo = (BaseEventComponent) events[0];
+ assertNotNull(baseEventInfo);
+ assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_WARNING, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = (BaseEventComponent) events[1];
+ assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ // verify getters and setters
+ verifyBaseEventGettersSetters(baseEventInfo);
+
+ // ------------------------------------------------------------------------
+ // Verify TraceSessionGroup
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] sessions = groups[1].getChildren();
+ assertNotNull(sessions);
+ assertEquals(2, sessions.length);
+ for (int i = 0; i < sessions.length; i++) {
+ assertTrue(sessions[i] instanceof TraceSessionComponent);
+ }
+ assertEquals("mysession1", sessions[0].getName());
+ assertEquals("mysession", sessions[1].getName());
+
+ // ------------------------------------------------------------------------
+ // Verify TraceSessionComponent
+ // ------------------------------------------------------------------------
+ TraceSessionComponent session = (TraceSessionComponent)sessions[1];
+ assertEquals("mysession", session.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20120129-084256", session.getSessionPath());
+ assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
+
+ // Verify setters and setters
+ verifySessionGetterSetters(session);
+
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(2, domains.length);
+
+ // ------------------------------------------------------------------------
+ // Verify Kernel domain
+ // ------------------------------------------------------------------------
+ assertEquals("Kernel", domains[0].getName());
+ ITraceControlComponent[] channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ // Verify setters and setters
+ verifyDomainGettersSetters((TraceDomainComponent) domains[0]);
+
+ // ------------------------------------------------------------------------
+ // Verify Kernel's channel0
+ // ------------------------------------------------------------------------
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+ assertEquals("channel0", channel.getName());
+ assertEquals(4, channel.getNumberOfSubBuffers());
+ assertEquals("splice()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
+ assertEquals(false, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(262144, channel.getSubBufferSize());
+ assertEquals(0, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Verify event info (kernel, channel0)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] channel0Events = channel.getChildren();
+ assertNotNull(channel0Events);
+ assertEquals(5, channel0Events.length);
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+ assertTrue(channel0Events[1] instanceof TraceEventComponent);
+ assertTrue(channel0Events[2] instanceof TraceProbeEventComponent);
+ assertTrue(channel0Events[3] instanceof TraceProbeEventComponent);
+ assertTrue(channel0Events[4] instanceof TraceEventComponent);
+
+ TraceEventComponent event = (TraceEventComponent) channel0Events[0];
+ assertEquals("block_rq_remap", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ event = (TraceEventComponent) channel0Events[1];
+ assertEquals("block_bio_remap", event.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+
+ TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[2];
+ assertEquals("myevent2", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertEquals("0xc0101340", probeEvent.getAddress());
+ assertNull(probeEvent.getOffset());
+ assertNull(probeEvent.getSymbol());
+
+ // verify getters and setter
+ verifyProbeEventGettersSetters(probeEvent);
+
+ probeEvent = (TraceProbeEventComponent) channel0Events[3];
+ assertEquals("myevent0", probeEvent.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, probeEvent.getLogLevel());
+ assertEquals(TraceEventType.PROBE, probeEvent.getEventType());
+ assertEquals(TraceEnablement.ENABLED, probeEvent.getState());
+ assertNull(probeEvent.getAddress());
+ assertEquals("0x0", probeEvent.getOffset());
+ assertEquals("init_post", probeEvent.getSymbol());
+
+ event = (TraceEventComponent) channel0Events[4];
+ assertEquals("syscalls", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.SYSCALL, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Verify Kernel's channel1
+ // ------------------------------------------------------------------------
+ assertEquals("channel1", channels[1].getName());
+ channel = (TraceChannelComponent) channels[1];
+ assertEquals(4, channel.getNumberOfSubBuffers());
+ assertEquals("splice()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
+ assertEquals(true, channel.isOverwriteMode());
+ assertEquals(400, channel.getReadTimer());
+ assertEquals(TraceEnablement.DISABLED, channel.getState());
+ assertEquals(524288, channel.getSubBufferSize());
+ assertEquals(100, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Verify event info (kernel, channel1)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] channel1Events = channels[1].getChildren();
+ assertEquals(0, channel1Events.length);
+
+ // ------------------------------------------------------------------------
+ // Verify domain UST global
+ // ------------------------------------------------------------------------
+ assertEquals("UST global", domains[1].getName());
+
+ ITraceControlComponent[] ustChannels = domains[1].getChildren();
+
+ for (int i = 0; i < ustChannels.length; i++) {
+ assertTrue(ustChannels[i] instanceof TraceChannelComponent);
+ }
+
+ // ------------------------------------------------------------------------
+ // Verify UST global's mychannel1
+ // ------------------------------------------------------------------------
+ channel = (TraceChannelComponent) ustChannels[0];
+ assertEquals("mychannel1", channel.getName());
+ assertEquals(8, channel.getNumberOfSubBuffers());
+ assertEquals("mmap()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
+ assertEquals(true, channel.isOverwriteMode());
+ assertEquals(100, channel.getReadTimer());
+ assertEquals(TraceEnablement.DISABLED, channel.getState());
+ assertEquals(8192, channel.getSubBufferSize());
+ assertEquals(200, channel.getSwitchTimer());
+
+ // verify getters and setters
+ verifyChannelGettersSetters(channel);
+
+ // ------------------------------------------------------------------------
+ // Verify event info (UST global, mychannel1)
+ // ------------------------------------------------------------------------
+ ITraceControlComponent[] ustEvents = channel.getChildren();
+ assertEquals(0, ustEvents.length);
+
+ // ------------------------------------------------------------------------
+ // Verify UST global's channel0
+ // ------------------------------------------------------------------------
+ channel = (TraceChannelComponent) ustChannels[1];
+ assertEquals("channel0", channel.getName());
+ assertEquals(4, channel.getNumberOfSubBuffers());
+ assertEquals("mmap()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
+ assertEquals(false, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(4096, channel.getSubBufferSize());
+ assertEquals(0, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Verify event info (UST global, channel0)
+ // ------------------------------------------------------------------------
+ ustEvents = channel.getChildren();
+ assertEquals(4, ustEvents.length);
+
+ event = (TraceEventComponent) ustEvents[0];
+ assertEquals("ust_tests_hello:tptest_sighandler", event.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_LINE, event.getLogLevel());
+ assertEquals(LogLevelType.LOGLEVEL_ONLY, event.getLogLevelType());
+ assertEquals(LogLevelType.LOGLEVEL_ONLY.getShortName(), event.getLogLevelType().getShortName());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+
+ event = (TraceEventComponent) ustEvents[1];
+ assertEquals("ust_tests_hello:tptest_sighandler1", event.getName());
+ assertEquals(TraceLogLevel.TRACE_INFO, event.getLogLevel());
+ assertEquals(LogLevelType.LOGLEVEL, event.getLogLevelType());
+ assertEquals(LogLevelType.LOGLEVEL.getShortName(), event.getLogLevelType().getShortName());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+
+ event = (TraceEventComponent) ustEvents[2];
+ assertEquals("ust_tests_hello:tptest_sighandler2", event.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_SYSTEM, event.getLogLevel());
+ assertEquals(LogLevelType.LOGLEVEL_NONE, event.getLogLevelType());
+ assertEquals(LogLevelType.LOGLEVEL_NONE.getShortName(), event.getLogLevelType().getShortName());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+
+ event = (TraceEventComponent) ustEvents[3];
+ assertEquals("*", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // verify getters and setters
+ verifyEventGettersSetters(event);
+
+ // disconnect
+ node.disconnect();
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+ assertNotNull(node.getImage());
+ assertNotSame(connectedImage, node.getImage());
+
+ node.getParent().removeChild(node);
+ }
+
+ private static void verifySessionGetterSetters(TraceSessionComponent session) {
+ // save original values
+ String name = session.getName();
+ String origPath = session.getSessionPath();
+ TraceSessionState origState = session.getSessionState();
+
+ // test cases
+ session.setName("newName");
+ assertEquals("newName", session.getName());
+
+ session.setSessionPath("/home/user/tmp");
+ assertEquals("/home/user/tmp", session.getSessionPath());
+
+ session.setSessionState(TraceSessionState.INACTIVE);
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+ Image inactiveImage = session.getImage();
+ assertNotNull(inactiveImage);
+
+ session.setSessionState("active");
+ assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
+
+ Image activeImage = session.getImage();
+ assertNotNull(activeImage);
+ assertNotSame(activeImage, inactiveImage);
+
+ ITraceControlComponent[] children = session.getChildren();
+ TraceDomainComponent[] domains = session.getDomains();
+
+ assertEquals(children.length, domains.length);
+
+ for (int i = 0; i < domains.length; i++) {
+ assertEquals(domains[i].getName(), children[i].getName());
+ }
+
+ // restore original values
+ session.setName(name);
+ session.setSessionPath(origPath);
+ session.setSessionState(origState);
+ }
+
+ private static void verifyDomainGettersSetters(TraceDomainComponent domain) {
+ // save original values
+ boolean isKernel = domain.isKernel();
+
+ domain.setIsKernel(false);
+ assertFalse(domain.isKernel());
+ domain.setIsKernel(true);
+ assertTrue(domain.isKernel());
+
+ ITraceControlComponent[] children = domain.getChildren();
+ TraceChannelComponent[] channels = domain.getChannels();
+
+ assertEquals(children.length, channels.length);
+
+ for (int i = 0; i < channels.length; i++) {
+ assertEquals(channels[i].getName(), children[i].getName());
+ }
+
+ String nodeName = domain.getTargetNode().getName();
+ assertEquals(TARGET_NODE_NAME, nodeName);
+
+ // restore original values
+ domain.setIsKernel(isKernel);
+ }
+
+ private static void verifyBaseEventGettersSetters(BaseEventComponent event) {
+ // save original values
+ String name = event.getName();
+ TraceLogLevel level = event.getLogLevel();
+ TraceEventType type = event.getEventType();
+
+ // test cases
+ event.setName("newName");
+ assertEquals("newName", event.getName());
+
+ event.setLogLevel(TraceLogLevel.TRACE_INFO);
+ assertEquals(TraceLogLevel.TRACE_INFO, event.getLogLevel());
+ event.setLogLevel("TRACE_ALERT");
+ assertEquals(TraceLogLevel.TRACE_ALERT, event.getLogLevel());
+
+ event.setEventType(TraceEventType.UNKNOWN);
+ assertEquals(TraceEventType.UNKNOWN, event.getEventType());
+ event.setEventType("tracepoint");
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+
+ // restore original values
+ event.setName(name);
+ event.setLogLevel(level);
+ event.setEventType(type);
+ }
+
+ private static void verifyEventGettersSetters(TraceEventComponent event) {
+ // save original values
+ String name = event.getName();
+ TraceLogLevel level = event.getLogLevel();
+ TraceEventType type = event.getEventType();
+ TraceEnablement state = event.getState();
+
+ // test cases
+ event.setName("newName");
+ assertEquals("newName", event.getName());
+
+ event.setLogLevel(TraceLogLevel.TRACE_INFO);
+ assertEquals(TraceLogLevel.TRACE_INFO, event.getLogLevel());
+ event.setLogLevel("TRACE_ALERT");
+ assertEquals(TraceLogLevel.TRACE_ALERT, event.getLogLevel());
+
+ event.setEventType(TraceEventType.UNKNOWN);
+ assertEquals(TraceEventType.UNKNOWN, event.getEventType());
+ event.setEventType("tracepoint");
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+
+ event.setState("disabled");
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+
+ Image disabledImage = event.getImage();
+ assertNotNull(disabledImage);
+
+ event.setState(TraceEnablement.ENABLED);
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ Image enabledImage = event.getImage();
+ assertNotNull(enabledImage);
+ assertNotSame(enabledImage, disabledImage);
+
+ // restore original values
+ event.setName(name);
+ event.setLogLevel(level);
+ event.setEventType(type);
+ event.setState(state);
+ }
+
+ private static void verifyProbeEventGettersSetters(TraceProbeEventComponent event) {
+ // save original values
+ String address = event.getAddress();
+ String offset = event.getOffset();
+ String symbol = event.getSymbol();
+
+ // test cases
+ event.setAddress("0xffff1234");
+ assertEquals("0xffff1234", event.getAddress());
+
+ event.setOffset("0x1234");
+ assertEquals("0x1234", event.getOffset());
+
+ event.setSymbol("init");
+ assertEquals("init", event.getSymbol());
+
+ // restore original values
+ event.setAddress(address);
+ event.setOffset(offset);
+ event.setSymbol(symbol);
+ }
+
+ private static void verifyChannelGettersSetters(TraceChannelComponent channel) {
+ // save original values
+ String name = channel.getName();
+ int nbSubBuffers = channel.getNumberOfSubBuffers();
+ TraceChannelOutputType type = channel.getOutputType();
+ boolean mode = channel.isOverwriteMode();
+ long readTimer = channel.getReadTimer();
+ TraceEnablement state = channel.getState();
+ long subBufferSize = channel.getSubBufferSize();
+ long switchTimer = channel.getSwitchTimer();
+
+ // test cases
+ channel.setName("newName");
+ assertEquals("newName", channel.getName());
+
+ channel.setNumberOfSubBuffers(2);
+ assertEquals(2, channel.getNumberOfSubBuffers());
+
+ channel.setOutputType("splice()");
+ assertEquals("splice()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channel.getOutputType());
+
+ channel.setOverwriteMode(false);
+ assertEquals(false, channel.isOverwriteMode());
+
+ channel.setReadTimer(250);
+ assertEquals(250, channel.getReadTimer());
+
+ channel.setState("enabled");
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+
+ Image enabledImage = channel.getImage();
+ assertNotNull(enabledImage);
+ channel.setState(TraceEnablement.DISABLED);
+ assertEquals(TraceEnablement.DISABLED, channel.getState());
+
+ Image disabledImage = channel.getImage();
+ assertNotNull(disabledImage);
+ assertNotSame(enabledImage, disabledImage);
+
+ channel.setSubBufferSize(1024);
+ assertEquals(1024, channel.getSubBufferSize());
+
+ channel.setSwitchTimer(1000);
+ assertEquals(1000, channel.getSwitchTimer());
+
+ // restore original values
+ channel.setName(name);
+ channel.setNumberOfSubBuffers(nbSubBuffers);
+ channel.setOutputType(type);
+ channel.setOverwriteMode(mode);
+ channel.setReadTimer(readTimer);
+ channel.setState(state);
+ channel.setSubBufferSize(subBufferSize);
+ channel.setSwitchTimer(switchTimer);
+ }
+
+ private static void verifyUstProviderGettersSetters(UstProviderComponent ustProvider) {
+ // save original values
+ String name = ustProvider.getName();
+ int pid = ustProvider.getPid();
+
+ // test cases
+ ustProvider.setName("newName");
+ assertEquals("newName", ustProvider.getName());
+
+ ustProvider.setPid(9876);
+ assertEquals(9876, ustProvider.getPid());
+
+ // restore original values
+ ustProvider.setName(name);
+ ustProvider.setPid(pid);
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlUstProviderTests</code> contains UST provider
+ * handling test cases.
+ */
+public class TraceControlUstProviderTests {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "CreateTreeTest.cfg";
+ private static final String SCEN_SCENARIO2_TEST = "Scenario2";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ fFacility.dispose();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testUstProviderTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+ root.addChild(node);
+
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+
+ int i = 0;
+ while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Verify that node is connected
+ assertEquals(TargetNodeState.CONNECTED, node.getTargetNodeState());
+
+ // Get provider groups
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Get kernel provider
+ ITraceControlComponent[] providers = groups[0].getChildren();
+ KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0];
+
+ // Get kernel provider events and select 2 events
+ ITraceControlComponent[] events = kernelProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(3, events.length);
+
+ BaseEventComponent baseEventInfo0 = (BaseEventComponent) events[0];
+ BaseEventComponent baseEventInfo1 = (BaseEventComponent) events[1];
+
+ // Initialize dialog implementations for command execution
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
+ TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // ------------------------------------------------------------------------
+ // Create session
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING_WITH_PATH);
+
+ CreateSessionDialogStub sessionDialogStub = new CreateSessionDialogStub();
+ sessionDialogStub.setSessionPath("/home/user/temp");
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(sessionDialogStub);
+
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+ assertEquals("/home/user/temp", session.getSessionPath());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ // ------------------------------------------------------------------------
+ // Enable Channel on UST global domain
+ // ------------------------------------------------------------------------
+ fProxy.setScenario(SCEN_SCENARIO2_TEST);
+ EnableChannelDialogStub channelDialogStub = new EnableChannelDialogStub();
+ channelDialogStub.setIsKernel(false);
+ channelDialogStub.getChannelInfo().setOverwriteMode(false);
+ channelDialogStub.getChannelInfo().setSwitchTimer(200);
+ channelDialogStub.getChannelInfo().setReadTimer(100);
+ channelDialogStub.getChannelInfo().setNumberOfSubBuffers(2);
+ TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelDialogStub);
+
+ fFacility.executeCommand(session, "enableChannelOnSession");
+
+ // Verify that UST domain was created
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("UST global", domains[0].getName());
+
+ // Verify that channel was created with correct data
+ ITraceControlComponent[]channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+ assertEquals("mychannel", channel.getName());
+ assertEquals(2, channel.getNumberOfSubBuffers());
+ assertEquals("mmap()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
+ assertEquals(false, channel.isOverwriteMode());
+ assertEquals(100, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(16384, channel.getSubBufferSize());
+ assertEquals(200, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Enable event on default channel on created session above
+ // ------------------------------------------------------------------------
+ // Get first UST provider
+ UstProviderComponent ustProvider = (UstProviderComponent) providers[1];
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustProvider.getName());
+ assertEquals(9379, ustProvider.getPid());
+
+ // Get events
+ events = ustProvider.getChildren();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ baseEventInfo0 = (BaseEventComponent) events[0];
+ baseEventInfo1 = (BaseEventComponent) events[1];
+
+ ITraceControlComponent[] ustSelection = { baseEventInfo0, baseEventInfo1 };
+
+ fFacility.executeCommand(ustSelection, "assign.event");
+
+ // verify that events were created under the channel
+ // Note that domain and channel has to be re-read because the tree is re-created
+
+ domains = session.getChildren();
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+
+ ITraceControlComponent[] ustEvents = channels[0].getChildren();
+ assertEquals(2, ustEvents.length);
+
+ TraceEventComponent event = (TraceEventComponent) ustEvents[0];
+ assertEquals("ust_tests_hello:tptest_sighandler", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ event = (TraceEventComponent) ustEvents[1];
+ assertEquals("ust_tests_hello:tptest", ustEvents[1].getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Disable event components
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(event, "disableEvent");
+
+ assertEquals(TraceEnablement.DISABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event component
+ // ------------------------------------------------------------------------
+ fFacility.executeCommand(event, "enableEvent");
+
+ // Verify event state
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ //-------------------------------------------------------------------------
+ // Disconnect node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "delete");
+ assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableEventsDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlUstSessionTests</code> contains UST
+ * session/channel/event handling test cases.
+ */
+public class TraceControlUstSessionTests {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "CreateTreeTest.cfg";
+ private static final String SCEN_SCENARIO4_TEST = "Scenario4";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ fFacility.dispose();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testTraceSessionTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+
+ root.addChild(node);
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+ int i = 0;
+ while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Get provider groups
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Initialize dialog implementations for command execution
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
+ TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ // ------------------------------------------------------------------------
+ // Create session
+ // ------------------------------------------------------------------------
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20120314-132824", session.getSessionPath());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ // Initialize scenario
+ fProxy.setScenario(SCEN_SCENARIO4_TEST);
+
+ // ------------------------------------------------------------------------
+ // Enable default channel on created session above
+ // ------------------------------------------------------------------------
+ EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
+ channelStub.setIsKernel(false);
+ TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelStub);
+
+ fFacility.executeCommand(session, "enableChannelOnSession");
+
+ // Verify that Kernel domain was created
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("UST global", domains[0].getName());
+ assertEquals("Domain buffer Type", BufferType.BUFFER_TYPE_UNKNOWN, ((TraceDomainComponent)domains[0]).getBufferType());
+
+ // Verify that channel was created with correct data
+ ITraceControlComponent[] channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+ assertEquals("mychannel", channel.getName());
+ assertEquals(4, channel.getNumberOfSubBuffers());
+ assertEquals("mmap()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
+ assertEquals(true, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(16384, channel.getSubBufferSize());
+ assertEquals(100, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Enable channel on domain
+ // ------------------------------------------------------------------------
+ ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
+ info.setName("mychannel2");
+ info.setOverwriteMode(false);
+ info.setSubBufferSize(32768);
+ info.setNumberOfSubBuffers(2);
+ info.setSwitchTimer(100);
+ info.setReadTimer(200);
+ channelStub.setChannelInfo(info);
+
+ fFacility.executeCommand(domains[0], "enableChannelOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ assertTrue(channels[1] instanceof TraceChannelComponent);
+ channel = (TraceChannelComponent) channels[1];
+ assertEquals("mychannel2", channel.getName());
+ assertEquals(2, channel.getNumberOfSubBuffers());
+ assertEquals("mmap()", channel.getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, channel.getOutputType());
+ assertEquals(false, channel.isOverwriteMode());
+ assertEquals(200, channel.getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channel.getState());
+ assertEquals(32768, channel.getSubBufferSize());
+ assertEquals(100, channel.getSwitchTimer());
+
+ // ------------------------------------------------------------------------
+ // Enable event (tracepoint) on session and default channel
+ // ------------------------------------------------------------------------
+ EnableEventsDialogStub eventsDialogStub = new EnableEventsDialogStub();
+ eventsDialogStub.setIsTracePoints(true);
+ List<String> events = new ArrayList<>();
+ events.add("ust_tests_hello:tptest_sighandler");
+ eventsDialogStub.setNames(events);
+ eventsDialogStub.setIsKernel(false);
+ TraceControlDialogFactory.getInstance().setEnableEventsDialog(eventsDialogStub);
+
+ fFacility.executeCommand(session, "enableEventOnSession");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(3, channels.length);
+
+ assertTrue(channels[2] instanceof TraceChannelComponent);
+ channel = (TraceChannelComponent) channels[2];
+ assertEquals("channel0", channel.getName());
+ // No need to check parameters of default channel because that has been done in other tests
+
+ ITraceControlComponent[] channel0Events = channel.getChildren();
+ assertEquals(1, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ TraceEventComponent event = (TraceEventComponent) channel0Events[0];
+ assertEquals("ust_tests_hello:tptest_sighandler", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel()); // TODO
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (tracepoint) on domain and default channel
+ // ------------------------------------------------------------------------
+ events.clear();
+ events.add("ust_tests_hello:tptest");
+ eventsDialogStub.setNames(events);
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(2, channel0Events.length);
+
+ assertTrue(channel0Events[1] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[1];
+ assertEquals("ust_tests_hello:tptest", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel()); // TODO
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (all tracepoints) on specific channel
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setNames(events);
+ eventsDialogStub.setIsAllTracePoints(true);
+
+ fFacility.executeCommand(channels[1], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[1];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel = (TraceChannelComponent) channels[1];
+
+ channel0Events = channel.getChildren();
+ assertEquals(1, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("*", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (wildcard) on specific channel
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setIsTracePoints(false);
+ eventsDialogStub.setIsAllTracePoints(false);
+ eventsDialogStub.setIsWildcard(true);
+ eventsDialogStub.setWildcard("ust*");
+
+ fFacility.executeCommand(channels[0], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(1, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("ust*", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (wildcard) on domain
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setIsTracePoints(false);
+ eventsDialogStub.setIsAllTracePoints(false);
+ eventsDialogStub.setIsWildcard(true);
+ eventsDialogStub.setWildcard("ust*");
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(1, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("ust*", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (wildcard) on session
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setIsTracePoints(false);
+ eventsDialogStub.setIsAllTracePoints(false);
+ eventsDialogStub.setIsWildcard(true);
+ eventsDialogStub.setWildcard("ust*");
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(4, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("u*", event.getName());
+ assertEquals(TraceLogLevel.LEVEL_UNKNOWN, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (loglevel) on domain
+ // ------------------------------------------------------------------------
+ events.clear();
+ eventsDialogStub.setIsWildcard(false);
+ eventsDialogStub.setIsLogLevel(true);
+ eventsDialogStub.setLogLevelEventName("myevent1");
+ eventsDialogStub.setLogLevelType(LogLevelType.LOGLEVEL);
+ eventsDialogStub.setLogLevel(TraceLogLevel.TRACE_WARNING);
+
+ fFacility.executeCommand(domains[0], "enableEventOnDomain");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(5, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("myevent1", event.getName());
+ assertEquals(TraceLogLevel.TRACE_WARNING, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (loglevel) on session
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setLogLevelEventName("myevent2");
+ eventsDialogStub.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
+ eventsDialogStub.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
+
+ fFacility.executeCommand(session, "enableEventOnSession");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[2];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(6, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("myevent2", event.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Enable event (loglevel) on channel
+ // ------------------------------------------------------------------------
+ eventsDialogStub.setLogLevelEventName("myevent0");
+ eventsDialogStub.setLogLevelType(LogLevelType.LOGLEVEL_ONLY);
+ eventsDialogStub.setLogLevel(TraceLogLevel.TRACE_DEBUG_FUNCTION);
+
+ fFacility.executeCommand(channels[0], "enableEventOnChannel");
+
+ // Get Kernel domain component instance
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ channel = (TraceChannelComponent) channels[0];
+ // No need to check parameters of default channel because that has been done in other tests
+
+ channel0Events = channel.getChildren();
+ assertEquals(2, channel0Events.length);
+
+ assertTrue(channel0Events[0] instanceof TraceEventComponent);
+
+ event = (TraceEventComponent) channel0Events[0];
+ assertEquals("myevent0", event.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, event.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, event.getEventType());
+ assertEquals(TraceEnablement.ENABLED, event.getState());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+ // Initialize session handling scenario
+ fProxy.setScenario(TraceControlTestFacility.SCEN_SCENARIO_SESSION_HANDLING);
+
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals("Session components still exist.", 0, groups[1].getChildren().length);
+
+ //-------------------------------------------------------------------------
+ // Disconnect node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+
+ fFacility.executeCommand(node, "delete");
+
+ assertEquals("Node not deleted.", 0, fFacility.getControlView().getTraceControlRoot().getChildren().length);
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.model.component;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.CreateSessionDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.DestroyConfirmDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.EnableChannelDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs.GetEventInfoDialogStub;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.TestRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemProfile;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>TraceControlUstSessionTests</code> contains UST
+ * session/channel/event handling test cases for LTTng 2.2.
+ */
+public class TraceControlUstSessionTests2 {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private static final String TEST_STREAM = "CreateTreeTest2.cfg";
+ private static final String SCEN_SCEN_PER_UID_TEST = "ScenPerUidTest";
+ private static final String SCEN_SCEN_PER_PID_TEST = "ScenPerPidTest";
+ private static final String SCEN_SCEN_BUF_SIZE_TEST = "ScenBufSizeTest";
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private TraceControlTestFacility fFacility;
+ private TestRemoteSystemProxy fProxy;
+ private String fTestFile;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fFacility = TraceControlTestFacility.getInstance();
+ fFacility.init();
+ fProxy = new TestRemoteSystemProxy();
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(TraceControlTestFacility.DIRECTORY + File.separator + TEST_STREAM), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestFile = testfile.getAbsolutePath();
+ }
+
+ /**
+ * Perform post-test clean-up.
+ */
+ @After
+ public void tearDown() {
+ fFacility.waitForJobs();
+ fFacility.dispose();
+ }
+
+ /**
+ * Run the TraceControlComponent.
+ *
+ * @throws Exception
+ * This will fail the test
+ */
+ @Test
+ public void testTraceSessionTree() throws Exception {
+
+ fProxy.setTestFile(fTestFile);
+ fProxy.setScenario(TraceControlTestFacility.SCEN_INIT_TEST);
+
+ ITraceControlComponent root = fFacility.getControlView().getTraceControlRoot();
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ ISystemProfile profile = registry.createSystemProfile("myProfile", true);
+ IHost host = registry.createLocalHost(profile, "myProfile", "user");
+
+ TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, fProxy);
+
+ root.addChild(node);
+ fFacility.waitForJobs();
+
+ fFacility.executeCommand(node, "connect");
+ int i = 0;
+ while ((i < 10) && (node.getTargetNodeState() != TargetNodeState.CONNECTED)) {
+ i++;
+ fFacility.delay(TraceControlTestFacility.GUI_REFESH_DELAY);
+ }
+
+ // Get provider groups
+ ITraceControlComponent[] groups = node.getChildren();
+ assertNotNull(groups);
+ assertEquals(2, groups.length);
+
+ // Initialize dialog implementations for command execution
+ TraceControlDialogFactory.getInstance().setCreateSessionDialog(new CreateSessionDialogStub());
+ TraceControlDialogFactory.getInstance().setGetEventInfoDialog(new GetEventInfoDialogStub());
+ TraceControlDialogFactory.getInstance().setConfirmDialog(new DestroyConfirmDialogStub());
+
+ // Initialize scenario
+ fProxy.setScenario(SCEN_SCEN_PER_UID_TEST);
+
+ // ------------------------------------------------------------------------
+ // Create session
+ // ------------------------------------------------------------------------
+ TraceSessionComponent session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+
+ // ------------------------------------------------------------------------
+ // Enable default channel on created session above
+ // ------------------------------------------------------------------------
+ EnableChannelDialogStub channelStub = new EnableChannelDialogStub();
+ channelStub.setIsKernel(false);
+ ChannelInfo info = (ChannelInfo)channelStub.getChannelInfo();
+ info.setName("mychannel");
+ info.setOverwriteMode(false);
+ info.setSubBufferSize(-1);
+ info.setNumberOfSubBuffers(-1);
+ info.setSwitchTimer(-1);
+ info.setReadTimer(-1);
+ info.setMaxNumberTraceFiles(-1);
+ info.setMaxSizeTraceFiles(-1);
+ info.setBufferType(BufferType.BUFFER_PER_UID);
+ channelStub.setChannelInfo(info);
+
+ TraceControlDialogFactory.getInstance().setEnableChannelDialog(channelStub);
+
+ fFacility.executeCommand(session, "enableChannelOnSession");
+
+ // Verify that UST domain was created
+ ITraceControlComponent[] domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("UST global", domains[0].getName());
+ assertEquals("Domain buffer Type", BufferType.BUFFER_PER_UID, ((TraceDomainComponent)domains[0]).getBufferType());
+
+ // Verify that channel was created with correct data
+ ITraceControlComponent[] channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ TraceChannelComponent channel = (TraceChannelComponent) channels[0];
+ assertEquals("mychannel", channel.getName());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ // ------------------------------------------------------------------------
+ // Create session (per-pid buffers)
+ // ------------------------------------------------------------------------
+
+ // Initialize scenario
+ fProxy.setScenario(SCEN_SCEN_PER_PID_TEST);
+
+ session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+
+ // ------------------------------------------------------------------------
+ // Enable default channel on created session above
+ // ------------------------------------------------------------------------
+ info = (ChannelInfo)channelStub.getChannelInfo();
+ info.setName("mychannel");
+ info.setBufferType(BufferType.BUFFER_PER_PID);
+ channelStub.setChannelInfo(info);
+
+ fFacility.executeCommand(session, "enableChannelOnSession");
+
+ // Verify that UST domain was created
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("UST global", domains[0].getName());
+ assertEquals("Domain buffer Type", BufferType.BUFFER_PER_PID, ((TraceDomainComponent)domains[0]).getBufferType());
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ channel = (TraceChannelComponent) channels[0];
+ assertEquals("mychannel", channel.getName());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ // ------------------------------------------------------------------------
+ // Create session (configured file size and number of files)
+ // ------------------------------------------------------------------------
+
+ // Initialize scenario
+ fProxy.setScenario(SCEN_SCEN_BUF_SIZE_TEST);
+
+ session = fFacility.createSession(groups[1]);
+
+ // Verify that session was created
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+
+ // ------------------------------------------------------------------------
+ // Enable default channel on created session above
+ // ------------------------------------------------------------------------
+ info = (ChannelInfo)channelStub.getChannelInfo();
+ info.setName("mychannel");
+ info.setMaxNumberTraceFiles(10);
+ info.setMaxSizeTraceFiles(1024);
+ info.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
+ channelStub.setChannelInfo(info);
+
+ fFacility.executeCommand(session, "enableChannelOnSession");
+
+ // Verify that UST domain was created
+ domains = session.getChildren();
+ assertNotNull(domains);
+ assertEquals(1, domains.length);
+
+ assertEquals("UST global", domains[0].getName());
+ assertEquals("Domain buffer Type", BufferType.BUFFER_PER_PID, ((TraceDomainComponent)domains[0]).getBufferType());
+
+ // Verify that channel was created with correct data
+ channels = domains[0].getChildren();
+ assertNotNull(channels);
+ assertEquals(1, channels.length);
+
+ assertTrue(channels[0] instanceof TraceChannelComponent);
+ channel = (TraceChannelComponent) channels[0];
+ assertEquals("mychannel", channel.getName());
+
+ // ------------------------------------------------------------------------
+ // Destroy session
+ // ------------------------------------------------------------------------
+ fFacility.destroySession(session);
+
+ // Verify that no more session components exist
+ assertEquals(0, groups[1].getChildren().length);
+
+ //-------------------------------------------------------------------------
+ // Disconnect node
+ //-------------------------------------------------------------------------
+ fFacility.executeCommand(node, "disconnect");
+ assertEquals(TargetNodeState.DISCONNECTED, node.getTargetNodeState());
+
+ //-------------------------------------------------------------------------
+ // Delete node
+ //-------------------------------------------------------------------------
+
+ fFacility.executeCommand(node, "delete");
+
+ assertEquals(0,fFacility.getControlView().getTraceControlRoot().getChildren().length);
+ }
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2011, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.service;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the service unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ LTTngControlServiceTest.class,
+ LTTngControlServiceMiTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte - Support of machine interface
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.net.URL;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceMI;
+
+/**
+ * @author ejorajo
+ *
+ */
+public class LTTngControlServiceMiTest extends LTTngControlServiceTest {
+
+ private static final String MI_TEST_STREAM = "LTTngServiceMiTest.cfg";
+
+ @Override
+ protected ILttngControlService getControlService() {
+ try {
+ URL resource = LTTngControlServiceMI.class.getResource(LTTngControlServiceConstants.MI_XSD_FILENAME);
+ return new LTTngControlServiceMI(getfShell(), resource);
+ } catch (ExecutionException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public void testGetSessionNameGarbage() {
+ try {
+ fShell.setScenario(SCEN_GET_SESSION_GARBAGE_OUT);
+ fService.getSessionNames(new NullProgressMonitor());
+ } catch (ExecutionException e) {
+ // Success. Parsing of garbage result in an ExecutionException
+ // generated by the XML document parser: Unable to parse the xml
+ // document.
+ }
+ }
+
+ @Override
+ public void testCreateLiveSession() throws ExecutionException {
+ fShell.setScenario(SCEN_CREATE_LIVE_SESSION);
+
+ ISessionInfo params = new SessionInfo("mysession");
+ params.setLive(true);
+ params.setStreamedTrace(true);
+ params.setNetworkUrl("net://127.0.0.1");
+ ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
+ assertNotNull(sessionInfo);
+ assertEquals("mysession", sessionInfo.getName());
+ assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
+ assertTrue(sessionInfo.isStreamedTrace());
+ assertTrue(sessionInfo.isLive());
+ assertEquals("tcp4://127.0.0.1:5342/ [data: 5343]", sessionInfo.getSessionPath());
+ String[] names = fService.getSessionNames(new NullProgressMonitor());
+ assertEquals(names[0], "mysession");
+ fService.destroySession("mysession", new NullProgressMonitor());
+ }
+
+ @Override
+ protected String getTestStream() {
+ return MI_TEST_STREAM;
+ }
+
+ @Override
+ protected TraceLogLevel getAllEventTraceLogLevel() {
+ return TraceLogLevel.TRACE_DEBUG;
+ }
+
+ @Override
+ public void testGetKernelProviderNoUstVerbose() {
+ // Verbose mode in machine interface is deactivated. This test is
+ // ignored.
+ }
+
+ @Override
+ public void testCreateSession2_1() {
+ // 2.1 is not supported by mi. This test is ignored.
+ }
+
+ @Override
+ public void testGetKernelProviderNoUst3() {
+ // Verbose mode in machine interface is deactivated. This test is
+ // ignored.
+ }
+
+ @Override
+ public void testGetKernelProviderNoKernelVerbose() {
+ // Verbose mode in machine interface is deactivated. This test is
+ // ignored.
+ }
+
+ @Override
+ public void testCreateSessionVerbose2_1() {
+ // Verbose mode in machine interface is deactivated. This test is
+ // ignored.
+ }
+
+ @Override
+ public void testDestroySessionVerbose() {
+ // Verbose mode in machine interface is deactivated. This test is
+ // ignored.
+ }
+
+ @Override
+ public void testCreateSessionWithPrompt() {
+ // TODO Investigate if this case can happen in production. If yes than
+ // we need to rethinks the MI fetching and parsing.
+ }
+
+ @Override
+ public void testAddContext() {
+ // TODO This does not use mi feature.And currently the context enabling
+ // is wrong for 2.6.
+ }
+
+ @Override
+ public void testAddContextFailure() {
+ // TODO This does not use mi feature.And currently the context enabling
+ // is wrong for 2.6.
+ }
+
+ @Override
+ public void testCreateSnapshotSession2_5() {
+ // not applicable for MI
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.control.ui.tests.service;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.service.CommandShellFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.shells.LTTngToolsFileShell;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+/**
+ * The class <code>LTTngControlServiceTest</code> contains test for the class
+ * <code>{@link LTTngControlService}</code>.
+ */
+@SuppressWarnings("javadoc")
+public class LTTngControlServiceTest {
+
+ private static final String DIRECTORY = "testfiles";
+ private static final String TEST_STREAM = "LTTngServiceTest.cfg";
+
+ private static final String SCEN_LTTNG_NOT_INSTALLED = "LttngNotInstalled";
+ private static final String SCEN_LTTNG_VERSION = "LttngVersion";
+ private static final String SCEN_LTTNG_VERSION_WITH_PROMPT = "LttngVersionWithPrompt";
+ private static final String SCEN_LTTNG_UNSUPPORTED_VERSION = "LttngUnsupportedVersion";
+ private static final String SCEN_LTTNG_NO_VERSION = "LttngNoVersion";
+ private static final String SCEN_NO_SESSION_AVAILABLE = "NoSessionAvailable";
+ private static final String SCEN_GET_SESSION_NAMES1 = "GetSessionNames1";
+ private static final String SCEN_GET_SESSION_NAME_NOT_EXIST = "GetSessionNameNotExist";
+ private static final String SCEN_GET_SESSION_NAME_NOT_EXIST_VERBOSE = "GetSessionNameNotExistVerbose";
+ protected static final String SCEN_GET_SESSION_GARBAGE_OUT = "GetSessionGarbageOut";
+ private static final String SCEN_GET_SESSION1 = "GetSession1";
+ private static final String SCEN_GET_KERNEL_PROVIDER1 = "GetKernelProvider1";
+ private static final String SCEN_LIST_WITH_NO_KERNEL1 = "ListWithNoKernel1";
+ private static final String SCEN_LIST_WITH_NO_KERNEL2 = "ListWithNoKernel2";
+ private static final String SCEN_LIST_WITH_NO_KERNEL_VERBOSE = "ListWithNoKernelVerbose";
+ private static final String SCEN_GET_UST_PROVIDER1 = "GetUstProvider1";
+ private static final String SCEN_GET_UST_PROVIDER2 = "GetUstProvider2";
+ private static final String SCEN_GET_UST_PROVIDER3 = "GetUstProvider3";
+ private static final String SCEN_LIST_WITH_NO_UST1 = "ListWithNoUst1";
+ private static final String SCEN_LIST_WITH_NO_UST2 = "ListWithNoUst2";
+ private static final String SCEN_LIST_WITH_NO_UST3 = "ListWithNoUst3";
+ private static final String SCEN_LIST_WITH_NO_UST_VERBOSE = "ListWithNoUstVerbose";
+ private static final String SCEN_CREATE_SESSION1 = "CreateSession1";
+ private static final String SCEN_CREATE_SESSION_WITH_PROMPT = "CreateSessionWithPrompt";
+ private static final String SCEN_CREATE_SESSION_VARIANTS = "CreateSessionVariants";
+ private static final String SCEN_DESTROY_SESSION1 = "DestroySession1";
+ private static final String SCEN_DESTROY_SESSION_VERBOSE = "DestroySessionVerbose";
+ private static final String SCEN_CHANNEL_HANDLING = "ChannelHandling";
+ private static final String SCEN_EVENT_HANDLING = "EventHandling";
+ private static final String SCEN_CONTEXT_HANDLING = "ContextHandling";
+ private static final String SCEN_CONTEXT_ERROR_HANDLING = "ContextErrorHandling";
+ private static final String SCEN_CALIBRATE_HANDLING = "CalibrateHandling";
+ private static final String SCEN_CREATE_SESSION_2_1 = "CreateSessionLttng2.1";
+ private static final String SCEN_CREATE_SESSION_VERBOSE_2_1 = "CreateSessionLttngVerbose2.1";
+ private static final String SCEN_CREATE_SNAPSHOT_SESSION = "CreateSessionSnapshot";
+ private static final String SCEN_CREATE_SNAPSHOT_SESSION_2_5 = "CreateSessionSnapshot2.5";
+ private static final String SCEN_CREATE_STREAMED_SNAPSHOT_SESSION = "CreateSessionStreamedSnapshot";
+ private static final String SCEN_CREATE_SNAPSHOT_SESSION_ERRORS = "CreateSessionSnapshotErrors";
+ protected static final String SCEN_CREATE_LIVE_SESSION = "CreateSessionLive";
+ private static final String SCEN_CREATE_LIVE_SESSION_ERRORS = "CreateSessionLiveErrors";
+
+
+ // ------------------------------------------------------------------------
+ // Test data
+ // ------------------------------------------------------------------------
+
+ private CommandShellFactory fShellFactory;
+ private String fTestfile;
+ protected LTTngToolsFileShell fShell;
+ protected ILttngControlService fService;
+
+ // ------------------------------------------------------------------------
+ // Housekeeping
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-test initialization.
+ *
+ * @throws Exception
+ * if the initialization fails for some reason
+ */
+ @Before
+ public void setUp() throws Exception {
+ fShellFactory = CommandShellFactory.getInstance();
+
+ URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(getTestDirectory() + File.separator + getTestStream()), null);
+ File testfile = new File(FileLocator.toFileURL(location).toURI());
+ fTestfile = testfile.getAbsolutePath();
+
+ fShell = fShellFactory.getFileShell();
+ fShell.loadScenarioFile(fTestfile);
+ fService = getControlService();
+ if (fService == null) {
+ throw new Exception("Unable to obtain a valid ControlService");
+ }
+
+ ControlPreferences.getInstance().init(Activator.getDefault().getPreferenceStore());
+ }
+
+ /**
+ * @return the string of the test directory to use
+ */
+ protected String getTestDirectory() {
+ return DIRECTORY;
+ }
+
+ /**
+ * @return the LttngCon
+ */
+ protected ILttngControlService getControlService() {
+ return new LTTngControlService(fShell);
+ }
+
+ public LTTngToolsFileShell getfShell() {
+ return fShell;
+ }
+
+ /**
+ * @return
+ */
+ protected String getTestStream() {
+ return TEST_STREAM;
+ }
+
+ @After
+ public void tearDown() {
+ disableVerbose();
+ ControlPreferences.getInstance().dispose();
+ }
+
+ // ------------------------------------------------------------------------
+ // Test Cases
+ // ------------------------------------------------------------------------
+
+ @Test
+ public void testVersion() {
+ try {
+ fShell.setScenario(SCEN_LTTNG_VERSION);
+ ILttngControlService service = LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
+ assertNotNull(service);
+ assertEquals("2.1.0", service.getVersionString());
+ } catch (ExecutionException e) {
+ fail("Exeption thrown " + e);
+ }
+ }
+
+ @Test
+ public void testVersionWithPrompt() {
+ try {
+ fShell.setScenario(SCEN_LTTNG_VERSION_WITH_PROMPT);
+ ILttngControlService service = LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
+ assertNotNull(service);
+ assertEquals("2.0.0", service.getVersionString());
+ } catch (ExecutionException e) {
+ fail("Exeption thrown " + e);
+ }
+ }
+
+ @Test
+ public void testUnsupportedVersion() {
+ try {
+ fShell.setScenario(SCEN_LTTNG_UNSUPPORTED_VERSION);
+ LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
+ fail("No exeption thrown");
+ } catch (ExecutionException e) {
+ // success
+ }
+ }
+
+ @Test
+ public void testNoVersion() {
+ try {
+ fShell.setScenario(SCEN_LTTNG_NO_VERSION);
+ LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
+ fail("No exeption thrown");
+ } catch (ExecutionException e) {
+ // success
+ }
+ }
+
+ @Test
+ public void testLttngNotInstalled() {
+ try {
+ fShell.setScenario(SCEN_LTTNG_NOT_INSTALLED);
+ fService.getSessionNames(new NullProgressMonitor());
+ fail("No exeption thrown");
+ } catch (ExecutionException e) {
+ // success
+ }
+ }
+
+ @Test
+ public void testGetSessionNames1() {
+ try {
+ fShell.setScenario(SCEN_NO_SESSION_AVAILABLE);
+ String[] result = fService.getSessionNames(new NullProgressMonitor());
+
+ assertNotNull(result);
+ assertEquals(0, result.length);
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetSessionNames2() {
+ try {
+ fShell.setScenario(SCEN_GET_SESSION_NAMES1);
+ String[] result = fService.getSessionNames(new NullProgressMonitor());
+
+ assertNotNull(result);
+ assertEquals(2, result.length);
+ assertEquals("mysession1", result[0]);
+ assertEquals("mysession", result[1]);
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetSessionNotExist() {
+ try {
+ fShell.setScenario(SCEN_GET_SESSION_NAME_NOT_EXIST);
+ fService.getSessionNames(new NullProgressMonitor());
+ fail("No exeption thrown");
+
+ } catch (ExecutionException e) {
+ // success
+ }
+ }
+
+ @Test
+ public void testGetSessionNotExistVerbose() {
+ try {
+ enableVerbose();
+ fShell.setScenario(SCEN_GET_SESSION_NAME_NOT_EXIST_VERBOSE);
+ fService.getSessionNames(new NullProgressMonitor());
+ fail("No exeption thrown");
+
+ } catch (ExecutionException e) {
+ // success
+ } finally {
+ disableVerbose();
+ }
+ }
+
+ @Test
+ public void testGetSessionNameGarbage() {
+ try {
+ fShell.setScenario(SCEN_GET_SESSION_GARBAGE_OUT);
+ String[] result = fService.getSessionNames(new NullProgressMonitor());
+
+ assertNotNull(result);
+ assertEquals(0, result.length);
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetSession1() {
+ try {
+ fShell.setScenario(SCEN_GET_SESSION1);
+ ISessionInfo session = fService.getSession("mysession", new NullProgressMonitor());
+
+ // Verify Session
+ assertNotNull(session);
+ assertEquals("mysession", session.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20120129-084256", session.getSessionPath());
+ assertEquals(TraceSessionState.ACTIVE, session.getSessionState());
+
+ IDomainInfo[] domains = session.getDomains();
+ assertNotNull(domains);
+ assertEquals(2, domains.length);
+
+ // Verify Kernel domain
+ assertEquals("Kernel", domains[0].getName());
+ IChannelInfo[] channels = domains[0].getChannels();
+ assertNotNull(channels);
+ assertEquals(2, channels.length);
+
+ // Verify Kernel's channel0
+ assertEquals("channel0", channels[0].getName());
+ assertEquals(4, channels[0].getNumberOfSubBuffers());
+ assertEquals("splice()", channels[0].getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channels[0].getOutputType());
+ assertEquals(false, channels[0].isOverwriteMode());
+ assertEquals(200, channels[0].getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, channels[0].getState());
+ assertEquals(262144, channels[0].getSubBufferSize());
+ assertEquals(0, channels[0].getSwitchTimer());
+
+ // Verify event info
+ IEventInfo[] channel0Events = channels[0].getEvents();
+ assertNotNull(channel0Events);
+ assertEquals(2, channel0Events.length);
+ assertEquals("block_rq_remap", channel0Events[0].getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, channel0Events[0].getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, channel0Events[0].getEventType());
+ assertEquals(TraceEnablement.ENABLED, channel0Events[0].getState());
+
+ assertEquals("block_bio_remap", channel0Events[1].getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, channel0Events[1].getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, channel0Events[1].getEventType());
+ assertEquals(TraceEnablement.DISABLED, channel0Events[1].getState());
+
+ // Verify Kernel's channel1
+ assertEquals("channel1", channels[1].getName());
+ assertEquals(4, channels[1].getNumberOfSubBuffers());
+ assertEquals("splice()", channels[1].getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.SPLICE, channels[1].getOutputType());
+ assertEquals(true, channels[1].isOverwriteMode());
+ assertEquals(400, channels[1].getReadTimer());
+ assertEquals(TraceEnablement.DISABLED, channels[1].getState());
+ assertEquals(524288, channels[1].getSubBufferSize());
+ assertEquals(100, channels[1].getSwitchTimer());
+
+ // Verify event info
+ IEventInfo[] channel1Events = channels[1].getEvents();
+ assertEquals(0, channel1Events.length);
+
+ // Verify domain UST global
+ assertEquals("UST global", domains[1].getName());
+
+ IChannelInfo[] ustChannels = domains[1].getChannels();
+
+ // Verify UST global's mychannel1
+ assertEquals("mychannel1", ustChannels[0].getName());
+ assertEquals(8, ustChannels[0].getNumberOfSubBuffers());
+ assertEquals("mmap()", ustChannels[0].getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, ustChannels[0].getOutputType());
+ assertEquals(true, ustChannels[0].isOverwriteMode());
+ assertEquals(100, ustChannels[0].getReadTimer());
+ assertEquals(TraceEnablement.DISABLED, ustChannels[0].getState());
+ assertEquals(8192, ustChannels[0].getSubBufferSize());
+ assertEquals(200, ustChannels[0].getSwitchTimer());
+
+ // Verify event info
+ IEventInfo[] ustEvents = ustChannels[0].getEvents();
+ assertEquals(0, ustEvents.length);
+
+ // Verify UST global's channel0
+ assertEquals("channel0", ustChannels[1].getName());
+ assertEquals(4, ustChannels[1].getNumberOfSubBuffers());
+ assertEquals("mmap()", ustChannels[1].getOutputType().getInName());
+ assertEquals(TraceChannelOutputType.MMAP, ustChannels[1].getOutputType());
+ assertEquals(false, ustChannels[1].isOverwriteMode());
+ assertEquals(200, ustChannels[1].getReadTimer());
+ assertEquals(TraceEnablement.ENABLED, ustChannels[1].getState());
+ assertEquals(4096, ustChannels[1].getSubBufferSize());
+ assertEquals(0, ustChannels[1].getSwitchTimer());
+
+ // Verify event info
+ ustEvents = ustChannels[1].getEvents();
+ assertEquals(2, ustEvents.length);
+
+ assertEquals("ust_tests_hello:tptest_sighandler", ustEvents[0].getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_LINE, ustEvents[0].getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, ustEvents[0].getEventType());
+ assertEquals(TraceEnablement.DISABLED, ustEvents[0].getState());
+
+ assertEquals("*", ustEvents[1].getName());
+ assertEquals(getAllEventTraceLogLevel(), ustEvents[1].getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, ustEvents[1].getEventType());
+ assertEquals(TraceEnablement.ENABLED, ustEvents[1].getState());
+
+ // next session (no detailed information available)
+ session = fService.getSession("mysession1", new NullProgressMonitor());
+ assertNotNull(session);
+ assertEquals("mysession1", session.getName());
+ assertEquals("/home/user/lttng-traces/mysession1-20120203-133225", session.getSessionPath());
+ assertEquals(TraceSessionState.INACTIVE, session.getSessionState());
+
+ domains = session.getDomains();
+ assertNotNull(domains);
+ assertEquals(0, domains.length);
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ /**
+ * @return
+ */
+ protected TraceLogLevel getAllEventTraceLogLevel() {
+ return TraceLogLevel.LEVEL_UNKNOWN;
+ }
+
+ public void testGetKernelProvider() {
+ try {
+ fShell.setScenario(SCEN_GET_KERNEL_PROVIDER1);
+ List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
+
+ // Verify event info
+ assertNotNull(events);
+ assertEquals(3, events.size());
+
+ IBaseEventInfo baseEventInfo = events.get(0);
+ assertNotNull(baseEventInfo);
+ assertEquals("sched_kthread_stop", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = events.get(1);
+ assertEquals("sched_kthread_stop_ret", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = events.get(2);
+ assertEquals("sched_wakeup_new", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_EMERG, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetKernelProviderNoKernel1() {
+ try {
+ fShell.setScenario(SCEN_LIST_WITH_NO_KERNEL1);
+ List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
+
+ // Verify event info
+ assertNotNull(events);
+ assertEquals(0, events.size());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetKernelProviderNoKernel2() {
+ try {
+ fShell.setScenario(SCEN_LIST_WITH_NO_KERNEL2);
+ List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
+
+ // Verify event info
+ assertNotNull(events);
+ assertEquals(0, events.size());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetKernelProviderNoKernelVerbose() {
+ try {
+ enableVerbose();
+ fShell.setScenario(SCEN_LIST_WITH_NO_KERNEL_VERBOSE);
+ List<IBaseEventInfo> events = fService.getKernelProvider(new NullProgressMonitor());
+
+ // Verify event info
+ assertNotNull(events);
+ assertEquals(0, events.size());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ } finally {
+ disableVerbose();
+ }
+ }
+
+ @Test
+ public void testGetUstProvider() {
+ try {
+ fShell.setScenario(SCEN_GET_UST_PROVIDER1);
+ List<IUstProviderInfo> providers = fService.getUstProvider();
+
+ // Check all providers
+ assertNotNull(providers);
+ assertEquals(2, providers.size());
+
+ //Verify first provider
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(0).getName());
+ assertEquals(9379, providers.get(0).getPid());
+
+ // Verify event info
+ IBaseEventInfo[] events = providers.get(0).getEvents();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ IBaseEventInfo baseEventInfo = events[0];
+ assertNotNull(baseEventInfo);
+ assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = events[1];
+ assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_INFO, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ //Verify second provider
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(1).getName());
+ assertEquals(4852, providers.get(1).getPid());
+
+ // Verify event info
+ events = providers.get(1).getEvents();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ baseEventInfo = events[0];
+ assertNotNull(baseEventInfo);
+ assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_WARNING, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ baseEventInfo = events[1];
+ assertEquals("ust_tests_hello:tptest", baseEventInfo.getName());
+ assertEquals(TraceLogLevel.TRACE_DEBUG_FUNCTION, baseEventInfo.getLogLevel());
+ assertEquals(TraceEventType.TRACEPOINT, baseEventInfo.getEventType());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testUstProvider2() {
+ try {
+ fShell.setScenario(SCEN_GET_UST_PROVIDER2);
+ List<IUstProviderInfo> providers = fService.getUstProvider();
+
+ assertNotNull(providers);
+ assertEquals(0, providers.size());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetUstProvider3() {
+ try {
+ fShell.setScenario(SCEN_GET_UST_PROVIDER3);
+ // Set version
+ ((LTTngControlService)fService).setVersion("2.1.0");
+ List<IUstProviderInfo> providers = fService.getUstProvider();
+
+ // Check all providers
+ assertNotNull(providers);
+ assertEquals(2, providers.size());
+
+ //Verify first provider
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(0).getName());
+ assertEquals(9379, providers.get(0).getPid());
+
+ // Verify event info
+ IBaseEventInfo[] events = providers.get(0).getEvents();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ IBaseEventInfo baseEventInfo = events[0];
+ assertNotNull(baseEventInfo);
+ IFieldInfo[] fields = baseEventInfo.getFields();
+ assertNotNull(fields);
+ assertEquals(0, fields.length);
+
+ baseEventInfo = events[1];
+ fields = baseEventInfo.getFields();
+ assertNotNull(fields);
+ assertEquals(3, fields.length);
+ assertEquals("doublefield", fields[0].getName());
+ assertEquals("float", fields[0].getFieldType());
+
+ assertEquals("floatfield", fields[1].getName());
+ assertEquals("float", fields[1].getFieldType());
+
+ assertEquals("stringfield", fields[2].getName());
+ assertEquals("string", fields[2].getFieldType());
+
+ //Verify second provider
+ assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers.get(1).getName());
+ assertEquals(4852, providers.get(1).getPid());
+
+ // Verify event info
+ events = providers.get(1).getEvents();
+ assertNotNull(events);
+ assertEquals(2, events.length);
+
+ baseEventInfo = events[0];
+ assertNotNull(baseEventInfo);
+ fields = baseEventInfo.getFields();
+ assertNotNull(fields);
+ assertEquals(0, fields.length);
+
+ baseEventInfo = events[1];
+ fields = baseEventInfo.getFields();
+ assertNotNull(fields);
+ assertEquals(3, fields.length);
+
+ assertEquals("doublefield", fields[0].getName());
+ assertEquals("float", fields[0].getFieldType());
+
+ assertEquals("floatfield", fields[1].getName());
+ assertEquals("float", fields[1].getFieldType());
+
+ assertEquals("stringfield", fields[2].getName());
+ assertEquals("string", fields[2].getFieldType());
+
+ // Reset version
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+
+ @Test
+ public void testGetKernelProviderNoUst1() {
+ try {
+ fShell.setScenario(SCEN_LIST_WITH_NO_UST1);
+ List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
+
+ // Verify Provider info
+ assertNotNull(providerList);
+ assertEquals(0, providerList.size());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+
+ @Test
+ public void testGetKernelProviderNoUst2() {
+ try {
+ // Set version
+ ((LTTngControlService)fService).setVersion("2.1.0");
+
+ fShell.setScenario(SCEN_LIST_WITH_NO_UST2);
+ List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
+
+ // Verify Provider info
+ assertNotNull(providerList);
+ assertEquals(0, providerList.size());
+
+ // Reset version
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetKernelProviderNoUst3() {
+ try {
+
+ // Set version
+ ((LTTngControlService)fService).setVersion("2.1.0");
+
+ fShell.setScenario(SCEN_LIST_WITH_NO_UST3);
+ List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
+
+ // Verify provider info
+ assertNotNull(providerList);
+ assertEquals(0, providerList.size());
+
+ // Reset version
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testGetKernelProviderNoUstVerbose() {
+ try {
+ enableVerbose();
+
+ // Set version
+ ((LTTngControlService)fService).setVersion("2.1.0");
+
+ fShell.setScenario(SCEN_LIST_WITH_NO_UST_VERBOSE);
+ List<IUstProviderInfo> providerList = fService.getUstProvider(new NullProgressMonitor());
+
+ // Verify provider info
+ assertNotNull(providerList);
+ assertEquals(0, providerList.size());
+
+ // Reset version
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ } finally {
+ disableVerbose();
+ }
+ }
+
+
+
+ @Test
+ public void testCreateSession() {
+ try {
+ fShell.setScenario(SCEN_CREATE_SESSION1);
+
+ ISessionInfo info = fService.createSession(new SessionInfo("mysession2"), new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession2", info.getName());
+ assertNotNull(info.getSessionPath());
+ assertTrue(info.getSessionPath().contains("mysession2"));
+ assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateSessionWithPrompt() {
+ try {
+ // First line has the shell prompt before the command output
+ // This can happen in a real application if the command line is not echoed by the shell.
+ fShell.setScenario(SCEN_CREATE_SESSION_WITH_PROMPT);
+
+ // First line has no shell prompt before the output
+ ISessionInfo info = fService.createSession(new SessionInfo("mysession2"), new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession2", info.getName());
+ assertNotNull(info.getSessionPath());
+ assertTrue(info.getSessionPath().contains("mysession2"));
+ assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateSessionVariants() {
+
+ fShell.setScenario(SCEN_CREATE_SESSION_VARIANTS);
+
+ try {
+ fService.createSession(new SessionInfo("alreadyExist"), new NullProgressMonitor());
+ fail("No exeption thrown");
+ } catch (ExecutionException e) {
+ // success
+ }
+
+ try {
+ fService.createSession(new SessionInfo("wrongName"), new NullProgressMonitor());
+ fail("No exeption thrown");
+ } catch (ExecutionException e) {
+ // success
+ }
+
+ try {
+ ISessionInfo sessionInfo = new SessionInfo("withPath");
+ sessionInfo.setSessionPath("/home/user/hallo");
+ fService.createSession(sessionInfo, new NullProgressMonitor());
+ fail("No exeption thrown");
+ } catch (ExecutionException e) {
+ // success
+ }
+
+ try {
+ ISessionInfo info = fService.createSession(new SessionInfo("session with spaces"), new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("session with spaces", info.getName());
+ assertNotNull(info.getSessionPath());
+ assertTrue(info.getSessionPath().contains("session with spaces"));
+ assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+
+ try {
+ ISessionInfo sessionInfo = new SessionInfo("pathWithSpaces");
+ sessionInfo.setSessionPath("/home/user/hallo user/here");
+ ISessionInfo info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("pathWithSpaces", info.getName());
+ assertNotNull(info.getSessionPath());
+ assertTrue(info.getSessionPath().contains("/home/user/hallo user/here"));
+ assertEquals(TraceSessionState.INACTIVE, info.getSessionState());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testDestroySession() {
+ try {
+ fShell.setScenario(SCEN_DESTROY_SESSION1);
+ fService.destroySession("mysession2", new NullProgressMonitor());
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testDestroySessionVerbose() {
+ try {
+ enableVerbose();
+ fShell.setScenario(SCEN_DESTROY_SESSION_VERBOSE);
+ fService.destroySession("mysession2", new NullProgressMonitor());
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ } finally {
+ disableVerbose();
+ }
+ }
+
+ @Test
+ public void testCreateChannel() {
+ try {
+ ((LTTngControlService)fService).setVersion("2.2.0");
+ String sessionName = "mysession2";
+ List<String> list = new ArrayList<>();
+ String kernelChannel0 = "mychannel0";
+ String kernelChannel1 = "mychannel1";
+ list.add(kernelChannel0);
+ list.add(kernelChannel1);
+
+ fShell.setScenario(SCEN_CHANNEL_HANDLING);
+
+ // Create/enable/configure 2 kernel channels
+ ChannelInfo chanInfo = new ChannelInfo("");
+ chanInfo.setOverwriteMode(true);
+ chanInfo.setSubBufferSize(16384);
+ chanInfo.setReadTimer(100);
+ chanInfo.setSwitchTimer(200);
+ chanInfo.setNumberOfSubBuffers(2);
+ chanInfo.setMaxNumberTraceFiles(10);
+ chanInfo.setMaxSizeTraceFiles(0);
+ fService.enableChannels(sessionName, list, true, chanInfo, new NullProgressMonitor());
+
+ // Create/enable/configure 1 UST channel
+ list.clear();
+ list.add("ustChannel");
+
+ chanInfo = new ChannelInfo("");
+ chanInfo.setOverwriteMode(true);
+ chanInfo.setSubBufferSize(32768);
+ chanInfo.setReadTimer(200);
+ chanInfo.setSwitchTimer(100);
+ chanInfo.setNumberOfSubBuffers(1);
+ chanInfo.setMaxNumberTraceFiles(20);
+ chanInfo.setMaxSizeTraceFiles(0);
+ fService.enableChannels(sessionName, list, false, chanInfo, new NullProgressMonitor());
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateChannelUIDBuffer() {
+ try {
+ ((LTTngControlService)fService).setVersion("2.2.0");
+ String sessionName = "mysession2";
+ List<String> list = new ArrayList<>();
+ String USTChannel = "ustChannel";
+ list.add(USTChannel);
+ fShell.setScenario(SCEN_CHANNEL_HANDLING);
+
+ ChannelInfo chanInfo = new ChannelInfo("");
+ chanInfo.setOverwriteMode(true);
+ chanInfo.setSubBufferSize(32768);
+ chanInfo.setReadTimer(200);
+ chanInfo.setSwitchTimer(100);
+ chanInfo.setNumberOfSubBuffers(1);
+ chanInfo.setMaxNumberTraceFiles(20);
+ chanInfo.setMaxSizeTraceFiles(0);
+ chanInfo.setBufferType(BufferType.BUFFER_PER_UID);
+ fService.enableChannels(sessionName, list, false, chanInfo, new NullProgressMonitor());
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateChannelPIDBuffer() {
+ try {
+ ((LTTngControlService)fService).setVersion("2.2.0");
+ String sessionName = "mysession2";
+ List<String> list = new ArrayList<>();
+ String USTChannel = "ustChannel";
+ list.add(USTChannel);
+ fShell.setScenario(SCEN_CHANNEL_HANDLING);
+
+
+ ChannelInfo chanInfo = new ChannelInfo("");
+ chanInfo.setOverwriteMode(true);
+ chanInfo.setSubBufferSize(-1);
+ chanInfo.setReadTimer(-1);
+ chanInfo.setSwitchTimer(-1);
+ chanInfo.setNumberOfSubBuffers(-1);
+ chanInfo.setMaxNumberTraceFiles(-1);
+ chanInfo.setMaxSizeTraceFiles(-1);
+ chanInfo.setBufferType(BufferType.BUFFER_PER_PID);
+
+ fService.enableChannels(sessionName, list, false, chanInfo, new NullProgressMonitor());
+ ((LTTngControlService)fService).setVersion("2.0.0");
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testDisableChannel() {
+ try {
+
+ String sessionName = "mysession2";
+ List<String> list = new ArrayList<>();
+ String kernelChannel0 = "mychannel0";
+ String kernelChannel1 = "mychannel1";
+ list.add(kernelChannel0);
+ list.add(kernelChannel1);
+
+ fShell.setScenario(SCEN_CHANNEL_HANDLING);
+ fService.disableChannels(sessionName, list, true, new NullProgressMonitor());
+
+ list.clear();
+ list.add("ustChannel");
+ fService.disableChannels(sessionName, list, false, new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testEnableChannel() {
+ try {
+
+ String sessionName = "mysession2";
+ List<String> list = new ArrayList<>();
+ String kernelChannel0 = "mychannel0";
+ String kernelChannel1 = "mychannel1";
+ list.add(kernelChannel0);
+ list.add(kernelChannel1);
+
+ fShell.setScenario(SCEN_CHANNEL_HANDLING);
+ fService.enableChannels(sessionName, list, true, null, new NullProgressMonitor());
+
+ // Create/enable/configure 1 UST channel
+ list.clear();
+ list.add("ustChannel");
+
+ fService.enableChannels(sessionName, list, false, null, new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testEnableEvents() {
+ try {
+ // 1) session name, channel = null, 3 event names, kernel
+ String sessionName = "mysession2";
+ List<String> list = new ArrayList<>();
+ String eventName0 = "block_rq_remap";
+ String eventName1 = "block_bio_remap";
+ String eventName2 = "softirq_entry";
+ list.add(eventName0);
+ list.add(eventName1);
+ list.add(eventName2);
+ fShell.setScenario(SCEN_EVENT_HANDLING);
+ fService.enableEvents(sessionName, null, list, true, null, new NullProgressMonitor());
+
+ // 2) session name, channel=mychannel, event name= null, kernel
+ String channelName = "mychannel";
+ fService.enableEvents(sessionName, channelName, null, true, null, new NullProgressMonitor());
+
+ // 3) session name, channel=mychannel, 1 event name, ust, no filter
+ String ustEventName = "ust_tests_hello:tptest_sighandler";
+ list.clear();
+ list.add(ustEventName);
+ fService.enableEvents(sessionName, channelName, list, false, null, new NullProgressMonitor());
+
+ // 4) session name, channel = mychannel, no event name, ust, with filter
+ fService.enableEvents(sessionName, channelName, list, false, "intfield==10", new NullProgressMonitor());
+
+ // 5) session name, channel = mychannel, no event name, ust, no filter
+ list.clear();
+ fService.enableEvents(sessionName, channelName, list, false, null, new NullProgressMonitor());
+
+ // TODO add test with filters
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testEnableSyscalls() {
+ try {
+ // 1) session name, channel = null, 3 event names, kernel
+ String sessionName = "mysession2";
+ String channelName = "mychannel";
+
+ fShell.setScenario(SCEN_EVENT_HANDLING);
+
+ // 1) session name, channel = null
+ fService.enableSyscalls(sessionName, null, new NullProgressMonitor());
+
+ // 2) session name, channel = mychannel
+ fService.enableSyscalls(sessionName, channelName, new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testDynamicProbe() {
+ try {
+ // 1) session name, channel = null, 3 event names, kernel
+ String sessionName = "mysession2";
+ String channelName = "mychannel";
+ String eventName0 = "myevent0";
+ String eventName1 = "myevent1";
+ String functionProbe = "0xc0101340";
+ String dynProbe = "init_post";
+
+ fShell.setScenario(SCEN_EVENT_HANDLING);
+
+ // 1) session name, channel = null, event name, function probe, probe
+ fService.enableProbe(sessionName, null, eventName0, true, functionProbe, new NullProgressMonitor());
+
+ // 2) session name, channel = mychannel
+ fService.enableProbe(sessionName, channelName, eventName1, false, dynProbe, new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testEnableLogLevel() {
+ try {
+ // 1) session name, channel = null, 3 event names, kernel
+ String sessionName = "mysession2";
+ String channelName = "mychannel";
+ String eventName4 = "myevent4";
+ String eventName5 = "myevent5";
+
+ fShell.setScenario(SCEN_EVENT_HANDLING);
+
+ // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
+ fService.enableLogLevel(sessionName, null, eventName4, LogLevelType.LOGLEVEL_ONLY, TraceLogLevel.TRACE_DEBUG, null, new NullProgressMonitor());
+
+ // 2) session name, channel = mychannel, null, loglevel, TRACE_DEBUG_FUNCTION
+ fService.enableLogLevel(sessionName, channelName, eventName5, LogLevelType.LOGLEVEL, TraceLogLevel.TRACE_DEBUG_FUNCTION, null, new NullProgressMonitor());
+
+ // TODO add test with filters
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testAddContext() {
+ try {
+ // 1) session name, channel = null, 3 event names, kernel
+ String sessionName = "mysession2";
+ String channelName = "mychannel";
+ String eventName = "ust_tests_hello:tptest_sighandler";
+ List<String> contexts = new ArrayList<>();
+ contexts.add("prio");
+ contexts.add("pid");
+
+ fShell.setScenario(SCEN_CONTEXT_HANDLING);
+
+ List<String> availContexts = fService.getContextList(new NullProgressMonitor());
+ assertNotNull(availContexts);
+ assertEquals(12, availContexts.size());
+
+ // A very "hard-coded" way to verify but it works ...
+ Set<String> expectedContexts = new HashSet<>();
+ expectedContexts.add("pid");
+ expectedContexts.add("procname");
+ expectedContexts.add("prio");
+ expectedContexts.add("nice");
+ expectedContexts.add("vpid");
+ expectedContexts.add("tid");
+ expectedContexts.add("pthread_id");
+ expectedContexts.add("vtid");
+ expectedContexts.add("ppid");
+ expectedContexts.add("vppid");
+ expectedContexts.add("perf:cpu-cycles");
+ expectedContexts.add("perf:cycles");
+
+ assertTrue(expectedContexts.containsAll(availContexts));
+
+ // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
+ fService.addContexts(sessionName, channelName, eventName, false, contexts, new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testAddContextFailure() {
+
+ // 1) session name, channel = null, 3 event names, kernel
+ String sessionName = "mysession2";
+ String channelName = "mychannel";
+ String eventName = "ust_tests_hello:tptest_sighandler";
+ List<String> contexts = new ArrayList<>();
+ contexts.add("prio");
+ contexts.add("pid");
+ fShell.setScenario(SCEN_CONTEXT_ERROR_HANDLING);
+ try {
+ fService.getContextList(new NullProgressMonitor());
+ fail("No exeption generated");
+ } catch (ExecutionException e) {
+ // success
+ }
+ try {
+ // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
+ fService.addContexts(sessionName, channelName, eventName, false, contexts, new NullProgressMonitor());
+ fail("No exeption generated");
+ } catch (ExecutionException e) {
+ // success
+ }
+ }
+
+ @Test
+ public void testCalibrate() {
+ try {
+ fShell.setScenario(SCEN_CALIBRATE_HANDLING);
+ fService.calibrate(true, new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCalibrateFailure() {
+ try {
+ fShell.setScenario(SCEN_CALIBRATE_HANDLING);
+ fService.calibrate(false, new NullProgressMonitor());
+ fail("No exeption generated");
+ } catch (ExecutionException e) {
+ // success
+ }
+ }
+
+ @Test
+ public void testCreateSession2_1() {
+
+ try {
+ fShell.setScenario(SCEN_CREATE_SESSION_2_1);
+
+ ISessionInfo sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setNetworkUrl("net://172.0.0.1");
+ sessionInfo.setStreamedTrace(true);
+ ISessionInfo info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("net://172.0.0.1", info.getSessionPath());
+ assertTrue(info.isStreamedTrace());
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setStreamedTrace(true);
+ sessionInfo.setNetworkUrl("file:///tmp");
+ info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("file:///tmp", info.getSessionPath());
+ assertTrue(!info.isStreamedTrace());
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setStreamedTrace(true);
+ sessionInfo.setNetworkUrl("file:///tmp");
+ info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("file:///tmp", info.getSessionPath());
+ assertTrue(!info.isStreamedTrace());
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setStreamedTrace(true);
+ sessionInfo.setControlUrl("tcp://172.0.0.1");
+ sessionInfo.setDataUrl("tcp://172.0.0.1:5343");
+ info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("", info.getSessionPath()); // the complete network path is not available at this point
+ assertTrue(info.isStreamedTrace());
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setStreamedTrace(true);
+ sessionInfo.setNetworkUrl("net://172.0.0.1:1234:2345");
+ info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("net://172.0.0.1:1234:2345", info.getSessionPath());
+ assertTrue(info.isStreamedTrace());
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ // verbose
+ enableVerbose();
+ sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setStreamedTrace(true);
+ sessionInfo.setNetworkUrl("net://172.0.0.1");
+ info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("net://172.0.0.1", info.getSessionPath());
+ assertTrue(info.isStreamedTrace());
+ disableVerbose();
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateSessionVerbose2_1() {
+ try {
+ fShell.setScenario(SCEN_CREATE_SESSION_VERBOSE_2_1);
+
+ enableVerbose();
+ ISessionInfo sessionInfo = new SessionInfo("mysession");
+ sessionInfo.setStreamedTrace(true);
+ sessionInfo.setNetworkUrl("net://172.0.0.1");
+ ISessionInfo info = fService.createSession(sessionInfo, new NullProgressMonitor());
+ assertNotNull(info);
+ assertEquals("mysession", info.getName());
+ assertEquals("net://172.0.0.1", info.getSessionPath());
+ assertTrue(info.isStreamedTrace());
+ fService.destroySession("mysession", new NullProgressMonitor());
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ } finally {
+ disableVerbose();
+ }
+ }
+
+ @Test
+ public void testCreateSnapshotSession() {
+ try {
+ fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION);
+ ISessionInfo params = new SessionInfo("mysession");
+ params.setSnapshot(true);
+ ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
+ assertNotNull(sessionInfo);
+ assertEquals("mysession", sessionInfo.getName());
+ assertTrue(sessionInfo.isSnapshotSession());
+ assertEquals("", sessionInfo.getSessionPath());
+ assertTrue(!sessionInfo.isStreamedTrace());
+
+ assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
+
+ String[] names = fService.getSessionNames(new NullProgressMonitor());
+ assertEquals(names[0], "mysession");
+
+ ISnapshotInfo snapshotInfo = fService.getSnapshotInfo("mysession", new NullProgressMonitor());
+ assertNotNull(snapshotInfo);
+ assertEquals("snapshot-1", snapshotInfo.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20130913-141651", snapshotInfo.getSnapshotPath());
+ assertEquals(1, snapshotInfo.getId());
+ assertTrue(!snapshotInfo.isStreamedSnapshot());
+
+ // we need to set the snapshotInfo to so that the session path is set correctly
+ sessionInfo.setSnapshotInfo(snapshotInfo);
+ assertEquals("/home/user/lttng-traces/mysession-20130913-141651", sessionInfo.getSessionPath());
+
+ fService.recordSnapshot("mysession", new NullProgressMonitor());
+
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateSnapshotSession2_5() {
+ try {
+ fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION_2_5);
+ ISessionInfo params = new SessionInfo("mysession");
+ params.setSnapshot(true);
+ ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
+ assertNotNull(sessionInfo);
+ assertEquals("mysession", sessionInfo.getName());
+ assertTrue(sessionInfo.isSnapshotSession());
+ assertEquals("", sessionInfo.getSessionPath());
+ assertTrue(!sessionInfo.isStreamedTrace());
+
+ assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
+
+ String[] names = fService.getSessionNames(new NullProgressMonitor());
+ assertEquals(names[0], "mysession");
+
+ ISnapshotInfo snapshotInfo = fService.getSnapshotInfo("mysession", new NullProgressMonitor());
+ assertNotNull(snapshotInfo);
+ assertEquals("snapshot-1", snapshotInfo.getName());
+ assertEquals("/home/user/lttng-traces/mysession-20130913-141651", snapshotInfo.getSnapshotPath());
+ assertEquals(1, snapshotInfo.getId());
+ assertTrue(!snapshotInfo.isStreamedSnapshot());
+
+ // we need to set the snapshotInfo to so that the session path is set correctly
+ sessionInfo.setSnapshotInfo(snapshotInfo);
+ assertEquals("/home/user/lttng-traces/mysession-20130913-141651", sessionInfo.getSessionPath());
+
+ fService.recordSnapshot("mysession", new NullProgressMonitor());
+
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ public void testCreateStreamedSnapshotSession() {
+ try {
+ fShell.setScenario(SCEN_CREATE_STREAMED_SNAPSHOT_SESSION);
+
+ ISessionInfo params = new SessionInfo("mysession");
+ params.setNetworkUrl("net://172.0.0.1");
+ ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
+ assertNotNull(sessionInfo);
+ assertEquals("mysession", sessionInfo.getName());
+ assertTrue(sessionInfo.isSnapshotSession());
+
+ assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
+ assertTrue(sessionInfo.isStreamedTrace());
+
+ String[] names = fService.getSessionNames(new NullProgressMonitor());
+ assertEquals(names[0], "mysession");
+
+ ISnapshotInfo snapshotInfo = sessionInfo.getSnapshotInfo();
+ assertNotNull(sessionInfo);
+ assertEquals("snapshot-2", snapshotInfo.getName());
+ assertEquals("net4://172.0.0.1:5342/", snapshotInfo.getSnapshotPath());
+ assertEquals(2, snapshotInfo.getId());
+ assertTrue(snapshotInfo.isStreamedSnapshot());
+
+ // we need to set the snapshotInfo to so that the session path is set correctly
+ sessionInfo.setSnapshotInfo(snapshotInfo);
+ assertEquals("net4://172.0.0.1:5342/", sessionInfo.getSessionPath());
+
+ fService.recordSnapshot("mysession", new NullProgressMonitor());
+
+ fService.destroySession("mysession", new NullProgressMonitor());
+
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+ }
+
+ @Test
+ public void testCreateSnapshotSessionErrors() {
+ try {
+ fShell.setScenario(SCEN_CREATE_SNAPSHOT_SESSION_ERRORS);
+
+ String[] names = fService.getSessionNames(new NullProgressMonitor());
+ assertEquals(names[0], "mysession");
+ } catch (ExecutionException e) {
+ fail(e.toString());
+ }
+
+ try {
+ fService.getSnapshotInfo("blabla", new NullProgressMonitor());
+ fail("getSnapshoInfo() didn't fail");
+ } catch (ExecutionException e) {
+ // successful
+ }
+
+ try {
+ fService.recordSnapshot("blabla", new NullProgressMonitor());
+ fail("getSnapshoInfo() didn't fail");
+ } catch (ExecutionException e) {
+ // successful
+ }
+
+ try {
+ fService.recordSnapshot("mysession", new NullProgressMonitor());
+ fail("getSnapshoInfo() didn't fail");
+ } catch (ExecutionException e) {
+ // successful
+ }
+ }
+
+ @Test
+ public void testCreateLiveSession() throws ExecutionException {
+ fShell.setScenario(SCEN_CREATE_LIVE_SESSION);
+
+ ISessionInfo params = new SessionInfo("mysession");
+ params.setLive(true);
+ params.setStreamedTrace(true);
+ params.setNetworkUrl("net://127.0.0.1");
+ ISessionInfo sessionInfo = fService.createSession(params, new NullProgressMonitor());
+ assertNotNull(sessionInfo);
+ assertEquals("mysession", sessionInfo.getName());
+ assertEquals(TraceSessionState.INACTIVE, sessionInfo.getSessionState());
+ assertTrue(sessionInfo.isStreamedTrace());
+ assertTrue(sessionInfo.isLive());
+ assertEquals("net://127.0.0.1", sessionInfo.getSessionPath());
+ String[] names = fService.getSessionNames(new NullProgressMonitor());
+ assertEquals(names[0], "mysession");
+ fService.destroySession("mysession", new NullProgressMonitor());
+ }
+
+ @Test
+ public void testCreateLiveSessionErrors() {
+ try {
+ fShell.setScenario(SCEN_CREATE_LIVE_SESSION_ERRORS);
+
+ ISessionInfo parameters = new SessionInfo("mysession");
+ parameters.setLive(true);
+ parameters.setSnapshot(true);
+ fService.createSession(parameters, new NullProgressMonitor());
+ fail("createSession() didn't fail");
+ } catch (ExecutionException e) {
+ // successful
+ }
+
+ try {
+ ISessionInfo parameters = new SessionInfo("mysession");
+ parameters.setNetworkUrl("blah");
+ parameters.setLive(true);
+ fService.createSession(parameters, new NullProgressMonitor());
+ fail("createSession() didn't fail");
+ } catch (ExecutionException e) {
+ // successful
+ }
+
+ try {
+ ISessionInfo parameters = new SessionInfo("mysession");
+ parameters.setControlUrl("net://127.0.0.1");
+ parameters.setLive(true);
+ fService.createSession(parameters, new NullProgressMonitor());
+ fail("createSession() didn't fail");
+ } catch (ExecutionException e) {
+ // successful
+ }
+ }
+
+ private static void enableVerbose() {
+ // verbose
+ ControlCommandLogger.init(ControlPreferences.getInstance().getLogfilePath(), false);
+ ControlPreferences.getInstance().getPreferenceStore().setDefault(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, true);
+ ControlPreferences.getInstance().getPreferenceStore().setDefault(ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_PREF, ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE);
+ }
+
+ private static void disableVerbose() {
+ ControlPreferences.getInstance().getPreferenceStore().setDefault(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, false);
+ }
+
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IAddContextDialog;
+
+/**
+ * Add Context dialog stub.
+ */
+@SuppressWarnings("javadoc")
+public class AddContextDialogStub implements IAddContextDialog {
+
+ private Set<String> fAvailableContexts = null;
+ private List<String> fContexts = null;
+
+ @Override
+ public int open() {
+ return 0;
+ }
+
+ @Override
+ public void setAvalibleContexts(List<String> contexts) {
+ fAvailableContexts = new HashSet<>();
+ fAvailableContexts.addAll(contexts);
+ }
+
+ @Override
+ public List<String> getContexts() {
+ List<String> ret = new ArrayList<>();
+ ret.addAll(fContexts);
+ return ret;
+ }
+
+ public void setContexts(List<String> contexts) throws IllegalArgumentException{
+ fContexts = new ArrayList<>();
+ fContexts.addAll(contexts);
+ // If availableContexts are null we cannot verify
+ if (fAvailableContexts != null) {
+ for (Iterator<String> iterator = fContexts.iterator(); iterator.hasNext();) {
+ String string = iterator.next();
+ if (!fAvailableContexts.contains(string)) {
+ throw new IllegalArgumentException();
+ }
+ }
+ }
+ }
+}
+
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ICreateSessionDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+
+/**
+ * Create session dialog stub implementation.
+ */
+@SuppressWarnings("javadoc")
+public class CreateSessionDialogStub implements ICreateSessionDialog {
+
+ public String fName = "mysession";
+ public String fPath = null;
+ private boolean fIsStreamedTrace = false;
+ private String fNetworkUrl = null;
+ private String fControlUrl = null;
+ private String fDataUrl = null;
+ private boolean fIsSnapshot;
+ private boolean fIsLive = false;
+ private int fLiveDelay = 0;
+
+ @Override
+ public void initialize(TraceSessionGroup group) {
+ }
+
+ @Override
+ public int open() {
+ return 0;
+ }
+
+ public void setSessionPath(String path) {
+ fPath = path;
+ }
+
+ public void setSessionName(String name) {
+ fName = name;
+ }
+
+ public void setStreamedTrace(boolean isStreamedTrace) {
+ fIsStreamedTrace = isStreamedTrace;
+ }
+
+ public void setNetworkUrl(String fNetworkUrl) {
+ this.fNetworkUrl = fNetworkUrl;
+ }
+
+ public void setControlUrl(String fControlUrl) {
+ this.fControlUrl = fControlUrl;
+ }
+
+ public void setDataUrl(String fDataUrl) {
+ this.fDataUrl = fDataUrl;
+ }
+
+ public void setSnapshot(boolean isSnapshot) {
+ fIsSnapshot = isSnapshot;
+ }
+
+ public void setLive(boolean isLive) {
+ fIsLive = isLive;
+ }
+
+ public void setLiveDelay(int liveDelay) {
+ fLiveDelay = liveDelay;
+ }
+
+ @Override
+ public ISessionInfo getParameters() {
+ ISessionInfo sessionInfo = new SessionInfo(fName);
+
+ if (fIsStreamedTrace) {
+ sessionInfo.setNetworkUrl(fNetworkUrl);
+ sessionInfo.setControlUrl(fControlUrl);
+ sessionInfo.setDataUrl(fDataUrl);
+ sessionInfo.setStreamedTrace(true);
+ } else if (fPath != null) {
+ sessionInfo.setSessionPath(fPath);
+ }
+
+ sessionInfo.setLive(fIsLive);
+ sessionInfo.setLiveDelay(fLiveDelay);
+ sessionInfo.setSnapshot(fIsSnapshot);
+
+ return sessionInfo;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IConfirmDialog;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * A confirmation dialog stub implementation.
+ */
+public class DestroyConfirmDialogStub implements IConfirmDialog {
+
+ @Override
+ public boolean openConfirm(Shell parent, String title, String message) {
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableChannelDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+
+/**
+ * Create channel dialog stub implementation.
+ */
+@SuppressWarnings("javadoc")
+public class EnableChannelDialogStub implements IEnableChannelDialog {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private TraceDomainComponent fDomain;
+ private ChannelInfo fChannelInfo;
+ private boolean fIsKernel;
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+ public EnableChannelDialogStub() {
+ fChannelInfo = new ChannelInfo("mychannel");
+ fChannelInfo.setNumberOfSubBuffers(4);
+ fChannelInfo.setOverwriteMode(true);
+ fChannelInfo.setReadTimer(200);
+ fChannelInfo.setSwitchTimer(100);
+ fChannelInfo.setSubBufferSize(16384);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ public void setIsKernel(boolean isKernel) {
+ fIsKernel = isKernel;
+ }
+
+ @Override
+ public IChannelInfo getChannelInfo() {
+ return fChannelInfo;
+ }
+
+ @Override
+ public void setDomainComponent(TraceDomainComponent domain) {
+ fDomain = domain;
+ if (fDomain != null) {
+ fIsKernel = fDomain.isKernel();
+ }
+ }
+
+ @Override
+ public int open() {
+ return 0;
+ }
+
+ @Override
+ public boolean isKernel() {
+ return fIsKernel;
+ }
+
+ @Override
+ public void setHasKernel(boolean hasKernel) {
+ // Do nothing
+ }
+
+ public void setChannelInfo(ChannelInfo info) {
+ fChannelInfo = info;
+ }
+
+ @Override
+ public void setTargetNodeComponent(TargetNodeComponent node) {
+ // Do nothing
+ }
+
+ public void setBufferType (BufferType bufferType) {
+ fChannelInfo.setBufferType(bufferType);
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableEventsDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+
+/**
+ * Enable events dialog stub implementation.
+ */
+@SuppressWarnings("javadoc")
+public class EnableEventsDialogStub implements IEnableEventsDialog {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private boolean fIsKernel;
+ private boolean fIsTracePoints;
+ private boolean fIsAllTracePoints;
+ private boolean fIsSysCalls;
+ private boolean fIsDynamicProbe;
+ private String fProbeEventName;
+ private String fDynamicProbe;
+ private boolean fIsFunctionProbe;
+ private String fFunctionEventName;
+ private String fFunctionProbe;
+ private boolean fIsWildcard;
+ private String fWildcard;
+ private boolean fIsLogLevel;
+ private String fLogLevelEventName;
+ private TraceLogLevel fLogLevel;
+ private LogLevelType fLogLevelType;
+ private String fFilter;
+ private List<String> fNames = new ArrayList<>();
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ public void setIsKernel(boolean isKernel) {
+ fIsKernel = isKernel;
+ }
+
+ public void setIsTracePoints(boolean isTracePoints) {
+ fIsTracePoints = isTracePoints;
+ }
+
+ public void setIsAllTracePoints(boolean isAllTracePoints) {
+ fIsAllTracePoints = isAllTracePoints;
+ }
+
+ public void setIsSysCalls(boolean isSysCalls) {
+ this.fIsSysCalls = isSysCalls;
+ }
+
+ public void setIsDynamicProbe(boolean isDynamicProbe) {
+ fIsDynamicProbe = isDynamicProbe;
+ }
+
+ public void setProbeEventName(String probeEventName) {
+ fProbeEventName = probeEventName;
+ }
+
+ public void setDynamicProbe(String dynamicProbe) {
+ fDynamicProbe = dynamicProbe;
+ }
+
+ public void setIsFunctionProbe(boolean isFunctionProbe) {
+ fIsFunctionProbe = isFunctionProbe;
+ }
+
+ public void setFunctionEventName(String functionEventName) {
+ fFunctionEventName = functionEventName;
+ }
+
+ public void setFunctionProbe(String functionProbe) {
+ fFunctionProbe = functionProbe;
+ }
+
+ public void setIsWildcard(boolean isWildcard) {
+ fIsWildcard = isWildcard;
+ }
+
+ public void setWildcard(String wildcard) {
+ fWildcard = wildcard;
+ }
+
+ public void setIsLogLevel(boolean isLogLevel) {
+ fIsLogLevel = isLogLevel;
+ }
+
+ public void setLogLevelEventName(String logLevelEventName) {
+ fLogLevelEventName = logLevelEventName;
+ }
+
+ public void setLogLevel(TraceLogLevel logLevel) {
+ fLogLevel = logLevel;
+ }
+
+ public void setLogLevelType(LogLevelType logLevelType) {
+ fLogLevelType = logLevelType;
+ }
+
+ public void setNames(List<String> names) {
+ fNames = names;
+ }
+
+ public void setFilterExpression(String filter) {
+ fFilter = filter;
+ }
+
+ @Override
+ public boolean isTracepoints() {
+ return fIsTracePoints;
+ }
+
+ @Override
+ public boolean isAllTracePoints() {
+ return fIsAllTracePoints;
+ }
+
+ @Override
+ public boolean isSysCalls() {
+ return fIsSysCalls;
+ }
+
+ @Override
+ public boolean isAllSysCalls() {
+ return fIsSysCalls;
+ }
+
+ @Override
+ public List<String> getEventNames() {
+ return fNames;
+ }
+
+ @Override
+ public boolean isDynamicProbe() {
+ return fIsDynamicProbe;
+ }
+
+ @Override
+ public String getProbeEventName() {
+ return fProbeEventName;
+ }
+
+ @Override
+ public String getProbeName() {
+ return fDynamicProbe;
+ }
+
+ @Override
+ public boolean isDynamicFunctionProbe() {
+ return fIsFunctionProbe;
+ }
+
+ @Override
+ public String getFunctionEventName() {
+ return fFunctionEventName;
+ }
+
+ @Override
+ public String getFunction() {
+ return fFunctionProbe;
+ }
+
+ @Override
+ public boolean isWildcard() {
+ return fIsWildcard;
+ }
+
+ @Override
+ public String getWildcard() {
+ return fWildcard;
+ }
+
+ @Override
+ public boolean isLogLevel() {
+ return fIsLogLevel;
+ }
+
+ @Override
+ public LogLevelType getLogLevelType() {
+ return fLogLevelType;
+ }
+
+ @Override
+ public TraceLogLevel getLogLevel() {
+ return fLogLevel;
+ }
+
+ @Override
+ public String getLogLevelEventName() {
+ return fLogLevelEventName;
+ }
+
+ @Override
+ public boolean isKernel() {
+ return fIsKernel;
+ }
+
+ @Override
+ public void setTraceProviderGroup(TraceProviderGroup providerGroup) {
+ }
+
+ @Override
+ public void setTraceDomainComponent(TraceDomainComponent domain) {
+ }
+
+ @Override
+ public int open() {
+ return 0;
+ }
+
+ @Override
+ public String getFilterExpression() {
+ return fFilter;
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.dialogs;
+
+import java.util.Arrays;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IGetEventInfoDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * Get event information dialog stub implementation.
+ */
+public class GetEventInfoDialogStub implements IGetEventInfoDialog {
+
+ private TraceSessionComponent[] fSessions;
+ private String fFilterExpression;
+
+ @Override
+ public TraceSessionComponent getSession() {
+ return fSessions[0];
+ }
+
+ @Override
+ public TraceChannelComponent getChannel() {
+ return null;
+ }
+
+ @Override
+ public void setIsKernel(boolean isKernel) {
+ }
+
+ @Override
+ public void setSessions(TraceSessionComponent[] sessions) {
+ if (sessions != null) {
+ fSessions = Arrays.copyOf(sessions, sessions.length);
+ return;
+ }
+ fSessions = null;
+ }
+
+ @Override
+ public String getFilterExpression() {
+ return fFilterExpression;
+ }
+
+ @Override
+ public int open() {
+ return 0;
+ }
+
+ /**
+ * @param filter the filter to set
+ */
+ public void setFilterExpression(String filter) {
+ fFilterExpression = filter;
+ }
+}
+
--- /dev/null
+/**********************************************************************
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.service;
+
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.shells.LTTngToolsFileShell;
+
+@SuppressWarnings("javadoc")
+public class CommandShellFactory {
+
+ public static final int GET_SESSION_NAMES_COMMAND_SHELL = 0;
+
+ private static CommandShellFactory fInstance = null;
+
+ public static CommandShellFactory getInstance() {
+ if (fInstance == null) {
+ fInstance = new CommandShellFactory();
+ }
+ return fInstance;
+ }
+
+// public ICommandShell getRealShell() {
+// ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+// IHost host = registry.getLocalHost();
+// RemoteSystemProxy proxy = new RemoteSystemProxy(host);
+// ICommandShell shell = new LTTngToolsSimulatorShell(proxy);
+// return shell;
+// }
+
+ public LTTngToolsFileShell getFileShell() {
+ return new LTTngToolsFileShell();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.service;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.internal.lttng2.control.stubs.shells.LTTngToolsFileShell;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
+import org.eclipse.rse.core.model.IRSECallback;
+import org.eclipse.rse.core.subsystems.ICommunicationsListener;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.shells.IShellService;
+import org.eclipse.rse.services.terminals.ITerminalService;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+
+@SuppressWarnings("javadoc")
+public class TestRemoteSystemProxy implements IRemoteSystemProxy {
+
+ private LTTngToolsFileShell fShell = null;
+ private String fTestFile = null;
+ private String fScenario = null;
+
+ @Override
+ public IShellService getShellService() {
+ return null;
+ }
+
+ @Override
+ public ITerminalService getTerminalService() {
+ return null;
+ }
+
+ @Override
+ public ISubSystem getShellServiceSubSystem() {
+ return null;
+ }
+
+ @Override
+ public ISubSystem getTerminalServiceSubSystem() {
+ return null;
+ }
+ @Override
+ public IFileServiceSubSystem getFileServiceSubSystem() {
+ return null;
+ }
+
+ @Override
+ public void connect(IRSECallback callback) throws ExecutionException {
+// System.out.println("in done: proxy connect ");
+ if (callback != null) {
+ callback.done(Status.OK_STATUS, null);
+ }
+ }
+
+ @Override
+ public void disconnect() throws ExecutionException {
+ fShell = null;
+ }
+
+ @Override
+ public ICommandShell createCommandShell() throws ExecutionException {
+ if (fShell == null) {
+ fShell = CommandShellFactory.getInstance().getFileShell();
+ if ((fTestFile != null) && (fScenario != null)) {
+ try {
+ fShell.loadScenarioFile(fTestFile);
+ } catch (Exception e) {
+ throw new ExecutionException(e.toString());
+ }
+ fShell.setScenario(fScenario);
+ }
+ }
+ return fShell;
+ }
+
+ @Override
+ public void addCommunicationListener(ICommunicationsListener listener) {
+ }
+
+ @Override
+ public void removeCommunicationListener(ICommunicationsListener listener) {
+ }
+
+ public void setTestFile(String testFile) {
+ fTestFile = testFile;
+ }
+
+ public void setScenario(String scenario) {
+ fScenario = scenario;
+ if (fShell != null) {
+ fShell.setScenario(fScenario);
+ }
+ }
+
+ @Override
+ public int getPort() {
+ return IRemoteSystemProxy.INVALID_PORT_NUMBER;
+ }
+
+ @Override
+ public void setPort(int port) {
+ }
+
+ @Override
+ public boolean isLocal() {
+ return false;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;
+
+import java.io.BufferedReader;
+import java.io.DataInputStream;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.CommandResult;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
+
+@SuppressWarnings("javadoc")
+public class LTTngToolsFileShell extends TestCommandShell {
+
+ // ------------------------------------------------------------------------
+ // CONSTANTS
+ // ------------------------------------------------------------------------
+ private final static String SCENARIO_KEY = "<SCENARIO>";
+ private final static String SCENARIO_END_KEY = "</SCENARIO>";
+ private final static String INPUT_KEY = "<COMMAND_INPUT>";
+ private final static String INPUT_END_KEY = "</COMMAND_INPUT>";
+ private final static String RESULT_KEY = "<COMMAND_RESULT>";
+ private final static String OUTPUT_KEY = "<COMMAND_OUTPUT>";
+ private final static String OUTPUT_END_KEY = "</COMMAND_OUTPUT>";
+ private final static String ERROR_OUTPUT_KEY = "<COMMAND_ERROR_OUTPUT>";
+ private final static String ERROR_OUTPUT_END_KEY = "</COMMAND_ERROR_OUTPUT>";
+ private final static String COMMENT_KEY = "#.*";
+
+ private final static Pattern LTTNG_LIST_SESSION_PATTERN = Pattern.compile("lttng\\s+list\\s+(.+)");
+ private final static String LTTNG_LIST_PROVIDER_PATTERN = "lttng\\s+list\\s+(-u|-k)";
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private String fScenariofile;
+ private String fScenario;
+
+ private final Map<String, Map<String, ICommandResult>> fScenarioMap = new HashMap<>();
+ private final Map<String, Integer> fSessionNameMap = new HashMap<>();
+
+ /**
+ * Parse a scenario file with the format:
+ * <pre>
+ * <SCENARIO>
+ * ScenarioName
+ *
+ * <COMMAND_INPUT>
+ * Command
+ * </COMAND_INPUT>
+ *
+ * <COMMAND_RESULT>
+ * CommandResult
+ * </COMMAND_RESULT>
+ *
+ * <COMMAND_OUTPUT>
+ * CommandOutput
+ * <COMMAND_ERROR_OUTPUT>
+ * CommandErrorOutput
+ * </COMMAND_ERROR_OUTPUT>
+ * </COMMAND_OUTPUT>
+ *
+ * </SCENARIO>
+ *
+ * Where: ScenarioName - is the scenario name
+ * Command - the command line string
+ * CommandResult - the result integer of the command (0 for success, 1 for failure)
+ * ComandOutput - the command output string (multi-line possible)
+ * ComandErrorOutput - the command error output string (multi-line possible)
+ *
+ * Note: 1) There can be many scenarios per file
+ * 2) There can be many (Command-CommandResult-CommandOutput) triples per scenario
+ * 3) Lines starting with # will be ignored (comments)
+ * <pre>
+ * @param scenariofile - path to scenario file
+ * @throws Exception
+ */
+ public synchronized void loadScenarioFile(String scenariofile) throws Exception {
+ fScenariofile = scenariofile;
+
+ // clean up map
+ Collection<Map<String, ICommandResult>> values = fScenarioMap.values();
+ for (Iterator<Map<String, ICommandResult>> iterator = values.iterator(); iterator.hasNext();) {
+ Map<String, ICommandResult> map = iterator.next();
+ map.clear();
+ }
+ fScenarioMap.clear();
+
+ // load from file
+
+ // Open the file
+ try (FileInputStream fstream = new FileInputStream(fScenariofile);
+ DataInputStream in = new DataInputStream(fstream);
+ BufferedReader br = new BufferedReader(new InputStreamReader(in));) {
+ String strLine;
+
+ // Read File Line by Line
+
+ // Temporary map for generating instance numbers for lttng list
+ // <session> commands.
+ // The numbers are per scenario.
+ Map<String, Integer> tmpSessionNameMap = new HashMap<>();
+ while ((strLine = br.readLine()) != null) {
+
+ // Ignore comments
+ if (isComment(strLine)) {
+ continue;
+ }
+
+ if (SCENARIO_KEY.equals(strLine)) {
+ // scenario start
+
+ // Ignore comments
+ strLine = br.readLine();
+ while (isComment(strLine)) {
+ strLine = br.readLine();
+ }
+
+ String scenario = strLine;
+ Map<String, ICommandResult> commandMap = new HashMap<>();
+ fScenarioMap.put(scenario, commandMap);
+ List<String> output = null;
+ List<String> errorOutput = null;
+ String input = null;
+ boolean inOutput = false;
+ boolean inErrorOutput = false;
+ int result = 0;
+ tmpSessionNameMap.clear();
+ while ((strLine = br.readLine()) != null) {
+ // Ignore comments
+ if (isComment(strLine)) {
+ continue;
+ }
+
+ if (SCENARIO_END_KEY.equals(strLine)) {
+ // Scenario is finished
+ break;
+ }
+ if (INPUT_KEY.equals(strLine)) {
+ strLine = br.readLine();
+ // Ignore comments
+ while (isComment(strLine)) {
+ strLine = br.readLine();
+ }
+ // Read command
+ input = strLine;
+
+ // Handle instances of 'lttng list
+ // <session"-comamand
+ Matcher matcher = LTTNG_LIST_SESSION_PATTERN.matcher(strLine);
+ if (matcher.matches() && !input.matches(LTTNG_LIST_PROVIDER_PATTERN)) {
+ String sessionName = matcher.group(1).trim();
+ Integer i = tmpSessionNameMap.get(sessionName);
+ if (i != null) {
+ i++;
+ } else {
+ i = 0;
+ }
+ tmpSessionNameMap.put(sessionName, i);
+ input += String.valueOf(i);
+ }
+ } else if (INPUT_END_KEY.equals(strLine)) {
+ // Initialize output array
+ output = new ArrayList<>();
+ errorOutput = new ArrayList<>();
+ } else if (RESULT_KEY.equals(strLine)) {
+ strLine = br.readLine();
+ // Ignore comments
+ while (isComment(strLine)) {
+ strLine = br.readLine();
+ }
+ // Save result value
+ result = Integer.parseInt(strLine);
+ } else if (OUTPUT_END_KEY.equals(strLine)) {
+ // Save output/result in command map
+ if (output != null && errorOutput != null) {
+ commandMap.put(input, new CommandResult(result, output.toArray(new String[output.size()]), errorOutput.toArray(new String[errorOutput.size()])));
+ }
+ inOutput = false;
+ } else if (OUTPUT_KEY.equals(strLine)) {
+ // first line of output
+ inOutput = true;
+ } else if (ERROR_OUTPUT_KEY.equals(strLine)) {
+ // first line of output
+ inErrorOutput = true;
+ } else if (ERROR_OUTPUT_END_KEY.equals(strLine)) {
+ inErrorOutput = false;
+ } else if (inOutput) {
+ while (isComment(strLine)) {
+ strLine = br.readLine();
+ }
+ // lines of output/error output
+ if (errorOutput != null && inErrorOutput) {
+ errorOutput.add(strLine);
+ } else if (output != null) {
+ output.add(strLine);
+ }
+ }
+ // else {
+ // if (RESULT_END_KEY.equals(strLine)) {
+ // nothing to do
+ // }
+ }
+ }
+ }
+ }
+ }
+
+ // Set the scenario to consider in executeCommand()
+ public synchronized void setScenario(String scenario) {
+ fScenario = scenario;
+ fSessionNameMap.clear();
+ if (!fScenarioMap.containsKey(fScenario)) {
+ throw new IllegalArgumentException();
+ }
+ }
+
+ @Override
+ public synchronized ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
+ Map<String, ICommandResult> commands = fScenarioMap.get(fScenario);
+ String fullCommand = command;
+
+ Matcher matcher = LTTNG_LIST_SESSION_PATTERN.matcher(command);
+ if (matcher.matches() && !command.matches(LTTNG_LIST_PROVIDER_PATTERN)) {
+ String sessionName = matcher.group(1).trim();
+ Integer i = fSessionNameMap.get(sessionName);
+ if (i != null) {
+ i++;
+ } else {
+ i = 0;
+ }
+ fSessionNameMap.put(sessionName, i);
+ fullCommand += String.valueOf(i);
+ }
+
+ if (commands.containsKey(fullCommand)) {
+ return commands.get(fullCommand);
+ }
+
+ String[] output = new String[1];
+ output[0] = String.valueOf("Command not found");
+ CommandResult result = new CommandResult(0, null, null);
+ // For verification of setters of class CommandResult
+ result.setOutput(output);
+ result.setErrorOutput(output);
+ result.setResult(1);
+ return result;
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+
+ private static boolean isComment(String line) {
+ if (line == null) {
+ throw new RuntimeException("line is null");
+ }
+ return line.matches(COMMENT_KEY);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.stubs.shells;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.CommandResult;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
+
+/**
+ * Command shell stub
+ */
+public class TestCommandShell implements ICommandShell {
+
+ /** If the shell is connected */
+ protected boolean fIsConnected = false;
+
+ @Override
+ public void connect() throws ExecutionException {
+ fIsConnected = true;
+ }
+
+ @Override
+ public void disconnect() {
+ fIsConnected = false;
+ }
+
+ @Override
+ public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
+ return executeCommand(command, monitor, true);
+ }
+
+ @Override
+ public ICommandResult executeCommand(String command, IProgressMonitor monitor, boolean checkReturnValue) throws ExecutionException {
+ if (fIsConnected) {
+
+ }
+ return new CommandResult(0, new String[0], new String[0]);
+ }
+}
--- /dev/null
+####################################################################
+# 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:
+# Bernd Hufmann - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Initialize
+####################################################################
+<SCENARIO>
+Initialize
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Currently no available tracing session
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> with LTTng 2.1 options
+####################################################################
+##################################################################
+<SCENARIO>
+CreateSessionFileProto
+<COMMAND_INPUT>
+lttng create mysession -U file:///tmp
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in file:///tmp
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: file:///tmp
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+##################################################################
+<SCENARIO>
+CreateSessionControlData
+<COMMAND_INPUT>
+lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Control URL tcp://172.0.0.1 set for session mysession
+Data URL tcp://172.0.0.1:5343 set for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: tcp://172.0.0.1:5342 [data: 5343]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+##################################################################
+<SCENARIO>
+CreateSessionNetwork
+<COMMAND_INPUT>
+lttng create mysession -U net://172.0.0.1:1234:2345
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in net://172.0.0.1:1234:2345
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: net://172.0.0.1:1234 [data: 2345]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession2 destroyed.
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+##################################################################
+<SCENARIO>
+CreateSessionNetwork2
+<COMMAND_INPUT>
+lttng create mysession -U net6://[ffff::eeee:dddd:cccc:0]
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in net6://[ffff::eeee:dddd:cccc:0]
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: net://[ffff::eeee:dddd:cccc:0]:5342/mysession-20130221-144451 [data: 5343]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession2 destroyed.
+</COMMAND_OUTPUT>
+
+</SCENARIO>
\ No newline at end of file
--- /dev/null
+####################################################################
+# Copyright (c) 2013 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:
+# Bernd Hufmann - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Initialize
+####################################################################
+<SCENARIO>
+Initialize
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.3.0 - Dominus Vobiscum
+
+A very succulent line-up of beers brewed at Microbrasserie Charlevoix. Elaborated starting from special malts and fermented with a Belgian yeast. These beers are refermented in bottle and will make you discover the richness of wheat, amber and triple styles.
+
+Web site: http://lttng.org
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Currently no available tracing session
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot" LTTng 2.3
+####################################################################
+<SCENARIO>
+ScenCreateSession
+<COMMAND_INPUT>
+lttng create mysession --snapshot
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
+Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive snapshot]
+ Trace path:
+
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot list-output -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Snapshot output list for session mysession
+ [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng start mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing started for session mysession.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ Snapshot recorded successfully for session mysession
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng stop mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing stopped for session mysession.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
--- /dev/null
+####################################################################
+# Copyright (c) 2014 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:
+# Jonathan Rajotte - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Initialize
+####################################################################
+<SCENARIO>
+Initialize
+<COMMAND_INPUT>
+lttng --mi xml version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>version</name>
+ <output>
+ <version>
+ <string>2.6.0</string>
+ <major>2</major>
+ <minor>6</minor>
+ <commit></commit>
+ <patchLevel>0</patchLevel>
+ <name>TestMI</name>
+ <description>Lorem ipsum</description>
+ <url>http://lttng.org</url>
+ <license>lttng is free software and under the GPL license and part LGPL</license>
+ </version>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions/>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <domains>
+ <domain>
+ <type>KERNEL</type>
+ <buffer_type>PER_PID</buffer_type>
+ <events>
+ <event>
+ <name>sched_kthread_stop</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ <event>
+ <name>sched_kthread_stop_ret</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ <event>
+ <name>sched_wakeup_new</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ </events>
+ </domain>
+ </domains>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <domains>
+ <domain>
+ <type>UST</type>
+ <buffer_type>PER_PID</buffer_type>
+ <pids>
+ <pid>
+ <id>9379</id>
+ <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_MODULE</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields/>
+ </event>
+ <event>
+ <name>ust_tests_hello:tptest</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_INFO</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields>
+ <event_field>
+ <name>doublefield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>floatfield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>stringfield</name>
+ <type>STRING</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ </event_fields>
+ </event>
+ </events>
+ </pid>
+ <pid>
+ <id>4852</id>
+ <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_WARNING</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields/>
+ </event>
+ <event>
+ <name>ust_tests_hello:tptest</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields>
+ <event_field>
+ <name>doublefield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>floatfield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>stringfield</name>
+ <type>STRING</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ </event_fields>
+ </event>
+ </events>
+ </pid>
+ </pids>
+ </domain>
+ </domains>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> with LTTng 2.1 options
+####################################################################
+##################################################################
+<SCENARIO>
+CreateSessionFileProto
+<COMMAND_INPUT>
+lttng --mi xml create mysession -U file:///tmp
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>/tmp</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/tmp</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ <domains/>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/tmp</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+##################################################################
+<SCENARIO>
+CreateSessionControlData
+<COMMAND_INPUT>
+lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ <domains/>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+##################################################################
+<SCENARIO>
+CreateSessionNetwork
+<COMMAND_INPUT>
+lttng --mi xml create mysession -U net://172.0.0.1:1234:2345
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ <domains/>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:1234/mysession-20140820-153527 [data: 2345]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+##################################################################
+<SCENARIO>
+CreateSessionNetwork2
+<COMMAND_INPUT>
+lttng --mi xml create mysession -U net6://[ffff::eeee:dddd:cccc:0]
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ <domains/>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp6://[ffff::eeee:dddd:cccc:0]:5342/mysession-20140820-153801 [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+</SCENARIO>
\ No newline at end of file
--- /dev/null
+####################################################################
+# Copyright (c) 2012, 2014 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:
+# Bernd Hufmann - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Initialize
+####################################################################
+<SCENARIO>
+Initialize
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Currently no available tracing session
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Create and destroy session
+####################################################################
+<SCENARIO>
+SessionHandling
+<SCENARIO>
+<COMMAND_INPUT>
+lttng create mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in /home/user/lttng-traces/mysession-20120314-132824
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng start mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing started for session mysession.
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng stop mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing stopped for session mysession.
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Create and destroy session
+####################################################################
+<SCENARIO>
+SessionHandlingWithPath
+<SCENARIO>
+<COMMAND_INPUT>
+lttng create mysession -o /home/user/temp
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in /home/user/temp
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/temp
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Enable events from kernel provider events
+####################################################################
+<SCENARIO>
+Scenario1
+
+
+<COMMAND_INPUT>
+lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event sched_kthread_stop created in channel channel0
+kernel sched_kthread_stop_ret created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng disable-event sched_kthread_stop_ret,sched_kthread_stop -k -s mysession -c channel0
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event sched_kthread_stop_ret disabled in channel channel0
+kernel event sched_kthread_stop disabled in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event sched_kthread_stop -k -s mysession -c channel0 --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event sched_kthread_stop enabled in channel channel0
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Enable events from UST provider events
+####################################################################
+<SCENARIO>
+Scenario2
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel -u -s mysession --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/temp
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 16384
+ number of subbufers: 2
+ switch timer interval: 200
+ read timer interval: 100
+ output: mmap()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event ust_tests_hello:tptest_sighandler,ust_tests_hello:tptest -u -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust_tests_hello:tptest_sighandler in channel channel0
+UST sched_ust_tests_hello:tptest created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/temp
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 16384
+ number of subbufers: 2
+ switch timer interval: 200
+ read timer interval: 100
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng disable-event ust_tests_hello:tptest -u -s mysession -c mychannel
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event ust_tests_hello:tptest in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event ust_tests_hello:tptest -u -s mysession -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event ust_tests_hello:tptest enabled in channel mychannel
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+<SCENARIO>
+Scenario3
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel -k -s mysession --overwrite --subbuf-size 16384 --num-subbuf 4 --switch-timer 100 --read-timer 200
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel2 -k -s mysession --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel2 enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+
+<COMMAND_INPUT>
+lttng disable-channel mychannel,mychannel2 -k -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel disabled for session mysession
+Kernel channel mychannel2 disabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel,mychannel2 -k -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel enabled for session mysession
+Kernel channel mychannel2 enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event sched_kthread_stop,sched_kthread_stop_ret -k -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event sched_kthread_stop created in channel channel0
+kernel sched_kthread_stop_ret created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event sched_wakeup_new -k -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event sched_wakeup_new created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession -c mychannel2 --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel event sched_kthread_stop created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession -c mychannel --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel system calls are enabled in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel system calls are enabled in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel system calls are enabled in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent1 -k -s mysession --probe 0xc0101280
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent1 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent2 -k -s mysession -c channel0 --probe init_post
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent2 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent3 -k -s mysession --probe init_post:0x1000
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent2 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent4 -k -s mysession --function create_dev
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent4 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent5 -k -s mysession --function create_dev:0x2000
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent5 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent5 (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent -k -s mysession -c mychannel --function create_dev:0x2000
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent created in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent5 (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Available tracing sessions:
+ 1) mysession (/home/eedbhu/lttng-traces/mysession-20120321-115617) [inactive]
+
+Use lttng list <session_name> for more details
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent5 (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE
+
+If no channel and no event is given (-c/-e), the context
+will be added to all events and all channels.
+Otherwise the context will be added only to the channel (-c)
+and/or event (-e) indicated.
+Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -e, --event NAME Apply to event
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
+ perf:stalled-cycles-frontend,
+ perf:idle-cycles-frontend,
+ perf:stalled-cycles-backend,
+ perf:idle-cycles-backend, perf:instructions,
+ perf:cache-references, perf:cache-misses,
+ perf:branch-instructions, perf:branches,
+ perf:branch-misses, perf:bus-cycles,
+ perf:L1-dcache-loads, perf:L1-dcache-load-misses,
+ perf:L1-dcache-stores,
+ perf:L1-dcache-store-misses,
+ perf:L1-dcache-prefetches,
+ perf:L1-dcache-prefetch-misses,
+ perf:L1-icache-loads, perf:L1-icache-load-misses,
+ perf:L1-icache-stores,
+ perf:L1-icache-store-misses,
+ perf:L1-icache-prefetches,
+ perf:L1-icache-prefetch-misses, perf:LLC-loads,
+ perf:LLC-load-misses, perf:LLC-stores,
+ perf:LLC-store-misses, perf:LLC-prefetches,
+ perf:LLC-prefetch-misses, perf:dTLB-loads,
+ perf:dTLB-load-misses, perf:dTLB-stores,
+ perf:dTLB-store-misses, perf:dTLB-prefetches,
+ perf:dTLB-prefetch-misses, perf:iTLB-loads,
+ perf:iTLB-load-misses, perf:branch-loads,
+ perf:branch-load-misses, perf:cpu-clock,
+ perf:task-clock, perf:page-fault, perf:faults,
+ perf:major-faults, perf:minor-faults,
+ perf:context-switches, perf:cs,
+ perf:cpu-migrations, perf:migrations,
+ perf:alignment-faults, perf:emulation-faults
+Example:
+This command will add the context information 'prio' and two perf
+counters (hardware branch misses and cache misses), to all events
+in the trace data output:
+# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -s mysession -k -t prio -t perf:branch-misses -t perf:cache-misses
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel context perf:cache-misses added to all channels
+kernel context perf:branch-misses added to all channels
+kernel context prio added to all channels
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent5 (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE
+
+If no channel and no event is given (-c/-e), the context
+will be added to all events and all channels.
+Otherwise the context will be added only to the channel (-c)
+and/or event (-e) indicated.
+Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -e, --event NAME Apply to event
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
+ perf:stalled-cycles-frontend,
+ perf:idle-cycles-frontend,
+ perf:stalled-cycles-backend,
+ perf:idle-cycles-backend, perf:instructions,
+ perf:cache-references, perf:cache-misses,
+ perf:branch-instructions, perf:branches,
+ perf:branch-misses, perf:bus-cycles,
+ perf:L1-dcache-loads, perf:L1-dcache-load-misses,
+ perf:L1-dcache-stores,
+ perf:L1-dcache-store-misses,
+ perf:L1-dcache-prefetches,
+ perf:L1-dcache-prefetch-misses,
+ perf:L1-icache-loads, perf:L1-icache-load-misses,
+ perf:L1-icache-stores,
+ perf:L1-icache-store-misses,
+ perf:L1-icache-prefetches,
+ perf:L1-icache-prefetch-misses, perf:LLC-loads,
+ perf:LLC-load-misses, perf:LLC-stores,
+ perf:LLC-store-misses, perf:LLC-prefetches,
+ perf:LLC-prefetch-misses, perf:dTLB-loads,
+ perf:dTLB-load-misses, perf:dTLB-stores,
+ perf:dTLB-store-misses, perf:dTLB-prefetches,
+ perf:dTLB-prefetch-misses, perf:iTLB-loads,
+ perf:iTLB-load-misses, perf:branch-loads,
+ perf:branch-load-misses, perf:cpu-clock,
+ perf:task-clock, perf:page-fault, perf:faults,
+ perf:major-faults, perf:minor-faults,
+ perf:context-switches, perf:cs,
+ perf:cpu-migrations, perf:migrations,
+ perf:alignment-faults, perf:emulation-faults
+Example:
+This command will add the context information 'prio' and two perf
+counters (hardware branch misses and cache misses), to all events
+in the trace data output:
+# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -s mysession -c mychannel -k -t prio -t perf:branch-misses -t perf:cache-misses
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel context perf:cache-misses added to channel mychannel
+kernel context perf:branch-misses added to channel mychannel
+kernel context prio added to channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent5 (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE
+
+If no channel and no event is given (-c/-e), the context
+will be added to all events and all channels.
+Otherwise the context will be added only to the channel (-c)
+and/or event (-e) indicated.
+Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -e, --event NAME Apply to event
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu-cycles, perf:cycles,
+ perf:stalled-cycles-frontend,
+ perf:idle-cycles-frontend,
+ perf:stalled-cycles-backend,
+ perf:idle-cycles-backend, perf:instructions,
+ perf:cache-references, perf:cache-misses,
+ perf:branch-instructions, perf:branches,
+ perf:branch-misses, perf:bus-cycles,
+ perf:L1-dcache-loads, perf:L1-dcache-load-misses,
+ perf:L1-dcache-stores,
+ perf:L1-dcache-store-misses,
+ perf:L1-dcache-prefetches,
+ perf:L1-dcache-prefetch-misses,
+ perf:L1-icache-loads, perf:L1-icache-load-misses,
+ perf:L1-icache-stores,
+ perf:L1-icache-store-misses,
+ perf:L1-icache-prefetches,
+ perf:L1-icache-prefetch-misses, perf:LLC-loads,
+ perf:LLC-load-misses, perf:LLC-stores,
+ perf:LLC-store-misses, perf:LLC-prefetches,
+ perf:LLC-prefetch-misses, perf:dTLB-loads,
+ perf:dTLB-load-misses, perf:dTLB-stores,
+ perf:dTLB-store-misses, perf:dTLB-prefetches,
+ perf:dTLB-prefetch-misses, perf:iTLB-loads,
+ perf:iTLB-load-misses, perf:branch-loads,
+ perf:branch-load-misses, perf:cpu-clock,
+ perf:task-clock, perf:page-fault, perf:faults,
+ perf:major-faults, perf:minor-faults,
+ perf:context-switches, perf:cs,
+ perf:cpu-migrations, perf:migrations,
+ perf:alignment-faults, perf:emulation-faults
+Example:
+This command will add the context information 'prio' and two perf
+counters (hardware branch misses and cache misses), to all events
+in the trace data output:
+# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -s mysession -c channel0 -e sched_kthread_stop_ret -k -t prio -t perf:branch-misses -t perf:cache-misses
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel context perf:cache-misses added to event sched_kthread_stop_ret channel mychannel
+kernel context perf:branch-misses added to event sched_kthread_stop_ret channel mychannel
+kernel context prio added to channel event sched_kthread_stop_ret mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ syscalls (type: syscall) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent5 (type: probe) [enabled]
+ offset: 0x2000
+ symbol: create_dev
+ myevent4 (type: function) [enabled]
+ offset: 0x0
+ symbol: create_dev
+ myevent3 (type: probe) [enabled]
+ offset: 0x1000
+ symbol: init_post
+ myevent2 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ myevent1 (type: probe) [enabled]
+ addr: 0xc0101280
+ syscalls (type: syscall) [enabled]
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng calibrate -k --function
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel calibration done
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+<SCENARIO>
+Scenario4
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel -u -s mysession --overwrite --subbuf-size 16384 --num-subbuf 4 --switch-timer 100 --read-timer 200
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel2 -u -s mysession --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel2 enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust_tests_hello:tptest_sighandler created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event ust_tests_hello:tptest -u -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust_tests_hello:tptest created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -u -s mysession -c mychannel2 --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All UST events created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ None
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event "ust*" -u -s mysession -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust* created in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust* (type: tracepoint) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event "ust*" -u -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust* created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust* (type: tracepoint) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust* (type: tracepoint) [enabled]
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event "u*" -u -s mysession --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event u* created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust* (type: tracepoint) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ u* (type: tracepoint) [enabled]
+ ust* (type: tracepoint) [enabled]
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+
+<COMMAND_INPUT>
+lttng enable-event myevent1 -u -s mysession --loglevel TRACE_WARNING
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event myevent1 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust* (type: tracepoint) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent1 (loglevel <= TRACE_WARNING (4)) (type: tracepoint) [enabled]
+ u* (type: tracepoint) [enabled]
+ ust* (type: tracepoint) [enabled]
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent2 -u -s mysession --loglevel-only TRACE_DEBUG_FUNCTION
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event myevent2 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust* (type: tracepoint) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent2 (loglevel == TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
+ myevent1 (loglevel <= TRACE_WARNING (4)) (type: loglevel) [enabled]
+ u* (type: tracepoint) [enabled]
+ ust* (type: tracepoint) [enabled]
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent0 -u -s mysession -c mychannel --loglevel-only TRACE_DEBUG_FUNCTION
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event myevent0 created in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20120314-132824
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 16384
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ myevent0 (loglevel <= TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
+ ust* (type: tracepoint) [enabled]
+
+- mychannel2: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 32768
+ number of subbufers: 2
+ switch timer interval: 100
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ * (type: tracepoint) [enabled]
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ myevent2 (loglevel <= TRACE_DEBUG_FUNCTION (12)) (type: tracepoint) [enabled]
+ myevent1 (loglevel == TRACE_WARNING (4)) (type: loglevel) [enabled]
+ u* (type: tracepoint) [enabled]
+ ust* (type: tracepoint) [enabled]
+ ust_tests_hello:tptest_sighandler (type: tracepoint) [enabled]
+ ust_tests_hello:tptest (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+
+
+</SCENARIO>
+
+
+
--- /dev/null
+####################################################################
+# Copyright (c) 2013 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:
+# Bernd Hufmann - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Initialize
+####################################################################
+<SCENARIO>
+Initialize
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.2.0 - Cuda
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Currently no available tracing session
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Session and channel with per-UID UST buffers
+####################################################################
+<SCENARIO>
+ScenPerUidTest
+<COMMAND_INPUT>
+lttng create mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in /home/user/lttng-traces/mysession-20130812-113358
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20130812-113358
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session my destroyed.
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel -u -s mysession --buffers-uid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20130812-113358
+
+=== Domain: UST global ===
+
+Buffer type: per UID
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 8388608
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 0
+ output: mmap()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Session and channel with per-PID UST buffers
+####################################################################
+<SCENARIO>
+ScenPerPidTest
+<COMMAND_INPUT>
+lttng create mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in /home/user/lttng-traces/mysession-20130812-113358
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20130812-113358
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel -u -s mysession --buffers-pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20130812-113358
+
+=== Domain: UST global ===
+
+Buffer type: per PID
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 8388608
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 0
+ output: mmap()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Session and channel with per-PID UST buffers with option -C -W
+####################################################################
+<SCENARIO>
+ScenBufSizeTest
+<COMMAND_INPUT>
+lttng create mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in /home/user/lttng-traces/mysession-20130812-113358
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20130812-113358
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel -u -s mysession -C 1024 -W 10
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Warning: Tracefile size rounded up from (1024) to subbuffer size (8388608)
+</COMMAND_ERROR_OUTPUT>
+UST channel mychannel enabled for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [inactive]
+ Trace path: /home/user/lttng-traces/mysession-20130812-113358
+
+=== Domain: UST global ===
+
+Buffer type: per PID
+
+Channels:
+-------------
+- mychannel: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 8388608
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 0
+ output: mmap()
+
+ Events:
+ None
+
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+
+
--- /dev/null
+####################################################################
+# Copyright (c) 2014 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:
+# Jonathan Rajotte - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Test lttng not installed
+####################################################################
+<SCENARIO>
+LttngNotInstalled
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Command not found
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng version
+####################################################################
+<SCENARIO>
+LttngVersion
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.1.0 - Basse Messe
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng version
+# output with prompt
+####################################################################
+<SCENARIO>
+LttngVersionWithPrompt
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Prompt> lttng version 2.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng version (unsupported version)
+####################################################################
+<SCENARIO>
+LttngUnsupportedVersion
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 200.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test lttng version (noversion)
+####################################################################
+<SCENARIO>
+LttngNoVersion
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test no sessions available
+####################################################################
+<SCENARIO>
+NoSessionAvailable
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command><name>list</name><output><sessions/></output></command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test get sessions
+####################################################################
+<SCENARIO>
+GetSessionNames1
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession1</name>
+ <path>home/user/lttng-traces/mysession1-20120123-083928</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ <session>
+ <name>mysession</name>
+ <path>home/user/lttng-traces/mysession-20120123-083318</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng list <name> where session doesn't exist
+####################################################################
+<SCENARIO>
+GetSessionNameNotExist
+<COMMAND_INPUT>
+lttng --mi xml list test
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command><name>list</name><output><sessions/></output></command>
+<COMMAND_ERROR_OUTPUT>
+Error: Session 'test' not found
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng -vvv list <name> where session doesn't exist
+####################################################################
+<SCENARIO>
+GetSessionNameNotExistVerbose
+<COMMAND_INPUT>
+lttng --mi xml -vvv list test
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command><name>list</name><output><sessions/></output></command>
+<COMMAND_ERROR_OUTPUT>
+Error: Session 'test' not found
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng list with garbage output
+####################################################################
+<SCENARIO>
+GetSessionGarbageOut
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+asdfaereafsdcv 12333456434&*89**(())(^%$*
+@#$%^&*()@#$%^&*()0834523094578kj;djkfs
+a;sdf094v5u dsafj;sd9
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng list <name> with sample outputs
+####################################################################
+<SCENARIO>
+GetSession1
+<COMMAND_INPUT>
+lttng --mi xml list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/home/user/lttng-traces/mysession-20120129-084256</path>
+ <enabled>true</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ <domains>
+ <domain>
+ <type>KERNEL</type>
+ <buffer_type>PER_PID</buffer_type>
+ <channels>
+ <channel>
+ <name>channel0</name>
+ <enabled>true</enabled>
+ <attributes>
+ <overwrite_mode>DISCARD</overwrite_mode>
+ <subbuffer_size>262144</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>0</switch_timer_interval>
+ <read_timer_interval>200</read_timer_interval>
+ <output_type>SPLICE</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>0</live_timer_interval>
+ </attributes>
+ <events>
+ <event>
+ <name>block_rq_remap</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ <event>
+ <name>block_bio_remap</name>
+ <type>TRACEPOINT</type>
+ <enabled>false</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ </events>
+ </channel>
+ <channel>
+ <name>channel1</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>524288</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>100</switch_timer_interval>
+ <read_timer_interval>400</read_timer_interval>
+ <output_type>SPLICE</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <events/>
+ </channel>
+ </channels>
+ </domain>
+ <domain>
+ <type>UST</type>
+ <buffer_type>PER_UID</buffer_type>
+ <channels>
+ <channel>
+ <name>mychannel1</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>8192</subbuffer_size>
+ <subbuffer_count>8</subbuffer_count>
+ <switch_timer_interval>200</switch_timer_interval>
+ <read_timer_interval>100</read_timer_interval>
+ <output_type>MMAP</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>0</live_timer_interval>
+ </attributes>
+ <events/>
+ </channel>
+ <channel>
+ <name>channel0</name>
+ <enabled>true</enabled>
+ <attributes>
+ <overwrite_mode>DISCARD</overwrite_mode>
+ <subbuffer_size>4096</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>0</switch_timer_interval>
+ <read_timer_interval>200</read_timer_interval>
+ <output_type>MMAP</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>0</live_timer_interval>
+ </attributes>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>false</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_LINE</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ <event>
+ <name>*</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <exclusion>false</exclusion>
+ </event>
+ </events>
+ </channel>
+ </channels>
+ </domain>
+ </domains>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+<COMMAND_INPUT>
+lttng --mi xml list mysession1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession1</name>
+ <path>/home/user/lttng-traces/mysession1-20120203-133225</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ <domains/>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng list -k" with sample output
+####################################################################
+<SCENARIO>
+GetKernelProvider1
+<COMMAND_INPUT>
+lttng --mi xml list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <domains>
+ <domain>
+ <type>KERNEL</type>
+ <buffer_type>PER_PID</buffer_type>
+ <events>
+ <event>
+ <name>sched_kthread_stop</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ <event>
+ <name>sched_kthread_stop_ret</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ <event>
+ <name>sched_wakeup_new</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ </event>
+ </events>
+ </domain>
+ </domains>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -k" with no kernel and no session daemon
+####################################################################
+<SCENARIO>
+ListWithNoKernel1
+<COMMAND_INPUT>
+lttng --mi xml list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Spawning session daemon
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -k" with no kernel and with session daemon
+####################################################################
+<SCENARIO>
+ListWithNoKernel2
+<COMMAND_INPUT>
+lttng --mi xml list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with sample output
+####################################################################
+<SCENARIO>
+GetUstProvider1
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <domains>
+ <domain>
+ <type>UST</type>
+ <buffer_type>PER_PID</buffer_type>
+ <pids>
+ <pid>
+ <id>9379</id>
+ <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_MODULE</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields/>
+ </event>
+ <event>
+ <name>ust_tests_hello:tptest</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_INFO</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields>
+ <event_field>
+ <name>doublefield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>floatfield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>stringfield</name>
+ <type>STRING</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ </event_fields>
+ </event>
+ </events>
+ </pid>
+ <pid>
+ <id>4852</id>
+ <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_WARNING</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields/>
+ </event>
+ <event>
+ <name>ust_tests_hello:tptest</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields>
+ <event_field>
+ <name>doublefield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>floatfield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>stringfield</name>
+ <type>STRING</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ </event_fields>
+ </event>
+ </events>
+ </pid>
+ </pids>
+ </domain>
+ </domains>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no UST provider available
+####################################################################
+<SCENARIO>
+GetUstProvider2
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <domains>
+ <domain>
+ <type>UST</type>
+ <buffer_type>PER_PID</buffer_type>
+ <pids/>
+ </domain>
+ </domains>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
+####################################################################
+<SCENARIO>
+ListWithNoUst1
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command><name>list</name><output/></command>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+####################################################################
+# Scenario: Test "lttng list -u" with no UST available and no session daemon
+####################################################################
+<SCENARIO>
+ListWithNoUst2
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command><name>list</name><output/></command>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list UST event fields: LTTng-UST tracer is not supported. Please rebuild lttng-tools with lttng-ust support enabled.
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+####################################################################
+# Scenario: Test "lttng list -" with no kernel and with session daemon
+####################################################################
+<SCENARIO>
+ListWithNoUst3
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command><name>list</name><output/></command>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events: Tracing the kernel requires a root lttng-sessiond daemon, as well as "tracing" group membership or root user ID for the lttng client.
+Error: Command Error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u -f" with sample output (version 2.6.0)
+####################################################################
+<SCENARIO>
+GetUstProvider3
+<COMMAND_INPUT>
+lttng --mi xml list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <domains>
+ <domain>
+ <type>UST</type>
+ <buffer_type>PER_PID</buffer_type>
+ <pids>
+ <pid>
+ <id>9379</id>
+ <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_MODULE</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields/>
+ </event>
+ <event>
+ <name>ust_tests_hello:tptest</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_INFO</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields>
+ <event_field>
+ <name>doublefield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>floatfield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>stringfield</name>
+ <type>STRING</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ </event_fields>
+ </event>
+ </events>
+ </pid>
+ <pid>
+ <id>4852</id>
+ <name>/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello</name>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_WARNING</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields/>
+ </event>
+ <event>
+ <name>ust_tests_hello:tptest</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <event_fields>
+ <event_field>
+ <name>doublefield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>floatfield</name>
+ <type>FLOAT</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ <event_field>
+ <name>stringfield</name>
+ <type>STRING</type>
+ <nowrite>0</nowrite>
+ </event_field>
+ </event_fields>
+ </event>
+ </events>
+ </pid>
+ </pids>
+ </domain>
+ </domains>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+####################################################################
+# Scenario: Test "lttng create <session>
+####################################################################
+<SCENARIO>
+CreateSession1
+<COMMAND_INPUT>
+lttng --mi xml create mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession2</name>
+ <path>/home/user/lttng-traces/mysession2-20120209-095418</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session>
+####################################################################
+<SCENARIO>
+CreateSessionWithPrompt
+<COMMAND_INPUT>
+lttng --mi xml create mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Prompt> Session mysession2 created.
+Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> with different variants
+# and errors
+####################################################################
+<SCENARIO>
+CreateSessionVariants
+<COMMAND_INPUT>
+lttng --mi xml create alreadyExist
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output/>
+ <success>false</success>
+</command>
+<COMMAND_ERROR_OUTPUT>
+Warning: Session mysession2 already exists
+Error: Session name already exists
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create "session with spaces"
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>session with spaces</name>
+ <path>/home/user/lttng-traces/session with spaces-20120209-095418</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create wrongName
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>auto</name>
+ <path>/home/user/lttng-traces/auto-20120209-095418</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create wrongPath -o /home/user/hallo
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>wrongPath</name>
+ <path>/home/user/lttng-traces/wrongPath-20120209-095418</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create pathWithSpaces -o "/home/user/hallo user/here"
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>pathWithSpaces</name>
+ <path>/home/user/hallo user/here/pathWithSpaces-20120209-095418</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng destroy <session>
+####################################################################
+
+<SCENARIO>
+DestroySession1
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession2</name>
+ <path>/home/user/lttng-traces/mysession2-20140812-160632</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng enable-channel ..." with different inputs
+####################################################################
+
+<SCENARIO>
+ChannelHandling
+<COMMAND_INPUT>
+lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel0 enabled for session mysession2
+Kernel channel mychannel1 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>mychannel0</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>16384</subbuffer_size>
+ <subbuffer_count>2</subbuffer_count>
+ <switch_timer_interval>200</switch_timer_interval>
+ <read_timer_interval>100</read_timer_interval>
+ <output_type>SPLICE</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ <channel>
+ <name>mychannel1</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>16384</subbuffer_size>
+ <subbuffer_count>2</subbuffer_count>
+ <switch_timer_interval>200</switch_timer_interval>
+ <read_timer_interval>100</read_timer_interval>
+ <output_type>SPLICE</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel channel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>ustChannel</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>32768</subbuffer_size>
+ <subbuffer_count>2</subbuffer_count>
+ <switch_timer_interval>100</switch_timer_interval>
+ <read_timer_interval>200</read_timer_interval>
+ <output_type>MMAP</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel channel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>ustChannel</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>4096</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>0</switch_timer_interval>
+ <read_timer_interval>0</read_timer_interval>
+ <output_type>MMAP</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 2 --switch-timer 100 --read-timer 200 --buffers-uid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>ustChannel</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>OVERWRITE</overwrite_mode>
+ <subbuffer_size>32768</subbuffer_size>
+ <subbuffer_count>2</subbuffer_count>
+ <switch_timer_interval>100</switch_timer_interval>
+ <read_timer_interval>200</read_timer_interval>
+ <output_type>MMAP</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel mychannel0,mychannel1 -k -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>mychannel0</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>DISCARD</overwrite_mode>
+ <subbuffer_size>262144</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>0</switch_timer_interval>
+ <read_timer_interval>200000</read_timer_interval>
+ <output_type>SPLICE</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ <channel>
+ <name>mychannel1</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>DISCARD</overwrite_mode>
+ <subbuffer_size>262144</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>0</switch_timer_interval>
+ <read_timer_interval>200000</read_timer_interval>
+ <output_type>SPLICE</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-channel ustChannel -u -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>ustChannel</name>
+ <enabled>false</enabled>
+ <attributes>
+ <overwrite_mode>DISCARD</overwrite_mode>
+ <subbuffer_size>131072</subbuffer_size>
+ <subbuffer_count>4</subbuffer_count>
+ <switch_timer_interval>0</switch_timer_interval>
+ <read_timer_interval>0</read_timer_interval>
+ <output_type>MMAP</output_type>
+ <tracefile_size>0</tracefile_size>
+ <tracefile_count>0</tracefile_count>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </attributes>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml disable-channel mychannel0,mychannel1 -k -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>disable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>mychannel0</name>
+ <enabled>false</enabled>
+ <success>true</success>
+ </channel>
+ <channel>
+ <name>mychannel1</name>
+ <enabled>false</enabled>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml disable-channel ustChannel -u -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>disable-channel</name>
+ <output>
+ <channels>
+ <channel>
+ <name>ustChannel</name>
+ <enabled>false</enabled>
+ <success>true</success>
+ </channel>
+ </channels>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng --mi xml enable-events ..." with different inputs
+####################################################################
+<SCENARIO>
+EventHandling
+
+# Tracepoint test cases
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>block_rq_remap</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ <event>
+ <name>block_bio_remap</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ <event>
+ <name>softirq_entry</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>*</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_EMERG</loglevel>
+ <loglevel_type>ALL</loglevel_type>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10'
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>ust_tests_hello:tptest_sighandler</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>true</filter>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event -a -u -s mysession2 -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>*</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+# Syscall test cases
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event -a -k -s mysession2 --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>*</name>
+ <type>SYSCALL</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event -a -k -s mysession2 -c mychannel --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>*</name>
+ <type>SYSCALL</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+# dynamic probe/function probe test cases
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event myevent0 -k -s mysession2 --function 0xc0101340
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>myevent0</name>
+ <type>FUNCTION</type>
+ <enabled>false</enabled>
+ <filter>false</filter>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>myevent1</name>
+ <type>PROBE</type>
+ <enabled>false</enabled>
+ <filter>false</filter>
+ <offset>0</offset>
+ <symbol_name>init_post</symbol_name>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+
+</COMMAND_OUTPUT>
+
+# log level test cases
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>myevent4</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG</loglevel>
+ <loglevel_type>SINGLE</loglevel_type>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>enable-event</name>
+ <output>
+ <events>
+ <event>
+ <name>myevent5</name>
+ <type>TRACEPOINT</type>
+ <enabled>true</enabled>
+ <filter>false</filter>
+ <loglevel>TRACE_DEBUG_FUNCTION</loglevel>
+ <loglevel_type>RANGE</loglevel_type>
+ <exclusion>false</exclusion>
+ <success>true</success>
+ </event>
+ </events>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng add-context -h" and lttng --mi xml add-context ..." with different inputs
+####################################################################
+
+<SCENARIO>
+ContextHandling
+
+<COMMAND_INPUT>
+lttng --mi xml add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE [-k|-u] [OPTIONS]
+
+If no channel is given (-c), the context is added to
+all channels.
+
+Otherwise the context is added only to the channel (-c).
+
+Exactly one domain (-k or -u) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+
+Context:
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu:cpu-cycles, perf:cpu:cycles
+Note that the vpid, vppid and vtid context types represent the virtual process id,
+virtual parent process id and virtual thread id as seen from the current execution context
+as opposed to the pid, ppid and tid which are kernel internal data structures.
+
+Example:
+This command will add the context information 'prio' and two per-cpu
+perf counters (hardware branch misses and cache misses), to all channels
+in the trace data output:
+# lttng add-context -k -t prio -t perf:cpu:branch-misses -t perf:cpu:cache-misses
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
+UST context pid added to event sched_kthread_stop_ret channel mychannel
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+<SCENARIO>
+ContextErrorHandling
+
+<COMMAND_INPUT>
+lttng --mi xml add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE
+
+If no channel and no event is given (-c/-e), the context
+will be added to all events and all channels.
+Otherwise the context will be added only to the channel (-c)
+and/or event (-e) indicated.
+Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -e, --event NAME Apply to event
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
+Example:
+This command will add the context information 'prio' and two perf
+counters (hardware branch misses and cache misses), to all events
+in the trace data output:
+# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
+UST context pid added to event sched_kthread_stop_ret channel mychannel
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+<SCENARIO>
+CalibrateHandling
+<COMMAND_INPUT>
+lttng --mi xml calibrate -k --function
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>calibrate</name>
+ <output>
+ <calibrate>
+ <type>FUNCTION</type>
+ </calibrate>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml calibrate -u --function
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>calibrate</name>
+ <output>
+ <calibrate>
+ <type>FUNCTION</type>
+ </calibrate>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> with LTTng 2.1 options
+####################################################################
+<SCENARIO>
+CreateSessionLttng2.1
+
+<COMMAND_INPUT>
+lttng --mi xml create mysession -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:5342/mysession-20140813-095804 [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create mysession -U file:///tmp
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>/tmp</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:5342/ [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml create mysession -U 172.0.0.1:1234:2345
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://172.0.0.1:1234/mysession-20140813-102225 [data: 2345]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/home/user/lttng-traces/mysession-20140818-100114</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng --mi xml -vvv create mysession -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
+DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
+DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
+DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
+Session mysession created.
+Traces will be written in net://172.0.0.1
+DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
+####################################################################
+<SCENARIO>
+CreateSessionSnapshot
+<COMMAND_INPUT>
+lttng --mi xml create mysession --snapshot
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path/>
+ <enabled>false</enabled>
+ <snapshot_mode>1</snapshot_mode>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml snapshot list-output -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>snapshot</name>
+ <output>
+ <snapshot_action>
+ <name>list-output</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <snapshots>
+ <snapshot>
+ <id>1</id>
+ <name>snapshot-1</name>
+ <ctrl_url>/home/user/lttng-traces/mysession-20130913-141651</ctrl_url>
+ <data_url/>
+ <max_size>0</max_size>
+ </snapshot>
+ </snapshots>
+ </session>
+ </output>
+ </snapshot_action>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path/>
+ <enabled>false</enabled>
+ <snapshot_mode>1</snapshot_mode>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ Snapshot recorded successfully for session mysession
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/home/user/lttng-traces/mysession-20140818-100114</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
+####################################################################
+<SCENARIO>
+CreateSessionStreamedSnapshot
+<COMMAND_INPUT>
+lttng --mi xml create mysession --snapshot -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Default snapshot output set to: net://172.0.0.1
+Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml snapshot list-output -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Snapshot output list for session mysession
+ [2] snapshot-2: net4://172.0.0.1:5342/
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ 1) mysession () [inactive snapshot]
+
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ Snapshot recorded successfully for session mysession
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/home/user/lttng-traces/mysession-20140818-100114</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
+####################################################################
+<SCENARIO>
+CreateSessionSnapshotErrors
+<COMMAND_INPUT>
+lttng --mi xml snapshot list-output -s blabla
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>snapshot</name>
+ <output>
+ <snapshot_action>
+ <name>list-output</name>
+ <output/>
+ </snapshot_action>
+ </output>
+ <success>false</success>
+</command>
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+#next is not an error case but good to be tested
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path/>
+ <enabled>true</enabled>
+ <snapshot_mode>1</snapshot_mode>
+ <live_timer_interval>4294967295</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml snapshot record -s blabla
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+ Error: Session name not found
+</COMMAND_ERROR_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>snapshot</name>
+ <output>
+ <snapshot_action>
+ <name>record</name>
+ <output/>
+ </snapshot_action>
+ </output>
+ <success>false</success>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+ Error: Session needs to be started once
+</COMMAND_ERROR_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>snapshot</name>
+ <output>
+ <snapshot_action>
+ <name>record</name>
+ <output/>
+ </snapshot_action>
+ </output>
+ <success>false</success>
+</command>
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
+####################################################################
+<SCENARIO>
+CreateSessionLive
+<COMMAND_INPUT>
+lttng --mi xml create mysession --live -U net://127.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>create</name>
+ <output>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>1000000</live_timer_interval>
+ </session>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>list</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>tcp4://127.0.0.1:5342/ [data: 5343]</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>1000000</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+</command>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<?xml version="1.0" encoding="UTF-8"?>
+<command>
+ <name>destroy</name>
+ <output>
+ <sessions>
+ <session>
+ <name>mysession</name>
+ <path>/home/user/lttng-traces/mysession-20140818-100114</path>
+ <enabled>false</enabled>
+ <snapshot_mode>0</snapshot_mode>
+ <live_timer_interval>0</live_timer_interval>
+ </session>
+ </sessions>
+ </output>
+ <success>true</success>
+</command>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
+####################################################################
+<SCENARIO>
+CreateSessionLiveErrors
+<COMMAND_INPUT>
+lttng --mi xml create mysession --live --snapshot
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Snapshot and live modes are mutually exclusive.
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml create mysession --live -U blah
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: URI parse unknown protocol blah
+Error: Unable to parse the URL blah
+Error: Invalid parameter
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng --mi xml create mysession --live -C net://127.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: You need both control and data URL.
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
\ No newline at end of file
--- /dev/null
+####################################################################
+# 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:
+# Bernd Hufmann - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Test lttng not installed
+####################################################################
+<SCENARIO>
+LttngNotInstalled
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Command not found
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng version
+####################################################################
+<SCENARIO>
+LttngVersion
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.1.0 - Basse Messe
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng version
+# output with prompt
+####################################################################
+<SCENARIO>
+LttngVersionWithPrompt
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Prompt> lttng version 2.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng version (unsupported version)
+####################################################################
+<SCENARIO>
+LttngUnsupportedVersion
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 200.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test lttng version (noversion)
+####################################################################
+<SCENARIO>
+LttngNoVersion
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test no sessions available
+####################################################################
+<SCENARIO>
+NoSessionAvailable
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Currently no available tracing session
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test get sessions
+####################################################################
+<SCENARIO>
+GetSessionNames1
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Available tracing sessions:
+ 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
+ 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
+
+ Use lttng list <session_name> for more details
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng list <name> where session doesn't exist
+####################################################################
+<SCENARIO>
+GetSessionNameNotExist
+<COMMAND_INPUT>
+lttng list test
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session test not found
+<COMMAND_ERROR_OUTPUT>
+Error: Session name not found
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng -vvv list <name> where session doesn't exist
+####################################################################
+<SCENARIO>
+GetSessionNameNotExistVerbose
+<COMMAND_INPUT>
+lttng -vvv list test
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG2: Session name: test [in cmd_list() at commands/list.c:618]
+DEBUG1: Session count 1 [in list_sessions() at commands/list.c:485]
+<COMMAND_ERROR_OUTPUT>
+Error: Session 'test' not found
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng list with garbage output
+####################################################################
+<SCENARIO>
+GetSessionGarbageOut
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+asdfaereafsdcv 12333456434&*89**(())(^%$*
+@#$%^&*()@#$%^&*()0834523094578kj;djkfs
+a;sdf094v5u dsafj;sd9
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test lttng list <name> with sample outputs
+####################################################################
+<SCENARIO>
+GetSession1
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [active]
+ Trace path: /home/user/lttng-traces/mysession-20120129-084256
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
+
+- channel1: [disabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 524288
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 400
+ output: splice()
+
+ Events:
+ None
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel1: [disabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 8192
+ number of subbufers: 8
+ switch timer interval: 200
+ read timer interval: 100
+ output: mmap()
+
+ Events:
+ None
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 4096
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled]
+ * (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+<COMMAND_INPUT>
+lttng list mysession1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession1: [inactive]
+ Trace path: /home/user/lttng-traces/mysession1-20120203-133225
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng list -k" with sample output
+####################################################################
+<SCENARIO>
+GetKernelProvider1
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -k" with no kernel and no session daemon
+####################################################################
+<SCENARIO>
+ListWithNoKernel1
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Spawning session daemon
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -k" with no kernel and with session daemon
+####################################################################
+<SCENARIO>
+ListWithNoKernel2
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -k" with no kernel, with session daemon and verbose
+####################################################################
+<SCENARIO>
+ListWithNoKernelVerbose
+<COMMAND_INPUT>
+lttng -vvv list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
+DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events
+</COMMAND_ERROR_OUTPUT>
+DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with sample output
+####################################################################
+<SCENARIO>
+GetUstProvider1
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no UST provider available
+####################################################################
+<SCENARIO>
+GetUstProvider2
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+None
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no UST available (LTTng 2.0.x)
+####################################################################
+<SCENARIO>
+ListWithNoUst1
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+None
+Segmentation Fault
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no UST available and no session daemon
+####################################################################
+<SCENARIO>
+ListWithNoUst2
+<COMMAND_INPUT>
+lttng list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Spawning a session daemon
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list UST events: Listing UST events failed
+Error: Command Error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no ust and with session daemon
+####################################################################
+<SCENARIO>
+ListWithNoUst3
+<COMMAND_INPUT>
+lttng list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list UST events: Listing UST events failed
+Error: Command Error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng list -u" with no kernel, with session daemon and verbose
+####################################################################
+<SCENARIO>
+ListWithNoUstVerbose
+<COMMAND_INPUT>
+lttng -vvv list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG2: Session name: (null) [in cmd_list() at commands/list.c:618]
+DEBUG1: Getting kernel tracing events [in list_kernel_events() at commands/list.c:309]
+Spawning a session daemon
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list UST events: Listing UST events failed
+Error: Command Error
+</COMMAND_ERROR_OUTPUT>
+DEBUG1: Clean exit [in clean_exit() at lttng.c:165]
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng list -u -f" with sample output (version 2.1.0)
+####################################################################
+<SCENARIO>
+GetUstProvider3
+<COMMAND_INPUT>
+lttng list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
+ field: doublefield (float)
+ field: floatfield (float)
+ field: stringfield (string)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+ field: doublefield (float)
+ field: floatfield (float)
+ field: stringfield (string)
+
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng create <session>
+####################################################################
+<SCENARIO>
+CreateSession1
+<COMMAND_INPUT>
+lttng create mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession2 created.
+Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session>
+####################################################################
+<SCENARIO>
+CreateSessionWithPrompt
+<COMMAND_INPUT>
+lttng create mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Prompt> Session mysession2 created.
+Traces will be written in /home/user/lttng-traces/mysession2-20120209-095418
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> with different variants
+# and errors
+####################################################################
+<SCENARIO>
+CreateSessionVariants
+<COMMAND_INPUT>
+lttng create alreadyExist
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Session name already exist
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create "session with spaces"
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session session with spaces created.
+Traces will be written in /home/user/lttng-traces/session with spaces-20120209-095418
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create wrongName
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session auto created.
+Traces will be written in /home/user/lttng-traces/auto-20120209-095418
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create wrongPath -o /home/user/hallo
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session wrongPath created.
+Traces will be written in /home/user/lttng-traces/wrongPath-20120209-095418
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create pathWithSpaces -o "/home/user/hallo user/here"
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session pathWithSpaces created.
+Traces will be written in /home/user/hallo user/here/pathWithSpaces-20120209-095418
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng destroy <session>
+####################################################################
+
+<SCENARIO>
+DestroySession1
+<COMMAND_INPUT>
+lttng destroy mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession2 destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng -vvv destroy <session>"
+####################################################################
+
+<SCENARIO>
+DestroySessionVerbose
+<COMMAND_INPUT>
+lttng -vvv destroy mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG2: Config file path found: /home/eedbhu [in get_session_name() at utils.c:98]
+DEBUG1: Session name found: mysession2 [in get_session_name() at utils.c:99]
+Session mysession2 destroyed at /home/eedbhu
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng enable-channel ..." with different inputs
+####################################################################
+
+<SCENARIO>
+ChannelHandling
+<COMMAND_INPUT>
+lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100 -C 0 -W 10
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel0 enabled for session mysession2
+Kernel channel mychannel1 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel0,mychannel1 -k -s mysession2 --overwrite --subbuf-size 16384 --num-subbuf 2 --switch-timer 200 --read-timer 100
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel0 enabled for session mysession2
+Kernel channel mychannel1 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 -C 0 -W 20
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel channel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel channel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid -C 0 -W 20
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel channel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel ustChannel -u -s mysession2 --overwrite --buffers-pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel ustChannel enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel ustChannel -u -s mysession2 --overwrite --subbuf-size 32768 --num-subbuf 1 --switch-timer 100 --read-timer 200 --buffers-uid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel channel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+
+<COMMAND_INPUT>
+lttng enable-channel mychannel0,mychannel1 -k -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel0 enabled for session mysession2
+Kernel channel mychannel1 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-channel ustChannel -u -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng disable-channel mychannel0,mychannel1 -k -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel channel mychannel0 disabled for session mysession2
+Kernel channel mychannel1 disabled for session mysession2
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng disable-channel ustChannel -u -s mysession2
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST channel mychannel0 enabled for session mysession2
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng enable-events ..." with different inputs
+####################################################################
+<SCENARIO>
+EventHandling
+
+# Tracepoint test cases
+
+<COMMAND_INPUT>
+lttng enable-event block_rq_remap,block_bio_remap,softirq_entry -k -s mysession2 --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event block_rq_remap created in channel channel0
+kernel event block_bio_remap created in channel channel0
+kernel event softirq_entry created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession2 -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel tracepoints are enabled in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust_tests_hello:tptest_sighandler created in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event ust_tests_hello:tptest_sighandler -u -s mysession2 -c mychannel --tracepoint --filter 'intfield==10'
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event ust_tests_hello:tptest_sighandler created in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -u -s mysession2 -c mychannel --tracepoint
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All UST tracepoints are enabled in channel mychannel
+</COMMAND_OUTPUT>
+
+# Syscall test cases
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession2 --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel system calls are enabled in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event -a -k -s mysession2 -c mychannel --syscall
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+All kernel system calls are enabled in channel mychannel
+</COMMAND_OUTPUT>
+
+# dynamic probe/function probe test cases
+
+<COMMAND_INPUT>
+lttng enable-event myevent0 -k -s mysession2 --function 0xc0101340
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent0 created in channel mychannel
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent1 -k -s mysession2 -c mychannel --probe init_post
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+kernel event myevent1 created in channel mychannel
+</COMMAND_OUTPUT>
+
+# log level test cases
+
+<COMMAND_INPUT>
+lttng enable-event myevent4 -u -s mysession2 --loglevel-only TRACE_DEBUG
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event myevent4 created in channel channel0
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng enable-event myevent5 -u -s mysession2 -c mychannel --loglevel TRACE_DEBUG_FUNCTION
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST event myevent5 created in channel mychannel
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng add-context -h" and lttng add-context ..." with different inputs
+####################################################################
+
+<SCENARIO>
+ContextHandling
+
+<COMMAND_INPUT>
+lttng add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE
+
+If no channel and no event is given (-c/-e), the context
+will be added to all events and all channels.
+Otherwise the context will be added only to the channel (-c)
+and/or event (-e) indicated.
+Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -e, --event NAME Apply to event
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
+Example:
+This command will add the context information 'prio' and two perf
+counters (hardware branch misses and cache misses), to all events
+in the trace data output:
+# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
+UST context pid added to event sched_kthread_stop_ret channel mychannel
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+<SCENARIO>
+ContextErrorHandling
+
+<COMMAND_INPUT>
+lttng add-context -h
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+usage: lttng add-context -t TYPE
+
+If no channel and no event is given (-c/-e), the context
+will be added to all events and all channels.
+Otherwise the context will be added only to the channel (-c)
+and/or event (-e) indicated.
+Exactly one domain (-k/--kernel or -u/--userspace) must be specified.
+
+Options:
+ -h, --help Show this help
+ --list-options Simple listing of options
+ -s, --session NAME Apply to session name
+ -c, --channel NAME Apply to channel
+ -e, --event NAME Apply to event
+ -k, --kernel Apply to the kernel tracer
+ -u, --userspace Apply to the user-space tracer
+ -t, --type TYPE Context type. You can repeat that option on
+ the command line to specify multiple contexts at once.
+ (--kernel preempts --userspace)
+ TYPE can be one of the strings below:
+ pid, procname, prio, nice, vpid, tid, pthread_id,
+ vtid, ppid, vppid, perf:cpu-cycles, perf:cycles
+Example:
+This command will add the context information 'prio' and two perf
+counters (hardware branch misses and cache misses), to all events
+in the trace data output:
+# lttng add-context -k -t prio -t perf:branch-misses -t perf:cache-misses
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng add-context -s mysession2 -c mychannel -e ust_tests_hello:tptest_sighandler -u -t prio -t pid
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST context prio added to event ust_tests_hello:tptest_sighandle channel mychannel
+UST context pid added to event sched_kthread_stop_ret channel mychannel
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+<SCENARIO>
+CalibrateHandling
+<COMMAND_INPUT>
+lttng calibrate -k --function
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel calibration done
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng calibrate -u --function
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel calibration done
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> with LTTng 2.1 options
+####################################################################
+<SCENARIO>
+CreateSessionLttng2.1
+
+<COMMAND_INPUT>
+lttng create mysession -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in net://172.0.0.1
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create mysession -U file:///tmp
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in file:///tmp
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create mysession -C tcp://172.0.0.1 -D tcp://172.0.0.1:5343
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Control URL tcp://172.0.0.1 set for session mysession
+Data URL tcp://172.0.0.1:5343 set for session mysession
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng create mysession -U net://172.0.0.1:1234:2345
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in net://172.0.0.1:1234:2345
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng -vvv create mysession -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
+DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
+DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
+DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
+Session mysession created.
+Traces will be written in net://172.0.0.1
+DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng -vvv create <session> with LTTng 2.1 options"
+####################################################################
+<SCENARIO>
+CreateSessionLttngVerbose2.1
+<COMMAND_INPUT>
+lttng -vvv create mysession -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+DEBUG3: URI string: net://172.0.0.1 [in uri_parse() at uri.c:253]
+DEBUG2: IP address resolved to 172.0.0.1 [in set_ip_address() at uri.c:132]
+DEBUG3: URI dtype: 1, proto: 1, host: 172.0.0.1, subdir: , ctrl: 0, data: 0 [in uri_parse() at uri.c:467]
+DEBUG1: LSM cmd type : 8 [in send_session_msg() at lttng-ctl.c:261]
+Session mysession created.
+Traces will be written in net://172.0.0.1
+DEBUG1: Init config session in /home/bernd [in config_init() at conf.c:294]
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng -vvv destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
+####################################################################
+<SCENARIO>
+CreateSessionSnapshot
+<COMMAND_INPUT>
+lttng create mysession --snapshot
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
+Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot list-output -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Snapshot output list for session mysession
+ [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ 1) mysession () [inactive snapshot]
+
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ Snapshot recorded successfully for session mysession
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot -U <URL> (LTTng 2.3)
+####################################################################
+<SCENARIO>
+CreateSessionStreamedSnapshot
+<COMMAND_INPUT>
+lttng create mysession --snapshot -U net://172.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Default snapshot output set to: net://172.0.0.1
+Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot list-output -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Snapshot output list for session mysession
+ [2] snapshot-2: net4://172.0.0.1:5342/
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ 1) mysession () [inactive snapshot]
+
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ Snapshot recorded successfully for session mysession
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot (LTTng 2.3)
+####################################################################
+<SCENARIO>
+CreateSessionSnapshotErrors
+<COMMAND_INPUT>
+lttng snapshot list-output -s blabla
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Session name not found
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+#next is not an error case but good to be tested
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ 1) mysession () [active snapshot]
+
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot record -s blabla
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+ Error: Session name not found
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+ Error: Session needs to be started once
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+####################################################################
+# Scenario: Test "lttng create <session> --live [USEC] (LTTng 2.4)
+####################################################################
+<SCENARIO>
+CreateSessionLive
+<COMMAND_INPUT>
+lttng create mysession --live -U net://127.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Traces will be written in net://127.0.0.1
+Live timer set to 1000000 usec
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Available tracing sessions:
+ 1) mysession (net4://127.0.0.1:5342/ [data: 5343]) [inactive]
+
+Use lttng list <session_name> for more details
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
+
+####################################################################
+# Scenario: Test errors for "lttng create <session> --live [USEC] (LTTng 2.4)
+####################################################################
+<SCENARIO>
+CreateSessionLiveErrors
+<COMMAND_INPUT>
+lttng create mysession --live --snapshot
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Snapshot and live modes are mutually exclusive.
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng create mysession --live -U blah
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: URI parse unknown protocol blah
+Error: Unable to parse the URL blah
+Error: Invalid parameter
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng create mysession --live -C net://127.0.0.1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: You need both control and data URL.
+Error: Command error
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+</SCENARIO>
+####################################################################
+# Scenario: Test "lttng create <session> --snapshot (LTTng 2.5)
+####################################################################
+<SCENARIO>
+CreateSessionSnapshot2.5
+<COMMAND_INPUT>
+lttng create mysession --snapshot
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession created.
+Default snapshot output set to: /home/user/lttng-traces/mysession-20130913-141651
+Snapshot mode set. Every channel enabled for that session will be set in overwrite mode and mmap output.
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot list-output -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Snapshot output list for session mysession
+ [1] snapshot-1: /home/user/lttng-traces/mysession-20130913-141651 (max-size: 0)
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ 1) mysession () [inactive snapshot]
+
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng snapshot record -s mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+ Snapshot recorded successfully for session mysession
+</COMMAND_OUTPUT>
+#------------------------------------------------------------------------------
+<COMMAND_INPUT>
+lttng destroy mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Session mysession destroyed.
+</COMMAND_OUTPUT>
+</SCENARIO>
--- /dev/null
+####################################################################
+# 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:
+# Bernd Hufmann - Initial API and implementation
+####################################################################
+####################################################################
+# Scenario: Test lttng list <name> with sample outputs
+####################################################################
+<SCENARIO>
+ListInfoTest
+
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.1.0 - Basse Messe
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Available tracing sessions:
+ 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928) [inactive]
+ 2) mysession (/home/user/lttng-traces/mysession-20120123-083318) [inactive]
+
+ Use lttng list <session_name> for more details
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list mysession
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession: [active]
+ Trace path: /home/user/lttng-traces/mysession-20120129-084256
+
+=== Domain: Kernel ===
+
+Channels:
+-------------
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 262144
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: splice()
+
+ Events:
+ block_rq_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [enabled]
+ block_bio_remap (loglevel: TRACE_EMERG (0)) (type: tracepoint) [disabled]
+ myevent2 (type: probe) [enabled]
+ addr: 0xc0101340
+ myevent0 (type: probe) [enabled]
+ offset: 0x0
+ symbol: init_post
+ syscalls (type: syscall) [enabled]
+
+- channel1: [disabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 524288
+ number of subbufers: 4
+ switch timer interval: 100
+ read timer interval: 400
+ output: splice()
+
+ Events:
+ None
+
+=== Domain: UST global ===
+
+Channels:
+-------------
+- mychannel1: [disabled]
+
+ Attributes:
+ overwrite mode: 1
+ subbufers size: 8192
+ number of subbufers: 8
+ switch timer interval: 200
+ read timer interval: 100
+ output: mmap()
+
+ Events:
+ None
+
+- channel0: [enabled]
+
+ Attributes:
+ overwrite mode: 0
+ subbufers size: 4096
+ number of subbufers: 4
+ switch timer interval: 0
+ read timer interval: 200
+ output: mmap()
+
+ Events:
+ ust_tests_hello:tptest_sighandler (loglevel == TRACE_DEBUG_LINE (13)) (type: tracepoint) [disabled] [with filter]
+ ust_tests_hello:tptest_sighandler1 (loglevel <= TRACE_INFO (7)) (type: tracepoint) [disabled] [with filter]
+ ust_tests_hello:tptest_sighandler2 (loglevel: TRACE_DEBUG_SYSTEM (8)) (type: tracepoint) [disabled] [with filter]
+ * (type: tracepoint) [enabled]
+
+</COMMAND_OUTPUT>
+<COMMAND_INPUT>
+lttng list mysession1
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Tracing session mysession1: [inactive]
+ Trace path: /home/user/lttng-traces/mysession1-20120203-133225
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Kernel events
+-------------
+ sched_kthread_stop (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_kthread_stop_ret (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+ sched_wakeup_new (loglevel: TRACE_EMERG (0)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u -f
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
+ field: doublefield (float)
+ field: floatfield (float)
+ field: stringfield (string)
+
+PID: 4852 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_WARNING (4)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_DEBUG_FUNCTION (12)) (type: tracepoint)
+ field: doublefield (float)
+ field: floatfield (float)
+ field: stringfield (string)
+
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
+
+####################################################################
+# Scenario: Test "lttng list -k" with no kernel and no session daemon
+####################################################################
+<SCENARIO>
+ListInfoTestNoKernel
+
+<COMMAND_INPUT>
+lttng version
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+lttng version 2.0.0 - Annedd'ale
+Web site: http://lttng.org/
+
+lttng is free software and under the GPL license and part LGPL
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+Currently no available tracing session
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -k
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+1
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+<COMMAND_ERROR_OUTPUT>
+Error: Unable to list kernel events
+</COMMAND_ERROR_OUTPUT>
+</COMMAND_OUTPUT>
+
+<COMMAND_INPUT>
+lttng list -u
+</COMMAND_INPUT>
+<COMMAND_RESULT>
+0
+</COMMAND_RESULT>
+<COMMAND_OUTPUT>
+UST events:
+-------------
+
+PID: 9379 - Name: /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ ust_tests_hello:tptest_sighandler (loglevel: TRACE_DEBUG_MODULE (10)) (type: tracepoint)
+ ust_tests_hello:tptest (loglevel: TRACE_INFO (6)) (type: tracepoint)
+
+</COMMAND_OUTPUT>
+
+</SCENARIO>
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.control.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.control.ui;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.control.ui.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.core.expressions,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.lttng2.control.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core,
+ org.eclipse.tracecompass.ctf.core
+Export-Package: org.eclipse.linuxtools.internal.lttng2.control.ui;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui,org.eclipse.tracecompass.lttng2.control.ui.tests,org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.model;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;x-friends:="org.eclipse.tracecompass.lttng2.control.ui.tests"
+Import-Package: com.google.common.collect,
+ org.eclipse.rse.core,
+ org.eclipse.rse.core.model,
+ org.eclipse.rse.core.subsystems,
+ org.eclipse.rse.services,
+ org.eclipse.rse.services.clientserver.messages,
+ org.eclipse.rse.services.files,
+ org.eclipse.rse.services.shells,
+ org.eclipse.rse.services.terminals,
+ org.eclipse.rse.subsystems.files.core.servicesubsystem,
+ org.eclipse.rse.subsystems.files.core.subsystems
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Linux Tools LTTng Control UI Plug-in
+
+views.category.name = LTTng
+control.view.name = Control
+events.view.name = Events
+timeframe.view.name = Time Frame
+controlflow.view.name = Control Flow
+resources.view.name = Resources
+statistics.view.name = Statistics
+histogram.view.name = Histogram
+latency.view.name = Latency View
+
+project.new.category.name = LTTng
+project.new.wizard.name = LTTng Project
+project.new.wizard.description = Create a new LTTng project
+
+project.propertyPage.tracelibPath = LTTng Trace Library Path
+action.set.label = LTTng Action Set
+action.set.description = LTTng Action Set
+
+tracetype.category.lttng= LTTng
+tracetype.type.kernel = Kernel Trace
+
+#Commands and Menus
+commands.trace.category.name = LTTng Trace Commands
+commands.trace.category.description = LTTng Trace Commands
+commands.trace.import = Import Trace
+commands.trace.import.description = Import an LTTng Trace
+commands.trace.open = Open Trace
+commands.trace.open.description = Open an LTTng Trace
+commands.trace.rename = Rename Trace
+commands.trace.rename.description = Rename an LTTng Trace
+commands.trace.delete = Delete Trace
+commands.trace.delete.description = Delete an LTTng Trace
+commands.trace.selectparser = Select Parser
+
+commands.experiment.category.name = LTTng Experiment Commands
+commands.experiment.category.description = LTTng Experiment Commands
+commands.experiment.new = New Experiment
+commands.experiment.new.description = Create a new LTTng Experiment
+commands.experiment.selecttraces = Select Traces
+commands.experiment.selecttraces.description = Select LTTng Traces
+commands.experiment.open = Open Experiment
+commands.experiment.open.description = Open an LTTng Experiment
+commands.experiment.rename = Rename Experiment
+commands.experiment.rename.description = Rename an LTTng Experiment
+commands.experiment.delete = Delete Experiment
+commands.experiment.delete.description = Delete an LTTng Experiment
+
+# LTTng 2.0 trace control commands
+trace.control.rse.system.type.name=LTTng (v2.0)
+trace.control.rse.system.type.description=LTTng Trace Control (v2.0)
+
+commands.control.category=LTTng Trace Control Commands
+commands.control.category.description=LTTng Trace Control Commands
+
+commands.control.new=New Connection...
+commands.control.new.description=New Connection to Target Node
+
+commands.control.connect=Connect
+commands.control.connect.description=Connect to Target Node
+
+commands.control.disconnect=Disconnect
+commands.control.disconnect.description=Disconnect to Target Node
+
+commands.control.refresh=Refresh
+commands.control.refresh.description=Refresh Node Configuration
+
+commands.control.delete=Delete
+commands.control.delete.description=Delete Target Node
+
+commands.control.create.session=Create Session...
+commands.control.create.session.description=Create a Trace Session
+
+commands.control.execute.command.script=Execute Command Script...
+commands.control.execute.command.script.description=Execute Command Script
+
+commands.control.destroy.session=Destroy Session...
+commands.control.destroy.session.description=Destroy a Trace Session
+
+commands.control.enable.channelOnSession=Enable Channel...
+commands.control.enable.channelOnSession.description=Enable a Trace Channel
+
+commands.control.enable.channelOnDomain=Enable Channel...
+commands.control.enable.channelOnDomain.description=Enable a Trace Channel
+
+commands.control.enable.channel=Enable Channel
+commands.control.enable.channel.description=Enable a Trace Channel
+
+commands.control.disable.channel=Disable Channel
+commands.control.disable.channel.description=Disable a Trace Channel
+
+commands.control.start=Start
+commands.control.start.description=Start Trace Session
+
+commands.control.stop=Stop
+commands.control.stop.description=Stop Trace Session
+
+commands.control.assign.event=Enable Event...
+commands.control.assign.event.description=Assign Event to Session and Channel and Enable Event
+
+commands.control.enable.event=Enable Event
+commands.control.enable.event.description=Enable Event
+
+commands.control.enable.eventOnChannel=Enable Event...
+commands.control.enable.eventOnChannel.description=Enable Event
+
+commands.control.enable.eventOnDomain=Enable Event (default channel)...
+commands.control.enable.eventOnDomain.description=Enable Event on Default Channel
+
+commands.control.enable.eventOnSession=Enable Event (default channel)...
+commands.control.enable.eventOnSession.description=Enable Event on Default Channel
+
+commands.control.disable.event=Disable Event
+commands.control.disable.event.description=Disable Event
+
+commands.control.add.context=Add Context...
+commands.control.add.context.description=Add Context to Channel(s) and/or Event(s)
+
+commands.control.import=Import...
+commands.control.import.description=Import Traces to LTTng Project
+
+commands.control.calibrate=Calibrate
+commands.control.calibrate.description=Quantify LTTng overhead
+
+commands.control.snapshot=Record Snapshot
+commands.control.snapshot.description=Record a snapshot
+
+preference.page.control.name=LTTng Tracer Control Preferences
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ id="org.eclipse.linuxtools.lttng2.ui.views"
+ point="org.eclipse.ui.views">
+ <category
+ id="org.eclipse.linuxtools.lttng2.ui.views.category"
+ name="%views.category.name">
+ </category>
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.lttng2.ui.views.category"
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView"
+ icon="icons/eview16/control_view.gif"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.views.control"
+ name="%control.view.name"
+ restorable="true">
+ </view>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.commands">
+ <category
+ description="%commands.control.category.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ name="%commands.control.category">
+ </category>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.new.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.newConnection"
+ name="%commands.control.new">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.connect.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect"
+ name="%commands.control.connect">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.disconnect.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect"
+ name="%commands.control.disconnect">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.refresh.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh"
+ name="%commands.control.refresh">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.delete.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete"
+ name="%commands.control.delete">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.create.session.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession"
+ name="%commands.control.create.session">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.execute.command.script.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.executeScript"
+ name="%commands.control.execute.command.script">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.destroy.session.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession"
+ name="%commands.control.destroy.session">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.import.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
+ name="%commands.control.import">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.channelOnSession.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnSession"
+ name="%commands.control.enable.channelOnSession">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.channelOnDomain.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnDomain"
+ name="%commands.control.enable.channelOnDomain">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.channel.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannel"
+ name="%commands.control.enable.channel">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.disable.channel.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableChannel"
+ name="%commands.control.disable.channel">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.start.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start"
+ name="%commands.control.start">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.stop.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop"
+ name="%commands.control.stop">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.assign.event.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.assign.event"
+ name="%commands.control.assign.event">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.event.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEvent"
+ name="%commands.control.enable.event">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.disable.event.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableEvent"
+ name="%commands.control.disable.event">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.eventOnChannel.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnChannel"
+ name="%commands.control.enable.eventOnChannel">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.eventOnDomain.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnDomain"
+ name="%commands.control.enable.eventOnDomain">
+ </command>
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.enable.eventOnSession.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnSession"
+ name="%commands.control.enable.eventOnSession">
+ </command>
+
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.add.context.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnDomain"
+ name="%commands.control.add.context">
+ </command>
+
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.add.context.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnChannel"
+ name="%commands.control.add.context">
+ </command>
+
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.add.context.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnEvent"
+ name="%commands.control.add.context">
+ </command>
+
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.import.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
+ name="%commands.control.import">
+ </command>
+
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.calibrate.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.calibrate"
+ name="%commands.control.calibrate">
+ </command>
+
+ <command
+ categoryId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.category"
+ description="%commands.control.snapshot.description"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot"
+ name="%commands.control.snapshot">
+ </command>
+
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="toolbar:org.eclipse.linuxtools.internal.lttng2.ui.views.control">
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.newConnection"
+ icon="icons/elcl16/target_add.gif"
+ label="%commands.control.new"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect"
+ icon="icons/elcl16/connect.gif"
+ label="%commands.control.connect"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect"
+ icon="icons/elcl16/disconnect.gif"
+ label="%commands.control.disconnect"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh"
+ icon="icons/elcl16/refresh.gif"
+ label="%commands.control.refresh"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete"
+ icon="icons/elcl16/target_delete.gif"
+ label="%commands.control.delete"
+ style="push">
+ </command>
+ <separator
+ name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator1"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start"
+ icon="icons/elcl16/start_trace.gif"
+ label="%commands.control.start"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop"
+ icon="icons/elcl16/pause_trace.gif"
+ label="%commands.control.stop"
+ style="push">
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession"
+ icon="icons/elcl16/delete_trace.gif"
+ label="%commands.control.destroy.session"
+ style="push">
+ </command>
+ <separator
+ name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator2"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot"
+ icon="icons/elcl16/snapshot.gif"
+ label="%commands.control.snapshot"
+ style="push">
+ </command>
+ <separator
+ name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.toolbar.separator3"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
+ icon="icons/elcl16/import_trace.gif"
+ label="%commands.control.import"
+ style="push">
+ </command>
+
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.linuxtools.internal.lttng2.ui.views.control">
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect"
+ icon="icons/elcl16/connect.gif"
+ label="%commands.control.connect"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect"
+ icon="icons/elcl16/disconnect.gif"
+ label="%commands.control.disconnect"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh"
+ icon="icons/elcl16/refresh.gif"
+ label="%commands.control.refresh"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete"
+ icon="icons/elcl16/target_delete.gif"
+ label="%commands.control.delete"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession"
+ icon="icons/elcl16/add_button.gif"
+ label="%commands.control.create.session"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.executeScript"
+ icon="icons/elcl16/add_button.gif"
+ label="%commands.control.execute.command.script"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start"
+ icon="icons/elcl16/start_trace.gif"
+ label="%commands.control.start"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop"
+ icon="icons/elcl16/pause_trace.gif"
+ label="%commands.control.stop"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession"
+ icon="icons/elcl16/delete_trace.gif"
+ label="%commands.control.destroy.session"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.popup.separator1"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import"
+ icon="icons/elcl16/import_trace.gif"
+ label="%commands.control.import"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <separator
+ name="org.eclipse.linuxtools.internal.lttng2.ui.views.control.popup.separator2"
+ visible="true">
+ </separator>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnSession"
+ icon="icons/elcl16/add_button.gif"
+ label="%commands.control.enable.channelOnSession"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ <not>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ </not>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnSession"
+ icon="icons/obj16/event_enabled.gif"
+ label="%commands.control.enable.eventOnDomain"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnDomain"
+ icon="icons/elcl16/add_button.gif"
+ label="%commands.control.enable.channelOnDomain"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ <not>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </not>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnDomain"
+ icon="icons/elcl16/enable_event.gif"
+ label="%commands.control.enable.eventOnDomain"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannel"
+ icon="icons/elcl16/enable.gif"
+ label="%commands.control.enable.channel"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableChannel"
+ icon="icons/elcl16/disable.gif"
+ label="%commands.control.disable.channel"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.assign.event"
+ icon="icons/elcl16/enable_event.gif"
+ label="%commands.control.assign.event"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEvent"
+ icon="icons/elcl16/enable_event.gif"
+ label="%commands.control.enable.event"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableEvent"
+ icon="icons/elcl16/disable_event.gif"
+ label="%commands.control.disable.event"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnChannel"
+ icon="icons/elcl16/enable_event.gif"
+ label="%commands.control.enable.eventOnChannel"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnDomain"
+ icon="icons/elcl16/add-context.gif"
+ label="%commands.control.add.context"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnChannel"
+ icon="icons/elcl16/add-context.gif"
+ label="%commands.control.add.context"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnEvent"
+ icon="icons/elcl16/add-context.gif"
+ label="%commands.control.add.context"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate
+ ifEmpty="false"
+ operator="and">
+ <and>
+ <or>
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
+ </instanceof>
+ </or>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.isAddContextOnEventSupported">
+ </test>
+ </and>
+ </iterate>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.calibrate"
+ icon="icons/elcl16/calibrate.gif"
+ label="%commands.control.calibrate"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+
+ <command
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot"
+ icon="icons/elcl16/snapshot.gif"
+ label="%commands.control.snapshot"
+ style="push">
+ <visibleWhen
+ checkEnabled="false">
+ <with
+ variable="activeMenuSelection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </visibleWhen>
+ </command>
+
+ </menuContribution>
+
+ </extension>
+ <extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.NewConnectionHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.newConnection">
+ <activeWhen>
+ <with
+ variable="activePart">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView">
+ </instanceof>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.ConnectHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.connect">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DisconnectHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disconnect">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.RefreshHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.refresh">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DeleteHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.delete">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.CreateSessionHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.createSession">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.ExecuteCommandScriptHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.executeScript">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DestroySessionHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.destroySession">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.ImportHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.import">
+ <activeWhen>
+ <with
+ variable="selection">
+ <and>
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ <count
+ value="1">
+ </count>
+ </and>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableChannelOnSessionHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnSession">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableChannelOnDomainHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannelOnDomain">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableChannelHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableChannel">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DisableChannelHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableChannel">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.StartHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.start">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.StopHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.stop">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.SnaphshotHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.snapshot">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AssignEventHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.assign.event">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEvent">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.DisableEventHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.disableEvent">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventOnChannelHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnChannel">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventOnDomainHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnDomain">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.EnableEventOnSessionHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.enableEventOnSession">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AddContextOnDomainHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnDomain">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.CalibrateHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.calibrate">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AddContextOnChannelHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnChannel">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ <handler
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.AddContextOnEventHandler"
+ commandId="org.eclipse.linuxtools.internal.lttng2.ui.commands.control.addContextOnEvent">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate
+ operator="or">
+ <instanceof
+ value="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+
+ </extension>
+
+ <extension
+ point="org.eclipse.rse.core.systemTypes">
+ <systemType
+ description="%trace.control.rse.system.type.description"
+ icon="icons/obj16/systemlttng2.gif"
+ iconLive="icons/obj16/systemlttng2-live.gif"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.control.systemType"
+ label="%trace.control.rse.system.type.name"
+ name="org.eclipse.linuxtools.internal.lttng2.ui.control.systemType"
+ subsystemConfigurationIds="ssh.shells;ssh.files;ssh.terminals;processes.shell.linux">
+ </systemType>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.linuxtools.tmf.ui.TmfTracingPreferences"
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferencePage"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.views.control.preferences"
+ name="%preference.page.control.name">
+ </page>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferenceInitializer">
+ </initializer>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlPropertyTester"
+ id="org.eclipse.linuxtools.internal.lttng2.ui.views.control.model.propertyTester"
+ namespace="org.eclipse.linuxtools.internal.lttng2.ui.views.control.model"
+ properties="isAddContextOnEventSupported"
+ type="org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent">
+ </propertyTester>
+ </extension>
+
+
+</plugin>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.control.ui</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Trace Compass LTTng Control UI Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConnectionManager;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.control.ui"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ------------------------------------------------------------------------
+ // AbstractUIPlugin
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ ControlPreferences.getInstance().init(getPreferenceStore());
+ // This registers the connection manager with the signal manager
+ LttngRelaydConnectionManager.getInstance();
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ ControlPreferences.getInstance().dispose();
+ LttngRelaydConnectionManager.getInstance().dispose();
+ plugin = null;
+ super.stop(context);
+ }
+
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Gets an image object using given path within plug-in.
+ *
+ * @param path path to image file
+ *
+ * @return image object
+ */
+ public Image getImageFromPath(String path) {
+ return getImageDescripterFromPath(path).createImage();
+ }
+
+ /**
+ * Gets an image descriptor using given path within plug-in.
+ *
+ * @param path path to image file
+ *
+ * @return image descriptor object
+ */
+ public ImageDescriptor getImageDescripterFromPath(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Gets a image object from the image registry based on the given path.
+ * If the image is not in the registry it will be registered.
+ *
+ * @param path to the image file
+ * @return image object
+ */
+ public Image getImageFromImageRegistry(String path) {
+ Image icon = getImageRegistry().get(path);
+ if (icon == null) {
+ icon = getImageDescripterFromPath(path).createImage();
+ plugin.getImageRegistry().put(path, icon);
+ }
+ return icon;
+ }
+
+ /**
+ * Loads the image in the plug-ins image registry (if necessary) and returns the image
+ * @param url - URL relative to the Bundle
+ * @return the image
+ */
+ public Image loadIcon(String url) {
+ String key = plugin.getBundle().getSymbolicName() + "/" + url; //$NON-NLS-1$
+ Image icon = plugin.getImageRegistry().get(key);
+ if (icon == null) {
+ URL imageURL = plugin.getBundle().getResource(url);
+ ImageDescriptor descriptor = ImageDescriptor.createFromURL(imageURL);
+ icon = descriptor.createImage();
+ plugin.getImageRegistry().put(key, icon);
+ }
+ return icon;
+ }
+
+ /**
+ * Logs a message with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logInfo(String message) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logInfo(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logWarning(String message) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logWarning(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logError(String message) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logError(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Marc-Andre Laperle - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
+
+/**
+ * A class that holds information about the relayd connection.
+ *
+ * @author Marc-Andre Laperle
+ * @since 3.1
+ */
+public final class LttngRelaydConnectionInfo {
+
+ private final String fHost;
+ private final int fPort;
+ private final String fSessionName;
+
+ /**
+ * Constructs a connection information.
+ *
+ * @param host
+ * the host string
+ * @param port
+ * the port number
+ * @param sessionName
+ * the session name
+ */
+ public LttngRelaydConnectionInfo(String host, int port, String sessionName) {
+ fHost = host;
+ fPort = port;
+ fSessionName = sessionName;
+ }
+
+ /**
+ * Get the host string.
+ *
+ * @return the host string
+ */
+ public String getHost() {
+ return fHost;
+ }
+
+ /**
+ * Get the port number.
+ *
+ * @return the port number
+ */
+ public int getPort() {
+ return fPort;
+ }
+
+ /**
+ * Get the session name.
+ *
+ * @return the session name
+ */
+ public String getSessionName() {
+ return fSessionName;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((fHost == null) ? 0 : fHost.hashCode());
+ result = prime * result + fPort;
+ result = prime * result + ((fSessionName == null) ? 0 : fSessionName.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ LttngRelaydConnectionInfo other = (LttngRelaydConnectionInfo) obj;
+ if (fHost == null) {
+ if (other.fHost != null) {
+ return false;
+ }
+ } else if (!fHost.equals(other.fHost)) {
+ return false;
+ }
+ if (fPort != other.fPort) {
+ return false;
+ }
+ if (fSessionName == null) {
+ if (other.fSessionName != null) {
+ return false;
+ }
+ } else if (!fSessionName.equals(other.fSessionName)) {
+ return false;
+ }
+ return true;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Marc-Andre Laperle - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfConstants;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Manages relayd connections. When a trace is opened, it creates a connection
+ * if the trace was started with live support. When a trace is closed, is closes
+ * the connection.
+ *
+ * @author Marc-Andre Laperle
+ * @since 3.1
+ */
+public final class LttngRelaydConnectionManager {
+ private static LttngRelaydConnectionManager fConnectionManager;
+ private Map<LttngRelaydConnectionInfo, LttngRelaydConsumer> fConnections = new HashMap<>();
+
+ /**
+ * Get an instance of the trace manager.
+ *
+ * @return The trace manager
+ */
+ public static synchronized LttngRelaydConnectionManager getInstance() {
+ if (fConnectionManager == null) {
+ fConnectionManager = new LttngRelaydConnectionManager();
+ TmfSignalManager.register(fConnectionManager);
+ }
+ return fConnectionManager;
+ }
+
+ /**
+ * Get the cosumer for the given relayd connection information.
+ *
+ * @param connectionInfo
+ * the connection information
+ *
+ * @return the consumer
+ */
+ public LttngRelaydConsumer getConsumer(final LttngRelaydConnectionInfo connectionInfo) {
+ if (!fConnections.containsKey(connectionInfo)) {
+ LttngRelaydConsumer lttngRelaydConsumer = new LttngRelaydConsumer(connectionInfo);
+ fConnections.put(connectionInfo, lttngRelaydConsumer);
+ return lttngRelaydConsumer;
+ }
+
+ return fConnections.get(connectionInfo);
+ }
+
+ private static LttngRelaydConnectionInfo getEntry(final ITmfTrace trace) throws CoreException {
+ if (trace instanceof CtfTmfTrace) {
+ CtfTmfTrace ctfTmfTrace = (CtfTmfTrace) trace;
+ if (!ctfTmfTrace.isComplete()) {
+ IResource resource = ctfTmfTrace.getResource();
+ String host = resource.getPersistentProperty(CtfConstants.LIVE_HOST);
+ String port = resource.getPersistentProperty(CtfConstants.LIVE_PORT);
+ String sessionName = resource.getPersistentProperty(CtfConstants.LIVE_SESSION_NAME);
+ if (host != null && port != null && sessionName != null && !sessionName.isEmpty()) {
+ LttngRelaydConnectionInfo entry = new LttngRelaydConnectionInfo(host, Integer.parseInt(port), sessionName);
+ return entry;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Listen to trace opened so that we can start the relayd job if necessary.
+ *
+ * @param signal
+ * the signal to be processed
+ */
+ @TmfSignalHandler
+ public void traceOpened(final TmfTraceOpenedSignal signal) {
+
+ try {
+ LttngRelaydConnectionInfo entry = getEntry(signal.getTrace());
+ if (entry != null) {
+ LttngRelaydConsumer consumer = getConsumer(entry);
+ consumer.connect();
+ consumer.run((CtfTmfTrace) signal.getTrace());
+ }
+ } catch (CoreException e) {
+ Activator.getDefault().logError(Messages.LttngRelaydConnectionManager_ConnectionError, e);
+ ErrorDialog.openError(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), null, Messages.LttngRelaydConnectionManager_ConnectionError, new Status(IStatus.WARNING,
+ Activator.PLUGIN_ID, e.getLocalizedMessage(), e));
+ }
+ }
+
+ /**
+ * Listen to trace closed so that we can stop the relayd job.
+ *
+ * @param signal
+ * the signal to be processed
+ */
+ @TmfSignalHandler
+ public void traceClosed(final TmfTraceClosedSignal signal) {
+ LttngRelaydConnectionInfo entry;
+ try {
+ entry = getEntry(signal.getTrace());
+ if (entry != null) {
+ LttngRelaydConsumer comsumer = getConsumer(entry);
+ if (comsumer != null) {
+ comsumer.dispose();
+ }
+ fConnections.remove(entry);
+ }
+ } catch (CoreException e) {
+ // Something went wrong with the resource. That's OK, the trace is
+ // getting closed anyway.
+ }
+ }
+
+ /**
+ * Dispose of all the manager's resources (i.e. its connections).
+ */
+ public void dispose() {
+ for (LttngRelaydConsumer consumer : fConnections.values()) {
+ consumer.dispose();
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.Socket;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.ILttngRelaydConnector;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.LttngRelaydConnectorFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachReturnCode;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionReturnCode;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.NextIndexReturnCode;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceRangeUpdatedSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTimestamp;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+
+/**
+ * Consumer of the relay d.
+ *
+ * @author Matthew Khouzam
+ * @since 3.1
+ */
+public final class LttngRelaydConsumer {
+
+ private static final int SIGNAL_THROTTLE_NANOSEC = 10_000_000;
+ private static final String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
+
+ private Job fConsumerJob;
+ private CtfTmfTrace fCtfTmfTrace;
+ private CTFTrace fCtfTrace;
+ private long fTimestampEnd;
+ private AttachSessionResponse fSession;
+ private Socket fConnection;
+ private ILttngRelaydConnector fRelayd;
+ private String fTracePath;
+ private long fLastSignal = 0;
+ private final LttngRelaydConnectionInfo fConnectionInfo;
+
+ /**
+ * Start a lttng consumer.
+ *
+ * @param address
+ * the ip address in string format
+ * @param port
+ * the port, an integer
+ * @param sessionName
+ * the session name
+ * @param project
+ * the default project
+ */
+ LttngRelaydConsumer(final LttngRelaydConnectionInfo connectionInfo) {
+ fConnectionInfo = connectionInfo;
+ fTimestampEnd = 0;
+ }
+
+ /**
+ * Connects to the relayd at the given address and port then attaches to the
+ * given session name.
+ *
+ * @throws CoreException
+ * If something goes wrong during the connection
+ * <ul>
+ * <li>
+ * Connection could not be established (Socket could not be
+ * opened, etc)</li>
+ * <li>
+ * Connection timeout</li>
+ * <li>
+ * The session was not found</li>
+ * <li>
+ * Could not create viewer session</li>
+ * <li>
+ * Invalid trace (no metadata, no streams)</li>
+ * </ul>
+ */
+ public void connect() throws CoreException {
+ if (fConnection != null) {
+ return;
+ }
+
+ try {
+ fConnection = new Socket(fConnectionInfo.getHost(), fConnectionInfo.getPort());
+ fRelayd = LttngRelaydConnectorFactory.getNewConnector(fConnection);
+ List<SessionResponse> sessions = fRelayd.getSessions();
+ SessionResponse selectedSession = null;
+ for (SessionResponse session : sessions) {
+ String asessionName = nullTerminatedByteArrayToString(session.getSessionName().getBytes());
+
+ if (asessionName.equals(fConnectionInfo.getSessionName())) {
+ selectedSession = session;
+ break;
+ }
+ }
+
+ if (selectedSession == null) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_SessionNotFound));
+ }
+
+ CreateSessionResponse createSession = fRelayd.createSession();
+ if (createSession.getStatus() != CreateSessionReturnCode.LTTNG_VIEWER_CREATE_SESSION_OK) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_CreateViewerSessionError + createSession.getStatus().toString()));
+ }
+
+ AttachSessionResponse attachedSession = fRelayd.attachToSession(selectedSession);
+ if (attachedSession.getStatus() != AttachReturnCode.VIEWER_ATTACH_OK) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_AttachSessionError + attachedSession.getStatus().toString()));
+ }
+
+ String metadata = fRelayd.getMetadata(attachedSession);
+ if (metadata == null) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_NoMetadata));
+ }
+
+ List<StreamResponse> attachedStreams = attachedSession.getStreamList();
+ if (attachedStreams.isEmpty()) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_NoStreams));
+ }
+
+ fTracePath = nullTerminatedByteArrayToString(attachedStreams.get(0).getPathName().getBytes());
+
+ fSession = attachedSession;
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_ErrorConnecting + (e.getMessage() != null ? e.getMessage() : ""))); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Run the consumer operation for a give trace.
+ *
+ * @param trace
+ * the trace
+ */
+ public void run(final CtfTmfTrace trace) {
+ if (fSession == null) {
+ return;
+ }
+
+ fCtfTmfTrace = trace;
+ fCtfTrace = trace.getCTFTrace();
+ fConsumerJob = new Job("RelayD consumer") { //$NON-NLS-1$
+
+ @Override
+ protected IStatus run(final IProgressMonitor monitor) {
+ try {
+ while (!monitor.isCanceled()) {
+ List<StreamResponse> attachedStreams = fSession.getStreamList();
+ for (StreamResponse stream : attachedStreams) {
+ if (stream.getMetadataFlag() != 1) {
+ IndexResponse indexReply = fRelayd.getNextIndex(stream);
+ if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_OK) {
+ long nanoTimeStamp = fCtfTrace.timestampCyclesToNanos(indexReply.getTimestampEnd());
+ if (nanoTimeStamp > fTimestampEnd) {
+ CtfTmfTimestamp endTime = new CtfTmfTimestamp(nanoTimeStamp);
+ TmfTimeRange range = new TmfTimeRange(fCtfTmfTrace.getStartTime(), endTime);
+
+ long currentTime = System.nanoTime();
+ if (currentTime - fLastSignal > SIGNAL_THROTTLE_NANOSEC) {
+ TmfTraceRangeUpdatedSignal signal = new TmfTraceRangeUpdatedSignal(LttngRelaydConsumer.this, fCtfTmfTrace, range);
+ fCtfTmfTrace.broadcastAsync(signal);
+ fLastSignal = currentTime;
+ }
+ fTimestampEnd = nanoTimeStamp;
+ }
+ } else if (indexReply.getStatus() == NextIndexReturnCode.VIEWER_INDEX_HUP) {
+ // The trace is now complete because the trace session was destroyed
+ fCtfTmfTrace.setComplete(true);
+ TmfTraceRangeUpdatedSignal signal = new TmfTraceRangeUpdatedSignal(LttngRelaydConsumer.this, fCtfTmfTrace, new TmfTimeRange(fCtfTmfTrace.getStartTime(), new CtfTmfTimestamp(fTimestampEnd)));
+ fCtfTmfTrace.broadcastAsync(signal);
+ return Status.OK_STATUS;
+ }
+ }
+ }
+ }
+ } catch (IOException e) {
+ Activator.getDefault().logError("Error during live trace reading", e); //$NON-NLS-1$
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngRelaydConsumer_ErrorLiveReading + (e.getMessage() != null ? e.getMessage() : "")); //$NON-NLS-1$
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ fConsumerJob.setSystem(true);
+ fConsumerJob.schedule();
+ }
+
+ /**
+ * Dispose the consumer and it's resources (sockets, etc).
+ */
+ public void dispose() {
+ try {
+ if (fConsumerJob != null) {
+ fConsumerJob.cancel();
+ fConsumerJob.join();
+ }
+ if (fConnection != null) {
+ fConnection.close();
+ }
+ if (fRelayd != null) {
+ fRelayd.close();
+ }
+ } catch (IOException e) {
+ // Ignore
+ } catch (InterruptedException e) {
+ // Ignore
+ }
+ }
+
+ /**
+ * Once the consumer is connected to the relayd session, it knows the trace
+ * path. This can be useful to know exactly where the trace is so that it
+ * can be imported into the workspace and it can be opened.
+ *
+ * @return the trace path
+ */
+ public String getTracePath() {
+ return fTracePath;
+ }
+
+ private static String nullTerminatedByteArrayToString(final byte[] byteArray) throws UnsupportedEncodingException {
+ // Find length of null terminated string
+ int length = 0;
+ while (length < byteArray.length && byteArray[length] != 0) {
+ length++;
+ }
+
+ String asessionName = new String(byteArray, 0, length, ENCODING_UTF_8);
+ return asessionName;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Marc-Andre Laperle - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.relayd;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages for the relayd connection.
+ *
+ * @author Marc-Andre Laperle
+ */
+public final class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.messages"; //$NON-NLS-1$
+
+ /**
+ * Error occurred establishing the connection.
+ */
+ public static String LttngRelaydConnectionManager_ConnectionError;
+
+ /**
+ * Error occurred attaching to the session.
+ */
+ public static String LttngRelaydConsumer_AttachSessionError;
+
+ /**
+ * Error occurred creating the viewer session.
+ */
+ public static String LttngRelaydConsumer_CreateViewerSessionError;
+
+ /**
+ * Error occurred connecting to the relayd.
+ */
+ public static String LttngRelaydConsumer_ErrorConnecting;
+
+ /**
+ * Error (generic) during live reading.
+ */
+ public static String LttngRelaydConsumer_ErrorLiveReading;
+
+ /**
+ * No metadata for this trace session.
+ */
+ public static String LttngRelaydConsumer_NoMetadata;
+
+ /**
+ * No streams for this trace session.
+ */
+ public static String LttngRelaydConsumer_NoStreams;
+
+ /**
+ * The session was not found by the relayd.
+ */
+ public static String LttngRelaydConsumer_SessionNotFound;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2014 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:
+# Marc-Andre Laperle - initial API and implementation
+###############################################################################
+
+LttngRelaydConnectionManager_ConnectionError=The connection to the relayd could not be established. The trace cannot be opened in Live mode.
+LttngRelaydConsumer_AttachSessionError=Error, could not attach to session, error code:
+LttngRelaydConsumer_CreateViewerSessionError=Error, could not create viewer session, error code:
+LttngRelaydConsumer_ErrorConnecting=Error connecting to live trace session.
+LttngRelaydConsumer_ErrorLiveReading=Error during live trace reading.
+LttngRelaydConsumer_NoMetadata=Error, trace has no metadata.
+LttngRelaydConsumer_NoStreams=Error, has no streams.
+LttngRelaydConsumer_SessionNotFound=Error, live session not found
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2009, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ * Bernd Hufmann - Filled with content
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.viewers.ColumnViewerToolTipSupport;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlContentProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlLabelProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlRoot;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.part.ViewPart;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * <p>
+ * View implementation for Trace Control.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ControlView extends ViewPart implements ITraceControlComponentChangedListener {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * View ID.
+ */
+ public static final String ID = "org.eclipse.linuxtools.internal.lttng2.ui.views.control"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The tree viewer.
+ */
+ private TreeViewer fTreeViewer = null;
+
+ /**
+ * The trace control root node. This provides access to the whole model.
+ */
+ private ITraceControlComponent fRoot = null;
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the trace control tree node (model)
+ *
+ * @return the trace control tree node (model).
+ */
+ public ITraceControlComponent getTraceControlRoot() {
+ return fRoot;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void createPartControl(Composite parent) {
+ // Create tree viewer
+ fTreeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ ColumnViewerToolTipSupport.enableFor(fTreeViewer);
+
+ fTreeViewer.setContentProvider(new TraceControlContentProvider());
+ fTreeViewer.setLabelProvider(new TraceControlLabelProvider());
+
+ // Create model root
+ fRoot = new TraceControlRoot();
+ fRoot.addComponentListener(this);
+ fTreeViewer.setInput(fRoot);
+
+ // Create context menu for the tree viewer
+ createContextMenu();
+
+ getSite().setSelectionProvider(fTreeViewer);
+
+ RSECorePlugin.getTheSystemRegistry(); // to load RSE
+ }
+
+ @Override
+ public void setFocus() {
+ fTreeViewer.getControl().setFocus();
+ }
+
+ @Override
+ public void componentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
+ componentChanged(parent);
+ }
+
+ @Override
+ public void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
+ componentChanged(parent);
+ }
+
+ @Override
+ public void componentChanged(final ITraceControlComponent component) {
+ if (fTreeViewer.getTree().isDisposed()) {
+ return;
+ }
+
+ UIJob myJob = new UIJob("Refresh") { //$NON-NLS-1$
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ if (fTreeViewer.getTree().isDisposed()) {
+ return Status.OK_STATUS;
+ }
+
+ fTreeViewer.refresh(component);
+
+ // Change selection needed
+ final ISelection sel = fTreeViewer.getSelection();
+ fTreeViewer.setSelection(null);
+ fTreeViewer.setSelection(sel);
+
+ // Show component that was changed
+ fTreeViewer.reveal(component);
+
+ return Status.OK_STATUS;
+ }
+ };
+ myJob.setUser(false);
+ myJob.setSystem(true);
+ myJob.schedule();
+ }
+
+ /**
+ * Sets the selected component in the tree
+ * @param component - component to select
+ */
+ public void setSelection(ITraceControlComponent component) {
+ ITraceControlComponent[] components = new ITraceControlComponent[1];
+ components[0] = component;
+ setSelection(components);
+ }
+
+ /**
+ * Sets the selected components in the tree
+ * @param components - array of components to select
+ */
+ public void setSelection(ITraceControlComponent[] components) {
+ final StructuredSelection selection = new StructuredSelection(components);
+ UIJob myJob = new UIJob("Select") { //$NON-NLS-1$
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+ fTreeViewer.setSelection(selection);
+ return Status.OK_STATUS;
+ }
+ };
+ myJob.setUser(false);
+ myJob.schedule();
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+ /**
+ * Creates the context sensitive menu.
+ */
+ private void createContextMenu() {
+ // First we create a menu Manager
+ final MenuManager menuManager = new MenuManager();
+ final Menu menu = menuManager.createContextMenu(fTreeViewer.getTree());
+ // Set the MenuManager
+ fTreeViewer.getTree().setMenu(menu);
+ getSite().registerContextMenu(menuManager, fTreeViewer);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * <p>
+ * Dialog box for collecting information about contexts to be added to channels/events.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class AddContextDialog extends Dialog implements IAddContextDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String ADD_CONTEXT_ICON_FILE = "icons/elcl16/add-context.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * A tree viewer for displaying and selection of available contexts.
+ */
+ private CheckboxTreeViewer fContextsViewer;
+
+ /**
+ * A Tree model for the checkbox tree viewer.
+ */
+ private final ContextModel fContextModel = new ContextModel();
+
+ /**
+ * The contexts to add.
+ */
+ private final List<String> fSelectedContexts = new ArrayList<>();
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public AddContextDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void setAvalibleContexts(List<String> contexts) {
+ fContextModel.setAvalibleContexts(contexts);
+ }
+
+ @Override
+ public List<String> getContexts() {
+ List<String> ret = new ArrayList<>();
+ ret.addAll(fSelectedContexts);
+ return ret;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_AddContextDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(ADD_CONTEXT_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ Composite dialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ dialogComposite.setLayout(layout);
+ dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // Contexts list
+ Group contextGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ contextGroup.setText(Messages.TraceControl_AddContextAvailableContextsLabel);
+ layout = new GridLayout(1, true);
+ contextGroup.setLayout(layout);
+ contextGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ fContextsViewer = new CheckboxTreeViewer(contextGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ fContextsViewer.getTree().setToolTipText(Messages.TraceControl_AddContextAvailableContextsTooltip);
+
+ fContextsViewer.setContentProvider(new ContextsContentProvider());
+ fContextsViewer.setLabelProvider(new ContextsLabelProvider());
+ fContextsViewer.addCheckStateListener(new ContextCheckListener());
+ fContextsViewer.setInput(fContextModel);
+ fContextsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ getShell().setMinimumSize(new Point(500, 450));
+
+ return dialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void okPressed() {
+ fSelectedContexts.clear();
+
+ Object[] checkedElements = fContextsViewer.getCheckedElements();
+ for (int i = 0; i < checkedElements.length; i++) {
+ IContextModelComponent component = (IContextModelComponent)checkedElements[i];
+ if (!Messages.TraceControl_AddContextAllLabel.equals(component.getName())) {
+ fSelectedContexts.add(component.getName());
+ }
+ }
+
+ // validation successful -> call super.okPressed()
+ super.okPressed();
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper classes and methods
+ // ------------------------------------------------------------------------
+ /**
+ * Content provider for the contexts tree
+ */
+ public static final class ContextsContentProvider implements ITreeContentProvider {
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof IContextModelComponent) {
+ return ((IContextModelComponent)parentElement).getChildren();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof IContextModelComponent) {
+ return ((IContextModelComponent)element).getParent();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof IContextModelComponent) {
+ return ((IContextModelComponent)element).hasChildren();
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Label provider for the contexts tree
+ */
+ public static final class ContextsLabelProvider extends ColumnLabelProvider {
+ @Override
+ public String getText(Object element) {
+
+ if ((element != null) && (element instanceof IContextModelComponent)) {
+ return ((IContextModelComponent)element).getName();
+ }
+
+ return "";//$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Check state listener for the contexts tree.
+ */
+ public final class ContextCheckListener implements ICheckStateListener {
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ if (event.getChecked()) {
+ if (event.getElement() instanceof AllContexts) {
+ fContextsViewer.setSubtreeChecked(event.getElement(), true);
+ }
+ } else {
+ if (event.getElement() instanceof AllContexts) {
+ fContextsViewer.setSubtreeChecked(event.getElement(), false);
+ } else {
+ IContextModelComponent component = (IContextModelComponent) event.getElement();
+ fContextsViewer.setChecked(component.getParent(), false);
+ }
+ }
+ }
+ }
+
+ /**
+ * Model for the context tree viewer (root component)
+ */
+ public static class ContextModel implements IContextModelComponent {
+
+ private final AllContexts fAllContexts;
+
+ /**
+ * Constructor
+ */
+ public ContextModel() {
+ fAllContexts = new AllContexts(this);
+ }
+
+ /**
+ * Sets the available contexts
+ *
+ * @param contexts
+ * The contexts to set
+ */
+ public void setAvalibleContexts(List<String> contexts) {
+ fAllContexts.setAvalibleContexts(contexts);
+ }
+
+ @Override
+ public String getName() {
+ return "root"; //$NON-NLS-1$
+ }
+
+ @Override
+ public Object getParent() {
+ return null;
+ }
+
+ @Override
+ public Object[] getChildren() {
+ Object[] ret = new Object[1];
+ ret[0] = fAllContexts;
+ return ret;
+ }
+
+ @Override
+ public boolean hasChildren() {
+ return true;
+ }
+ }
+
+ /**
+ * Model element (to select/deselect) all contexts) for the context tree viewer
+ */
+ public static class AllContexts implements IContextModelComponent {
+ /**
+ * The available list of contexts.
+ */
+ private List<Context> fAvailableContexts;
+
+ private final IContextModelComponent fParent;
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * The parent component
+ */
+ public AllContexts(IContextModelComponent parent) {
+ fParent = parent;
+ }
+
+ /**
+ * Sets the available contexts
+ *
+ * @param contexts
+ * The contexts to set
+ */
+ public void setAvalibleContexts(List<String> contexts) {
+ fAvailableContexts = new ArrayList<>();
+ if (contexts != null) {
+ for (Iterator<String> iterator = contexts.iterator(); iterator.hasNext();) {
+ String name = iterator.next();
+ fAvailableContexts.add(new Context(this, name));
+ }
+ }
+ }
+
+ @Override
+ public String getName() {
+ return Messages.TraceControl_AddContextAllLabel;
+ }
+
+ @Override
+ public Object[] getChildren() {
+ return fAvailableContexts.toArray();
+ }
+
+ @Override
+ public Object getParent() {
+ return fParent;
+ }
+
+ @Override
+ public boolean hasChildren() {
+ return true;
+ }
+ }
+
+ /**
+ * Model element (the context) for the context tree viewer
+ */
+ public static class Context implements IContextModelComponent {
+
+ private final String fContextName;
+ private final IContextModelComponent fParent;
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * The parent component
+ * @param name
+ * The name of this context
+ */
+ public Context(IContextModelComponent parent, String name) {
+ fParent = parent;
+ fContextName = name;
+ }
+
+ @Override
+ public String getName() {
+ return fContextName;
+ }
+
+ @Override
+ public Object getParent() {
+ return fParent;
+ }
+
+ @Override
+ public Object[] getChildren() {
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren() {
+ return false;
+ }
+ }
+
+ /**
+ * Interface for the tree model used for the context tree viewer.
+ */
+ public interface IContextModelComponent {
+
+ /**
+ * @return The name of this component
+ */
+ String getName();
+
+ /**
+ * @return The parent component
+ */
+ Object getParent();
+
+ /**
+ * @return The array of children of this component
+ */
+ Object[] getChildren();
+
+ /**
+ * @return If this component has children or not
+ */
+ boolean hasChildren();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * <p>
+ * Confirmation dialog implementation.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+
+public class ConfirmDialog implements IConfirmDialog {
+
+ @Override
+ public boolean openConfirm(Shell parent, String title, String message) {
+ return MessageDialog.openConfirm(parent,
+ Messages.TraceControl_DestroyConfirmationTitle,
+ Messages.TraceControl_DestroyConfirmationMessage);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.TitleAreaDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * <p>
+ * Dialog box for collecting session creation information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class CreateSessionDialog extends TitleAreaDialog implements ICreateSessionDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String CREATE_SESSION_ICON_FILE = "icons/elcl16/add_button.gif"; //$NON-NLS-1$
+
+ /**
+ * To indicate that the default value will be used for this field
+ */
+ private static final String DEFAULT_TEXT = "<" + Messages.EnableChannelDialog_DefaultMessage + ">"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ /**
+ * The default port for the connection to Relayd. This actual value is
+ * needed because this is not an optional argument to a command; this is
+ * what is used to connect directly to Relayd from Java through a socket.
+ * There is also currently no way to know the default value by issuing a
+ * command.
+ */
+ private static final int DEFAULT_LIVE_PORT = 5344;
+
+ /**
+ * The default address for the connection to Relayd. Only local is supported
+ * for now. See above comment for why it's needed.
+ */
+ private static final String DEFAULT_LIVE_URL = "127.0.0.1"; //$NON-NLS-1$
+
+ /**
+ * Supported network protocols for streaming
+ */
+ private enum StreamingProtocol {
+ /** Default network protocol for IPv4 (TCP)*/
+ net,
+ /** Default network protocol for IPv6 (TCP)*/
+ net6,
+ /** File */
+ file,
+ }
+
+ /**
+ * Supported network protocols for Live tracing
+ */
+ private enum LiveProtocol {
+ /** Default network protocol for IPv4 (TCP)*/
+ net,
+ /** Default network protocol for IPv6 (TCP)*/
+ net6
+ }
+
+ private enum StreamingProtocol2 {
+ /** Default network protocol for IPv4 (TCP)*/
+ net,
+ /** Default network protocol for IPv6 (TCP)*/
+ net6,
+ /** TCP network protocol for IPv4*/
+ tcp,
+ /** TCP network protocol for IPv6*/
+ tcp6 }
+
+ /**
+ * Index of last supported streaming protocol for common URL configuration.
+ */
+ private static final int COMMON_URL_LAST_INDEX = 1;
+ /**
+ * Index of default streaming protocol.
+ */
+ private static final int DEFAULT_URL_INDEX = 0;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The dialog composite.
+ */
+ private Composite fDialogComposite = null;
+ /**
+ * The text widget for the session name
+ */
+ private Text fSessionNameText = null;
+ /**
+ * The label widget for the session path.
+ */
+ private Label fSessionPathLabel = null;
+ /**
+ * The text widget for the session path.
+ */
+ private Text fSessionPathText = null;
+ /**
+ * The button widget to select a normal session
+ */
+ private Button fNormalModeButton = null;
+ /**
+ * The button widget to select a snapshot session
+ */
+ private Button fSnapshotButton = null;
+ /**
+ * The group that contains the mutually exclusive mode buttons
+ */
+ private Group fModeButtonGroup = null;
+ /**
+ * The button widget to select a live session
+ */
+ private Button fLiveButton = null;
+
+ /**
+ * The text widget to set a live delay
+ */
+ private Text fLiveDelayText = null;
+ /**
+ * The Group for advanced configuration.
+ */
+ private Group fAdvancedGroup = null;
+ /**
+ * The button to show advanced options.
+ */
+ private Button fAdvancedButton = null;
+ /**
+ * The composite with streaming configuration parameter.
+ */
+ private Composite fStreamingComposite = null;
+ /**
+ * The text widget for the trace path.
+ */
+ private Text fTracePathText = null;
+ /**
+ * The button to link data protocol/Address with control protocol.
+ */
+ private Button fLinkDataWithControlButton = null;
+ /**
+ * The Combo box for channel protocol selection.
+ */
+ private CCombo fControlProtocolCombo = null;
+ /**
+ * A selection listener that copies the protocol from control to data when being linked.
+ */
+ private ControlProtocolSelectionListener fCopyProtocolSelectionListener;
+ /**
+ * A selection listener updates the control port text depending on the control protocol selected.
+ */
+ private ProtocolComboSelectionListener fControlProtocolSelectionListener;
+ /**
+ * A selection listener updates the data port text depending on the data protocol selected.
+ */
+ private ProtocolComboSelectionListener fDataProtocolSelectionListener;
+ /**
+ * The text box for the host/IP address of the control channel.
+ */
+ private Text fControlHostAddressText = null;
+ /**
+ * A key listener that copies the host address from control to data when being linked.
+ */
+ private CopyModifyListener fControlUrlKeyListener;
+ /**
+ * A modify listener that updates the enablement of the dialog.
+ */
+ private UpdateEnablementModifyListener fUpdateEnablementModifyListener;
+ /**
+ * The text box for the control port.
+ */
+ private Text fControlPortText = null;
+ /**
+ * The Combo box for data protocol selection.
+ */
+ private CCombo fDataProtocolCombo = null;
+ /**
+ * The text box for the host/IP address of the data channel.
+ */
+ private Text fDataHostAddressText = null;
+ /**
+ * The text box for the data port.
+ */
+ private Text fDataPortText = null;
+ /**
+ * The parent where the new node should be added.
+ */
+ private TraceSessionGroup fParent = null;
+ /**
+ * The session name string.
+ */
+ private String fSessionName = ""; //$NON-NLS-1$;
+ /**
+ * The session path string.
+ */
+ private String fSessionPath = null;
+ /**
+ * Flag whether the session is snapshot or not
+ */
+ private boolean fIsSnapshot = false;
+ /**
+ * Flag whether the session is live or not
+ */
+ private boolean fIsLive = false;
+ /**
+ * The text box for the live address (relayd).
+ */
+ private Text fLiveHostAddressText = null;
+ /**
+ * The text box for the live port (relayd).
+ */
+ private Text fLivePortText = null;
+ /**
+ * The live delay
+ */
+ private Integer fLiveDelay = 0;
+ /**
+ * The live url.
+ */
+ private String fLiveUrl = null;
+ /**
+ * The live port.
+ */
+ private Integer fLivePort = 0;
+ /**
+ * Flag whether default location (path) shall be used or not
+ */
+ private boolean fIsDefaultPath = true;
+ /**
+ * Flag whether the advanced options are enabled or not
+ */
+ private boolean fIsAdvancedEnabled = false;
+ /**
+ * The network URL in case control and data is configured together.
+ * If set, fControlUrl and fDataUrl will be null.
+ */
+ private String fNetworkUrl = null;
+ /**
+ * The control URL in case control and data is configured separately.
+ * If set, fDataUrl will be set too and fNetworkUrl will be null.
+ */
+ private String fControlUrl = null;
+ /**
+ * The data URL in case control and data is configured separately.
+ * If set, fControlUrl will be set too and fNetworkUrl will be null.
+ */
+ private String fDataUrl = null;
+ /**
+ * The trace path string.
+ */
+ private String fTracePath = null;
+ /**
+ * The Group for advanced configuration of Live mode.
+ */
+ private Group fLiveGroup = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public CreateSessionDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void initialize(TraceSessionGroup group) {
+ fParent = group;
+ fStreamingComposite = null;
+ fLiveGroup = null;
+ fLiveButton = null;
+ fIsLive = false;
+ fSnapshotButton = null;
+ fSessionName = ""; //$NON-NLS-1$
+ fSessionPath = null;
+ fIsSnapshot = false;
+ fIsDefaultPath = true;
+ fIsAdvancedEnabled = false;
+ fNetworkUrl = null;
+ fControlUrl = null;
+ fDataUrl = null;
+ }
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_CreateSessionDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(CREATE_SESSION_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+ Composite dialogAreaa = (Composite) super.createDialogArea(parent);
+ setTitle(Messages.TraceControl_CreateSessionDialogTitle);
+ setMessage(Messages.TraceControl_CreateSessionDialogMessage);
+
+ // Main dialog panel
+ fDialogComposite = new Composite(dialogAreaa, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ fDialogComposite.setLayout(layout);
+ fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Group sessionGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ sessionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ sessionGroup.setLayout(new GridLayout(4, true));
+
+ fUpdateEnablementModifyListener = new UpdateEnablementModifyListener();
+
+ Label sessionNameLabel = new Label(sessionGroup, SWT.RIGHT);
+ sessionNameLabel.setText(Messages.TraceControl_CreateSessionNameLabel);
+ fSessionNameText = new Text(sessionGroup, SWT.NONE);
+ fSessionNameText.setToolTipText(Messages.TraceControl_CreateSessionNameTooltip);
+ fSessionNameText.addModifyListener(fUpdateEnablementModifyListener);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 3;
+ fSessionNameText.setLayoutData(data);
+
+ fSessionPathLabel = new Label(sessionGroup, SWT.RIGHT);
+ fSessionPathLabel.setText(Messages.TraceControl_CreateSessionPathLabel);
+ fSessionPathText = new Text(sessionGroup, SWT.NONE);
+ fSessionPathText.setToolTipText(Messages.TraceControl_CreateSessionPathTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 3;
+ fSessionPathText.setLayoutData(data);
+ fSessionPathText.addModifyListener(fUpdateEnablementModifyListener);
+
+ if (fParent.isSnapshotSupported() || fParent.isLiveSupported()) {
+ fModeButtonGroup = new Group(sessionGroup, SWT.NONE);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 4;
+ fModeButtonGroup.setLayoutData(data);
+ fModeButtonGroup.setLayout(new GridLayout(3, true));
+
+ SelectionAdapter modeChangedListener = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fLiveButton != null) {
+ if (fLiveButton.getSelection()) {
+ createAdvancedLiveGroup();
+ updateSessionPathEnablement();
+ updateProtocolComboItems();
+ } else {
+ disposeLiveGroup();
+ updateSessionPathEnablement();
+ updateProtocolComboItems();
+ }
+ }
+ updateEnablement();
+ }
+ };
+
+ fNormalModeButton = new Button(fModeButtonGroup, SWT.RADIO);
+ fNormalModeButton.setText(Messages.TraceControl_CreateSessionNormalLabel);
+ fNormalModeButton.setToolTipText(Messages.TraceControl_CreateSessionNormalTooltip);
+ fNormalModeButton.setSelection(true);
+ fNormalModeButton.addSelectionListener(modeChangedListener);
+
+ if (fParent.isSnapshotSupported()) {
+ fSnapshotButton = new Button(fModeButtonGroup, SWT.RADIO);
+ fSnapshotButton.setText(Messages.TraceControl_CreateSessionSnapshotLabel);
+ fSnapshotButton.setToolTipText(Messages.TraceControl_CreateSessionSnapshotTooltip);
+ fSnapshotButton.addSelectionListener(modeChangedListener);
+ }
+
+ if (fParent.isLiveSupported()) {
+ fLiveButton = new Button(fModeButtonGroup, SWT.RADIO);
+ fLiveButton.setText(Messages.TraceControl_CreateSessionLiveLabel);
+ fLiveButton.setToolTipText(Messages.TraceControl_CreateSessionLiveTooltip);
+ fLiveButton.addSelectionListener(modeChangedListener);
+ }
+ }
+
+ if (fParent.isNetworkStreamingSupported() || fParent.isLiveSupported()) {
+ createAdvancedOptionsComposite();
+ }
+
+ return fDialogComposite;
+ }
+
+ private void createAdvancedOptionsComposite() {
+
+ fAdvancedGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ fAdvancedGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+ fAdvancedGroup.setLayout(new GridLayout(1, true));
+
+ fAdvancedButton = new Button(fAdvancedGroup, SWT.PUSH);
+ fAdvancedButton.setText(Messages.TraceControl_CreateSessionConfigureStreamingButtonText + " >>>"); //$NON-NLS-1$
+ fAdvancedButton.setToolTipText(Messages.TraceControl_CreateSessionConfigureStreamingButtonTooltip);
+ fAdvancedButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fIsAdvancedEnabled) {
+ fIsAdvancedEnabled = false;
+ fAdvancedButton.setText(">>> " + Messages.TraceControl_CreateSessionConfigureStreamingButtonText); //$NON-NLS-1$
+ fAdvancedButton.setToolTipText(Messages.TraceControl_CreateSessionConfigureStreamingButtonTooltip);
+
+ if (fParent.isNetworkStreamingSupported()) {
+ updateSessionPathEnablement();
+ disposeConfigureStreamingComposite();
+ }
+
+ if (fParent.isLiveSupported()) {
+ disposeLiveGroup();
+ }
+ } else {
+ fIsAdvancedEnabled = true;
+ fAdvancedButton.setText("<<< " + Messages.TraceControl_CreateSessionNoStreamingButtonText); //$NON-NLS-1$
+ fAdvancedButton.setToolTipText(Messages.TraceControl_CreateSessionNoStreamingButtonTooltip);
+
+ if (fParent.isNetworkStreamingSupported()) {
+ updateSessionPathEnablement();
+ createConfigureStreamingComposite();
+ }
+ if (fLiveButton != null && fLiveButton.getSelection()) {
+ createAdvancedLiveGroup();
+ }
+ }
+
+ updateEnablement();
+ getShell().pack();
+ }
+ });
+ }
+
+ private void updateSessionPathEnablement() {
+ if (fIsAdvancedEnabled || fIsLive) {
+ fSessionPathText.setEnabled(false);
+ fSessionPathText.setText(""); //$NON-NLS-1$
+ fSessionPathLabel.setText(""); //$NON-NLS-1$
+ } else {
+ fSessionPathText.setEnabled(true);
+ fSessionPathLabel.setText(Messages.TraceControl_CreateSessionPathLabel);
+ }
+ }
+
+ private void updateProtocolComboItems() {
+ if (fControlProtocolCombo == null || fControlProtocolCombo.isDisposed()) {
+ return;
+ }
+
+ int currentSelection = fControlProtocolCombo.getSelectionIndex() <= COMMON_URL_LAST_INDEX ?
+ fControlProtocolCombo.getSelectionIndex() : DEFAULT_URL_INDEX;
+
+ fControlProtocolCombo.removeAll();
+ Enum<? extends Enum<?>>[] values;
+ if (fIsLive) {
+ values = LiveProtocol.values();
+ } else if (fLinkDataWithControlButton.getSelection()) {
+ values = StreamingProtocol.values();
+ } else {
+ values = StreamingProtocol2.values();
+ }
+
+ String[] controlItems = new String[values.length];
+ for (int i = 0; i < controlItems.length; i++) {
+ controlItems[i] = values[i].name();
+ }
+ fControlProtocolCombo.setItems(controlItems);
+ fDataProtocolCombo.setItems(controlItems);
+
+ // Set selection
+ if (currentSelection != -1) {
+ fControlProtocolCombo.select(currentSelection);
+ fDataProtocolCombo.select(currentSelection);
+ }
+ }
+
+ private void createConfigureStreamingComposite() {
+ if (fStreamingComposite == null) {
+ fStreamingComposite = new Group(fAdvancedGroup, SWT.SHADOW_NONE);
+ GridLayout layout = new GridLayout(1, true);
+ fStreamingComposite.setLayout(layout);
+ fStreamingComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ layout = new GridLayout(7, true);
+ fStreamingComposite.setLayout(layout);
+ fStreamingComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Label tracePathLabel = new Label(fStreamingComposite, SWT.RIGHT);
+ tracePathLabel.setText(Messages.TraceControl_CreateSessionTracePathText);
+ fTracePathText = new Text(fStreamingComposite, SWT.NONE);
+ fTracePathText.setToolTipText(Messages.TraceControl_CreateSessionTracePathTooltip);
+
+ // layout widgets
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 6;
+ fTracePathText.setLayoutData(data);
+ fTracePathText.addModifyListener(fUpdateEnablementModifyListener);
+
+ fLinkDataWithControlButton = new Button(fStreamingComposite, SWT.CHECK);
+ fLinkDataWithControlButton.setText(Messages.TraceControl_CreateSessionLinkButtonText);
+ fLinkDataWithControlButton.setToolTipText(Messages.TraceControl_CreateSessionLinkButtonTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 7;
+ fLinkDataWithControlButton.setLayoutData(data);
+ fLinkDataWithControlButton.setSelection(true);
+
+ Label label = new Label(fStreamingComposite, SWT.NONE);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ label.setLayoutData(data);
+
+ label = new Label(fStreamingComposite, SWT.NONE);
+ label.setText(Messages.TraceControl_CreateSessionProtocolLabelText);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ label.setLayoutData(data);
+
+ label = new Label(fStreamingComposite, SWT.NONE);
+ label.setText(Messages.TraceControl_CreateSessionAddressLabelText);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 4;
+ label.setLayoutData(data);
+
+ label = new Label(fStreamingComposite, SWT.NONE);
+ label.setText(Messages.TraceControl_CreateSessionPortLabelText);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ label.setLayoutData(data);
+
+ label = new Label(fStreamingComposite, SWT.RIGHT);
+ label.setText(Messages.TraceControl_CreateSessionControlUrlLabel);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ label.setLayoutData(data);
+
+ fControlProtocolCombo = new CCombo(fStreamingComposite, SWT.READ_ONLY);
+ fControlProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionCommonProtocolTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ fControlProtocolCombo.setLayoutData(data);
+ fControlProtocolCombo.addModifyListener(fUpdateEnablementModifyListener);
+
+ fControlHostAddressText = new Text(fStreamingComposite, SWT.NONE);
+ fControlHostAddressText.setToolTipText(Messages.TraceControl_CreateSessionControlAddressTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 4;
+ fControlHostAddressText.setLayoutData(data);
+ fControlHostAddressText.addModifyListener(fUpdateEnablementModifyListener);
+
+ fControlPortText = new Text(fStreamingComposite, SWT.NONE);
+ fControlPortText.setToolTipText(Messages.TraceControl_CreateSessionControlPortTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ fControlPortText.setLayoutData(data);
+ fControlPortText.addModifyListener(fUpdateEnablementModifyListener);
+
+ label = new Label(fStreamingComposite, SWT.RIGHT);
+ label.setText(Messages.TraceControl_CreateSessionDataUrlLabel);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ label.setLayoutData(data);
+
+ fDataProtocolCombo = new CCombo(fStreamingComposite, SWT.READ_ONLY);
+ fDataProtocolCombo.setEnabled(false);
+ fDataProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionProtocolTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ fDataProtocolCombo.setLayoutData(data);
+ fDataProtocolCombo.addModifyListener(fUpdateEnablementModifyListener);
+
+ updateProtocolComboItems();
+
+ fDataHostAddressText = new Text(fStreamingComposite, SWT.NONE);
+ fDataHostAddressText.setEnabled(false);
+ fDataHostAddressText.setToolTipText(Messages.TraceControl_CreateSessionDataAddressTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 4;
+ fDataHostAddressText.setLayoutData(data);
+ fDataHostAddressText.addModifyListener(fUpdateEnablementModifyListener);
+
+ fDataPortText = new Text(fStreamingComposite, SWT.NONE);
+ fDataPortText.setEnabled(true);
+ fDataPortText.setToolTipText(Messages.TraceControl_CreateSessionDataPortTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ fDataPortText.setLayoutData(data);
+ fDataPortText.addModifyListener(fUpdateEnablementModifyListener);
+
+ fCopyProtocolSelectionListener = new ControlProtocolSelectionListener();
+ fControlProtocolSelectionListener = new ProtocolComboSelectionListener(fControlProtocolCombo, fControlPortText);
+ fDataProtocolSelectionListener = new ProtocolComboSelectionListener(fDataProtocolCombo, fDataPortText);
+
+ fControlProtocolCombo.addSelectionListener(fCopyProtocolSelectionListener);
+
+ fControlUrlKeyListener = new CopyModifyListener(fControlHostAddressText, fDataHostAddressText);
+ fControlHostAddressText.addModifyListener(fControlUrlKeyListener);
+
+ fControlProtocolCombo.select(DEFAULT_URL_INDEX);
+ fDataProtocolCombo.select(DEFAULT_URL_INDEX);
+
+ fLinkDataWithControlButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fLinkDataWithControlButton.getSelection()) {
+ // Set enablement control data channel inputs
+ fDataProtocolCombo.setEnabled(false);
+ fDataHostAddressText.setEnabled(false);
+ fControlPortText.setEnabled(true);
+ fDataPortText.setEnabled(true);
+
+ // Update listeners
+ fControlProtocolCombo.removeSelectionListener(fControlProtocolSelectionListener);
+ fDataProtocolCombo.removeSelectionListener(fDataProtocolSelectionListener);
+ fControlProtocolCombo.addSelectionListener(fCopyProtocolSelectionListener);
+ fControlHostAddressText.addModifyListener(fControlUrlKeyListener);
+
+ updateProtocolComboItems();
+
+ fDataHostAddressText.setText(fControlHostAddressText.getText());
+
+ // Update tool tips
+ fControlProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionCommonProtocolTooltip);
+ } else {
+ // Enable data channel inputs
+ fDataProtocolCombo.setEnabled(true);
+ fDataHostAddressText.setEnabled(true);
+
+ // Update listeners
+ fControlProtocolCombo.removeSelectionListener(fCopyProtocolSelectionListener);
+ fControlProtocolCombo.addSelectionListener(fControlProtocolSelectionListener);
+ fDataProtocolCombo.addSelectionListener(fDataProtocolSelectionListener);
+ fControlHostAddressText.removeModifyListener(fControlUrlKeyListener);
+
+ updateProtocolComboItems();
+
+ // Update tool tips
+ fDataProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionProtocolTooltip);
+ fControlProtocolCombo.setToolTipText(Messages.TraceControl_CreateSessionProtocolTooltip);
+
+ // Update control/data port enablement and input
+ if (fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net.name()) ||
+ fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net6.name())) {
+ fControlPortText.setText(""); //$NON-NLS-1$
+ fControlPortText.setEnabled(false);
+ } else {
+ fControlPortText.setEnabled(true);
+ }
+
+ if (fDataProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net.name()) ||
+ fDataProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.net6.name())) {
+ fDataPortText.setText(""); //$NON-NLS-1$
+ fDataPortText.setEnabled(false);
+ } else {
+ fDataPortText.setEnabled(true);
+ }
+ }
+ }
+ });
+ }
+ }
+
+ private void createAdvancedLiveGroup() {
+ if (fLiveGroup == null && fIsAdvancedEnabled) {
+ GridLayout layout = new GridLayout(7, true);
+ fLiveGroup = new Group(fAdvancedGroup, SWT.NONE);
+ fLiveGroup.setLayout(layout);
+ GridData layoutData = new GridData(GridData.FILL_BOTH);
+ fLiveGroup.setLayoutData(layoutData);
+
+ Label label = new Label(fLiveGroup, SWT.NONE);
+ label.setText(Messages.TraceControl_CreateSessionLiveConnectionLabel);
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ layoutData.horizontalSpan = 2;
+ label.setLayoutData(layoutData);
+
+ fLiveHostAddressText = new Text(fLiveGroup, SWT.NONE);
+ fLiveHostAddressText.setText(DEFAULT_LIVE_URL);
+ fLiveHostAddressText.setEnabled(false);
+ fLiveHostAddressText.setToolTipText(Messages.TraceControl_CreateSessionLiveConnectionUrlTooltip);
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ layoutData.horizontalSpan = 4;
+ fLiveHostAddressText.setLayoutData(layoutData);
+
+ fLivePortText = new Text(fLiveGroup, SWT.NONE);
+ fLivePortText.setText(Integer.toString(DEFAULT_LIVE_PORT));
+ fLivePortText.setToolTipText(Messages.TraceControl_CreateSessionLiveConnectionPortTooltip);
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ fLivePortText.setLayoutData(layoutData);
+
+ Label liveDelayLabel = new Label(fLiveGroup, SWT.NONE);
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ liveDelayLabel.setText(Messages.TraceControl_CreateSessionLiveDelayLabel);
+ liveDelayLabel.setLayoutData(layoutData);
+ fLiveDelayText = new Text(fLiveGroup, SWT.NONE);
+ fLiveDelayText.setText(DEFAULT_TEXT);
+ fLiveDelayText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ fLiveDelayText.setToolTipText(Messages.TraceControl_CreateSessionLiveDelayTooltip);
+ fLiveDelayText.addVerifyListener(new VerifyListener() {
+ @Override
+ public void verifyText(VerifyEvent e) {
+ // only numbers and default are allowed.
+ e.doit = e.text.matches("[0-9]*") || e.text.matches(DEFAULT_TEXT); //$NON-NLS-1$
+ updateEnablement();
+ }
+ });
+ fLiveDelayText.addModifyListener(new ModifyListener() {
+ @Override
+ public void modifyText(ModifyEvent event) {
+ updateEnablement();
+ }
+ });
+
+ fLiveDelayText.addFocusListener(new FocusListener() {
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ Text focusLostWidget = (Text) e.widget;
+ if (focusLostWidget.getText().isEmpty()) {
+ focusLostWidget.setText(DEFAULT_TEXT);
+ focusLostWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ }
+ }
+
+ @Override
+ public void focusGained(FocusEvent e) {
+ Text focusGainedWidget = (Text) e.widget;
+ if (focusGainedWidget.getText().equals(DEFAULT_TEXT)) {
+ focusGainedWidget.setText(""); //$NON-NLS-1$
+ focusGainedWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_BLACK));
+ }
+ }
+ });
+
+ layoutData = new GridData(GridData.FILL_HORIZONTAL);
+ layoutData.grabExcessHorizontalSpace = true;
+ layoutData.horizontalSpan = 6;
+ fLiveDelayText.setLayoutData(layoutData);
+ getShell().pack();
+ }
+ }
+
+ private void disposeLiveGroup() {
+ if (fLiveGroup != null) {
+ fLiveGroup.dispose();
+ fLiveGroup = null;
+ getShell().pack();
+ }
+ }
+
+ private void disposeConfigureStreamingComposite() {
+ if (fStreamingComposite != null) {
+ fStreamingComposite.dispose();
+ fStreamingComposite = null;
+ }
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ private void updateEnablement() {
+ validate();
+ getButton(IDialogConstants.OK_ID).setEnabled(getErrorMessage() == null);
+ }
+
+ private void validate() {
+ // Validate input data
+ fSessionName = fSessionNameText.getText();
+ fSessionPath = fSessionPathText.getText();
+ setErrorMessage(null);
+
+ if (fParent.isLiveSupported() && fLiveButton != null) {
+ fIsLive = fLiveButton.getSelection();
+ fLiveDelay = LTTngControlServiceConstants.UNUSED_VALUE;
+ fLiveUrl = DEFAULT_LIVE_URL;
+ fLivePort = DEFAULT_LIVE_PORT;
+ }
+
+ if (!"".equals(fSessionPath)) { //$NON-NLS-1$
+ // validate sessionPath
+ if (!fIsAdvancedEnabled && !fIsLive) {
+ TargetNodeComponent node = (TargetNodeComponent)fParent.getParent();
+ IRemoteSystemProxy proxy = node.getRemoteSystemProxy();
+ IFileServiceSubSystem fsss = proxy.getFileServiceSubSystem();
+ if (fsss != null) {
+ try {
+ IRemoteFile remoteFolder = fsss.getRemoteFileObject(fSessionPath, new NullProgressMonitor());
+
+ if (remoteFolder == null) {
+ setErrorMessage(Messages.TraceControl_InvalidSessionPathError + " (" + fSessionPath + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+
+ if (remoteFolder.exists()) {
+ setErrorMessage(Messages.TraceControl_SessionPathAlreadyExistsError + " (" + fSessionPath + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+ } catch (SystemMessageException e) {
+ setErrorMessage(Messages.TraceControl_FileSubSystemError + "\n" + e); //$NON-NLS-1$
+ return;
+ }
+ }
+ }
+ fIsDefaultPath = false;
+ }
+
+ if (fParent.isSnapshotSupported()) {
+ fIsSnapshot = fSnapshotButton.getSelection();
+ }
+
+ fNetworkUrl = null;
+ fControlUrl = null;
+ fDataUrl = null;
+
+ if (fIsAdvancedEnabled && fStreamingComposite != null) {
+ // Validate input data
+
+ if (fIsLive && fLiveGroup != null) {
+ String liveDelayText = fLiveDelayText.getText();
+ try {
+ fLiveDelay = liveDelayText.equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.valueOf(liveDelayText);
+ fLivePort = Integer.valueOf(fLivePortText.getText());
+ fLiveUrl = fLiveHostAddressText.getText();
+ } catch (NumberFormatException e) {
+ setErrorMessage(Messages.TraceControl_InvalidLiveDelayError);
+ return;
+ }
+ }
+
+ fTracePath = fTracePathText.getText();
+
+ if (fControlProtocolCombo.getSelectionIndex() < 0) {
+ setErrorMessage("Control Protocol Text is empty\n"); //$NON-NLS-1$
+ return;
+ }
+
+ if ("".equals(fControlHostAddressText.getText())) { //$NON-NLS-1$
+ setErrorMessage("Control Address Text is empty\n"); //$NON-NLS-1$
+ return;
+ }
+
+ if (!fLinkDataWithControlButton.getSelection()) {
+ if (fDataProtocolCombo.getSelectionIndex() < 0) {
+ setErrorMessage("Data Protocol Text is empty\n"); //$NON-NLS-1$
+ return;
+ }
+
+ if ("".equals(fDataHostAddressText.getText())) { //$NON-NLS-1$
+ setErrorMessage("Data Address Text is empty\n"); //$NON-NLS-1$
+ return;
+ }
+
+ fControlUrl = getUrlString(fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()),
+ fControlHostAddressText.getText(),
+ fControlPortText.getText(),
+ null,
+ fTracePath);
+
+ fDataUrl = getUrlString(fDataProtocolCombo.getItem(fDataProtocolCombo.getSelectionIndex()),
+ fDataHostAddressText.getText(),
+ null,
+ fDataPortText.getText(),
+ fTracePath);
+ } else {
+ fNetworkUrl = getUrlString(fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()),
+ fControlHostAddressText.getText(),
+ fControlPortText.getText(),
+ fDataPortText.getText(),
+ fTracePath);
+ }
+ }
+
+ if (fIsLive && fNetworkUrl == null && fControlUrl == null && fDataUrl == null) {
+ fNetworkUrl = SessionInfo.DEFAULT_LIVE_NETWORK_URK;
+ }
+
+ // Check for invalid names
+ if (!"".equals(fSessionName) && !fSessionName.matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$ //$NON-NLS-2$
+ setErrorMessage(Messages.TraceControl_InvalidSessionNameError + " (" + fSessionName + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+
+ // Check if node with name already exists in parent
+ if(fParent.containsChild(fSessionName)) {
+ setErrorMessage(Messages.TraceControl_SessionAlreadyExistsError + " (" + fSessionName + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+ }
+
+ private static String getUrlString(String proto, String host, String ctrlPort, String dataPort, String sessionPath) {
+ //proto://[HOST|IP][:PORT1[:PORT2]][/TRACE_PATH]
+ StringBuilder stringBuilder = new StringBuilder();
+ stringBuilder.append(proto);
+ stringBuilder.append("://"); //$NON-NLS-1$
+ stringBuilder.append(host);
+
+ if ((ctrlPort != null) && (!"".equals(ctrlPort))) { //$NON-NLS-1$
+ stringBuilder.append(":"); //$NON-NLS-1$
+ stringBuilder.append(ctrlPort);
+ }
+
+ if ((dataPort != null) && (!"".equals(dataPort))) { //$NON-NLS-1$
+ stringBuilder.append(":"); //$NON-NLS-1$
+ stringBuilder.append(dataPort);
+ }
+
+ if ((sessionPath != null) && (!"".equals(sessionPath))) { //$NON-NLS-1$
+ stringBuilder.append("/"); //$NON-NLS-1$
+ stringBuilder.append(sessionPath);
+ }
+ return stringBuilder.toString();
+ }
+
+ private static class CopyModifyListener implements ModifyListener {
+ private Text fSource;
+ private Text fDestination;
+
+ public CopyModifyListener(Text source, Text destination) {
+ fSource = source;
+ fDestination = destination;
+ }
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ fDestination.setText(fSource.getText());
+ }
+ }
+
+ private class ControlProtocolSelectionListener extends SelectionAdapter {
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fDataProtocolCombo.select(fControlProtocolCombo.getSelectionIndex());
+ if (fControlProtocolCombo.getItem(fControlProtocolCombo.getSelectionIndex()).equals(StreamingProtocol.file.name())) {
+ fControlPortText.setText(""); //$NON-NLS-1$
+ fDataPortText.setText(""); //$NON-NLS-1$
+ fControlPortText.setEnabled(false);
+ fDataPortText.setEnabled(false);
+ } else {
+ fControlPortText.setEnabled(true);
+ fDataPortText.setEnabled(true);
+ }
+ }
+ }
+
+ private class ProtocolComboSelectionListener extends SelectionAdapter {
+
+ private CCombo fCombo;
+ private Text fPortText;
+
+ public ProtocolComboSelectionListener(CCombo combo, Text portText) {
+ fCombo = combo;
+ fPortText = portText;
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fCombo.getItem(fCombo.getSelectionIndex()).equals(StreamingProtocol.net.name()) ||
+ fCombo.getItem(fCombo.getSelectionIndex()).equals(StreamingProtocol.net6.name())) {
+ fPortText.setText(""); //$NON-NLS-1$
+ fPortText.setEnabled(false);
+ } else {
+ fPortText.setEnabled(true);
+ }
+ }
+ }
+
+ @Override
+ public ISessionInfo getParameters() {
+ ISessionInfo sessionInfo = new SessionInfo(fSessionName);
+
+ boolean isStreaming = (fIsAdvancedEnabled && fStreamingComposite != null) || fIsLive;
+ if (isStreaming) {
+ sessionInfo.setNetworkUrl(fNetworkUrl);
+ sessionInfo.setControlUrl(fControlUrl);
+ sessionInfo.setDataUrl(fDataUrl);
+ sessionInfo.setStreamedTrace(true);
+ } else if (!fIsDefaultPath) {
+ sessionInfo.setSessionPath(fSessionPath);
+ }
+
+ sessionInfo.setLive(fIsLive);
+ sessionInfo.setLiveUrl(fLiveUrl);
+ sessionInfo.setLivePort(fLivePort);
+ sessionInfo.setLiveDelay(fLiveDelay);
+ sessionInfo.setSnapshot(fIsSnapshot);
+
+ return sessionInfo;
+ }
+
+ private final class UpdateEnablementModifyListener implements ModifyListener {
+ @Override
+ public void modifyText(ModifyEvent e) {
+ updateEnablement();
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Simon Delisle - Updated for support of LTTng Tools 2.2
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceConstants;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * <p>
+ * Dialog box for collecting channel information when enabling a channel (which will be created).
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableChannelDialog extends Dialog implements IEnableChannelDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String ENABLE_CHANNEL_ICON_FILE = "icons/elcl16/add_button.gif"; //$NON-NLS-1$
+
+ /**
+ * To indicate that the default value will be used for this field
+ */
+ private static final String DEFAULT_TEXT = "<" + Messages.EnableChannelDialog_DefaultMessage + ">"; //$NON-NLS-1$ //$NON-NLS-2$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The text widget for the channel name
+ */
+ private Text fChannelNameText = null;
+ /**
+ * The discard mode of the channel.
+ */
+ private Button fDiscardModeButton = null;
+ /**
+ * The overwrite mode of the channel.
+ */
+ private Button fOverwriteModeButton = null;
+ /**
+ * The sub-buffer size of the channel.
+ */
+ private Text fSubBufferSizeText = null;
+ /**
+ * The number of sub-buffers of the channel.
+ */
+ private Text fNumberOfSubBuffersText = null;
+ /**
+ * The switch timer interval of the channel.
+ */
+ private Text fSwitchTimerText = null;
+ /**
+ * The read timer interval of the channel.
+ */
+ private Text fReadTimerText = null;
+ /**
+ * Radio button for selecting kernel domain.
+ */
+ private Button fKernelButton = null;
+ /**
+ * Radio button for selecting UST domain.
+ */
+ private Button fUstButton = null;
+ /**
+ * The parent domain component where the channel node should be added.
+ * Null in case of creation on session level.
+ */
+ private TraceDomainComponent fDomain = null;
+ /**
+ * The target node component
+ */
+ private TargetNodeComponent fTargetNodeComponent = null;
+ /**
+ * Common verify listener for numeric text input.
+ */
+ private VerifyListener fVerifyListener = null;
+ /**
+ * Common focus listener
+ */
+ private FocusListener fFocusListener = null;
+ /**
+ * Output channel information.
+ */
+ private IChannelInfo fChannelInfo = null;
+ /**
+ * Output domain information. True in case of Kernel domain. False for UST.
+ */
+ private boolean fIsKernel;
+ /**
+ * Flag which indicates whether Kernel domain is available or not
+ */
+ private boolean fHasKernel;
+ /**
+ * Maximum size of trace files of the channel.
+ */
+ private Text fMaxSizeTraceText = null;
+ /**
+ * Maximum number of trace files of the channel.
+ */
+ private Text fMaxNumberTraceText = null;
+ /**
+ * CheckBox for selecting shared buffers (kernel onlyu).
+ */
+ private Button fSharedBuffersButton = null;
+ /**
+ * CheckBox for selecting per UID buffers.
+ */
+ private Button fPIDBuffersButton = null;
+ /**
+ * CheckBox for selecting per UID buffers.
+ */
+ private Button fUIDBuffersButton = null;
+ /**
+ * CheckBox to configure metadata channel
+ */
+ private Button fMetadataChannelButton = null;
+ /**
+ * Previous channel name
+ */
+ private String fPreviousChannelName = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public EnableChannelDialog(Shell shell) {
+ super(shell);
+ fIsKernel = true;
+
+ // Common verify listener
+ fVerifyListener = new VerifyListener() {
+ @Override
+ public void verifyText(VerifyEvent e) {
+ // only numbers and default are allowed.
+ e.doit = e.text.matches("[0-9]*") || e.text.matches(DEFAULT_TEXT); //$NON-NLS-1$
+ }
+ };
+
+ // Common focus listener
+ fFocusListener = new FocusListener() {
+
+ @Override
+ public void focusLost(FocusEvent e) {
+ Text focusLostWidget = (Text) e.widget;
+ if (focusLostWidget.getText().isEmpty()) {
+ focusLostWidget.setText(DEFAULT_TEXT);
+ focusLostWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ }
+ }
+
+ @Override
+ public void focusGained(FocusEvent e) {
+ Text focusGainedWidget = (Text) e.widget;
+ if (focusGainedWidget.getText().equals(DEFAULT_TEXT)) {
+ focusGainedWidget.setText(""); //$NON-NLS-1$
+ focusGainedWidget.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_BLACK));
+ }
+ }
+ };
+
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IChannelInfo getChannelInfo() {
+ return fChannelInfo;
+ }
+
+ @Override
+ public void setDomainComponent(TraceDomainComponent domain) {
+ fDomain = domain;
+ if (fDomain != null) {
+ fIsKernel = fDomain.isKernel();
+ } else {
+ fIsKernel = true;
+ }
+ }
+
+ @Override
+ public boolean isKernel() {
+ return fIsKernel;
+ }
+
+ @Override
+ public void setHasKernel(boolean hasKernel) {
+ if (fDomain != null) {
+ fIsKernel = fDomain.isKernel();
+ } else {
+ fIsKernel = hasKernel;
+ }
+
+ fHasKernel = hasKernel;
+ }
+
+ @Override
+ public void setTargetNodeComponent(TargetNodeComponent node) {
+ fTargetNodeComponent = node;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_EnableChannelDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(ENABLE_CHANNEL_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ int numColumn = 2;
+ if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
+ numColumn = 3;
+ }
+
+ // Main dialog panel
+ Composite dialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ dialogComposite.setLayout(layout);
+
+ Composite commonModeGroup = new Composite(dialogComposite, SWT.NONE);
+ layout = new GridLayout(3, true);
+ commonModeGroup.setLayout(layout);
+
+ Label channelNameLabel = new Label(commonModeGroup, SWT.RIGHT);
+ channelNameLabel.setText(Messages.TraceControl_EnableChannelNameLabel);
+ fChannelNameText = new Text(commonModeGroup, SWT.NONE);
+ fChannelNameText.setToolTipText(Messages.TraceControl_EnableChannelNameTooltip);
+
+ Label subBufferSizeLabel = new Label(commonModeGroup, SWT.RIGHT);
+ subBufferSizeLabel.setText(Messages.TraceControl_SubBufferSizePropertyName);
+ fSubBufferSizeText = new Text(commonModeGroup, SWT.NONE);
+ fSubBufferSizeText.setToolTipText(Messages.TraceControl_EnableChannelSubBufferSizeTooltip);
+ fSubBufferSizeText.addVerifyListener(fVerifyListener);
+ fSubBufferSizeText.addFocusListener(fFocusListener);
+ fSubBufferSizeText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+
+ Label numSubBufferLabel = new Label(commonModeGroup, SWT.RIGHT);
+ numSubBufferLabel.setText(Messages.TraceControl_NbSubBuffersPropertyName);
+ fNumberOfSubBuffersText = new Text(commonModeGroup, SWT.NONE);
+ fNumberOfSubBuffersText.setToolTipText(Messages.TraceControl_EnableChannelNbSubBuffersTooltip);
+ fNumberOfSubBuffersText.addVerifyListener(fVerifyListener);
+ fNumberOfSubBuffersText.addFocusListener(fFocusListener);
+
+ Label switchTimerLabel = new Label(commonModeGroup, SWT.RIGHT);
+ switchTimerLabel.setText(Messages.TraceControl_SwitchTimerPropertyName);
+ fSwitchTimerText = new Text(commonModeGroup, SWT.NONE);
+ fSwitchTimerText.setToolTipText(Messages.TraceControl_EnableChannelSwitchTimerTooltip);
+ fSwitchTimerText.addVerifyListener(fVerifyListener);
+ fSwitchTimerText.addFocusListener(fFocusListener);
+
+ Label readTimerLabel = new Label(commonModeGroup, SWT.RIGHT);
+ readTimerLabel.setText(Messages.TraceControl_ReadTimerPropertyName);
+ fReadTimerText = new Text(commonModeGroup, SWT.NONE);
+ fReadTimerText.setToolTipText(Messages.TraceControl_EnableChannelReadTimerTooltip);
+ fReadTimerText.addVerifyListener(fVerifyListener);
+ fReadTimerText.addFocusListener(fFocusListener);
+
+ if (fTargetNodeComponent.isTraceFileRotationSupported()) {
+ Label maxSizeTraceFilesLabel = new Label(commonModeGroup, SWT.RIGHT);
+ maxSizeTraceFilesLabel.setText(Messages.TraceControl_MaxSizeTraceFilesPropertyName);
+ fMaxSizeTraceText = new Text(commonModeGroup, SWT.NONE);
+ fMaxSizeTraceText.setToolTipText(Messages.TraceControl_EnbleChannelMaxSizeTraceFilesTooltip);
+ fMaxSizeTraceText.addVerifyListener(fVerifyListener);
+ fMaxSizeTraceText.addFocusListener(fFocusListener);
+
+ Label maxNumTraceFilesLabel = new Label(commonModeGroup, SWT.RIGHT);
+ maxNumTraceFilesLabel.setText(Messages.TraceControl_MaxNumTraceFilesPropertyName);
+ fMaxNumberTraceText = new Text(commonModeGroup, SWT.NONE);
+ fMaxNumberTraceText.setToolTipText(Messages.TraceControl_EnbleChannelMaxNumTraceFilesTooltip);
+ fMaxNumberTraceText.addVerifyListener(fVerifyListener);
+ fMaxNumberTraceText.addFocusListener(fFocusListener);
+ }
+
+ if (fTargetNodeComponent.isPeriodicalMetadataFlushSupported()) {
+ fMetadataChannelButton = new Button(commonModeGroup, SWT.CHECK);
+ fMetadataChannelButton.setText(Messages.TraceControl_ConfigureMetadataChannelName);
+ fMetadataChannelButton.setSelection(false);
+
+ fMetadataChannelButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fMetadataChannelButton.getSelection()) {
+ fPreviousChannelName = fChannelNameText.getText();
+ fChannelNameText.setText("metadata"); //$NON-NLS-1$
+ fChannelNameText.setEnabled(false);
+ } else {
+ fChannelNameText.setText(fPreviousChannelName);
+ fChannelNameText.setEnabled(true);
+ }
+ }
+ });
+ }
+ Group discardModeGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ discardModeGroup.setText(Messages.TraceControl_EnableChannelDiscardModeGroupName);
+ layout = new GridLayout(numColumn, true);
+ discardModeGroup.setLayout(layout);
+
+ fDiscardModeButton = new Button(discardModeGroup, SWT.RADIO);
+ fDiscardModeButton.setText(Messages.TraceControl_EnableChannelDiscardModeLabel);
+ fDiscardModeButton.setToolTipText(Messages.TraceControl_EnableChannelDiscardModeTooltip);
+ fDiscardModeButton.setSelection(true);
+
+ fOverwriteModeButton = new Button(discardModeGroup, SWT.RADIO);
+ fOverwriteModeButton.setText(Messages.TraceControl_EnableChannelOverwriteModeLabel);
+ fOverwriteModeButton.setToolTipText(Messages.TraceControl_EnableChannelOverwriteModeTooltip);
+ fOverwriteModeButton.setSelection(false);
+
+ Group domainGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ domainGroup.setText(Messages.TraceControl_DomainDisplayName);
+ layout = new GridLayout(numColumn, true);
+ domainGroup.setLayout(layout);
+
+ fKernelButton = new Button(domainGroup, SWT.RADIO);
+ fKernelButton.setText(Messages.TraceControl_KernelDomainDisplayName);
+ fKernelButton.setSelection(fIsKernel);
+ fUstButton = new Button(domainGroup, SWT.RADIO);
+ fUstButton.setText(Messages.TraceControl_UstDisplayName);
+ fUstButton.setSelection(!fIsKernel);
+
+ if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
+ Group bufferTypeGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ bufferTypeGroup.setText(Messages.TraceControl_BufferTypeDisplayName);
+ layout = new GridLayout(numColumn, true);
+ bufferTypeGroup.setLayout(layout);
+
+ GridData data = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
+ data.horizontalSpan = 3;
+ bufferTypeGroup.setLayoutData(data);
+
+ fSharedBuffersButton = new Button(bufferTypeGroup, SWT.RADIO);
+ fSharedBuffersButton.setText(Messages.TraceControl_SharedBuffersDisplayName);
+ fSharedBuffersButton.setSelection(fIsKernel);
+ fSharedBuffersButton.setEnabled(false);
+
+ fPIDBuffersButton = new Button(bufferTypeGroup, SWT.RADIO);
+ fPIDBuffersButton.setText(Messages.TraceControl_PerPidBuffersDisplayName);
+ fPIDBuffersButton.setToolTipText(Messages.TraceControl_PerPidBuffersTooltip);
+ fPIDBuffersButton.setSelection(false);
+
+ fUIDBuffersButton = new Button(bufferTypeGroup, SWT.RADIO);
+ fUIDBuffersButton.setText(Messages.TraceControl_PerUidBuffersDisplayName);
+ fUIDBuffersButton.setToolTipText(Messages.TraceControl_PerPidBuffersTooltip);
+ fUIDBuffersButton.setSelection(false);
+
+ fUIDBuffersButton.setEnabled(!fIsKernel);
+ fPIDBuffersButton.setEnabled(!fIsKernel);
+
+ // Update buffers type buttons depending on UST or Kernel
+ fUstButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fUstButton.getSelection()) {
+ fSharedBuffersButton.setSelection(false);
+ fPIDBuffersButton.setSelection(false);
+ fUIDBuffersButton.setSelection(false);
+ fPIDBuffersButton.setEnabled(true);
+ fUIDBuffersButton.setEnabled(true);
+ } else {
+ fSharedBuffersButton.setSelection(true);
+ fPIDBuffersButton.setSelection(false);
+ fUIDBuffersButton.setSelection(false);
+ fPIDBuffersButton.setEnabled(false);
+ fUIDBuffersButton.setEnabled(false);
+ }
+ }
+ });
+ }
+
+ if ((fDomain != null) || (!fHasKernel)) {
+ fKernelButton.setEnabled(false);
+ fUstButton.setEnabled(false);
+
+ if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
+ fSharedBuffersButton.setEnabled(false);
+ fUIDBuffersButton.setEnabled(!fHasKernel);
+ fPIDBuffersButton.setEnabled(!fHasKernel);
+ setBufferTypeButtonSelection();
+ }
+ }
+
+ // layout widgets
+ GridData data = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
+ data.horizontalSpan = 3;
+ discardModeGroup.setLayoutData(data);
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fDiscardModeButton.setLayoutData(data);
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fOverwriteModeButton.setLayoutData(data);
+
+ data = new GridData(GridData.FILL, GridData.BEGINNING, false, false);
+ data.horizontalSpan = 3;
+ domainGroup.setLayoutData(data);
+
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fKernelButton.setLayoutData(data);
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fUstButton.setLayoutData(data);
+ if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fSharedBuffersButton.setLayoutData(data);
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fPIDBuffersButton.setLayoutData(data);
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fUIDBuffersButton.setLayoutData(data);
+ }
+
+ if (fTargetNodeComponent.isPeriodicalMetadataFlushSupported()) {
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ data.horizontalSpan = numColumn;
+ fMetadataChannelButton.setLayoutData(data);
+ }
+
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 2;
+
+ fChannelNameText.setLayoutData(data);
+ fSubBufferSizeText.setLayoutData(data);
+ fNumberOfSubBuffersText.setLayoutData(data);
+ fSwitchTimerText.setLayoutData(data);
+ fReadTimerText.setLayoutData(data);
+ if (fTargetNodeComponent.isTraceFileRotationSupported()) {
+ fMaxNumberTraceText.setLayoutData(data);
+ fMaxSizeTraceText.setLayoutData(data);
+ }
+
+ setDefaults();
+
+ return dialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.DETAILS_ID, "&Default", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void okPressed() {
+ // Set channel information
+ ChannelInfo channelInfo = new ChannelInfo(fChannelNameText.getText());
+ channelInfo.setSubBufferSize(fSubBufferSizeText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.parseLong(fSubBufferSizeText.getText()));
+ channelInfo.setNumberOfSubBuffers(fNumberOfSubBuffersText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.parseInt(fNumberOfSubBuffersText.getText()));
+ channelInfo.setSwitchTimer(fSwitchTimerText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.parseLong(fSwitchTimerText.getText()));
+ channelInfo.setReadTimer(fReadTimerText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Long.parseLong(fReadTimerText.getText()));
+ channelInfo.setOverwriteMode(fOverwriteModeButton.getSelection());
+ if (fTargetNodeComponent.isTraceFileRotationSupported()) {
+ channelInfo.setMaxSizeTraceFiles(fMaxSizeTraceText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.parseInt(fMaxSizeTraceText.getText()));
+ channelInfo.setMaxNumberTraceFiles(fMaxNumberTraceText.getText().equals(DEFAULT_TEXT) ? LTTngControlServiceConstants.UNUSED_VALUE : Integer.parseInt(fMaxNumberTraceText.getText()));
+ }
+ if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
+ if (fSharedBuffersButton.getSelection()) {
+ channelInfo.setBufferType(BufferType.BUFFER_SHARED);
+ } else if (fPIDBuffersButton.getSelection()) {
+ channelInfo.setBufferType(BufferType.BUFFER_PER_PID);
+ } else if (fUIDBuffersButton.getSelection()) {
+ channelInfo.setBufferType(BufferType.BUFFER_PER_UID);
+ } else {
+ channelInfo.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
+ }
+ }
+
+ fIsKernel = fKernelButton.getSelection();
+
+ // Check for invalid names
+ if (!channelInfo.getName().matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableChannelDialogTitle,
+ Messages.TraceControl_InvalidChannelNameError + " (" + channelInfo.getName() + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+
+ // Check for duplicate names
+ if (fDomain != null && fDomain.containsChild(channelInfo.getName())) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableChannelDialogTitle,
+ Messages.TraceControl_ChannelAlreadyExistsError + " (" + channelInfo.getName() + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+
+ fChannelInfo = channelInfo;
+
+ // validation successful -> call super.okPressed()
+ super.okPressed();
+ }
+
+ @Override
+ protected void buttonPressed(int buttonId) {
+ if (buttonId == IDialogConstants.DETAILS_ID) {
+ setDefaults();
+ return;
+ }
+ super.buttonPressed(buttonId);
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * Sets default value depending on Kernel or UST
+ */
+ private void setDefaults() {
+ fSwitchTimerText.setText(DEFAULT_TEXT);
+ fSwitchTimerText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ fReadTimerText.setText(DEFAULT_TEXT);
+ fReadTimerText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ fOverwriteModeButton.setSelection(IChannelInfo.DEFAULT_OVERWRITE_MODE);
+ if (fTargetNodeComponent.isTraceFileRotationSupported()) {
+ fMaxSizeTraceText.setText(DEFAULT_TEXT);
+ fMaxSizeTraceText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ fMaxNumberTraceText.setText(DEFAULT_TEXT);
+ fMaxNumberTraceText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ }
+ fSubBufferSizeText.setText(DEFAULT_TEXT);
+ fSubBufferSizeText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ fNumberOfSubBuffersText.setText(DEFAULT_TEXT);
+ fNumberOfSubBuffersText.setForeground(getShell().getDisplay().getSystemColor(SWT.COLOR_GRAY));
+ if (fTargetNodeComponent.isBufferTypeConfigSupported()) {
+ setBufferTypeButtonSelection();
+ }
+ }
+
+ private void setBufferTypeButtonSelection() {
+ if ((fDomain != null) && fDomain.getBufferType() != null) {
+ switch (fDomain.getBufferType()) {
+ case BUFFER_PER_PID:
+ fPIDBuffersButton.setSelection(true);
+ break;
+ case BUFFER_PER_UID:
+ fUIDBuffersButton.setSelection(true);
+ break;
+ case BUFFER_SHARED:
+ fSharedBuffersButton.setSelection(true);
+ break;
+ //$CASES-OMITTED$
+ default:
+ break;
+ }
+ }
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.List;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * <p>
+ * Dialog box for collecting information events to be enabled.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableEventsDialog extends Dialog implements IEnableEventsDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String ENABLE_EVENT_ICON_FILE = "icons/elcl16/enable_event.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The dialog composite.
+ */
+ private Composite fDialogComposite;
+ /**
+ * The composite with widgets for collecting information about kernel events.
+ */
+ private EnableKernelEventComposite fKernelComposite;
+ /**
+ * The composite with widgets for collecting information about UST events.
+ */
+ private EnableUstEventsComposite fUstComposite;
+ /**
+ * Radio button for selecting kernel domain.
+ */
+ private Button fKernelButton;
+ /**
+ * Radio button for selecting UST domain.
+ */
+ private Button fUstButton;
+ /**
+ * The referenced trace provider group containing the kernel provider and UST
+ * provider component which contains a list of available tracepoints.
+ */
+ private TraceProviderGroup fProviderGroup;
+ /**
+ * The parent domain component where the channel node should be added.
+ * Null in case the domain is not known (i.e. on session level).
+ */
+ private TraceDomainComponent fDomain;
+ /**
+ * Output domain information. True in case of Kernel domain. False for UST.
+ */
+ private boolean fIsKernel;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public EnableEventsDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public boolean isTracepoints() {
+ if (fIsKernel) {
+ return fKernelComposite.isTracepoints();
+ }
+ return fUstComposite.isTracepoints();
+ }
+
+ @Override
+ public boolean isAllTracePoints() {
+ if (fIsKernel) {
+ return fKernelComposite.isAllTracePoints();
+ }
+ return fUstComposite.isAllTracePoints();
+ }
+
+ @Override
+ public boolean isSysCalls() {
+ if (fIsKernel) {
+ return fKernelComposite.isSysCalls();
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isAllSysCalls() {
+ if (fIsKernel) {
+ return fKernelComposite.isSysCalls();
+ }
+ return false;
+ }
+
+ @Override
+ public List<String> getEventNames() {
+ if (fIsKernel) {
+ return fKernelComposite.getEventNames();
+ }
+ return fUstComposite.getEventNames();
+ }
+
+ @Override
+ public boolean isDynamicProbe() {
+ if (fIsKernel) {
+ return fKernelComposite.isDynamicProbe();
+ }
+ return false;
+ }
+
+ @Override
+ public String getProbeName() {
+ if (fIsKernel) {
+ return fKernelComposite.getProbeName();
+ }
+ return null;
+ }
+
+ @Override
+ public String getProbeEventName() {
+ if (fIsKernel) {
+ return fKernelComposite.getProbeEventName();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isDynamicFunctionProbe() {
+ if (fIsKernel) {
+ return fKernelComposite.isDynamicFunctionProbe();
+ }
+ return false;
+ }
+
+ @Override
+ public String getFunctionEventName() {
+ if (fIsKernel) {
+ return fKernelComposite.getFunctionEventName();
+ }
+ return null;
+ }
+
+ @Override
+ public String getFunction() {
+ if (fIsKernel) {
+ return fKernelComposite.getFunction();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isWildcard() {
+ if (!fIsKernel) {
+ return fUstComposite.isWildcard();
+ }
+ return false;
+ }
+
+ @Override
+ public String getWildcard() {
+ if (!fIsKernel) {
+ return fUstComposite.getWildcard();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isLogLevel() {
+ if (!fIsKernel) {
+ return fUstComposite.isLogLevel();
+ }
+ return false;
+ }
+
+ @Override
+ public LogLevelType getLogLevelType() {
+ if (!fIsKernel) {
+ return fUstComposite.getLogLevelType();
+ }
+ return null;
+ }
+
+ @Override
+ public TraceLogLevel getLogLevel() {
+ if (!fIsKernel) {
+ return fUstComposite.getLogLevel();
+ }
+ return null;
+ }
+
+ @Override
+ public String getLogLevelEventName() {
+ if (!fIsKernel) {
+ return fUstComposite.getLogLevelEventName();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isKernel() {
+ return fIsKernel;
+ }
+
+ @Override
+ public void setTraceProviderGroup(TraceProviderGroup providerGroup) {
+ fProviderGroup = providerGroup;
+ }
+
+ @Override
+ public void setTraceDomainComponent(TraceDomainComponent domain) {
+ fDomain = domain;
+ if (fDomain != null) {
+ fIsKernel = fDomain.isKernel();
+ } else {
+ fIsKernel = fProviderGroup != null ? fProviderGroup.hasKernelProvider() : true;
+ }
+ }
+
+ @Override
+ public String getFilterExpression() {
+ if (!fIsKernel) {
+ return fUstComposite.getFilterExpression();
+ }
+ return null;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_EnableEventsDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(ENABLE_EVENT_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ fDialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ fDialogComposite.setLayout(layout);
+ fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // ------------------------------------------------------------------------
+ // Domain Group
+ // ------------------------------------------------------------------------
+ Group domainGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ domainGroup.setText(Messages.TraceControl_DomainDisplayName);
+ layout = new GridLayout(2, true);
+ domainGroup.setLayout(layout);
+
+ fKernelButton = new Button(domainGroup, SWT.RADIO);
+ fKernelButton.setText(Messages.TraceControl_KernelDomainDisplayName);
+ fKernelButton.setSelection(fIsKernel);
+ fUstButton = new Button(domainGroup, SWT.RADIO);
+ fUstButton.setText(Messages.TraceControl_UstDisplayName);
+ fUstButton.setSelection(!fIsKernel);
+
+ if ((fDomain != null) || ((fProviderGroup != null) && (!fProviderGroup.hasKernelProvider()))) {
+ fKernelButton.setEnabled(false);
+ fUstButton.setEnabled(false);
+ }
+
+ // layout widgets
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ domainGroup.setLayoutData(data);
+
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fKernelButton.setLayoutData(data);
+ data = new GridData(SWT.BEGINNING, SWT.BEGINNING, true, true);
+ fUstButton.setLayoutData(data);
+
+ // ------------------------------------------------------------------------
+ // Kernel or UST event data group
+ // ------------------------------------------------------------------------
+ fUstComposite = null;
+ fKernelComposite = null;
+ if (fIsKernel) {
+ createKernelComposite();
+ fUstComposite = null;
+ } else {
+ createUstComposite();
+ }
+
+ fKernelButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fKernelButton.getSelection()) {
+ disposeUstComposite();
+ createKernelComposite();
+ fDialogComposite.layout();
+ }
+ }
+ });
+
+ fUstButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fUstButton.getSelection()) {
+ disposeKernelComposite();
+ createUstComposite();
+ fDialogComposite.layout();
+ }
+ }
+ });
+
+ getShell().setMinimumSize(new Point(500, 650));
+
+ return fDialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void okPressed() {
+ fIsKernel = fKernelButton.getSelection();
+
+ // Validate kernel composite in case of kernel domain
+ if (fKernelComposite != null && !fKernelComposite.isValid()) {
+ return;
+ }
+
+ // Validate UST composite in case of UST domain
+ if (fUstComposite != null && !fUstComposite.isValid()) {
+ return;
+ }
+
+ // validation successful -> call super.okPressed()
+ super.okPressed();
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * Creates the kernel composite (if not existing)
+ */
+ private void createKernelComposite() {
+ if (fKernelComposite == null) {
+ fKernelComposite = new EnableKernelEventComposite(fDialogComposite, SWT.NONE, fProviderGroup);
+ GridLayout layout = new GridLayout(1, true);
+ fKernelComposite.setLayout(layout);
+ fKernelComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ fKernelComposite.createContent();
+ }
+ }
+
+ /**
+ * Disposes the kernel composite (if existing)
+ */
+ private void disposeKernelComposite() {
+ if (fKernelComposite != null) {
+ fKernelComposite.dispose();
+ fKernelComposite = null;
+ }
+ }
+
+ /**
+ * Creates the UST composite (if not existing)
+ */
+ private void createUstComposite() {
+ if (fUstComposite == null) {
+ fUstComposite = new EnableUstEventsComposite(fDialogComposite, SWT.NONE, fProviderGroup);
+ GridLayout layout = new GridLayout(1, true);
+ fUstComposite.setLayout(layout);
+ fUstComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ fUstComposite.createContent();
+ }
+ }
+
+ /**
+ * Disposes the UST composite (if existing)
+ */
+ private void disposeUstComposite() {
+ if (fUstComposite != null) {
+ fUstComposite.dispose();
+ fUstComposite = null;
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Marc-Andre Laperle - Add filtering textbox
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlContentProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlLabelProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+/**
+ * <p>
+ * A composite for collecting information about kernel events to be enabled.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableKernelEventComposite extends Composite implements IEnableKernelEvents {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ private enum KernelGroupEnum { TRACEPOINTS, SYSCALLS, PROBE, FUNCTION }
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * A button to enable/disable the tracepoints group
+ */
+ private Button fTracepointsActivateButton;
+ /**
+ * A tree viewer for displaying and selection of available tracepoints.
+ */
+ private CheckboxTreeViewer fTracepointsViewer;
+ /**
+ * A button to enable/disable the syscalls group
+ */
+ private Button fSysCallsActivateButton;
+ /**
+ * A button to enable or disable the dynamic probe group.
+ */
+ private Button fProbeActivateButton;
+ /**
+ * The text field for the event name for the dynamic probe.
+ */
+ private Text fProbeEventNameText;
+ /**
+ * The text field for the dynamic probe.
+ */
+ private Text fProbeText;
+ /**
+ * A button to enable or disable the dynamic function probe group.
+ */
+ private Button fFunctionActivateButton;
+ /**
+ * The text field for the event name for the dynamic probe.
+ */
+ private Text fFunctionEventNameText;
+ /**
+ * The text field for the dynamic function entry/return probe.
+ */
+ private Text fFunctionText;
+ /**
+ * The referenced trace provider group containing the kernel provider
+ * component which contains a list of available tracepoints.
+ */
+ private final TraceProviderGroup fProviderGroup;
+ /**
+ * The flag indicating that tracepoints are selected.
+ */
+ private boolean fIsTracepoints;
+ /**
+ * The flag indicating that all tracepoints are selected.
+ */
+ private boolean fIsAllTracepoints;
+ /**
+ * The flag indicating that syscalls are selected.
+ */
+ private boolean fIsSysCalls;
+ /**
+ * The list of tracepoints to be enabled.
+ */
+ private List<String> fSelectedEvents;
+ /**
+ * The flag indicating that dynamic probe is selected.
+ */
+ private boolean fIsDynamicProbe;
+ /**
+ * The event name of the dynamic probe.
+ */
+ private String fProbeEventName;
+ /**
+ * The dynamic probe.
+ */
+ private String fProbeString;
+ /**
+ * The flag indicating that the dynamic function probe is selected.
+ */
+ private boolean fIsDynamicFunctionProbe;
+ /**
+ * The event name of the dynamic function entry/return probe.
+ */
+ private String fFunctionEventName;
+ /**
+ * The dynamic function entry/return probe.
+ */
+ private String fFunctionString;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * The parent composite
+ * @param style
+ * The index of the style for this event composite
+ * @param providerGroup
+ * The trace provider group
+ */
+ public EnableKernelEventComposite(Composite parent, int style, TraceProviderGroup providerGroup) {
+ super(parent, style);
+ fProviderGroup = providerGroup;
+ }
+
+ // ------------------------------------------------------------------------
+ // Acessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public boolean isTracepoints() {
+ return fIsTracepoints;
+ }
+
+ @Override
+ public boolean isAllTracePoints() {
+ return fIsAllTracepoints;
+ }
+
+ @Override
+ public boolean isSysCalls() {
+ return fIsSysCalls;
+ }
+
+ @Override
+ public boolean isAllSysCalls() {
+ return fIsSysCalls;
+ }
+
+ @Override
+ public List<String> getEventNames() {
+ return new ArrayList<>(fSelectedEvents);
+ }
+
+ @Override
+ public boolean isDynamicProbe() {
+ return fIsDynamicProbe;
+ }
+
+ @Override
+ public String getProbeName() {
+ return fProbeString;
+ }
+
+ @Override
+ public String getProbeEventName() {
+ return fProbeEventName;
+ }
+
+ @Override
+ public boolean isDynamicFunctionProbe() {
+ return fIsDynamicFunctionProbe;
+ }
+
+ @Override
+ public String getFunctionEventName() {
+ return fFunctionEventName;
+ }
+
+ @Override
+ public String getFunction() {
+ return fFunctionString;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Creates the composite content
+ */
+ public void createContent() {
+
+ // Tracepoints Group
+ createTracepointsGroup();
+
+ // Syscalls Group
+ createSysCallsGroup();
+
+ // Dynamic Probe Group
+ createDynamicProbeGroup();
+
+ // Dynamic Function Probe Group
+ createDynamicFunctionPropeGroup();
+
+ // Set default enablements
+ setKernelEnablements(KernelGroupEnum.TRACEPOINTS);
+ }
+
+ /**
+ * Validates the kernel composite input data.
+ * @return true if configured data is valid and can be retrieved.
+ */
+ public boolean isValid() {
+ fIsTracepoints = fTracepointsActivateButton.getSelection();
+ fIsSysCalls = fSysCallsActivateButton.getSelection();
+ fIsDynamicProbe = fProbeActivateButton.getSelection();
+ fIsDynamicFunctionProbe = fFunctionActivateButton.getSelection();
+
+ // initialize tracepoint fields
+ fIsAllTracepoints = false;
+ fSelectedEvents = new ArrayList<>();
+
+ if (fIsTracepoints) {
+ List<ITraceControlComponent> comps = fProviderGroup.getChildren(KernelProviderComponent.class);
+ fIsAllTracepoints = fTracepointsViewer.getChecked(comps.get(0));
+
+ Object[] checkedElements = fTracepointsViewer.getCheckedElements();
+ for (int i = 0; i < checkedElements.length; i++) {
+ ITraceControlComponent component = (ITraceControlComponent)checkedElements[i];
+ if (component instanceof BaseEventComponent) {
+ fSelectedEvents.add(component.getName());
+ }
+ }
+ }
+
+ if (fIsDynamicProbe) {
+ String temp = fProbeEventNameText.getText();
+ if (temp.isEmpty() ||
+ fProbeText.getText().matches("\\s*") || //$NON-NLS-1$
+ (!temp.matches("^[\\s]{0,}$") && !temp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidProbeNameError + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+
+ fProbeEventName = temp;
+ // fProbeString will be validated by lttng-tools
+ fProbeString = fProbeText.getText();
+ }
+
+ // initialize function string
+ fFunctionEventName = null;
+ fFunctionString = null;
+ if (fIsDynamicFunctionProbe) {
+ String functionTemp = fFunctionEventNameText.getText();
+ if (functionTemp.isEmpty() ||
+ functionTemp.matches("\\s*") || //$NON-NLS-1$
+ (!functionTemp.matches("^[\\s]{0,}$") && !functionTemp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidProbeNameError + " (" + functionTemp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+
+ fFunctionEventName = functionTemp;
+ // fFunctionString will be validated by lttng-tools
+ fFunctionString = fFunctionText.getText();
+ }
+
+ return true;
+ }
+
+ /**
+ * Creates tracepoints group.
+ */
+ private void createTracepointsGroup() {
+
+ GridLayout layout;
+ GridData data;
+ Group tpMainGroup = new Group(this, SWT.SHADOW_NONE);
+ tpMainGroup.setText(Messages.TraceControl_EnableEventsTracepointGroupName);
+ layout = new GridLayout(2, false);
+ tpMainGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_BOTH);
+ tpMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(tpMainGroup, SWT.NONE);
+ layout = new GridLayout(1, true);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fTracepointsActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fTracepointsActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fTracepointsActivateButton.setLayoutData(data);
+ fTracepointsActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setKernelEnablements(KernelGroupEnum.TRACEPOINTS);
+ }
+ });
+
+ Group tracepointsGroup = new Group(tpMainGroup, SWT.SHADOW_NONE);
+ layout = new GridLayout(1, true);
+ tracepointsGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_BOTH);
+ tracepointsGroup.setLayoutData(data);
+
+ new FilteredTree(tracepointsGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, new PatternFilter(), true) {
+ @Override
+ protected TreeViewer doCreateTreeViewer(Composite aparent, int style) {
+ fTracepointsViewer = new CheckboxTreeViewer(aparent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ fTracepointsViewer.getTree().setToolTipText(Messages.TraceControl_EnableEventsTracepointTreeTooltip);
+
+ fTracepointsViewer.setContentProvider(new KernelContentProvider());
+ fTracepointsViewer.setLabelProvider(new KernelLabelProvider());
+ fTracepointsViewer.addCheckStateListener(new KernelCheckListener());
+ fTracepointsViewer.setInput(fProviderGroup);
+
+ fTracepointsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+ return fTracepointsViewer;
+ }
+ };
+ }
+
+ /**
+ * Creates syscalls group.
+ */
+ private void createSysCallsGroup() {
+ GridLayout layout;
+ GridData data;
+ Group sysCallsMainGroup = new Group(this, SWT.SHADOW_NONE);
+ sysCallsMainGroup.setText(Messages.TraceControl_EnableEventsSyscallName);
+ sysCallsMainGroup.setToolTipText(Messages.TraceControl_EnableEventsSyscallTooltip);
+ layout = new GridLayout(2, false);
+ sysCallsMainGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ sysCallsMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(sysCallsMainGroup, SWT.NONE);
+ layout = new GridLayout(1, false);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fSysCallsActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fSysCallsActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ fSysCallsActivateButton.setToolTipText(Messages.TraceControl_EnableEventsSyscallTooltip);
+ fSysCallsActivateButton.setSelection(false);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fSysCallsActivateButton.setLayoutData(data);
+ fSysCallsActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setKernelEnablements(KernelGroupEnum.SYSCALLS);
+ }
+ });
+ }
+
+ /**
+ * Creates dynamic probe group.
+ */
+ private void createDynamicProbeGroup() {
+ GridLayout layout;
+ GridData data;
+ Group probeMainGroup = new Group(this, SWT.SHADOW_NONE);
+ probeMainGroup.setText(Messages.TraceControl_EnableEventsProbeGroupName);
+ layout = new GridLayout(2, false);
+ probeMainGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ probeMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(probeMainGroup, SWT.NONE);
+ layout = new GridLayout(1, false);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fProbeActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fProbeActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ fProbeActivateButton.setSelection(false);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fProbeActivateButton.setLayoutData(data);
+ fProbeActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setKernelEnablements(KernelGroupEnum.PROBE);
+ }
+ });
+
+ Group probeGroup = new Group(probeMainGroup, SWT.SHADOW_NONE);
+ layout = new GridLayout(4, true);
+ probeGroup.setLayout(layout);
+ probeGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label probeNameLabel = new Label(probeGroup, SWT.LEFT);
+ probeNameLabel.setText(Messages.TraceControl_EnableEventsEventNameLabel);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 1;
+ probeNameLabel.setLayoutData(data);
+
+ fProbeEventNameText = new Text(probeGroup, SWT.LEFT);
+ fProbeEventNameText.setToolTipText(Messages.TraceControl_EnableEventsProbeEventNameTooltip);
+
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 3;
+ fProbeEventNameText.setLayoutData(data);
+
+ Label probeLabel = new Label(probeGroup, SWT.LEFT);
+ probeLabel.setText(Messages.TraceControl_EnableEventsProbeNameLabel);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 1;
+ probeLabel.setLayoutData(data);
+
+ fProbeText = new Text(probeGroup, SWT.LEFT);
+ fProbeText.setToolTipText(Messages.TraceControl_EnableEventsProbeNameTooltip);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 3;
+ fProbeText.setLayoutData(data);
+ }
+
+ /**
+ * Creates dynamic function entry/return probe group.
+ */
+ private void createDynamicFunctionPropeGroup() {
+ GridLayout layout;
+ GridData data;
+ Group functionMainGroup = new Group(this, SWT.SHADOW_NONE);
+ functionMainGroup.setText(Messages.TraceControl_EnableEventsFucntionGroupName);
+ layout = new GridLayout(2, false);
+ functionMainGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ functionMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(functionMainGroup, SWT.NONE);
+ layout = new GridLayout(1, false);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fFunctionActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fFunctionActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ fFunctionActivateButton.setSelection(false);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fFunctionActivateButton.setLayoutData(data);
+ fFunctionActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setKernelEnablements(KernelGroupEnum.FUNCTION);
+ }
+ });
+
+ Group functionGroup = new Group(functionMainGroup, SWT.SHADOW_NONE);
+ layout = new GridLayout(4, true);
+ functionGroup.setLayout(layout);
+ functionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label functionNameLabel = new Label(functionGroup, SWT.LEFT);
+ functionNameLabel.setText(Messages.TraceControl_EnableEventsEventNameLabel);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 1;
+ functionNameLabel.setLayoutData(data);
+
+ fFunctionEventNameText = new Text(functionGroup, SWT.LEFT);
+ fFunctionEventNameText.setToolTipText(Messages.TraceControl_EnableEventsFunctionEventNameTooltip);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 3;
+ fFunctionEventNameText.setLayoutData(data);
+
+ Label functionLabel = new Label(functionGroup, SWT.LEFT);
+ functionLabel.setText(Messages.TraceControl_EnableEventsFunctionNameLabel);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 1;
+ functionLabel.setLayoutData(data);
+
+ fFunctionText = new Text(functionGroup, SWT.LEFT);
+ fFunctionText.setToolTipText(Messages.TraceControl_EnableEventsProbeNameTooltip);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 3;
+ fFunctionText.setLayoutData(data);
+ }
+
+ /**
+ * Enable/selects widgets depending on the group specified.
+ * @param group - group to enable.
+ */
+ private void setKernelEnablements(KernelGroupEnum group) {
+ fTracepointsActivateButton.setSelection(group == KernelGroupEnum.TRACEPOINTS);
+ fTracepointsViewer.getTree().setEnabled(group == KernelGroupEnum.TRACEPOINTS);
+
+ fSysCallsActivateButton.setSelection(group == KernelGroupEnum.SYSCALLS);
+
+ fProbeActivateButton.setSelection(group == KernelGroupEnum.PROBE);
+ fProbeEventNameText.setEnabled(group == KernelGroupEnum.PROBE);
+ fProbeText.setEnabled(group == KernelGroupEnum.PROBE);
+
+ fFunctionActivateButton.setSelection(group == KernelGroupEnum.FUNCTION);
+ fFunctionEventNameText.setEnabled(group == KernelGroupEnum.FUNCTION);
+ fFunctionText.setEnabled(group == KernelGroupEnum.FUNCTION);
+ }
+
+ // ------------------------------------------------------------------------
+ // Local classes
+ // ------------------------------------------------------------------------
+ /**
+ * Content provider for the tracepoints tree.
+ */
+ public static final class KernelContentProvider extends TraceControlContentProvider {
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof TraceProviderGroup) {
+ List<ITraceControlComponent> children = ((ITraceControlComponent)parentElement).getChildren(KernelProviderComponent.class);
+ return children.toArray(new ITraceControlComponent[children.size()]);
+ }
+ if (parentElement instanceof ITraceControlComponent) {
+ return ((ITraceControlComponent)parentElement).getChildren();
+ }
+ return new Object[0];
+ }
+ }
+
+ /**
+ * Content label for the tracepoints tree.
+ */
+ public static final class KernelLabelProvider extends TraceControlLabelProvider {
+ @Override
+ public Image getImage(Object element) {
+ return null;
+ }
+ @Override
+ public String getText(Object element) {
+ if ((element != null) && (element instanceof KernelProviderComponent)) {
+ return Messages.TraceControl_EnableEventsTracepointTreeAllLabel;
+ }
+ return super.getText(element);
+ }
+ }
+
+ /**
+ * Check state listener for the tracepoints tree.
+ */
+ public final class KernelCheckListener implements ICheckStateListener {
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ if (event.getChecked()) {
+ if (event.getElement() instanceof KernelProviderComponent) {
+ fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
+ }
+ } else {
+ if (event.getElement() instanceof KernelProviderComponent) {
+ fTracepointsViewer.setSubtreeChecked(event.getElement(), false);
+ } else {
+ ITraceControlComponent component = (ITraceControlComponent) event.getElement();
+ fTracepointsViewer.setChecked(component.getParent(), false);
+ }
+ }
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Marc-Andre Laperle - Add filtering textbox
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlContentProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlLabelProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+/**
+ * <p>
+ * A composite for collecting information about UST events to be enabled.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableUstEventsComposite extends Composite implements IEnableUstEvents {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ private enum GroupEnum { TRACEPOINTS, WILDCARD, LOGLEVEL }
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * A button to enable/disable the tracepoints group
+ */
+ private Button fTracepointsActivateButton;
+ /**
+ * A tree viewer for diplaying and selection of available tracepoints.
+ */
+ private CheckboxTreeViewer fTracepointsViewer;
+ /**
+ * A button to enable/disable the wildcard group
+ */
+ private Button fWildcardActivateButton;
+ /**
+ * A Text field for the event's wildcard.
+ */
+ private Text fWildcardText;
+ /**
+ * A button to enable/disable the log level group
+ */
+ private Button fLogLevelActivateButton;
+ /**
+ * A Text field for the event name for the log level enablement.
+ */
+ private Text fLogLevelEventNameText;
+ /**
+ * A Combo box for selecting the log level.
+ */
+ private CCombo fLogLevelCombo;
+ /**
+ * A button for selecting the log level (range 0 to level).
+ */
+ private Button fLogLevelButton;
+ /**
+ * A button for selecting the specified log level only.
+ */
+ private Button fLogLevelOnlyButton;
+ /**
+ * The filter text
+ */
+ private Text fFilterText;
+
+ /**
+ * The referenced trace provider group containing the UST providers
+ * component which contains a list of available tracepoints.
+ */
+ private final TraceProviderGroup fProviderGroup;
+ /**
+ * The flag indicating that tracepoints are selected.
+ */
+ private boolean fIsTracepoints;
+ /**
+ * The flag indicating that all tracepoints (across providers) are selected.
+ */
+ private boolean fIsAllTracepoints;
+ /**
+ * The list of tracepoints to be enabled.
+ */
+ private List<String> fSelectedEvents;
+ /**
+ * The flag indicating that all wildcard are selected..
+ */
+ private boolean fIsWildcard;
+ /**
+ * The wildcard if wildcard is selected.
+ */
+ private String fWildcard;
+ /**
+ *The flag indicating that all log level are selected.
+ */
+ private boolean fIsLogLevel;
+ /**
+ * The event name for the log level enablement.
+ */
+ private String fLogLevelEventName;
+ /**
+ * The type of the log level (loglevel or loglevel-only)
+ */
+ private LogLevelType fLogLevelType;
+ /**
+ * The actual selected log level.
+ */
+ private TraceLogLevel fLogLevel;
+ /**
+ * The filter expression
+ */
+ private String fFilterExpression;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param parent - a parent composite
+ * @param style - a composite style
+ * @param providerGroup - the trace provider group
+ */
+ public EnableUstEventsComposite(Composite parent, int style, TraceProviderGroup providerGroup) {
+ super(parent, style);
+ fProviderGroup = providerGroup;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public boolean isTracepoints() {
+ return fIsTracepoints;
+ }
+
+ @Override
+ public boolean isAllTracePoints() {
+ return fIsAllTracepoints;
+ }
+
+ @Override
+ public List<String> getEventNames() {
+ return new ArrayList<>(fSelectedEvents);
+ }
+
+ @Override
+ public boolean isWildcard() {
+ return fIsWildcard;
+ }
+
+ @Override
+ public String getWildcard() {
+ return fWildcard;
+ }
+
+ @Override
+ public boolean isLogLevel() {
+ return fIsLogLevel;
+ }
+
+ @Override
+ public LogLevelType getLogLevelType() {
+ return fLogLevelType;
+ }
+
+ @Override
+ public TraceLogLevel getLogLevel() {
+ return fLogLevel;
+ }
+
+ @Override
+ public String getLogLevelEventName() {
+ return fLogLevelEventName;
+ }
+
+ @Override
+ public String getFilterExpression() {
+ return fFilterExpression;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Create the contents of this event composite
+ */
+ public void createContent() {
+
+ // Tracepoints Group
+ createTracepointsGroup();
+
+ // Wildcard Group
+ createWildCardGroup();
+
+ // Log Level Group
+ createLogLevelGroup();
+
+ // Filter Group
+ createFilterGroup();
+
+ // Set default enablements
+ setEnablements(GroupEnum.TRACEPOINTS);
+ }
+
+ /**
+ * Validates the UST composite input data.
+ *
+ * @return true if configured data is valid and can be retrieved.
+ */
+ public boolean isValid() {
+
+ fIsTracepoints = fTracepointsActivateButton.getSelection();
+ fIsWildcard = fWildcardActivateButton.getSelection();
+ fIsLogLevel = fLogLevelActivateButton.getSelection();
+
+ // initialize tracepoint fields
+ fIsAllTracepoints = false;
+ fSelectedEvents = new ArrayList<>();
+ if (fIsTracepoints) {
+ fIsAllTracepoints = fTracepointsViewer.getChecked(fProviderGroup);
+ Set<String> set = new HashSet<>();
+ Object[] checkedElements = fTracepointsViewer.getCheckedElements();
+ for (int i = 0; i < checkedElements.length; i++) {
+ ITraceControlComponent component = (ITraceControlComponent)checkedElements[i];
+ if (!set.contains(component.getName()) && (component instanceof BaseEventComponent)) {
+ set.add(component.getName());
+ fSelectedEvents.add(component.getName());
+ }
+ }
+ }
+
+ // initialize log level event name string
+ fLogLevelType = LogLevelType.LOGLEVEL_NONE;
+ fLogLevelEventName = null;
+
+ if (fIsLogLevel) {
+ if (fLogLevelButton.getSelection()) {
+ fLogLevelType = LogLevelType.LOGLEVEL;
+ } else if (fLogLevelOnlyButton.getSelection()) {
+ fLogLevelType = LogLevelType.LOGLEVEL_ONLY;
+ }
+
+ String temp = fLogLevelEventNameText.getText();
+ if (temp.isEmpty() ||
+ temp.matches("\\s*") || //$NON-NLS-1$
+ (!temp.matches("^[\\s]{0,}$") && !temp.matches("^[a-zA-Z0-9\\-\\_]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidLogLevelEventNameError + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+
+ fLogLevelEventName = temp;
+
+ TraceLogLevel[] levels = TraceLogLevel.values();
+ int id = fLogLevelCombo.getSelectionIndex();
+
+ if (id < 0) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidLogLevel + " (" + temp + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+ fLogLevel = levels[id];
+ }
+
+ // initialize wildcard with null
+ fWildcard = null;
+ if (fIsWildcard) {
+ String tempWildcard = fWildcardText.getText();
+ if (tempWildcard.isEmpty() ||
+ tempWildcard.matches("\\s*") || //$NON-NLS-1$
+ (!tempWildcard.matches("^[\\s]{0,}$") && !tempWildcard.matches("^[a-zA-Z0-9\\-\\_\\*]{1,}$"))) { //$NON-NLS-1$ //$NON-NLS-2$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_InvalidWildcardError + " (" + tempWildcard + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ return false;
+ }
+
+ fWildcard = tempWildcard;
+ }
+
+ // initialize filter with null
+ fFilterExpression = null;
+ if (fProviderGroup.isEventFilteringSupported()) {
+ String tempFilter = fFilterText.getText();
+
+ if(!tempFilter.isEmpty() && !tempFilter.matches("\\s*")) { //$NON-NLS-1$
+ fFilterExpression = tempFilter;
+ }
+ }
+
+ // validation successful -> call super.okPressed()
+ return true;
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * Creates tracepoints group.
+ */
+ private void createTracepointsGroup() {
+ Group tpMainGroup = new Group(this, SWT.SHADOW_NONE);
+ tpMainGroup.setText(Messages.TraceControl_EnableEventsTracepointGroupName);
+ GridLayout layout = new GridLayout(2, false);
+ tpMainGroup.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ tpMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(tpMainGroup, SWT.NONE);
+ layout = new GridLayout(1, true);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fTracepointsActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fTracepointsActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fTracepointsActivateButton.setLayoutData(data);
+ fTracepointsActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setEnablements(GroupEnum.TRACEPOINTS);
+ }
+ });
+
+ Group tpGroup = new Group(tpMainGroup, SWT.SHADOW_NONE);
+ layout = new GridLayout(1, true);
+ tpGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_BOTH);
+ tpGroup.setLayoutData(data);
+ new FilteredTree(tpGroup, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER, new PatternFilter(), true) {
+ @Override
+ protected TreeViewer doCreateTreeViewer(Composite aparent, int style) {
+ fTracepointsViewer = new CheckboxTreeViewer(aparent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
+ fTracepointsViewer.getTree().setToolTipText(Messages.TraceControl_EnableEventsTracepointTreeTooltip);
+ fTracepointsViewer.setContentProvider(new UstContentProvider());
+
+ fTracepointsViewer.setLabelProvider(new UstLabelProvider());
+ fTracepointsViewer.addCheckStateListener(new UstCheckStateListener());
+
+ fTracepointsViewer.setInput(fProviderGroup.getParent());
+ fTracepointsViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
+ return fTracepointsViewer;
+ }
+ };
+ }
+
+ /**
+ * Creates wildcard group.
+ */
+ private void createWildCardGroup() {
+ Group wildcardMainGroup = new Group(this, SWT.SHADOW_NONE);
+ wildcardMainGroup.setText(Messages.TraceControl_EnableEventsWildcardGroupName);
+ GridLayout layout = new GridLayout(2, false);
+ wildcardMainGroup.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ wildcardMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(wildcardMainGroup, SWT.NONE);
+ layout = new GridLayout(1, false);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fWildcardActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fWildcardActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ fWildcardActivateButton.setSelection(false);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fWildcardActivateButton.setLayoutData(data);
+ fWildcardActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setEnablements(GroupEnum.WILDCARD);
+ }
+ });
+
+ Group wildcardGroup = new Group(wildcardMainGroup, SWT.SHADOW_NONE);
+ layout = new GridLayout(3, true);
+ wildcardGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ wildcardGroup.setLayoutData(data);
+
+ Label wildcardLabel = new Label(wildcardGroup, SWT.LEFT);
+ wildcardLabel.setText(Messages.TraceControl_EnableEventsWildcardLabel);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ wildcardLabel.setLayoutData(data);
+
+ fWildcardText = new Text(wildcardGroup, SWT.LEFT);
+ fWildcardText.setToolTipText(Messages.TraceControl_EnableEventsWildcardTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 2;
+ fWildcardText.setLayoutData(data);
+ }
+
+ /**
+ * Creates log level group.
+ */
+ private void createLogLevelGroup() {
+ Group logLevelMainGroup = new Group(this, SWT.SHADOW_NONE);
+ logLevelMainGroup.setText(Messages.TraceControl_EnableEventsLogLevelGroupName);
+ GridLayout layout = new GridLayout(2, false);
+ logLevelMainGroup.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ logLevelMainGroup.setLayoutData(data);
+
+ Composite buttonComposite = new Composite(logLevelMainGroup, SWT.NONE);
+ layout = new GridLayout(1, false);
+ buttonComposite.setLayout(layout);
+ data = new GridData(SWT.BEGINNING, SWT.CENTER, false, true);
+ buttonComposite.setLayoutData(data);
+
+ fLogLevelActivateButton = new Button(buttonComposite, SWT.RADIO);
+ fLogLevelActivateButton.setText(Messages.TraceControl_EnableGroupSelectionName);
+ fLogLevelActivateButton.setSelection(false);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fLogLevelActivateButton.setLayoutData(data);
+ fLogLevelActivateButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setEnablements(GroupEnum.LOGLEVEL);
+ }
+ });
+
+ Group logLevelGroup = new Group(logLevelMainGroup, SWT.SHADOW_NONE);
+ layout = new GridLayout(3, true);
+ logLevelGroup.setLayout(layout);
+ logLevelGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ Label logLevelEventNameLabel = new Label(logLevelGroup, SWT.LEFT);
+ logLevelEventNameLabel.setText(Messages.TraceControl_EnableEventsEventNameLabel);
+
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 1;
+ logLevelEventNameLabel.setLayoutData(data);
+
+ fLogLevelEventNameText = new Text(logLevelGroup, SWT.LEFT);
+ fLogLevelEventNameText.setToolTipText(Messages.TraceControl_EnableEventsLoglevelEventNameTooltip);
+ data = new GridData(GridData.FILL_BOTH);
+ data.horizontalSpan = 2;
+ fLogLevelEventNameText.setLayoutData(data);
+
+ TraceLogLevel[] levels = TraceLogLevel.values();
+
+ String[] levelNames = new String[levels.length - 1];
+ int k = 0;
+ for (int i = 0; i < levels.length; i++) {
+ if (levels[i] != TraceLogLevel.LEVEL_UNKNOWN) {
+ levelNames[k++] = levels[i].getInName();
+ }
+ }
+
+ fLogLevelCombo = new CCombo(logLevelGroup, SWT.READ_ONLY);
+ fLogLevelCombo.setItems(levelNames);
+ fLogLevelCombo.setToolTipText(Messages.TraceControl_EnableEventsLogLevelTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 4;
+ fLogLevelCombo.setLayoutData(data);
+
+ fLogLevelButton = new Button(logLevelGroup, SWT.RADIO);
+ fLogLevelButton.setText(Messages.TraceControl_EnableEventsLogLevelTypeName);
+ fLogLevelButton.setToolTipText(Messages.TraceControl_EnableEventsLogLevelTypeTooltip);
+ data = new GridData(GridData.FILL_BOTH);
+ fLogLevelButton.setLayoutData(data);
+ fLogLevelButton.setSelection(true);
+
+ fLogLevelOnlyButton = new Button(logLevelGroup, SWT.RADIO);
+ fLogLevelOnlyButton.setText(Messages.TraceControl_EnableEventsLogLevelOnlyTypeName);
+ fLogLevelOnlyButton.setToolTipText(Messages.TraceControl_EnableEventsLogLevelOnlyTypeTooltip);
+ data = new GridData(GridData.FILL_BOTH);
+ fLogLevelButton.setLayoutData(data);
+ }
+
+ void createFilterGroup() {
+ if (fProviderGroup.isEventFilteringSupported()) {
+ Group filterMainGroup = new Group(this, SWT.SHADOW_NONE);
+ filterMainGroup.setText(Messages.TraceControl_EnableEventsFilterGroupName);
+ GridLayout layout = new GridLayout(3, false);
+ filterMainGroup.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ filterMainGroup.setLayoutData(data);
+
+ fFilterText = new Text(filterMainGroup, SWT.LEFT);
+ fFilterText.setToolTipText(Messages.TraceControl_EnableEventsFilterTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fFilterText.setLayoutData(data);
+ }
+ }
+
+ /**
+ * Enable/selects widgets depending on the group specified.
+ * @param group - group to enable.
+ */
+ private void setEnablements(GroupEnum group) {
+
+ // Enable/disable trace point items
+ fTracepointsActivateButton.setSelection(group == GroupEnum.TRACEPOINTS);
+ fTracepointsViewer.getTree().setEnabled(group == GroupEnum.TRACEPOINTS);
+
+ // Enable/disable wildcard items
+ fWildcardActivateButton.setSelection(group == GroupEnum.WILDCARD);
+ fWildcardText.setEnabled(group == GroupEnum.WILDCARD);
+
+ // Enable/disable log level items
+ fLogLevelActivateButton.setSelection(group == GroupEnum.LOGLEVEL);
+ fLogLevelEventNameText.setEnabled(group == GroupEnum.LOGLEVEL);
+ fLogLevelCombo.setEnabled(group == GroupEnum.LOGLEVEL);
+ fLogLevelButton.setEnabled(group == GroupEnum.LOGLEVEL);
+ fLogLevelOnlyButton.setEnabled(group == GroupEnum.LOGLEVEL);
+ }
+
+ // ------------------------------------------------------------------------
+ // Local classes
+ // ------------------------------------------------------------------------
+ /**
+ * Content provider for the tracepoints tree.
+ */
+ public static final class UstContentProvider extends TraceControlContentProvider {
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ if (parentElement instanceof TargetNodeComponent) {
+ List<ITraceControlComponent> children = ((ITraceControlComponent)parentElement).getChildren(TraceProviderGroup.class);
+ return children.toArray(new ITraceControlComponent[children.size()]);
+ }
+ if (parentElement instanceof TraceProviderGroup) {
+ List<ITraceControlComponent> children = ((ITraceControlComponent)parentElement).getChildren(UstProviderComponent.class);
+ return children.toArray(new ITraceControlComponent[children.size()]);
+ }
+ if (parentElement instanceof ITraceControlComponent) {
+ return ((ITraceControlComponent)parentElement).getChildren();
+ }
+ return new Object[0];
+ }
+ }
+
+ /**
+ * Content label for the tracepoints tree.
+ */
+ public static final class UstLabelProvider extends TraceControlLabelProvider {
+ @Override
+ public Image getImage(Object element) {
+ return null;
+ }
+ @Override
+ public String getText(Object element) {
+ if ((element != null) && (element instanceof TraceProviderGroup)) {
+ return Messages.TraceControl_EnableEventsTracepointTreeAllLabel;
+ }
+
+ if ((element != null) && (element instanceof UstProviderComponent)) {
+ return Messages.TraceControl_EnableEventsTracepointTreeAllLabel + " - " + ((UstProviderComponent)element).getName(); //$NON-NLS-1$
+ }
+ return super.getText(element);
+ }
+ }
+
+ /**
+ * Check state listener for the tracepoints tree.
+ */
+ public final class UstCheckStateListener implements ICheckStateListener {
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ if (event.getChecked()) {
+ if (event.getElement() instanceof TraceProviderGroup) {
+ fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
+ }
+ if (event.getElement() instanceof UstProviderComponent) {
+ fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
+ }
+ } else {
+ if (event.getElement() instanceof TraceProviderGroup) {
+ fTracepointsViewer.setSubtreeChecked(event.getElement(), true);
+ }
+ if (event.getElement() instanceof UstProviderComponent) {
+ ITraceControlComponent component = (ITraceControlComponent) event.getElement();
+ fTracepointsViewer.setSubtreeChecked(event.getElement(), false);
+ fTracepointsViewer.setChecked(component.getParent(), false);
+ } else {
+ ITraceControlComponent component = (ITraceControlComponent) event.getElement();
+ fTracepointsViewer.setChecked(component.getParent(), false);
+ fTracepointsViewer.setChecked(component.getParent().getParent(), false);
+ }
+ }
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.Arrays;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * <p>
+ * Dialog box for collecting information about the events to enable.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class GetEventInfoDialog extends Dialog implements IGetEventInfoDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String TARGET_NEW_CONNECTION_ICON_FILE = "icons/elcl16/enable_event.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The session combo box.
+ */
+ private CCombo fSessionsCombo = null;
+ /**
+ * The channel combo box.
+ */
+ private CCombo fChannelsCombo = null;
+ /**
+ * The filter text
+ */
+ private Text fFilterText;
+ /**
+ * The list of available sessions.
+ */
+ private TraceSessionComponent[] fSessions;
+ /**
+ * True for kernel, false for UST.
+ */
+ private boolean fIsKernel;
+ /**
+ * Index in session array (selected session).
+ */
+ private int fSessionIndex = 0;
+ /**
+ * The Channel where the events should be enabled.
+ */
+ private TraceChannelComponent fChannel;
+ /**
+ * List of available channels of the selected session.
+ */
+ private TraceChannelComponent[] fChannels;
+ /**
+ * The filter expression
+ */
+ private String fFilterExpression;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor of dialog box.
+ * @param shell - the shell for the dialog box
+ */
+ public GetEventInfoDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public TraceSessionComponent getSession() {
+ return fSessions[fSessionIndex];
+ }
+
+ @Override
+ public TraceChannelComponent getChannel() {
+ return fChannel;
+ }
+
+ @Override
+ public void setIsKernel(boolean isKernel) {
+ fIsKernel = isKernel;
+ }
+
+ @Override
+ public void setSessions(TraceSessionComponent[] sessions) {
+ fSessions = Arrays.copyOf(sessions, sessions.length);
+ }
+
+ @Override
+ public String getFilterExpression() {
+ return fFilterExpression;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_EnableEventsDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(TARGET_NEW_CONNECTION_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ Composite dialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ dialogComposite.setLayout(layout);
+ dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Group sessionsGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ sessionsGroup.setText(Messages.TraceControl_EnableEventsSessionGroupName);
+ layout = new GridLayout(1, true);
+ sessionsGroup.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ sessionsGroup.setLayoutData(data);
+
+ fSessionsCombo = new CCombo(sessionsGroup, SWT.READ_ONLY);
+ fSessionsCombo.setToolTipText(Messages.TraceControl_EnableEventsSessionsTooltip);
+ fSessionsCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ String items[] = new String[fSessions.length];
+ for (int i = 0; i < items.length; i++) {
+ items[i] = String.valueOf(fSessions[i].getName());
+ }
+
+ fSessionsCombo.setItems(items);
+ fSessionsCombo.setEnabled(fSessions.length > 0);
+
+ Group channelsGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ channelsGroup.setText(Messages.TraceControl_EnableEventsChannelGroupName);
+ layout = new GridLayout(1, true);
+ channelsGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ channelsGroup.setLayoutData(data);
+
+ fChannelsCombo = new CCombo(channelsGroup, SWT.READ_ONLY);
+ fChannelsCombo.setToolTipText(Messages.TraceControl_EnableEventsChannelsTooltip);
+ fChannelsCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ fChannelsCombo.setEnabled(false);
+
+ fSessionsCombo.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fSessionIndex = fSessionsCombo.getSelectionIndex();
+
+ if (fSessionIndex >= 0) {
+ TraceDomainComponent domain = null;
+ TraceDomainComponent[] domains = fSessions[fSessionIndex].getDomains();
+ for (int i = 0; i < domains.length; i++) {
+
+ if (domains[i].isKernel() == fIsKernel) {
+ domain = domains[i];
+ break;
+ }
+ }
+
+ if (domain != null) {
+ fChannels = domain.getChannels();
+ String selectionItems[] = new String[fChannels.length];
+ for (int i = 0; i < selectionItems.length; i++) {
+ selectionItems[i] = String.valueOf(fChannels[i].getName());
+ }
+ fChannelsCombo.setItems(selectionItems);
+ fChannelsCombo.setEnabled(fChannels.length > 0);
+ } else {
+ fChannelsCombo.setItems(new String[0]);
+ fChannelsCombo.setEnabled(false);
+ fChannels = null;
+ }
+ fChannelsCombo.getParent().getParent().layout();
+ }
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // take first session to test whether events filtering is supported or not
+ if (fSessions[0].isEventFilteringSupported() && !fIsKernel) {
+ Group filterMainGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ filterMainGroup.setText(Messages.TraceControl_EnableEventsFilterGroupName);
+ layout = new GridLayout(2, false);
+ filterMainGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ filterMainGroup.setLayoutData(data);
+
+ fFilterText = new Text(filterMainGroup, SWT.LEFT);
+ fFilterText.setToolTipText(Messages.TraceControl_EnableEventsFilterTooltip);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fFilterText.setLayoutData(data);
+ }
+
+ getShell().setMinimumSize(new Point(300, 200));
+
+ return dialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void okPressed() {
+
+ if (fSessionsCombo.getSelectionIndex() < 0) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_EnableEventsDialogTitle,
+ Messages.TraceControl_EnableEventsNoSessionError);
+ return;
+ }
+
+ fSessionIndex = fSessionsCombo.getSelectionIndex();
+
+ // if no channel is available or no channel is selected use default channel indicated by fChannel=null
+ fChannel = null;
+ if ((fChannels != null) && (fChannelsCombo.getSelectionIndex() >= 0)) {
+ fChannel = fChannels[fChannelsCombo.getSelectionIndex()];
+ }
+
+ // initialize filter with null
+ fFilterExpression = null;
+ if (fSessions[0].isEventFilteringSupported() && !fIsKernel) {
+ String tempFilter = fFilterText.getText();
+
+ if(!tempFilter.isEmpty() && !tempFilter.matches("\\s*")) { //$NON-NLS-1$
+ fFilterExpression = tempFilter;
+ }
+ }
+
+ super.okPressed();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Interface for providing information about contexts to be added to channels/events.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IAddContextDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Sets the available contexts to choose from.
+ * @param contexts - a list of available contexts.
+ */
+ void setAvalibleContexts(List<String> contexts);
+
+ /**
+ * @return array of contexts to be added
+ */
+ List<String> getContexts();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return returns the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * <p>
+ * Interface for a confirmation dialog.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IConfirmDialog {
+
+ /**
+ * Open a confirmation dialog
+ *
+ * @param parent
+ * The parent shell
+ * @param title
+ * The title of the dialog window
+ * @param message
+ * The message in the dialog window
+ * @return If the user clicked OK (true) or Cancel (false)
+ */
+ boolean openConfirm(Shell parent, String title, String message);
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+
+/**
+ * <p>
+ * Interface for create session dialog.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ICreateSessionDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Get the parameters necessary for the creation of a LTTng session
+ *
+ * @return the parameters
+ */
+ ISessionInfo getParameters();
+
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Initializes the dialog box.
+ * @param group - the session group
+ */
+ void initialize(TraceSessionGroup group);
+
+ /**
+ * @return the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+
+/**
+ * <p>
+ * Interface for the enable channel dialog when domain is known.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IEnableChannelDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the configuration info for the new channel.
+ */
+ IChannelInfo getChannelInfo();
+
+ /**
+ * Sets the domain component
+ * @param domain - the trace domain component
+ */
+ void setDomainComponent(TraceDomainComponent domain);
+
+ /**
+ * Set the targent node component
+ * @param node - the node component
+ */
+ void setTargetNodeComponent(TargetNodeComponent node);
+
+ /**
+ * @return true for Kernel domain. False for UST.
+ */
+ boolean isKernel();
+
+ /**
+ * Sets the whether dialog is for Kernel or UST
+ * @param isKernel true for kernel domain else UST
+ */
+ void setHasKernel(boolean isKernel);
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+
+/**
+ * <p>
+ * Interface for providing information about Kernel or UST events to be enabled.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IEnableEventsDialog extends IEnableKernelEvents, IEnableUstEvents {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the session the events shall be enabled.
+ */
+ boolean isKernel();
+
+ /**
+ * Sets the trace provider group.
+ * @param providerGroup - a trace provider group
+ */
+ void setTraceProviderGroup(TraceProviderGroup providerGroup);
+
+ /**
+ * Sets the trace domain component.
+ * @param domain - a domain of the events (null if not known)
+ */
+ void setTraceDomainComponent(TraceDomainComponent domain);
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return returns the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.List;
+
+/**
+ * <p>
+ * Interface for providing information about kernel events to be enabled.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IEnableKernelEvents {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return a flag whether the tracepoints shall be configured.
+ */
+ boolean isTracepoints();
+
+ /**
+ * @return a flag indicating whether all tracepoints shall be enabled or not.
+ */
+ boolean isAllTracePoints();
+
+ /**
+ * @return a flag whether the syscalls shall be configured.
+ */
+ boolean isSysCalls();
+
+ /**
+ * @return a flag indicating whether syscalls shall be enabled or not.
+ */
+ boolean isAllSysCalls();
+
+ /**
+ * @return a list of event names to be enabled.
+ */
+ List<String> getEventNames();
+
+ /**
+ * @return a flag whether the dynamic probe shall be configured.
+ */
+ boolean isDynamicProbe();
+
+ /**
+ * @return event name of the dynamic probe (or null if no dynamic probe).
+ */
+ String getProbeEventName();
+
+ /**
+ * @return the dynamic probe (or null if no dynamic probe).
+ */
+ String getProbeName();
+
+ /**
+ * @return a flag whether the dynamic function entry/return probe shall be configured.
+ */
+ boolean isDynamicFunctionProbe();
+
+ /**
+ * @return event name of the dynamic function entry/exit probe (or null if no dynamic probe).
+ */
+ String getFunctionEventName();
+
+ /**
+ * @return the dynamic function entry/exit probe (or null if no dynamic probe).
+ */
+ String getFunction();
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+
+/**
+ * <p>
+ * Interface for providing information about UST events to be enabled.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IEnableUstEvents {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return a flag whether the tracepoints shall be configured.
+ */
+ boolean isTracepoints();
+
+ /**
+ * @return a flag indicating whether all tracepoints shall be enabled or not.
+ */
+ boolean isAllTracePoints();
+
+ /**
+ * @return a list of event names to be enabled.
+ */
+ List<String> getEventNames();
+
+ /**
+ * @return a flag whether events using wildcards should be enabled
+ */
+ boolean isWildcard();
+
+ /**
+ * @return a wildcard
+ */
+ String getWildcard();
+
+ /**
+ * @return a flag whether events using log levels should be enabled
+ */
+ boolean isLogLevel();
+
+ /**
+ * @return a log level type (loglevel or loglevel-only)
+ */
+ LogLevelType getLogLevelType();
+
+ /**
+ * @return a log level
+ */
+ TraceLogLevel getLogLevel();
+
+ /**
+ * @return a event name for the log level enable action
+ */
+ String getLogLevelEventName();
+
+ /**
+ * @return a filter expression
+ */
+ String getFilterExpression();
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * <p>
+ * Interface for a dialog box for collecting information about the events to enable.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IGetEventInfoDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the session the events shall be enabled.
+ */
+ TraceSessionComponent getSession();
+
+ /**
+ * @return the channel the events shall be enabled. Null for default channel.
+ */
+ TraceChannelComponent getChannel();
+
+ /**
+ * Sets flag about domain.
+ * @param isKernel - true for kernel, false for UST
+ */
+ void setIsKernel(boolean isKernel);
+
+ /**
+ * Sets available session.
+ * @param sessions - a array of available sessions.
+ */
+ void setSessions(TraceSessionComponent[] sessions);
+
+ /**
+ * Returns the filter expression.
+ * @return the filter expression or null for no filtering
+ */
+ String getFilterExpression();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return returns the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+/**
+ * <p>
+ * Interface for dialog box for updating file import information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IImportConfirmationDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @param name old trace name.
+ */
+ void setTraceName(String name);
+
+ /**
+ * @return the new trace name if not overwrite.
+ */
+ String getNewTraceName();
+
+ /**
+ *
+ * @return true to overwrite existing trace.
+ */
+ boolean isOverwrite();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * <p>
+ * Interface for import traces dialog.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IImportDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return a list of trace paths to import.
+ */
+ List<ImportFileInfo> getTracePathes();
+
+ /**
+ * @return the project to import the traces to
+ */
+ IProject getProject();
+
+ /**
+ * Sets the session containing the traces to import
+ * @param session The trace session
+ */
+ void setSession(TraceSessionComponent session);
+
+ /**
+ * Sets the default project name to use
+ *
+ * @param defaultProject
+ * the name of the default project to use
+ */
+ void setDefaultProject(String defaultProject);
+
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.rse.core.model.IHost;
+
+/**
+ * <p>
+ * Interface for connection information dialog.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface INewConnectionDialog {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the connection name (alias).
+ */
+ String getConnectionName();
+
+ /**
+ * @return the host name (IP address or DNS name)
+ */
+ String getHostName();
+
+ /**
+ * @return port of IP connection to be used
+ */
+ int getPort();
+
+ /**
+ * Sets the trace control root
+ * @param parent - the trace control parent
+ */
+ void setTraceControlParent(ITraceControlComponent parent);
+
+ /**
+ * Sets the available hosts to select.
+ * @param hosts - the available hosts
+ */
+ void setHosts(IHost[] hosts);
+
+ /**
+ * Set the port of the IP connection to be used.
+ * @param port - the IP port to set
+ */
+ void setPort(int port);
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return returns the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.List;
+
+/**
+ * Interface for dialog for selecting a command script.
+ *
+ * @author Bernd Hufmann
+ *
+ */
+public interface ISelectCommandScriptDialog {
+ /**
+ * @return a list of command
+ */
+ List<String> getCommands();
+
+ /**
+ * @return the open return value
+ */
+ int open();
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * <p>
+ * Dialog box for collecting session creation information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ImportConfirmationDialog extends Dialog implements IImportConfirmationDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String IMPORT_ICON_FILE = "icons/elcl16/import_trace.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The radio button for selecting the overwrite action
+ */
+ private Button fOverwriteButton = null;
+ /**
+ * The radio button for selecting the renaming action
+ */
+ private Button fRenameButton = null;
+ /**
+ * The text widget for the session name
+ */
+ private Text fNewTraceNameText = null;
+ /**
+ * The trace name which already exists in the project
+ */
+ private String fTraceName = null;
+ /**
+ * The session name string.
+ */
+ private String fNewTraceName = null;
+ /**
+ * Flag whether default location (path) shall be used or not
+ */
+ private boolean fIsOverride = true;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public ImportConfirmationDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void setTraceName(String name) {
+ fTraceName = name;
+ }
+
+ @Override
+ public String getNewTraceName() {
+ return fNewTraceName;
+ }
+
+ @Override
+ public boolean isOverwrite() {
+ return fIsOverride;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_ImportDialogConfirmationTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ Composite dialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ dialogComposite.setLayout(layout);
+ dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Label sessionNameLabel = new Label(dialogComposite, SWT.RIGHT);
+ sessionNameLabel.setText(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + fTraceName); //$NON-NLS-1$
+
+ fOverwriteButton = new Button(dialogComposite, SWT.RADIO);
+ fOverwriteButton.setText(Messages.TraceControl_ImportDialogConfirmationOverwriteLabel);
+
+ fOverwriteButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fNewTraceNameText.setEnabled(false);
+ fNewTraceNameText.setText(fTraceName);
+ }
+ });
+
+ fRenameButton = new Button(dialogComposite, SWT.RADIO);
+ fRenameButton.setText(Messages.TraceControl_ImportDialogConfirmationRenameLabel);
+
+ fRenameButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ fNewTraceNameText.setEnabled(true);
+ }
+ });
+
+ fNewTraceNameText = new Text(dialogComposite, SWT.NONE);
+ fNewTraceNameText.setToolTipText(Messages.TraceControl_ImportDialogConfirmationNewNameLabel);
+ fNewTraceNameText.setText(fTraceName);
+
+ // Default
+ fOverwriteButton.setSelection(true);
+ fNewTraceNameText.setEnabled(false);
+
+
+ // layout widgets
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+
+ fNewTraceNameText.setLayoutData(data);
+
+ getShell().setMinimumSize(new Point(300, 150));
+
+ return dialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void okPressed() {
+
+ fIsOverride = fOverwriteButton.getSelection();
+
+ if (fIsOverride) {
+ // new name is old name
+ fNewTraceName = fTraceName;
+ } else {
+ fNewTraceName = fNewTraceNameText.getText();
+ }
+
+ // Check for invalid names
+ if (!fNewTraceName.matches("^[a-zA-Z0-9\\-\\_]{1,}$")) { //$NON-NLS-1$
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_ImportDialogConfirmationTitle,
+ Messages.TraceControl_InvalidTraceNameError + " (" + fNewTraceName + ") \n"); //$NON-NLS-1$ //$NON-NLS-2$
+ return;
+ }
+
+ // validation successful -> call super.okPressed()
+ super.okPressed();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Added handling of streamed traces
+ * Marc-Andre Laperle - Use common method to get opened tmf projects
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTreeViewer;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTracesFolder;
+import org.eclipse.linuxtools.tmf.ui.project.model.TraceUtils;
+import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Tree;
+import org.eclipse.ui.model.WorkbenchContentProvider;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+
+/**
+ * <p>
+ * Dialog box for collecting trace import information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ImportDialog extends Dialog implements IImportDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /** The icon file for this dialog box. */
+ public static final String IMPORT_ICON_FILE = "icons/elcl16/import_trace.gif"; //$NON-NLS-1$
+
+ /** Parent directory for UST traces */
+ public static final String UST_PARENT_DIRECTORY = "ust"; //$NON-NLS-1$
+
+ /** Name of metadata file of trace */
+ public static final String METADATA_FILE_NAME = "metadata"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The dialog composite.
+ */
+ private Composite fDialogComposite = null;
+ /**
+ * The checkbox tree viewer for selecting available traces
+ */
+ private CheckboxTreeViewer fFolderViewer;
+ /**
+ * The combo box for selecting a project.
+ */
+ private CCombo fCombo;
+ /**
+ * The overwrite button
+ */
+ private Button fOverwriteButton;
+ /**
+ * List of available LTTng 2.0 projects
+ */
+ private List<IProject> fProjects;
+ /**
+ * The parent where the new node should be added.
+ */
+ private TraceSessionComponent fSession = null;
+ /**
+ * The name of the default project name
+ */
+ private String fDefaultProjectName = null;
+ /**
+ * List of traces to import
+ */
+ private final List<ImportFileInfo> fTraces = new ArrayList<>();
+ /**
+ * Selection index in project combo box.
+ */
+ private int fProjectIndex;
+ /**
+ * Flag to indicate that something went wrong when creating the dialog box.
+ */
+ private boolean fIsError = false;
+ /**
+ * Children of the remote folder (can be null)
+ */
+ private Object[] fFolderChildren = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public ImportDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public List<ImportFileInfo> getTracePathes() {
+ List<ImportFileInfo> retList = new ArrayList<>();
+ retList.addAll(fTraces);
+ return retList;
+ }
+
+ @Override
+ public IProject getProject() {
+ return fProjects.get(fProjectIndex);
+ }
+
+ @Override
+ public void setSession(TraceSessionComponent session) {
+ fSession = session;
+ }
+
+ @Override
+ public void setDefaultProject(String defaultProject) {
+ fDefaultProjectName = defaultProject;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_ImportDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(IMPORT_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ fDialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ fDialogComposite.setLayout(layout);
+ fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ try {
+ createRemoteComposite();
+ } catch (SystemMessageException e) {
+ createErrorComposite(parent, e.fillInStackTrace());
+ return fDialogComposite;
+ }
+ return fDialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ Button selectAllButton = createButton(parent, IDialogConstants.SELECT_ALL_ID, Messages.TraceControl_ImportDialog_SelectAll, true);
+ selectAllButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setFolderChildrenChecked(true);
+ }
+ });
+
+ Button deselectAllButton = createButton(parent, IDialogConstants.DESELECT_ALL_ID, Messages.TraceControl_ImportDialog_DeselectAll, true);
+ deselectAllButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ setFolderChildrenChecked(false);
+ }
+ });
+ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ updateOKButtonEnablement();
+ }
+
+ @Override
+ protected void okPressed() {
+ if (!fIsError) {
+
+ // Validate input data
+ fTraces.clear();
+
+ fProjectIndex = fCombo.getSelectionIndex();
+
+ if (fProjectIndex < 0) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_ImportDialogTitle,
+ Messages.TraceControl_ImportDialogNoProjectSelectedError);
+ return;
+ }
+
+ IProject project = fProjects.get(fProjectIndex);
+ IFolder traceFolder = project.getFolder(TmfTracesFolder.TRACES_FOLDER_NAME);
+
+ if (!traceFolder.exists()) {
+ // Invalid LTTng 2.0 project
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_ImportDialogTitle,
+ Messages.TraceControl_ImportDialogInvalidTracingProject + " (" + TmfTracesFolder.TRACES_FOLDER_NAME + ")"); //$NON-NLS-1$//$NON-NLS-2$
+ return;
+ }
+
+ boolean overwriteAll = fOverwriteButton.getSelection();
+
+ Object[] checked = fFolderViewer.getCheckedElements();
+ for (int i = 0; i < checked.length; i++) {
+ IRemoteFile file = (IRemoteFile) checked[i];
+ if (!file.isDirectory() && file.getName().equals(METADATA_FILE_NAME)) {
+ IRemoteFile trace = file.getParentRemoteFile();
+ IRemoteFile parent = trace.getParentRemoteFile();
+
+ String path = fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : fSession.getSessionPath();
+ path = getUnifiedPath(path);
+ IPath sessionParentPath = new Path(path).removeLastSegments(1);
+ IPath traceParentPath = new Path(parent.getAbsolutePath());
+
+ IPath relativeTracePath = traceParentPath.makeRelativeTo(sessionParentPath);
+
+ IFolder destinationFolder = traceFolder.getFolder(new Path(relativeTracePath.toOSString()));
+
+ ImportFileInfo info = new ImportFileInfo(trace, trace.getName(), destinationFolder, overwriteAll);
+ IFolder folder = destinationFolder.getFolder(trace.getName());
+
+ // Verify if trace directory already exists (and not overwrite)
+ if (folder.exists() && !overwriteAll) {
+
+ // Ask user for overwrite or new name
+ IImportConfirmationDialog conf = TraceControlDialogFactory.getInstance().getImportConfirmationDialog();
+ conf.setTraceName(trace.getName());
+
+ // Don't add trace to list if dialog was cancelled.
+ if (conf.open() == Window.OK) {
+ info.setOverwrite(conf.isOverwrite());
+ if (!conf.isOverwrite()) {
+ info.setLocalTraceName(conf.getNewTraceName());
+ }
+ fTraces.add(info);
+ }
+ } else {
+ fTraces.add(info);
+ }
+ }
+ }
+
+ if (fTraces.isEmpty()) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_ImportDialogTitle,
+ Messages.TraceControl_ImportDialogNoTraceSelectedError);
+ return;
+ }
+ }
+
+ // validation successful -> call super.okPressed()
+ super.okPressed();
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods and classes
+ // ------------------------------------------------------------------------
+
+ /**
+ * Helper class for the contents of a folder in a tracing project
+ *
+ * @author Bernd Hufmann
+ */
+ public static class FolderContentProvider extends WorkbenchContentProvider {
+ @Override
+ public Object[] getChildren(Object o) {
+ if (o instanceof IRemoteFile) {
+ IRemoteFile element = (IRemoteFile) o;
+ // For our purpose, we need folders + files
+ if (!element.isDirectory()) {
+ return new Object[0];
+ }
+ }
+ return super.getChildren(o);
+ }
+ }
+
+ /**
+ * Creates a dialog composite with an error message which can be used
+ * when an exception occurred during creation time of the dialog box.
+ * @param parent - a parent composite
+ * @param e - a error causing exception
+ */
+ private void createErrorComposite(Composite parent, Throwable e) {
+ fIsError = true;
+ fDialogComposite.dispose();
+
+ fDialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ fDialogComposite.setLayout(layout);
+ fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Text errorText = new Text(fDialogComposite, SWT.MULTI);
+ StringBuffer error = new StringBuffer();
+ error.append(Messages.TraceControl_ImportDialogCreationError);
+ error.append(System.getProperty("line.separator")); //$NON-NLS-1$
+ error.append(System.getProperty("line.separator")); //$NON-NLS-1$
+ error.append(e.toString());
+ errorText.setText(error.toString());
+ errorText.setLayoutData(new GridData(GridData.FILL_BOTH));
+ }
+
+ private void createRemoteComposite() throws SystemMessageException{
+ Group contextGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ contextGroup.setText(Messages.TraceControl_ImportDialogTracesGroupName);
+ GridLayout layout = new GridLayout(1, true);
+ contextGroup.setLayout(layout);
+ contextGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ IRemoteSystemProxy proxy = fSession.getTargetNode().getRemoteSystemProxy();
+
+ IFileServiceSubSystem fsss = proxy.getFileServiceSubSystem();
+
+ final String path = fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : fSession.getSessionPath();
+ final IRemoteFile remoteFolder = fsss.getRemoteFileObject(path, new NullProgressMonitor());
+ // make sure that remote directory is read and not cached
+ remoteFolder.markStale(true, true);
+
+ fFolderViewer = new CheckboxTreeViewer(contextGroup, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
+ GridData data = new GridData(GridData.FILL_BOTH);
+ Tree tree = fFolderViewer.getTree();
+ tree.setLayoutData(data);
+ tree.setFont(fDialogComposite.getFont());
+ tree.setToolTipText(Messages.TraceControl_ImportDialogTracesTooltip);
+
+ fFolderViewer.setContentProvider(new FolderContentProvider());
+ fFolderViewer.setLabelProvider(new WorkbenchLabelProvider());
+
+ fFolderViewer.addCheckStateListener(new ICheckStateListener() {
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ Object elem = event.getElement();
+ if (elem instanceof IRemoteFile) {
+ IRemoteFile element = (IRemoteFile) elem;
+ if (!element.isDirectory()) {
+ // A trick to keep selection of a file in sync with the directory
+ boolean p = fFolderViewer.getChecked((element.getParentRemoteFile()));
+ fFolderViewer.setChecked(element, p);
+ } else {
+ fFolderViewer.setSubtreeChecked(event.getElement(), event.getChecked());
+ if (!event.getChecked()) {
+ fFolderViewer.setChecked(element.getParentRemoteFile(), false);
+ }
+ }
+ updateOKButtonEnablement();
+ }
+ }
+ });
+ fFolderViewer.setInput(remoteFolder);
+
+ fFolderChildren = remoteFolder.getContents(RemoteChildrenContentsType.getInstance());
+ // children can be null if there the path doesn't exist. This happens when a trace
+ // session hadn't been started and no output was created.
+ setFolderChildrenChecked(true);
+
+ Group projectGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ projectGroup.setText(Messages.TraceControl_ImportDialogProjectsGroupName);
+ layout = new GridLayout(1, true);
+ projectGroup.setLayout(layout);
+ projectGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ fProjects = new ArrayList<>();
+ List<String> projectNames = new ArrayList<>();
+
+ for (IProject project : TraceUtils.getOpenedTmfProjects()) {
+ fProjects.add(project);
+ projectNames.add(project.getName());
+ }
+
+ fCombo = new CCombo(projectGroup, SWT.READ_ONLY);
+ fCombo.setToolTipText(Messages.TraceControl_ImportDialogProjectsTooltip);
+ fCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 1, 1));
+ fCombo.setItems(projectNames.toArray(new String[projectNames.size()]));
+
+ if (fDefaultProjectName != null) {
+ int select = projectNames.indexOf(fDefaultProjectName);
+ fCombo.select(select);
+ }
+
+ Group overrideGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ layout = new GridLayout(1, true);
+ overrideGroup.setLayout(layout);
+ overrideGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+
+ fOverwriteButton = new Button(overrideGroup, SWT.CHECK);
+ fOverwriteButton.setText(Messages.TraceControl_ImportDialogOverwriteButtonText);
+ getShell().setMinimumSize(new Point(500, 400));
+ }
+
+ private void setFolderChildrenChecked(boolean isChecked) {
+ if (fFolderChildren != null) {
+ for (Object child : fFolderChildren) {
+ fFolderViewer.setSubtreeChecked(child, isChecked);
+ }
+ }
+ updateOKButtonEnablement();
+ }
+
+ private void updateOKButtonEnablement() {
+ Object[] checked = fFolderViewer.getCheckedElements();
+ Button okButton = getButton(IDialogConstants.OK_ID);
+ if (okButton != null) {
+ okButton.setEnabled(checked.length > 0);
+ }
+ }
+
+ private static String getUnifiedPath(String path) {
+ // Use Path class to remove unnecessary slashes
+ return new Path(path).removeTrailingSeparator().toString();
+ }
+ }
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
+
+/**
+ * <p>
+ * Helper class for storing information about a remote file to import.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ImportFileInfo {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * Remote file reference
+ */
+ private IRemoteFile fRemoteFile;
+ /**
+ * Local Trace Name
+ */
+ private String fLocalTraceName;
+ /**
+ * Global overwrite flag
+ */
+ private boolean fIsOverwrite;
+ /**
+ * Destination folder to import the trace to (full workspace path)
+ */
+ private IFolder fDestinationFolder;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Standard constructor
+ *
+ * @param file
+ * A remote file reference
+ * @param traceName
+ * A trace name
+ * @param destinationFolder
+ * The destination folder (full workspace path)
+ * @param isOverwrite
+ * global overwrite flag
+ */
+ public ImportFileInfo(IRemoteFile file, String traceName, IFolder destinationFolder, boolean isOverwrite) {
+ fRemoteFile = file;
+ fLocalTraceName = traceName;
+ fDestinationFolder = destinationFolder;
+ fIsOverwrite = isOverwrite;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return name of traces after importing
+ */
+ public String getLocalTraceName() {
+ return fLocalTraceName;
+ }
+
+ /**
+ * Sets the local trace name
+ *
+ * @param importTraceName
+ * - local name of trace to set (name after importing)
+ */
+ public void setLocalTraceName(String importTraceName) {
+ this.fLocalTraceName = importTraceName;
+ }
+ /**
+ * @return true if local trace should be overwritten if a trace with the same name already exists.
+ */
+ public boolean isOverwrite() {
+ return fIsOverwrite;
+ }
+ /**
+ * Sets the overwrite flag.
+ * @param isOverwrite If the Overwrite checkbox is checked or not
+ */
+ public void setOverwrite(boolean isOverwrite) {
+ this.fIsOverwrite = isOverwrite;
+ }
+
+ /**
+ * @return the remote file implementation.
+ */
+ public IRemoteFile getImportFile() {
+ return fRemoteFile;
+ }
+
+ /**
+ * Sets the remote file implementation
+ *
+ * @param remoteFile
+ * The remote file implementation.
+ */
+ public void setRemoteFile(IRemoteFile remoteFile) {
+ fRemoteFile = remoteFile;
+ }
+
+ /**
+ * Returns the destination folder to import the trace to (full workspace path).
+ *
+ * @return destination folder
+ */
+ public IFolder getDestinationFolder() {
+ return fDestinationFolder;
+ }
+}
+
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.util.Arrays;
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CCombo;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.events.VerifyEvent;
+import org.eclipse.swt.events.VerifyListener;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * <p>
+ * Dialog box for connection information.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class NewConnectionDialog extends Dialog implements INewConnectionDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String TARGET_NEW_CONNECTION_ICON_FILE = "icons/elcl16/target_add.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The host combo box.
+ */
+ private CCombo fExistingHostsCombo = null;
+ /**
+ * The check box button for enabling/disabling the text input.
+ */
+ private Button fButton = null;
+ /**
+ * The text widget for the node name (alias)
+ */
+ private Text fConnectionNameText = null;
+ /**
+ * The text widget for the node address (IP or DNS name)
+ */
+ private Text fHostNameText = null;
+ /**
+ * The text widget for the IP port
+ */
+ private Text fPortText = null;
+ /**
+ * The parent where the new node should be added.
+ */
+ private ITraceControlComponent fParent;
+ /**
+ * The node name (alias) string.
+ */
+ private String fConnectionName = null;
+ /**
+ * The node address (IP or DNS name) string.
+ */
+ private String fHostName = null;
+ /**
+ * The IP port of the connection.
+ */
+ private int fPort = IRemoteSystemProxy.INVALID_PORT_NUMBER;
+ /**
+ * Input list of existing RSE hosts available for selection.
+ */
+ private IHost[] fExistingHosts = new IHost[0];
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ *
+ * @param shell
+ * The shell
+ */
+ public NewConnectionDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getConnectionName() {
+ return fConnectionName;
+ }
+
+ @Override
+ public String getHostName() {
+ return fHostName;
+ }
+
+ @Override
+ public int getPort() {
+ return fPort;
+ }
+
+ @Override
+ public void setTraceControlParent(ITraceControlComponent parent) {
+ fParent = parent;
+ }
+
+ @Override
+ public void setHosts(IHost[] hosts) {
+ if (hosts != null) {
+ fExistingHosts = Arrays.copyOf(hosts, hosts.length);
+ }
+ }
+
+ @Override
+ public void setPort(int port) {
+ fPort = port;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_NewDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(TARGET_NEW_CONNECTION_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ Composite dialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ dialogComposite.setLayout(layout);
+ dialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ // Existing connections group
+ Group comboGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ comboGroup.setText(Messages.TraceControl_NewNodeExistingConnectionGroupName);
+ layout = new GridLayout(2, true);
+ comboGroup.setLayout(layout);
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ comboGroup.setLayoutData(data);
+
+ fExistingHostsCombo = new CCombo(comboGroup, SWT.READ_ONLY);
+ fExistingHostsCombo.setToolTipText(Messages.TraceControl_NewNodeComboToolTip);
+ fExistingHostsCombo.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 2, 1));
+
+ String items[] = new String[fExistingHosts.length];
+ for (int i = 0; i < items.length; i++) {
+ items[i] = String.valueOf(fExistingHosts[i].getAliasName() + " - " + fExistingHosts[i].getHostName()); //$NON-NLS-1$
+ }
+
+ fExistingHostsCombo.setItems(items);
+ fExistingHostsCombo.setEnabled(fExistingHosts.length > 0);
+
+ // Node information grop
+ Group textGroup = new Group(dialogComposite, SWT.SHADOW_NONE);
+ layout = new GridLayout(3, true);
+ textGroup.setLayout(layout);
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ textGroup.setLayoutData(data);
+
+ fButton = new Button(textGroup, SWT.CHECK);
+ fButton.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false, 3, 1));
+ fButton.setText(Messages.TraceControl_NewNodeEditButtonName);
+ fButton.setEnabled(fExistingHosts.length > 0);
+
+ Label connectionNameLabel = new Label(textGroup, SWT.RIGHT);
+ connectionNameLabel.setText(Messages.TraceControl_NewNodeConnectionNameLabel);
+ fConnectionNameText = new Text(textGroup, SWT.NONE);
+ fConnectionNameText.setToolTipText(Messages.TraceControl_NewNodeConnectionNameTooltip);
+ fConnectionNameText.setEnabled(fExistingHosts.length == 0);
+
+ Label hostNameLabel = new Label(textGroup, SWT.RIGHT);
+ hostNameLabel.setText(Messages.TraceControl_NewNodeHostNameLabel);
+ fHostNameText = new Text(textGroup, SWT.NONE);
+ fHostNameText.setToolTipText(Messages.TraceControl_NewNodeHostNameTooltip);
+ fHostNameText.setEnabled(fExistingHosts.length == 0);
+
+ Label portLabel = new Label(textGroup, SWT.RIGHT);
+ portLabel.setText(Messages.TraceControl_NewNodePortLabel);
+ fPortText = new Text(textGroup, SWT.NONE);
+ fPortText.setToolTipText(Messages.TraceControl_NewNodePortTooltip);
+ fPortText.setEnabled(fExistingHosts.length == 0);
+ fPortText.addVerifyListener(new VerifyListener() {
+ @Override
+ public void verifyText(VerifyEvent e) {
+ // only numbers are allowed.
+ e.doit = e.text.matches("[0-9]*"); //$NON-NLS-1$
+ }
+ });
+
+ fButton.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ if (fButton.getSelection()) {
+ fExistingHostsCombo.deselectAll();
+ fExistingHostsCombo.setEnabled(false);
+ fConnectionNameText.setEnabled(true);
+ fHostNameText.setEnabled(true);
+ fPortText.setEnabled(true);
+ } else {
+ fExistingHostsCombo.setEnabled(true);
+ fConnectionNameText.setEnabled(false);
+ fHostNameText.setEnabled(false);
+ fPortText.setEnabled(false);
+ }
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ fExistingHostsCombo.addSelectionListener(new SelectionListener() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ int index = fExistingHostsCombo.getSelectionIndex();
+ fConnectionNameText.setText(fExistingHosts[index].getAliasName());
+ fHostNameText.setText(fExistingHosts[index].getHostName());
+ fPortText.setText(""); //$NON-NLS-1$
+ }
+
+ @Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+
+ // layout widgets
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ fHostNameText.setText("666.666.666.666"); //$NON-NLS-1$
+ Point minSize = fHostNameText.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
+ int widthHint = minSize.x + 5;
+ data.widthHint = widthHint;
+ data.horizontalSpan = 2;
+ fConnectionNameText.setLayoutData(data);
+
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.widthHint = widthHint;
+ data.horizontalSpan = 2;
+ fHostNameText.setLayoutData(data);
+
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.widthHint = widthHint;
+ data.horizontalSpan = 2;
+ fPortText.setLayoutData(data);
+
+ fHostNameText.setText(""); //$NON-NLS-1$
+
+ return dialogComposite;
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, "&Cancel", true); //$NON-NLS-1$
+ createButton(parent, IDialogConstants.OK_ID, "&Ok", true); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void okPressed() {
+ // Validate input data
+ fConnectionName = fConnectionNameText.getText();
+ fHostName = fHostNameText.getText();
+ fPort = (fPortText.getText().length() > 0) ? Integer.parseInt(fPortText.getText()) : IRemoteSystemProxy.INVALID_PORT_NUMBER;
+
+ if (!"".equals(fHostName)) { //$NON-NLS-1$
+ // If no node name is specified use the node address as name
+ if ("".equals(fConnectionName)) { //$NON-NLS-1$
+ fConnectionName = fHostName;
+ }
+ // Check if node with name already exists in parent
+ if(fParent.containsChild(fConnectionName)) {
+ MessageDialog.openError(getShell(),
+ Messages.TraceControl_NewDialogTitle,
+ Messages.TraceControl_AlreadyExistsError + " (" + fConnectionName + ")"); //$NON-NLS-1$//$NON-NLS-2$
+ return;
+ }
+ }
+ else {
+ return;
+ }
+ // validation successful -> call super.okPressed()
+ super.okPressed();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.tmf.core.io.BufferedRandomAccessFile;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.graphics.Rectangle;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Combo;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.FileDialog;
+import org.eclipse.swt.widgets.Group;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * <p>
+ * Dialog box for selecting a command script. It parses the script and
+ * provides a list of shell commands to be executed.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class OpenCommandScriptDialog extends Dialog implements ISelectCommandScriptDialog {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The icon file for this dialog box.
+ */
+ public static final String CREATE_SESSION_ICON_FILE = "icons/elcl16/add_button.gif"; //$NON-NLS-1$
+
+ // Dialog settings constants
+ private static final String DIALOG_SETTINGS_SECTION = "OpenCommandScriptDialog"; //$NON-NLS-1$
+ private static final String FILE_NAME_ID = "STORE_FILE_NAME_ID"; //$NON-NLS-1$
+ private static final int COMBO_HISTORY_LENGTH = 5;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // Dialog attributes
+ private Control fControl = null;
+ private Composite fDialogComposite = null;
+ private Button fBrowseButton;
+ private Label fFileNameLabel = null;
+ private Combo fFileNameCombo = null;
+
+ // Output list of commands
+ private List<String> fCommands = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param shell - a shell for the display of the dialog
+ */
+ public OpenCommandScriptDialog(Shell shell) {
+ super(shell);
+ setShellStyle(SWT.RESIZE | getShellStyle());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ @NonNull public List<String> getCommands() {
+ if (fCommands != null) {
+ return fCommands;
+ }
+ return new ArrayList<>();
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected Control createContents(Composite parent) {
+ fControl = super.createContents(parent);
+
+ /* set the shell minimum size */
+ Point clientArea = fControl.computeSize(SWT.DEFAULT, SWT.DEFAULT);
+ Rectangle trim = getShell().computeTrim(0, 0, clientArea.x, clientArea.y);
+ getShell().setMinimumSize(trim.width, trim.height);
+
+ return fControl;
+ }
+
+ @Override
+ protected void configureShell(Shell newShell) {
+ super.configureShell(newShell);
+ newShell.setText(Messages.TraceControl_ExecuteScriptDialogTitle);
+ newShell.setImage(Activator.getDefault().loadIcon(CREATE_SESSION_ICON_FILE));
+ }
+
+ @Override
+ protected Control createDialogArea(Composite parent) {
+
+ // Main dialog panel
+ fDialogComposite = new Composite(parent, SWT.NONE);
+ GridLayout layout = new GridLayout(1, true);
+ fDialogComposite.setLayout(layout);
+ fDialogComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ Group sessionGroup = new Group(fDialogComposite, SWT.SHADOW_NONE);
+ sessionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ sessionGroup.setLayout(new GridLayout(6, true));
+
+ fFileNameLabel = new Label(sessionGroup, SWT.RIGHT);
+ fFileNameLabel.setText(Messages.TraceControl_ExecuteScriptSelectLabel);
+ fFileNameCombo = new Combo(sessionGroup, SWT.BORDER);
+
+ fBrowseButton = new Button(sessionGroup, SWT.PUSH);
+ fBrowseButton.setText(Messages.TraceControl_ExecuteScriptBrowseText);
+ fBrowseButton.addListener(SWT.Selection, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ handleFilePathBrowseButtonPressed(SWT.OPEN);
+ }
+ });
+
+ // layout widgets
+ GridData data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+ data.grabExcessHorizontalSpace = false;
+ fFileNameLabel.setLayoutData(data);
+
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 4;
+ fFileNameCombo.setLayoutData(data);
+
+ data = new GridData(GridData.FILL_HORIZONTAL);
+ data.horizontalSpan = 1;
+
+ // Initialize a empty list
+ fCommands = new ArrayList<>();
+
+ restoreWidgetValues();
+
+ return fDialogComposite;
+ }
+
+ private void restoreWidgetValues() {
+ IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
+ IDialogSettings settings = workbenchSettings.getSection(DIALOG_SETTINGS_SECTION);
+ if (settings == null) {
+ settings = workbenchSettings.addNewSection(DIALOG_SETTINGS_SECTION);
+ }
+ String[] fileNames = settings.getArray(FILE_NAME_ID);
+ if ((fileNames != null) && (fileNames.length != 0)) {
+ for (int i = 0; i < fileNames.length; i++) {
+ fFileNameCombo.add(fileNames[i]);
+ }
+ }
+ }
+
+ private void saveWidgetValues() {
+ IDialogSettings workbenchSettings = Activator.getDefault().getDialogSettings();
+ IDialogSettings settings = workbenchSettings.getSection(DIALOG_SETTINGS_SECTION);
+ if (settings != null) {
+ // update file names history
+ String[] fileNames = settings.getArray(FILE_NAME_ID);
+ if (fileNames == null) {
+ fileNames = new String[0];
+ }
+
+ fileNames = addToHistory(fileNames, fFileNameCombo.getText().trim());
+ settings.put(FILE_NAME_ID, fileNames);
+ }
+ }
+
+ /**
+ * Adds an entry to a history, while taking care of duplicate history items
+ * and excessively long histories. The assumption is made that all histories
+ * should be of length <code>COMBO_HISTORY_LENGTH</code>.
+ *
+ * @param history the current history
+ * @param newEntry the entry to add to the history
+ */
+ private static String[] addToHistory(String[] history, String newEntry) {
+ List<String> list = new ArrayList<>(Arrays.asList(history));
+ list.remove(newEntry);
+ list.add(0, newEntry);
+
+ // since only one new item was added, we can be over the limit
+ // by at most one item
+ if (list.size() > COMBO_HISTORY_LENGTH) {
+ list.remove(COMBO_HISTORY_LENGTH);
+ }
+ String[] r = new String[list.size()];
+ list.toArray(r);
+ return r;
+ }
+
+ private void handleFilePathBrowseButtonPressed(int fileDialogStyle) {
+ FileDialog dialog = new FileDialog(getShell(), fileDialogStyle | SWT.SHEET);
+ dialog.setFilterExtensions(new String[] { "*.*", "*.*" }); //$NON-NLS-1$ //$NON-NLS-2$
+ dialog.setText(Messages.TraceControl_ExecuteScriptDialogTitle);
+ String selectedFileName = dialog.open();
+ if (selectedFileName != null) {
+ fFileNameCombo.setText(selectedFileName);
+ }
+ }
+
+ @Override
+ protected void createButtonsForButtonBar(Composite parent) {
+ createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, true);
+ createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
+ }
+
+ @Override
+ protected void okPressed() {
+ // Validate input data
+ String sessionPath = fFileNameCombo.getText();
+
+ if (!"".equals(sessionPath)) { //$NON-NLS-1$
+
+ ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
+ try (BufferedRandomAccessFile rafile = new BufferedRandomAccessFile(sessionPath, "r")) { //$NON-NLS-1$
+ String line = rafile.getNextLine();
+ while (line != null) {
+ builder.add(line);
+ line = rafile.getNextLine();
+ }
+ } catch (IOException e) {
+ ErrorDialog.openError(getShell(), null, null, new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, e.getLocalizedMessage(), e));
+ return;
+ }
+ saveWidgetValues();
+ fCommands = builder.build();
+ super.okPressed();
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs;
+
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Factory for generating dialog boxes. It allows to overwrite the dialog implementation.
+ * Useful also for testing purposes.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ *
+ */
+public final class TraceControlDialogFactory {
+
+ // ------------------------------------------------------------------------
+ // Members
+ // ------------------------------------------------------------------------
+
+ /**
+ * The factory instance.
+ */
+ private static TraceControlDialogFactory fInstance;
+
+ /**
+ * The new connection dialog reference.
+ */
+ private INewConnectionDialog fNewConnectionDialog;
+
+ /**
+ * The enable channel dialog
+ */
+ private IEnableChannelDialog fEnableChannelDialog;
+
+ /**
+ * The create session dialog.
+ */
+ private ICreateSessionDialog fCreateSessionDialog;
+
+ /**
+ * The command script selection dialog.
+ */
+ private ISelectCommandScriptDialog fCommandScriptDialog;
+
+ /**
+ * The enable events dialog.
+ */
+ private IEnableEventsDialog fEnableEventsDialog;
+
+ /**
+ * The get event info dialog.
+ */
+ private IGetEventInfoDialog fGetEventInfoDialog;
+
+ /**
+ * The confirmation dialog implementation.
+ */
+ private IConfirmDialog fConfirmDialog;
+
+ /**
+ * The add context dialog implementation.
+ */
+ private IAddContextDialog fAddContextDialog;
+
+ /**
+ * The import dialog implementation.
+ */
+ private IImportDialog fImportDialog;
+
+ /**
+ * The import confirmation dialog.
+ */
+ private IImportConfirmationDialog fImportConfirmationDialog;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor for R4EUIDialogFactory.
+ */
+ private TraceControlDialogFactory() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return TraceControlDialogFactory instance
+ */
+ public static synchronized TraceControlDialogFactory getInstance() {
+ if (fInstance == null) {
+ fInstance = new TraceControlDialogFactory();
+ }
+ return fInstance;
+ }
+
+ /**
+ * @return new connection dialog
+ */
+ public INewConnectionDialog getNewConnectionDialog() {
+ if (fNewConnectionDialog == null) {
+ fNewConnectionDialog = new NewConnectionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fNewConnectionDialog;
+ }
+
+ /**
+ * Sets a new connection dialog implementation.
+ * @param newConnectionDialog - new connection dialog implementation
+ */
+ public void setNewConnectionDialog(INewConnectionDialog newConnectionDialog) {
+ fNewConnectionDialog = newConnectionDialog;
+ }
+
+ /**
+ * @return enable channel dialog
+ */
+ public IEnableChannelDialog getEnableChannelDialog() {
+ if (fEnableChannelDialog == null) {
+ fEnableChannelDialog = new EnableChannelDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fEnableChannelDialog;
+ }
+
+ /**
+ * Sets a enable channel dialog implementation.
+ * @param createEnableDialog - a create channel dialog implementation
+ */
+ public void setEnableChannelDialog(IEnableChannelDialog createEnableDialog) {
+ fEnableChannelDialog = createEnableDialog;
+ }
+
+ /**
+ * @return create session dialog implementation
+ */
+ public ICreateSessionDialog getCreateSessionDialog() {
+ if (fCreateSessionDialog == null) {
+ fCreateSessionDialog = new CreateSessionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fCreateSessionDialog;
+ }
+
+ /**
+ * @return command script selection dialog implementation
+ */
+ public ISelectCommandScriptDialog getCommandScriptDialog() {
+ if (fCommandScriptDialog == null) {
+ fCommandScriptDialog = new OpenCommandScriptDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fCommandScriptDialog;
+ }
+
+ /**
+ * Sets a create session dialog implementation.
+ * @param createSessionDialog - a create session implementation.
+ */
+ public void setCreateSessionDialog(ICreateSessionDialog createSessionDialog) {
+ fCreateSessionDialog = createSessionDialog;
+ }
+
+ /**
+ * @return enable events dialog implementation.
+ */
+ public IEnableEventsDialog getEnableEventsDialog() {
+ if (fEnableEventsDialog == null) {
+ fEnableEventsDialog = new EnableEventsDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fEnableEventsDialog;
+ }
+
+ /**
+ * Sets a enable events dialog implementation.
+ * @param enableEventsDialog - a enable events dialog implementation.
+ */
+ public void setEnableEventsDialog(IEnableEventsDialog enableEventsDialog) {
+ fEnableEventsDialog = enableEventsDialog;
+ }
+
+ /**
+ * @return get events info dialog implementation.
+ */
+ public IGetEventInfoDialog getGetEventInfoDialog() {
+ if (fGetEventInfoDialog == null) {
+ fGetEventInfoDialog = new GetEventInfoDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fGetEventInfoDialog;
+ }
+
+ /**
+ * Sets a get events info dialog implementation.
+ * @param getEventInfoDialog - a get events info dialog implementation
+ */
+ public void setGetEventInfoDialog(IGetEventInfoDialog getEventInfoDialog) {
+ fGetEventInfoDialog = getEventInfoDialog;
+ }
+
+ /**
+ * @return the confirmation dialog implementation
+ */
+ public IConfirmDialog getConfirmDialog() {
+ if (fConfirmDialog == null) {
+ fConfirmDialog = new ConfirmDialog();
+ }
+ return fConfirmDialog;
+ }
+
+ /**
+ * Sets the confirmation dialog implementation
+ * @param confirmDialog - a confirmation dialog implementation
+ */
+ public void setConfirmDialog(IConfirmDialog confirmDialog) {
+ fConfirmDialog = confirmDialog;
+ }
+
+ /**
+ * @return the add context dialog implementation
+ */
+ public IAddContextDialog getAddContextDialog() {
+ if (fAddContextDialog == null) {
+ fAddContextDialog = new AddContextDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fAddContextDialog;
+ }
+
+ /**
+ * Sets the add context dialog information
+ * @param addContextDialog - a add context dialog implementation
+ */
+ public void setAddContextDialog(IAddContextDialog addContextDialog) {
+ fAddContextDialog = addContextDialog;
+ }
+
+ /**
+ * @return the import dialog implementation
+ */
+ public IImportDialog getImportDialog() {
+ if (fImportDialog == null) {
+ fImportDialog = new ImportDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fImportDialog;
+ }
+
+ /**
+ * Sets the import dialog implementation.
+ * @param importDialog - a import dialog implementation
+ */
+ public void setImportDialog(IImportDialog importDialog) {
+ fImportDialog = importDialog;
+ }
+
+ /**
+ * @return the import confirmation dialog implementation.
+ */
+ public IImportConfirmationDialog getImportConfirmationDialog() {
+ if (fImportConfirmationDialog == null) {
+ fImportConfirmationDialog = new ImportConfirmationDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
+ }
+ return fImportConfirmationDialog;
+ }
+
+ /**
+ * Sets the import confirmation dialog implementation.
+ * @param confirmDialog - a import confirmation dialog implementation.
+ */
+ public void setImportConfirmationDialog(IImportConfirmationDialog confirmDialog) {
+ fImportConfirmationDialog = confirmDialog;
+ }
+}
+
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to add contexts to a given channel and all of its events.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class AddContextOnChannelHandler extends BaseAddContextHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof ChannelCommandParameter) {
+ TraceChannelComponent channel = ((ChannelCommandParameter)param).getChannel();
+ channel.addContexts(contextNames, monitor);
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceChannelComponent channel = null;
+ TraceSessionComponent session = null;
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceChannelComponent) {
+ // Add only if corresponding TraceSessionComponents is inactive and not destroyed
+ TraceChannelComponent tmpChannel = (TraceChannelComponent) element;
+ session = tmpChannel.getSession();
+ if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
+ channel = tmpChannel;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = (channel != null);
+ fLock.lock();
+ try {
+ fParam = null;
+ if(isEnabled) {
+ fParam = new ChannelCommandParameter(session, channel);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to add contexts to all channels and all events.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class AddContextOnDomainHandler extends BaseAddContextHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof DomainCommandParameter) {
+ TraceDomainComponent domain = ((DomainCommandParameter)param).getDomain();
+ domain.addContexts(contextNames, monitor);
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceDomainComponent domain = null;
+ TraceSessionComponent session = null;
+
+ // Check if one domain is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceDomainComponent) {
+ TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
+ session = (TraceSessionComponent) tmpDomain.getParent();
+
+ // Add only TraceDomainComponent whose TraceSessionComponent parent is inactive and not destroyed
+ if ((session.getSessionState() == TraceSessionState.INACTIVE) && (!session.isDestroyed())) {
+ domain = tmpDomain;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = domain != null;
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if (isEnabled) {
+ fParam = new DomainCommandParameter(session, domain);
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to add contexts to a given event.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class AddContextOnEventHandler extends BaseAddContextHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof EventCommandParameter) {
+ TraceEventComponent event = ((EventCommandParameter)param).getEvent();
+ event.addContexts(contextNames, monitor);
+ }
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceEventComponent event = null;
+ TraceSessionComponent session = null;
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceEventComponent) {
+ // Add only if corresponding TraceSessionComponents is inactive and not destroyed
+ TraceEventComponent tmpEvent = (TraceEventComponent) element;
+ session = tmpEvent.getSession();
+ if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
+ event = tmpEvent;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = (event != null);
+ fLock.lock();
+ try {
+ fParam = null;
+ if(isEnabled) {
+ fParam = new EventCommandParameter(session, event);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IGetEventInfoDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to assign events to a session and channel and enable/configure them.
+ * This is done on the trace provider level.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class AssignEventHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The command execution parameter.
+ */
+ private Parameter fParam;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ fLock.lock();
+ try {
+ // Make a copy for thread safety
+ final Parameter param = new Parameter(fParam);
+
+ // Open dialog box to retrieve the session and channel where the events should be enabled in.
+ final IGetEventInfoDialog dialog = TraceControlDialogFactory.getInstance().getGetEventInfoDialog();
+ dialog.setIsKernel(param.isKernel());
+ dialog.setSessions(param.getSessions());
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_EnableEventsJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ Exception error = null;
+
+ try {
+ List<String> eventNames = new ArrayList<>();
+ List<BaseEventComponent> events = param.getEvents();
+ // Create list of event names
+ for (Iterator<BaseEventComponent> iterator = events.iterator(); iterator.hasNext();) {
+ BaseEventComponent baseEvent = iterator.next();
+ eventNames.add(baseEvent.getName());
+ }
+
+ TraceChannelComponent channel = dialog.getChannel();
+ if (channel == null) {
+ // enable events on default channel (which will be created by lttng-tools)
+ dialog.getSession().enableEvents(eventNames, param.isKernel(), dialog.getFilterExpression(), monitor);
+ } else {
+ channel.enableEvents(eventNames, dialog.getFilterExpression(), monitor);
+ }
+
+ } catch (ExecutionException e) {
+ error = e;
+ }
+
+ // refresh in all cases
+ refresh(new CommandParameter(dialog.getSession()));
+
+ if (error != null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_EnableEventsFailure, error);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ ArrayList<BaseEventComponent> events = new ArrayList<>();
+ TraceSessionComponent[] sessions = null;
+ Boolean isKernel = null;
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof BaseEventComponent) {
+ BaseEventComponent event = (BaseEventComponent) element;
+ ITraceControlComponent provider = event.getParent();
+
+ // check for kernel or UST provider
+ boolean temp = false;
+ if (provider instanceof KernelProviderComponent) {
+ temp = true;
+ } else if (provider instanceof UstProviderComponent) {
+ temp = false;
+ } else {
+ return false;
+ }
+ if (isKernel == null) {
+ isKernel = Boolean.valueOf(temp);
+ } else {
+ // don't mix events from Kernel and UST provider
+ if (isKernel.booleanValue() != temp) {
+ return false;
+ }
+ }
+
+ // Add BaseEventComponents
+ events.add(event);
+
+ if (sessions == null) {
+ TargetNodeComponent root = (TargetNodeComponent)event.getParent().getParent().getParent();
+ sessions = root.getSessions();
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = ((!events.isEmpty()) && (sessions != null) && (sessions.length > 0));
+
+ // To avoid compiler warnings check for null even if isKernel is always not null when used below
+ if (isKernel == null) {
+ return false;
+ }
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if(isEnabled) {
+ fParam = new Parameter(sessions, events, isKernel);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+
+ /**
+ * Class containing parameter for the command execution.
+ */
+ private static final class Parameter {
+
+ /**
+ * The list of event components the command is to be executed on.
+ */
+ private final List<BaseEventComponent> fEvents;
+
+ /**
+ * The list of available sessions.
+ */
+ final private TraceSessionComponent[] fSessions;
+
+ /**
+ * Flag for indicating Kernel or UST.
+ */
+ private final boolean fIsKernel;
+
+ /**
+ * Constructor
+ *
+ * @param sessions - a array of trace sessions
+ * @param events - a lists of events to enable
+ * @param isKernel - domain (true for kernel or UST)
+ */
+ public Parameter(TraceSessionComponent[] sessions, List<BaseEventComponent> events, boolean isKernel) {
+ fSessions = Arrays.copyOf(sessions, sessions.length);
+ fEvents = new ArrayList<>();
+ fEvents.addAll(events);
+ fIsKernel = isKernel;
+ }
+
+ /**
+ * Copy constructor
+ * @param other - a parameter to copy
+ */
+ public Parameter(Parameter other) {
+ this(other.fSessions, other.fEvents, other.fIsKernel);
+ }
+
+ public TraceSessionComponent[] getSessions() {
+ return fSessions;
+ }
+
+ public List<BaseEventComponent> getEvents() {
+ return fEvents;
+ }
+
+ public boolean isKernel() {
+ return fIsKernel;
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IAddContextDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.progress.UIJob;
+
+/**
+ * <p>
+ * Base command handler implementation to add contexts.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class BaseAddContextHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The command execution parameter.
+ */
+ protected CommandParameter fParam = null;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Adds contexts to channel(s) and/or event(s)
+ *
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @param contextNames
+ * - list contexts to add
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If something goes wrong
+ */
+ public abstract void addContexts(CommandParameter param, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException;
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+ fLock.lock();
+ try {
+ // Make a copy for thread safety
+ final CommandParameter param = fParam.clone();
+
+ UIJob getJob = new UIJob(Messages.TraceControl_GetContextJob) {
+ @Override
+ public IStatus runInUIThread(IProgressMonitor monitor) {
+
+ try {
+ final List<String> availableContexts = param.getSession().getContextList(monitor);
+ final IAddContextDialog dialog = TraceControlDialogFactory.getInstance().getAddContextDialog();
+ dialog.setAvalibleContexts(availableContexts);
+
+ if ((dialog.open() != Window.OK) || (dialog.getContexts().isEmpty())) {
+ return Status.OK_STATUS;
+ }
+
+ Job addJob = new Job(Messages.TraceControl_AddContextJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor2) {
+ Exception error = null;
+
+ try {
+ List<String> contextNames = dialog.getContexts();
+ addContexts(param, contextNames, monitor2);
+
+ } catch (ExecutionException e) {
+ error = e;
+ }
+
+ // get session configuration in all cases
+ refresh(param);
+
+ if (error != null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_AddContextFailure, error);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ addJob.setUser(true);
+ addJob.schedule();
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_GetContextFailure, e);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ getJob.setUser(false);
+ getJob.schedule();
+
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Abstract Command handler implementation for all control view handlers.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class BaseControlViewHandler extends AbstractHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The synchronization lock.
+ */
+ protected final ReentrantLock fLock = new ReentrantLock();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * @return returns the workbench page for the Control View
+ */
+ protected IWorkbenchPage getWorkbenchPage() {
+ // Check if we are closing down
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window == null) {
+ return null;
+ }
+
+ // Check if we are in the Project View
+ IWorkbenchPage page = window.getActivePage();
+ if (page == null) {
+ return null;
+ }
+
+ IWorkbenchPart part = page.getActivePart();
+ if (!(part instanceof ControlView)) {
+ return null;
+ }
+ return page;
+ }
+
+ /**
+ * Refreshes the session information based on given session (in CommandParameter)
+ * @param param - command parameter containing the session to refresh
+ */
+ protected void refresh(final CommandParameter param) {
+ Job job = new Job(Messages.TraceControl_RetrieveNodeConfigurationJob) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ param.getSession().getConfigurationFromNode(monitor);
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ListSessionFailure, e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableChannelDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+
+/**
+ * <p>
+ * Base implementation of a command handler to enable a trace channel.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+abstract class BaseEnableChannelHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ protected CommandParameter fParam;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Enables channels with given names which are part of this domain. If a
+ * given channel doesn't exists it creates a new channel with the given
+ * parameters (or default values if given parameter is null).
+ *
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @param channelNames
+ * - a list of channel names to enable on this domain
+ * @param info
+ * - channel information to set for the channel (use null for
+ * default)
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If something goes wrong when enabling the channel
+ */
+ public abstract void enableChannel(CommandParameter param,
+ List<String> channelNames, IChannelInfo info, boolean isKernel,
+ IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * @param param - a parameter instance with data for the command execution
+ * @return returns the relevant domain (null if domain is not known)
+ */
+ public abstract TraceDomainComponent getDomain(CommandParameter param);
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ fLock.lock();
+ try {
+ final CommandParameter param = fParam.clone();
+
+ final IEnableChannelDialog dialog = TraceControlDialogFactory.getInstance().getEnableChannelDialog();
+ dialog.setTargetNodeComponent(param.getSession().getTargetNode());
+ dialog.setDomainComponent(getDomain(param));
+ dialog.setHasKernel(param.getSession().hasKernelProvider());
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_CreateChannelStateJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ Exception error = null;
+
+ List<String> channelNames = new ArrayList<>();
+ channelNames.add(dialog.getChannelInfo().getName());
+
+ try {
+ enableChannel(param, channelNames, dialog.getChannelInfo(), dialog.isKernel(), monitor);
+ } catch (ExecutionException e) {
+ error = e;
+ }
+
+ // refresh in all cases
+ refresh(param);
+
+ if (error != null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateChannelStateFailure, error);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IEnableEventsDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProviderGroup;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Base command handler implementation to enable events.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class BaseEnableEventHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The command execution parameter.
+ */
+ protected CommandParameter fParam = null;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Enables a list of events for given parameters.
+ *
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @param eventNames
+ * - list of event names
+ * @param isKernel
+ * - true if kernel domain else false
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails for some reason
+ */
+ public abstract void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Enables all syscall events.
+ *
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails for some reason
+ */
+ public abstract void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Enables a dynamic probe.
+ *
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @param eventName
+ * - a event name
+ * @param isFunction
+ * - true for dynamic function entry/return probe else false
+ * @param probe
+ * - a dynamic probe information
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails for some reason
+ */
+ public abstract void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Enables events using log level
+ *
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @param eventName
+ * - a event name
+ * @param logLevelType
+ * - a log level type
+ * @param level
+ * - a log level
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails for some reason
+ */
+ public abstract void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * @param param
+ * - a parameter instance with data for the command execution
+ * @return returns the relevant domain (null if domain is not known)
+ */
+ public abstract TraceDomainComponent getDomain(CommandParameter param);
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+ fLock.lock();
+ try {
+ // Make a copy for thread safety
+ final CommandParameter param = fParam.clone();
+
+ TargetNodeComponent node = param.getSession().getTargetNode();
+ List<ITraceControlComponent> providers = node.getChildren(TraceProviderGroup.class);
+
+ final IEnableEventsDialog dialog = TraceControlDialogFactory.getInstance().getEnableEventsDialog();
+ dialog.setTraceProviderGroup((TraceProviderGroup)providers.get(0));
+ dialog.setTraceDomainComponent(getDomain(param));
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_ChangeEventStateJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ Exception error = null;
+
+ try {
+ String filter = dialog.getFilterExpression();
+
+ // Enable tracepoint events
+ if (dialog.isTracepoints()) {
+ if (dialog.isAllTracePoints()) {
+ enableEvents(param, null, dialog.isKernel(), filter, monitor);
+ } else {
+ List<String> eventNames = dialog.getEventNames();
+ if (!eventNames.isEmpty()) {
+ enableEvents(param, eventNames, dialog.isKernel(), filter, monitor);
+ }
+ }
+ }
+
+ // Enable syscall events
+ if (dialog.isAllSysCalls()) {
+ enableSyscalls(param, monitor);
+ }
+
+ // Enable dynamic probe
+ if (dialog.isDynamicProbe() && (dialog.getProbeEventName() != null) && (dialog.getProbeName() != null)) {
+ enableProbe(param, dialog.getProbeEventName(), false, dialog.getProbeName(), monitor);
+ }
+
+ // Enable dynamic function probe
+ if (dialog.isDynamicFunctionProbe() && (dialog.getFunctionEventName() != null) && (dialog.getFunction() != null)) {
+ enableProbe(param, dialog.getFunctionEventName(), true, dialog.getFunction(), monitor);
+ }
+
+ // Enable event using a wildcard
+ if (dialog.isWildcard()) {
+ List<String> eventNames = dialog.getEventNames();
+ eventNames.add(dialog.getWildcard());
+
+ if (!eventNames.isEmpty()) {
+ enableEvents(param, eventNames, dialog.isKernel(), filter, monitor);
+ }
+ }
+
+ // Enable events using log level
+ if (dialog.isLogLevel()) {
+ enableLogLevel(param, dialog.getLogLevelEventName(), dialog.getLogLevelType(), dialog.getLogLevel(), filter, monitor);
+ }
+
+ } catch (ExecutionException e) {
+ error = e;
+ }
+
+ // refresh in all cases
+ refresh(param);
+
+ if (error != null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeEventStateFailure, error);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to delete a target host.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class BaseNodeHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The target node component the command is to be executed on.
+ */
+ protected TargetNodeComponent fTargetNode = null;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TargetNodeComponent node = null;
+ // Check if the node component is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ Object element = ((StructuredSelection) selection).getFirstElement();
+ node = (element instanceof TargetNodeComponent) ? (TargetNodeComponent) element : null;
+ }
+ boolean isEnabled = node != null;
+ fLock.lock();
+ try {
+ if (isEnabled) {
+ fTargetNode = node;
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+
+
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+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 {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The command execution parameter.
+ */
+ protected DomainCommandParameter fParam = null;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+ fLock.lock();
+ try {
+ // Make a copy for thread safety
+ final DomainCommandParameter param = fParam.clone();
+
+ Job addJob = new Job(Messages.TraceControl_AddCalibrateJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ param.getDomain().calibrate(monitor);
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_AddCalibrateFailure, e);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ addJob.setUser(true);
+ addJob.schedule();
+
+ } finally {
+ fLock.unlock();
+ }
+ return Status.OK_STATUS;
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceDomainComponent domain = null;
+ TraceSessionComponent session = null;
+
+ // Check if one domain is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ 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;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = domain != null;
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if (isEnabled) {
+ fParam = new DomainCommandParameter(session, domain);
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Abstract command handler implementation to enable or disabling a trace channel.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class ChangeChannelStateHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The command execution parameter.
+ */
+ protected Parameter fParam;
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the new state to set
+ */
+ protected abstract TraceEnablement getNewState();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Changes the state of the given channels.
+ * @param domain - the domain of the channels.
+ * @param channelNames - a list of channel names
+ * @param monitor - a progress monitor
+ * @throws ExecutionException If the command fails
+ */
+ protected abstract void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException;
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ fLock.lock();
+ try {
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+
+ final Parameter param = new Parameter(fParam);
+
+ Job job = new Job(Messages.TraceControl_ChangeChannelStateJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ Exception error = null;
+
+ TraceSessionComponent session = null;
+
+ try {
+ TraceDomainComponent kernelDomain = param.getKernelDomain();
+ List<TraceChannelComponent> kernelChannels = param.getKernelChannels();
+
+ if (kernelDomain != null) {
+ session = (TraceSessionComponent)kernelDomain.getParent();
+ List<String> channelNames = new ArrayList<>();
+ for (Iterator<TraceChannelComponent> iterator = kernelChannels.iterator(); iterator.hasNext();) {
+ // Enable all selected channels which are disabled
+ TraceChannelComponent channel = iterator.next();
+ channelNames.add(channel.getName());
+ }
+
+ changeState(kernelDomain, channelNames, monitor);
+
+ for (Iterator<TraceChannelComponent> iterator = kernelChannels.iterator(); iterator.hasNext();) {
+ // Enable all selected channels which are disabled
+ TraceChannelComponent channel = iterator.next();
+ channel.setState(getNewState());
+ }
+ }
+
+ TraceDomainComponent ustDomain = param.getUstDomain();
+ List<TraceChannelComponent> ustChannels = param.getUstChannels();
+ if (ustDomain != null) {
+ if (session == null) {
+ session = (TraceSessionComponent)ustDomain.getParent();
+ }
+
+ List<String> channelNames = new ArrayList<>();
+ for (Iterator<TraceChannelComponent> iterator = ustChannels.iterator(); iterator.hasNext();) {
+ // Enable all selected channels which are disabled
+ TraceChannelComponent channel = iterator.next();
+ channelNames.add(channel.getName());
+ }
+
+ changeState(ustDomain, channelNames, monitor);
+
+ for (Iterator<TraceChannelComponent> iterator = ustChannels.iterator(); iterator.hasNext();) {
+ // Enable all selected channels which are disabled
+ TraceChannelComponent channel = iterator.next();
+ channel.setState(getNewState());
+ }
+ }
+ } catch (ExecutionException e) {
+ error = e;
+ }
+
+ // In all cases notify listeners
+ if (session != null) {
+ session.fireComponentChanged(session);
+ }
+
+ if (error != null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeChannelStateFailure, error);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceDomainComponent kernelDomain = null;
+ TraceDomainComponent ustDomain = null;
+ List<TraceChannelComponent> kernelChannels = new ArrayList<>();
+ List<TraceChannelComponent> ustChannels = new ArrayList<>();
+
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ String sessionName = null;
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+
+ if (element instanceof TraceChannelComponent) {
+
+ // Add only TraceChannelComponents that are disabled
+ TraceChannelComponent channel = (TraceChannelComponent) element;
+ if (sessionName == null) {
+ sessionName = String.valueOf(channel.getSessionName());
+ }
+
+ // Enable command only for channels of same session
+ if (!sessionName.equals(channel.getSessionName())) {
+ kernelChannels.clear();
+ ustChannels.clear();
+ break;
+ }
+
+ if ((channel.getState() != getNewState())) {
+ if (channel.isKernel()) {
+ kernelChannels.add(channel);
+ if (kernelDomain == null) {
+ kernelDomain = (TraceDomainComponent) channel.getParent();
+ }
+ } else {
+ ustChannels.add(channel);
+ if (ustDomain == null) {
+ ustDomain = (TraceDomainComponent) channel.getParent();
+ }
+ }
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = (!kernelChannels.isEmpty() || !ustChannels.isEmpty());
+ fLock.lock();
+ try {
+ if (isEnabled) {
+ fParam = new Parameter(kernelDomain, ustDomain, kernelChannels, ustChannels);
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+
+ /**
+ * Class containing parameter for the command execution.
+ */
+ protected static class Parameter {
+ /**
+ * Kernel domain component reference.
+ */
+ protected final TraceDomainComponent fKernelDomain;
+ /**
+ * UST domain component reference.
+ */
+ protected final TraceDomainComponent fUstDomain;
+ /**
+ * The list of kernel channel components the command is to be executed on.
+ */
+ protected final List<TraceChannelComponent> fKernelChannels;
+ /**
+ * The list of UST channel components the command is to be executed on.
+ */
+ protected final List<TraceChannelComponent> fUstChannels;
+
+ /**
+ * Constructor
+ * @param kernelDomain - a kernel domain component
+ * @param ustDomain - a UST domain component
+ * @param kernelChannels - list of available kernel channels
+ * @param ustChannels - list of available UST channels
+ */
+ public Parameter(TraceDomainComponent kernelDomain, TraceDomainComponent ustDomain, List<TraceChannelComponent> kernelChannels, List<TraceChannelComponent> ustChannels) {
+ fKernelDomain = kernelDomain;
+ fUstDomain = ustDomain;
+ fKernelChannels = new ArrayList<>();
+ fKernelChannels.addAll(kernelChannels);
+ fUstChannels = new ArrayList<>();
+ fUstChannels.addAll(ustChannels);
+ }
+
+ /**
+ * Copy constructor
+ * @param other a parameter to copy
+ */
+ public Parameter(Parameter other) {
+ this(other.fKernelDomain, other.fUstDomain, other.fKernelChannels, other.fUstChannels);
+ }
+
+ /**
+ * @return the kernel domain component.
+ */
+ public TraceDomainComponent getKernelDomain() {
+ return fKernelDomain;
+ }
+
+ /**
+ * @return the UST domain component.
+ */
+ public TraceDomainComponent getUstDomain() {
+ return fUstDomain;
+ }
+
+ /**
+ * @return the list of kernel channel components.
+ */
+ public List<TraceChannelComponent> getKernelChannels() {
+ return fKernelChannels;
+ }
+
+ /**
+ * @return the list of UST channel components.
+ */
+ public List<TraceChannelComponent> getUstChannels() {
+ return fUstChannels;
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Base Command handler implementation to enable or disabling a trace channel.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class ChangeEventStateHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The command execution parameter.
+ */
+ protected Parameter fParam;
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the new state to set
+ */
+ protected abstract TraceEnablement getNewState();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Change the state
+ * @param channel - channel of events to be enabled
+ * @param eventNames - list event names
+ * @param monitor - a progress monitor
+ * @throws ExecutionException If the command fails
+ */
+ protected abstract void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException;
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+
+ fLock.lock();
+ try {
+
+ final Parameter param = new Parameter(fParam);
+
+ Job job = new Job(Messages.TraceControl_ChangeChannelStateJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ Exception error = null;
+
+ TraceSessionComponent session = null;
+
+ try {
+ boolean isAll = false;
+ if (param.getChannel() != null) {
+ session = param.getChannel().getSession();
+ List<String> eventNames = new ArrayList<>();
+ List<TraceEventComponent> events = param.getEvents();
+
+ for (Iterator<TraceEventComponent> iterator = events.iterator(); iterator.hasNext();) {
+ // Enable/disable all selected channels which are disabled
+ TraceEventComponent traceEvent = iterator.next();
+
+ // Workaround for wildcard handling in lttng-tools
+ if ("*".equals(traceEvent.getName())) { //$NON-NLS-1$
+ isAll = true;
+ } else {
+ eventNames.add(traceEvent.getName());
+ }
+ }
+ if (isAll) {
+ changeState(param.getChannel(), null, monitor);
+ }
+
+ if (!eventNames.isEmpty()) {
+ changeState(param.getChannel(), eventNames, monitor);
+ }
+
+ for (Iterator<TraceEventComponent> iterator = events.iterator(); iterator.hasNext();) {
+ // Enable all selected channels which are disabled
+ TraceEventComponent ev = iterator.next();
+ ev.setState(getNewState());
+ }
+ }
+ } catch (ExecutionException e) {
+ error = e;
+ }
+
+ if (session != null) {
+ // In all cases notify listeners
+ session.fireComponentChanged(session);
+ }
+
+ if (error != null) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeEventStateFailure, error);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+
+ TraceChannelComponent channel = null;
+ List<TraceEventComponent> events = new ArrayList<>();
+
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ String sessionName = null;
+ String channelName = null;
+
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+
+ if (element instanceof TraceEventComponent) {
+
+ TraceEventComponent event = (TraceEventComponent) element;
+ if (sessionName == null) {
+ sessionName = String.valueOf(event.getSessionName());
+ }
+
+ if (channel == null) {
+ channel = (TraceChannelComponent)event.getParent();
+ }
+
+ if (channelName == null) {
+ channelName = event.getChannelName();
+ }
+
+ // Enable command only for events of same session, same channel and domain
+ if ((!sessionName.equals(event.getSessionName())) ||
+ (!channelName.equals(event.getChannelName())) ||
+ (channel.isKernel() != event.isKernel())) {
+ events.clear();
+ break;
+ }
+
+ if ((event.getState() != getNewState())) {
+ events.add(event);
+ }
+ }
+ }
+ }
+ boolean isEnabled = !events.isEmpty();
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if (isEnabled) {
+ fParam = new Parameter(channel, events);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+
+ /**
+ * Class containing parameter for the command execution.
+ */
+ protected static class Parameter {
+ /**
+ * Channel component reference.
+ */
+ private final TraceChannelComponent fChannel;
+ /**
+ * The list of kernel channel components the command is to be executed on.
+ */
+ private final List<TraceEventComponent> fEvents = new ArrayList<>();
+
+ /**
+ * Constructor
+ * @param channel - a channel component
+ * @param events - a list of event components
+ */
+ public Parameter(TraceChannelComponent channel, List<TraceEventComponent> events) {
+ fChannel = channel;
+ fEvents.addAll(events);
+ }
+
+ /**
+ * Copy constructor
+ * @param other - a parameter to copy
+ */
+ public Parameter(Parameter other) {
+ this(other.fChannel, other.fEvents);
+ }
+
+ /**
+ * @return the trace channel component.
+ */
+ public TraceChannelComponent getChannel() {
+ return fChannel;
+ }
+
+ /**
+ * @return a list of trace event components.
+ */
+ public List<TraceEventComponent> getEvents() {
+ return fEvents;
+ }
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Abstract command handler implementation to start or stop one or more trace sessions.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class ChangeSessionStateHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The list of session components the command is to be executed on.
+ */
+ protected List<TraceSessionComponent> fSessions = new ArrayList<>();
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return new required state.
+ */
+ public abstract TraceSessionState getNewState();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Performs the state change on given session.
+ *
+ * @param session
+ * - a session which state is to be changed
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public abstract void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException;
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+
+ fLock.lock();
+ try {
+
+ final List<TraceSessionComponent> sessions = new ArrayList<>();
+ sessions.addAll(fSessions);
+
+ Job job = new Job(Messages.TraceControl_ChangeSessionStateJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ for (Iterator<TraceSessionComponent> iterator = sessions.iterator(); iterator.hasNext();) {
+
+ // Start all selected sessions
+ TraceSessionComponent session = iterator.next();
+ changeState(session, monitor);
+
+ // Set Session state
+ session.setSessionState(getNewState());
+ session.fireComponentChanged(session);
+ }
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ChangeSessionStateFailure, e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ List<TraceSessionComponent> sessions = new ArrayList<>(0);
+
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceSessionComponent) {
+ // Add only TraceSessionComponents that are inactive and not destroyed
+ TraceSessionComponent session = (TraceSessionComponent) element;
+ if ((session.getSessionState() != getNewState()) && (!session.isDestroyed())) {
+ sessions.add(session);
+ }
+ }
+ }
+ }
+ boolean isEnabled = !sessions.isEmpty();
+ fLock.lock();
+ try {
+ fSessions = null;
+ if (isEnabled) {
+ fSessions = sessions;
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * Class containing parameter for the command execution.
+ *
+ * @author Bernd Hufmann
+ */
+public class ChannelCommandParameter extends CommandParameter {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ private TraceChannelComponent fChannel;
+
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param session - a trace session component.
+ * @param channel - a trace channel component
+ */
+ public ChannelCommandParameter(TraceSessionComponent session, TraceChannelComponent channel) {
+ super(session);
+ fChannel = channel;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return the trace channel component
+ */
+ public TraceChannelComponent getChannel() {
+ return fChannel;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public ChannelCommandParameter clone() {
+ ChannelCommandParameter clone = (ChannelCommandParameter) super.clone();
+ clone.fChannel = fChannel;
+ return clone;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * Class containing parameter for the command execution.
+ *
+ * @author Bernd Hufmann
+ */
+public class CommandParameter implements Cloneable {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The trace session component.
+ */
+ private TraceSessionComponent fSession;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param session a trace session component.
+ */
+ public CommandParameter(TraceSessionComponent session) {
+ fSession = session;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return the session component.
+ */
+ public TraceSessionComponent getSession() {
+ return fSession;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public CommandParameter clone() {
+ CommandParameter clone = null;
+ try {
+ clone = (CommandParameter) super.clone();
+ clone.fSession = fSession;
+ } catch (CloneNotSupportedException e) {
+ }
+ return clone;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+
+/**
+ * <p>
+ * Command handler implementation to connect to a target host.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ConnectHandler extends BaseNodeHandler {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ fLock.lock();
+ try {
+ fTargetNode.connect();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ boolean isEnabled = false;
+ fLock.lock();
+ try {
+ isEnabled = (super.isEnabled() && (fTargetNode.getTargetNodeState() == TargetNodeState.DISCONNECTED));
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ICreateSessionDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to create a trace session.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class CreateSessionHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The trace session group the command is to be executed on.
+ */
+ private TraceSessionGroup fSessionGroup = null;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ fLock.lock();
+ try {
+ final TraceSessionGroup sessionGroup = fSessionGroup;
+
+ // Open dialog box for the node name and address
+ final ICreateSessionDialog dialog = TraceControlDialogFactory.getInstance().getCreateSessionDialog();
+ dialog.initialize(sessionGroup);
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_CreateSessionJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ sessionGroup.createSession(dialog.getParameters(), monitor);
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateSessionFailure, e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceSessionGroup sessionGroup = null;
+
+ // Check if the session group project is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ Object element = ((StructuredSelection) selection).getFirstElement();
+ sessionGroup = (element instanceof TraceSessionGroup) ? (TraceSessionGroup) element : null;
+ }
+
+ boolean isEnabled = sessionGroup != null;
+ fLock.lock();
+ try {
+ fSessionGroup = null;
+ if(isEnabled) {
+ fSessionGroup = sessionGroup;
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+
+/**
+ * <p>
+ * Command handler implementation to delete a target host.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class DeleteHandler extends BaseNodeHandler {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ fLock.lock();
+ try {
+ ITraceControlComponent root = fTargetNode.getParent();
+ fTargetNode.removeAllChildren();
+ fTargetNode.deregister();
+ root.removeChild(fTargetNode);
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ boolean isEnabled = false;
+ fLock.lock();
+ try {
+ isEnabled = (super.isEnabled() && (fTargetNode.getTargetNodeState() == TargetNodeState.DISCONNECTED));
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IConfirmDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Command handler implementation to destroy one or more trace sessions.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class DestroySessionHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The list of session components the command is to be executed on.
+ */
+ private final List<TraceSessionComponent> fSessions = new ArrayList<>();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+ // Get user confirmation
+ IConfirmDialog dialog = TraceControlDialogFactory.getInstance().getConfirmDialog();
+ if (!dialog.openConfirm(window.getShell(),
+ Messages.TraceControl_DestroyConfirmationTitle,
+ Messages.TraceControl_DestroyConfirmationMessage)) {
+
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_DestroySessionJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ // Make a copy of the list of sessions to avoid ConcurrentModificationException when iterating
+ // over fSessions, since fSessions is modified in another thread triggered by the tree viewer refresh
+ // after removing a session.
+ TraceSessionComponent[] sessions = fSessions.toArray(new TraceSessionComponent[fSessions.size()]);
+
+ for (int i = 0; i < sessions.length; i++) {
+ // Destroy all selected sessions
+ TraceSessionComponent session = sessions[i];
+ TraceSessionGroup sessionGroup = (TraceSessionGroup)session.getParent();
+ sessionGroup.destroySession(session, monitor);
+ }
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_DestroySessionFailure, e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+ fSessions.clear();
+
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceSessionComponent) {
+ // Add only TraceSessionComponents that are inactive and not destroyed
+ TraceSessionComponent session = (TraceSessionComponent) element;
+ if ((session.getSessionState() == TraceSessionState.INACTIVE) && (!session.isDestroyed())) {
+ fSessions.add((TraceSessionComponent)element);
+ }
+ }
+ }
+ }
+ return !fSessions.isEmpty();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+
+/**
+ * <p>
+ * Command handler implementation to disable one or more trace channels per session and domain.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class DisableChannelHandler extends ChangeChannelStateHandler {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected TraceEnablement getNewState() {
+ return TraceEnablement.DISABLED;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException {
+ domain.disableChannels(channelNames, monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+
+/**
+ * <p>
+ * Command handler implementation to disable one or more events session, domain and channel.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class DisableEventHandler extends ChangeEventStateHandler {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected TraceEnablement getNewState() {
+ return TraceEnablement.DISABLED;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
+ channel.disableEvent(eventNames, monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+
+/**
+ * <p>
+ * Command handler implementation to disconnect from a target host.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class DisconnectHandler extends BaseNodeHandler {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ fLock.lock();
+ try {
+ fTargetNode.disconnect();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ boolean isEnabled = false;
+ fLock.lock();
+ try {
+ isEnabled = super.isEnabled() && (fTargetNode.getTargetNodeState() == TargetNodeState.CONNECTED);
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * Class containing parameter for the command execution.
+ *
+ * @author Bernd Hufmann
+ */
+public class DomainCommandParameter extends CommandParameter {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ private TraceDomainComponent fDomain;
+
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param session - a trace session component.
+ * @param domain - a trace domain component
+ */
+ public DomainCommandParameter(TraceSessionComponent session, TraceDomainComponent domain) {
+ super(session);
+ fDomain = domain;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return the trace domain component
+ */
+ public TraceDomainComponent getDomain() {
+ return fDomain;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public DomainCommandParameter clone() {
+ DomainCommandParameter clone = (DomainCommandParameter) super.clone();
+ clone.fDomain = fDomain;
+ return clone;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+
+/**
+ * <p>
+ * Command handler implementation to enable one or more trace channels per session and domain.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableChannelHandler extends ChangeChannelStateHandler {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected TraceEnablement getNewState() {
+ return TraceEnablement.ENABLED;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void changeState(TraceDomainComponent domain, List<String> channelNames, IProgressMonitor monitor) throws ExecutionException {
+ domain.enableChannels(channelNames, null, monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to enable a trace channel for known domain.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableChannelOnDomainHandler extends BaseEnableChannelHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void enableChannel(CommandParameter param, List<String> channelNames, IChannelInfo info, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof DomainCommandParameter) {
+ ((DomainCommandParameter)param).getDomain().enableChannels(channelNames, info, monitor);
+ }
+ }
+
+ @Override
+ public TraceDomainComponent getDomain(CommandParameter param) {
+ if (param instanceof DomainCommandParameter) {
+ return ((DomainCommandParameter)param).getDomain();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceDomainComponent domain = null;
+ TraceSessionComponent session = null;
+
+ // Check if one domain is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceDomainComponent) {
+ TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
+ session = (TraceSessionComponent) tmpDomain.getParent();
+
+ // Add only TraceDomainComponent whose TraceSessionComponent parent is inactive and not destroyed
+ if ((session.getSessionState() == TraceSessionState.INACTIVE) && (!session.isDestroyed())) {
+ domain = tmpDomain;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = domain != null;
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if (isEnabled) {
+ fParam = new DomainCommandParameter(session, domain);
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to enable a trace channel for unknown domain
+ * (on session level).
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableChannelOnSessionHandler extends BaseEnableChannelHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void enableChannel(CommandParameter param, List<String> channelNames, IChannelInfo info, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
+ param.getSession().enableChannels(channelNames, info, isKernel, monitor);
+ }
+
+ @Override
+ public TraceDomainComponent getDomain(CommandParameter param) {
+ return null;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceSessionComponent session = null;
+ // Check if one session is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceSessionComponent) {
+ // Add only TraceSessionComponents that are inactive and not destroyed
+ TraceSessionComponent tmpSession = (TraceSessionComponent) element;
+ if ((tmpSession.getSessionState() == TraceSessionState.INACTIVE) && (!tmpSession.isDestroyed())) {
+ session = tmpSession;
+ }
+ }
+ }
+ }
+ boolean isEnabled = session != null;
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if (isEnabled) {
+ fParam = new CommandParameter(session);
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+
+/**
+ * <p>
+ * Command handler implementation to enable one or more events session, domain and channel.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableEventHandler extends ChangeEventStateHandler {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected TraceEnablement getNewState() {
+ return TraceEnablement.ENABLED;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void changeState(TraceChannelComponent channel, List<String> eventNames, IProgressMonitor monitor) throws ExecutionException{
+ channel.enableEvents(eventNames, monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to enable events for a known channel.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableEventOnChannelHandler extends BaseEnableEventHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExression, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof ChannelCommandParameter) {
+ ((ChannelCommandParameter)param).getChannel().enableEvents(eventNames, filterExression, monitor);
+ }
+ }
+
+ @Override
+ public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof ChannelCommandParameter) {
+ ((ChannelCommandParameter)param).getChannel().enableSyscalls(monitor);
+ }
+ }
+
+ @Override
+ public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof ChannelCommandParameter) {
+ ((ChannelCommandParameter)param).getChannel().enableProbe(eventName, isFunction, probe, monitor);
+ }
+ }
+
+ @Override
+ public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExression, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof ChannelCommandParameter) {
+ ((ChannelCommandParameter)param).getChannel().enableLogLevel(eventName, logLevelType, level, filterExression, monitor);
+ }
+ }
+
+ @Override
+ public TraceDomainComponent getDomain(CommandParameter param) {
+ if (param instanceof ChannelCommandParameter) {
+ return (TraceDomainComponent) ((ChannelCommandParameter)param).getChannel().getParent();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceChannelComponent channel = null;
+ TraceSessionComponent session = null;
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceChannelComponent) {
+ // Add only if corresponding TraceSessionComponents is inactive and not destroyed
+ TraceChannelComponent tmpChannel = (TraceChannelComponent) element;
+ session = tmpChannel.getSession();
+ if(!session.isDestroyed()) {
+ channel = tmpChannel;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = (channel != null);
+ fLock.lock();
+ try {
+ fParam = null;
+ if(isEnabled) {
+ fParam = new ChannelCommandParameter(session, channel);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
+
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to enable events for a known domain and default channel 'channel0'
+ * (which will be created if doesn't exist).
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableEventOnDomainHandler extends BaseEnableEventHandler {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExression, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof DomainCommandParameter) {
+ ((DomainCommandParameter)param).getDomain().enableEvents(eventNames, monitor);
+ }
+ }
+
+ @Override
+ public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof DomainCommandParameter) {
+ ((DomainCommandParameter)param).getDomain().enableSyscalls(monitor);
+ }
+ }
+
+ @Override
+ public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof DomainCommandParameter) {
+ ((DomainCommandParameter)param).getDomain().enableProbe(eventName, isFunction, probe, monitor);
+ }
+ }
+
+ @Override
+ public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExression, IProgressMonitor monitor) throws ExecutionException {
+ if (param instanceof DomainCommandParameter) {
+ ((DomainCommandParameter)param).getDomain().enableLogLevel(eventName, logLevelType, level, filterExression, monitor);
+ }
+ }
+
+ @Override
+ public TraceDomainComponent getDomain(CommandParameter param) {
+ if (param instanceof DomainCommandParameter) {
+ return ((DomainCommandParameter)param).getDomain();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceDomainComponent domain = null;
+ TraceSessionComponent session = null;
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceDomainComponent) {
+ // Add only if corresponding TraceSessionComponents is inactive and not destroyed
+ TraceDomainComponent tmpDomain = (TraceDomainComponent) element;
+ session = tmpDomain.getSession();
+ if(session.getSessionState() == TraceSessionState.INACTIVE && !session.isDestroyed()) {
+ domain = tmpDomain;
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = (domain != null);
+ fLock.lock();
+ try {
+ fParam = null;
+ if(isEnabled) {
+ fParam = new DomainCommandParameter(session, domain);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to enable events for a known session and default channel 'channel0'
+ * (which will be created if doesn't exist).
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class EnableEventOnSessionHandler extends BaseEnableEventHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ //-------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void enableEvents(CommandParameter param, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
+ param.getSession().enableEvents(eventNames, isKernel, filterExpression, monitor);
+ }
+
+ @Override
+ public void enableSyscalls(CommandParameter param, IProgressMonitor monitor) throws ExecutionException {
+ param.getSession().enableSyscalls(monitor);
+ }
+
+ @Override
+ public void enableProbe(CommandParameter param, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
+ param.getSession().enableProbe(eventName, isFunction, probe, monitor);
+ }
+
+ @Override
+ public void enableLogLevel(CommandParameter param, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
+ param.getSession().enableLogLevel(eventName, logLevelType, level, filterExpression, monitor);
+ }
+
+ @Override
+ public TraceDomainComponent getDomain(CommandParameter param) {
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceSessionComponent session = null;
+ // Check if one session is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceSessionComponent) {
+ // Add only if corresponding TraceSessionComponents is inactive and not destroyed
+ TraceSessionComponent tmpSession = (TraceSessionComponent) element;
+ if(tmpSession.getSessionState() == TraceSessionState.INACTIVE && !tmpSession.isDestroyed()) {
+ session = tmpSession;
+ }
+ }
+ }
+ }
+ boolean isEnabled = (session != null);
+ fLock.lock();
+ try {
+ fParam = null;
+ if(isEnabled) {
+ fParam = new CommandParameter(session);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * Class containing parameter for a command execution.
+ *
+ * @author Bernd Hufmann
+ */
+public class EventCommandParameter extends CommandParameter {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ private TraceEventComponent fEvent;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param session - a trace session component.
+ * @param event - a trace event component
+ */
+ public EventCommandParameter(TraceSessionComponent session, TraceEventComponent event) {
+ super(session);
+ fEvent = event;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return the trace event component
+ */
+ public TraceEventComponent getEvent() {
+ return fEvent;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public EventCommandParameter clone() {
+ EventCommandParameter clone = (EventCommandParameter) super.clone();
+ clone.fEvent = fEvent;
+ return clone;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ISelectCommandScriptDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionGroup;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to execute commands of a command script.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ExecuteCommandScriptHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The trace session group the command is to be executed on.
+ */
+ private TraceSessionGroup fSessionGroup = null;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ fLock.lock();
+ try {
+ final TraceSessionGroup sessionGroup = fSessionGroup;
+
+ // Open dialog box for the node name and address
+ final ISelectCommandScriptDialog dialog = TraceControlDialogFactory.getInstance().getCommandScriptDialog();
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_ExecuteScriptJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ sessionGroup.executeCommands(monitor, dialog.getCommands());
+ } catch (ExecutionException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_CreateSessionFailure, e);
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TraceSessionGroup sessionGroup = null;
+
+ // Check if the session group project is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ Object element = ((StructuredSelection) selection).getFirstElement();
+ sessionGroup = (element instanceof TraceSessionGroup) ? (TraceSessionGroup) element : null;
+ }
+
+ boolean isEnabled = sessionGroup != null;
+ fLock.lock();
+ try {
+ fSessionGroup = null;
+ if(isEnabled) {
+ fSessionGroup = sessionGroup;
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of streamed traces
+ * Patrick Tasse - Add support for source location
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.core.runtime.URIUtil;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConnectionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConnectionManager;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.LttngRelaydConsumer;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.IImportDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.ImportFileInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.internal.tmf.ui.project.wizards.importtrace.ImportTraceWizard;
+import org.eclipse.linuxtools.tmf.core.TmfCommonConstants;
+import org.eclipse.linuxtools.tmf.core.project.model.TmfTraceImportException;
+import org.eclipse.linuxtools.tmf.core.project.model.TraceTypeHelper;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfConstants;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfOpenTraceHelper;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectElement;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfProjectRegistry;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceElement;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceFolder;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTraceTypeUIUtils;
+import org.eclipse.linuxtools.tmf.ui.project.model.TmfTracesFolder;
+import org.eclipse.linuxtools.tmf.ui.project.model.TraceUtils;
+import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
+import org.eclipse.rse.services.files.IFileService;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
+import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Command handler implementation to import traces from a (remote) session to a
+ * tracing project.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ImportHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /** Name of default project to import traces to */
+ public static final String DEFAULT_REMOTE_PROJECT_NAME = "Remote"; //$NON-NLS-1$
+
+ /** The preference key to remeber whether or not the user wants the notification shown next time **/
+ private static final String NOTIFY_IMPORT_STREAMED_PREF_KEY = "NOTIFY_IMPORT_STREAMED"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The command parameter
+ */
+ protected CommandParameter fParam;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+
+ if (window == null) {
+ return false;
+ }
+
+ fLock.lock();
+ try {
+ final CommandParameter param = fParam.clone();
+
+ // create default project
+ IProject project = TmfProjectRegistry.createProject(DEFAULT_REMOTE_PROJECT_NAME, null, null);
+
+ if (param.getSession().isLiveTrace()) {
+ importLiveTrace(new LttngRelaydConnectionInfo(param.getSession().getLiveUrl(), param.getSession().getLivePort(), param.getSession().getName()), project);
+ return null;
+ } else if (param.getSession().isStreamedTrace()) {
+
+ IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+ String notify = store.getString(NOTIFY_IMPORT_STREAMED_PREF_KEY);
+ if (!MessageDialogWithToggle.ALWAYS.equals(notify)) {
+ MessageDialogWithToggle.openInformation(window.getShell(), null, Messages.TraceControl_ImportDialogStreamedTraceNotification, Messages.TraceControl_ImportDialogStreamedTraceNotificationToggle, false, store, NOTIFY_IMPORT_STREAMED_PREF_KEY);
+ }
+
+ // Streamed trace
+ TmfProjectElement projectElement = TmfProjectRegistry.getProject(project, true);
+ TmfTraceFolder traceFolder = projectElement.getTracesFolder();
+
+ ImportTraceWizard wizard = new ImportTraceWizard();
+ wizard.init(PlatformUI.getWorkbench(), new StructuredSelection(traceFolder));
+ WizardDialog dialog = new WizardDialog(window.getShell(), wizard);
+ dialog.open();
+ return null;
+ }
+
+ // Remote trace
+ final IImportDialog dialog = TraceControlDialogFactory.getInstance().getImportDialog();
+ dialog.setSession(param.getSession());
+ dialog.setDefaultProject(DEFAULT_REMOTE_PROJECT_NAME);
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ Job job = new Job(Messages.TraceControl_ImportJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, Messages.TraceControl_ImportFailure, null);
+ List<ImportFileInfo> traces = dialog.getTracePathes();
+ IProject selectedProject = dialog.getProject();
+ for (Iterator<ImportFileInfo> iterator = traces.iterator(); iterator.hasNext();) {
+ try {
+
+ if (monitor.isCanceled()) {
+ status.add(Status.CANCEL_STATUS);
+ break;
+ }
+
+ ImportFileInfo remoteFile = iterator.next();
+
+ downloadTrace(remoteFile, selectedProject, monitor);
+
+ // Set trace type
+ IFolder traceFolder = remoteFile.getDestinationFolder();
+
+ IResource file = traceFolder.findMember(remoteFile.getLocalTraceName());
+
+ if (file != null) {
+ TraceTypeHelper helper = null;
+
+ try {
+ helper = TmfTraceTypeUIUtils.selectTraceType(file.getLocation().toOSString(), null, null);
+ } catch (TmfTraceImportException e) {
+ // the trace did not match any trace type
+ }
+
+ if (helper != null) {
+ status.add(TmfTraceTypeUIUtils.setTraceType(file, helper));
+ }
+
+ try {
+ final String scheme = "sftp"; //$NON-NLS-1$
+ String host = remoteFile.getImportFile().getHost().getName();
+ int port = remoteFile.getImportFile().getParentRemoteFileSubSystem().getConnectorService().getPort();
+ String path = remoteFile.getImportFile().getAbsolutePath();
+ if (file instanceof IFolder) {
+ path += IPath.SEPARATOR;
+ }
+ URI uri = new URI(scheme, null, host, port, path, null, null);
+ String sourceLocation = URIUtil.toUnencodedString(uri);
+ file.setPersistentProperty(TmfCommonConstants.SOURCE_LOCATION, sourceLocation);
+ } catch (URISyntaxException e) {
+ }
+ }
+ } catch (ExecutionException e) {
+ status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ImportFailure, e));
+ } catch (CoreException e) {
+ status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_ImportFailure, e));
+ }
+ }
+ return status;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ TraceSessionComponent session = null;
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceSessionComponent) {
+ // Add only TraceSessionComponents that are inactive and not
+ // destroyed
+ TraceSessionComponent tmpSession = (TraceSessionComponent) element;
+ if ((tmpSession.isSnapshotSession() || tmpSession.isLiveTrace() || (tmpSession.getSessionState() == TraceSessionState.INACTIVE)) && (!tmpSession.isDestroyed())) {
+ session = tmpSession;
+ }
+ }
+ }
+ }
+ boolean isEnabled = session != null;
+
+ fLock.lock();
+ try {
+ fParam = null;
+ if (isEnabled) {
+ fParam = new CommandParameter(session);
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * Downloads a trace from the remote host to the given project.
+ *
+ * @param trace
+ * - trace information of trace to import
+ * @param project
+ * - project to import to
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ */
+ private static void downloadTrace(ImportFileInfo trace, IProject project, IProgressMonitor monitor)
+ throws ExecutionException {
+ try {
+ IRemoteFileSubSystem fsss = trace.getImportFile().getParentRemoteFileSubSystem();
+
+ IFolder traceFolder = project.getFolder(TmfTracesFolder.TRACES_FOLDER_NAME);
+ if (!traceFolder.exists()) {
+ throw new ExecutionException(Messages.TraceControl_ImportDialogInvalidTracingProject + " (" + TmfTracesFolder.TRACES_FOLDER_NAME + ")"); //$NON-NLS-1$//$NON-NLS-2$
+ }
+
+ IFolder destinationFolder = trace.getDestinationFolder();
+ TraceUtils.createFolder(destinationFolder, monitor);
+
+ String traceName = trace.getLocalTraceName();
+ IFolder folder = destinationFolder.getFolder(traceName);
+ if (folder.exists()) {
+ if (!trace.isOverwrite()) {
+ throw new ExecutionException(Messages.TraceControl_ImportDialogTraceAlreadyExistError + ": " + traceName); //$NON-NLS-1$
+ }
+ } else {
+ folder.create(true, true, null);
+ }
+
+ IRemoteFile[] sources = fsss.list(trace.getImportFile(), IFileService.FILE_TYPE_FILES, new NullProgressMonitor());
+ SubMonitor subMonitor = SubMonitor.convert(monitor, sources.length);
+ subMonitor.beginTask(Messages.TraceControl_DownloadTask, sources.length);
+
+ for (int i = 0; i < sources.length; i++) {
+ if (subMonitor.isCanceled()) {
+ monitor.setCanceled(true);
+ return;
+ }
+ String destination = folder.getLocation().addTrailingSeparator().append(sources[i].getName()).toOSString();
+ subMonitor.setTaskName(Messages.TraceControl_DownloadTask + ' ' + traceName + '/' + sources[i].getName());
+ fsss.download(sources[i], destination, null, subMonitor.newChild(1));
+ }
+ } catch (SystemMessageException e) {
+ throw new ExecutionException(e.toString(), e);
+ } catch (CoreException e) {
+ throw new ExecutionException(e.toString(), e);
+ }
+ }
+
+ private static void importLiveTrace(final LttngRelaydConnectionInfo connectionInfo, final IProject project) {
+ Job job = new Job(Messages.TraceControl_ImportJob) {
+
+ @Override
+ protected IStatus run(final IProgressMonitor monitor) {
+ try {
+ // We initiate the connection first so that we can retrieve the trace path
+ LttngRelaydConsumer lttngRelaydConsumer = LttngRelaydConnectionManager.getInstance().getConsumer(connectionInfo);
+ try {
+ lttngRelaydConsumer.connect();
+ } catch (CoreException e) {
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, org.eclipse.linuxtools.internal.lttng2.control.ui.relayd.Messages.LttngRelaydConnectionManager_ConnectionError, e);
+ }
+ initializeTraceResource(connectionInfo, lttngRelaydConsumer.getTracePath(), project);
+ return Status.OK_STATUS;
+ } catch (CoreException | TmfTraceImportException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ImportHandler_LiveTraceInitError, e);
+ }
+ }
+
+ };
+ job.setSystem(true);
+ job.schedule();
+ }
+
+
+ private static void initializeTraceResource(final LttngRelaydConnectionInfo connectionInfo, final String tracePath, final IProject project) throws CoreException, TmfTraceImportException {
+ IFolder folder = project.getFolder(TmfTracesFolder.TRACES_FOLDER_NAME);
+ IFolder traceFolder = folder.getFolder(connectionInfo.getSessionName());
+ Path location = new Path(tracePath);
+ IStatus result = ResourcesPlugin.getWorkspace().validateLinkLocation(folder, location);
+ if (result.isOK()) {
+ traceFolder.createLink(location, IResource.REPLACE, new NullProgressMonitor());
+ } else {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, result.getMessage()));
+ }
+
+ TraceTypeHelper selectedTraceType = TmfTraceTypeUIUtils.selectTraceType(location.toOSString(), null, null);
+ // No trace type was determined.
+ TmfTraceTypeUIUtils.setTraceType(traceFolder, selectedTraceType);
+
+ final TmfProjectElement projectElement = TmfProjectRegistry.getProject(project, true);
+ final TmfTraceFolder tracesFolder = projectElement.getTracesFolder();
+ final List<TmfTraceElement> traces = tracesFolder.getTraces();
+ TmfTraceElement found = null;
+ for (TmfTraceElement candidate : traces) {
+ if (candidate.getName().equals(connectionInfo.getSessionName())) {
+ found = candidate;
+ }
+ }
+
+ if (found == null) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.ImportHandler_LiveTraceElementError));
+ }
+
+ // Properties used to be able to reopen a trace in live mode
+ traceFolder.setPersistentProperty(CtfConstants.LIVE_HOST, connectionInfo.getHost());
+ traceFolder.setPersistentProperty(CtfConstants.LIVE_PORT, Integer.toString(connectionInfo.getPort()));
+ traceFolder.setPersistentProperty(CtfConstants.LIVE_SESSION_NAME, connectionInfo.getSessionName());
+
+ final TmfTraceElement finalTrace = found;
+ Display.getDefault().syncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ TmfOpenTraceHelper.openTraceFromElement(finalTrace);
+ }
+ });
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 Ericsson and others
+ *
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Anna Dushistova(Montavista) - [382684] Allow reusing already defined connections that have Files and Shells subsystems
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.window.Window;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.INewConnectionDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.dialogs.TraceControlDialogFactory;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * <p>
+ * Command handler for creation new connection for trace control.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class NewConnectionHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * The trace control system type defined for LTTng version 2.0 and later.
+ */
+ public static final String TRACE_CONTROL_SYSTEM_TYPE = "org.eclipse.linuxtools.internal.lttng2.ui.control.systemType"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The parent trace control component the new node will be added to.
+ */
+ private ITraceControlComponent fRoot = null;
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ assert (fRoot != null);
+
+ IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+ if (window == null) {
+ return false;
+ }
+
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+
+ // get system type definition for LTTng 2.x connection
+ IRSESystemType sysType = RSECorePlugin.getTheCoreRegistry().getSystemTypeById(TRACE_CONTROL_SYSTEM_TYPE);
+
+ // get all hosts for this system type
+ IHost[] hosts = getSuitableHosts();
+
+ // Open dialog box for the node name and address
+ final INewConnectionDialog dialog = TraceControlDialogFactory.getInstance().getNewConnectionDialog();
+ dialog.setTraceControlParent(fRoot);
+ dialog.setHosts(hosts);
+ dialog.setPort(IRemoteSystemProxy.INVALID_PORT_NUMBER);
+
+ if (dialog.open() != Window.OK) {
+ return null;
+ }
+
+ String hostName = dialog.getConnectionName();
+ String hostAddress = dialog.getHostName();
+ int port = dialog.getPort();
+
+ // get the singleton RSE registry
+ IHost host = null;
+
+ for (int i = 0; i < hosts.length; i++) {
+ if (hosts[i].getAliasName().equals(hostName)) {
+ host = hosts[i];
+ break;
+ }
+ }
+
+ if (host == null) {
+ // if there's no host then we will create it
+ try {
+ // create the host object as an SSH Only connection
+ host = registry.createHost(
+ sysType, //System Type Name
+ hostName, //Connection name
+ hostAddress, //IP Address
+ "Connection to Host"); //description //$NON-NLS-1$
+ }
+ catch (Exception e) {
+ MessageDialog.openError(window.getShell(),
+ Messages.TraceControl_EclipseCommandFailure,
+ Messages.TraceControl_NewNodeCreationFailure + " (" + hostName + ", " + hostAddress + ")" + ":\n" + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ return null;
+ }
+ }
+
+ if (host != null) {
+ fLock.lock();
+ try {
+ // successful creation of host
+ TargetNodeComponent node = null;
+ if (!fRoot.containsChild(hostName)) {
+ node = new TargetNodeComponent(hostName, fRoot, host);
+ node.setPort(port);
+ fRoot.addChild(node);
+ }
+ else {
+ node = (TargetNodeComponent)fRoot.getChild(hostName);
+ }
+
+ node.connect();
+ } finally {
+ fLock.unlock();
+ }
+ }
+ return null;
+ }
+
+ private static IHost[] getSuitableHosts() {
+ // need shells and files
+ ArrayList<IHost> result = new ArrayList<>();
+ ArrayList<IHost> shellConnections = new ArrayList<>(
+ Arrays.asList(RSECorePlugin.getTheSystemRegistry()
+ .getHostsBySubSystemConfigurationCategory("shells"))); //$NON-NLS-1$
+
+ for (IHost connection : shellConnections) {
+ ISubSystem[] subSystems = connection.getSubSystems();
+ for (int i = 0; i < subSystems.length; i++) {
+ if (subSystems[i] instanceof IFileServiceSubSystem) {
+ result.add(connection);
+ break;
+ }
+ }
+ }
+
+ return result.toArray(new IHost[result.size()]);
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ ITraceControlComponent root = null;
+
+ // no need to verify part because it has been already done in getWorkbenchPage()
+ IWorkbenchPart part = page.getActivePart();
+ root = ((ControlView) part).getTraceControlRoot();
+
+ boolean isEnabled = root != null;
+
+ fLock.lock();
+ try {
+ fRoot = null;
+ if (isEnabled) {
+ fRoot = root;
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceControlComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to refresh node configuration.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class RefreshHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The node component reference.
+ */
+ private TargetNodeComponent fNode;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ fLock.lock();
+ try {
+ fNode.refresh();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ TargetNodeComponent node = null;
+ // Check if one or more session are selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceControlComponent) {
+ TraceControlComponent component = (TraceControlComponent) element;
+ boolean isConnected = component.getTargetNodeState() == TargetNodeState.CONNECTED;
+ if (isConnected) {
+ while ((component != null) && component.getClass() != TargetNodeComponent.class) {
+ component = (TraceControlComponent) component.getParent();
+ }
+ if (component != null) {
+ node = (TargetNodeComponent) component;
+ }
+ }
+ }
+ }
+ }
+
+ boolean isEnabled = node != null;
+
+ fLock.lock();
+ try {
+ fNode = null;
+ if (isEnabled) {
+ fNode = node;
+ }
+ } finally {
+ fLock.unlock();
+ }
+
+ return isEnabled;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.MultiStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.ui.IWorkbenchPage;
+
+/**
+ * <p>
+ * Command handler implementation to record a snapshot.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class SnaphshotHandler extends BaseControlViewHandler {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The list of session components the command is to be executed on.
+ */
+ protected List<TraceSessionComponent> fSessions = new ArrayList<>();
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ fLock.lock();
+ try {
+ // Make a copy for thread safety
+ final List<TraceSessionComponent> sessions = new ArrayList<>();
+ sessions.addAll(fSessions);
+
+ Job job = new Job(Messages.TraceControl_RecordSnapshotJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, IStatus.OK, null, null);
+ for (Iterator<TraceSessionComponent> iterator = sessions.iterator(); iterator.hasNext();) {
+ try {
+ // record snapshot for all selected sessions sequentially
+ TraceSessionComponent session = iterator.next();
+ session.recordSnapshot(monitor);
+ if (monitor.isCanceled()) {
+ status.add(Status.CANCEL_STATUS);
+ break;
+ }
+ } catch (ExecutionException e) {
+ status.add(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_RecordSnapshotFailure, e));
+ }
+ }
+ return status;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ } finally {
+ fLock.unlock();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isEnabled() {
+ // Get workbench page for the Control View
+ IWorkbenchPage page = getWorkbenchPage();
+ if (page == null) {
+ return false;
+ }
+
+ List<TraceSessionComponent> sessions = new ArrayList<>(0);
+
+ // Check if one session is selected
+ ISelection selection = page.getSelection(ControlView.ID);
+ if (selection instanceof StructuredSelection) {
+ StructuredSelection structered = ((StructuredSelection) selection);
+ for (Iterator<?> iterator = structered.iterator(); iterator.hasNext();) {
+ Object element = iterator.next();
+ if (element instanceof TraceSessionComponent) {
+ // Add only if corresponding TraceSessionComponent is an active snapshot session and not destroyed
+ TraceSessionComponent session = (TraceSessionComponent) element;
+ if(session.isSnapshotSession() &&
+ session.getSessionState() == TraceSessionState.ACTIVE &&
+ !session.isDestroyed()) {
+ sessions.add(session);
+ }
+ }
+ }
+ }
+ boolean isEnabled = !sessions.isEmpty();
+ fLock.lock();
+ try {
+ fSessions = null;
+ if (isEnabled) {
+ fSessions = sessions;
+ }
+ } finally {
+ fLock.unlock();
+ }
+ return isEnabled;
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * <p>
+ * Command handler implementation to start one or more trace sessions.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class StartHandler extends ChangeSessionStateHandler {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public TraceSessionState getNewState() {
+ return TraceSessionState.ACTIVE;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
+ session.startSession(monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+
+/**
+ * <p>
+ * Command handler implementation to stop one or more trace sessions.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class StopHandler extends ChangeSessionStateHandler {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public TraceSessionState getNewState() {
+ return TraceSessionState.INACTIVE;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void changeState(TraceSessionComponent session, IProgressMonitor monitor) throws ExecutionException {
+ session.stopSession(monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte - Initial implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceMI;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+/**
+ * <p>
+ * Error handler for xml xsd validation while using machine interface mode
+ * in {@link LTTngControlServiceMI}.
+ * </p>
+ *
+ * @author Jonathan Rajotte
+ */
+public class XmlMiValidationErrorHandler implements ErrorHandler {
+
+ @Override
+ public void error(SAXParseException e) throws SAXException {
+ Activator.getDefault().logError(Messages.TraceControl_XmlValidationError, e);
+ throw new SAXException(Messages.TraceControl_XmlValidationError, e);
+ }
+
+ @Override
+ public void fatalError(SAXParseException e) throws SAXException {
+ Activator.getDefault().logError(Messages.TraceControl_XmlValidationError, e);
+ throw new SAXException(Messages.TraceControl_XmlValidationError, e);
+ }
+
+ @Override
+ public void warning(SAXParseException e) throws SAXException {
+ Activator.getDefault().logWarning(Messages.TraceControl_XmlValidationWarning, e);
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging;
+
+import java.io.BufferedWriter;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+
+/**
+ * <p>
+ * Class to log control commands.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+final public class ControlCommandLogger {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The bufferd writer reference
+ */
+ private static BufferedWriter fTraceLog = null;
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+ private ControlCommandLogger() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Initializes the logger class and opens the log file with the given parameter.
+ * @param filename - file name of logger output
+ * @param append - true to open log file in append mode else false (overwrite)
+ */
+ public static void init(String filename, boolean append) {
+ if (fTraceLog != null) {
+ close();
+ }
+ fTraceLog = openLogFile(filename, append);
+ }
+
+ /**
+ * Closes the log file if open.
+ */
+ public static void close() {
+ if (fTraceLog == null) {
+ return;
+ }
+
+ try {
+ fTraceLog.close();
+ fTraceLog = null;
+ } catch (IOException e) {
+ Activator.getDefault().logWarning("Can't close log file of the trace control", e); //$NON-NLS-1$
+ }
+ }
+
+ /**
+ * Logs a message to the log file.
+ * @param msg - message (e.g. command or command result) to log
+ */
+ @SuppressWarnings("nls")
+ public static void log(String msg) {
+ long currentTime = System.currentTimeMillis();
+ StringBuilder message = new StringBuilder("[");
+ message.append(currentTime / 1000);
+ message.append(".");
+ message.append(String.format("%1$03d", currentTime % 1000));
+ message.append("] ");
+ message.append(msg);
+ if (fTraceLog != null) {
+ try {
+ fTraceLog.write(message.toString());
+ fTraceLog.newLine();
+ fTraceLog.flush();
+ } catch (IOException e) {
+ Activator.getDefault().logError("Can't log message in log file of the tracer control", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+ /**
+ * Opens the trace log file with given name in the workspace root directory
+ * @param filename - file name of logger output
+ * @param append - true to open log file in append mode else false (overwrite)
+ * @return the buffer writer class or null if not successful
+ */
+ private static BufferedWriter openLogFile(String filename, boolean append) {
+ BufferedWriter outfile = null;
+ try {
+ outfile = new BufferedWriter(new FileWriter(filename, append));
+ } catch (IOException e) {
+ Activator.getDefault().logError("Can't open log file for logging of tracer control commands: " + filename, e); //$NON-NLS-1$
+ }
+ return outfile;
+ }
+}
+
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Jonathan Rajotte - Updated for basic support of LTTng 2.6 machine interface
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages file for the trace control package.
+ *
+ * @author Bernd Hufmann
+ */
+@SuppressWarnings("javadoc")
+public final class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.messages"; //$NON-NLS-1$
+
+ public static String EnableChannelDialog_DefaultMessage;
+
+ public static String ImportHandler_LiveTraceElementError;
+
+ public static String ImportHandler_LiveTraceInitError;
+
+ // Failures
+ public static String TraceControl_ConnectionFailure;
+ public static String TraceControl_DisconnectionFailure;
+ public static String TraceControl_ExecutionCancelled;
+ public static String TraceControl_ExecutionFailure;
+ public static String TraceControl_ExecutionTimeout;
+ public static String TraceControl_ShellNotConnected;
+
+ public static String TraceControl_CommandShellError;
+ public static String TraceControl_CommandError;
+ public static String TraceControl_UnexpectedCommandOutputFormat;
+ public static String TraceControl_UnexpectedNameError;
+ public static String TraceControl_UnexpectedPathError;
+ public static String TraceControl_UnexpectedNumberOfElementError;
+ public static String TraceControl_UnexpectedValueError;
+
+ public static String TraceControl_UnsupportedVersionError;
+ public static String TraceControl_GettingVersionError;
+
+ // Xml parsing related failures
+ public static String TraceControl_InvalidSchemaError;
+ public static String TraceControl_XmlDocumentBuilderError;
+ public static String TraceControl_XmlParsingError;
+ public static String TraceControl_XmlValidationError;
+ public static String TraceControl_XmlValidationWarning;
+
+ // Xml machine interface failures
+ public static String TraceControl_MiInvalidNumberOfElementError;
+ public static String TraceControl_MiInvalidProviderError;
+ public static String TraceControl_MiMissingRequiredError;
+ public static String TraceControl_MiInvalidElementError;
+ public static String TraceControl_MiIllegalValueError;
+
+ // Commands
+ public static String TraceControl_ErrorTitle;
+ public static String TraceControl_RetrieveNodeConfigurationJob;
+ public static String TraceControl_RetrieveNodeConfigurationFailure;
+ public static String TraceControl_ListSessionFailure;
+ public static String TraceControl_EclipseCommandFailure;
+ public static String TraceControl_NewNodeCreationFailure;
+ public static String TraceControl_CreateSessionJob;
+ public static String TraceControl_CreateSessionFailure;
+
+ public static String TraceControl_DestroySessionJob;
+ public static String TraceControl_DestroySessionFailure;
+ public static String TraceControl_DestroyConfirmationTitle;
+ public static String TraceControl_DestroyConfirmationMessage;
+
+ public static String TraceControl_ImportJob;
+ public static String TraceControl_DownloadTask;
+ public static String TraceControl_ImportFailure;
+
+ public static String TraceControl_ChangeSessionStateJob;
+ public static String TraceControl_ChangeSessionStateFailure;
+
+ public static String TraceControl_CreateChannelStateJob;
+ public static String TraceControl_CreateChannelStateFailure;
+
+ public static String TraceControl_ChangeChannelStateJob;
+ public static String TraceControl_ChangeChannelStateFailure;
+ public static String TraceControl_ChangeEventStateJob;
+ public static String TraceControl_ChangeEventStateFailure;
+
+ public static String TraceControl_EnableEventsJob;
+ public static String TraceControl_EnableEventsFailure;
+ public static String TraceControl_DisableEventsJob;
+
+ public static String TraceControl_GetContextJob;
+ public static String TraceControl_GetContextFailure;
+
+ public static String TraceControl_AddContextJob;
+ public static String TraceControl_AddContextFailure;
+
+ public static String TraceControl_AddCalibrateJob;
+ public static String TraceControl_AddCalibrateFailure;
+
+ public static String TraceControl_RecordSnapshotJob;
+ public static String TraceControl_RecordSnapshotFailure;
+
+ // Dialogs
+ public static String TraceControl_NewDialogTitle;
+ public static String TraceControl_NewNodeExistingConnectionGroupName;
+ public static String TraceControl_NewNodeEditButtonName;
+ public static String TraceControl_NewNodeComboToolTip;
+ public static String TraceControl_NewNodeConnectionNameLabel;
+ public static String TraceControl_NewNodeConnectionNameTooltip;
+ public static String TraceControl_NewNodeHostNameLabel;
+ public static String TraceControl_NewNodeHostNameTooltip;
+ public static String TraceControl_NewNodePortLabel;
+ public static String TraceControl_NewNodePortTooltip;
+ public static String TraceControl_AlreadyExistsError;
+
+ public static String TraceControl_CreateSessionDialogTitle;
+ public static String TraceControl_CreateSessionDialogMessage;
+ public static String TraceControl_CreateSessionNameLabel;
+ public static String TraceControl_CreateSessionNameTooltip;
+ public static String TraceControl_CreateSessionPathLabel;
+ public static String TraceControl_CreateSessionPathTooltip;
+ public static String TraceControl_CreateSessionNormalLabel;
+ public static String TraceControl_CreateSessionNormalTooltip;
+ public static String TraceControl_CreateSessionSnapshotLabel;
+ public static String TraceControl_CreateSessionSnapshotTooltip;
+ public static String TraceControl_CreateSessionLiveLabel;
+ public static String TraceControl_CreateSessionLiveTooltip;
+
+ public static String TraceControl_CreateSessionConfigureStreamingButtonText;
+ public static String TraceControl_CreateSessionConfigureStreamingButtonTooltip;
+ public static String TraceControl_CreateSessionNoStreamingButtonText;
+ public static String TraceControl_CreateSessionNoStreamingButtonTooltip;
+ public static String TraceControl_CreateSessionTracePathText;
+ public static String TraceControl_CreateSessionTracePathTooltip;
+ public static String TraceControl_CreateSessionLinkButtonText;
+ public static String TraceControl_CreateSessionLinkButtonTooltip;
+ public static String TraceControl_CreateSessionProtocolLabelText;
+ public static String TraceControl_CreateSessionAddressLabelText;
+ public static String TraceControl_CreateSessionPortLabelText;
+ public static String TraceControl_CreateSessionControlUrlLabel;
+ public static String TraceControl_CreateSessionDataUrlLabel;
+ public static String TraceControl_CreateSessionCommonProtocolTooltip;
+ public static String TraceControl_CreateSessionControlAddressTooltip;
+ public static String TraceControl_CreateSessionControlPortTooltip;
+ public static String TraceControl_CreateSessionProtocolTooltip;
+ public static String TraceControl_CreateSessionDataAddressTooltip;
+ public static String TraceControl_CreateSessionDataPortTooltip;
+ public static String TraceControl_CreateSessionNoConsumertText;
+ public static String TraceControl_CreateSessionNoConsumertTooltip;
+ public static String TraceControl_CreateSessionDisableConsumertText;
+ public static String TraceControl_CreateSessionDisableConsumertTooltip;
+ public static String TraceControl_CreateSessionLiveConnectionLabel;
+ public static String TraceControl_CreateSessionLiveConnectionUrlTooltip;
+ public static String TraceControl_CreateSessionLiveConnectionPortTooltip;
+ public static String TraceControl_CreateSessionLiveDelayLabel;
+ public static String TraceControl_CreateSessionLiveDelayTooltip;
+
+ public static String TraceControl_InvalidSessionNameError;
+ public static String TraceControl_SessionAlreadyExistsError;
+ public static String TraceControl_SessionPathAlreadyExistsError;
+ public static String TraceControl_InvalidSessionPathError;
+ public static String TraceControl_InvalidLiveDelayError;
+ public static String TraceControl_FileSubSystemError;
+
+ public static String TraceControl_EnableChannelDialogTitle;
+ public static String TraceControl_EnableChannelNameLabel;
+ public static String TraceControl_EnableChannelNameTooltip;
+ public static String TraceControl_EnableChannelSubBufferSizeTooltip;
+ public static String TraceControl_EnableChannelNbSubBuffersTooltip;
+ public static String TraceControl_EnableChannelSwitchTimerTooltip;
+ public static String TraceControl_EnableChannelReadTimerTooltip;
+ public static String TraceControl_EnableChannelOutputTypeTooltip;
+ public static String TraceControl_EnableChannelDiscardModeGroupName;
+ public static String TraceControl_EnableChannelDiscardModeLabel;
+ public static String TraceControl_EnableChannelDiscardModeTooltip;
+ public static String TraceControl_EnableChannelOverwriteModeLabel;
+ public static String TraceControl_EnableChannelOverwriteModeTooltip;
+ public static String TraceControl_EnbleChannelMaxSizeTraceFilesTooltip;
+ public static String TraceControl_EnbleChannelMaxNumTraceFilesTooltip;
+
+ public static String TraceControl_InvalidChannelNameError;
+ public static String TraceControl_ChannelAlreadyExistsError;
+
+ public static String TraceControl_EnableEventsDialogTitle;
+ public static String TraceControl_EnableEventsSessionGroupName;
+ public static String TraceControl_EnableEventsChannelGroupName;
+ public static String TraceControl_EnableEventsSessionsTooltip;
+ public static String TraceControl_EnableEventsChannelsTooltip;
+ public static String TraceControl_EnableEventsNoSessionError;
+ public static String TraceControl_EnableEventsNoChannelError;
+
+ public static String TraceControl_EnableGroupSelectionName;
+ public static String TraceControl_EnableEventsTracepointGroupName;
+ public static String TraceControl_EnableEventsTracepointTreeTooltip;
+ public static String TraceControl_EnableEventsTracepointTreeAllLabel;
+ public static String TraceControl_EnableEventsSyscallName;
+ public static String TraceControl_EnableEventsSyscallTooltip;
+ public static String TraceControl_EnableEventsProbeGroupName;
+ public static String TraceControl_EnableEventsEventNameLabel;
+ public static String TraceControl_EnableEventsProbeEventNameTooltip;
+ public static String TraceControl_EnableEventsProbeNameLabel;
+ public static String TraceControl_EnableEventsProbeNameTooltip;
+ public static String TraceControl_EnableEventsFucntionGroupName;
+ public static String TraceControl_EnableEventsFunctionEventNameTooltip;
+ public static String TraceControl_EnableEventsFunctionNameLabel;
+
+ public static String TraceControl_EnableEventsWildcardGroupName;
+ public static String TraceControl_EnableEventsWildcardLabel;
+ public static String TraceControl_EnableEventsWildcardTooltip;
+ public static String TraceControl_EnableEventsLogLevelGroupName;
+ public static String TraceControl_EnableEventsLogLevelTypeName;
+ public static String TraceControl_EnableEventsLogLevelTypeTooltip;
+ public static String TraceControl_EnableEventsLogLevelOnlyTypeName;
+ public static String TraceControl_EnableEventsLogLevelOnlyTypeTooltip;
+ public static String TraceControl_EnableEventsLogLevelTooltip;
+ public static String TraceControl_EnableEventsLoglevelEventNameTooltip;
+ public static String TraceControl_EnableEventsFilterGroupName;
+ public static String TraceControl_EnableEventsFilterTooltip;
+
+ public static String TraceControl_InvalidProbeNameError;
+ public static String TraceControl_InvalidWildcardError;
+ public static String TraceControl_InvalidLogLevelEventNameError;
+ public static String TraceControl_InvalidLogLevel;
+
+ public static String TraceControl_AddContextDialogTitle;
+ public static String TraceControl_AddContextAvailableContextsLabel;
+ public static String TraceControl_AddContextAvailableContextsTooltip;
+ public static String TraceControl_AddContextAllLabel;
+
+ public static String TraceControl_ImportDialogStreamedTraceNotification;
+ public static String TraceControl_ImportDialogStreamedTraceNotificationToggle;
+ public static String TraceControl_ImportDialogTitle;
+ public static String TraceControl_ImportDialogTracesGroupName;
+ public static String TraceControl_ImportDialogTracesTooltip;
+ public static String TraceControl_ImportDialogProjectsGroupName;
+ public static String TraceControl_ImportDialogProjectsTooltip;
+ public static String TraceControl_ImportDialogOverwriteButtonText;
+ public static String TraceControl_ImportDialogCreationError;
+ public static String TraceControl_ImportDialogNoProjectSelectedError;
+ public static String TraceControl_ImportDialogInvalidTracingProject;
+ public static String TraceControl_ImportDialogNoTraceSelectedError;
+ public static String TraceControl_ImportDialog_SelectAll;
+ public static String TraceControl_ImportDialog_DeselectAll;
+
+ public static String TraceControl_ImportDialogConfirmationTitle;
+ public static String TraceControl_ImportDialogConfirmationOverwriteLabel;
+ public static String TraceControl_ImportDialogConfirmationRenameLabel;
+ public static String TraceControl_ImportDialogConfirmationNewNameLabel;
+ public static String TraceControl_InvalidTraceNameError;
+ public static String TraceControl_ImportDialogTraceAlreadyExistError;
+
+ // Tree structure strings
+ public static String TraceControl_KernelDomainDisplayName;
+ public static String TraceControl_UstDisplayName;
+ public static String TraceControl_UstGlobalDomainDisplayName;
+ public static String TraceControl_UnknownDomainDisplayName;
+ public static String TraceControl_JULDomainDisplayName;
+ public static String TraceControl_AllSessionsDisplayName;
+ public static String TraceControl_SessionDisplayName;
+ public static String TraceControl_DomainDisplayName;
+ public static String TraceControl_BufferTypeDisplayName;
+ public static String TraceControl_ChannelDisplayName;
+ public static String TraceControl_EventDisplayName;
+ public static String TraceControl_ProviderDisplayName;
+ public static String TraceControl_KernelProviderDisplayName;
+ public static String TraceControl_SharedBuffersDisplayName;
+ public static String TraceControl_PerPidBuffersDisplayName;
+ public static String TraceControl_PerPidBuffersTooltip;
+ public static String TraceControl_PerUidBuffersDisplayName;
+ public static String TraceControl_PerUidBuffersTooltip;
+
+ // Property names
+ public static String TraceControl_SessionNamePropertyName;
+ public static String TraceControl_EventNamePropertyName;
+ public static String TraceControl_EventTypePropertyName;
+ public static String TraceControl_LogLevelPropertyName;
+ public static String TraceControl_FieldsPropertyName;
+ public static String TraceControl_FilterPropertyName;
+ public static String TraceControl_StatePropertyName;
+ public static String TraceControl_VersionPropertyName;
+ public static String TraceControl_DomainNamePropertyName;
+ public static String TraceControl_BufferTypePropertyName;
+ public static String TraceControl_ChannelNamePropertyName;
+ public static String TraceControl_OverwriteModePropertyName;
+ public static String TraceControl_SubBufferSizePropertyName;
+ public static String TraceControl_NbSubBuffersPropertyName;
+ public static String TraceControl_SwitchTimerPropertyName;
+ public static String TraceControl_ReadTimerPropertyName;
+ public static String TraceControl_OutputTypePropertyName;
+ public static String TraceControl_HostNamePropertyName;
+ public static String TraceControl_HostAddressPropertyName;
+ public static String TraceControl_SessionPathPropertyName;
+ public static String TraceControl_SnapshotPathPropertyName;
+ public static String TraceControl_SnapshotNamePropertyName;
+ public static String TraceControl_SnapshotIdPropertyName;
+ public static String TraceControl_ProviderNamePropertyName;
+ public static String TraceControl_ProcessIdPropertyName;
+ public static String TraceControl_ProbeAddressPropertyName;
+ public static String TraceControl_ProbeOffsetPropertyName;
+ public static String TraceControl_ProbeSymbolPropertyName;
+ public static String TraceControl_MaxSizeTraceFilesPropertyName;
+ public static String TraceControl_MaxNumTraceFilesPropertyName;
+ public static String TraceControl_ConfigureMetadataChannelName;
+
+ // Preferences
+ public static String TraceControl_TracingGroupPreference;
+ public static String TraceControl_LoggingPreference;
+ public static String TraceControl_LogfilePath;
+ public static String TraceControl_AppendLogfilePreference;
+ public static String TraceControl_CommandTimeout;
+
+ public static String TraceControl_VerboseLevelsPreference;
+ public static String TraceControl_VerboseLevelNonePreference;
+ public static String TraceControl_VerboseLevelVerbosePreference;
+ public static String TraceControl_VerboseLevelVeryVerbosePreference;
+ public static String TraceControl_VerboseLevelVeryVeryVerbosePreference;
+
+ public static String TraceControl_ExecuteScriptJob;
+ public static String TraceControl_ExecuteScriptError;
+
+ public static String TraceControl_ExecuteScriptDialogTitle;
+ public static String TraceControl_ExecuteScriptBrowseText;
+ public static String TraceControl_ExecuteScriptSelectLabel;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2012, 2014 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:
+# Bernd Hufmann - initial API and implementation
+# Jonathan Rajotte - updated for basic support of LTTng 2.6 machine interface
+###############################################################################
+
+EnableChannelDialog_DefaultMessage=Default
+ImportHandler_LiveTraceElementError=Could not find trace element
+ImportHandler_LiveTraceInitError=Error initializing live trace.
+TraceControl_ConnectionFailure=Connecting to host failed
+TraceControl_DisconnectionFailure=Disconnection from host failed
+TraceControl_ExecutionCancelled=Command Execution cancelled
+TraceControl_ExecutionFailure=Command Execution failed
+TraceControl_ExecutionTimeout=Command Execution timed-out
+TraceControl_ShellNotConnected=Command shell not connected
+TraceControl_CommandShellError=Could not create HostShellProcessAdapter
+TraceControl_CommandError=Command failed! Command:
+TraceControl_UnexpectedCommandOutputFormat=Unexpected command output
+TraceControl_UnexpectedNameError=Unexpected session name returned
+TraceControl_UnexpectedPathError=Unexpected session path returned
+TraceControl_UnexpectedNumberOfElementError=Unexpected number of elements {0} returned
+TraceControl_UnexpectedValueError=Unexpected value. Returned {0} Expected: {1}
+
+TraceControl_UnsupportedVersionError=Unsupported LTTng Tracer Control version
+TraceControl_GettingVersionError=Could not get version of LTTng Tracer Control
+
+# Xml parsing related failures
+TraceControl_InvalidSchemaError=Could not open/validate xsd Schema
+TraceControl_XmlDocumentBuilderError=Unable to create the xml document builder
+TraceControl_XmlParsingError=Unable to parse the xml document
+TraceControl_XmlValidationError=Could not validate the xml response
+TraceControl_XmlValidationWarning=Xml validation warning
+
+# Xml machine interface failures
+TraceControl_MiInvalidNumberOfElementError=Invalid number of element
+TraceControl_MiInvalidProviderError=Invalid provider data
+TraceControl_MiMissingRequiredError=Missing required data
+TraceControl_MiIllegalValueError=Invalid value
+
+# Commands
+TraceControl_MiInvalidElementError=Invalid xml data
+
+TraceControl_ErrorTitle=Error
+TraceControl_ListSessionFailure=List sessions failed
+TraceControl_RetrieveNodeConfigurationJob=Retrieving Target Node Configuration...
+TraceControl_RetrieveNodeConfigurationFailure=Error retrieving node configuration
+TraceControl_EclipseCommandFailure=Command failed
+TraceControl_NewNodeCreationFailure=Creation of new connection failed
+TraceControl_CreateSessionJob=Creating Session...
+TraceControl_CreateSessionFailure=Command to create session failed
+
+TraceControl_DestroySessionJob=Destroying Session...
+TraceControl_DestroySessionFailure=Command to destroy session failed
+TraceControl_DestroyConfirmationTitle=Destroy Confirmation
+TraceControl_DestroyConfirmationMessage=Do you want to delete all selected sessions?
+
+TraceControl_ImportJob=Importing Traces...
+TraceControl_DownloadTask=Downloading
+TraceControl_ImportFailure=Command to import traces failed
+
+TraceControl_ChangeSessionStateJob=Changing Session State...
+TraceControl_ChangeSessionStateFailure=Command to change session state failed...
+
+TraceControl_CreateChannelStateJob=Enabling (creating) channel...
+TraceControl_CreateChannelStateFailure=Command to enable channel failed
+
+TraceControl_ChangeChannelStateJob=Changing State of Channels...
+TraceControl_ChangeChannelStateFailure=Command to change state of channels failed
+TraceControl_ChangeEventStateJob=Changing State of Events...
+TraceControl_ChangeEventStateFailure=Command to change state of events failed
+
+TraceControl_EnableEventsJob=Enabling Events...
+TraceControl_EnableEventsFailure=Command to enable events failed
+TraceControl_DisableEventsJob=Disabling Events...
+
+TraceControl_GetContextJob=Getting Available Contexts...
+TraceControl_GetContextFailure=Command to get available contexts failed
+
+TraceControl_AddContextJob=Adding Contexts...
+TraceControl_AddContextFailure=Command to add contexts failed
+
+TraceControl_AddCalibrateJob=Calibrating...
+TraceControl_AddCalibrateFailure=Command to calibrate failed
+
+TraceControl_RecordSnapshotJob=Record snapshot...
+TraceControl_RecordSnapshotFailure=Command to snapshot record failed
+
+# Dialogs
+TraceControl_NewDialogTitle=New Connection
+TraceControl_NewNodeExistingConnectionGroupName=Existing Connections
+TraceControl_NewNodeEditButtonName=Edit connection information
+TraceControl_NewNodeComboToolTip=List of existing connections (connection name - host name)
+TraceControl_NewNodeConnectionNameLabel=Connection Name
+TraceControl_NewNodeConnectionNameTooltip=Alias to be displayed for node to connect to.
+TraceControl_NewNodeHostNameLabel=Host Name
+TraceControl_NewNodeHostNameTooltip=IP Address or DNS name of node to connect to.
+TraceControl_NewNodePortLabel=Port Number
+TraceControl_NewNodePortTooltip=IP Port Number to be used for the connection. Leave empty for default port.
+TraceControl_AlreadyExistsError=Node name already exists in Control View
+
+TraceControl_CreateSessionDialogTitle=Create Session
+TraceControl_CreateSessionDialogMessage=Configure the new tracing session
+TraceControl_CreateSessionNameLabel=Session Name
+TraceControl_CreateSessionNameTooltip=The name of the session to be created.
+TraceControl_CreateSessionPathLabel=Session Path
+TraceControl_CreateSessionPathTooltip=The session path (keep empty for default location)
+TraceControl_CreateSessionNormalLabel=Normal Mode
+TraceControl_CreateSessionNormalTooltip=Configure session in normal mode
+TraceControl_CreateSessionSnapshotLabel=Snapshot Mode
+TraceControl_CreateSessionSnapshotTooltip=Configure session in snapshot mode
+TraceControl_CreateSessionLiveLabel=Live Mode
+TraceControl_CreateSessionLiveTooltip=Configure session in live mode
+
+
+TraceControl_CreateSessionConfigureStreamingButtonText=Advanced
+TraceControl_CreateSessionConfigureStreamingButtonTooltip=Configure advanced options
+TraceControl_CreateSessionNoStreamingButtonText=Basic
+TraceControl_CreateSessionNoStreamingButtonTooltip=Use basic options
+TraceControl_CreateSessionTracePathText=Trace Path
+TraceControl_CreateSessionTracePathTooltip=The trace path (keep empty for default location)
+TraceControl_CreateSessionLinkButtonText=Use same protocol and address for data and control
+TraceControl_CreateSessionLinkButtonTooltip=Use the same protocol and address for the data and control connection
+TraceControl_CreateSessionProtocolLabelText=Protocol
+TraceControl_CreateSessionAddressLabelText=Address
+TraceControl_CreateSessionPortLabelText=Port
+TraceControl_CreateSessionControlUrlLabel=Control URL
+TraceControl_CreateSessionDataUrlLabel=Data URL
+TraceControl_CreateSessionCommonProtocolTooltip=file - Local file system full path\n\
+net or net6 - Default network transport layer which is TCP for both control and data channel.
+TraceControl_CreateSessionControlAddressTooltip=IP Address or DNS name used for control channel.\n\
+NOTE: IPv6 address MUST be enclosed in brackets '[]' (rfc2732)
+TraceControl_CreateSessionControlPortTooltip=The control port (default: 5342).
+TraceControl_CreateSessionProtocolTooltip=file - Local file system full path\n\
+net or net6 - Default network transport layer which is TCP\n\
+tcp or tcp6 - TCP network transport
+TraceControl_CreateSessionDataAddressTooltip=IP Address or DNS name used for data channel.\n\
+NOTE: IPv6 address MUST be enclosed in brackets '[]' (rfc2732)
+TraceControl_CreateSessionDataPortTooltip=The data port (default: 5343).
+TraceControl_CreateSessionNoConsumertText=No Consumer
+TraceControl_CreateSessionNoConsumertTooltip=Don't activate a consumer for this session.
+TraceControl_CreateSessionDisableConsumertText=Disable Consumer
+TraceControl_CreateSessionDisableConsumertTooltip=Disable consumer for this session.
+TraceControl_CreateSessionLiveConnectionLabel=Live Connection
+TraceControl_CreateSessionLiveDelayLabel=Live Delay
+TraceControl_CreateSessionLiveDelayTooltip=The delay in micro seconds before the data is flushed and streamed
+TraceControl_CreateSessionLiveConnectionUrlTooltip=The URL for the live connection (Relayd)
+TraceControl_CreateSessionLiveConnectionPortTooltip=The port for the live connection (Relayd)
+
+TraceControl_InvalidSessionNameError=The session name is invalid
+TraceControl_SessionAlreadyExistsError=The session name already exists
+TraceControl_SessionPathAlreadyExistsError=Session path already exists
+TraceControl_InvalidSessionPathError=The session path is invalid
+TraceControl_InvalidLiveDelayError=Live Delay must be a valid positive number
+TraceControl_FileSubSystemError=File subsystem error in session creation dialog.
+
+TraceControl_EnableChannelDialogTitle=Enable Channel
+TraceControl_EnableChannelNameLabel=Channel Name
+TraceControl_EnableChannelNameTooltip=The name of the channel to be enabled.
+TraceControl_EnableChannelSubBufferSizeTooltip=The sub-buffers size of the channel. Needs to be a power of 2 for kernel and ust tracers (Only for versions prior to 2.2.0).
+TraceControl_EnableChannelNbSubBuffersTooltip=The number of sub-buffers of the channel. Needs to be a power of 2 for kernel and ust tracers (Only for versions prior to 2.2.0).
+TraceControl_EnableChannelSwitchTimerTooltip=The Switch subbuffer timer interval in usec (default: 0). Needs to be a power of 2 for kernel and ust tracers (Only for versions prior to 2.2.0).
+TraceControl_EnableChannelReadTimerTooltip=The Read timer interval in usec.
+TraceControl_EnableChannelOutputTypeTooltip=The output type of the channel.
+TraceControl_EnableChannelDiscardModeGroupName=Discard Mode
+TraceControl_EnableChannelDiscardModeLabel=Discard
+TraceControl_EnableChannelDiscardModeTooltip=Discard event when subbuffers are full
+TraceControl_EnableChannelOverwriteModeLabel=Overwrite
+TraceControl_EnableChannelOverwriteModeTooltip=Flight recorder mode : overwrites events when subbuffers are full
+TraceControl_EnbleChannelMaxSizeTraceFilesTooltip=Maximum size of each tracefile within a stream (in bytes). 0 means unlimited
+TraceControl_EnbleChannelMaxNumTraceFilesTooltip=Used in conjunction with the maximum size of trace files option, this will limit the number of files created to the specified count. 0 means unlimited
+
+TraceControl_InvalidChannelNameError=The channel name is invalid or empty
+TraceControl_ChannelAlreadyExistsError=Channel already exists
+
+TraceControl_EnableEventsDialogTitle=Enable Events
+TraceControl_EnableEventsSessionGroupName=Session List
+TraceControl_EnableEventsChannelGroupName=Channel List
+TraceControl_EnableEventsSessionsTooltip=List of available sessions.
+TraceControl_EnableEventsChannelsTooltip=List of available channels of selected session.\nIf no channel is available default channel will be created.
+TraceControl_EnableEventsNoSessionError=No session from session list is selected.
+TraceControl_EnableEventsNoChannelError=No channel from channel list is selected.
+
+TraceControl_EnableGroupSelectionName=Select
+TraceControl_EnableEventsTracepointGroupName=Tracepoint Events
+TraceControl_EnableEventsTracepointTreeTooltip=List of available kernel tracepoint events
+TraceControl_EnableEventsTracepointTreeAllLabel=All
+TraceControl_EnableEventsSyscallName=All Syscalls
+TraceControl_EnableEventsSyscallTooltip=Enable all Syscalls
+TraceControl_EnableEventsProbeGroupName=Dynamic Probe
+TraceControl_EnableEventsEventNameLabel=Event Name
+TraceControl_EnableEventsProbeEventNameTooltip=The name of the event for enabling a dynamic probe
+TraceControl_EnableEventsProbeNameLabel=Probe
+TraceControl_EnableEventsProbeNameTooltip=[addr | symbol | symbol+offset]\nAddr and offset can be octal (0NNN...),\ndecimal (NNN...) or hexadecimal (0xNNN...)
+TraceControl_EnableEventsFucntionGroupName=Dynamic Function Entry/Return Probe
+TraceControl_EnableEventsFunctionEventNameTooltip=The name of the event for enabling a dynamic function entry/return probe
+TraceControl_EnableEventsFunctionNameLabel=Function
+
+TraceControl_EnableEventsWildcardGroupName=Wildcard
+TraceControl_EnableEventsWildcardLabel=Wildcard
+TraceControl_EnableEventsWildcardTooltip=The wild card string of event names
+TraceControl_EnableEventsLogLevelGroupName=Log Level
+TraceControl_EnableEventsLogLevelTypeName=loglevel
+TraceControl_EnableEventsLogLevelTypeTooltip=The tracepoint log level range from 0 to loglevel
+TraceControl_EnableEventsLogLevelOnlyTypeName=loglevel-only
+TraceControl_EnableEventsLogLevelOnlyTypeTooltip=The tracepoint log level (only this loglevel)
+TraceControl_EnableEventsLogLevelTooltip=The available log levels
+TraceControl_EnableEventsLoglevelEventNameTooltip=Event name for enabling log levels
+TraceControl_EnableEventsFilterGroupName=Filter Expression
+TraceControl_EnableEventsFilterTooltip=Filter expression on event field.
+
+TraceControl_InvalidProbeNameError=The probe name is invalid or empty
+TraceControl_InvalidWildcardError=The wild card name is invalid or empty
+TraceControl_InvalidLogLevelEventNameError=The event name for log level is invalid or empty
+TraceControl_InvalidLogLevel=No log level selected
+
+TraceControl_AddContextDialogTitle=Add Contexts
+TraceControl_AddContextAvailableContextsLabel=Contexts
+TraceControl_AddContextAvailableContextsTooltip=Available Contexts
+TraceControl_AddContextAllLabel=All Contexts
+
+TraceControl_ImportDialogStreamedTraceNotification=You are importing a trace generated by a streamed session. By default the traces will be outputed to ~/lttng-traces/hostname/sessionname but the location can vary.
+TraceControl_ImportDialogStreamedTraceNotificationToggle=Do not warn me again
+TraceControl_ImportDialogTitle=Import Traces
+TraceControl_ImportDialogTracesGroupName=Available Traces
+TraceControl_ImportDialogTracesTooltip=The available traces of current session to import
+TraceControl_ImportDialogProjectsGroupName=Available Projects
+TraceControl_ImportDialogProjectsTooltip=The available projects to select from
+TraceControl_ImportDialogOverwriteButtonText=Overwrite existing trace without warning
+TraceControl_ImportDialogCreationError=Dialog box cannot be created
+TraceControl_ImportDialogNoProjectSelectedError=No tracing project selected or available
+TraceControl_ImportDialogInvalidTracingProject=Invalid tracing project. Missing directory
+TraceControl_ImportDialogNoTraceSelectedError=No trace selected or available
+
+TraceControl_ImportDialogConfirmationTitle=Import Confirmation Dialog
+TraceControl_ImportDialogConfirmationOverwriteLabel=Overwrite
+TraceControl_ImportDialogConfirmationRenameLabel=Rename
+TraceControl_ImportDialogConfirmationNewNameLabel=New Trace Name
+TraceControl_InvalidTraceNameError=Invalid trace name
+TraceControl_ImportDialogTraceAlreadyExistError=Trace already exists in project
+TraceControl_ImportDialog_SelectAll=Select All
+TraceControl_ImportDialog_DeselectAll=Deselect All
+
+
+# Tree structure strings
+TraceControl_KernelDomainDisplayName=Kernel
+TraceControl_JULDomainDisplayName=JUL
+TraceControl_UstGlobalDomainDisplayName=UST global
+TraceControl_UstDisplayName=UST
+TraceControl_UnknownDomainDisplayName=Unknown domain
+TraceControl_AllSessionsDisplayName=Sessions
+TraceControl_SessionDisplayName=Session
+TraceControl_DomainDisplayName=Domain
+TraceControl_BufferTypeDisplayName = Buffer Type
+TraceControl_ChannelDisplayName=Channel
+TraceControl_EventDisplayName=Event
+TraceControl_ProviderDisplayName=Provider
+TraceControl_KernelProviderDisplayName=Kernel
+TraceControl_SharedBuffersDisplayName=Global shared buffers
+TraceControl_PerPidBuffersDisplayName=Per PID buffers
+TraceControl_PerPidBuffersTooltip=Configure per PID buffers (UST only)
+TraceControl_PerUidBuffersDisplayName=Per UID buffers
+TraceControl_PerUidBuffersTooltip=Configure per UID buffers (UST only)
+
+# Property names
+TraceControl_SessionNamePropertyName=Session Name
+TraceControl_EventNamePropertyName=Event Name
+TraceControl_EventTypePropertyName=Event Type
+TraceControl_LogLevelPropertyName=Log Level
+TraceControl_FieldsPropertyName=Fields
+TraceControl_FilterPropertyName=Filter
+TraceControl_StatePropertyName=State
+TraceControl_VersionPropertyName=Version
+TraceControl_DomainNamePropertyName=Domain Name
+TraceControl_BufferTypePropertyName=Buffer type
+TraceControl_ChannelNamePropertyName=Channel Name
+TraceControl_OverwriteModePropertyName=Overwrite Mode
+TraceControl_SubBufferSizePropertyName=Sub Buffer Size
+TraceControl_NbSubBuffersPropertyName=Number of Sub Buffers
+TraceControl_SwitchTimerPropertyName=Switch Timer Interval
+TraceControl_ReadTimerPropertyName=Read Timer Interval
+TraceControl_OutputTypePropertyName=Output Type
+TraceControl_HostNamePropertyName=Connection Name
+TraceControl_HostAddressPropertyName=Host Name
+TraceControl_SessionPathPropertyName=Session Path
+TraceControl_SnapshotPathPropertyName=Snapshot Path
+TraceControl_SnapshotNamePropertyName=Snapshot Name
+TraceControl_SnapshotIdPropertyName=Snapshot ID
+TraceControl_ProviderNamePropertyName=Provider Name
+TraceControl_ProcessIdPropertyName=Process ID
+TraceControl_ProbeAddressPropertyName=Address
+TraceControl_ProbeOffsetPropertyName=Offset
+TraceControl_ProbeSymbolPropertyName=Symbol
+TraceControl_MaxSizeTraceFilesPropertyName=Maximum size of trace files
+TraceControl_MaxNumTraceFilesPropertyName=Maximum number of trace files
+TraceControl_ConfigureMetadataChannelName=Configure metadata channel
+
+# Preferences
+TraceControl_TracingGroupPreference=&Tracing Group
+TraceControl_LoggingPreference=&Logging
+TraceControl_LogfilePath=Log file
+TraceControl_CommandTimeout=Command Timeout (in seconds)
+TraceControl_AppendLogfilePreference=&Append
+TraceControl_VerboseLevelsPreference=&Verbose Level
+TraceControl_VerboseLevelNonePreference=None
+TraceControl_VerboseLevelVerbosePreference=Level 1
+TraceControl_VerboseLevelVeryVerbosePreference=Level 2
+TraceControl_VerboseLevelVeryVeryVerbosePreference=Level 3
+
+TraceControl_ExecuteScriptJob=Executing command script
+TraceControl_ExecuteScriptError=Error executing command script
+
+TraceControl_ExecuteScriptDialogTitle=Select command script
+TraceControl_ExecuteScriptBrowseText=Browse...
+TraceControl_ExecuteScriptSelectLabel=Select Script
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * <p>
+ * Interface for trace control components that can be displayed in the
+ * trace control tree viewer.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ITraceControlComponent extends IAdaptable {
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return the name of the component
+ */
+ String getName();
+ /**
+ * Sets the name of the component to the given value.
+ * @param name - name to set
+ */
+ void setName(String name);
+
+ /**
+ * @return the image representing the component.
+ */
+ Image getImage();
+ /**
+ * Sets the image path of the component.
+ * @param path - path to the image location
+ */
+ void setImage(String path);
+ /**
+ * Sets the image the component.
+ * @param image - image to the image location
+ */
+ void setImage(Image image);
+
+ /**
+ * @return tool tip with information about the component.
+ */
+ String getToolTip();
+ /**
+ * Sets the tool tip with information about the component.
+ * @param toolTip - the tool tip to set.
+ */
+ void setToolTip(String toolTip);
+
+ /**
+ * @return the node's connection state
+ */
+ TargetNodeState getTargetNodeState();
+ /**
+ * Sets the node's connection state.
+ * @param state - the state to set
+ */
+ void setTargetNodeState(TargetNodeState state);
+
+ /**
+ * @return returns the parent component.
+ */
+ ITraceControlComponent getParent();
+ /**
+ * Sets the parent component.
+ * @param parent - the parent to set.
+ */
+ void setParent(ITraceControlComponent parent);
+
+ /**
+ * @return the children components
+ */
+ ITraceControlComponent[] getChildren();
+ /**
+ * Sets the children components.
+ * @param children - the children to set.
+ */
+ void setChildren(List<ITraceControlComponent> children);
+ /**
+ * Returns the child component with given name.
+ * @param name - name of child to find.
+ * @return child component or null.
+ */
+ ITraceControlComponent getChild(String name);
+ /**
+ * Gets children for given class type.
+ * @param clazz - a class type to get
+ * @return list of trace control components matching given class type.
+ */
+ List<ITraceControlComponent> getChildren(Class<? extends ITraceControlComponent> clazz);
+
+ /**
+ * @return the LTTng control service implementation.
+ */
+ ILttngControlService getControlService();
+
+ /**
+ * Sets the LTTng control service implementation.
+ * @param service - the service to set.
+ */
+ void setControlService(ILttngControlService service);
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Dispose any resource.
+ */
+ void dispose();
+
+ /**
+ * Adds a child component.
+ * @param component - child to add.
+ */
+ void addChild(ITraceControlComponent component);
+
+ /**
+ * Removes the given child component.
+ * @param component - the child to remove.
+ */
+ void removeChild(ITraceControlComponent component);
+
+ /**
+ * Removes all children.
+ */
+ void removeAllChildren();
+
+ /**
+ * Checks if child with given name exists.
+ * @param name - child name to search for.
+ * @return - true if exists else false.
+ */
+ boolean containsChild(String name);
+
+ /**
+ * Checks for children.
+ * @return true if one or more children exist else false
+ */
+ boolean hasChildren();
+
+ /**
+ * Adds a component listener for notification of component changes.
+ * @param listener - listener interface implementation to add.
+ */
+ void addComponentListener(ITraceControlComponentChangedListener listener);
+
+ /**
+ * Removes a component listener for notification of component changes.
+ * @param listener - listener interface implementation to remove.
+ */
+ void removeComponentListener(ITraceControlComponentChangedListener listener);
+
+ /**
+ * Notifies listeners about the addition of a child.
+ * @param parent - the parent where the child was added.
+ * @param component - the child that was added.
+ */
+ void fireComponentAdded(ITraceControlComponent parent, ITraceControlComponent component);
+
+ /**
+ * Notifies listeners about the removal of a child.
+ * @param parent - the parent where the child was removed.
+ * @param component - the child that was removed.
+ */
+ void fireComponentRemoved(ITraceControlComponent parent, ITraceControlComponent component);
+
+ /**
+ * Notifies listeners about the change of a component.
+ * @param component - the component that was changed.
+ */
+ void fireComponentChanged(ITraceControlComponent component);
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model;
+
+/**
+ * <p>
+ * Listener interface a class can implement to be notified about changes
+ * of components
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ITraceControlComponentChangedListener {
+ /**
+ * Interface for notifications about the addition of a component.
+ * @param parent - the parent where the child was added.
+ * @param component - the child that was added.
+ */
+ void componentAdded(ITraceControlComponent parent, ITraceControlComponent component);
+
+ /**
+ * Interface for notifications about the removal of a child.
+ * @param parent - the parent where the child was removed.
+ * @param component - the child that was removed.
+ */
+ void componentRemoved(ITraceControlComponent parent, ITraceControlComponent component);
+ /**
+ * NInterface for notifications about the change of a component.
+ * @param component - the component that was changed.
+ */
+ void componentChanged(ITraceControlComponent component);
+}
+
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.BaseEventPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Implementation of the base trace event component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class BaseEventComponent extends TraceControlComponent {
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component.
+ */
+ public static final String TRACE_EVENT_ICON_FILE_ENABLED = "icons/obj16/event_enabled.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The Event information implementation.
+ */
+ private IBaseEventInfo fEventInfo;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public BaseEventComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_EVENT_ICON_FILE_ENABLED);
+ fEventInfo = new EventInfo(name);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * Sets the event information.
+ * @param eventInfo - the event info to set.
+ */
+ public void setEventInfo(IBaseEventInfo eventInfo) {
+ fEventInfo = eventInfo;
+ }
+
+ /**
+ * @return the event type.
+ */
+ public TraceEventType getEventType() {
+ return fEventInfo.getEventType();
+ }
+
+ /**
+ * Sets the event type to the given value.
+ * @param type - type to set.
+ */
+ public void setEventType(TraceEventType type) {
+ fEventInfo.setEventType(type);
+ }
+
+ /**
+ * Sets the event type to the value specified by the give name.
+ * @param typeName - the type name.
+ */
+ public void setEventType(String typeName) {
+ fEventInfo.setEventType(typeName);
+ }
+
+ /**
+ * @return the trace event log level
+ */
+ public TraceLogLevel getLogLevel() {
+ return fEventInfo.getLogLevel();
+ }
+
+ /**
+ * Sets the trace event log level to the given level
+ * @param level - event log level to set
+ */
+ public void setLogLevel(TraceLogLevel level) {
+ fEventInfo.setLogLevel(level);
+ }
+
+ /**
+ * Sets the trace event log level to the level specified by the given name.
+ * @param levelName - event log level name
+ */
+ public void setLogLevel(String levelName) {
+ fEventInfo.setLogLevel(levelName);
+ }
+
+ /**
+ * @return a String containing pairs if field name and data type
+ */
+ public String getFieldString() {
+ IFieldInfo[] fields = fEventInfo.getFields();
+ if ((fields != null) && (fields.length > 0)) {
+ StringBuffer buffer = new StringBuffer();
+ for (int i = 0; i < fields.length; i++) {
+ buffer.append(fields[i].getName());
+ buffer.append("="); //$NON-NLS-1$
+ buffer.append(fields[i].getFieldType());
+ if (i != fields.length-1) {
+ buffer.append(";"); //$NON-NLS-1$
+ }
+ }
+ return buffer.toString();
+ }
+ return null;
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new BaseEventPropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return target node component.
+ */
+ public TargetNodeComponent getTargetNode() {
+ return (TargetNodeComponent) getParent().getParent();
+ }
+
+ /**
+ * @return if provider kernel or UST
+ */
+ public boolean isKernel() {
+ return getParent() instanceof KernelProviderComponent;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.KernelProviderPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Implementation of the Kernel provider component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class KernelProviderComponent extends TraceControlComponent {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * Path to icon file for this component.
+ */
+ public static final String KERNEL_PROVIDER_ICON_FILE = "icons/obj16/targets.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public KernelProviderComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setToolTip(Messages.TraceControl_ProviderDisplayName);
+ setImage(KERNEL_PROVIDER_ICON_FILE);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Sets the events information for this component.
+ * @param eventInfos - events information to set.
+ */
+ public void setEventInfo(List<IBaseEventInfo> eventInfos) {
+ for (Iterator<IBaseEventInfo> iterator = eventInfos.iterator(); iterator.hasNext();) {
+ IBaseEventInfo baseEventInfo = iterator.next();
+ BaseEventComponent component = new BaseEventComponent(baseEventInfo.getName(), this);
+ component.setEventInfo(baseEventInfo);
+ addChild(component);
+ }
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new KernelProviderPropertySource(this);
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TargetNodePropertySource;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.IRemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.RemoteSystemProxy;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.LTTngControlServiceFactory;
+import org.eclipse.rse.core.RSECorePlugin;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.IRSECallback;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.rse.core.subsystems.CommunicationsEvent;
+import org.eclipse.rse.core.subsystems.ICommunicationsListener;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Implementation of the trace node component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TargetNodeComponent extends TraceControlComponent implements ICommunicationsListener {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * Path to icon file for this component (state connected).
+ */
+ public static final String TARGET_NODE_CONNECTED_ICON_FILE = "icons/obj16/target_connected.gif"; //$NON-NLS-1$
+ /**
+ * Path to icon file for this component (state disconnected).
+ */
+ public static final String TARGET_NODE_DISCONNECTED_ICON_FILE = "icons/obj16/target_disconnected.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The node connection state.
+ */
+ private TargetNodeState fState = TargetNodeState.DISCONNECTED;
+ /**
+ * The image to be displayed in state disconnected.
+ */
+ private Image fDisconnectedImage = null;
+ /**
+ * The connection implementation.
+ */
+ private IHost fHost = null;
+ /**
+ * The remote proxy implementation.
+ */
+ private IRemoteSystemProxy fRemoteProxy = null;
+ /**
+ * The control service for LTTng specific commands.
+ */
+ private ILttngControlService fService = null;
+ /**
+ * The command shell for issuing commands.
+ */
+ private ICommandShell fShell = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param name - the name of the component
+ * @param parent - the parent of the component
+ * @param host - the host connection implementation
+ * @param proxy - the remote proxy implementation
+ */
+ public TargetNodeComponent(String name, ITraceControlComponent parent, IHost host, IRemoteSystemProxy proxy) {
+ super(name, parent);
+ setImage(TARGET_NODE_CONNECTED_ICON_FILE);
+ fDisconnectedImage = Activator.getDefault().loadIcon(TARGET_NODE_DISCONNECTED_ICON_FILE);
+ fHost = host;
+ fRemoteProxy = proxy;
+ setToolTip(fHost.getHostName());
+ }
+
+ /**
+ * Constructor (using default proxy)
+ * @param name - the name of the component
+ * @param parent - the parent of the component
+ * @param host - the host connection implementation
+ */
+ public TargetNodeComponent(String name, ITraceControlComponent parent, IHost host) {
+ this(name, parent, host, new RemoteSystemProxy(host));
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Image getImage() {
+ if (fState == TargetNodeState.CONNECTED) {
+ return super.getImage();
+ }
+ return fDisconnectedImage;
+ }
+
+ @Override
+ public TargetNodeState getTargetNodeState() {
+ return fState;
+ }
+
+ @Override
+ public void setTargetNodeState(TargetNodeState state) {
+ fState = state;
+ fireComponentChanged(TargetNodeComponent.this);
+ }
+
+ @Override
+ public ILttngControlService getControlService() {
+ return fService;
+ }
+
+ @Override
+ public void setControlService(ILttngControlService service) {
+ fService = service;
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TargetNodePropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return remote host name
+ */
+ public String getHostName() {
+ return fHost.getHostName();
+ }
+
+ /**
+ * @return remote system proxy implementation
+ */
+ public IRemoteSystemProxy getRemoteSystemProxy() {
+ return fRemoteProxy;
+ }
+
+ /**
+ * @return port of IP connection (shell) to be used
+ */
+ public int getPort() {
+ return fRemoteProxy.getPort();
+ }
+
+ /**
+ * Sets the port of the IP connections of the shell
+ * @param port - the IP port to set
+ */
+ public void setPort(int port) {
+ fRemoteProxy.setPort(port);
+ }
+
+ /**
+ * @return all available sessions.
+ */
+ public TraceSessionComponent[] getSessions() {
+ List<ITraceControlComponent> compenents = getChildren(TraceSessionGroup.class);
+ if (compenents.size() > 0) {
+ TraceSessionGroup group = (TraceSessionGroup)compenents.get(0);
+ List<ITraceControlComponent> sessions = group.getChildren(TraceSessionComponent.class);
+ return sessions.toArray(new TraceSessionComponent[sessions.size()]);
+ }
+ return new TraceSessionComponent[0];
+ }
+
+ /**
+ * @return node version
+ */
+ public String getNodeVersion() {
+ // Control service is null during connection to node
+ if (getControlService() != null) {
+ return getControlService().getVersionString();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * Returns if node supports filtering of events
+ * @return <code>true</code> if node supports filtering else <code>false</code>
+ */
+ public boolean isEventFilteringSupported() {
+ return getControlService().isVersionSupported("2.1.0"); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns if node supports networks streaming or not
+ * @return <code>true</code> if node supports filtering else <code>false</code>
+ *
+ */
+ public boolean isNetworkStreamingSupported() {
+ return getControlService().isVersionSupported("2.1.0"); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns if node supports configuring buffer type or not
+ * @return <code>true</code> if node supports buffer type configuration else <code>false</code>
+ */
+ public boolean isBufferTypeConfigSupported() {
+ return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns if node supports trace file rotation or not
+ * @return <code>true</code> if node supports trace file rotation else <code>false</code>
+ */
+ public boolean isTraceFileRotationSupported() {
+ return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
+ }
+
+ /**
+ * Returns if node supports periodical flush for metadata or not
+ * @return <code>true</code> if node supports periodical flush for metadata else <code>false</code>
+ */
+ public boolean isPeriodicalMetadataFlushSupported() {
+ return getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
+ }
+ /**
+ * Returns if node supports snapshots or not
+ * @return <code>true</code> if it supports snapshots else <code>false</code>
+ *
+ */
+ public boolean isSnapshotSupported() {
+ return getControlService().isVersionSupported("2.3.0"); //$NON-NLS-1$
+ }
+ /**
+ * Returns if node supports live or not
+ * @return <code>true</code> if it supports live else <code>false</code>
+ *
+ */
+ public boolean isLiveSupported() {
+ return getControlService().isVersionSupported("2.4.0"); //$NON-NLS-1$;
+ }
+ /**
+ * Returns if node supports adding contexts on event
+ * @return <code>true</code> if it supports adding contexts on events else <code>false</code>
+ *
+ */
+ public boolean isContextOnEventSupported() {
+ return !getControlService().isVersionSupported("2.2.0"); //$NON-NLS-1$
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void communicationsStateChange(CommunicationsEvent e) {
+ if (e.getState() == CommunicationsEvent.AFTER_DISCONNECT ||
+ e.getState() == CommunicationsEvent.CONNECTION_ERROR) {
+ handleDisconnected();
+ } if ((e.getState() == CommunicationsEvent.AFTER_CONNECT) && (fState != TargetNodeState.CONNECTING)) {
+ handleConnected();
+ }
+ }
+
+ @Override
+ public boolean isPassiveCommunicationsListener() {
+ return true;
+ }
+
+ @Override
+ public void dispose() {
+ fRemoteProxy.removeCommunicationListener(this);
+ }
+
+ /**
+ * Method to connect this node component to the remote target node.
+ */
+ public void connect() {
+ if (fState == TargetNodeState.DISCONNECTED) {
+ try {
+ setTargetNodeState(TargetNodeState.CONNECTING);
+ fRemoteProxy.connect(new IRSECallback() {
+ @Override
+ public void done(IStatus status, Object result) {
+ // Note: result might be null!
+ if(status.isOK()) {
+ handleConnected();
+ } else {
+ handleDisconnected();
+ }
+ }
+ });
+ } catch (Exception e) {
+ setTargetNodeState(TargetNodeState.DISCONNECTED);
+ Activator.getDefault().logError(Messages.TraceControl_ConnectionFailure + " (" + getName() + "). \n", e); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ }
+
+ /**
+ * Method to disconnect this node component to the remote target node.
+ */
+ public void disconnect() {
+ if (fState == TargetNodeState.CONNECTED) {
+ try {
+ setTargetNodeState(TargetNodeState.DISCONNECTING);
+ fRemoteProxy.disconnect();
+ } catch (Exception e) {
+ Activator.getDefault().logError(Messages.TraceControl_DisconnectionFailure + " (" + getName() + "). \n", e); //$NON-NLS-1$ //$NON-NLS-2$
+ } finally {
+ handleDisconnected();
+ }
+ }
+ }
+
+ /**
+ * Retrieves the trace configuration from the target node and populates the
+ * information in the tree model. The execution is done in a own job.
+ */
+ public void getConfigurationFromNode() {
+ Job job = new Job(Messages.TraceControl_RetrieveNodeConfigurationJob) {
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+
+ try {
+ // Get provider information from node
+ TraceProviderGroup providerGroup = new TraceProviderGroup(Messages.TraceControl_ProviderDisplayName, TargetNodeComponent.this);
+ addChild(providerGroup);
+ providerGroup.getProviderFromNode(monitor);
+
+ // Get session information from node
+ TraceSessionGroup sessionGroup = new TraceSessionGroup(Messages.TraceControl_AllSessionsDisplayName, TargetNodeComponent.this);
+ addChild(sessionGroup);
+ sessionGroup.getSessionsFromNode(monitor);
+ } catch (ExecutionException e) {
+ removeAllChildren();
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TraceControl_RetrieveNodeConfigurationFailure, e);
+ }
+
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(true);
+ job.schedule();
+ }
+
+ /**
+ * Refresh the node configuration
+ */
+ public void refresh() {
+ removeAllChildren();
+ getConfigurationFromNode();
+ }
+
+ /**
+ * Deregisters host from registry.
+ */
+ public void deregister() {
+ ISystemRegistry registry = RSECorePlugin.getTheSystemRegistry();
+ // Don't remove local host because it cannot be recreated by
+ // LTTng NewConnection Dialog
+ if (!fRemoteProxy.isLocal()) {
+ registry.deleteHost(fHost);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper function
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return returns the control service for LTTng specific commands.
+ * @throws ExecutionException
+ */
+ private ILttngControlService createControlService() throws ExecutionException {
+ if (fShell == null) {
+ fShell = fRemoteProxy.createCommandShell();
+ fRemoteProxy.addCommunicationListener(this);
+ }
+ fService = LTTngControlServiceFactory.getInstance().getLttngControlService(fShell);
+ return fService;
+ }
+
+ /**
+ * Handles the connected event.
+ */
+ private void handleConnected() {
+ setTargetNodeState(TargetNodeState.CONNECTED);
+ try {
+ createControlService();
+ getConfigurationFromNode();
+ } catch (final ExecutionException e) {
+ // Disconnect only if no control service, otherwise stay connected.
+ if (getControlService() == null) {
+ disconnect();
+ }
+
+ // Notify user
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ ErrorDialog er = new ErrorDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
+ Messages.TraceControl_ErrorTitle, Messages.TraceControl_RetrieveNodeConfigurationFailure,
+ new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.getMessage(), e),
+ IStatus.ERROR);
+ er.open();
+ }
+ });
+ Activator.getDefault().logError(Messages.TraceControl_RetrieveNodeConfigurationFailure + " (" + getName() + "). \n", e); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * Handles the disconnected event.
+ */
+ private void handleDisconnected() {
+ removeAllChildren();
+ setTargetNodeState(TargetNodeState.DISCONNECTED);
+ fShell = null;
+ fService = null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceChannelOutputType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceChannelPropertySource;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+
+/**
+ * <p>
+ * Implementation of the trace channel component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceChannelComponent extends TraceControlComponent {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * Path to icon file for this component (state enabled).
+ */
+ public static final String TRACE_CHANNEL_ICON_FILE_ENABLED = "icons/obj16/channel.gif"; //$NON-NLS-1$
+ /**
+ * Path to icon file for this component (state disabled).
+ */
+ public static final String TRACE_CHANNEL_ICON_FILE_DISABLED = "icons/obj16/channel_disabled.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The channel information.
+ */
+ private IChannelInfo fChannelInfo = null;
+ /**
+ * The image to be displayed in disabled state.
+ */
+ private Image fDisabledImage = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceChannelComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_CHANNEL_ICON_FILE_ENABLED);
+ setToolTip(Messages.TraceControl_ChannelDisplayName);
+ fChannelInfo = new ChannelInfo(name);
+ fDisabledImage = Activator.getDefault().loadIcon(TRACE_CHANNEL_ICON_FILE_DISABLED);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Image getImage() {
+ if (fChannelInfo.getState() == TraceEnablement.DISABLED) {
+ return fDisabledImage;
+ }
+ return super.getImage();
+ }
+
+ /**
+ * Sets the channel information.
+ *
+ * @param channelInfo
+ * The channel info to assign to this component
+ */
+ public void setChannelInfo(IChannelInfo channelInfo) {
+ fChannelInfo = channelInfo;
+ IEventInfo[] events = fChannelInfo.getEvents();
+ List<ITraceControlComponent> eventComponents = new ArrayList<>();
+ for (int i = 0; i < events.length; i++) {
+ TraceEventComponent event = null;
+ if (events[i].getClass() == ProbeEventInfo.class) {
+ event = new TraceProbeEventComponent(events[i].getName(), this);
+ } else {
+ event = new TraceEventComponent(events[i].getName(), this);
+ }
+
+ eventComponents.add(event);
+ event.setEventInfo(events[i]);
+ }
+ if (!eventComponents.isEmpty()) {
+ setChildren(eventComponents);
+ }
+ }
+
+ /**
+ * @return the overwrite mode value.
+ */
+ public boolean isOverwriteMode() {
+ return fChannelInfo.isOverwriteMode();
+ }
+ /**
+ * Sets the overwrite mode value to the given mode.
+ * @param mode - mode to set.
+ */
+ public void setOverwriteMode(boolean mode){
+ fChannelInfo.setOverwriteMode(mode);
+ }
+ /**
+ * @return the sub-buffer size.
+ */
+ public long getSubBufferSize() {
+ return fChannelInfo.getSubBufferSize();
+ }
+ /**
+ * Sets the sub-buffer size to the given value.
+ * @param bufferSize - size to set to set.
+ */
+ public void setSubBufferSize(long bufferSize) {
+ fChannelInfo.setSubBufferSize(bufferSize);
+ }
+ /**
+ * @return the number of sub-buffers.
+ */
+ public int getNumberOfSubBuffers() {
+ return fChannelInfo.getNumberOfSubBuffers();
+ }
+ /**
+ * Sets the number of sub-buffers to the given value.
+ * @param numberOfSubBuffers - value to set.
+ */
+ public void setNumberOfSubBuffers(int numberOfSubBuffers) {
+ fChannelInfo.setNumberOfSubBuffers(numberOfSubBuffers);
+ }
+ /**
+ * @return the switch timer interval.
+ */
+ public long getSwitchTimer() {
+ return fChannelInfo.getSwitchTimer();
+ }
+ /**
+ * Sets the switch timer interval to the given value.
+ * @param timer - timer value to set.
+ */
+ public void setSwitchTimer(long timer) {
+ fChannelInfo.setSwitchTimer(timer);
+ }
+ /**
+ * @return the read timer interval.
+ */
+ public long getReadTimer() {
+ return fChannelInfo.getReadTimer();
+ }
+ /**
+ * Sets the read timer interval to the given value.
+ * @param timer - timer value to set..
+ */
+ public void setReadTimer(long timer) {
+ fChannelInfo.setReadTimer(timer);
+ }
+ /**
+ * @return the output type.
+ */
+ public TraceChannelOutputType getOutputType() {
+ return fChannelInfo.getOutputType();
+ }
+ /**
+ * Sets the output type to the given value.
+ * @param type - type to set.
+ */
+ public void setOutputType(TraceChannelOutputType type) {
+ fChannelInfo.setOutputType(type);
+ }
+ /**
+ * Sets the output type to the given value.
+ * @param type - type to set.
+ */
+ public void setOutputType(String type) {
+ fChannelInfo.setOutputType(type);
+ }
+
+ /**
+ * @return the channel state (enabled or disabled).
+ */
+ public TraceEnablement getState() {
+ return fChannelInfo.getState();
+ }
+ /**
+ * Sets the channel state (enablement) to the given value.
+ * @param state - state to set.
+ */
+ public void setState(TraceEnablement state) {
+ fChannelInfo.setState(state);
+ }
+ /**
+ * Sets the channel state (enablement) to the value specified by the given name.
+ * @param stateName - state to set.
+ */
+ public void setState(String stateName) {
+ fChannelInfo.setState(stateName);
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TraceChannelPropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return session name from parent
+ */
+ public String getSessionName() {
+ return ((TraceDomainComponent)getParent()).getSessionName();
+ }
+
+ /**
+ * @return session from parent
+ */
+ public TraceSessionComponent getSession() {
+ return ((TraceDomainComponent)getParent()).getSession();
+ }
+
+ /**
+ * @return if domain is kernel or UST
+ */
+ public boolean isKernel() {
+ return ((TraceDomainComponent)getParent()).isKernel();
+ }
+
+ /**
+ * @return the parent target node
+ */
+ public TargetNodeComponent getTargetNode() {
+ return ((TraceDomainComponent)getParent()).getTargetNode();
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Enables a list of events with no additional parameters.
+ *
+ * @param eventNames
+ * - a list of event names to enabled.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableEvents(List<String> eventNames, IProgressMonitor monitor) throws ExecutionException {
+ enableEvents(eventNames, null, monitor);
+ }
+
+ /**
+ * Enables a list of events with no additional parameters.
+ *
+ * @param eventNames
+ * - a list of event names to enabled.
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableEvents(List<String> eventNames, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableEvents(getSessionName(), getName(), eventNames, isKernel(), filterExpression, monitor);
+ }
+
+ /**
+ * Enables all syscalls (for kernel domain)
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableSyscalls(IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableSyscalls(getSessionName(), getName(), monitor);
+ }
+
+ /**
+ * Enables a dynamic probe (for kernel domain)
+ *
+ * @param eventName
+ * - event name for probe
+ * @param isFunction
+ * - true for dynamic function entry/return probe else false
+ * @param probe
+ * - the actual probe
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableProbe(String eventName, boolean isFunction, String probe,
+ IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableProbe(getSessionName(), getName(), eventName, isFunction, probe, monitor);
+ }
+
+ /**
+ * Enables events using log level.
+ *
+ * @param eventName
+ * - a event name
+ * @param logLevelType
+ * - a log level type
+ * @param level
+ * - a log level
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableLogLevel(String eventName, LogLevelType logLevelType,
+ TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableLogLevel(getSessionName(), getName(), eventName, logLevelType, level, filterExpression, monitor);
+ }
+
+ /**
+ * Enables a list of events with no additional parameters.
+ *
+ * @param eventNames
+ * - a list of event names to enabled.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void disableEvent(List<String> eventNames, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().disableEvent(getParent().getParent().getName(),
+ getName(), eventNames, isKernel(), monitor);
+ }
+
+ /**
+ * Add contexts to given channels and or events
+ *
+ * @param contexts
+ * - a list of contexts to add
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void addContexts(List<String> contexts, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().addContexts(getSessionName(), getName(), null,
+ isKernel(), contexts, monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.runtime.ListenerList;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TargetNodeState;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponentChangedListener;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.service.ILttngControlService;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * <p>
+ * Base implementation for trace control component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceControlComponent implements ITraceControlComponent {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The name of the component
+ */
+ private String fName = ""; //$NON-NLS-1$
+ /**
+ * The image to be displayed for the component.
+ */
+ private Image fImage = null;
+ /**
+ * The tool tip to be displayed for the component.
+ */
+ private String fToolTip = null;
+ /**
+ * The parent component.
+ */
+ private ITraceControlComponent fParent = null;
+ /**
+ * The list if children components.
+ */
+ private final List<ITraceControlComponent> fChildren = new ArrayList<>();
+ /**
+ * The list of listeners to be notified about changes.
+ */
+ private final ListenerList fListeners = new ListenerList();
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ */
+ public TraceControlComponent(String name) {
+ this(name, null);
+ }
+
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent component.
+ */
+ public TraceControlComponent(String name, ITraceControlComponent parent) {
+ fName = name;
+ fParent = parent;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getName() {
+ return fName;
+ }
+
+ @Override
+ public void setName(String name) {
+ fName = name;
+ }
+
+ @Override
+ public Image getImage() {
+ return fImage;
+ }
+
+ @Override
+ public void setImage(String path) {
+ fImage = Activator.getDefault().loadIcon(path);
+ }
+
+ @Override
+ public void setImage(Image image) {
+ fImage = image;
+ }
+
+ @Override
+ public String getToolTip() {
+ return fToolTip;
+ }
+
+ @Override
+ public void setToolTip(String toolTip) {
+ fToolTip = toolTip;
+ }
+
+ @Override
+ public TargetNodeState getTargetNodeState() {
+ if (getParent() != null) {
+ return getParent().getTargetNodeState();
+ }
+ return TargetNodeState.DISCONNECTED;
+ }
+
+ @Override
+ public void setTargetNodeState(TargetNodeState state) {
+ if (getParent() != null) {
+ getParent().setTargetNodeState(state);
+ }
+ }
+
+ @Override
+ public ITraceControlComponent getParent() {
+ return fParent;
+ }
+
+ @Override
+ public void setParent(ITraceControlComponent parent) {
+ fParent = parent;
+ }
+
+ @Override
+ public ITraceControlComponent[] getChildren() {
+ return fChildren.toArray(new ITraceControlComponent[fChildren.size()]);
+ }
+
+ @Override
+ public void setChildren(List<ITraceControlComponent> children) {
+ for (Iterator<ITraceControlComponent> iterator = children.iterator(); iterator.hasNext();) {
+ ITraceControlComponent traceControlComponent = iterator.next();
+ fChildren.add(traceControlComponent);
+ fireComponentChanged(this);
+ }
+ }
+
+ @Override
+ public ITraceControlComponent getChild(String name) {
+ ITraceControlComponent child = null;
+ for (int i = 0; i < fChildren.size(); i++) {
+ if (fChildren.get(i).getName().equals(name)) {
+ child = fChildren.get(i);
+ break;
+ }
+ }
+ return child;
+ }
+
+ @Override
+ public List<ITraceControlComponent> getChildren(Class<? extends ITraceControlComponent> clazz) {
+ List<ITraceControlComponent> list = new ArrayList<>();
+
+ for (Iterator<ITraceControlComponent> iterator = fChildren.iterator(); iterator.hasNext();) {
+ ITraceControlComponent child = iterator.next();
+ if (child.getClass() == clazz) {
+ list.add(child);
+ }
+ }
+ return list;
+ }
+
+ @Override
+ public ILttngControlService getControlService() {
+ if (getParent() != null) {
+ return getParent().getControlService();
+ }
+ return null;
+ }
+
+ @Override
+ public void setControlService(ILttngControlService service) {
+ if (getParent() != null) {
+ getParent().setControlService(service);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void dispose() {
+ // default implementation
+ }
+
+ @Override
+ public void addChild(ITraceControlComponent component) {
+ if (component != null) {
+ fChildren.add(component);
+ }
+ fireComponentAdded(this, component);
+ }
+
+ @Override
+ public void removeChild(ITraceControlComponent component) {
+ if (component != null) {
+ fChildren.remove(component);
+ component.dispose();
+ }
+ fireComponentRemoved(this, component);
+ }
+
+ @Override
+ public void removeAllChildren() {
+ for (Iterator<ITraceControlComponent> iterator = fChildren.iterator(); iterator.hasNext();) {
+ ITraceControlComponent child = iterator.next();
+ child.removeAllChildren();
+ }
+ fChildren.clear();
+// fireCompenentChanged(this);
+ }
+
+ @Override
+ public boolean containsChild(String name) {
+ boolean retValue = false;
+ for (int i = 0; i < fChildren.size(); i++) {
+ if (fChildren.get(i).getName().equals(name)) {
+ retValue = true;
+ break;
+ }
+ }
+ return retValue;
+ }
+
+ @Override
+ public boolean hasChildren() {
+ return !fChildren.isEmpty();
+ }
+
+ @Override
+ public void addComponentListener(ITraceControlComponentChangedListener listener) {
+ if (fParent != null) {
+ fParent.addComponentListener(listener);
+ } else {
+ fListeners.add(listener);
+ }
+ }
+
+ @Override
+ public void removeComponentListener(ITraceControlComponentChangedListener listener) {
+ if (fParent != null) {
+ fParent.removeComponentListener(listener);
+ } else {
+ fListeners.remove(listener);
+ }
+ }
+
+ @Override
+ public void fireComponentAdded(ITraceControlComponent parent, ITraceControlComponent component) {
+ if (component == null) {
+ return;
+ }
+
+ if (fParent != null) {
+ fParent.fireComponentAdded(parent, component);
+ } else {
+ Object[] listeners = fListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ ITraceControlComponentChangedListener listener = (ITraceControlComponentChangedListener) listeners[i];
+ listener.componentAdded(parent, component);
+ }
+ }
+ }
+
+ @Override
+ public void fireComponentRemoved(ITraceControlComponent parent, ITraceControlComponent component) {
+ if (component == null) {
+ return;
+ }
+
+ if (fParent != null) {
+ fParent.fireComponentRemoved(parent, component);
+ } else {
+ Object[] listeners = fListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ ITraceControlComponentChangedListener listener = (ITraceControlComponentChangedListener) listeners[i];
+ listener.componentRemoved(parent, component);
+ }
+ }
+ }
+
+ @Override
+ public void fireComponentChanged(ITraceControlComponent component) {
+ if (component == null) {
+ return;
+ }
+
+ if (fParent != null) {
+ fParent.fireComponentChanged(component);
+ } else {
+ Object[] listeners = fListeners.getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ ITraceControlComponentChangedListener listener = (ITraceControlComponentChangedListener) listeners[i];
+ listener.componentChanged(component);
+ }
+ }
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+
+/**
+ * <p>
+ * Tree content provider implementation for trace control view.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceControlContentProvider implements ITreeContentProvider {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void dispose() {
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return getChildren(inputElement);
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+
+ if (parentElement instanceof ITraceControlComponent) {
+ return ((ITraceControlComponent)parentElement).getChildren();
+ }
+ return new Object[0];
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ if (element instanceof ITraceControlComponent) {
+ return ((ITraceControlComponent)element).getParent();
+ }
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ if (element instanceof ITraceControlComponent) {
+ return ((ITraceControlComponent)element).hasChildren();
+ }
+ return false;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import org.eclipse.jface.viewers.ColumnLabelProvider;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.swt.graphics.Image;
+
+/**
+ * <p>
+ * Label provider for trace control tree viewer.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceControlLabelProvider extends ColumnLabelProvider {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Image getImage(Object element) {
+ if ((element != null) && (element instanceof ITraceControlComponent)) {
+ return ((ITraceControlComponent) element).getImage();
+ }
+ return null;
+ }
+
+ @Override
+ public String getText(Object element) {
+ if ((element != null) && (element instanceof ITraceControlComponent)) {
+ return ((ITraceControlComponent) element).getName();
+ }
+ return "";//$NON-NLS-1$
+ }
+
+ @Override
+ public String getToolTipText(Object element) {
+ if ((element != null) && (element instanceof ITraceControlComponent)) {
+ return ((ITraceControlComponent) element).getToolTip();
+ }
+ return null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import org.eclipse.core.expressions.PropertyTester;
+
+/**
+ *
+ * Property Tester Implementation for Trace Control Components.
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceControlPropertyTester extends PropertyTester {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ private static final String ADD_CONTEXT_SUPPORT_PROPERTY = "isAddContextOnEventSupported"; //$NON-NLS-1$
+
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+
+ // Check if node supports adding contexts on event level.
+ if (ADD_CONTEXT_SUPPORT_PROPERTY.equals(property)) {
+ if ((receiver != null) && (receiver instanceof TraceEventComponent)) {
+ TraceEventComponent event = (TraceEventComponent) receiver;
+ TargetNodeComponent node = event.getTargetNode();
+ return node.isContextOnEventSupported();
+ }
+ }
+ return false;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+
+/**
+ * <p>
+ * Root element in trace control tree.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceControlRoot extends TraceControlComponent {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The name of the root component
+ */
+ public static final String TRACE_CONTROL_ROOT_NAME = "trace_control_root"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Default constructor
+ */
+ public TraceControlRoot() {
+ super(TRACE_CONTROL_ROOT_NAME);
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceDomainPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Implementation of the trace domain component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceDomainComponent extends TraceControlComponent {
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component.
+ */
+ public static final String TRACE_DOMAIN_ICON_FILE = "icons/obj16/domain.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The domain information.
+ */
+ private IDomainInfo fDomainInfo = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceDomainComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_DOMAIN_ICON_FILE);
+ setToolTip(Messages.TraceControl_DomainDisplayName);
+ fDomainInfo = new DomainInfo(name);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * Sets the domain information.
+ * @param domainInfo - the domain information to set.
+ */
+ public void setDomainInfo(IDomainInfo domainInfo) {
+ fDomainInfo = domainInfo;
+ IChannelInfo[] channels = fDomainInfo.getChannels();
+ for (int i = 0; i < channels.length; i++) {
+ TraceChannelComponent channel = new TraceChannelComponent(channels[i].getName(), this);
+ channel.setChannelInfo(channels[i]);
+ addChild(channel);
+ }
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TraceDomainPropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return session name from parent
+ */
+ public String getSessionName() {
+ return ((TraceSessionComponent)getParent()).getName();
+ }
+
+ /**
+ * @return session from parent
+ */
+ public TraceSessionComponent getSession() {
+ return (TraceSessionComponent)getParent();
+ }
+
+ /**
+ * @return true if domain is kernel, false for UST
+ */
+ public boolean isKernel() {
+ return fDomainInfo.isKernel();
+ }
+
+ /**
+ * Sets whether domain is Kernel domain or UST
+ * @param isKernel true for kernel, false for UST
+ */
+ public void setIsKernel(boolean isKernel) {
+ fDomainInfo.setIsKernel(isKernel);
+ }
+
+ /**
+ * @return returns all available channels for this domain.
+ */
+ public TraceChannelComponent[] getChannels() {
+ List<ITraceControlComponent> channels = getChildren(TraceChannelComponent.class);
+ return channels.toArray(new TraceChannelComponent[channels.size()]);
+ }
+
+ /**
+ * @return the parent target node
+ */
+ public TargetNodeComponent getTargetNode() {
+ return ((TraceSessionComponent)getParent()).getTargetNode();
+ }
+
+ /**
+ * @return the buffer type
+ */
+ public BufferType getBufferType(){
+ return fDomainInfo.getBufferType();
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Retrieves the session configuration from the node.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void getConfigurationFromNode(IProgressMonitor monitor) throws ExecutionException {
+ TraceSessionComponent session = (TraceSessionComponent) getParent();
+ session.getConfigurationFromNode(monitor);
+ }
+
+ /**
+ * Enables channels with given names which are part of this domain. If a
+ * given channel doesn't exists it creates a new channel with the given
+ * parameters (or default values if given parameter is null).
+ *
+ * @param channelNames
+ * - a list of channel names to enable on this domain
+ * @param info
+ * - channel information to set for the channel (use null for
+ * default)
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableChannels(List<String> channelNames, IChannelInfo info,
+ IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableChannels(getParent().getName(), channelNames,
+ isKernel(), info, monitor);
+ }
+
+ /**
+ * Disables channels with given names which are part of this domain.
+ *
+ * @param channelNames
+ * - a list of channel names to enable on this domain
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void disableChannels(List<String> channelNames,
+ IProgressMonitor monitor) throws ExecutionException {
+ getControlService().disableChannels(getParent().getName(),
+ channelNames, isKernel(), monitor);
+ }
+
+ /**
+ * Enables a list of events with no additional parameters.
+ *
+ * @param eventNames
+ * - a list of event names to enabled.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableEvents(List<String> eventNames, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableEvents(getSessionName(), null, eventNames,
+ isKernel(), null, monitor);
+ }
+
+ /**
+ * Enables all syscalls (for kernel domain)
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+
+ public void enableSyscalls(IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableSyscalls(getSessionName(), null, monitor);
+ }
+
+ /**
+ * Enables a dynamic probe (for kernel domain)
+ *
+ * @param eventName
+ * - event name for probe
+ * @param isFunction
+ * - true for dynamic function entry/return probe else false
+ * @param probe
+ * - the actual probe
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableProbe(String eventName, boolean isFunction, String probe,
+ IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableProbe(getSessionName(), null, eventName,
+ isFunction, probe, monitor);
+ }
+
+ /**
+ * Enables events using log level.
+ *
+ * @param eventName
+ * - a event name
+ * @param logLevelType
+ * - a log level type
+ * @param level
+ * - a log level
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableLogLevel(String eventName, LogLevelType logLevelType,
+ TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableLogLevel(getSessionName(), null, eventName,
+ logLevelType, level, filterExpression, monitor);
+ }
+
+ /**
+ * Add contexts to given channels and or events
+ *
+ * @param contexts
+ * - a list of contexts to add
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void addContexts(List<String> contexts, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().addContexts(getSessionName(), null, null,
+ isKernel(), contexts, monitor);
+ }
+
+ /**
+ * Executes calibrate command to quantify LTTng overhead.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void calibrate(IProgressMonitor monitor) throws ExecutionException {
+ getControlService().calibrate(isKernel(), monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceEventPropertySource;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+
+/**
+ * <p>
+ * Implementation of the trace channel component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceEventComponent extends TraceControlComponent {
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component (enabled state).
+ */
+ public static final String TRACE_EVENT_ICON_FILE_ENABLED = "icons/obj16/event_enabled.gif"; //$NON-NLS-1$
+ /**
+ * Path to icon file for this component (disabled state).
+ */
+ public static final String TRACE_EVENT_ICON_FILE_DISABLED = "icons/obj16/event_disabled.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The event information.
+ */
+ protected IEventInfo fEventInfo = null;
+ /**
+ * The image to be displayed when in disabled state.
+ */
+ private Image fDisabledImage = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceEventComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_EVENT_ICON_FILE_ENABLED);
+ setToolTip(Messages.TraceControl_EventDisplayName);
+ fEventInfo = new EventInfo(name);
+ fDisabledImage = Activator.getDefault().loadIcon(TRACE_EVENT_ICON_FILE_DISABLED);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Image getImage() {
+ if (fEventInfo.getState() == TraceEnablement.DISABLED) {
+ return fDisabledImage;
+ }
+ return super.getImage();
+ }
+
+ /**
+ * Sets the event information.
+ * @param eventInfo - the event information to set.
+ */
+ public void setEventInfo(IEventInfo eventInfo) {
+ fEventInfo = eventInfo;
+ }
+
+ /**
+ * @return the trace event type
+ */
+ public TraceEventType getEventType() {
+ return fEventInfo.getEventType();
+ }
+
+ /**
+ * Sets the trace event type to the given type
+ * @param type - type to set
+ */
+ public void setEventType(TraceEventType type) {
+ fEventInfo.setEventType(type);
+ }
+
+ /**
+ * Sets the trace event type to the type specified by the given name.
+ * @param typeName - event type name
+ */
+ public void setEventType(String typeName) {
+ fEventInfo.setEventType(typeName);
+ }
+
+ /**
+ * @return the event state (enabled or disabled).
+ */
+ public TraceEnablement getState() {
+ return fEventInfo.getState();
+ }
+
+ /**
+ * Sets the event state (enablement) to the given value.
+ * @param state - state to set.
+ */
+ public void setState(TraceEnablement state) {
+ fEventInfo.setState(state);
+ }
+
+ /**
+ * Sets the event state (enablement) to the value specified by the given name.
+ * @param stateName - state to set.
+ */
+ public void setState(String stateName) {
+ fEventInfo.setState(stateName);
+ }
+
+ /**
+ * @return the trace event log level
+ */
+ public TraceLogLevel getLogLevel() {
+ return fEventInfo.getLogLevel();
+ }
+
+ /**
+ * Sets the trace event log level to the given level
+ * @param level - event log level to set
+ */
+ public void setLogLevel(TraceLogLevel level) {
+ fEventInfo.setLogLevel(level);
+ }
+
+ /**
+ * Sets the trace event log level to the level specified by the given name.
+ * @param levelName - event log level name
+ */
+ public void setLogLevel(String levelName) {
+ fEventInfo.setLogLevel(levelName);
+ }
+
+ /**
+ * Returns filter expression.
+ * @return filter expression
+ */
+ public String getFilterExpression() {
+ return fEventInfo.getFilterExpression();
+ }
+
+ /**
+ * Sets the filter expression.
+ * @param filter The filter expression to set
+ */
+ public void setFilterExpression(String filter) {
+ fEventInfo.setFilterExpression(filter);
+ }
+
+ /**
+ * Returns the log level type
+ * @return event log level type
+ */
+ public LogLevelType getLogLevelType() {
+ return fEventInfo.getLogLevelType();
+ }
+
+ /**
+ * Sets the trace event log level type to the given level type
+ * @param levelType - event log level type to set
+ */
+ public void setLogLevelType(LogLevelType levelType) {
+ fEventInfo.setLogLevelType(levelType);
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TraceEventPropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return target node component.
+ */
+ public TargetNodeComponent getTargetNode() {
+ return ((TraceChannelComponent)getParent()).getTargetNode();
+ }
+
+ /**
+ * @return session name from parent
+ */
+ public String getSessionName() {
+ return ((TraceChannelComponent)getParent()).getSessionName();
+ }
+
+ /**
+ * @return session from parent
+ */
+ public TraceSessionComponent getSession() {
+ return ((TraceChannelComponent)getParent()).getSession();
+ }
+
+ /**
+ * @return channel name from parent
+ */
+ public String getChannelName() {
+ return getParent().getName();
+ }
+
+ /**
+ * @return if domain is kernel or UST
+ */
+ public boolean isKernel() {
+ return ((TraceChannelComponent)getParent()).isKernel();
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Add contexts to given channels and or events
+ *
+ * @param contexts
+ * - a list of contexts to add
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void addContexts(List<String> contexts, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().addContexts(getSessionName(), getChannelName(),
+ getName(), isKernel(), contexts, monitor);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceProbeEventPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+
+/**
+ * <p>
+ * Implementation of the trace channel component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceProbeEventComponent extends TraceEventComponent {
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceProbeEventComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ fEventInfo = new ProbeEventInfo(name);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Sets the event information.
+ * @param eventInfo - the event information to set.
+ */
+ @Override
+ public void setEventInfo(IEventInfo eventInfo) {
+ if (eventInfo instanceof ProbeEventInfo) {
+ fEventInfo = eventInfo;
+ return;
+ }
+ throw new IllegalArgumentException("Invalid type passed. Only class of type ProbeEventInfo allowed:\n" + eventInfo.getClass()); //$NON-NLS-1$
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TraceProbeEventPropertySource(this);
+ }
+ return null;
+ }
+ /**
+ * @return the address of the probe. (null if Symbol is used)
+ */
+ public String getAddress() {
+ return getEventInfo().getAddress();
+ }
+ /**
+ * Sets the address of the probe.
+ * @param address - a address
+ */
+ public void setAddress(String address) {
+ getEventInfo().setAddress(address);
+ }
+ /**
+ * @return the offset applied to the symbol.
+ */
+ public String getOffset() {
+ return getEventInfo().getOffset();
+ }
+ /**
+ * Sets the offset applied to the symbol. (valid if symbol is used)
+ * @param offset - a offset
+ */
+ public void setOffset(String offset) {
+ getEventInfo().setOffset(offset);
+ }
+ /**
+ * @return the symbol name. (null if address is used)
+ */
+ public String getSymbol() {
+ return getEventInfo().getSymbol();
+ }
+ /**
+ * Sets the symbol name.
+ * @param symbol - a symbol name (null if address is used)
+ */
+ public void setSymbol(String symbol) {
+ getEventInfo().setSymbol(symbol);
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+ private ProbeEventInfo getEventInfo() {
+ return (ProbeEventInfo) fEventInfo;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+
+/**
+ * <p>
+ * Implementation of the trace provider group.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceProviderGroup extends TraceControlComponent {
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component.
+ */
+ public static final String TRACE_PROVIDERS_ICON_FILE = "icons/obj16/providers.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceProviderGroup(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_PROVIDERS_ICON_FILE);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Gets the provider information from the target node.
+ * @param monitor - a progress monitor
+ * @throws ExecutionException If the command fails
+ */
+ public void getProviderFromNode(IProgressMonitor monitor) throws ExecutionException {
+
+ List<IBaseEventInfo> eventInfos = getControlService().getKernelProvider(monitor);
+
+ if (!eventInfos.isEmpty()) {
+ KernelProviderComponent component = new KernelProviderComponent(Messages.TraceControl_KernelProviderDisplayName, this);
+ addChild(component);
+ component.setEventInfo(eventInfos);
+ }
+
+ List<IUstProviderInfo> allProviders = getControlService().getUstProvider(monitor);
+
+ for (Iterator<IUstProviderInfo> iterator = allProviders.iterator(); iterator.hasNext();) {
+ IUstProviderInfo ustProviderInfo = iterator.next();
+ UstProviderComponent ustComponent = new UstProviderComponent(ustProviderInfo.getName(), this);
+ addChild(ustComponent);
+ ustComponent.setUstProvider(ustProviderInfo);
+ }
+ }
+
+ /**
+ * Returns whether the kernel provider is available or not
+ * @return <code>true</code> if kernel provide is available or <code>false</code>
+ */
+ public boolean hasKernelProvider() {
+ List<ITraceControlComponent> kernelList = getChildren(KernelProviderComponent.class);
+ return !kernelList.isEmpty();
+ }
+
+ /**
+ * Returns if node supports filtering of events
+ * @return <code>true</code> if node supports filtering else <code>false</code>
+ */
+ public boolean isEventFilteringSupported() {
+ return ((TargetNodeComponent)getParent()).isEventFilteringSupported();
+ }
+}
+
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Marc-Andre Laperle - Support for opening a live session
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceSessionState;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.TraceSessionPropertySource;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Implementation of the trace session component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceSessionComponent extends TraceControlComponent {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component (inactive state).
+ */
+ public static final String TRACE_SESSION_ICON_FILE_INACTIVE = "icons/obj16/session_inactive.gif"; //$NON-NLS-1$
+ /**
+ * Path to icon file for this component (active state).
+ */
+ public static final String TRACE_SESSION_ICON_FILE_ACTIVE = "icons/obj16/session_active.gif"; //$NON-NLS-1$
+ /**
+ * Path to icon file for this component (destroyed state).
+ */
+ public static final String TRACE_SESSION_ICON_FILE_DESTROYED = "icons/obj16/session_destroyed.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The session information.
+ */
+ private ISessionInfo fSessionInfo = null;
+ /**
+ * A flag to indicate if session has been destroyed.
+ */
+ private boolean fIsDestroyed = false;
+ /**
+ * The image to be displayed in state active.
+ */
+ private Image fActiveImage = null;
+ /**
+ * The image to be displayed in state destroyed
+ */
+ private Image fDestroyedImage = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceSessionComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_SESSION_ICON_FILE_INACTIVE);
+ setToolTip(Messages.TraceControl_SessionDisplayName);
+ fSessionInfo = new SessionInfo(name);
+ fActiveImage = Activator.getDefault().loadIcon(TRACE_SESSION_ICON_FILE_ACTIVE);
+ fDestroyedImage = Activator.getDefault().loadIcon(TRACE_SESSION_ICON_FILE_DESTROYED);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param sessionInfo
+ * the session information used to create the session
+ * @param parent
+ * the parent of this component.
+ */
+ public TraceSessionComponent(ISessionInfo sessionInfo, ITraceControlComponent parent) {
+ this(sessionInfo.getName(), parent);
+ copyLiveInfo(sessionInfo);
+ }
+
+ private void copyLiveInfo(ISessionInfo sessionInfo) {
+ // Since we can't retrieve this information from the node, we copy it over
+ fSessionInfo.setLive(sessionInfo.isLive());
+ fSessionInfo.setLiveDelay(sessionInfo.getLiveDelay());
+ fSessionInfo.setLivePort(sessionInfo.getLivePort());
+ fSessionInfo.setLiveUrl(sessionInfo.getLiveUrl());
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Image getImage() {
+ if (fIsDestroyed) {
+ return fDestroyedImage;
+ }
+
+ if (fSessionInfo.getSessionState() == TraceSessionState.INACTIVE) {
+ return super.getImage();
+ }
+
+ return fActiveImage;
+ }
+
+ /**
+ * @return the whether the session is destroyed or not.
+ */
+ public boolean isDestroyed() {
+ return fIsDestroyed;
+ }
+
+ /**
+ * Sets the session destroyed state to the given value.
+ * @param destroyed - value to set.
+ */
+ public void setDestroyed(boolean destroyed) {
+ fIsDestroyed = destroyed;
+ }
+
+ /**
+ * @return the session state state (active or inactive).
+ */
+ public TraceSessionState getSessionState() {
+ return fSessionInfo.getSessionState();
+ }
+
+ /**
+ * Sets the session state to the given value.
+ * @param state - state to set.
+ */
+ public void setSessionState(TraceSessionState state) {
+ fSessionInfo.setSessionState(state);
+ }
+
+ /**
+ * Sets the event state to the value specified by the given name.
+ * @param stateName - state to set.
+ */
+ public void setSessionState(String stateName) {
+ fSessionInfo.setSessionState(stateName);
+ }
+
+ /**
+ * @return path string where session is located.
+ */
+ public String getSessionPath() {
+ return fSessionInfo.getSessionPath();
+ }
+
+ /**
+ * Sets the path string (where session is located) to the given value.
+ * @param sessionPath - session path to set.
+ */
+ public void setSessionPath(String sessionPath) {
+ fSessionInfo.setSessionPath(sessionPath);
+ }
+
+ /**
+ * Returns if session is streamed over network
+ * @return <code>true</code> if streamed over network else <code>false</code>
+ */
+ public boolean isStreamedTrace() {
+ return fSessionInfo.isStreamedTrace();
+ }
+
+ /**
+ * Sets whether the trace is streamed or not
+ * @param isStreamedTrace <code>true</code> if streamed over network else <code>false</code>
+ */
+ public void setIsStreamedTrace(boolean isStreamedTrace) {
+ fSessionInfo.setStreamedTrace(isStreamedTrace);
+ }
+
+ /**
+ * Returns whether the session is snapshot session or not
+ * @return <code>true</code> if it is snapshot session else <code>false</code>
+ */
+ public boolean isSnapshotSession() {
+ return fSessionInfo.isSnapshotSession();
+ }
+
+ /**
+ * Gets the snapshot information if available whether the session is a snapshot session or not
+ * @return the snapshot information or null if it is not a snapshot session
+ */
+ public ISnapshotInfo getSnapshotInfo() {
+ return fSessionInfo.getSnapshotInfo();
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new TraceSessionPropertySource(this);
+ }
+ return null;
+ }
+
+ /**
+ * @return all available domains of this session.
+ */
+ public TraceDomainComponent[] getDomains() {
+ List<ITraceControlComponent> sessions = getChildren(TraceDomainComponent.class);
+ return sessions.toArray(new TraceDomainComponent[sessions.size()]);
+ }
+
+ /**
+ * @return the parent target node
+ */
+ public TargetNodeComponent getTargetNode() {
+ return ((TraceSessionGroup)getParent()).getTargetNode();
+ }
+
+ /**
+ * Returns whether the kernel provider is available or not
+ * @return <code>true</code> if kernel provide is available or <code>false</code>
+ */
+ public boolean hasKernelProvider() {
+ List<ITraceControlComponent> providerGroups = getTargetNode().getChildren(TraceProviderGroup.class);
+ return (!providerGroups.isEmpty() ? ((TraceProviderGroup) providerGroups.get(0)).hasKernelProvider() : false);
+ }
+
+ /**
+ * Returns if node supports filtering of events
+ * @return <code>true</code> if node supports filtering else <code>false</code>
+ */
+ public boolean isEventFilteringSupported() {
+ return ((TargetNodeComponent)getParent().getParent()).isEventFilteringSupported();
+ }
+
+ /**
+ * Returns if node supports snapshots or not
+ * @return <code>true</code> if it supports snapshots else <code>false</code>
+ *
+ */
+ public boolean isSnapshotSupported() {
+ return ((TargetNodeComponent)getParent().getParent()).isSnapshotSupported();
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Retrieves the session configuration from the node.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void getConfigurationFromNode(IProgressMonitor monitor)
+ throws ExecutionException {
+ removeAllChildren();
+ ISessionInfo oldSessionInfo = fSessionInfo;
+ fSessionInfo = getControlService().getSession(getName(), monitor);
+ copyLiveInfo(oldSessionInfo);
+
+ IDomainInfo[] domains = fSessionInfo.getDomains();
+ for (int i = 0; i < domains.length; i++) {
+ TraceDomainComponent domainComponent = new TraceDomainComponent(
+ domains[i].getName(), this);
+ addChild(domainComponent);
+ domainComponent.setDomainInfo(domains[i]);
+ }
+ }
+
+ /**
+ * Starts the session.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void startSession(IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().startSession(getName(), monitor);
+ }
+
+ /**
+ * Starts the session.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void stopSession(IProgressMonitor monitor) throws ExecutionException {
+ getControlService().stopSession(getName(), monitor);
+ }
+
+ /**
+ * Enables channels with given names which are part of this domain. If a
+ * given channel doesn't exists it creates a new channel with the given
+ * parameters (or default values if given parameter is null).
+ *
+ * @param channelNames
+ * - a list of channel names to enable on this domain
+ * @param info
+ * - channel information to set for the channel (use null for
+ * default)
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableChannels(List<String> channelNames, IChannelInfo info,
+ boolean isKernel, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableChannels(getName(), channelNames, isKernel,
+ info, monitor);
+ }
+
+ /**
+ * Enables a list of events with no additional parameters.
+ *
+ * @param eventNames
+ * - a list of event names to enabled.
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableEvents(List<String> eventNames, boolean isKernel,
+ String filterExpression, IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableEvents(getName(), null, eventNames, isKernel,
+ filterExpression, monitor);
+ }
+
+ /**
+ * Enables all syscalls (for kernel domain)
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableSyscalls(IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableSyscalls(getName(), null, monitor);
+ }
+
+ /**
+ * Enables a dynamic probe (for kernel domain)
+ *
+ * @param eventName
+ * - event name for probe
+ * @param isFunction
+ * - true for dynamic function entry/return probe else false
+ * @param probe
+ * - the actual probe
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableProbe(String eventName, boolean isFunction, String probe,
+ IProgressMonitor monitor) throws ExecutionException {
+ getControlService().enableProbe(getName(), null, eventName, isFunction,
+ probe, monitor);
+ }
+
+ /**
+ * Enables events using log level.
+ *
+ * @param eventName
+ * - a event name
+ * @param logLevelType
+ * - a log level type
+ * @param level
+ * - a log level
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void enableLogLevel(String eventName, LogLevelType logLevelType,
+ TraceLogLevel level, String filterExpression, IProgressMonitor monitor)
+ throws ExecutionException {
+ getControlService().enableLogLevel(getName(), null, eventName,
+ logLevelType, level, null, monitor);
+ }
+
+ /**
+ * Gets all available contexts to be added to channels/events.
+ *
+ * @param monitor
+ * The monitor that will indicate the progress
+ * @return the list of available contexts
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public List<String> getContextList(IProgressMonitor monitor)
+ throws ExecutionException {
+ return getControlService().getContextList(monitor);
+ }
+
+ /**
+ * Records a snapshot.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void recordSnapshot(IProgressMonitor monitor) throws ExecutionException {
+ getControlService().recordSnapshot(getName(), monitor);
+ }
+
+ /**
+ * Returns if session is live.
+ * @return <code>true</code> if session if live else <code>false</code>
+ */
+ public boolean isLiveTrace() {
+ return fSessionInfo.isLive();
+ }
+
+ /**
+ * Get the live URL.
+ *
+ * @return the live URL
+ */
+ public String getLiveUrl() {
+ return fSessionInfo.getLiveUrl();
+ }
+
+ /**
+ * Get the live port.
+ *
+ * @return the live port
+ */
+ public Integer getLivePort() {
+ return fSessionInfo.getLivePort();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+
+/**
+ * <p>
+ * Implementation of the trace session group.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceSessionGroup extends TraceControlComponent {
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component.
+ */
+ public static final String TRACE_SESSIONS_ICON_FILE = "icons/obj16/sessions.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public TraceSessionGroup(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(TRACE_SESSIONS_ICON_FILE);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return the parent target node
+ */
+ public TargetNodeComponent getTargetNode() {
+ return (TargetNodeComponent)getParent();
+ }
+
+ /**
+ * Returns if node supports networks streaming or not
+ * @return <code>true</code> if node supports filtering else <code>false</code>
+ */
+ public boolean isNetworkStreamingSupported() {
+ return getTargetNode().isNetworkStreamingSupported();
+ }
+ /**
+ * Returns if node supports snapshots or not
+ * @return <code>true</code> if it supports snapshots else <code>false</code>
+ *
+ */ public boolean isSnapshotSupported() {
+ return getTargetNode().isSnapshotSupported();
+ }
+
+ /**
+ * Returns if node supports live or not
+ *
+ * @return <code>true</code> if it supports live else <code>false</code>
+ */
+ public boolean isLiveSupported() {
+ return getTargetNode().isLiveSupported();
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Retrieves the sessions information from the node.
+ *
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void getSessionsFromNode() throws ExecutionException {
+ getSessionsFromNode(new NullProgressMonitor());
+ }
+
+ /**
+ * Retrieves the sessions information from the node.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void getSessionsFromNode(IProgressMonitor monitor)
+ throws ExecutionException {
+ String[] sessionNames = getControlService().getSessionNames(monitor);
+ for (int i = 0; i < sessionNames.length; i++) {
+ TraceSessionComponent session = new TraceSessionComponent(
+ sessionNames[i], this);
+ addChild(session);
+ session.getConfigurationFromNode(monitor);
+ }
+ }
+
+ /**
+ * Creates a session with given session name and location.
+ *
+ * @param sessionInf
+ * the session information used to create the session
+ *
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void createSession(ISessionInfo sessionInf, IProgressMonitor monitor) throws ExecutionException {
+ ISessionInfo sessionInfo = getControlService().createSession(sessionInf, monitor);
+
+ if (sessionInfo != null) {
+ TraceSessionComponent session = new TraceSessionComponent(sessionInfo, TraceSessionGroup.this);
+ addChild(session);
+ session.getConfigurationFromNode(monitor);
+ }
+ }
+
+ /**
+ * Command to execute a list of commands
+ * @param monitor
+ * - a progress monitor
+ * @param commands
+ * - a list of commands to execute
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void executeCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
+ getControlService().runCommands(monitor, commands);
+ getTargetNode().refresh();
+ }
+
+ /**
+ * Destroys a session with given session name.
+ *
+ * @param session
+ * - a session component to destroy
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public void destroySession(TraceSessionComponent session,
+ IProgressMonitor monitor) throws ExecutionException {
+ getControlService().destroySession(session.getName(), monitor);
+ session.removeAllChildren();
+ removeChild(session);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.ITraceControlComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.property.UstProviderPropertySource;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Implementation of the UST provider component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class UstProviderComponent extends TraceControlComponent {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Path to icon file for this component.
+ */
+ public static final String USTL_PROVIDER_ICON_FILE = "icons/obj16/targets.gif"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The UST provider information.
+ */
+ private IUstProviderInfo fProviderInfo = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param name - the name of the component.
+ * @param parent - the parent of this component.
+ */
+ public UstProviderComponent(String name, ITraceControlComponent parent) {
+ super(name, parent);
+ setImage(USTL_PROVIDER_ICON_FILE);
+ setToolTip(Messages.TraceControl_ProviderDisplayName);
+ fProviderInfo = new UstProviderInfo(name);
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * Sets the UST provider information to the given value.
+ * @param providerInfo - the provider information to set
+ */
+ public void setUstProvider(IUstProviderInfo providerInfo) {
+ fProviderInfo = providerInfo;
+ IBaseEventInfo[] events = providerInfo.getEvents();
+ for (int i = 0; i < events.length; i++) {
+ BaseEventComponent component = new BaseEventComponent(events[i].getName(), this);
+ component.setEventInfo(events[i]);
+ addChild(component);
+ }
+ setName(getName() + " [PID=" + fProviderInfo.getPid() + "]"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * @return the process ID of the UST provider.
+ */
+ public int getPid() {
+ return fProviderInfo.getPid();
+ }
+
+ /**
+ * Sets the process ID of the UST provider to the given value.
+ * @param pid - process ID to set
+ */
+ public void setPid(int pid) {
+ fProviderInfo.setPid(pid);
+ }
+
+ @Override
+ public Object getAdapter(Class adapter) {
+ if (adapter == IPropertySource.class) {
+ return new UstProviderPropertySource(this);
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+
+/**
+ * <p>
+ * A class to initialize the preferences.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ControlPreferenceInitializer extends AbstractPreferenceInitializer {
+
+ @Override
+ public void initializeDefaultPreferences() {
+ final IPreferenceStore store = ControlPreferences.getInstance().getPreferenceStore();
+
+ //Set default User ID if none already stored in preferences
+ store.setDefault(ControlPreferences.TRACE_CONTROL_TRACING_GROUP_PREF, ControlPreferences.TRACE_CONTROL_DEFAULT_TRACING_GROUP);
+ store.setDefault(ControlPreferences.TRACE_CONTROL_LOG_APPEND_PREF, false);
+ store.setDefault(ControlPreferences.TRACE_CONTROL_LOG_FILE_PATH_PREF, ControlPreferences.TRACE_CONTROL_DEFAULT_LOG_PATH);
+ store.setDefault(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, false);
+ store.setDefault(ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_PREF, ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_NONE);
+ store.setDefault(ControlPreferences.TRACE_CONTROL_COMMAND_TIMEOUT_PREF, ControlPreferences.TRACE_CONTROL_DEFAULT_TIMEOUT_VALUE);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.jface.preference.IntegerFieldEditor;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.jface.preference.StringFieldEditor;
+import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * <p>
+ * Preference page implementation for configuring LTTng tracer control preferences.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ControlPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private RadioGroupFieldEditor fVerboseLevel;
+ private BooleanFieldEditor fIsAppend;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ */
+ public ControlPreferencePage() {
+ super(FieldEditorPreferencePage.GRID);
+
+ // Set the preference store for the preference page.
+ IPreferenceStore store = ControlPreferences.getInstance().getPreferenceStore();
+ setPreferenceStore(store);
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void init(IWorkbench workbench) {
+ }
+
+ @Override
+ protected void createFieldEditors() {
+
+ StringFieldEditor tracingGroup = new StringFieldEditor(ControlPreferences.TRACE_CONTROL_TRACING_GROUP_PREF, Messages.TraceControl_TracingGroupPreference, getFieldEditorParent());
+ addField(tracingGroup);
+
+ BooleanFieldEditor logCommand = new BooleanFieldEditor(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF, Messages.TraceControl_LoggingPreference, getFieldEditorParent());
+ addField(logCommand);
+
+ StringFieldEditor logfile = new StringFieldEditor(ControlPreferences.TRACE_CONTROL_LOG_FILE_PATH_PREF, Messages.TraceControl_LogfilePath, getFieldEditorParent());
+ addField(logfile);
+
+ fIsAppend = new BooleanFieldEditor(ControlPreferences.TRACE_CONTROL_LOG_APPEND_PREF, Messages.TraceControl_AppendLogfilePreference, getFieldEditorParent());
+ addField(fIsAppend);
+
+ fVerboseLevel = new RadioGroupFieldEditor (
+ ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_PREF,
+ Messages.TraceControl_VerboseLevelsPreference,
+ 4,
+ new String[][] {
+ {
+ Messages.TraceControl_VerboseLevelNonePreference,
+ ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_NONE,
+ },
+ {
+ Messages.TraceControl_VerboseLevelVerbosePreference,
+ ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_VERBOSE
+ },
+ {
+ Messages.TraceControl_VerboseLevelVeryVerbosePreference,
+ ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_VERBOSE
+ },
+ {
+ Messages.TraceControl_VerboseLevelVeryVeryVerbosePreference,
+ ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE
+ }
+ },
+ getFieldEditorParent(),
+ true);
+
+ addField(fVerboseLevel);
+
+ Boolean enabled = ControlPreferences.getInstance().isLoggingEnabled();
+ fVerboseLevel.setEnabled(enabled, getFieldEditorParent());
+ fIsAppend.setEnabled(enabled, getFieldEditorParent());
+ logfile.setEnabled(false, getFieldEditorParent());
+
+ IntegerFieldEditor commandTimeout = new IntegerFieldEditor(ControlPreferences.TRACE_CONTROL_COMMAND_TIMEOUT_PREF, Messages.TraceControl_CommandTimeout, getFieldEditorParent());
+ commandTimeout.setValidRange(ControlPreferences.TRACE_CONTROL_MIN_TIMEOUT_VALUE, ControlPreferences.TRACE_CONTROL_MAX_TIMEOUT_VALUE);
+ addField(commandTimeout);
+ }
+
+ @Override
+ public void propertyChange(PropertyChangeEvent event) {
+
+ if (event.getProperty().equals(FieldEditor.VALUE)) {
+ if (event.getSource() instanceof FieldEditor) {
+ FieldEditor editor = (FieldEditor) event.getSource();
+ if (editor.getPreferenceName().equals(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF)) {
+ Boolean enabled = (Boolean)event.getNewValue();
+ fVerboseLevel.setEnabled(enabled, getFieldEditorParent());
+ fIsAppend.setEnabled(enabled, getFieldEditorParent());
+ }
+ }
+ }
+ super.propertyChange(event);
+ }
+
+ @Override
+ protected void performDefaults() {
+ super.performDefaults();
+ fVerboseLevel.setEnabled(false, getFieldEditorParent());
+ fIsAppend.setEnabled(false, getFieldEditorParent());
+ }
+
+ @Override
+ public boolean performOk() {
+ boolean ret = super.performOk();
+ // open or close log file
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.init(ControlPreferences.getInstance().getLogfilePath(), ControlPreferences.getInstance().isAppend());
+ } else {
+ ControlCommandLogger.close();
+ }
+ return ret;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences;
+
+import java.io.File;
+
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
+
+/**
+ * <p>
+ * Singleton class to access LTTng tracer control preferences.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class ControlPreferences {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Trace control log file
+ */
+ public static final String TRACE_CONTROL_LOG_FILENAME = "lttng_tracer_control.log"; //$NON-NLS-1$
+
+ // Preference strings
+ /**
+ * The tracing group preference
+ */
+ public static final String TRACE_CONTROL_TRACING_GROUP_PREF = "trace.control.tracing.group"; //$NON-NLS-1$
+ /**
+ * The log commands preference
+ */
+ public static final String TRACE_CONTROL_LOG_COMMANDS_PREF = "trace.control.log.commands"; //$NON-NLS-1$
+ /**
+ * The log append preference
+ */
+ public static final String TRACE_CONTROL_LOG_APPEND_PREF = "trace.control.log.append"; //$NON-NLS-1$
+ /**
+ * The log file path preference
+ */
+ public static final String TRACE_CONTROL_LOG_FILE_PATH_PREF = "trace.control.log.path"; //$NON-NLS-1$
+ /**
+ * The verbose level preference
+ */
+ public static final String TRACE_CONTROL_VERBOSE_LEVEL_PREF = "trace.control.verbose.level"; //$NON-NLS-1$
+ /**
+ * The command time-out preference
+ */
+ public static final String TRACE_CONTROL_COMMAND_TIMEOUT_PREF = "trace.control.command.timeout"; //$NON-NLS-1$
+ /**
+ * The verbose level value for none
+ */
+ public static final String TRACE_CONTROL_VERBOSE_LEVEL_NONE = "trace.control.verbose.level.none"; //$NON-NLS-1$
+ /**
+ * The verbose level value for level 1 (-v)
+ */
+ public static final String TRACE_CONTROL_VERBOSE_LEVEL_VERBOSE = "trace.control.verbose.level.v"; //$NON-NLS-1$
+ /**
+ * The verbose level value for level 2 (-vv)
+ */
+ public static final String TRACE_CONTROL_VERBOSE_LEVEL_V_VERBOSE = "trace.control.verbose.level.vv"; //$NON-NLS-1$
+ /**
+ * The verbose level value for level 3 (-vvv)
+ */
+ public static final String TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE = "trace.control.verbose.level.vvv"; //$NON-NLS-1$
+ /**
+ * The default tracing group
+ */
+ public static final String TRACE_CONTROL_DEFAULT_TRACING_GROUP = "tracing"; //$NON-NLS-1$
+ /**
+ * The default tracing log file name with absolute path
+ */
+ public static final String TRACE_CONTROL_DEFAULT_LOG_PATH = System.getProperty("user.home") + File.separator + TRACE_CONTROL_LOG_FILENAME; //$NON-NLS-1$
+ /**
+ * Default timeout value used for executing commands, in seconds
+ */
+ public static final int TRACE_CONTROL_DEFAULT_TIMEOUT_VALUE = 15;
+ /**
+ * Minimum timeout value used for executing commands, in seconds
+ */
+ public static final int TRACE_CONTROL_MIN_TIMEOUT_VALUE = 5;
+ /**
+ * Maximum timeout value used for executing commands, in seconds
+ */
+ public static final int TRACE_CONTROL_MAX_TIMEOUT_VALUE = 600;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The trace control preferences singleton instance.
+ */
+ private static ControlPreferences fInstance = null;
+ /**
+ * The preference store reference
+ */
+ private IPreferenceStore fPreferenceStore = null;
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+ /**
+ * Private constructor
+ */
+ private ControlPreferences() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * Returns the trace control preferences singleton instance
+ *
+ * @return the trace control preferences singleton instance
+ */
+ public static synchronized ControlPreferences getInstance() {
+ if (fInstance == null) {
+ fInstance = new ControlPreferences();
+ }
+ return fInstance;
+ }
+
+ /**
+ * @return the preference store
+ */
+ public IPreferenceStore getPreferenceStore() {
+ return fPreferenceStore;
+ }
+
+ /**
+ * @return true if tracing group is set to default
+ */
+ public boolean isDefaultTracingGroup() {
+ return fPreferenceStore.getString(TRACE_CONTROL_TRACING_GROUP_PREF).equals(fPreferenceStore.getDefaultString(TRACE_CONTROL_TRACING_GROUP_PREF));
+ }
+
+ /**
+ * @return value of tracing group preference
+ */
+ public String getTracingGroup() {
+ return fPreferenceStore.getString(TRACE_CONTROL_TRACING_GROUP_PREF);
+ }
+
+ /**
+ * @return whether is logging is enabled
+ */
+ public boolean isLoggingEnabled() {
+ return fPreferenceStore.getBoolean(TRACE_CONTROL_LOG_COMMANDS_PREF);
+ }
+
+ /**
+ * @return whether an existing log file will appended or not
+ */
+ public boolean isAppend() {
+ return fPreferenceStore.getBoolean(ControlPreferences.TRACE_CONTROL_LOG_APPEND_PREF);
+ }
+
+ /**
+ * @return verbose level preference
+ */
+ public String getVerboseLevel() {
+ return fPreferenceStore.getString(TRACE_CONTROL_VERBOSE_LEVEL_PREF);
+ }
+
+ /**
+ * @return absolute log file path
+ */
+ public String getLogfilePath() {
+ return fPreferenceStore.getString(TRACE_CONTROL_LOG_FILE_PATH_PREF);
+ }
+
+ /**
+ * @return command timeout value
+ */
+ public int getCommandTimeout() {
+ return fPreferenceStore.getInt(TRACE_CONTROL_COMMAND_TIMEOUT_PREF);
+ }
+
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Initializes the control preferences (e.g. enable open log file)
+ *
+ * @param preferenceStore
+ * The preference store to assign
+ */
+ public void init(IPreferenceStore preferenceStore) {
+ fPreferenceStore = preferenceStore;
+
+ if (fPreferenceStore.getBoolean(ControlPreferences.TRACE_CONTROL_LOG_COMMANDS_PREF)) {
+ ControlCommandLogger.init(getLogfilePath(), isAppend());
+ }
+ }
+
+ /**
+ * Disposes any resource (e.g. close log file).
+ */
+ public void dispose() {
+ ControlCommandLogger.close();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.BaseEventComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the base event component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class BaseEventPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * The base event 'name' property ID.
+ */
+ public static final String BASE_EVENT_NAME_PROPERTY_ID = "base.event.name"; //$NON-NLS-1$
+ /**
+ * The base event 'type' property ID.
+ */
+ public static final String BASE_EVENT_TYPE_PROPERTY_ID = "base.event.type"; //$NON-NLS-1$
+ /**
+ * The base event 'log level' property ID.
+ */
+ public static final String BASE_EVENT_LOGLEVEL_PROPERTY_ID = "base.event.loglevel"; //$NON-NLS-1$
+ /**
+ * The base event 'fields' property ID.
+ */
+ public static final String BASE_EVENT_FIELDS_PROPERTY_ID = "base.event.fields"; //$NON-NLS-1$
+ /**
+ * The base event 'name' property name.
+ */
+ public static final String BASE_EVENT_NAME_PROPERTY_NAME = Messages.TraceControl_EventNamePropertyName;
+ /**
+ * The base event 'type' property name.
+ */
+ public static final String BASE_EVENT_TYPE_PROPERTY_NAME = Messages.TraceControl_EventTypePropertyName;
+ /**
+ * The base event 'log level' property name.
+ */
+ public static final String BASE_EVENT_LOGLEVEL_PROPERTY_NAME = Messages.TraceControl_LogLevelPropertyName;
+ /**
+ * The base event 'fields' property name.
+ */
+ public static final String BASE_EVENT_FIELDS_PROPERTY_NAME = Messages.TraceControl_FieldsPropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The base event component which this property source is for.
+ */
+ private final BaseEventComponent fBaseEvent;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param component - the base event component
+ */
+ public BaseEventPropertySource(BaseEventComponent component) {
+ fBaseEvent = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ List<IPropertyDescriptor> list = new ArrayList<> ();
+ list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_NAME_PROPERTY_ID, BASE_EVENT_NAME_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_TYPE_PROPERTY_ID, BASE_EVENT_TYPE_PROPERTY_NAME));
+ if (fBaseEvent.getLogLevel() != TraceLogLevel.LEVEL_UNKNOWN) {
+ list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_LOGLEVEL_PROPERTY_ID, BASE_EVENT_LOGLEVEL_PROPERTY_NAME));
+ }
+ if (fBaseEvent.getFieldString() != null) {
+ list.add(new ReadOnlyTextPropertyDescriptor(BASE_EVENT_FIELDS_PROPERTY_ID, BASE_EVENT_FIELDS_PROPERTY_NAME));
+ }
+ return list.toArray(new IPropertyDescriptor[list.size()]);
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(BASE_EVENT_NAME_PROPERTY_ID.equals(id)) {
+ return fBaseEvent.getName();
+ }
+ if (BASE_EVENT_TYPE_PROPERTY_ID.equals(id)) {
+ return fBaseEvent.getEventType().name();
+ }
+ if (BASE_EVENT_LOGLEVEL_PROPERTY_ID.equals(id)) {
+ return fBaseEvent.getLogLevel().name();
+ }
+ if (BASE_EVENT_FIELDS_PROPERTY_ID.equals(id)) {
+ return fBaseEvent.getFieldString();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+/**
+ * <p>
+ * Base property source implementation.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public abstract class BasePropertySource implements IPropertySource {
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Object getEditableValue() {
+ return null;
+ }
+
+ @Override
+ public abstract IPropertyDescriptor[] getPropertyDescriptors();
+
+ @Override
+ public abstract Object getPropertyValue(Object id);
+
+ @Override
+ public boolean isPropertySet(Object id) {
+ return false;
+ }
+
+ @Override
+ public void resetPropertyValue(Object id) {
+ }
+
+ @Override
+ public void setPropertyValue(Object id, Object value) {
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the kernl provider component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class KernelProviderPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * The kernel provider 'name' property ID.
+ */
+ public static final String KERNEL_PROVIDER_NAME_PROPERTY_ID = "ust.provider.name"; //$NON-NLS-1$
+ /**
+ * The kernel provider 'name' property name.
+ */
+ public static final String KERNEL_PROVIDER_NAME_PROPERTY_NAME = Messages.TraceControl_ProviderNamePropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The kernel provider component which this property source is for.
+ */
+ private KernelProviderComponent fProvider;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param component - the kernel provider component
+ */
+ public KernelProviderPropertySource(KernelProviderComponent component) {
+ fProvider = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[] {
+ new ReadOnlyTextPropertyDescriptor(KERNEL_PROVIDER_NAME_PROPERTY_ID, KERNEL_PROVIDER_NAME_PROPERTY_NAME)};
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(KERNEL_PROVIDER_NAME_PROPERTY_ID.equals(id)) {
+ return fProvider.getName();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the target node component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TargetNodePropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The node name property ID.
+ */
+ public static final String TARGET_NODE_NAME_PROPERTY_ID = "target.node.name"; //$NON-NLS-1$
+ /**
+ * The node address property ID.
+ */
+ public static final String TARGET_NODE_ADDRESS_PROPERTY_ID = "target.node.address"; //$NON-NLS-1$
+ /**
+ * The state property ID.
+ */
+ public static final String TARGET_NODE_STATE_PROPERTY_ID = "target.node.state"; //$NON-NLS-1$
+ /**
+ * The node version property ID.
+ */
+ public static final String TARGET_NODE_VERSION_PROPERTY_ID = "target.node.version"; //$NON-NLS-1$
+
+ /**
+ * The node name property name.
+ */
+ public static final String TARGET_NODE_NAME_PROPERTY_NAME = Messages.TraceControl_HostNamePropertyName;
+ /**
+ * The node address property name.
+ */
+ public static final String TARGET_NODE_ADDRESS_PROPERTY_NAME = Messages.TraceControl_HostAddressPropertyName;
+ /**
+ * The state address property name.
+ */
+ public static final String TARGET_NODE_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
+ /**
+ * The node version property name.
+ */
+ public static final String TARGET_NODE_VERSION_PROPERTY_NAME = Messages.TraceControl_VersionPropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The node component which this property source is for.
+ */
+ private final TargetNodeComponent fTargetNode;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param component - the node component
+ */
+ public TargetNodePropertySource(TargetNodeComponent component) {
+ fTargetNode = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[] {
+ new ReadOnlyTextPropertyDescriptor(TARGET_NODE_NAME_PROPERTY_ID, TARGET_NODE_NAME_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TARGET_NODE_ADDRESS_PROPERTY_ID, TARGET_NODE_ADDRESS_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TARGET_NODE_STATE_PROPERTY_ID, TARGET_NODE_STATE_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TARGET_NODE_VERSION_PROPERTY_ID, TARGET_NODE_VERSION_PROPERTY_NAME)};
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(TARGET_NODE_NAME_PROPERTY_ID.equals(id)) {
+ return fTargetNode.getName();
+ }
+ if (TARGET_NODE_ADDRESS_PROPERTY_ID.equals(id)) {
+ return fTargetNode.getHostName();
+ }
+ if (TARGET_NODE_STATE_PROPERTY_ID.equals(id)) {
+ return fTargetNode.getTargetNodeState().name();
+ }
+ if (TARGET_NODE_VERSION_PROPERTY_ID.equals(id)) {
+ return fTargetNode.getNodeVersion();
+ }
+ return null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the trace channel component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceChannelPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The trace channel 'name' property ID.
+ */
+ public static final String TRACE_CHANNEL_NAME_PROPERTY_ID = "trace.channel.name"; //$NON-NLS-1$
+ /**
+ * The trace channel 'state' ID.
+ */
+ public static final String TRACE_CHANNEL_STATE_PROPERTY_ID = "trace.channel.state"; //$NON-NLS-1$
+ /**
+ * The trace channel 'overwrite mode' property ID.
+ */
+ public static final String TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID = "trace.channel.overwrite.mode"; //$NON-NLS-1$
+ /**
+ * The trace channel 'sub-buffer size' property ID.
+ */
+ public static final String TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID = "trace.channel.subbuffer.size"; //$NON-NLS-1$
+ /**
+ * The trace channel 'number of sub-buffers' property ID.
+ */
+ public static final String TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID = "trace.channel.no.subbuffers"; //$NON-NLS-1$
+ /**
+ * The trace channel 'switch timer interval' property ID.
+ */
+ public static final String TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID = "trace.channel.switch.timer"; //$NON-NLS-1$
+ /**
+ * The trace channel 'read timer interval' property ID.
+ */
+ public static final String TRACE_CHANNEL_READ_TIMER_PROPERTY_ID = "trace.channel.read.timer"; //$NON-NLS-1$
+ /**
+ * The trace channel 'output type' property ID.
+ */
+ public static final String TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID = "trace.channel.output.type"; //$NON-NLS-1$
+ /**
+ * The trace channel 'name' property name.
+ */
+ public static final String TRACE_CHANNEL_NAME_PROPERTY_NAME = Messages.TraceControl_ChannelNamePropertyName;
+ /**
+ * The trace channel 'state' property name.
+ */
+ public static final String TRACE_CHANNEL_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
+ /**
+ * The trace channel 'overwrite mode' property name.
+ */
+ public static final String TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_NAME = Messages.TraceControl_OverwriteModePropertyName;
+ /**
+ * The trace channel 'sub-buffer size' property name.
+ */
+ public static final String TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_NAME = Messages.TraceControl_SubBufferSizePropertyName;
+ /**
+ * The trace channel 'sub-buffer size' property name.
+ */
+ public static final String TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_NAME = Messages.TraceControl_NbSubBuffersPropertyName;
+ /**
+ * The trace channel 'switch timer interval' property name.
+ */
+ public static final String TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_NAME = Messages.TraceControl_SwitchTimerPropertyName;
+ /**
+ * The trace channel 'read timer interval' property name.
+ */
+ public static final String TRACE_CHANNEL_READ_TIMER_PROPERTY_NAME = Messages.TraceControl_ReadTimerPropertyName;
+ /**
+ * The trace channel 'output type' property name.
+ */
+ public static final String TRACE_CHANNEL_OUTPUT_TYPEPROPERTY_NAME = Messages.TraceControl_OutputTypePropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The channel component which this property source is for.
+ */
+ private final TraceChannelComponent fChannel;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ * @param component - the channel component
+ */
+ public TraceChannelPropertySource(TraceChannelComponent component) {
+ fChannel = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[] {
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_NAME_PROPERTY_ID, TRACE_CHANNEL_NAME_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_STATE_PROPERTY_ID, TRACE_CHANNEL_STATE_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID, TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID, TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID, TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID, TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_READ_TIMER_PROPERTY_ID, TRACE_CHANNEL_READ_TIMER_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID, TRACE_CHANNEL_OUTPUT_TYPEPROPERTY_NAME)};
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(TRACE_CHANNEL_NAME_PROPERTY_ID.equals(id)) {
+ return fChannel.getName();
+ }
+ if (TRACE_CHANNEL_STATE_PROPERTY_ID.equals(id)) {
+ return fChannel.getState().name();
+ }
+ if(TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID.equals(id)) {
+ return String.valueOf(fChannel.isOverwriteMode());
+ }
+ if(TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID.equals(id)) {
+ return String.valueOf(fChannel.getSubBufferSize());
+ }
+ if(TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID.equals(id)) {
+ return String.valueOf(fChannel.getNumberOfSubBuffers());
+ }
+ if(TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID.equals(id)) {
+ return String.valueOf(fChannel.getSwitchTimer());
+ }
+ if(TRACE_CHANNEL_READ_TIMER_PROPERTY_ID.equals(id)) {
+ return String.valueOf(fChannel.getReadTimer());
+ }
+ if(TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID.equals(id)) {
+ return fChannel.getOutputType().getInName();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the trace domain component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceDomainPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * The trace domain 'name' property ID.
+ */
+ public static final String TRACE_DOMAIN_NAME_PROPERTY_ID = "trace.domain.name"; //$NON-NLS-1$
+ /**
+ * The trace domain 'name' property name.
+ */
+ public static final String TRACE_DOMAIN_NAME_PROPERTY_NAME = Messages.TraceControl_DomainNamePropertyName;
+ /**
+ * The domain 'buffer type' property ID.
+ */
+ public static final String BUFFER_TYPE_PROPERTY_ID = "trace.domain.bufferType"; //$NON-NLS-1$
+ /**
+ * The domain 'buffer type' property name.
+ */
+ public static final String BUFER_TYPE_PROPERTY_NAME = Messages.TraceControl_BufferTypePropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The trace domain component which this property source is for.
+ */
+ private final TraceDomainComponent fDomain;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param component - the trace domain component
+ */
+ public TraceDomainPropertySource(TraceDomainComponent component) {
+ fDomain = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ if (fDomain.getBufferType() == BufferType.BUFFER_TYPE_UNKNOWN) {
+ return new IPropertyDescriptor[] {
+ new ReadOnlyTextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID, TRACE_DOMAIN_NAME_PROPERTY_NAME) };
+ }
+
+ return new IPropertyDescriptor[] {
+ new ReadOnlyTextPropertyDescriptor(TRACE_DOMAIN_NAME_PROPERTY_ID, TRACE_DOMAIN_NAME_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(BUFFER_TYPE_PROPERTY_ID, BUFER_TYPE_PROPERTY_NAME) };
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(BUFFER_TYPE_PROPERTY_ID.equals(id)){
+ return fDomain.getBufferType().getInName();
+ }
+
+ if(TRACE_DOMAIN_NAME_PROPERTY_ID.equals(id)) {
+ return fDomain.getName();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the trace event component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceEventPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The trace event 'name' property ID.
+ */
+ public static final String TRACE_EVENT_NAME_PROPERTY_ID = "trace.event.name"; //$NON-NLS-1$
+ /**
+ * The trace event 'type' property ID.
+ */
+ public static final String TRACE_EVENT_TYPE_PROPERTY_ID = "trace.event.type"; //$NON-NLS-1$
+ /**
+ * The trace event 'log level' property ID.
+ */
+ public static final String TRACE_EVENT_LOGLEVEL_PROPERTY_ID = "trace.event.loglevel"; //$NON-NLS-1$
+ /**
+ * The trace event 'state' property ID.
+ */
+ public static final String TRACE_EVENT_STATE_PROPERTY_ID = "trace.event.state"; //$NON-NLS-1$
+ /**
+ * The trace event 'filter' property ID.
+ */
+ public static final String TRACE_EVENT_FILTER_PROPERTY_ID = "trace.event.filter"; //$NON-NLS-1$
+
+ /**
+ * The trace event 'name' property name.
+ */
+ public static final String TRACE_EVENT_NAME_PROPERTY_NAME = Messages.TraceControl_EventNamePropertyName;
+ /**
+ * The trace event 'type' property name.
+ */
+ public static final String TRACE_EVENT_TYPE_PROPERTY_NAME = Messages.TraceControl_EventTypePropertyName;
+ /**
+ * The trace event 'log level' property name.
+ */
+ public static final String TRACE_EVENT_LOGLEVEL_PROPERTY_NAME = Messages.TraceControl_LogLevelPropertyName;
+ /**
+ * The trace event 'state' property name.
+ */
+ public static final String TRACE_EVENT_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
+ /**
+ * The trace event 'filter' property name.
+ */
+ public static final String TRACE_EVENT_FILTER_PROPERTY_NAME = Messages.TraceControl_FilterPropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The event component which this property source is for.
+ */
+ protected final TraceEventComponent fEvent;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param component - the base event component
+ */
+ public TraceEventPropertySource(TraceEventComponent component) {
+ fEvent = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ List<IPropertyDescriptor> list = new ArrayList<> ();
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_NAME_PROPERTY_ID, TRACE_EVENT_NAME_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_TYPE_PROPERTY_ID, TRACE_EVENT_TYPE_PROPERTY_NAME));
+ list.add( new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_STATE_PROPERTY_ID, TRACE_EVENT_STATE_PROPERTY_NAME));
+ if (fEvent.getLogLevel() != TraceLogLevel.LEVEL_UNKNOWN) {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_LOGLEVEL_PROPERTY_ID, TRACE_EVENT_LOGLEVEL_PROPERTY_NAME));
+ }
+ if (fEvent.getFilterExpression() != null) {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_FILTER_PROPERTY_ID, TRACE_EVENT_FILTER_PROPERTY_NAME));
+ }
+ return list.toArray(new IPropertyDescriptor[list.size()]);
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(TRACE_EVENT_NAME_PROPERTY_ID.equals(id)) {
+ return fEvent.getName();
+ }
+ if (TRACE_EVENT_TYPE_PROPERTY_ID.equals(id)) {
+ return fEvent.getEventType().name();
+ }
+ if (TRACE_EVENT_LOGLEVEL_PROPERTY_ID.equals(id)) {
+ StringBuffer buffer = new StringBuffer();
+ if (fEvent.getLogLevelType() != LogLevelType.LOGLEVEL_NONE) {
+ buffer.append(fEvent.getLogLevelType().getShortName()).append(' ');
+ }
+ buffer.append(fEvent.getLogLevel().name());
+ return buffer.toString();
+ }
+ if (TRACE_EVENT_STATE_PROPERTY_ID.equals(id)) {
+ return fEvent.getState().name();
+ }
+ if (TRACE_EVENT_FILTER_PROPERTY_ID.equals(id)) {
+ return fEvent.getFilterExpression();
+ }
+
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceEventComponent;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the trace probe event component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceProbeEventPropertySource extends TraceEventPropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The trace event 'probe address' property ID.
+ */
+ public static final String TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID = "trace.event.probe.address"; //$NON-NLS-1$
+ /**
+ * The trace event 'probe offset' property ID.
+ */
+ public static final String TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID = "trace.event.probe.offset"; //$NON-NLS-1$
+ /**
+ * The trace event 'probe symbol' property ID.
+ */
+ public static final String TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID = "trace.event.probe.symbol"; //$NON-NLS-1$
+ /**
+ * The trace event 'probe address' property name.
+ */
+ public static final String TRACE_EVENT_PROBE_ADDRESS_PROPERTY_NAME = Messages.TraceControl_ProbeAddressPropertyName;
+ /**
+ * The trace event 'probe offset' property ID.
+ */
+ public static final String TRACE_EVENT_PROBE_OFFSET_PROPERTY_NAME = Messages.TraceControl_ProbeOffsetPropertyName;
+ /**
+ * The trace event 'probe symbol' property ID.
+ */
+ public static final String TRACE_EVENT_PROBE_SYMBOL_PROPERTY_NAME = Messages.TraceControl_ProbeSymbolPropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param component
+ * A trace event component
+ */
+ public TraceProbeEventPropertySource(TraceEventComponent component) {
+ super(component);
+ if (component.getClass() != TraceProbeEventComponent.class) {
+ throw new IllegalArgumentException("Invalid type passed. Only class of type TraceProbeEventComponent allowed:\n" + component.getClass()); //$NON-NLS-1$
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ IPropertyDescriptor[] superProperties = super.getPropertyDescriptors();
+
+ List<IPropertyDescriptor> superList = Arrays.asList(superProperties);
+ ArrayList<IPropertyDescriptor> list = new ArrayList<>();
+ list.addAll(superList);
+
+ if (fEvent instanceof TraceProbeEventComponent) {
+ TraceProbeEventComponent event = (TraceProbeEventComponent) fEvent;
+ if (event.getAddress() != null) {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID, TRACE_EVENT_PROBE_ADDRESS_PROPERTY_NAME));
+ }
+
+ if (event.getOffset() != null) {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID, TRACE_EVENT_PROBE_OFFSET_PROPERTY_NAME));
+ }
+
+ if (event.getSymbol() != null) {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID, TRACE_EVENT_PROBE_SYMBOL_PROPERTY_NAME));
+ }
+ }
+ return list.toArray(new IPropertyDescriptor[list.size()]);
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID.equals(id)) {
+ return ((TraceProbeEventComponent)fEvent).getAddress();
+ }
+ if (TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID.equals(id)) {
+ return ((TraceProbeEventComponent)fEvent).getOffset();
+ }
+ if (TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID.equals(id)) {
+ return ((TraceProbeEventComponent)fEvent).getSymbol();
+ }
+ return super.getPropertyValue(id);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the trace session component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class TraceSessionPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The trace session name property ID.
+ */
+ public static final String TRACE_SESSION_NAME_PROPERTY_ID = "trace.session.name"; //$NON-NLS-1$
+ /**
+ * The trace session path property ID.
+ */
+ public static final String TRACE_SESSION_PATH_PROPERTY_ID = "trace.session.path"; //$NON-NLS-1$
+ /**
+ * The trace session state ID.
+ */
+ public static final String TRACE_SESSION_STATE_PROPERTY_ID = "trace.session.state"; //$NON-NLS-1$
+ /**
+ * The trace snapshot path property ID.
+ */
+ public static final String TRACE_SNAPSHOT_PATH_PROPERTY_ID = "trace.snapshot.path"; //$NON-NLS-1$
+ /**
+ * The snapshot name property.
+ */
+ public static final String TRACE_SNAPSHOT_NAME_PROPERTY_ID = "trace.snapshot.name"; //$NON-NLS-1$
+ /**
+ * The snapshot ID property.
+ */
+ public static final String TRACE_SNAPSHOT_ID_PROPERTY_ID = "trace.snapshot.id"; //$NON-NLS-1$
+
+ /**
+ * The trace session name property name.
+ */
+ public static final String TRACE_SESSION_NAME_PROPERTY_NAME = Messages.TraceControl_SessionNamePropertyName;
+ /**
+ * The trace session path property name.
+ */
+ public static final String TRACE_SESSION_PATH_PROPERTY_NAME = Messages.TraceControl_SessionPathPropertyName;
+ /**
+ * The trace session state property name.
+ */
+ public static final String TRACE_SESSION_STATE_PROPERTY_NAME = Messages.TraceControl_StatePropertyName;
+ /**
+ * The snapshot path property name.
+ */
+ public static final String TRACE_SNAPSHOT_PATH_PROPERTY_NAME = Messages.TraceControl_SnapshotPathPropertyName;
+ /**
+ * The trace snapshot name property name.
+ */
+ public static final String TRACE_SNAPSHOT_NAME_PROPERTY_NAME = Messages.TraceControl_SnapshotNamePropertyName;
+ /**
+ * The trace snapshot ID property name.
+ */
+ public static final String TRACE_SNAPSHOT_ID_PROPERTY_NAME = Messages.TraceControl_SnapshotIdPropertyName;
+
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The session component which this property source is for.
+ */
+ private final TraceSessionComponent fSession;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param component - the session component
+ */
+ public TraceSessionPropertySource(TraceSessionComponent component) {
+ fSession = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ List<IPropertyDescriptor> list = new ArrayList<>();
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_NAME_PROPERTY_ID, TRACE_SESSION_NAME_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_STATE_PROPERTY_ID, TRACE_SESSION_STATE_PROPERTY_NAME));
+ if (fSession.isSnapshotSession()) {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_NAME_PROPERTY_ID, TRACE_SNAPSHOT_NAME_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_PATH_PROPERTY_ID, TRACE_SNAPSHOT_PATH_PROPERTY_NAME));
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SNAPSHOT_ID_PROPERTY_ID, TRACE_SNAPSHOT_ID_PROPERTY_NAME));
+ } else {
+ list.add(new ReadOnlyTextPropertyDescriptor(TRACE_SESSION_PATH_PROPERTY_ID, TRACE_SESSION_PATH_PROPERTY_NAME));
+ }
+ return(list.toArray(new IPropertyDescriptor[list.size()]));
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(TRACE_SESSION_NAME_PROPERTY_ID.equals(id)) {
+ return fSession.getName();
+ }
+ if(TRACE_SESSION_PATH_PROPERTY_ID.equals(id)) {
+ return fSession.getSessionPath();
+ }
+ if (TRACE_SESSION_STATE_PROPERTY_ID.equals(id)) {
+ return fSession.getSessionState().name();
+ }
+ if (TRACE_SNAPSHOT_PATH_PROPERTY_ID.equals(id)) {
+ return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getSnapshotPath() : ""); //$NON-NLS-1$
+ }
+ if (TRACE_SNAPSHOT_NAME_PROPERTY_ID.equals(id)) {
+ return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getName() : ""); //$NON-NLS-1$
+ }
+ if (TRACE_SNAPSHOT_ID_PROPERTY_ID.equals(id)) {
+ return (fSession.isSnapshotSession() ? fSession.getSnapshotInfo().getId() : ""); //$NON-NLS-1$
+ }
+ return null;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.property;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.model.impl.UstProviderComponent;
+import org.eclipse.linuxtools.tmf.ui.properties.ReadOnlyTextPropertyDescriptor;
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+
+/**
+ * <p>
+ * Property source implementation for the UST provider component.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class UstProviderPropertySource extends BasePropertySource {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * The UST provider 'name' property ID.
+ */
+ public static final String UST_PROVIDER_NAME_PROPERTY_ID = "ust.provider.name"; //$NON-NLS-1$
+ /**
+ * The UST provider 'PID' property ID.
+ */
+ public static final String UST_PROVIDER_PID_PROPERTY_ID = "ust.provider.pid"; //$NON-NLS-1$
+ /**
+ * The UST provider 'name' property name.
+ */
+ public static final String UST_PROVIDER_NAME_PROPERTY_NAME = Messages.TraceControl_ProviderNamePropertyName;
+ /**
+ * The UST provider 'type' property name.
+ */
+ public static final String UST_PROVIDER_PID_PROPERTY_NAME = Messages.TraceControl_ProcessIdPropertyName;
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The UST provider component which this property source is for.
+ */
+ private UstProviderComponent fUstProvider;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ * @param component - the UST provider component
+ */
+ public UstProviderPropertySource(UstProviderComponent component) {
+ fUstProvider = component;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ return new IPropertyDescriptor[] {
+ new ReadOnlyTextPropertyDescriptor(UST_PROVIDER_NAME_PROPERTY_ID, UST_PROVIDER_NAME_PROPERTY_NAME),
+ new ReadOnlyTextPropertyDescriptor(UST_PROVIDER_PID_PROPERTY_ID, UST_PROVIDER_PID_PROPERTY_NAME)};
+ }
+
+ @Override
+ public Object getPropertyValue(Object id) {
+ if(UST_PROVIDER_NAME_PROPERTY_ID.equals(id)) {
+ return fUstProvider.getName();
+ }
+ if (UST_PROVIDER_PID_PROPERTY_ID.equals(id)) {
+ return String.valueOf(fUstProvider.getPid());
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
+
+import java.util.Arrays;
+
+/**
+ * <p>
+ * Class containing command result of remote command execution.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class CommandResult implements ICommandResult {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The result of the command. 0 if successful else > 0
+ */
+ private int fResult;
+
+ /**
+ * The output as String array.
+ */
+ private String[] fOutput = new String[0];
+ private String[] fErrorOutput = new String[0];
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param result
+ * The result of the command
+ * @param output
+ * The output, as an array of strings
+ * @param errorOutput
+ * THe error output as an array of strings
+ */
+ public CommandResult(int result, String[] output, String[] errorOutput) {
+ fResult = result;
+ if (output != null) {
+ fOutput = Arrays.copyOf(output, output.length);
+ }
+ if (errorOutput != null) {
+ fErrorOutput = Arrays.copyOf(errorOutput, errorOutput.length);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int getResult() {
+ return fResult;
+ }
+
+ @Override
+ public void setResult(int result) {
+ fResult = result;
+ }
+
+ @Override
+ public String[] getOutput() {
+ return Arrays.copyOf(fOutput, fOutput.length);
+ }
+
+ @Override
+ public void setOutput(String[] output) {
+ fOutput = new String[0];
+ if (output != null) {
+ fOutput = Arrays.copyOf(output, output.length);
+ }
+ }
+
+ @Override
+ public String[] getErrorOutput() {
+ return Arrays.copyOf(fErrorOutput, fErrorOutput.length);
+ }
+
+ @Override
+ public void setErrorOutput(String[] output) {
+ fErrorOutput = new String[0];
+ if (output != null) {
+ fErrorOutput = Arrays.copyOf(output, output.length);
+ }
+ }
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Patrick Tasse - Initial API and implementation
+ * Bernd Hufmann - Updated using Executor Framework
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Random;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
+import org.eclipse.rse.services.shells.HostShellProcessAdapter;
+import org.eclipse.rse.services.shells.IHostShell;
+import org.eclipse.rse.services.shells.IShellService;
+
+/**
+ * <p>
+ * Implementation of remote command execution using RSE's shell service.
+ * </p>
+ *
+ * @author Patrick Tasse
+ * @author Bernd Hufmann
+ */
+public class CommandShell implements ICommandShell {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /** Sub-string to be echo'ed when running command in shell, used to indicate that the command has finished running */
+ public static final String DONE_MARKUP_STRING = "--RSE:donedonedone:--"; //$NON-NLS-1$
+
+ /** Sub-string to be echoed when running a command in shell. */
+ public static final String BEGIN_END_TAG = "BEGIN-END-TAG:"; //$NON-NLS-1$
+
+ /** Command delimiter for shell */
+ public static final String CMD_DELIMITER = "\n"; //$NON-NLS-1$
+
+ /** Shell "echo" command */
+ public static final String SHELL_ECHO_CMD = " echo "; //$NON-NLS-1$
+
+ /** Default command separator */
+ public static final char CMD_SEPARATOR = ';';
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ private IRemoteSystemProxy fProxy = null;
+ private IHostShell fHostShell = null;
+ private BufferedReader fInputBufferReader = null;
+ private BufferedReader fErrorBufferReader = null;
+ private final ExecutorService fExecutor = Executors.newFixedThreadPool(1);
+ private boolean fIsConnected = false;
+ private final Random fRandom = new Random(System.currentTimeMillis());
+ private int fReturnValue;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Create a new command shell
+ *
+ * @param proxy
+ * The RSE proxy for this shell
+ */
+ public CommandShell(IRemoteSystemProxy proxy) {
+ fProxy = proxy;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void connect() throws ExecutionException {
+ IShellService shellService = fProxy.getShellService();
+ Process p = null;
+ try {
+ String[] env = new String[0];
+
+ if (fProxy.isLocal()) {
+ env = shellService.getHostEnvironment();
+ }
+
+ fHostShell = shellService.launchShell("", env, new NullProgressMonitor()); //$NON-NLS-1$
+ p = new HostShellProcessAdapter(fHostShell);
+ } catch (Exception e) {
+ throw new ExecutionException(Messages.TraceControl_CommandShellError, e);
+ }
+ fInputBufferReader = new BufferedReader(new InputStreamReader(p.getInputStream()));
+ fErrorBufferReader = new BufferedReader(new InputStreamReader(p.getErrorStream()));
+ fIsConnected = true;
+ }
+
+ @Override
+ public void disconnect() {
+ fIsConnected = false;
+ try {
+ fInputBufferReader.close();
+ fErrorBufferReader.close();
+ } catch (IOException e) {
+ // ignore
+ }
+ }
+
+ @Override
+ public ICommandResult executeCommand(String command, IProgressMonitor monitor) throws ExecutionException {
+ return executeCommand(command, monitor, true);
+ }
+
+ @Override
+ public ICommandResult executeCommand(final String command, final IProgressMonitor monitor, final boolean checkReturnValue) throws ExecutionException {
+ if (fIsConnected) {
+ FutureTask<CommandResult> future = new FutureTask<>(new Callable<CommandResult>() {
+ @Override
+ public CommandResult call() throws IOException, CancellationException {
+ final ArrayList<String> result = new ArrayList<>();
+ final ArrayList<String> errorResult = new ArrayList<>();
+
+ synchronized (fHostShell) {
+ // Initialize return value which will be updated in isAliasEchoResult()
+ fReturnValue = 0;
+
+ int startAlias = fRandom.nextInt();
+ int endAlias = fRandom.nextInt();
+ fHostShell.writeToShell(formatShellCommand(command, startAlias, endAlias));
+
+ String nextLine;
+ boolean isStartFound = false;
+ while ((nextLine = fInputBufferReader.readLine()) != null) {
+
+ if (monitor.isCanceled()) {
+ flushInput();
+ throw new CancellationException();
+ }
+
+ // check if line contains echoed start alias
+ if (isAliasEchoResult(nextLine, startAlias, true)) {
+ isStartFound = true;
+ continue;
+ }
+
+ // check if line contains is the end mark-up. This will retrieve also
+ // the return value of the actual command.
+ if (isAliasEchoResult(nextLine, endAlias, false)) {
+ break;
+ }
+
+ // Ignore line if
+ // 1) start hasn't been found or
+ // 2) line is an echo of the command or
+ // 3) line is an echo of the end mark-up
+ if (!isStartFound ||
+ isCommandEcho(nextLine, command) ||
+ nextLine.contains(getEchoResult(endAlias)))
+ {
+ continue;
+ }
+
+ // Now it's time add to the result
+ result.add(nextLine);
+ }
+
+ // Read any left over output
+ flushInput();
+
+ // Read error stream output when command failed.
+ if (fReturnValue != 0) {
+ while(fErrorBufferReader.ready()) {
+ if ((nextLine = fErrorBufferReader.readLine()) != null) {
+ errorResult.add(nextLine);
+ }
+ }
+ // Workaround if error stream is not available and stderr output is written
+ // in standard output above. This is true for the SshTerminalShell implementation.
+ if (errorResult.isEmpty()) {
+ errorResult.addAll(result);
+ }
+ }
+ }
+ return new CommandResult(fReturnValue, result.toArray(new String[result.size()]), errorResult.toArray(new String[errorResult.size()]));
+ }
+ });
+
+ fExecutor.execute(future);
+
+ try {
+ return future.get(ControlPreferences.getInstance().getCommandTimeout(), TimeUnit.SECONDS);
+ } catch (java.util.concurrent.ExecutionException ex) {
+ throw new ExecutionException(Messages.TraceControl_ExecutionFailure, ex);
+ } catch (InterruptedException ex) {
+ throw new ExecutionException(Messages.TraceControl_ExecutionCancelled, ex);
+ } catch (TimeoutException ex) {
+ throw new ExecutionException(Messages.TraceControl_ExecutionTimeout, ex);
+ }
+ }
+ throw new ExecutionException(Messages.TraceControl_ShellNotConnected, null);
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+ /**
+ * Flushes the buffer reader
+ * @throws IOException
+ */
+ private void flushInput() throws IOException {
+ char[] cbuf = new char[1];
+ while (fInputBufferReader.ready()) {
+ if (fInputBufferReader.read(cbuf, 0, 1) == -1) {
+ break;
+ }
+ }
+ }
+
+ /**
+ * Format the command to be sent into the shell command with start and end marker strings.
+ * The start marker is need to know when the actual command output starts. The end marker
+ * string is needed so we can tell that end of output has been reached.
+ *
+ * @param cmd The actual command
+ * @param startAlias The command alias for start marker
+ * @param endAlias The command alias for end marker
+ * @return formatted command string
+ */
+ private static String formatShellCommand(String cmd, int startAlias, int endAlias) {
+ if (cmd == null || cmd.equals("")) { //$NON-NLS-1$
+ return cmd;
+ }
+ StringBuffer formattedCommand = new StringBuffer();
+ // Make multi-line command.
+ // Wrap actual command with start marker and end marker to wrap actual command.
+ formattedCommand.append(getEchoCmd(startAlias));
+ formattedCommand.append(CMD_DELIMITER);
+ formattedCommand.append(cmd);
+ formattedCommand.append(CMD_DELIMITER);
+ formattedCommand.append(getEchoCmd(endAlias));
+ formattedCommand.append(CMD_DELIMITER);
+ return formattedCommand.toString();
+ }
+
+ /**
+ * Creates a echo command line in the format: echo <start tag> <alias> <end tag> $?
+ *
+ * @param alias The command alias integer to be included in the echoed message.
+ * @return the echo command line
+ */
+ private static String getEchoCmd(int alias) {
+ return SHELL_ECHO_CMD + getEchoResult(alias) + "$?"; //$NON-NLS-1$
+ }
+
+ /**
+ * Creates the expected result for a given command alias:
+ * <start tag> <alias> <end tag> $?
+ *
+ * @param alias The command alias integer to be included in the echoed message.
+ * @return the expected echo result
+ */
+ private static String getEchoResult(int alias) {
+ return BEGIN_END_TAG + String.valueOf(alias) + DONE_MARKUP_STRING;
+ }
+
+ /**
+ * Verifies if given command line contains a command alias echo result.
+ *
+ * @param line The output line to test.
+ * @param alias The command alias
+ * @param checkReturnValue <code>true</code> to retrieve command result (previous command) <code>false</code>
+ * @return <code>true</code> if output line is a command alias echo result else <code>false</code>
+ */
+ private boolean isAliasEchoResult(String line, int alias, boolean checkReturnValue) {
+ String expected = getEchoResult(alias);
+ if (line.startsWith(expected)) {
+ if (!checkReturnValue) {
+ try {
+ int k = Integer.valueOf(line.substring(expected.length()));
+ fReturnValue = k;
+ } catch (NumberFormatException e) {
+ // do nothing
+ }
+ }
+ return true;
+ }
+ int index = line.indexOf(expected);
+ if ((index > 0) && (line.indexOf(SHELL_ECHO_CMD) == -1)) {
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * Verifies if output line is an echo of the given command line. If the
+ * output line is longer then the maximum line lengths (e.g. for ssh), the
+ * shell adds a line break character. This method takes this in
+ * consideration by comparing the command line without any whitespaces.
+ *
+ * @param line
+ * The output line to verify
+ * @param cmd
+ * The command executed
+ * @return <code>true</code> if it's an echoed command line else
+ * <code>false</code>
+ */
+ @SuppressWarnings("nls")
+ private static boolean isCommandEcho(String line, String cmd) {
+ String s1 = line.replaceAll("\\s","");
+ String s2 = cmd.replaceAll("\\s","");
+ s2 = s2.replaceAll("(\\*)", "(\\\\*)");
+ String patternStr = ".*(" + s2 +")$";
+ return s1.matches(patternStr);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ *********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
+
+/**
+ * <p>
+ * Interface for providing command execution result.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ICommandResult {
+ /**
+ * The result of the command.
+ *
+ * @return 0 if successful else >0
+ */
+ int getResult();
+
+ /**
+ * Sets the command result value.
+ *
+ * @param result
+ * The integer result to set
+ */
+ void setResult(int result);
+
+ /**
+ * @return returns the command output.
+ */
+ String[] getOutput();
+
+ /**
+ * Sets the command output.
+ *
+ * @param output
+ * The output (as an array of Strings) to assign
+ */
+ void setOutput(String[] output);
+
+ /**
+ * The error output of the command.
+ *
+ * @return returns the command error output.
+ */
+ String[] getErrorOutput();
+
+ /**
+ * Sets the command output.
+ *
+ * @param output
+ * The output (as an array of Strings) to assign
+ */
+ void setErrorOutput(String[] output);
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+
+/**
+ * <p>
+ * Interface for a command shell implementation
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface ICommandShell {
+
+ /**
+ * Method to connect the command shell.
+ *
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void connect() throws ExecutionException;
+
+ /**
+ * Method to disconnect the command shell.
+ */
+ void disconnect();
+
+ /**
+ * Method to execute a command on the command shell.
+ *
+ * @param command
+ * - the command to executed
+ * @param monitor
+ * - a progress monitor
+ * @return the command result
+ * @throws ExecutionException
+ * If the command fails
+ */
+ ICommandResult executeCommand(String command,
+ IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Method to execute a command on the command shell.
+ *
+ * @param command
+ * - the command to executed
+ * @param monitor
+ * - a progress monitor
+ * @param checkReturnValue
+ * - flag to indicate that the command result should be checked.
+ * If false the command result will be always 0.
+ * @return the command result
+ * @throws ExecutionException
+ * If the command fails
+ */
+ ICommandResult executeCommand(final String command,
+ final IProgressMonitor monitor, final boolean checkReturnValue)
+ throws ExecutionException;
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.rse.core.model.IRSECallback;
+import org.eclipse.rse.core.subsystems.ICommunicationsListener;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.shells.IShellService;
+import org.eclipse.rse.services.terminals.ITerminalService;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+
+/**
+ * <p>
+ * Remote System Proxy interface.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface IRemoteSystemProxy {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Invalid port number for IP based connections.
+ */
+ static final int INVALID_PORT_NUMBER = -1;
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+ /**
+ * Find the first shell service.
+ *
+ * @return shell service object, or <code>null</code> if not found.
+ */
+ IShellService getShellService();
+
+ /**
+ * Find the first terminal service.
+ *
+ * @return shell service object, or <code>null</code> if not found.
+ */
+ ITerminalService getTerminalService();
+
+ /**
+ * Find the first IShellServiceSubSystem service.
+ *
+ * @return shell service subsystem, or <code>null</code> if not found.
+ */
+ ISubSystem getShellServiceSubSystem();
+
+ /**
+ * Find the first ITerminalServiceSubSystem service.
+ *
+ * @return shell service subsystem, or <code>null</code> if not found.
+ */
+ ISubSystem getTerminalServiceSubSystem();
+
+ /**
+ * Finds the File Service Subsystem.
+ *
+ * @return file service subsystem, or <code>null</code> if not found.
+ */
+ IFileServiceSubSystem getFileServiceSubSystem();
+
+ /**
+ * @return port of IP connection to be used
+ */
+ int getPort();
+
+ /**
+ * Sets the port of the IP connection.
+ * @param port - the IP port to set
+ */
+ void setPort(int port);
+
+ /**
+ * Connects the shell service sub system.
+ *
+ * @param callback
+ * - call-back method being called when connection was finished
+ * @throws ExecutionException
+ * If the connection fails
+ */
+ void connect(IRSECallback callback) throws ExecutionException;
+
+ /**
+ * Disconnects from the shell service sub system.
+ *
+ * @throws ExecutionException
+ * If the disconnect command fails
+ */
+ void disconnect() throws ExecutionException;
+
+ /**
+ * Creates a command shell.
+ *
+ * @return the command shell implementation
+ * @throws ExecutionException
+ * If the command fails
+ */
+ ICommandShell createCommandShell() throws ExecutionException;
+
+ /**
+ * Method to add a communication listener to the connector service defined
+ * for the given connection.
+ *
+ * @param listener
+ * - listener to add
+ */
+ void addCommunicationListener(ICommunicationsListener listener);
+
+ /**
+ * Method to remove a communication listener from the connector service
+ * defined for the given connection.
+ *
+ * @param listener
+ * - listener to remove
+ */
+ void removeCommunicationListener(ICommunicationsListener listener);
+
+ /**
+ * Checks whether the local host connector service is used or not.
+ *
+ * @return <code>true</code> if local connection else <false>
+ *
+ */
+ public boolean isLocal();
+}
\ No newline at end of file
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.IRSECallback;
+import org.eclipse.rse.core.subsystems.ICommunicationsListener;
+import org.eclipse.rse.core.subsystems.IConnectorService;
+import org.eclipse.rse.core.subsystems.ISubSystem;
+import org.eclipse.rse.services.IService;
+import org.eclipse.rse.services.shells.IShellService;
+import org.eclipse.rse.services.terminals.ITerminalService;
+import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
+
+/**
+ * <p>
+ * RemoteSystemProxy implementation.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class RemoteSystemProxy implements IRemoteSystemProxy {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ private final IHost fHost;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param host
+ * The host of this proxy
+ */
+ public RemoteSystemProxy(IHost host) {
+ fHost = host;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public IShellService getShellService() {
+ ISubSystem ss = getShellServiceSubSystem();
+ if (ss != null) {
+ return (IShellService)ss.getSubSystemConfiguration().getService(fHost).getAdapter(IShellService.class);
+ }
+ return null;
+ }
+
+ @Override
+ public ITerminalService getTerminalService() {
+ ISubSystem ss = getTerminalServiceSubSystem();
+ if (ss != null) {
+ return (ITerminalService)ss.getSubSystemConfiguration().getService(fHost).getAdapter(ITerminalService.class);
+ }
+ return null;
+ }
+
+ @Override
+ public ISubSystem getShellServiceSubSystem() {
+ if (fHost == null) {
+ return null;
+ }
+ ISubSystem[] subSystems = fHost.getSubSystems();
+ IShellService ssvc = null;
+ for (int i = 0; subSystems != null && i < subSystems.length; i++) {
+ IService svc = subSystems[i].getSubSystemConfiguration().getService(fHost);
+ if (svc!=null) {
+ ssvc = (IShellService)svc.getAdapter(IShellService.class);
+ if (ssvc != null) {
+ return subSystems[i];
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public ISubSystem getTerminalServiceSubSystem() {
+ if (fHost == null) {
+ return null;
+ }
+ ISubSystem[] subSystems = fHost.getSubSystems();
+ ITerminalService ssvc = null;
+ for (int i = 0; subSystems != null && i < subSystems.length; i++) {
+ IService svc = subSystems[i].getSubSystemConfiguration().getService(fHost);
+ if (svc!=null) {
+ ssvc = (ITerminalService)svc.getAdapter(ITerminalService.class);
+ if (ssvc != null) {
+ return subSystems[i];
+ }
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public IFileServiceSubSystem getFileServiceSubSystem() {
+ if (fHost == null) {
+ return null;
+ }
+ ISubSystem[] subSystems = fHost.getSubSystems();
+ for (int i = 0; subSystems != null && i < subSystems.length; i++) {
+ if (subSystems[i] instanceof IFileServiceSubSystem) {
+ return (IFileServiceSubSystem)subSystems[i];
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public int getPort() {
+ if (getShellServiceSubSystem() != null) {
+ return getShellServiceSubSystem().getConnectorService().getPort();
+ }
+ return IRemoteSystemProxy.INVALID_PORT_NUMBER;
+ }
+
+ @Override
+ public void setPort(int port) {
+ if ((getShellServiceSubSystem() != null) && (port > 0)) {
+ getShellServiceSubSystem().getConnectorService().setPort(port);
+ }
+ }
+
+ @Override
+ public void connect(IRSECallback callback) throws ExecutionException {
+ ISubSystem shellSubSystem = getShellServiceSubSystem();
+ if (shellSubSystem != null) {
+ if (!shellSubSystem.isConnected()) {
+ try {
+ shellSubSystem.connect(false, callback);
+ } catch (OperationCanceledException e) {
+ callback.done(Status.CANCEL_STATUS, null);
+ }
+ catch (Exception e) {
+ throw new ExecutionException(e.toString(), e);
+ }
+ } else {
+ callback.done(Status.OK_STATUS, null);
+ }
+ }
+ }
+
+ @Override
+ public void disconnect() throws ExecutionException {
+ ISubSystem shellSubSystem = getShellServiceSubSystem();
+ if (shellSubSystem != null) {
+ try {
+ shellSubSystem.disconnect();
+ } catch (Exception e) {
+ throw new ExecutionException(e.toString(), e);
+ }
+ }
+ }
+
+ @Override
+ public ICommandShell createCommandShell() throws ExecutionException {
+ ICommandShell shell = new CommandShell(this);
+ shell.connect();
+ return shell;
+ }
+
+ @Override
+ public void addCommunicationListener(ICommunicationsListener listener) {
+ IConnectorService[] css = fHost.getConnectorServices();
+ for (IConnectorService cs : css) {
+ cs.addCommunicationsListener(listener);
+ }
+ }
+
+ @Override
+ public void removeCommunicationListener(ICommunicationsListener listener) {
+ IConnectorService[] css = fHost.getConnectorServices();
+ for (IConnectorService cs : css) {
+ cs.removeCommunicationsListener(listener);
+ }
+ }
+
+ @Override
+ public boolean isLocal() {
+ return fHost.getSystemType().isLocal();
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import java.util.List;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+
+
+/**
+* <p>
+* Interface for LTTng trace control command service.
+* </p>
+*
+* @author Bernd Hufmann
+*/
+public interface ILttngControlService {
+
+ /**
+ * @return the LTTng version object
+ */
+ LttngVersion getVersion();
+
+ /**
+ * @return the version string
+ */
+ String getVersionString();
+
+ /**
+ * Checks if given version is supported by this ILTTngControlService implementation.
+ *
+ * @param version The version to check
+ * @return <code>true</code> if version is supported else <code>false</code>
+ */
+ boolean isVersionSupported(String version);
+
+ /**
+ * Retrieves the existing sessions names from the node.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @return an array with session names.
+ * @throws ExecutionException
+ * If the command fails
+ */
+ String[] getSessionNames(IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Retrieves the session information with the given name the node.
+ *
+ * @param sessionName
+ * - the session name
+ * @param monitor
+ * - a progress monitor
+ * @return session information
+ * @throws ExecutionException
+ * If the command fails
+ */
+ ISessionInfo getSession(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Retrieves the snapshot output information from the node
+ * @param sessionName
+ * - the session name
+ * @param monitor
+ * - a progress monitor
+ * @return snapshot output information
+ * @throws ExecutionException
+ * if command fails
+ */
+ ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Retrieves the kernel provider information (i.e. the kernel events)
+ *
+ * @param monitor
+ * - a progress monitor
+ * @return the list of existing kernel events.
+ * @throws ExecutionException
+ * If the command fails
+ */
+ List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Retrieves the UST provider information from the node.
+ *
+ * @return - the UST provider information.
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public List<IUstProviderInfo> getUstProvider() throws ExecutionException;
+
+ /**
+ * Retrieves the UST provider information from the node.
+ *
+ * @param monitor
+ * - a progress monitor
+ * @return the UST provider information.
+ * @throws ExecutionException
+ * If the command fails
+ */
+ List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Creates a session with given session name and location.
+ *
+ * @param sessionInfo
+ * the session information used to create the session
+ * @param monitor
+ * - a progress monitor
+ *
+ * @return the session information
+ * @throws ExecutionException
+ * If the command fails
+ */
+ ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Destroys a session with given session name.
+ *
+ * @param sessionName
+ * - a session name to destroy
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void destroySession(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Starts a session with given session name.
+ *
+ * @param sessionName
+ * - a session name to start
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void startSession(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Stops a session with given session name.
+ *
+ * @param sessionName
+ * - a session name to stop
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void stopSession(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Enables a list of channels for given session and given channel
+ * information (configuration).
+ *
+ * @param sessionName
+ * - a session name to create
+ * @param channelNames
+ * - a list of channel names to be enabled
+ * @param isKernel
+ * - a flag to indicate Kernel or UST (true for Kernel, false for
+ * UST)
+ * @param info
+ * - channel information used for creation of a channel (or null
+ * for default)
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void enableChannels(String sessionName, List<String> channelNames,
+ boolean isKernel, IChannelInfo info, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Disables a list of channels for given session and given channel
+ * information (configuration).
+ *
+ * @param sessionName
+ * - a session name to create
+ * @param channelNames
+ * - a list of channel names to be enabled
+ * @param isKernel
+ * - a flag to indicate Kernel or UST (true for Kernel, false for
+ * UST)
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void disableChannels(String sessionName, List<String> channelNames,
+ boolean isKernel, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Enables a list of events with no additional parameters.
+ *
+ * @param sessionName
+ * - a session name
+ * @param channelName
+ * - a channel name or null for default channel
+ * @param eventNames
+ * - a list of event names to be enabled, or null (list of size =
+ * 0)for all events .
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void enableEvents(String sessionName, String channelName,
+ List<String> eventNames, boolean isKernel, String filterExpression,
+ IProgressMonitor monitor)
+ throws ExecutionException;
+
+
+ /**
+ * Enables all syscall events.
+ *
+ * @param sessionName
+ * - a session name
+ * @param channelName
+ * - a channel name or null for default channel
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void enableSyscalls(String sessionName, String channelName,
+ IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Enables a dynamic probe or dynamic function entry/return probe.
+ *
+ * @param sessionName
+ * - a session name
+ * @param channelName
+ * - a channel name or null for default channel
+ * @param eventName
+ * - a event name
+ * @param isFunction
+ * - true for dynamic function entry/return probe else false
+ * @param probe
+ * - a dynamic probe information
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void enableProbe(String sessionName, String channelName,
+ String eventName, boolean isFunction, String probe,
+ IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Enables events using log level
+ *
+ * @param sessionName
+ * - a session name
+ * @param channelName
+ * - a channel name (null for default channel)
+ * @param eventName
+ * - a event name
+ * @param logLevelType
+ * - a log level type
+ * @param level
+ * - a log level
+ * @param filterExpression
+ * - a filter expression
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void enableLogLevel(String sessionName, String channelName,
+ String eventName, LogLevelType logLevelType, TraceLogLevel level,
+ String filterExpression,
+ IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Disables a list of events with no additional parameters.
+ *
+ * @param sessionName
+ * - a session name
+ * @param channelName
+ * - a channel name (null for default channel)
+ * @param eventNames
+ * - a list of event names to enabled.
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void disableEvent(String sessionName, String channelName,
+ List<String> eventNames, boolean isKernel, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Gets all available context names to be added to channels/events.
+ *
+ * @param monitor
+ * The progress monitor
+ * @return the list of available contexts
+ * @throws ExecutionException
+ * If the command fails
+ */
+ List<String> getContextList(IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Add contexts to given channels and or events
+ *
+ * @param sessionName
+ * - a session name
+ * @param channelName
+ * - a channel name (null for all channels)
+ * @param eventName
+ * - a event name (null for all events)
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param contexts
+ * - a list of name of contexts to add
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void addContexts(String sessionName, String channelName,
+ String eventName, boolean isKernel, List<String> contexts,
+ IProgressMonitor monitor) throws ExecutionException;
+
+ /**
+ * Executes calibrate command to quantify LTTng overhead.
+ *
+ * @param isKernel
+ * - a flag for indicating kernel or UST.
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void calibrate(boolean isKernel, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Records a snapshot.
+ *
+ * @param sessionName
+ * - a session name
+ * @param monitor
+ * - a progress monitor
+ * @throws ExecutionException
+ * If the command fails
+ */
+ void recordSnapshot(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException;
+
+ /**
+ * Executes a list of commands
+ *
+ * @param monitor
+ * - a progress monitor
+ * @param commands
+ * - array of commands
+ * @throws ExecutionException
+ * If a command fails
+ */
+ void runCommands(IProgressMonitor monitor, List<String> commands)
+ throws ExecutionException;
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Simon Delisle - Updated for support of LTTng Tools 2.2
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
+
+/**
+ * <p>
+ * Service for sending LTTng trace control commands to remote host.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public class LTTngControlService implements ILttngControlService {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The command shell implementation
+ */
+ private final ICommandShell fCommandShell;
+
+ /**
+ * The version string.
+ */
+ private LttngVersion fVersion = null;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param shell
+ * - the command shell implementation to use
+ */
+ public LTTngControlService(ICommandShell shell) {
+ fCommandShell = shell;
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String getVersionString() {
+ if (fVersion == null) {
+ return "Unknown"; //$NON-NLS-1$
+ }
+ return fVersion.toString();
+ }
+
+ @Override
+ public LttngVersion getVersion() {
+ return fVersion;
+ }
+
+ /**
+ * Sets the version of the LTTng 2.0 control service.
+ *
+ * @param version
+ * - a version to set
+ */
+ public void setVersion(String version) {
+ fVersion = new LttngVersion(version);
+ }
+
+ /**
+ * Sets the version of the LTTng 2.x control service.
+ *
+ * @param version
+ * - a version to set
+ */
+ public void setVersion(LttngVersion version) {
+ fVersion = version;
+ }
+
+ @Override
+ public boolean isVersionSupported(String version) {
+ LttngVersion tmp = new LttngVersion(version);
+ return (fVersion != null && fVersion.compareTo(tmp) >= 0) ? true : false;
+ }
+
+ /**
+ * Returns the command shell implementation.
+ *
+ * @return the command shell implementation
+ */
+ protected ICommandShell getCommandShell() {
+ return fCommandShell;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST);
+
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ // Output:
+ // Available tracing sessions:
+ // 1) mysession1 (/home/user/lttng-traces/mysession1-20120123-083928)
+ // [inactive]
+ // 2) mysession (/home/user/lttng-traces/mysession-20120123-083318)
+ // [inactive]
+ //
+ // Use lttng list <session_name> for more details
+
+ ArrayList<String> retArray = new ArrayList<>();
+ int index = 0;
+ while (index < result.getOutput().length) {
+ String line = result.getOutput()[index];
+ Matcher matcher = LTTngControlServiceConstants.SESSION_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ retArray.add(matcher.group(2).trim());
+ }
+ index++;
+ }
+ return retArray.toArray(new String[retArray.size()]);
+ }
+
+ /**
+ * Check if there is a pattern to be ignored into a sequence of string
+ *
+ * @param input
+ * an arrays of string
+ * @param pattern
+ * the pattern to search for
+ * @return if the pattern exist into the array of string
+ */
+ protected boolean ignoredPattern(String[] input, Pattern pattern) {
+ for (String line : input) {
+ Matcher matcher = pattern.matcher(line);
+ if (matcher.matches()) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, sessionName);
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ int index = 0;
+
+ // Output:
+ // Tracing session mysession2: [inactive]
+ // Trace path: /home/eedbhu/lttng-traces/mysession2-20120123-110330
+ ISessionInfo sessionInfo = new SessionInfo(sessionName);
+
+ while (index < result.getOutput().length) {
+ // Tracing session mysession2: [inactive]
+ // Trace path: /home/eedbhu/lttng-traces/mysession2-20120123-110330
+ //
+ // === Domain: Kernel ===
+ //
+ String line = result.getOutput()[index];
+ Matcher matcher = LTTngControlServiceConstants.TRACE_SESSION_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ sessionInfo.setSessionState(matcher.group(2));
+ index++;
+ continue;
+ }
+
+ matcher = LTTngControlServiceConstants.TRACE_SNAPSHOT_SESSION_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ sessionInfo.setSessionState(matcher.group(2));
+ // real name will be set later
+ ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
+ sessionInfo.setSnapshotInfo(snapshotInfo);
+ index++;
+ continue;
+ }
+
+ if (!sessionInfo.isSnapshotSession()) {
+ matcher = LTTngControlServiceConstants.TRACE_NETWORK_PATH_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ sessionInfo.setStreamedTrace(true);
+ }
+
+ matcher = LTTngControlServiceConstants.TRACE_SESSION_PATH_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ sessionInfo.setSessionPath(matcher.group(1).trim());
+ index++;
+ continue;
+ }
+ }
+
+ matcher = LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ // Create Domain
+ IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_KernelDomainDisplayName);
+
+ // set kernel flag
+ domainInfo.setIsKernel(true);
+
+ // in domain kernel
+ ArrayList<IChannelInfo> channels = new ArrayList<>();
+ index = parseDomain(result.getOutput(), index, channels, domainInfo);
+
+ if (channels.size() > 0) {
+ // add domain
+ sessionInfo.addDomain(domainInfo);
+
+ // set channels
+ domainInfo.setChannels(channels);
+ }
+ continue;
+ }
+
+ matcher = LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ IDomainInfo domainInfo = new DomainInfo(Messages.TraceControl_UstGlobalDomainDisplayName);
+
+ // set kernel flag
+ domainInfo.setIsKernel(false);
+
+ // in domain UST
+ ArrayList<IChannelInfo> channels = new ArrayList<>();
+ index = parseDomain(result.getOutput(), index, channels, domainInfo);
+
+ if (channels.size() > 0) {
+ // add domain
+ sessionInfo.addDomain(domainInfo);
+
+ // set channels
+ domainInfo.setChannels(channels);
+ }
+ continue;
+ }
+ index++;
+ }
+
+ if (sessionInfo.isSnapshotSession()) {
+ ISnapshotInfo snapshot = getSnapshotInfo(sessionName, monitor);
+ sessionInfo.setSnapshotInfo(snapshot);
+ }
+
+ return sessionInfo;
+ }
+
+ @Override
+ public ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_SNAPSHOT_OUTPUT, LTTngControlServiceConstants.OPTION_SESSION, sessionName);
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ int index = 0;
+
+ // Output:
+ // [1] snapshot-1: /home/user/lttng-traces/my-20130909-114431
+ // or
+ // [3] snapshot-3: net4://172.0.0.1/
+ ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
+
+ while (index < result.getOutput().length) {
+ String line = result.getOutput()[index];
+ Matcher matcher = LTTngControlServiceConstants.LIST_SNAPSHOT_OUTPUT_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ snapshotInfo.setId(Integer.valueOf(matcher.group(1)));
+ snapshotInfo.setName(matcher.group(2));
+ snapshotInfo.setSnapshotPath(matcher.group(3));
+
+ Matcher matcher2 = LTTngControlServiceConstants.SNAPSHOT_NETWORK_PATH_PATTERN.matcher(snapshotInfo.getSnapshotPath());
+ if (matcher2.matches()) {
+ snapshotInfo.setStreamedSnapshot(true);
+ }
+
+ index++;
+ break;
+ }
+ index++;
+ }
+
+ return snapshotInfo;
+ }
+
+ @Override
+ public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
+ ICommandResult result = executeCommand(command.toString(), monitor, false);
+
+ List<IBaseEventInfo> events = new ArrayList<>();
+
+ if (result.getErrorOutput() != null) {
+ // Ignore the following 2 cases:
+ // Spawning a session daemon
+ // Error: Unable to list kernel events
+ // or:
+ // Error: Unable to list kernel events
+ //
+ if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) {
+ return events;
+ }
+ }
+
+ if (isError(result)) {
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Kernel events:
+ // -------------
+ // sched_kthread_stop (type: tracepoint)
+ getProviderEventInfo(result.getOutput(), 0, events);
+ return events;
+ }
+
+ @Override
+ public List<IUstProviderInfo> getUstProvider() throws ExecutionException {
+ return getUstProvider(new NullProgressMonitor());
+ }
+
+ @Override
+ public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_UST);
+
+ if (isVersionSupported("2.1.0")) { //$NON-NLS-1$
+ command.append(LTTngControlServiceConstants.OPTION_FIELDS);
+ }
+
+ ICommandResult result = executeCommand(command.toString(), monitor, false);
+ List<IUstProviderInfo> allProviders = new ArrayList<>();
+
+ // Workaround for versions 2.0.x which causes a segmentation fault for
+ // this command
+ // if LTTng Tools is compiled without UST support.
+ if (!isVersionSupported("2.1.0") && (result.getResult() != 0)) { //$NON-NLS-1$
+ return allProviders;
+ }
+
+ if (result.getErrorOutput() != null) {
+ // Ignore the following 2 cases:
+ // Spawning a session daemon
+ // Error: Unable to list UST events: Listing UST events failed
+ // or:
+ // Error: Unable to list UST events: Listing UST events failed
+ //
+ if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_UST_NO_UST_PROVIDER_PATTERN)) {
+ return allProviders;
+ }
+ }
+
+ if (isError(result)) {
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Note that field print-outs exists for version >= 2.1.0
+ //
+ // UST events:
+ // -------------
+ //
+ // PID: 3635 - Name:
+ // /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ // ust_tests_hello:tptest_sighandler (loglevel: TRACE_EMERG0) (type:
+ // tracepoint)
+ // ust_tests_hello:tptest (loglevel: TRACE_EMERG0) (type: tracepoint)
+ // field: doublefield (float)
+ // field: floatfield (float)
+ // field: stringfield (string)
+ //
+ // PID: 6459 - Name:
+ // /home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello
+ // ust_tests_hello:tptest_sighandler (loglevel: TRACE_EMERG0) (type:
+ // tracepoint)
+ // ust_tests_hello:tptest (loglevel: TRACE_EMERG0) (type: tracepoint)
+ // field: doublefield (float)
+ // field: floatfield (float)
+ // field: stringfield (string)
+
+ IUstProviderInfo provider = null;
+
+ int index = 0;
+ while (index < result.getOutput().length) {
+ String line = result.getOutput()[index];
+ Matcher matcher = LTTngControlServiceConstants.UST_PROVIDER_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ provider = new UstProviderInfo(matcher.group(2).trim());
+ provider.setPid(Integer.valueOf(matcher.group(1).trim()));
+ List<IBaseEventInfo> events = new ArrayList<>();
+ index = getProviderEventInfo(result.getOutput(), ++index, events);
+ provider.setEvents(events);
+ allProviders.add(provider);
+ } else {
+ index++;
+ }
+ }
+ return allProviders;
+ }
+
+ @Override
+ public ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
+ if (sessionInfo.isStreamedTrace()) {
+ return createStreamedSession(sessionInfo, monitor);
+ }
+
+ StringBuffer command = prepareSessionCreationCommand(sessionInfo);
+
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ // Session myssession2 created.
+ // Traces will be written in
+ // /home/user/lttng-traces/myssession2-20120209-095418
+ String[] output = result.getOutput();
+
+ // Get and session name and path
+ String name = null;
+ String path = null;
+
+ int index = 0;
+ while (index < output.length) {
+ String line = output[index];
+ Matcher nameMatcher = LTTngControlServiceConstants.CREATE_SESSION_NAME_PATTERN.matcher(line);
+ Matcher pathMatcher = LTTngControlServiceConstants.CREATE_SESSION_PATH_PATTERN.matcher(line);
+ if (nameMatcher.matches()) {
+ name = String.valueOf(nameMatcher.group(1).trim());
+ } else if (pathMatcher.matches()) {
+ path = String.valueOf(pathMatcher.group(1).trim());
+ }
+ index++;
+ }
+
+ // Verify session name
+ if ((name == null) || (!"".equals(sessionInfo.getName()) && !name.equals(sessionInfo.getName()))) { //$NON-NLS-1$
+ // Unexpected name returned
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedNameError + ": " + name); //$NON-NLS-1$
+ }
+
+ sessionInfo.setName(name);
+ // Verify session path
+ if (!sessionInfo.isSnapshotSession() &&
+ ((path == null) || ((sessionInfo.getSessionPath() != null) && (!path.contains(sessionInfo.getSessionPath()))))) {
+ // Unexpected path
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$
+ }
+
+ if (sessionInfo.isSnapshotSession()) {
+ // Make it a snapshot session - content of snapshot info need to
+ // set afterwards using getSession() or getSnapshotInfo()
+ sessionInfo.setSnapshotInfo(new SnapshotInfo("")); //$NON-NLS-1$
+ } else {
+ sessionInfo.setSessionPath(path);
+ }
+
+ return sessionInfo;
+
+ }
+
+ /**
+ * Basic generation of command for session creation
+ *
+ * @param sessionInfo
+ * the session to create
+ * @return the basic command for command creation
+ */
+ protected StringBuffer prepareSessionCreationCommand(ISessionInfo sessionInfo) {
+ String newName = formatParameter(sessionInfo.getName());
+ String newPath = formatParameter(sessionInfo.getSessionPath());
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CREATE_SESSION, newName);
+
+ if (newPath != null && !"".equals(newPath)) { //$NON-NLS-1$
+ command.append(LTTngControlServiceConstants.OPTION_OUTPUT_PATH);
+ command.append(newPath);
+ }
+
+ if (sessionInfo.isSnapshotSession()) {
+ command.append(LTTngControlServiceConstants.OPTION_SNAPSHOT);
+ }
+ return command;
+ }
+
+ private ISessionInfo createStreamedSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
+
+ StringBuffer command = prepareStreamedSessionCreationCommand(sessionInfo);
+
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ // Verify output
+ String[] output = result.getOutput();
+
+ // Get and session name and path
+ String name = null;
+ String path = null;
+
+ int index = 0;
+ while (index < output.length) {
+ String line = output[index];
+ Matcher nameMatcher = LTTngControlServiceConstants.CREATE_SESSION_NAME_PATTERN.matcher(line);
+ Matcher pathMatcher = LTTngControlServiceConstants.CREATE_SESSION_PATH_PATTERN.matcher(line);
+
+ if (nameMatcher.matches()) {
+ name = String.valueOf(nameMatcher.group(1).trim());
+ } else if (pathMatcher.matches() && (sessionInfo.getNetworkUrl() != null)) {
+ path = String.valueOf(pathMatcher.group(1).trim());
+ }
+ index++;
+ }
+
+ // Verify session name
+ if ((name == null) || (!"".equals(sessionInfo.getName()) && !name.equals(sessionInfo.getName()))) { //$NON-NLS-1$
+ // Unexpected name returned
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedNameError + ": " + name); //$NON-NLS-1$
+ }
+
+ sessionInfo.setName(name);
+
+ sessionInfo.setStreamedTrace(true);
+
+ // Verify session path
+ if (sessionInfo.getNetworkUrl() != null) {
+ if (!sessionInfo.isSnapshotSession() && (path == null)) {
+ // Unexpected path
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedPathError + ": " + name); //$NON-NLS-1$
+ }
+
+ if (sessionInfo.isSnapshotSession()) {
+ sessionInfo.setStreamedTrace(false);
+ } else {
+ sessionInfo.setSessionPath(path);
+ // Check file protocol
+ Matcher matcher = LTTngControlServiceConstants.TRACE_FILE_PROTOCOL_PATTERN.matcher(path);
+ if (matcher.matches()) {
+ sessionInfo.setStreamedTrace(false);
+ }
+ }
+ }
+
+ // When using controlUrl and dataUrl the full session path is not known
+ // yet and will be set later on when listing the session
+
+ return sessionInfo;
+ }
+
+ /**
+ * Basic generation of command for streamed session creation
+ *
+ * @param sessionInfo
+ * the session to create
+ * @return the basic command for command creation
+ */
+ protected StringBuffer prepareStreamedSessionCreationCommand(ISessionInfo sessionInfo) {
+ String newName = formatParameter(sessionInfo.getName());
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CREATE_SESSION, newName);
+
+ if (sessionInfo.isSnapshotSession()) {
+ command.append(LTTngControlServiceConstants.OPTION_SNAPSHOT);
+ } else if (sessionInfo.isLive()) {
+ command.append(LTTngControlServiceConstants.OPTION_LIVE);
+ if (sessionInfo.getLiveDelay() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(sessionInfo.getLiveDelay());
+ }
+ }
+
+ if (sessionInfo.getNetworkUrl() != null) {
+ command.append(LTTngControlServiceConstants.OPTION_NETWORK_URL);
+ command.append(sessionInfo.getNetworkUrl());
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_CONTROL_URL);
+ command.append(sessionInfo.getControlUrl());
+
+ command.append(LTTngControlServiceConstants.OPTION_DATA_URL);
+ command.append(sessionInfo.getDataUrl());
+ }
+ return command;
+ }
+
+ @Override
+ public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ String newName = formatParameter(sessionName);
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DESTROY_SESSION, newName);
+
+ ICommandResult result = executeCommand(command.toString(), monitor, false);
+ String[] errorOutput = result.getErrorOutput();
+
+ boolean isError = isError(result);
+ if (isError && (errorOutput != null)) {
+ if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.SESSION_NOT_FOUND_ERROR_PATTERN)) {
+ isError = false;
+
+ }
+ }
+
+ if (isError) {
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Session <sessionName> destroyed
+ }
+
+ @Override
+ public void startSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+
+ String newSessionName = formatParameter(sessionName);
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_START_SESSION, newSessionName);
+
+ executeCommand(command.toString(), monitor);
+
+ // Session <sessionName> started
+ }
+
+ @Override
+ public void stopSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ String newSessionName = formatParameter(sessionName);
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_STOP_SESSION, newSessionName);
+
+ executeCommand(command.toString(), monitor);
+
+ // Session <sessionName> stopped
+
+ }
+
+ @Override
+ public void enableChannels(String sessionName, List<String> channelNames, boolean isKernel, IChannelInfo info, IProgressMonitor monitor) throws ExecutionException {
+
+ // no channels to enable
+ if (channelNames.isEmpty()) {
+ return;
+ }
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_CHANNEL);
+
+ for (Iterator<String> iterator = channelNames.iterator(); iterator.hasNext();) {
+ String channel = iterator.next();
+ command.append(channel);
+ if (iterator.hasNext()) {
+ command.append(',');
+ }
+ }
+
+ if (isKernel) {
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+ }
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (info != null) {
+ // --discard Discard event when buffers are full (default)
+
+ // --overwrite Flight recorder mode
+ if (info.isOverwriteMode()) {
+ command.append(LTTngControlServiceConstants.OPTION_OVERWRITE);
+ }
+ // --subbuf-size SIZE Subbuffer size in bytes
+ // (default: 4096, kernel default: 262144)
+ if (info.getSubBufferSize() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(LTTngControlServiceConstants.OPTION_SUB_BUFFER_SIZE);
+ command.append(String.valueOf(info.getSubBufferSize()));
+ }
+
+ // --num-subbuf NUM Number of subbufers
+ if (info.getNumberOfSubBuffers() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(LTTngControlServiceConstants.OPTION_NUM_SUB_BUFFERS);
+ command.append(String.valueOf(info.getNumberOfSubBuffers()));
+ }
+
+ // --switch-timer USEC Switch timer interval in usec
+ if (info.getSwitchTimer() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(LTTngControlServiceConstants.OPTION_SWITCH_TIMER);
+ command.append(String.valueOf(info.getSwitchTimer()));
+ }
+
+ // --read-timer USEC Read timer interval in usec
+ if (info.getReadTimer() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(LTTngControlServiceConstants.OPTION_READ_TIMER);
+ command.append(String.valueOf(info.getReadTimer()));
+ }
+
+ if (isVersionSupported("2.2.0")) { //$NON-NLS-1$
+ // --buffers-uid Every application sharing the same UID use the
+ // same buffers --buffers-pid Buffers are allocated per PID
+ if (!isKernel) {
+ if (info.getBufferType() == BufferType.BUFFER_PER_PID) {
+ command.append(LTTngControlServiceConstants.OPTION_PER_PID_BUFFERS);
+
+ } else if (info.getBufferType() == BufferType.BUFFER_PER_UID) {
+ command.append(LTTngControlServiceConstants.OPTION_PER_UID_BUFFERS);
+ }
+ }
+
+ // -C SIZE Maximum size of trace files in bytes
+ if (info.getMaxSizeTraceFiles() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(LTTngControlServiceConstants.OPTION_MAX_SIZE_TRACE_FILES);
+ command.append(String.valueOf(info.getMaxSizeTraceFiles()));
+ }
+
+ // -W NUM Maximum number of trace files
+ if (info.getMaxNumberTraceFiles() != LTTngControlServiceConstants.UNUSED_VALUE) {
+ command.append(LTTngControlServiceConstants.OPTION_MAX_TRACE_FILES);
+ command.append(String.valueOf(info.getMaxNumberTraceFiles()));
+ }
+ }
+ }
+
+ executeCommand(command.toString(), monitor);
+
+ }
+
+ @Override
+ public void disableChannels(String sessionName, List<String> channelNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
+
+ // no channels to enable
+ if (channelNames.isEmpty()) {
+ return;
+ }
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DISABLE_CHANNEL);
+
+ for (Iterator<String> iterator = channelNames.iterator(); iterator.hasNext();) {
+ String channel = iterator.next();
+ command.append(channel);
+ if (iterator.hasNext()) {
+ command.append(',');
+ }
+ }
+
+ if (isKernel) {
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+ }
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public void enableEvents(String sessionName, String channelName, List<String> eventNames, boolean isKernel, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
+
+ if (eventNames == null || eventNames.isEmpty()) {
+ command.append(LTTngControlServiceConstants.OPTION_ALL);
+ } else {
+
+ StringBuffer eventNameParameter = new StringBuffer();
+ for (Iterator<String> iterator = eventNames.iterator(); iterator.hasNext();) {
+ String event = iterator.next();
+ eventNameParameter.append(event);
+ if (iterator.hasNext()) {
+ eventNameParameter.append(',');
+ }
+ }
+ command.append(formatParameter(eventNameParameter.toString()));
+ }
+
+ if (isKernel) {
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+ }
+
+ String newSessionName = formatParameter(sessionName);
+
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (channelName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
+ command.append(channelName);
+ }
+
+ command.append(LTTngControlServiceConstants.OPTION_TRACEPOINT);
+
+ if (filterExpression != null) {
+ command.append(LTTngControlServiceConstants.OPTION_FILTER);
+ command.append('\'');
+ command.append(filterExpression);
+ command.append('\'');
+ }
+
+ executeCommand(command.toString(), monitor);
+
+ }
+
+ @Override
+ public void enableSyscalls(String sessionName, String channelName, IProgressMonitor monitor) throws ExecutionException {
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
+
+ command.append(LTTngControlServiceConstants.OPTION_ALL);
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+
+ String newSessionName = formatParameter(sessionName);
+
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (channelName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
+ command.append(channelName);
+ }
+
+ command.append(LTTngControlServiceConstants.OPTION_SYSCALL);
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public void enableProbe(String sessionName, String channelName, String eventName, boolean isFunction, String probe, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
+
+ command.append(eventName);
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (channelName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
+ command.append(channelName);
+ }
+ if (isFunction) {
+ command.append(LTTngControlServiceConstants.OPTION_FUNCTION_PROBE);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_PROBE);
+ }
+
+ command.append(probe);
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public void enableLogLevel(String sessionName, String channelName, String eventName, LogLevelType logLevelType, TraceLogLevel level, String filterExpression, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ENABLE_EVENT);
+
+ command.append(eventName);
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (channelName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
+ command.append(channelName);
+ }
+
+ if (logLevelType == LogLevelType.LOGLEVEL) {
+ command.append(LTTngControlServiceConstants.OPTION_LOGLEVEL);
+ } else if (logLevelType == LogLevelType.LOGLEVEL_ONLY) {
+ command.append(LTTngControlServiceConstants.OPTION_LOGLEVEL_ONLY);
+
+ } else {
+ return;
+ }
+ command.append(level.getInName());
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public void disableEvent(String sessionName, String channelName, List<String> eventNames, boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DISABLE_EVENT);
+
+ if (eventNames == null) {
+ command.append(LTTngControlServiceConstants.OPTION_ALL);
+ } else {
+ // no events to disable
+ if (eventNames.isEmpty()) {
+ return;
+ }
+
+ StringBuffer eventNameParameter = new StringBuffer();
+ for (Iterator<String> iterator = eventNames.iterator(); iterator.hasNext();) {
+ String event = iterator.next();
+ eventNameParameter.append(event);
+ if (iterator.hasNext()) {
+ eventNameParameter.append(',');
+ }
+ }
+ command.append(formatParameter(eventNameParameter.toString()));
+ }
+
+ if (isKernel) {
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+ }
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (channelName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
+ command.append(channelName);
+ }
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public List<String> getContextList(IProgressMonitor monitor) throws ExecutionException {
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ADD_CONTEXT, LTTngControlServiceConstants.OPTION_HELP);
+
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ String[] output = result.getOutput();
+
+ List<String> contexts = new ArrayList<>(0);
+
+ int index = 0;
+ boolean inList = false;
+ while (index < output.length) {
+ String line = result.getOutput()[index];
+
+ Matcher startMatcher = LTTngControlServiceConstants.ADD_CONTEXT_HELP_CONTEXTS_INTRO.matcher(line);
+ Matcher endMatcher = LTTngControlServiceConstants.ADD_CONTEXT_HELP_CONTEXTS_END_LINE.matcher(line);
+
+ if (startMatcher.matches()) {
+ inList = true;
+ } else if (endMatcher.matches()) {
+ break;
+ } else if (inList == true) {
+ String[] tmp = line.split(","); //$NON-NLS-1$
+ for (int i = 0; i < tmp.length; i++) {
+ contexts.add(tmp[i].trim());
+ }
+ }
+ index++;
+ }
+ return contexts;
+ }
+
+ @Override
+ public void addContexts(String sessionName, String channelName, String eventName, boolean isKernel, List<String> contextNames, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_ADD_CONTEXT);
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ if (channelName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_CHANNEL);
+ command.append(channelName);
+ }
+
+ if (eventName != null) {
+ command.append(LTTngControlServiceConstants.OPTION_EVENT);
+ command.append(eventName);
+ }
+
+ if (isKernel) {
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+ }
+
+ for (Iterator<String> iterator = contextNames.iterator(); iterator.hasNext();) {
+ String context = iterator.next();
+ command.append(LTTngControlServiceConstants.OPTION_CONTEXT_TYPE);
+ command.append(context);
+ }
+
+ executeCommand(command.toString(), monitor);
+
+ }
+
+ @Override
+ public void calibrate(boolean isKernel, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_CALIBRATE);
+
+ if (isKernel) {
+ command.append(LTTngControlServiceConstants.OPTION_KERNEL);
+ } else {
+ command.append(LTTngControlServiceConstants.OPTION_UST);
+ }
+
+ command.append(LTTngControlServiceConstants.OPTION_FUNCTION_PROBE);
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public void recordSnapshot(String sessionName, IProgressMonitor monitor)
+ throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_RECORD_SNAPSHOT);
+
+ String newSessionName = formatParameter(sessionName);
+ command.append(LTTngControlServiceConstants.OPTION_SESSION);
+ command.append(newSessionName);
+
+ executeCommand(command.toString(), monitor);
+ }
+
+ @Override
+ public void runCommands(IProgressMonitor monitor, List<String> commands) throws ExecutionException {
+ for (String command : commands) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+ if (command.isEmpty() || command.startsWith("#")) { //$NON-NLS-1$
+ continue;
+ }
+ executeCommand(command, monitor);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Helper methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * Checks if command result is an error result.
+ *
+ * @param result
+ * - the command result to check
+ * @return true if error else false
+ */
+ protected boolean isError(ICommandResult result) {
+ // Check return code and length of returned strings
+
+ if ((result.getResult()) != 0) {
+ return true;
+ }
+
+ // Look for error pattern
+ int index = 0;
+ while (index < result.getErrorOutput().length) {
+ String line = result.getErrorOutput()[index];
+ Matcher matcher = LTTngControlServiceConstants.ERROR_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ return true;
+ }
+ index++;
+ }
+
+ return false;
+ }
+
+ /**
+ * Formats the output string as single string.
+ *
+ * @param result
+ * - output array
+ * @return - the formatted output
+ */
+ public static String formatOutput(ICommandResult result) {
+ if ((result == null) || ((result.getOutput() == null || result.getOutput().length == 0) && (result.getErrorOutput() == null || result.getErrorOutput().length == 0))) {
+ return ""; //$NON-NLS-1$
+ }
+ String[] output = result.getOutput();
+ String[] errorOutput = result.getErrorOutput();
+ StringBuffer ret = new StringBuffer();
+ ret.append("Error Ouptut:\n"); //$NON-NLS-1$
+ for (int i = 0; i < errorOutput.length; i++) {
+ ret.append(errorOutput[i]).append("\n"); //$NON-NLS-1$
+ }
+ ret.append("Return Value: "); //$NON-NLS-1$
+ ret.append(result.getResult());
+ ret.append("\n"); //$NON-NLS-1$
+ for (int i = 0; i < output.length; i++) {
+ ret.append(output[i]).append("\n"); //$NON-NLS-1$
+ }
+ return ret.toString();
+ }
+
+ /**
+ * Parses the domain information.
+ *
+ * @param output
+ * - a command output array
+ * @param currentIndex
+ * - current index in command output array
+ * @param channels
+ * - list for returning channel information
+ * @param domainInfo
+ * - The domain information
+ * @return the new current index in command output array
+ */
+ protected int parseDomain(String[] output, int currentIndex, List<IChannelInfo> channels, IDomainInfo domainInfo) {
+ int index = currentIndex;
+
+ // if kernel set the buffer type to shared
+ if (domainInfo.isKernel()) {
+ domainInfo.setBufferType(BufferType.BUFFER_SHARED);
+ }
+
+ // Channels:
+ // -------------
+ // - channnel1: [enabled]
+ //
+ // Attributes:
+ // overwrite mode: 0
+ // subbufers size: 262144
+ // number of subbufers: 4
+ // switch timer interval: 0
+ // read timer interval: 200
+ // output: splice()
+
+ while (index < output.length) {
+ String line = output[index];
+
+ if (isVersionSupported("2.2.0")) { //$NON-NLS-1$
+ Matcher bufferTypeMatcher = LTTngControlServiceConstants.BUFFER_TYPE_PATTERN.matcher(line);
+ if (bufferTypeMatcher.matches()) {
+ String bufferTypeString = getAttributeValue(line);
+ if (BufferType.BUFFER_PER_PID.getInName().equals(bufferTypeString)) {
+ domainInfo.setBufferType(BufferType.BUFFER_PER_PID);
+ } else if (BufferType.BUFFER_PER_UID.getInName().equals(bufferTypeString)) {
+ domainInfo.setBufferType(BufferType.BUFFER_PER_UID);
+ } else {
+ domainInfo.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
+ }
+ }
+ } else {
+ domainInfo.setBufferType(BufferType.BUFFER_TYPE_UNKNOWN);
+ }
+ Matcher outerMatcher = LTTngControlServiceConstants.CHANNELS_SECTION_PATTERN.matcher(line);
+ Matcher noKernelChannelMatcher = LTTngControlServiceConstants.DOMAIN_NO_KERNEL_CHANNEL_PATTERN.matcher(line);
+ Matcher noUstChannelMatcher = LTTngControlServiceConstants.DOMAIN_NO_UST_CHANNEL_PATTERN.matcher(line);
+ if (outerMatcher.matches()) {
+ IChannelInfo channelInfo = null;
+ while (index < output.length) {
+ String subLine = output[index];
+
+ Matcher innerMatcher = LTTngControlServiceConstants.CHANNEL_PATTERN.matcher(subLine);
+ if (innerMatcher.matches()) {
+ channelInfo = new ChannelInfo(""); //$NON-NLS-1$
+ // get channel name
+ channelInfo.setName(innerMatcher.group(1));
+
+ // get channel enablement
+ channelInfo.setState(innerMatcher.group(2));
+
+ // set BufferType
+ channelInfo.setBufferType(domainInfo.getBufferType());
+
+ // add channel
+ channels.add(channelInfo);
+
+ } else if (LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE.matcher(subLine).matches()) {
+ String value = getAttributeValue(subLine);
+ if (channelInfo != null) {
+ channelInfo.setOverwriteMode(!LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE_FALSE.equals(value));
+ }
+ } else if (LTTngControlServiceConstants.SUBBUFFER_SIZE_ATTRIBUTE.matcher(subLine).matches()) {
+ if (channelInfo != null) {
+ channelInfo.setSubBufferSize(Long.valueOf(getAttributeValue(subLine)));
+ }
+
+ } else if (LTTngControlServiceConstants.NUM_SUBBUFFERS_ATTRIBUTE.matcher(subLine).matches()) {
+ if (channelInfo != null) {
+ channelInfo.setNumberOfSubBuffers(Integer.valueOf(getAttributeValue(subLine)));
+ }
+
+ } else if (LTTngControlServiceConstants.SWITCH_TIMER_ATTRIBUTE.matcher(subLine).matches()) {
+ if (channelInfo != null) {
+ channelInfo.setSwitchTimer(Long.valueOf(getAttributeValue(subLine)));
+ }
+
+ } else if (LTTngControlServiceConstants.READ_TIMER_ATTRIBUTE.matcher(subLine).matches()) {
+ if (channelInfo != null) {
+ channelInfo.setReadTimer(Long.valueOf(getAttributeValue(subLine)));
+ }
+
+ } else if (LTTngControlServiceConstants.OUTPUT_ATTRIBUTE.matcher(subLine).matches()) {
+ if (channelInfo != null) {
+ channelInfo.setOutputType(getAttributeValue(subLine));
+ }
+
+ } else if (LTTngControlServiceConstants.EVENT_SECTION_PATTERN.matcher(subLine).matches()) {
+ List<IEventInfo> events = new ArrayList<>();
+ index = parseEvents(output, index, events);
+ if (channelInfo != null) {
+ channelInfo.setEvents(events);
+ }
+ // we want to stay at the current index to be able to
+ // exit the domain
+ continue;
+ } else if (LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(subLine).matches()) {
+ return index;
+
+ } else if (LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(subLine).matches()) {
+ return index;
+ }
+ index++;
+ }
+ } else if (noKernelChannelMatcher.matches() || noUstChannelMatcher.matches()) {
+ // domain indicates that no channels were found -> return
+ index++;
+ return index;
+ }
+ index++;
+ }
+ return index;
+ }
+
+ /**
+ * Parses the event information within a domain.
+ *
+ * @param output
+ * - a command output array
+ * @param currentIndex
+ * - current index in command output array
+ * @param events
+ * - list for returning event information
+ * @return the new current index in command output array
+ */
+ protected int parseEvents(String[] output, int currentIndex, List<IEventInfo> events) {
+ int index = currentIndex;
+
+ while (index < output.length) {
+ String line = output[index];
+ if (LTTngControlServiceConstants.CHANNEL_PATTERN.matcher(line).matches()) {
+ // end of channel
+ return index;
+ } else if (LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(line).matches()) {
+ // end of domain
+ return index;
+ } else if (LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(line).matches()) {
+ // end of domain
+ return index;
+ }
+
+ Matcher matcher = LTTngControlServiceConstants.EVENT_PATTERN.matcher(line);
+ Matcher matcher2 = LTTngControlServiceConstants.WILDCARD_EVENT_PATTERN.matcher(line);
+
+ if (matcher.matches()) {
+ IEventInfo eventInfo = new EventInfo(matcher.group(1).trim());
+ eventInfo.setLogLevelType(matcher.group(2).trim());
+ eventInfo.setLogLevel(matcher.group(3).trim());
+ eventInfo.setEventType(matcher.group(4).trim());
+ eventInfo.setState(matcher.group(5));
+ String filter = matcher.group(6);
+ if (filter != null) {
+ // remove '[' and ']'
+ filter = filter.substring(1, filter.length() - 1);
+ eventInfo.setFilterExpression(filter);
+ }
+ events.add(eventInfo);
+ index++;
+ } else if (matcher2.matches()) {
+ IEventInfo eventInfo = new EventInfo(matcher2.group(1).trim());
+ eventInfo.setLogLevel(TraceLogLevel.LEVEL_UNKNOWN);
+ eventInfo.setEventType(matcher2.group(2).trim());
+ eventInfo.setState(matcher2.group(3));
+ String filter = matcher2.group(4);
+ if (filter != null) {
+ // remove '[' and ']'
+ filter = filter.substring(1, filter.length() - 1);
+ eventInfo.setFilterExpression(filter);
+ }
+
+ if ((eventInfo.getEventType() == TraceEventType.PROBE) ||
+ (eventInfo.getEventType() == TraceEventType.FUNCTION)) {
+ IProbeEventInfo probeEvent = new ProbeEventInfo(eventInfo.getName());
+ probeEvent.setLogLevel(eventInfo.getLogLevel());
+ probeEvent.setEventType(eventInfo.getEventType());
+ probeEvent.setState(eventInfo.getState());
+
+ // Overwrite eventinfo
+ eventInfo = probeEvent;
+
+ // myevent2 (type: probe) [enabled]
+ // addr: 0xc0101340
+ // myevent0 (type: function) [enabled]
+ // offset: 0x0
+ // symbol: init_post
+ index++;
+ while (index < output.length) {
+ String probeLine = output[index];
+ // parse probe
+ Matcher addrMatcher = LTTngControlServiceConstants.PROBE_ADDRESS_PATTERN.matcher(probeLine);
+ Matcher offsetMatcher = LTTngControlServiceConstants.PROBE_OFFSET_PATTERN.matcher(probeLine);
+ Matcher symbolMatcher = LTTngControlServiceConstants.PROBE_SYMBOL_PATTERN.matcher(probeLine);
+ if (addrMatcher.matches()) {
+ String addr = addrMatcher.group(2).trim();
+ probeEvent.setAddress(addr);
+ } else if (offsetMatcher.matches()) {
+ String offset = offsetMatcher.group(2).trim();
+ probeEvent.setOffset(offset);
+ } else if (symbolMatcher.matches()) {
+ String symbol = symbolMatcher.group(2).trim();
+ probeEvent.setSymbol(symbol);
+ } else if ((LTTngControlServiceConstants.EVENT_PATTERN.matcher(probeLine).matches()) || (LTTngControlServiceConstants.WILDCARD_EVENT_PATTERN.matcher(probeLine).matches())) {
+ break;
+ } else if (LTTngControlServiceConstants.CHANNEL_PATTERN.matcher(probeLine).matches()) {
+ break;
+ } else if (LTTngControlServiceConstants.DOMAIN_KERNEL_PATTERN.matcher(probeLine).matches()) {
+ // end of domain
+ break;
+ } else if (LTTngControlServiceConstants.DOMAIN_UST_GLOBAL_PATTERN.matcher(probeLine).matches()) {
+ // end of domain
+ break;
+ }
+ index++;
+ }
+ events.add(eventInfo);
+ } else {
+ events.add(eventInfo);
+ index++;
+ continue;
+ }
+ } else {
+ index++;
+ }
+ }
+
+ return index;
+ }
+
+ /**
+ * Parses a line with attributes: <attribute Name>: <attribute value>
+ *
+ * @param line
+ * - attribute line to parse
+ * @return the attribute value as string
+ */
+ protected String getAttributeValue(String line) {
+ String[] temp = line.split("\\: "); //$NON-NLS-1$
+ return temp[1];
+ }
+
+ /**
+ * Parses the event information within a provider.
+ *
+ * @param output
+ * - a command output array
+ * @param currentIndex
+ * - current index in command output array
+ * @param events
+ * - list for returning event information
+ * @return the new current index in command output array
+ */
+ protected int getProviderEventInfo(String[] output, int currentIndex, List<IBaseEventInfo> events) {
+ int index = currentIndex;
+ IBaseEventInfo eventInfo = null;
+ while (index < output.length) {
+ String line = output[index];
+ Matcher matcher = LTTngControlServiceConstants.PROVIDER_EVENT_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ // sched_kthread_stop (loglevel: TRACE_EMERG0) (type:
+ // tracepoint)
+ eventInfo = new BaseEventInfo(matcher.group(1).trim());
+ eventInfo.setLogLevel(matcher.group(2).trim());
+ eventInfo.setEventType(matcher.group(3).trim());
+ events.add(eventInfo);
+ index++;
+ } else if (LTTngControlServiceConstants.EVENT_FIELD_PATTERN.matcher(line).matches()) {
+ if (eventInfo != null) {
+ List<IFieldInfo> fields = new ArrayList<>();
+ index = getFieldInfo(output, index, fields);
+ eventInfo.setFields(fields);
+ } else {
+ index++;
+ }
+ }
+ else if (LTTngControlServiceConstants.UST_PROVIDER_PATTERN.matcher(line).matches()) {
+ return index;
+ } else {
+ index++;
+ }
+ }
+ return index;
+ }
+
+ /**
+ * Parse a field's information.
+ *
+ * @param output
+ * A command output array
+ * @param currentIndex
+ * The current index in the command output array
+ * @param fields
+ * List for returning the field information
+ * @return The new current index in the command output array
+ */
+ protected int getFieldInfo(String[] output, int currentIndex, List<IFieldInfo> fields) {
+ int index = currentIndex;
+ IFieldInfo fieldInfo = null;
+ while (index < output.length) {
+ String line = output[index];
+ Matcher matcher = LTTngControlServiceConstants.EVENT_FIELD_PATTERN.matcher(line);
+ if (matcher.matches()) {
+ // field: content (string)
+ fieldInfo = new FieldInfo(matcher.group(2).trim());
+ fieldInfo.setFieldType(matcher.group(3).trim());
+ fields.add(fieldInfo);
+ } else if (LTTngControlServiceConstants.PROVIDER_EVENT_PATTERN.matcher(line).matches()) {
+ return index;
+ } else if (LTTngControlServiceConstants.UST_PROVIDER_PATTERN.matcher(line).matches()) {
+ return index;
+ }
+ index++;
+ }
+ return index;
+ }
+
+ /**
+ * Formats a command parameter for the command execution i.e. adds quotes at
+ * the beginning and end if necessary.
+ *
+ * @param parameter
+ * - parameter to format
+ * @return formated parameter
+ */
+ protected String formatParameter(String parameter) {
+ if (parameter != null) {
+ StringBuffer newString = new StringBuffer();
+ newString.append(parameter);
+
+ if (parameter.contains(" ") || parameter.contains("*")) { //$NON-NLS-1$ //$NON-NLS-2$
+ newString.insert(0, "\""); //$NON-NLS-1$
+ newString.append("\""); //$NON-NLS-1$
+ }
+ return newString.toString();
+ }
+ return null;
+ }
+
+ /**
+ * @param strings
+ * array of string that makes up a command line
+ * @return string buffer with created command line
+ */
+ protected StringBuffer createCommand(String... strings) {
+ StringBuffer command = new StringBuffer();
+ command.append(LTTngControlServiceConstants.CONTROL_COMMAND);
+ command.append(getTracingGroupOption());
+ command.append(getVerboseOption());
+ for (String string : strings) {
+ command.append(string);
+ }
+ return command;
+ }
+
+ /**
+ * @return the tracing group option if configured in the preferences
+ */
+ protected String getTracingGroupOption() {
+ if (!ControlPreferences.getInstance().isDefaultTracingGroup() && !ControlPreferences.getInstance().getTracingGroup().equals("")) { //$NON-NLS-1$
+ return LTTngControlServiceConstants.OPTION_TRACING_GROUP + ControlPreferences.getInstance().getTracingGroup();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @return the verbose option as configured in the preferences
+ */
+ protected String getVerboseOption() {
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ String level = ControlPreferences.getInstance().getVerboseLevel();
+ if (ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_VERBOSE.equals(level)) {
+ return LTTngControlServiceConstants.OPTION_VERBOSE;
+ }
+ if (ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_VERBOSE.equals(level)) {
+ return LTTngControlServiceConstants.OPTION_VERY_VERBOSE;
+ }
+ if (ControlPreferences.TRACE_CONTROL_VERBOSE_LEVEL_V_V_VERBOSE.equals(level)) {
+ return LTTngControlServiceConstants.OPTION_VERY_VERY_VERBOSE;
+ }
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ /**
+ * Method that logs the command and command result if logging is enabled as
+ * well as forwards the command execution to the shell.
+ *
+ * @param command
+ * - the command to execute
+ * @param monitor
+ * - a progress monitor
+ * @return the command result
+ * @throws ExecutionException
+ * If the command fails
+ */
+ protected ICommandResult executeCommand(String command,
+ IProgressMonitor monitor) throws ExecutionException {
+ return executeCommand(command, monitor, true);
+ }
+
+ /**
+ * Method that logs the command and command result if logging is enabled as
+ * well as forwards the command execution to the shell.
+ *
+ * @param command
+ * - the command to execute
+ * @param monitor
+ * - a progress monitor
+ * @param checkForError
+ * - true to verify command result, else false
+ * @return the command result
+ * @throws ExecutionException
+ * in case of error result
+ */
+ protected ICommandResult executeCommand(String command,
+ IProgressMonitor monitor, boolean checkForError)
+ throws ExecutionException {
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.log(command);
+ }
+
+ ICommandResult result = fCommandShell.executeCommand(
+ command.toString(), monitor);
+
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.log(formatOutput(result));
+ }
+
+ if (checkForError && isError(result)) {
+ throw new ExecutionException(Messages.TraceControl_CommandError
+ + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ return result;
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Bernd Hufmann - Updated for support of LTTng Tools 2.1
+ * Simon Delisle - Updated for support of LTTng Tools 2.2
+ * Marc-Andre Laperle - Support for creating a live session
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import java.util.regex.Pattern;
+
+/**
+ * <p>
+ * Constants for LTTng Control Service.
+ * </p>
+ *
+ * @author Bernd Hufmann
+ */
+public interface LTTngControlServiceConstants {
+
+ // ------------------------------------------------------------------------
+ // Version constants
+ // ------------------------------------------------------------------------
+ /**
+ * Pattern to match the LTTng toolchain version 2.x.y.
+ */
+ static final Pattern VERSION_2_PATTERN = Pattern.compile("(2\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+ /**
+ * Unused value
+ */
+ static final int UNUSED_VALUE = -1;
+ /**
+ * String representation of numerical true element
+ */
+ static final String TRUE_NUMERICAL = "1"; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // LTTng Machine Interface constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * Name of the XSD to validate against the xml machine interface
+ * output from LTTng
+ */
+ static final String MI_XSD_FILENAME = "mi_lttng.xsd"; //$NON-NLS-1$
+ // ------------------------------------------------------------------------
+ // Command constants
+ // ------------------------------------------------------------------------
+ /**
+ * The lttng tools command.
+ */
+ static final String CONTROL_COMMAND = "lttng"; //$NON-NLS-1$
+ /**
+ * The lttng tools machine interface command.
+ */
+ static final String CONTROL_COMMAND_MI = CONTROL_COMMAND + " --mi"; //$NON-NLS-1$
+ /**
+ * The lttng tools XML machine interface command.
+ */
+ static final String CONTROL_COMMAND_MI_XML = CONTROL_COMMAND_MI + " xml"; //$NON-NLS-1$
+ /**
+ * Command: lttng version.
+ */
+ static final String COMMAND_VERSION = " version "; //$NON-NLS-1$
+ /**
+ * Command: lttng list.
+ */
+ static final String COMMAND_LIST = " list "; //$NON-NLS-1$
+ /**
+ * Command to list kernel tracer information.
+ */
+ static final String COMMAND_LIST_KERNEL = COMMAND_LIST + "-k"; //$NON-NLS-1$
+ /**
+ * Command to list user space trace information.
+ */
+ static final String COMMAND_LIST_UST = COMMAND_LIST + "-u"; //$NON-NLS-1$
+ /**
+ * Command to create a session.
+ */
+ static final String COMMAND_CREATE_SESSION = " create "; //$NON-NLS-1$
+ /**
+ * Command to destroy a session.
+ */
+ static final String COMMAND_DESTROY_SESSION = " destroy "; //$NON-NLS-1$
+ /**
+ * Command to destroy a session.
+ */
+ static final String COMMAND_START_SESSION = " start "; //$NON-NLS-1$
+ /**
+ * Command to destroy a session.
+ */
+ static final String COMMAND_STOP_SESSION = " stop "; //$NON-NLS-1$
+ /**
+ * Command to enable a channel.
+ */
+ static final String COMMAND_ENABLE_CHANNEL = " enable-channel "; //$NON-NLS-1$
+ /**
+ * Command to disable a channel.
+ */
+ static final String COMMAND_DISABLE_CHANNEL = " disable-channel "; //$NON-NLS-1$
+ /**
+ * Command to enable a event.
+ */
+ static final String COMMAND_ENABLE_EVENT = " enable-event "; //$NON-NLS-1$
+ /**
+ * Command to disable a event.
+ */
+ static final String COMMAND_DISABLE_EVENT = " disable-event "; //$NON-NLS-1$
+ /**
+ * Command to add a context to channels and/or events
+ */
+ static final String COMMAND_ADD_CONTEXT = " add-context "; //$NON-NLS-1$
+ /**
+ * Command to execute calibrate command to quantify LTTng overhead
+ */
+ static final String COMMAND_CALIBRATE = " calibrate "; //$NON-NLS-1$
+ /**
+ * Command to execute calibrate command to quantify LTTng overhead
+ */
+ static final String COMMAND_LIST_SNAPSHOT_OUTPUT = " snapshot list-output "; //$NON-NLS-1$
+ /**
+ * Command to execute calibrate command to quantify LTTng overhead
+ */
+ static final String COMMAND_RECORD_SNAPSHOT = " snapshot record "; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Command line options constants
+ // ------------------------------------------------------------------------
+ /**
+ * Command line option to add tracing group of user.
+ */
+ static final String OPTION_TRACING_GROUP = " -g "; //$NON-NLS-1$
+ /**
+ * Command line option for verbose output.
+ */
+ static final String OPTION_VERBOSE = " -v "; //$NON-NLS-1$
+ /**
+ * Command line option for verbose output.
+ */
+ static final String OPTION_VERY_VERBOSE = " -vv "; //$NON-NLS-1$
+ /**
+ * Command line option for verbose output.
+ */
+ static final String OPTION_VERY_VERY_VERBOSE = " -vvv "; //$NON-NLS-1$
+ /**
+ * Command line option for output path.
+ */
+ static final String OPTION_OUTPUT_PATH = " -o "; //$NON-NLS-1$
+ /**
+ * Command line option for output path.
+ */
+ static final String OPTION_SNAPSHOT = " --snapshot "; //$NON-NLS-1$
+ /**
+ * Command line option for live
+ */
+ static final String OPTION_LIVE = " --live "; //$NON-NLS-1$
+ /**
+ * Command line option for kernel tracer.
+ */
+ static final String OPTION_KERNEL = " -k "; //$NON-NLS-1$
+ /**
+ * Command line option for UST tracer.
+ */
+ static final String OPTION_UST = " -u "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a session.
+ */
+ static final String OPTION_SESSION = " -s "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a channel.
+ */
+ static final String OPTION_CHANNEL = " -c "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a event.
+ */
+ static final String OPTION_EVENT = " -e "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying all events.
+ */
+ static final String OPTION_ALL = " -a "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a context.
+ */
+ static final String OPTION_CONTEXT_TYPE = " -t "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying tracepoint events.
+ */
+ static final String OPTION_TRACEPOINT = " --tracepoint "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying syscall events.
+ */
+ static final String OPTION_SYSCALL = " --syscall "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a dynamic probe.
+ */
+ static final String OPTION_PROBE = " --probe "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a dynamic function entry/return probe.
+ */
+ static final String OPTION_FUNCTION_PROBE = " --function "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a log level range.
+ */
+ static final String OPTION_LOGLEVEL = " --loglevel "; //$NON-NLS-1$
+ /**
+ * Command line option for specifying a specific log level.
+ */
+ static final String OPTION_LOGLEVEL_ONLY = " --loglevel-only "; //$NON-NLS-1$
+ /**
+ * Optional command line option for configuring a channel's overwrite mode.
+ */
+ static final String OPTION_OVERWRITE = " --overwrite "; //$NON-NLS-1$
+ /**
+ * Optional command line option for configuring a channel's number of sub buffers.
+ */
+ static final String OPTION_NUM_SUB_BUFFERS = " --num-subbuf "; //$NON-NLS-1$
+ /**
+ * Optional command line option for configuring a channel's sub buffer size.
+ */
+ static final String OPTION_SUB_BUFFER_SIZE = " --subbuf-size "; //$NON-NLS-1$
+ /**
+ * Optional command line option for configuring a channel's switch timer interval.
+ */
+ static final String OPTION_SWITCH_TIMER = " --switch-timer "; //$NON-NLS-1$
+ /**
+ * Optional command line option for configuring a channel's read timer interval.
+ */
+ static final String OPTION_READ_TIMER = " --read-timer "; //$NON-NLS-1$
+ /**
+ * Command line option for printing the help of a specif command
+ */
+ static final String OPTION_HELP = " -h "; //$NON-NLS-1$
+ /**
+ * Command line option for listing the fields of UST tracepoints
+ */
+ static final String OPTION_FIELDS = " -f "; //$NON-NLS-1$
+ /**
+ * Command line option for configuring event's filter
+ */
+ static final String OPTION_FILTER = " --filter "; //$NON-NLS-1$
+ /**
+ * Command line option for configuring the streaming network URL (common for control and data channel).
+ */
+ static final String OPTION_NETWORK_URL = " -U "; //$NON-NLS-1$
+ /**
+ * Command line option for configuring the streaming control URL.
+ */
+ static final String OPTION_CONTROL_URL = " -C "; //$NON-NLS-1$
+ /**
+ * Command line option for configuring the streaming data URL.
+ */
+ static final String OPTION_DATA_URL = " -D "; //$NON-NLS-1$
+ /**
+ * Command line option for per UID buffers
+ */
+ static final String OPTION_PER_UID_BUFFERS = " --buffers-uid "; //$NON-NLS-1$
+ /**
+ * Command line option for per PID buffers
+ */
+ static final String OPTION_PER_PID_BUFFERS = " --buffers-pid "; //$NON-NLS-1$
+ /**
+ * Command line option for maximum size of trace files
+ */
+ static final String OPTION_MAX_SIZE_TRACE_FILES = " -C "; //$NON-NLS-1$
+ /**
+ * Command line option for maximum trace files
+ */
+ static final String OPTION_MAX_TRACE_FILES = " -W "; //$NON-NLS-1$
+
+ // ------------------------------------------------------------------------
+ // Parsing constants
+ // ------------------------------------------------------------------------
+ /**
+ * Pattern to match the version.
+ */
+ static final Pattern VERSION_PATTERN = Pattern.compile(".*lttng\\s+version\\s+(\\d+\\.\\d+\\.\\d+).*"); //$NON-NLS-1$
+ /**
+ * Pattern to match for error output
+ */
+ static final Pattern ERROR_PATTERN = Pattern.compile("\\s*Error\\:.*"); //$NON-NLS-1$
+ /**
+ * Pattern to match for session information (lttng list)
+ */
+ static final Pattern SESSION_PATTERN = Pattern.compile("\\s+(\\d+)\\)\\s+(.*)\\s+\\((.*)\\)\\s+\\[(active|inactive).*\\].*"); //$NON-NLS-1$
+ /**
+ * Pattern to match for session information (lttng list <session>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final 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.
+ */
+ static final 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.
+ */
+ static final 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
+ */
+ static final Pattern TRACE_FILE_PROTOCOL_PATTERN = Pattern.compile("(file)\\:\\/\\/(.*)"); //$NON-NLS-1$
+ /**
+ * Pattern to match for kernel domain information (lttng list <session>)
+ */
+ static final Pattern DOMAIN_KERNEL_PATTERN = Pattern.compile("=== Domain: Kernel ==="); //$NON-NLS-1$
+ /**
+ * Pattern to match for ust domain information (lttng list <session>)
+ */
+ static final Pattern DOMAIN_UST_GLOBAL_PATTERN = Pattern.compile("=== Domain: UST global ==="); //$NON-NLS-1$
+ /**
+ * Pattern to match for matching warning about no kernel channel
+ */
+ static final 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
+ */
+ static final 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>)
+ */
+ static final Pattern BUFFER_TYPE_PATTERN = Pattern.compile("\\s*Buffer\\s+type\\:.*"); //$NON-NLS-1$
+ /**
+ * Pattern to match for channels section (lttng list <session>)
+ */
+ static final Pattern CHANNELS_SECTION_PATTERN = Pattern.compile("\\s*Channels\\:"); //$NON-NLS-1$
+ /**
+ * Pattern to match for channel information (lttng list <session>)
+ */
+ static final Pattern CHANNEL_PATTERN = Pattern.compile("\\s*-\\s+(.*)\\:\\s+\\[(enabled|disabled)\\]"); //$NON-NLS-1$
+ /**
+ * Pattern to match for events section information (lttng list <session>)
+ */
+ static final Pattern EVENT_SECTION_PATTERN = Pattern.compile("\\s*Events\\:"); //$NON-NLS-1$
+ /**
+ * Pattern to match for event information (lttng list <session>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final Pattern PROBE_SYMBOL_PATTERN = Pattern.compile("\\s+(symbol)\\:\\s+(.+)"); //$NON-NLS-1$
+ /**
+ * Pattern to match for channel (overwite mode) information (lttng list <session>)
+ */
+ static final Pattern OVERWRITE_MODE_ATTRIBUTE = Pattern.compile("\\s+overwrite\\s+mode\\:.*"); //$NON-NLS-1$
+ /**
+ * Pattern to match indicating false for overwrite mode
+ */
+ static final String OVERWRITE_MODE_ATTRIBUTE_FALSE = "0"; //$NON-NLS-1$
+ /**
+ * Pattern to match indicating false for overwrite mode in machine interface mode
+ */
+ static final String OVERWRITE_MODE_ATTRIBUTE_FALSE_MI = "DISCARD"; //$NON-NLS-1$
+ /**
+ * Pattern to match for channel (sub-buffer size) information (lttng list <session>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final Pattern OUTPUT_ATTRIBUTE = Pattern.compile("\\s+output\\:.*"); //$NON-NLS-1$
+ /**
+ * Pattern to match for provider information (lttng list -k/-u)
+ */
+ static final Pattern PROVIDER_EVENT_PATTERN = Pattern.compile("\\s*(.*)\\s+\\(loglevel:\\s+(.*)\\s+\\(\\d*\\)\\)\\s+\\(type:\\s+(.*)\\)"); //$NON-NLS-1$
+ /**
+ * Pattern to match event fields
+ */
+ static final Pattern EVENT_FIELD_PATTERN = Pattern.compile("\\s*(field:)\\s+(.*)\\s+\\((.*)\\)"); //$NON-NLS-1$
+ /**
+ * Pattern to match for UST provider information (lttng list -u)
+ */
+ static final 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>)
+ */
+ static final 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>)
+ */
+ static final 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".
+ */
+ static final 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.
+ */
+ static final 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.
+ */
+ static final 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.
+ */
+ static final 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.
+ */
+ static final 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)
+ */
+ static final Pattern LIST_SNAPSHOT_OUTPUT_PATTERN = Pattern.compile("\\s+\\[(\\d+)\\]\\s+(\\S*)\\:\\s+(\\S*)(.*)"); //$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.
+ */
+ static final Pattern SNAPSHOT_NETWORK_PATH_PATTERN = Pattern.compile("(net|net4|net6|tcp|tcp4|tcp6)\\:\\/\\/(.*)(\\:(\\d*)\\/(.*)\\[data\\:\\s+(\\d*)\\]){0,1}"); //$NON-NLS-1$
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Jonathan Rajotte - machine interface support
+ **********************************************************************/
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import java.util.regex.Matcher;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.logging.ControlCommandLogger;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.preferences.ControlPreferences;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
+
+/**
+ * Factory to create LTTngControlService instances depending on the version of
+ * the LTTng Trace Control installed on the remote host.
+ *
+ * @author Bernd Hufmann
+ */
+public class LTTngControlServiceFactory {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+ /**
+ * The singleton instance.
+ */
+ private static LTTngControlServiceFactory fInstance = null;
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+ /**
+ * Constructor
+ */
+ private LTTngControlServiceFactory() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+ /**
+ * @return the LTTngControlServiceFactory singleton instance.
+ */
+ public static synchronized LTTngControlServiceFactory getInstance() {
+ if (fInstance == null) {
+ fInstance = new LTTngControlServiceFactory();
+ }
+ return fInstance;
+ }
+
+ // ------------------------------------------------------------------------
+ // Factory method
+ // ------------------------------------------------------------------------
+ /**
+ * Gets the LTTng Control Service implementation based on the version of the
+ * remote LTTng Tools.
+ *
+ * @param shell
+ * - the shell implementation to pass to the service
+ * @return - LTTng Control Service implementation
+ * @throws ExecutionException
+ * If the command fails
+ */
+ public ILttngControlService getLttngControlService(ICommandShell shell) throws ExecutionException {
+ // get the version
+ boolean machineInterfaceMode = true;
+ String command = LTTngControlServiceConstants.CONTROL_COMMAND + LTTngControlServiceConstants.COMMAND_VERSION;
+ String commandMi = LTTngControlServiceConstants.CONTROL_COMMAND_MI_XML + LTTngControlServiceConstants.COMMAND_VERSION;
+
+ // Logging
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.log(commandMi);
+ }
+
+ ICommandResult result = null;
+
+ // Looking for a machine interface on LTTng side
+ try {
+ result = shell.executeCommand(commandMi, new NullProgressMonitor());
+ } catch (ExecutionException e) {
+ throw new ExecutionException(Messages.TraceControl_GettingVersionError, e);
+ }
+
+ // Output logging
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.log(LTTngControlService.formatOutput(result));
+ }
+
+ if (result.getResult() != 0) {
+ machineInterfaceMode = false;
+ // Fall back if no machine interface is present
+
+ // Logging
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.log(command);
+ }
+
+ try {
+ result = shell.executeCommand(command, new NullProgressMonitor());
+ } catch (ExecutionException e) {
+ throw new ExecutionException(Messages.TraceControl_GettingVersionError + ": " + e); //$NON-NLS-1$
+ }
+
+ // Output logging
+ if (ControlPreferences.getInstance().isLoggingEnabled()) {
+ ControlCommandLogger.log(LTTngControlService.formatOutput(result));
+ }
+ }
+
+
+ if ((result != null) && (result.getResult() == 0) && (result.getOutput().length >= 1)) {
+ if (machineInterfaceMode) {
+ LTTngControlServiceMI service = new LTTngControlServiceMI(shell, LTTngControlService.class.getResource(LTTngControlServiceConstants.MI_XSD_FILENAME));
+ service.setVersion(result.getOutput());
+ return service;
+ }
+ int index = 0;
+ while (index < result.getOutput().length) {
+ String line = result.getOutput()[index];
+ Matcher versionMatcher = LTTngControlServiceConstants.VERSION_PATTERN.matcher(line);
+ if (versionMatcher.matches()) {
+ String version = versionMatcher.group(1).trim();
+ Matcher matcher = LTTngControlServiceConstants.VERSION_2_PATTERN.matcher(version);
+ if (matcher.matches()) {
+ LTTngControlService service = new LTTngControlService(shell);
+ service.setVersion(version);
+ return service;
+ }
+ throw new ExecutionException(Messages.TraceControl_UnsupportedVersionError + ": " + version); //$NON-NLS-1$
+ }
+ index++;
+ }
+ }
+ throw new ExecutionException(Messages.TraceControl_GettingVersionError);
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte - Initial support for machine interface lttng 2.6
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.math.BigInteger;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IBaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IDomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IFieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.ISnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.IUstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.LogLevelType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceDomainType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEnablement;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceEventType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.TraceLogLevel;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BaseEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.BufferType;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ChannelInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.DomainInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.EventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.FieldInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.ProbeEventInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SessionInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.SnapshotInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.core.model.impl.UstProviderInfo;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.handlers.XmlMiValidationErrorHandler;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.messages.Messages;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandResult;
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.remote.ICommandShell;
+import org.eclipse.osgi.util.NLS;
+import org.w3c.dom.Document;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * Service for sending LTTng trace control commands to remote host via machine
+ * interface mode.
+ *
+ * @author Jonathan Rajotte
+ */
+public class LTTngControlServiceMI extends LTTngControlService {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ private final DocumentBuilder fDocumentBuilder;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param shell
+ * the command shell implementation to use
+ * @param xsdUrl
+ * the xsd schema file for validation
+ * @throws ExecutionException
+ * if the creation of the Schema and DocumentBuilder objects
+ * fails
+ */
+ public LTTngControlServiceMI(ICommandShell shell, URL xsdUrl) throws ExecutionException {
+ super(shell);
+
+ DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
+ docBuilderFactory.setValidating(false);
+
+ // TODO: Add xsd validation for machine interface via mi_lttng.xsd from LTTng
+ try {
+ fDocumentBuilder = docBuilderFactory.newDocumentBuilder();
+ } catch (ParserConfigurationException e) {
+ throw new ExecutionException(Messages.TraceControl_XmlDocumentBuilderError, e);
+ }
+
+ fDocumentBuilder.setErrorHandler(new XmlMiValidationErrorHandler());
+
+ }
+
+ /**
+ * Generate a Document object from an array of String.
+ *
+ * @param xmlStrings
+ * array of strings representing an xml input
+ * @return Document generated from strings input
+ * @throws ExecutionException
+ * when parsing has failed
+ */
+ private Document getDocumentFromStrings(String[] xmlStrings) throws ExecutionException {
+ StringBuilder concatenedString = new StringBuilder();
+ for (String string : xmlStrings) {
+ concatenedString.append(string);
+ }
+ InputSource stream = new InputSource(new StringReader(concatenedString.toString()));
+
+ Document document;
+ try {
+ document = fDocumentBuilder.parse(stream);
+ } catch (SAXException | IOException e) {
+ throw new ExecutionException(Messages.TraceControl_XmlParsingError, e);
+ }
+ return document;
+
+ }
+
+ /**
+ * Parse, populate and set the internal LTTngVersion variable
+ *
+ * @param xmlOutput
+ * the mi xml output of lttng version
+ * @throws ExecutionException
+ * when xml extraction fail
+ */
+ public void setVersion(String[] xmlOutput) throws ExecutionException {
+ Document doc = getDocumentFromStrings(xmlOutput);
+ NodeList element = doc.getElementsByTagName(MIStrings.VERSION);
+ int major = 0;
+ int minor = 0;
+ int patchLevel = 0;
+ String license = ""; //$NON-NLS-1$
+ String commit = ""; //$NON-NLS-1$
+ String name = ""; //$NON-NLS-1$
+ String description = ""; //$NON-NLS-1$
+ String url = ""; //$NON-NLS-1$
+ String fullVersion = ""; //$NON-NLS-1$
+ if (element.getLength() == 1) {
+ NodeList child = element.item(0).getChildNodes();
+ // Get basic information
+ for (int i = 0; i < child.getLength(); i++) {
+ Node node = child.item(i);
+ switch (node.getNodeName()) {
+ case MIStrings.VERSION_MAJOR:
+ major = Integer.parseInt(node.getTextContent());
+ break;
+ case MIStrings.VERSION_MINOR:
+ minor = Integer.parseInt(node.getTextContent());
+ break;
+ case MIStrings.VERSION_PATCH_LEVEL:
+ patchLevel = Integer.parseInt(node.getTextContent());
+ break;
+ case MIStrings.VERSION_COMMIT:
+ commit = node.getTextContent();
+ break;
+ case MIStrings.VERSION_DESCRIPTION:
+ description = node.getTextContent();
+ break;
+ case MIStrings.VERSION_LICENSE:
+ license = node.getTextContent();
+ break;
+ case MIStrings.VERSION_NAME:
+ name = node.getTextContent();
+ break;
+ case MIStrings.VERSION_STR:
+ fullVersion = node.getTextContent();
+ break;
+ case MIStrings.VERSION_WEB:
+ url = node.getTextContent();
+ break;
+ default:
+ break;
+ }
+ }
+ setVersion(new LttngVersion(major, minor, patchLevel, license, commit, name, description, url, fullVersion));
+ } else {
+ throw new ExecutionException(Messages.TraceControl_UnsupportedVersionError);
+ }
+ }
+
+ @Override
+ public String[] getSessionNames(IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST);
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ Document doc = getDocumentFromStrings(result.getOutput());
+
+ NodeList elements = doc.getElementsByTagName(MIStrings.NAME);
+
+ ArrayList<String> retArray = new ArrayList<>();
+ for (int i = 0; i < elements.getLength(); i++) {
+ Node node = elements.item(i);
+ if (node.getParentNode().getNodeName().equalsIgnoreCase(MIStrings.SESSION)) {
+ retArray.add(node.getTextContent());
+ }
+ }
+ return retArray.toArray(new String[retArray.size()]);
+ }
+
+ @Override
+ public ISessionInfo getSession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST, sessionName);
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ ISessionInfo sessionInfo = new SessionInfo(sessionName);
+ Document document = getDocumentFromStrings(result.getOutput());
+
+ NodeList sessionsNode = document.getElementsByTagName(MIStrings.SESSION);
+ // There should be only one session
+ if (sessionsNode.getLength() != 1) {
+ throw new ExecutionException(NLS.bind(Messages.TraceControl_MiInvalidNumberOfElementError, MIStrings.SESSION));
+ }
+
+ // Populate session information
+ Node rawSession = sessionsNode.item(0);
+ parseSession(sessionInfo, rawSession);
+
+ // Fetch the snapshot info
+ if (sessionInfo.isSnapshotSession()) {
+ ISnapshotInfo snapshot = getSnapshotInfo(sessionName, monitor);
+ sessionInfo.setSnapshotInfo(snapshot);
+ }
+
+ return sessionInfo;
+ }
+
+ /**
+ * @param sessionInfo
+ * @param rawSession
+ * @throws ExecutionException
+ */
+ private void parseSession(ISessionInfo sessionInfo, Node rawSession) throws ExecutionException {
+ if (!rawSession.getNodeName().equalsIgnoreCase(MIStrings.SESSION)) {
+ throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
+ }
+ NodeList rawSessionInfos = rawSession.getChildNodes();
+ for (int i = 0; i < rawSessionInfos.getLength(); i++) {
+ Node rawInfo = rawSessionInfos.item(i);
+ switch (rawInfo.getNodeName()) {
+ case MIStrings.NAME:
+ sessionInfo.setName(rawInfo.getTextContent());
+ break;
+ case MIStrings.PATH:
+ sessionInfo.setSessionPath(rawInfo.getTextContent());
+ break;
+ case MIStrings.ENABLED:
+ sessionInfo.setSessionState(rawInfo.getTextContent());
+ break;
+ case MIStrings.SNAPSHOT_MODE:
+ if (rawInfo.getTextContent().equals(LTTngControlServiceConstants.TRUE_NUMERICAL)) {
+ // real name will be set later
+ ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
+ sessionInfo.setSnapshotInfo(snapshotInfo);
+ }
+ break;
+ case MIStrings.LIVE_TIMER_INTERVAL:
+ // TODO : live mode not supported yet in TMF:lttng-control
+ break;
+ case MIStrings.DOMAINS:
+ // Extract the domains node
+ NodeList rawDomains = rawInfo.getChildNodes();
+ IDomainInfo domain = null;
+ for (int j = 0; j < rawDomains.getLength(); j++) {
+ if (rawDomains.item(j).getNodeName().equalsIgnoreCase(MIStrings.DOMAIN)) {
+ domain = parseDomain(rawDomains.item(j));
+ sessionInfo.addDomain(domain);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ if (!sessionInfo.isSnapshotSession()) {
+ Matcher matcher = LTTngControlServiceConstants.TRACE_NETWORK_PATTERN.matcher(sessionInfo.getSessionPath());
+ if (matcher.matches()) {
+ sessionInfo.setStreamedTrace(true);
+ }
+ }
+ }
+
+ /**
+ * Parse a raw domain XML node to a IDomainInfo object
+ *
+ * @param rawDomain
+ * a domain xml node
+ * @return a populated {@link DomainInfo} object
+ * @throws ExecutionException
+ * when missing required xml element (type)
+ */
+ protected IDomainInfo parseDomain(Node rawDomain) throws ExecutionException {
+ IDomainInfo domain = null;
+ // Get the type
+ Node rawType = getFirstOf(rawDomain.getChildNodes(), MIStrings.TYPE);
+ if (rawType == null) {
+ throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+ }
+ String rawTypeString = rawType.getTextContent().toLowerCase();
+ TraceDomainType domainType = TraceDomainType.valueOfString(rawTypeString);
+ switch (domainType) {
+ case KERNEL:
+ domain = new DomainInfo(Messages.TraceControl_KernelProviderDisplayName);
+ domain.setIsKernel(true);
+ break;
+ case UST:
+ domain = new DomainInfo(Messages.TraceControl_UstGlobalDomainDisplayName);
+ domain.setIsKernel(false);
+ break;
+ case JUL:
+ /**
+ * TODO: Support for JUL JUL substructure and semantic is not the
+ * same as a regular UST or Kernel Domain There is no channel under
+ * JUL domain only events. The channel is activated in UST Channel
+ */
+ domain = new DomainInfo(Messages.TraceControl_JULDomainDisplayName);
+ domain.setIsKernel(false);
+ break;
+ case UNKNOWN:
+ domain = new DomainInfo(Messages.TraceControl_UnknownDomainDisplayName);
+ domain.setIsKernel(false);
+ break;
+ default:
+ throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
+ }
+
+ NodeList rawInfos = rawDomain.getChildNodes();
+ for (int i = 0; i < rawInfos.getLength(); i++) {
+ Node rawInfo = rawInfos.item(i);
+ switch (rawInfo.getNodeName()) {
+ case MIStrings.BUFFER_TYPE:
+ BufferType bufferType = BufferType.valueOfString(rawInfo.getTextContent());
+ domain.setBufferType(bufferType);
+ break;
+ case MIStrings.CHANNELS:
+ ArrayList<IChannelInfo> channels = new ArrayList<>();
+ parseChannels(rawInfo.getChildNodes(), channels);
+ if (channels.size() > 0) {
+ domain.setChannels(channels);
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ return domain;
+ }
+
+ /**
+ * Parse a list of raw channel XML node into an ArrayList of IChannelInfo
+ *
+ * @param rawChannes
+ * List of raw channel XML node
+ * @param channels
+ * the parsed channels list
+ * @throws ExecutionException
+ * when missing required xml element (type)
+ */
+ private static void parseChannels(NodeList rawChannels, ArrayList<IChannelInfo> channels) throws ExecutionException {
+ IChannelInfo channel = null;
+ for (int i = 0; i < rawChannels.getLength(); i++) {
+ Node rawChannel = rawChannels.item(i);
+ if (rawChannel.getNodeName().equalsIgnoreCase(MIStrings.CHANNEL)) {
+ channel = new ChannelInfo(""); //$NON-NLS-1$
+
+ // Populate the channel
+ NodeList rawInfos = rawChannel.getChildNodes();
+ Node rawInfo = null;
+ for (int j = 0; j < rawInfos.getLength(); j++) {
+ rawInfo = rawInfos.item(j);
+ switch (rawInfo.getNodeName()) {
+ case MIStrings.NAME:
+ channel.setName(rawInfo.getTextContent());
+ break;
+ case MIStrings.ENABLED:
+ channel.setState(TraceEnablement.valueOfString(rawInfo.getTextContent()));
+ break;
+ case MIStrings.EVENTS:
+ List<IEventInfo> events = new ArrayList<>();
+ getEventInfo(rawInfo.getChildNodes(), events);
+ channel.setEvents(events);
+ break;
+ case MIStrings.ATTRIBUTES:
+ NodeList rawAttributes = rawInfo.getChildNodes();
+ for (int k = 0; k < rawAttributes.getLength(); k++) {
+ Node attribute = rawAttributes.item(k);
+ switch (attribute.getNodeName()) {
+ case MIStrings.OVERWRITE_MODE:
+ channel.setOverwriteMode(!LTTngControlServiceConstants.OVERWRITE_MODE_ATTRIBUTE_FALSE_MI.equalsIgnoreCase(attribute.getTextContent()));
+ break;
+ case MIStrings.SUBBUF_SIZE:
+ channel.setSubBufferSize(Long.valueOf(attribute.getTextContent()));
+ break;
+ case MIStrings.NUM_SUBBUF:
+ channel.setNumberOfSubBuffers(Integer.valueOf(attribute.getTextContent()));
+ break;
+ case MIStrings.SWITCH_TIMER_INTERVAL:
+ channel.setSwitchTimer(Long.valueOf(attribute.getTextContent()));
+ break;
+ case MIStrings.READ_TIMER_INTERVAL:
+ channel.setReadTimer(Long.valueOf(attribute.getTextContent()));
+ break;
+ case MIStrings.OUTPUT_TYPE:
+ channel.setOutputType(attribute.getTextContent());
+ break;
+ case MIStrings.TRACEFILE_SIZE:
+ channel.setMaxSizeTraceFiles(Integer.parseInt(attribute.getTextContent()));
+ break;
+ case MIStrings.TRACEFILE_COUNT:
+ channel.setMaxNumberTraceFiles(Integer.parseInt(attribute.getTextContent()));
+ break;
+ case MIStrings.LIVE_TIMER_INTERVAL:
+ // TODO: currently not supported by tmf
+ break;
+ default:
+ break;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ channels.add(channel);
+ }
+ }
+
+ }
+
+ @Override
+ public ISnapshotInfo getSnapshotInfo(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ // TODO A session can have multiple snapshot output. This need to be
+ // supported in the future.
+ // Currently the SessionInfo object does not support multiple snashot
+ // output.
+ // For now only keep the last one.
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_SNAPSHOT_OUTPUT, LTTngControlServiceConstants.OPTION_SESSION, sessionName);
+ ICommandResult result = executeCommand(command.toString(), monitor);
+ Document doc = getDocumentFromStrings(result.getOutput());
+ NodeList rawSnapshotsOutputs = doc.getElementsByTagName(MIStrings.SNAPSHOT_OUTPUTS);
+
+ ISnapshotInfo snapshotInfo = new SnapshotInfo(""); //$NON-NLS-1$
+
+ // TODO: tmf does not have a notion of a ctrl url.
+ for (int i = 0; i < rawSnapshotsOutputs.getLength(); i++) {
+ NodeList rawSnapshotOutput = rawSnapshotsOutputs.item(i).getChildNodes();
+ for (int j = 0; j < rawSnapshotOutput.getLength(); j++) {
+ Node rawInfo = rawSnapshotOutput.item(j);
+ switch (rawInfo.getNodeName()) {
+ case MIStrings.ID:
+ snapshotInfo.setId(Integer.parseInt(rawInfo.getTextContent()));
+ break;
+ case MIStrings.NAME:
+ snapshotInfo.setName(rawInfo.getTextContent());
+ break;
+ case MIStrings.SNAPSHOT_CTRL_URL:
+ // The use of the ctrl_url for the snapshot path is to assure
+ // basic support. Refactoring is necessary in lttng and
+ // tmf side.
+ // See http://bugs.lttng.org/issues/828 (+comment)
+ snapshotInfo.setSnapshotPath(rawInfo.getTextContent());
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ // Check if the snapshot output is Streamed
+ Matcher matcher2 = LTTngControlServiceConstants.TRACE_NETWORK_PATTERN.matcher(snapshotInfo.getSnapshotPath());
+ if (matcher2.matches()) {
+ snapshotInfo.setStreamedSnapshot(true);
+ }
+
+ return snapshotInfo;
+ }
+
+ @Override
+ public List<IBaseEventInfo> getKernelProvider(IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
+ ICommandResult result = executeCommand(command.toString(), monitor, false);
+ List<IBaseEventInfo> events = new ArrayList<>();
+
+ if (isError(result) && result.getErrorOutput() != null) {
+ // Ignore the following 2 cases:
+ // Spawning a session daemon
+ // Error: Unable to list kernel events
+ // or:
+ // Error: Unable to list kernel events
+ if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_KERNEL_NO_KERNEL_PROVIDER_PATTERN)) {
+ return events;
+ }
+ throw new ExecutionException(Messages.TraceControl_CommandError + LTTngControlServiceConstants.COMMAND_LIST_KERNEL);
+ }
+
+ Document document = getDocumentFromStrings(result.getOutput());
+ NodeList rawEvents = document.getElementsByTagName(MIStrings.EVENT);
+ getBaseEventInfo(rawEvents, events);
+ return events;
+ }
+
+ @Override
+ public List<IUstProviderInfo> getUstProvider(IProgressMonitor monitor) throws ExecutionException {
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_LIST_UST);
+ // Get the field to
+ command.append(LTTngControlServiceConstants.OPTION_FIELDS);
+
+ // Execute
+ ICommandResult result = executeCommand(command.toString(), monitor, false);
+ List<IUstProviderInfo> allProviders = new ArrayList<>();
+
+ if (isError(result) && result.getErrorOutput() != null) {
+ // Ignore the following 2 cases:
+ // Spawning a session daemon
+ // Error: Unable to list UST events: Listing UST events failed
+ // or:
+ // Error: Unable to list UST events: Listing UST events failed
+ if (ignoredPattern(result.getErrorOutput(), LTTngControlServiceConstants.LIST_UST_NO_UST_PROVIDER_PATTERN)) {
+ return allProviders;
+ }
+ throw new ExecutionException(Messages.TraceControl_CommandError + LTTngControlServiceConstants.COMMAND_LIST_UST);
+ }
+
+ Document document = getDocumentFromStrings(result.getOutput());
+ NodeList rawProviders = document.getElementsByTagName(MIStrings.PID);
+
+ IUstProviderInfo providerInfo = null;
+
+ for (int i = 0; i < rawProviders.getLength(); i++) {
+ Node provider = rawProviders.item(i);
+ Node name = getFirstOf(provider.getChildNodes(), MIStrings.NAME);
+ if (name == null) {
+ throw new ExecutionException(Messages.TraceControl_MiInvalidProviderError);
+ }
+ providerInfo = new UstProviderInfo(name.getTextContent());
+
+ // Populate provider
+ NodeList infos = provider.getChildNodes();
+ for (int j = 0; j < infos.getLength(); j++) {
+ Node info = infos.item(j);
+ switch (info.getNodeName()) {
+ case MIStrings.PID_ID:
+ providerInfo.setPid(Integer.parseInt(info.getTextContent()));
+ break;
+ case MIStrings.EVENTS:
+ List<IBaseEventInfo> events = new ArrayList<>();
+ NodeList rawEvents = info.getChildNodes();
+ getBaseEventInfo(rawEvents, events);
+ providerInfo.setEvents(events);
+ break;
+ default:
+ break;
+ }
+ }
+ allProviders.add(providerInfo);
+ }
+
+ return allProviders;
+ }
+
+ @Override
+ public ISessionInfo createSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
+ if (sessionInfo.isStreamedTrace()) {
+ return createStreamedSession(sessionInfo, monitor);
+ }
+
+ StringBuffer command = prepareSessionCreationCommand(sessionInfo);
+
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ Document document = getDocumentFromStrings(result.getOutput());
+ NodeList sessions = document.getElementsByTagName(MIStrings.SESSION);
+
+ // Number of session should be equal to 1
+ if (sessions.getLength() != 1) {
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" //$NON-NLS-1$//$NON-NLS-2$
+ + NLS.bind(Messages.TraceControl_UnexpectedNumberOfElementError, MIStrings.SESSION) + " " + sessions.getLength()); //$NON-NLS-1$
+ }
+
+ // Fetch a session from output
+ ISessionInfo outputSession = new SessionInfo(""); //$NON-NLS-1$
+ parseSession(outputSession, sessions.item(0));
+
+ // Verify session name
+ if ((outputSession.getName().equals("")) || (!"".equals(sessionInfo.getName()) && !outputSession.getName().equals(sessionInfo.getName()))) { //$NON-NLS-1$ //$NON-NLS-2$
+ // Unexpected name returned
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedNameError + ": " + outputSession.getName()); //$NON-NLS-1$
+ }
+
+ // Verify session path
+ if (!sessionInfo.isSnapshotSession() &&
+ ((outputSession.getSessionPath() == null) || ((sessionInfo.getSessionPath() != null) && (!outputSession.getSessionPath().contains(sessionInfo.getSessionPath()))))) {
+ // Unexpected path
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedPathError + ": " + outputSession.getName()); //$NON-NLS-1$
+ }
+
+ if (sessionInfo.isSnapshotSession()) {
+ // Make it a snapshot session - content of snapshot info need to
+ // set afterwards using getSession() or getSnapshotInfo()
+ outputSession.setSnapshotInfo(new SnapshotInfo("")); //$NON-NLS-1$
+ }
+
+ return outputSession;
+ }
+
+ private ISessionInfo createStreamedSession(ISessionInfo sessionInfo, IProgressMonitor monitor) throws ExecutionException {
+
+ StringBuffer command = prepareStreamedSessionCreationCommand(sessionInfo);
+
+ ICommandResult result = executeCommand(command.toString(), monitor);
+
+ Document document = getDocumentFromStrings(result.getOutput());
+ NodeList sessions = document.getElementsByTagName(MIStrings.SESSION);
+
+ // Number of session should be equal to 1
+ if (sessions.getLength() != 1) {
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" //$NON-NLS-1$//$NON-NLS-2$
+ + NLS.bind(Messages.TraceControl_UnexpectedNumberOfElementError, MIStrings.SESSION) + " " + sessions.getLength()); //$NON-NLS-1$
+ }
+
+ // Fetch a session from output
+ ISessionInfo outputSession = new SessionInfo(""); //$NON-NLS-1$
+ parseSession(outputSession, sessions.item(0));
+
+ // Verify session name
+ if ((outputSession.getName().equals("")) || (!"".equals(sessionInfo.getName()) && !outputSession.getName().equals(sessionInfo.getName()))) { //$NON-NLS-1$ //$NON-NLS-2$
+ // Unexpected name returned
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedNameError + ": " + outputSession.getName()); //$NON-NLS-1$
+ }
+
+ sessionInfo.setName(outputSession.getName());
+ sessionInfo.setStreamedTrace(true);
+
+ // Verify session path
+ if (sessionInfo.getNetworkUrl() != null) {
+ if (!sessionInfo.isSnapshotSession() && (outputSession.getSessionPath() == null)) {
+ // Unexpected path
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command + "\n" + //$NON-NLS-1$ //$NON-NLS-2$
+ Messages.TraceControl_UnexpectedPathError + ": " + outputSession.getName()); //$NON-NLS-1$
+ }
+
+ if (sessionInfo.isSnapshotSession()) {
+ sessionInfo.setStreamedTrace(false);
+ } else {
+ sessionInfo.setSessionPath(outputSession.getSessionPath());
+ // Check file protocol
+ Matcher matcher = LTTngControlServiceConstants.TRACE_FILE_PROTOCOL_PATTERN.matcher(outputSession.getSessionPath());
+ if (matcher.matches()) {
+ sessionInfo.setStreamedTrace(false);
+ }
+ }
+ }
+
+ // When using controlUrl and dataUrl the full session path is not known
+ // yet
+ // and will be set later on when listing the session
+ return sessionInfo;
+
+ }
+
+ @Override
+ public void destroySession(String sessionName, IProgressMonitor monitor) throws ExecutionException {
+ String newName = formatParameter(sessionName);
+
+ StringBuffer command = createCommand(LTTngControlServiceConstants.COMMAND_DESTROY_SESSION, newName);
+
+ ICommandResult result = executeCommand(command.toString(), monitor, false);
+ String[] errorOutput = result.getErrorOutput();
+
+ if (isError(result) && (errorOutput != null)) {
+ // Don't treat this as an error
+ if (ignoredPattern(errorOutput, LTTngControlServiceConstants.SESSION_NOT_FOUND_ERROR_PATTERN)) {
+ return;
+
+ }
+ throw new ExecutionException(Messages.TraceControl_CommandError + " " + command.toString() + "\n" + formatOutput(result)); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ // Check for action effect
+ Document doc = getDocumentFromStrings(result.getOutput());
+ NodeList sessions = doc.getElementsByTagName(MIStrings.SESSION);
+ if (sessions.getLength() != 1) {
+ throw new ExecutionException(NLS.bind(Messages.TraceControl_MiInvalidNumberOfElementError, MIStrings.SESSION));
+ }
+
+ Node rawSessionName = getFirstOf(sessions.item(0).getChildNodes(), MIStrings.NAME);
+ if (rawSessionName == null) {
+ throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+ }
+
+ // Validity check
+ if (!rawSessionName.getTextContent().equals(sessionName)) {
+ throw new ExecutionException(NLS.bind(Messages.TraceControl_UnexpectedValueError, rawSessionName.getTextContent(), sessionName));
+ }
+ }
+
+ /**
+ * @param strings
+ * array of string that make up a command line
+ * @return string buffer with created command line
+ */
+ @Override
+ protected StringBuffer createCommand(String... strings) {
+ StringBuffer command = new StringBuffer();
+ command.append(LTTngControlServiceConstants.CONTROL_COMMAND_MI_XML);
+ command.append(getTracingGroupOption());
+ for (String string : strings) {
+ command.append(string);
+ }
+ return command;
+ }
+
+ /**
+ * @param xmlBaseEvents
+ * a Node list of base xml event element
+ * @param events
+ * list of event generated by the parsing of the xml event
+ * element
+ * @throws ExecutionException
+ * when a raw event is not a complete/valid xml event
+ */
+ private static void getBaseEventInfo(NodeList xmlBaseEvents, List<IBaseEventInfo> events) throws ExecutionException {
+ IBaseEventInfo eventInfo = null;
+ for (int i = 0; i < xmlBaseEvents.getLength(); i++) {
+ NodeList rawInfos = xmlBaseEvents.item(i).getChildNodes();
+ // Search for name
+ if (xmlBaseEvents.item(i).getNodeName().equalsIgnoreCase(MIStrings.EVENT)) {
+ Node rawName = getFirstOf(rawInfos, MIStrings.NAME);
+ if (rawName == null) {
+ throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+ }
+ eventInfo = new BaseEventInfo(rawName.getTextContent());
+
+ // Populate the event
+ for (int j = 0; j < rawInfos.getLength(); j++) {
+ Node infoNode = rawInfos.item(j);
+ switch (infoNode.getNodeName()) {
+ case MIStrings.TYPE:
+ eventInfo.setEventType(infoNode.getTextContent());
+ break;
+ case MIStrings.LOGLEVEL:
+ eventInfo.setLogLevel(infoNode.getTextContent());
+ break;
+ case MIStrings.EVENT_FIELDS:
+ List<IFieldInfo> fields = new ArrayList<>();
+ getFieldInfo(infoNode.getChildNodes(), fields);
+ eventInfo.setFields(fields);
+ break;
+ default:
+ break;
+ }
+ }
+ events.add(eventInfo);
+ }
+ }
+ }
+
+ /**
+ * @param xmlBaseEvents
+ * a Node list of xml event element linked to a session
+ * @param events
+ * list of event generated by the parsing of the xml event
+ * element
+ * @throws ExecutionException
+ * when a raw event is not a complete/valid xml event
+ */
+ static void getEventInfo(NodeList xmlEvents, List<IEventInfo> events) throws ExecutionException {
+ IEventInfo eventInfo = null;
+ for (int i = 0; i < xmlEvents.getLength(); i++) {
+ NodeList rawInfos = xmlEvents.item(i).getChildNodes();
+ // Search for name
+ if (xmlEvents.item(i).getNodeName().equalsIgnoreCase(MIStrings.EVENT)) {
+ Node rawName = getFirstOf(rawInfos, MIStrings.NAME);
+ if (rawName == null) {
+ throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+ }
+
+ eventInfo = new EventInfo(rawName.getTextContent());
+
+ // Basic information
+ for (int j = 0; j < rawInfos.getLength(); j++) {
+ Node infoNode = rawInfos.item(j);
+ switch (infoNode.getNodeName()) {
+ case MIStrings.TYPE:
+ eventInfo.setEventType(infoNode.getTextContent());
+ break;
+ case MIStrings.LOGLEVEL_TYPE:
+ eventInfo.setLogLevelType(LogLevelType.valueOfString(infoNode.getTextContent()));
+ break;
+ case MIStrings.LOGLEVEL:
+ eventInfo.setLogLevel(TraceLogLevel.valueOfString(infoNode.getTextContent()));
+ break;
+ case MIStrings.ENABLED:
+ eventInfo.setState(TraceEnablement.valueOfString(infoNode.getTextContent()));
+ break;
+ case MIStrings.FILTER:
+ // TODO
+ // See bug 334 http://bugs.lttng.org/issues/334 from
+ // LTTng
+ // For now we emulate the non-mi behavior and simply put
+ // "with filter"
+ eventInfo.setFilterExpression("with filter"); //$NON-NLS-1$
+ break;
+ case MIStrings.EXCLUSION:
+ // TODO: Currently not supported by tmf
+ // ExclusionS element is ignored
+ break;
+ default:
+ break;
+ }
+ }
+
+ boolean isProbeFunction = (eventInfo.getEventType().equals(TraceEventType.PROBE)) || (eventInfo.getEventType().equals(TraceEventType.FUNCTION));
+ if (isProbeFunction) {
+ IProbeEventInfo probeEvent = new ProbeEventInfo(eventInfo);
+ eventInfo = probeEvent;
+
+ Node rawDataNode = null;
+ switch (probeEvent.getEventType()) {
+ case FUNCTION:
+ case PROBE: {
+ // get attributes
+ Node rawAttributes = getFirstOf(rawInfos, MIStrings.ATTRIBUTES);
+ if (rawAttributes == null) {
+ throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+ }
+ rawDataNode = getFirstOf(rawAttributes.getChildNodes(), MIStrings.PROBE_ATTRIBUTES);
+ break;
+ }
+ case SYSCALL:
+ case TRACEPOINT:
+ case UNKNOWN:
+ default:
+ throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
+ }
+
+ if (rawDataNode == null) {
+ throw new ExecutionException(Messages.TraceControl_MiInvalidElementError);
+ }
+
+ // Extract info
+ NodeList rawDatas = rawDataNode.getChildNodes();
+ for (int j = 0; j < rawDatas.getLength(); j++) {
+ Node rawData = rawDatas.item(j);
+ switch (rawData.getNodeName()) {
+ case MIStrings.SYMBOL_NAME:
+ probeEvent.setSymbol(rawData.getTextContent());
+ break;
+ case MIStrings.ADDRESS:
+ probeEvent.setAddress(String.format("%#016x", new BigInteger(rawData.getTextContent()))); //$NON-NLS-1$
+ break;
+ case MIStrings.OFFSET:
+ probeEvent.setOffset(String.format("%#016x", new BigInteger(rawData.getTextContent()))); //$NON-NLS-1$
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ // Syscalls does not have name.
+ // Let put one to make sure this is user friendly via UI
+ if (eventInfo.getEventType().equals(TraceEventType.SYSCALL)) {
+ eventInfo.setName(TraceEventType.SYSCALL.getInName());
+ }
+
+ // Add the event
+ events.add(eventInfo);
+ }
+ }
+ }
+
+ /**
+ * @param fieldsList
+ * a list of xml event_field element
+ * @param fields
+ * a list of field generated by xml parsing
+ * @throws ExecutionException
+ * when parsing fail or required elements are missing
+ */
+ private static void getFieldInfo(NodeList fieldsList, List<IFieldInfo> fields) throws ExecutionException {
+ IFieldInfo fieldInfo = null;
+ for (int i = 0; i < fieldsList.getLength(); i++) {
+ Node field = fieldsList.item(i);
+ if (field.getNodeName().equalsIgnoreCase(MIStrings.EVENT_FIELD)) {
+ // Get name
+ Node name = getFirstOf(field.getChildNodes(), MIStrings.NAME);
+ if (name == null) {
+ throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+ }
+ fieldInfo = new FieldInfo(name.getTextContent());
+
+ // Populate the field information
+ NodeList infos = field.getChildNodes();
+ for (int j = 0; j < infos.getLength(); j++) {
+ Node info = infos.item(j);
+ switch (info.getNodeName()) {
+ case MIStrings.TYPE:
+ fieldInfo.setFieldType(info.getTextContent());
+ break;
+ default:
+ break;
+ }
+ }
+ fields.add(fieldInfo);
+ }
+ }
+ }
+
+ /**
+ * Retrieve the fist instance of a given node with tag name equal to tagName
+ * parameter
+ *
+ * @param nodeList
+ * the list of Node to search against
+ * @param tagName
+ * the tag name of the desired node
+ * @return the first occurrence of a node with a tag name equals to tagName
+ */
+ private static Node getFirstOf(NodeList nodeList, String tagName) {
+ Node node = null;
+ for (int i = 0; i < nodeList.getLength(); i++) {
+ if (nodeList.item(i).getNodeName() == tagName) {
+ node = nodeList.item(i);
+ break;
+ }
+ }
+ return node;
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Jonathan Rajotte - Machine interface support and new information
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import org.osgi.framework.Version;
+
+/**
+ * A version implementation with a special compareTo implementation to bypass
+ * problems of older implementation of org.osgi.framework.Version.
+ *
+ * @author Bernd Hufmann
+ */
+public class LttngVersion extends Version {
+
+ private final String fLicense;
+ private final String fCommit;
+ private final String fName;
+ private final String fDescription;
+ private final String fUrl;
+ private final String fFullVersion;
+
+ /**
+ * Constructor
+ *
+ * @param version
+ * The version string
+ */
+ public LttngVersion(String version) {
+ super(version);
+ fLicense = ""; //$NON-NLS-1$
+ fCommit = ""; //$NON-NLS-1$
+ fName = ""; //$NON-NLS-1$
+ fDescription = ""; //$NON-NLS-1$
+ fUrl = ""; //$NON-NLS-1$
+ fFullVersion = ""; //$NON-NLS-1$
+ }
+
+ /**
+ * @param major
+ * major version number
+ * @param minor
+ * minor version number
+ * @param micro
+ * micro version number
+ * @param license
+ * licence text of LTTng
+ * @param commit
+ * current git commit information about LTTng
+ * @param name
+ * name of the version
+ * @param description
+ * description of the version
+ * @param url
+ * url to website
+ * @param fullVersion
+ * complete string representation of the version
+ */
+ public LttngVersion(int major, int minor, int micro, String license, String commit, String name, String description, String url, String fullVersion) {
+ super(major, minor, micro);
+ fLicense = license;
+ fCommit = commit;
+ fName = name;
+ fDescription = description;
+ fUrl = url;
+ fFullVersion = fullVersion;
+ }
+
+ /**
+ * Special compareTo method to fix problem of older implementations of
+ * org.osgi.framework.Version where {@code Version.compareTo} takes an
+ * {@code Object} instead a {@code Version} as argument.
+ *
+ * @param other
+ * - Other version to compare
+ * @return a negative integer, zero, or a positive integer if this version
+ * is less than, equal to, or greater than the specified
+ * {@code LttngVersion} object.
+ */
+ public int compareTo(LttngVersion other) {
+ if (other == this) { // quicktest
+ return 0;
+ }
+ int result = getMajor() - other.getMajor();
+ if (result != 0) {
+ return result;
+ }
+
+ result = getMinor() - other.getMinor();
+ if (result != 0) {
+ return result;
+ }
+
+ result = getMicro() - other.getMicro();
+ if (result != 0) {
+ return result;
+ }
+ return getQualifier().compareTo(other.getQualifier());
+ }
+
+ /**
+ * @return String representing the lttng license
+ */
+ public String getLicense() {
+ return fLicense;
+ }
+
+ /**
+ * @return commit id of lttng
+ */
+ public String getCommit() {
+ return fCommit;
+ }
+
+ /**
+ * @return name of lttng version
+ */
+ public String getName() {
+ return fName;
+ }
+
+ /**
+ * @return full description of lttng
+ */
+ public String getDescription() {
+ return fDescription;
+ }
+
+ /**
+ * @return url of lttng
+ */
+ public String getUrl() {
+ return fUrl;
+ }
+
+ /**
+ * @return the full_version
+ */
+ public String getFullVersion() {
+ return fFullVersion;
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Jonathan Rajotte Julien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+
+/**
+ * Non-externalized strings for use with the LTTng Control services. This
+ * nformation is extracted from mi_lttng.xsd from lttng-tool libmi.
+ *
+ * @author Jonathan Rajotte
+ */
+@SuppressWarnings("nls")
+@NonNullByDefault
+public interface MIStrings {
+
+ /**
+ * Represent the command_action xml element
+ */
+ String COMMAND_ACTION = "snapshot_action";
+
+ /**
+ * Represent the command_add_context xml element
+ */
+ String COMMAND_ADD_CONTEXT = "add-context";
+
+ /**
+ * Represent the command_calibrate xml element
+ */
+ String COMMAND_CALIBRATE = "calibrate";
+
+ /**
+ * Represent the command_create xml element
+ */
+ String COMMAND_CREATE = "create";
+
+ /**
+ * Represent the command_destroy xml element
+ */
+ String COMMAND_DESTROY = "destroy";
+
+ /**
+ * Represent the command_disable_channel xml element
+ */
+ String COMMAND_DISABLE_CHANNEL = "disable-channel";
+
+ /**
+ * Represent the command_disable_event xml element
+ */
+ String COMMAND_DISABLE_EVENT = "disable-event";
+
+ /**
+ * Represent the command_enable_channels xml element
+ */
+ String COMMAND_ENABLE_CHANNELS = "enable-channel";
+
+ /**
+ * Represent the command_enable_event xml element
+ */
+ String COMMAND_ENABLE_EVENT = "enable-event";
+
+ /**
+ * Represent the command_list xml element
+ */
+ String COMMAND_LIST = "list";
+
+ /**
+ * Represent the command_load xml element
+ */
+ String COMMAND_LOAD = "load";
+
+ /**
+ * Represent the command_name xml element
+ */
+ String COMMAND_NAME = "name";
+
+ /**
+ * Represent the command_output xml element
+ */
+ String COMMAND_OUTPUT = "output";
+
+ /**
+ * Represent the command_save xml element
+ */
+ String COMMAND_SAVE = "save";
+
+ /**
+ * Represent the command_set_session xml element
+ */
+ String COMMAND_SET_SESSION = "set-session";
+
+ /**
+ * Represent the command_snapshot xml element
+ */
+ String COMMAND_SNAPSHOT = "snapshot";
+
+ /**
+ * Represent the command_snapshot_add xml element
+ */
+ String COMMAND_SNAPSHOT_ADD = "add_snapshot";
+
+ /**
+ * Represent the command_snapshot_del xml element
+ */
+ String COMMAND_SNAPSHOT_DEL = "del_snapshot";
+
+ /**
+ * Represent the command_snapshot_list xml element
+ */
+ String COMMAND_SNAPSHOT_LIST = "list_snapshot";
+
+ /**
+ * Represent the command_snapshot_record xml element
+ */
+ String COMMAND_SNAPSHOT_RECORD = "record_snapshot";
+
+ /**
+ * Represent the command_start xml element
+ */
+ String COMMAND_START = "start";
+
+ /**
+ * Represent the command_stop xml element
+ */
+ String COMMAND_STOP = "stop";
+
+ /**
+ * Represent the command_success xml element
+ */
+ String COMMAND_SUCCESS = "success";
+
+ /**
+ * Represent the command_version xml element
+ */
+ String COMMAND_VERSION = "version";
+
+ /**
+ * Represent the version xml element
+ */
+ String VERSION = "version";
+
+ /**
+ * Represent the version_commit xml element
+ */
+ String VERSION_COMMIT = "commit";
+
+ /**
+ * Represent the version_description xml element
+ */
+ String VERSION_DESCRIPTION = "description";
+
+ /**
+ * Represent the version_license xml element
+ */
+ String VERSION_LICENSE = "license";
+
+ /**
+ * Represent the version_major xml element
+ */
+ String VERSION_MAJOR = "major";
+
+ /**
+ * Represent the version_minor xml element
+ */
+ String VERSION_MINOR = "minor";
+
+ /**
+ * Represent the version_patch_level xml element
+ */
+ String VERSION_PATCH_LEVEL = "patchLevel";
+
+ /**
+ * Represent the version_str xml element
+ */
+ String VERSION_STR = "string";
+
+ /**
+ * Represent the version_web xml element
+ */
+ String VERSION_WEB = "url";
+
+ /**
+ * Represent the version_name xml element
+ */
+ String VERSION_NAME = "name";
+ /* String related to a lttng_event_field */
+
+ /**
+ * Represent the event_field xml element
+ */
+ String EVENT_FIELD = "event_field";
+
+ /**
+ * Represent the event_fields xml element
+ */
+ String EVENT_FIELDS = "event_fields";
+
+ /**
+ * Represent the perf_counter_context xml element
+ */
+ String PERF_COUNTER_CONTEXT = "perf_counter_context";
+
+ // ------------------------------------------------------------------------
+ // String related to pid
+ // ------------------------------------------------------------------------/
+
+ /**
+ * Represent the pids xml element
+ */
+ String PIDS = "pids";
+
+ /**
+ * Represent the pid xml element
+ */
+ String PID = "pid";
+
+ /**
+ * Represent the pid_id xml element
+ */
+ String PID_ID = "id";
+
+ // ------------------------------------------------------------------------
+ // String related to save command
+ // ------------------------------------------------------------------------
+ /**
+ * Represent the save xml element
+ */
+ String SAVE = "save";
+
+ // ------------------------------------------------------------------------
+ // String related to load command
+ // ------------------------------------------------------------------------
+ /**
+ * Represent the load xml element
+ */
+ String LOAD = "load";
+
+ // ------------------------------------------------------------------------
+ // String related to general element of mi_lttng
+ // ------------------------------------------------------------------------
+ /**
+ * Represent the empty xml element
+ */
+ String EMPTY = "";
+
+ /**
+ * Represent the id xml element
+ */
+ String ID = "id";
+
+ /**
+ * Represent the nowrite xml element
+ */
+ String NOWRITE = "nowrite";
+
+ /**
+ * Represent the success xml element
+ */
+ String SUCCESS = "success";
+
+ /**
+ * Represent the type_enum xml element
+ */
+ String TYPE_ENUM = "ENUM";
+
+ /**
+ * Represent the type_float xml element
+ */
+ String TYPE_FLOAT = "FLOAT";
+
+ /**
+ * Represent the type_integer xml element
+ */
+ String TYPE_INTEGER = "INTEGER";
+
+ /**
+ * Represent the type_other xml element
+ */
+ String TYPE_OTHER = "OTHER";
+
+ /**
+ * Represent the type_string xml element
+ */
+ String TYPE_STRING = "STRING";
+
+ // ------------------------------------------------------------------------
+ // String related to lttng_calibrate
+ // ------------------------------------------------------------------------
+ /**
+ * Represent the calibrate xml element
+ */
+ String CALIBRATE = "calibrate";
+
+ /**
+ * Represent the calibrate_function xml element
+ */
+ String CALIBRATE_FUNCTION = "FUNCTION";
+
+ // ------------------------------------------------------------------------
+ // String related to a lttng_snapshot_output
+ // ------------------------------------------------------------------------
+ /**
+ * Represent the snapshot_ctrl_url xml element
+ */
+ String SNAPSHOT_CTRL_URL = "ctrl_url";
+
+ /**
+ * Represent the snapshot_data_url xml element
+ */
+ String SNAPSHOT_DATA_URL = "data_url";
+
+ /**
+ * Represent the snapshot_max_size xml element
+ */
+
+ String SNAPSHOT_MAX_SIZE = "max_size";
+
+ /**
+ * Represent the snapshot_n_ptr xml element
+ */
+ String SNAPSHOT_N_PTR = "n_ptr";
+
+ /**
+ * Represent the snapshot_session_name xml element
+ */
+ String SNAPSHOT_SESSION_NAME = "session_name";
+
+ /**
+ * Represent the snapshots xml element
+ */
+ String SNAPSHOTS = "snapshots";
+ /**
+ * Represent the channel xml element
+ */
+ String CHANNEL = "channel";
+
+ /**
+ * Represent the channels xml element
+ */
+ String CHANNELS = "channels";
+
+ /**
+ * Represent the domain xml element
+ */
+ String DOMAIN = "domain";
+
+ /**
+ * Represent the domains xml element
+ */
+ String DOMAINS = "domains";
+
+ /**
+ * Represent the event xml element
+ */
+ String EVENT = "event";
+
+ /**
+ * Represent the events xml element
+ */
+ String EVENTS = "events";
+
+ /**
+ * Represent the context xml element
+ */
+ String CONTEXT = "context";
+
+ /**
+ * Represent the contexts xml element
+ */
+ String CONTEXTS = "contexts";
+
+ /**
+ * Represent the attributes xml element
+ */
+ String ATTRIBUTES = "attributes";
+
+ /**
+ * Represent the exclusion xml element
+ */
+ String EXCLUSION = "exclusion";
+
+ /**
+ * Represent the exclusions xml element
+ */
+ String EXCLUSIONS = "exclusions";
+
+ /**
+ * Represent the function_attributes xml element
+ */
+ String FUNCTION_ATTRIBUTES = "function_attributes";
+
+ /**
+ * Represent the probe_attributes xml element
+ */
+ String PROBE_ATTRIBUTES = "probe_attributes";
+
+ /**
+ * Represent the symbol_name xml element
+ */
+ String SYMBOL_NAME = "symbol_name";
+
+ /**
+ * Represent the address xml element
+ */
+ String ADDRESS = "address";
+
+ /**
+ * Represent the offset xml element
+ */
+ String OFFSET = "offset";
+
+ /**
+ * Represent the name xml element
+ */
+ String NAME = "name";
+
+ /**
+ * Represent the enabled xml element
+ */
+ String ENABLED = "enabled";
+
+ /**
+ * Represent the overwrite_mode xml element
+ */
+ String OVERWRITE_MODE = "overwrite_mode";
+
+ /**
+ * Represent the subbuf_size xml element
+ */
+ String SUBBUF_SIZE = "subbuffer_size";
+
+ /**
+ * Represent the num_subbuf xml element
+ */
+ String NUM_SUBBUF = "subbuffer_count";
+
+ /**
+ * Represent the switch_timer_interval xml element
+ */
+ String SWITCH_TIMER_INTERVAL = "switch_timer_interval";
+
+ /**
+ * Represent the read_timer_interval xml element
+ */
+ String READ_TIMER_INTERVAL = "read_timer_interval";
+
+ /**
+ * Represent the output xml element
+ */
+ String OUTPUT = "output";
+
+ /**
+ * Represent the output_type xml element
+ */
+ String OUTPUT_TYPE = "output_type";
+
+ /**
+ * Represent the tracefile_size xml element
+ */
+ String TRACEFILE_SIZE = "tracefile_size";
+
+ /**
+ * Represent the tracefile_count xml element
+ */
+ String TRACEFILE_COUNT = "tracefile_count";
+
+ /**
+ * Represent the live_timer_interval xml element
+ */
+ String LIVE_TIMER_INTERVAL = "live_timer_interval";
+
+ /**
+ * Represent the type xml element
+ */
+ String TYPE = "type";
+
+ /**
+ * Represent the buffer_type xml element
+ */
+ String BUFFER_TYPE = "buffer_type";
+
+ /**
+ * Represent the session xml element
+ */
+ String SESSION = "session";
+
+ /**
+ * Represent the sessions xml element
+ */
+ String SESSIONS = "sessions";
+
+ /**
+ * Represent the perf xml element
+ */
+ String PERF = "perf";
+
+ /**
+ * Represent the config xml element
+ */
+ String CONFIG = "config";
+
+ /**
+ * Represent the started xml element
+ */
+ String STARTED = "started";
+
+ /**
+ * Represent the snapshot_mode xml element
+ */
+ String SNAPSHOT_MODE = "snapshot_mode";
+
+ /**
+ * Represent the loglevel xml element
+ */
+ String LOGLEVEL = "loglevel";
+
+ /**
+ * Represent the loglevel_type xml element
+ */
+ String LOGLEVEL_TYPE = "loglevel_type";
+
+ /**
+ * Represent the filter xml element
+ */
+ String FILTER = "filter";
+
+ /**
+ * Represent the snapshot_outputs xml element
+ */
+ String SNAPSHOT_OUTPUTS = "snapshot";
+
+ /**
+ * Represent the consumer_output xml element
+ */
+ String CONSUMER_OUTPUT = "consumer_output";
+
+ /**
+ * Represent the destination xml element
+ */
+ String DESTINATION = "destination";
+
+ /**
+ * Represent the path xml element
+ */
+ String PATH = "path";
+
+ /**
+ * Represent the net_output xml element
+ */
+ String NET_OUTPUT = "net_output";
+
+ /**
+ * Represent the control_uri xml element
+ */
+ String CONTROL_URI = "control_uri";
+
+ /**
+ * Represent the data_uri xml element
+ */
+ String DATA_URI = "data_uri";
+
+ /**
+ * Represent the max_size xml element
+ */
+ String MAX_SIZE = "max_size";
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.control</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+bin.includes = feature.xml,\
+ feature.properties,\
+ p2.inf
+src.includes = sourceTemplateFeature/p2.inf
--- /dev/null
+###############################################################################
+# Copyright (c) 2012, 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+featureName=Trace Compass LTTng Tracer Control
+
+description=Plug-ins to integrate LTTng tracer control into the workbench. \
+Includes the TMF (Tracing and Monitoring Framework) and CTF (Common Trace Format) features.
+
+featureProvider=Eclipse Trace Compass
+
+copyright=Copyright 2013 Ericsson
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.tracecompass.lttng2.control"
+ label="%featureName"
+ version="3.2.0.qualifier"
+ provider-name="%featureProvider"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description url="http://www.example.com/description">
+ %description
+ </description>
+
+ <copyright url="http://www.example.com/copyright">
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Linux Tools Update Site" url="http://download.eclipse.org/linuxtools/update"/>
+ </url>
+
+ <includes
+ id="org.eclipse.linuxtools.tmf.ctf"
+ version="0.0.0"/>
+
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.tracecompass.lttng2.control.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.linuxtools.tmf.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.linuxtools.tmf.ui" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.help"/>
+ <import feature="org.eclipse.rse" version="3.1.100" match="greaterOrEqual"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.tracecompass.lttng2.control.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tracecompass.lttng2.control.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.lttng.help"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
--- /dev/null
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
+
+update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.lttng2.feature.group' || pc.name == 'org.eclipse.linuxtools.lttng2.control.feature.group'))
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.control</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+
+ <name>Trace Compass LTTng (Linux Tracing Toolkit) Feature</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <plugin id="org.eclipse.linuxtools.lttng.help"/>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
+
+update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.lttng2.source.feature.group' || pc.name == 'org.eclipse.linuxtools.lttng2.control.source.feature.group'))
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="perf"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.kernel.core.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.kernel.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core,
+ org.eclipse.linuxtools.tmf.ctf.core.tests,
+ org.eclipse.tracecompass.lttng2.kernel.core;bundle-version="3.1.0",
+ org.eclipse.core.resources,
+ org.eclipse.linuxtools.statesystem.core,
+ org.eclipse.tracecompass.lttng2.control.core
+Export-Package: org.eclipse.linuxtools.lttng2.kernel.core.tests,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis;x-internal:=true,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;x-internal:=true,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.perf,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis;x-internal:=true,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;x-internal:=true
+Import-Package: com.google.common.collect,
+ org.eclipse.test.performance
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/,\
+ perf/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Alexandre Montplaisir - Initial implementation and API
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Run all performance test suites.
+ *
+ * @author Alexandre Montplaisir
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis.AllPerfTests.class,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching.AllPerfTests.class
+})
+public class AllPerfTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ AnalysisBenchmark.class
+})
+public class AllPerfTests {
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ * Alexandre Montplaisir - Convert to org.eclipse.test.performance test
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.analysis;
+
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.File;
+
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
+import org.eclipse.linuxtools.tmf.core.analysis.IAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.tests.shared.TmfTestHelper;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.junit.Test;
+
+/**
+ * This is a test of the time to build a kernel state system
+ *
+ * @author Genevieve Bastien
+ */
+public class AnalysisBenchmark {
+
+ private static final String TEST_ID = "org.eclipse.linuxtools#LTTng kernel analysis";
+ private static final int LOOP_COUNT = 25;
+
+ /**
+ * Run the benchmark with "trace2"
+ */
+ @Test
+ public void testTrace2() {
+ runTest(CtfTmfTestTrace.TRACE2, "Trace2");
+ }
+
+ private static void runTest(CtfTmfTestTrace testTrace, String testName) {
+ assumeTrue(testTrace.exists());
+
+ Performance perf = Performance.getDefault();
+ PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + '#' + testName);
+ perf.tagAsSummary(pm, "LTTng Kernel Analysis: " + testName, Dimension.CPU_TIME);
+
+ if (testTrace == CtfTmfTestTrace.TRACE2) {
+ /* Do not show all traces in the global summary */
+ perf.tagAsGlobalSummary(pm, "LTTng Kernel Analysis: " + testName, Dimension.CPU_TIME);
+ }
+
+ for (int i = 0; i < LOOP_COUNT; i++) {
+ try (IAnalysisModule module = new LttngKernelAnalysisModule();
+ LttngKernelTrace trace = new LttngKernelTrace()) {
+ module.setId("test");
+ trace.initTrace(null, testTrace.getPath(), CtfTmfEvent.class);
+ module.setTrace(trace);
+
+ pm.start();
+ TmfTestHelper.executeAnalysis(module);
+ pm.stop();
+
+ /*
+ * Delete the supplementary files, so that the next iteration
+ * rebuilds the state system.
+ */
+ File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(trace));
+ for (File file : suppDir.listFiles()) {
+ file.delete();
+ }
+
+ } catch (TmfAnalysisException | TmfTraceException e) {
+ fail(e.getMessage());
+ }
+
+ }
+ pm.commit();
+ testTrace.dispose();
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ EventMatchingBenchmark.class,
+ TraceSynchronizationBenchmark.class
+})
+public class AllPerfTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching;
+
+import static org.junit.Assume.assumeTrue;
+
+import java.util.Set;
+
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Benchmark simple event matching, without trace synchronization
+ *
+ * @author Geneviève Bastien
+ */
+public class EventMatchingBenchmark {
+
+ private static final String TEST_ID = "org.eclipse.linuxtools#Event matching#";
+ private static final String TIME = " (time)";
+ private static final String MEMORY = " (memory usage)";
+ private static final String TEST_SUMMARY = "Event matching";
+
+ /**
+ * Initialize some data
+ */
+ @BeforeClass
+ public static void setUp() {
+ TmfEventMatching.registerMatchObject(new TcpEventMatching());
+ TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
+ }
+
+ /**
+ * Run the benchmark with 2 small traces
+ */
+ @Test
+ public void testSmallTraces() {
+ assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
+ assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
+ Set<ITmfTrace> traces = ImmutableSet.of((ITmfTrace) trace1, trace2);
+ runCpuTest(traces, "Match TCP events", 100);
+ }
+ }
+
+ /**
+ * Run the benchmark with 3 bigger traces
+ */
+ @Test
+ public void testDjangoTraces() {
+ assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
+ assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
+ assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
+ CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();) {
+ Set<ITmfTrace> traces = ImmutableSet.of((ITmfTrace) trace1, trace2, trace3);
+ runCpuTest(traces, "Django traces", 10);
+ runMemoryTest(traces, "Django traces", 10);
+ }
+ }
+
+ private static void runCpuTest(Set<ITmfTrace> testTraces, String testName, int loop_count) {
+ Performance perf = Performance.getDefault();
+ PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + TIME);
+ perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + TIME, Dimension.CPU_TIME);
+
+ for (int i = 0; i < loop_count; i++) {
+ TmfNetworkEventMatching traceMatch = new TmfNetworkEventMatching(testTraces);
+
+ pm.start();
+ traceMatch.matchEvents();
+ pm.stop();
+ }
+ pm.commit();
+
+ }
+
+ /* Benchmark memory used by the algorithm */
+ private static void runMemoryTest(Set<ITmfTrace> testTraces, String testName, int loop_count) {
+ Performance perf = Performance.getDefault();
+ PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + MEMORY);
+ perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + MEMORY, Dimension.USED_JAVA_HEAP);
+
+ for (int i = 0; i < loop_count; i++) {
+ TmfNetworkEventMatching traceMatch = new TmfNetworkEventMatching(testTraces);
+
+ System.gc();
+ pm.start();
+ traceMatch.matchEvents();
+ System.gc();
+ pm.stop();
+ }
+ pm.commit();
+
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.perf.event.matching;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assume.assumeTrue;
+
+import java.util.Arrays;
+
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
+import org.eclipse.linuxtools.tmf.core.synchronization.SynchronizationAlgorithm;
+import org.eclipse.linuxtools.tmf.core.synchronization.SynchronizationManager;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Benchmark trace synchronization
+ *
+ * @author Geneviève Bastien
+ */
+public class TraceSynchronizationBenchmark {
+
+ private static final String TEST_ID = "org.eclipse.linuxtools#Trace synchronization#";
+ private static final String TIME = " (time)";
+ private static final String MEMORY = " (memory usage)";
+ private static final String TEST_SUMMARY = "Trace synchronization";
+
+ /**
+ * Initialize some data
+ */
+ @BeforeClass
+ public static void setUp() {
+ TmfEventMatching.registerMatchObject(new TcpEventMatching());
+ TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
+ }
+
+ /**
+ * Run the benchmark with 2 small traces
+ */
+ @Test
+ public void testSmallTraces() {
+ assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
+ assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
+ ITmfTrace[] traces = { trace1, trace2 };
+ runCpuTest(traces, "Match TCP events", 40);
+ }
+ }
+
+ /**
+ * Run the benchmark with 3 bigger traces
+ */
+ @Test
+ public void testDjangoTraces() {
+ assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
+ assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
+ assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
+ CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();) {
+ ITmfTrace[] traces = { trace1, trace2, trace3 };
+ runCpuTest(traces, "Django traces", 10);
+ runMemoryTest(traces, "Django traces", 10);
+ }
+ }
+
+ private static void runCpuTest(ITmfTrace[] testTraces, String testName, int loop_count) {
+ Performance perf = Performance.getDefault();
+ PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + TIME);
+ perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + TIME, Dimension.CPU_TIME);
+
+ for (int i = 0; i < loop_count; i++) {
+ pm.start();
+ SynchronizationManager.synchronizeTraces(null, Arrays.asList(testTraces), true);
+ pm.stop();
+ }
+ pm.commit();
+
+ }
+
+ /* Benchmark memory used by the algorithm */
+ private static void runMemoryTest(ITmfTrace[] testTraces, String testName, int loop_count) {
+ Performance perf = Performance.getDefault();
+ PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + testName + MEMORY);
+ perf.tagAsSummary(pm, TEST_SUMMARY + ':' + testName + MEMORY, Dimension.USED_JAVA_HEAP);
+
+ for (int i = 0; i < loop_count; i++) {
+
+ System.gc();
+ pm.start();
+ SynchronizationAlgorithm algo = SynchronizationManager.synchronizeTraces(null, Arrays.asList(testTraces), true);
+ assertNotNull(algo);
+
+ System.gc();
+ pm.stop();
+ }
+ pm.commit();
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Kernel Analysis Core Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.kernel.core.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Kernel Analysis Core Tests Plug-in</name>
+
+ <build>
+ <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>prepare</id>
+ <phase>validate</phase>
+ <configuration>
+ <target>
+ <echo message="prepare phase" />
+ </target>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <includes>
+ <include>**/AllTests.*</include>
+ </includes>
+ <useUIHarness>false</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <product>org.eclipse.platform.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests;
+
+import junit.framework.TestCase;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * <b><u>ActivatorTest</u></b>
+ * <p>
+ * Test suite for the Activator class
+ * <p>
+ */
+@SuppressWarnings("javadoc")
+public class ActivatorTest extends TestCase {
+
+ // ------------------------------------------------------------------------
+ // JUnit
+ // ------------------------------------------------------------------------
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() {
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @After
+ @Override
+ public void tearDown() throws Exception {
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#Activator()}.
+ */
+ @Test
+ public void testActivator() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#getDefault()}.
+ */
+ @Test
+ public void testGetDefault() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#start(org.osgi.framework.BundleContext)}.
+ */
+ @Test
+ public void testStartBundleContext() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#stop(org.osgi.framework.BundleContext)}.
+ */
+ @Test
+ public void testStopBundleContext() {
+ assertTrue(true);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the lttng2.kernel unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis.AllTests.class,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider.TestAll.class,
+ org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync.AllTests.class
+})
+public class AllTests { }
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for org.eclipse.linuxtools.lttng2.kernel.core.analysis package
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ LttngKernelAnalysisTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.analysis;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
+import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.tests.shared.TmfTestHelper;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Test the {@link LttngKernelAnalysisModule} class
+ *
+ * @author Geneviève Bastien
+ */
+public class LttngKernelAnalysisTest {
+
+ private ITmfTrace fTrace;
+ private LttngKernelAnalysisModule fKernelAnalysisModule;
+
+ /**
+ * Class setup
+ */
+ @BeforeClass
+ public static void setUpClass() {
+ assumeTrue(CtfTmfTestTrace.KERNEL.exists());
+ }
+
+ /**
+ * Set-up the test
+ */
+ @Before
+ public void setUp() {
+ fKernelAnalysisModule = new LttngKernelAnalysisModule();
+ fTrace = CtfTmfTestTrace.KERNEL.getTrace();
+ }
+
+ /**
+ * Dispose test objects
+ */
+ @After
+ public void tearDown() {
+ fTrace.dispose();
+ fKernelAnalysisModule.dispose();
+ }
+
+ /**
+ * Test the LTTng kernel analysis execution
+ */
+ @Test
+ public void testAnalysisExecution() {
+ fKernelAnalysisModule.setId("test");
+ try {
+ fKernelAnalysisModule.setTrace(fTrace);
+ } catch (TmfAnalysisException e) {
+ fail(e.getMessage());
+ }
+ // Assert the state system has not been initialized yet
+ ITmfStateSystem ss = fKernelAnalysisModule.getStateSystem();
+ assertNull(ss);
+
+ assertTrue(TmfTestHelper.executeAnalysis(fKernelAnalysisModule));
+
+ ss = fKernelAnalysisModule.getStateSystem();
+ assertNotNull(ss);
+
+ List<Integer> quarks = ss.getQuarks("*");
+ assertFalse(quarks.isEmpty());
+ }
+
+ /**
+ * Test the canExecute method on valid and invalid traces
+ */
+ @Test
+ public void testCanExecute() {
+ /* Test with a valid kernel trace */
+ assertNotNull(fTrace);
+ assertTrue(fKernelAnalysisModule.canExecute(fTrace));
+
+ /* Test with a CTF trace that does not have required events */
+ assumeTrue(CtfTmfTestTrace.CYG_PROFILE.exists());
+ try (CtfTmfTrace trace = CtfTmfTestTrace.CYG_PROFILE.getTrace();) {
+ /*
+ * TODO: This should be false, but for now there is no mandatory
+ * events in the kernel analysis so it will return true.
+ */
+ assertTrue(fKernelAnalysisModule.canExecute(trace));
+ }
+ }
+
+ /**
+ * Test for {@link LttngKernelAnalysisModule#getAnalysisRequirements()}
+ */
+ @Test
+ public void testGetAnalysisRequirements() {
+ Iterable<TmfAnalysisRequirement> requirements = fKernelAnalysisModule.getAnalysisRequirements();
+ assertNotNull(requirements);
+
+ /* There should be the event and domain type */
+ TmfAnalysisRequirement eventReq = null;
+ TmfAnalysisRequirement domainReq = null;
+ int numberOfRequirement = 0;
+ for (TmfAnalysisRequirement requirement : requirements) {
+ ++numberOfRequirement;
+ if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_EVENT)) {
+ eventReq = requirement;
+ } else if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN)) {
+ domainReq = requirement;
+ }
+ }
+ assertNotNull(eventReq);
+ assertNotNull(domainReq);
+
+ /* There should be two requirements */
+ assertEquals(2, numberOfRequirement);
+
+ /* Verify the content of the requirements themselves */
+ /* Domain should be kernel */
+ assertEquals(1, domainReq.getValues().size());
+ for (String domain : domainReq.getValues()) {
+ assertEquals(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, domain);
+ }
+
+ /* Events */
+ Set<String> expectedEvents = ImmutableSet.of(
+ LttngStrings.EXIT_SYSCALL,
+ LttngStrings.IRQ_HANDLER_ENTRY,
+ LttngStrings.IRQ_HANDLER_EXIT,
+ LttngStrings.SOFTIRQ_ENTRY,
+ LttngStrings.SOFTIRQ_EXIT,
+ LttngStrings.SOFTIRQ_RAISE,
+ LttngStrings.SCHED_SWITCH,
+ LttngStrings.SCHED_PROCESS_FORK,
+ LttngStrings.SCHED_PROCESS_EXIT,
+ LttngStrings.SCHED_PROCESS_FREE,
+ LttngStrings.STATEDUMP_PROCESS_STATE,
+ LttngStrings.SCHED_WAKEUP,
+ LttngStrings.SCHED_WAKEUP_NEW,
+ /* Add the prefix for syscalls */
+ LttngStrings.SYSCALL_PREFIX
+ );
+
+ assertEquals(14, eventReq.getValues().size());
+ for (String event : eventReq.getValues()) {
+ assertTrue("Unexpected event " + event, expectedEvents.contains(event));
+ }
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matching
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ExperimentSyncTest.class,
+ MatchAndSyncTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
+import org.eclipse.linuxtools.tmf.core.synchronization.ITmfTimestampTransform;
+import org.eclipse.linuxtools.tmf.core.synchronization.SynchronizationAlgorithm;
+import org.eclipse.linuxtools.tmf.core.synchronization.TimestampTransformFactory;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests for experiment syncing
+ *
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings("nls")
+public class ExperimentSyncTest {
+
+ private static final String EXPERIMENT = "MyExperiment";
+ private static int BLOCK_SIZE = 1000;
+
+ /**
+ * Initialize some data
+ */
+ @BeforeClass
+ public static void setUp() {
+ TmfEventMatching.registerMatchObject(new TcpEventMatching());
+ TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
+ }
+
+ /**
+ * Testing experiment synchronization
+ */
+ @Test
+ public void testExperimentSync() {
+ assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
+ assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
+
+ ITmfTrace[] traces = { trace1, trace2 };
+ TmfExperiment experiment = new TmfExperiment(traces[0].getEventType(), EXPERIMENT, traces, BLOCK_SIZE);
+
+ SynchronizationAlgorithm syncAlgo = experiment.synchronizeTraces(true);
+
+ ITmfTimestampTransform tt1 = syncAlgo.getTimestampTransform(trace1);
+ ITmfTimestampTransform tt2 = syncAlgo.getTimestampTransform(trace2);
+
+ trace1.setTimestampTransform(tt1);
+ trace2.setTimestampTransform(tt2);
+
+ assertEquals("TmfTimestampLinear [ slope = 0.9999413783703139011056845831168394, offset = 79796507913179.33347660124688298171 ]", tt1.toString());
+ assertEquals(TimestampTransformFactory.getDefaultTransform(), tt2);
+
+ assertEquals(syncAlgo.getTimestampTransform(trace1.getHostId()), trace1.getTimestampTransform());
+ assertEquals(syncAlgo.getTimestampTransform(trace2.getHostId()), trace2.getTimestampTransform());
+
+ }
+ }
+
+ /**
+ * Testing synchronization with 3 traces, one of which synchronizes with
+ * both other
+ */
+ @Test
+ public void testDjangoExperimentSync() {
+ assumeTrue(CtfTmfTestTrace.DJANGO_CLIENT.exists());
+ assumeTrue(CtfTmfTestTrace.DJANGO_DB.exists());
+ assumeTrue(CtfTmfTestTrace.DJANGO_HTTPD.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.DJANGO_CLIENT.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.DJANGO_DB.getTrace();
+ CtfTmfTrace trace3 = CtfTmfTestTrace.DJANGO_HTTPD.getTrace();) {
+ ITmfTrace[] traces = { trace1, trace2, trace3 };
+ TmfExperiment experiment = new TmfExperiment(traces[0].getEventType(), EXPERIMENT, traces, BLOCK_SIZE);
+
+ SynchronizationAlgorithm syncAlgo = experiment.synchronizeTraces(true);
+
+ ITmfTimestampTransform tt1 = syncAlgo.getTimestampTransform(trace1);
+ ITmfTimestampTransform tt2 = syncAlgo.getTimestampTransform(trace2);
+ ITmfTimestampTransform tt3 = syncAlgo.getTimestampTransform(trace3);
+
+ trace1.setTimestampTransform(tt1);
+ trace2.setTimestampTransform(tt2);
+ trace3.setTimestampTransform(tt3);
+
+ assertEquals(TimestampTransformFactory.getDefaultTransform(), tt1);
+ assertEquals("TmfTimestampLinear [ slope = 0.9999996313017589597204633828681240, offset = 498490309972.0038068817738527724192 ]", tt2.toString());
+ assertEquals("TmfTimestampLinear [ slope = 1.000000119014882262265342419815932, offset = -166652893534.6189900382736187431134 ]", tt3.toString());
+
+ }
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.event.matchandsync;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.Test;
+
+/**
+ * Tests for {@link TcpEventMatching}
+ *
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings("nls")
+public class MatchAndSyncTest {
+
+ /**
+ * Testing the packet matching
+ */
+ @Test
+ public void testMatching() {
+ final String cr = System.getProperty("line.separator");
+ assumeTrue(CtfTmfTestTrace.SYNC_SRC.exists());
+ assumeTrue(CtfTmfTestTrace.SYNC_DEST.exists());
+ try (CtfTmfTrace trace1 = CtfTmfTestTrace.SYNC_SRC.getTrace();
+ CtfTmfTrace trace2 = CtfTmfTestTrace.SYNC_DEST.getTrace();) {
+
+ List<ITmfTrace> tracearr = new LinkedList<>();
+ tracearr.add(trace1);
+ tracearr.add(trace2);
+
+ TmfEventMatching.registerMatchObject(new TcpEventMatching());
+ TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
+
+ TmfNetworkEventMatching twoTraceMatch = new TmfNetworkEventMatching(tracearr);
+ assertTrue(twoTraceMatch.matchEvents());
+
+ String stats = twoTraceMatch.toString();
+ assertEquals("TmfEventMatches [ Number of matches found: 46 ]" +
+ "Trace 0:" + cr +
+ " 3 unmatched incoming events" + cr +
+ " 2 unmatched outgoing events" + cr +
+ "Trace 1:" + cr +
+ " 2 unmatched incoming events" + cr +
+ " 1 unmatched outgoing events" + cr, stats);
+
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+
+/**
+ * Small program to regenerate the values used in "TestValues.java" from the
+ * current LTTng-kernel state provider.
+ *
+ * It will write its output the a file called 'TestValues<something>.java' in your
+ * temporary files directory.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class GenerateTestValues {
+
+ private static CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
+ private static final long targetTimestamp = 18670067372290L + 1331649577946812237L;
+ private static final String INDENT = " ";
+
+ /**
+ * Run the program
+ *
+ * @param args
+ * Command-line arguments, unused.
+ * @throws Exception
+ * I'm messing with Exception. Come at me bro!
+ */
+ public static void main(String[] args) throws Exception {
+ if (!testTrace.exists()) {
+ System.err.println("Trace files not present.");
+ return;
+ }
+
+ /* Prepare the files */
+ File logFile = File.createTempFile("TestValues", ".java");
+ try (final CtfTmfTrace trace = testTrace.getTrace();
+ PrintWriter writer = new PrintWriter(new FileWriter(logFile), true);
+ /* Build and query the state system */
+ TmfStateSystemAnalysisModule module = new TmfStateSystemAnalysisModule() {
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelStateProvider(trace);
+ }
+
+ @Override
+ protected String getSsFileName() {
+ return "test-values";
+ }
+ };) {
+ module.setTrace(trace);
+ module.setId("test-values");
+ module.schedule();
+ module.waitForCompletion();
+ ITmfStateSystem ssq = module.getStateSystem();
+ if (ssq == null) {
+ throw new IllegalStateException();
+ }
+
+ List<ITmfStateInterval> fullState = ssq.queryFullState(targetTimestamp);
+
+ /* Start printing the java file's contents */
+ writer.println("interface TestValues {");
+ writer.println();
+ writer.println(INDENT + "static final int size = " + fullState.size() + ";");
+ writer.println();
+
+ /* Print the array contents */
+ writer.println(INDENT + "static final long[] startTimes = {");
+ for (ITmfStateInterval interval : fullState) {
+ writer.println(INDENT + INDENT + String.valueOf(interval.getStartTime()) + "L,");
+ }
+ writer.println(INDENT + "};");
+ writer.println();
+
+ writer.println(INDENT + "static final long[] endTimes = {");
+ for (ITmfStateInterval interval : fullState) {
+ writer.println(INDENT + INDENT + String.valueOf(interval.getEndTime()) + "L,");
+ }
+ writer.println(INDENT + "};");
+ writer.println();
+
+ writer.println(INDENT + "static final ITmfStateValue[] values = {");
+ for (ITmfStateInterval interval : fullState) {
+ ITmfStateValue val = interval.getStateValue();
+ writer.print(INDENT + INDENT);
+
+ switch (val.getType()) {
+ case NULL:
+ writer.println("TmfStateValue.nullValue(),");
+ break;
+ case INTEGER:
+ writer.println("TmfStateValue.newValueInt(" + val.unboxInt() + "),");
+ break;
+ case LONG:
+ writer.println("TmfStateValue.newValueLong(" + val.unboxLong() + "),");
+ break;
+ case DOUBLE:
+ writer.println("TmfStateValue.newValueDouble(" + val.unboxDouble() + "),");
+ break;
+ case STRING:
+ writer.println("TmfStateValue.newValueString(\"" + val.unboxStr() + "\"),");
+ break;
+ default:
+ writer.println(val.toString());
+ break;
+ }
+ }
+ writer.println(INDENT + "};");
+
+ writer.println("}");
+ writer.println();
+
+ }
+ System.exit(0);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 Ericsson
+ * Copyright (c) 2010, 2011 École Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ *
+ * 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
+ *
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Tests for the {@link LttngKernelStateProvider}
+ *
+ * @author Alexandre Montplaisir
+ */
+public class LttngKernelStateProviderTest {
+
+ private static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
+
+ private static ITmfStateProvider input;
+
+ /**
+ * Set-up.
+ */
+ @BeforeClass
+ public static void initialize() {
+ assumeTrue(testTrace.exists());
+ input = new LttngKernelStateProvider(testTrace.getTrace());
+
+ }
+
+ /**
+ * Test loading the state provider.
+ */
+ @Test
+ public void testOpening() {
+ long testStartTime;
+ testStartTime = input.getStartTime();
+ assertEquals(testStartTime, StateSystemTest.startTime);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ * Bernd Hufmann - Use state system analysis module instead of factory
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.junit.After;
+import org.junit.Test;
+
+/**
+ * State system tests using a partial history.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class PartialStateSystemTest extends StateSystemTest {
+
+ private static final @NonNull String TEST_FILE_NAME = "test-partial";
+
+ private File stateFile;
+ private TestLttngKernelAnalysisModule module;
+
+ @Override
+ protected ITmfStateSystem initialize() {
+ stateFile = new File(TmfTraceManager.getSupplementaryFileDir(testTrace.getTrace()) + TEST_FILE_NAME);
+ if (stateFile.exists()) {
+ stateFile.delete();
+ }
+
+ module = new TestLttngKernelAnalysisModule(TEST_FILE_NAME);
+ try {
+ module.setTrace(testTrace.getTrace());
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module.schedule();
+ assertTrue(module.waitForCompletion());
+ return module.getStateSystem();
+ }
+
+ /**
+ * Class clean-up
+ */
+ @After
+ public void cleanup() {
+ if (module != null) {
+ module.close();
+ }
+ if (stateFile != null) {
+ stateFile.delete();
+ }
+ }
+
+ /**
+ * Partial histories cannot get the intervals' end times. The fake value that
+ * is returned is equal to the query's timestamp. So override this here
+ * so that {@link #testFullQueryThorough} keeps working.
+ */
+ @Override
+ protected long getEndTimes(int idx) {
+ return interestingTimestamp1;
+ }
+
+ // ------------------------------------------------------------------------
+ // Skip tests using single-queries (unsupported in partial history)
+ // ------------------------------------------------------------------------
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testSingleQuery1() {
+ super.testSingleQuery1();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testRangeQuery1() {
+ super.testRangeQuery1();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testRangeQuery2() {
+ super.testRangeQuery2();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testRangeQuery3() {
+ super.testRangeQuery3();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testSingleQueryInvalidTime1() throws TimeRangeException {
+ super.testSingleQueryInvalidTime1();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testSingleQueryInvalidTime2() throws TimeRangeException {
+ super.testSingleQueryInvalidTime2();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testRangeQueryInvalidTime1() throws TimeRangeException {
+ super.testRangeQueryInvalidTime1();
+ }
+
+ @Override
+ @Test(expected = UnsupportedOperationException.class)
+ public void testRangeQueryInvalidTime2() throws TimeRangeException {
+ super.testRangeQueryInvalidTime2();
+ }
+
+ @NonNullByDefault
+ private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+ private final String htFileName;
+
+ /**
+ * Constructor adding the views to the analysis
+ * @param htFileName
+ * The History File Name
+ */
+ public TestLttngKernelAnalysisModule(String htFileName) {
+ super();
+ this.htFileName = htFileName;
+ }
+
+ @Override
+ public void setTrace(@Nullable ITmfTrace trace) throws TmfAnalysisException {
+ if (!(trace instanceof CtfTmfTrace)) {
+ throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
+ }
+ super.setTrace(trace);
+ }
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelStateProvider(getTrace());
+ }
+
+ @Override
+ protected StateSystemBackendType getBackendType() {
+ return StateSystemBackendType.PARTIAL;
+ }
+
+ @Override
+ protected String getSsFileName() {
+ return htFileName;
+ }
+
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ * Bernd Hufmann - Use state system analysis module instead of factory
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.junit.After;
+import org.junit.Test;
+
+/**
+ * State system tests using a full history back-end and the LTTng kernel state
+ * input.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class StateSystemFullHistoryTest extends StateSystemTest {
+
+ private static final @NonNull String TEST_FILE_NAME = "test.ht";
+ private static final @NonNull String BENCHMARK_FILE_NAME = "test.benchmark.ht";
+
+ private File stateFile;
+ private File stateFileBenchmark;
+ private TestLttngKernelAnalysisModule module;
+
+ @Override
+ protected ITmfStateSystem initialize() {
+ stateFile = createStateFile(TEST_FILE_NAME);
+ stateFileBenchmark = createStateFile(BENCHMARK_FILE_NAME);
+
+ module = new TestLttngKernelAnalysisModule(TEST_FILE_NAME);
+ try {
+ module.setTrace(testTrace.getTrace());
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module.schedule();
+ assertTrue(module.waitForCompletion());
+ return module.getStateSystem();
+ }
+
+ /**
+ * Clean-up
+ */
+ @After
+ public void cleanup() {
+ if (module != null) {
+ module.close();
+ }
+ if (stateFile != null) {
+ stateFile.delete();
+ }
+ if (stateFileBenchmark != null) {
+ stateFileBenchmark.delete();
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests specific to a full-history
+ // ------------------------------------------------------------------------
+
+ /**
+ * Rebuild independently so we can benchmark it. Too bad JUnit doesn't allow
+ * us to @Test the @BeforeClass...
+ */
+ @Test
+ public void testBuild() {
+ try (TestLttngKernelAnalysisModule module2 =
+ new TestLttngKernelAnalysisModule(BENCHMARK_FILE_NAME);) {
+ try {
+ module2.setTrace(testTrace.getTrace());
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module2.schedule();
+ assertTrue(module2.waitForCompletion());
+ ITmfStateSystem ssb2 = module2.getStateSystem();
+
+ assertNotNull(ssb2);
+ assertEquals(startTime, ssb2.getStartTime());
+ assertEquals(endTime, ssb2.getCurrentEndTime());
+ }
+ }
+
+ /**
+ * Test re-opening the existing file.
+ */
+ @Test
+ public void testOpenExistingStateFile() {
+ /* 'newStateFile' should have already been created */
+ try (TestLttngKernelAnalysisModule module2 = new TestLttngKernelAnalysisModule(TEST_FILE_NAME);) {
+ try {
+ module2.setTrace(testTrace.getTrace());
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module2.schedule();
+ assertTrue(module2.waitForCompletion());
+ ITmfStateSystem ssb2 = module2.getStateSystem();
+
+ assertNotNull(ssb2);
+ assertEquals(startTime, ssb2.getStartTime());
+ assertEquals(endTime, ssb2.getCurrentEndTime());
+ }
+ }
+
+ @NonNullByDefault
+ private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+ private final String htFileName;
+
+ /**
+ * Constructor adding the views to the analysis
+ * @param htFileName
+ * The History File Name
+ */
+ public TestLttngKernelAnalysisModule(String htFileName) {
+ super();
+ this.htFileName = htFileName;
+ }
+
+ @Override
+ public void setTrace(@Nullable ITmfTrace trace) throws TmfAnalysisException {
+ if (!(trace instanceof CtfTmfTrace)) {
+ throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
+ }
+ super.setTrace(trace);
+ }
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelStateProvider(getTrace());
+ }
+
+ @Override
+ protected StateSystemBackendType getBackendType() {
+ return StateSystemBackendType.FULL;
+ }
+
+ @Override
+ protected String getSsFileName() {
+ return htFileName;
+ }
+ }
+
+ private static File createStateFile(String name) {
+ File file = new File(TmfTraceManager.getSupplementaryFileDir(testTrace.getTrace()) + name);
+ if (file.exists()) {
+ file.delete();
+ }
+ return file;
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ * Bernd Hufmann - Use state system analysis module instead of factory
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.junit.After;
+
+/**
+ * State system tests using the in-memory back-end.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class StateSystemInMemoryTest extends StateSystemTest {
+
+ private TestLttngKernelAnalysisModule module;
+
+ @Override
+ protected ITmfStateSystem initialize() {
+ module = new TestLttngKernelAnalysisModule();
+ try {
+ module.setTrace(testTrace.getTrace());
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module.schedule();
+ assertTrue(module.waitForCompletion());
+ return module.getStateSystem();
+ }
+
+ /**
+ * Class cleanup
+ */
+ @After
+ public void cleanup() {
+ if (module != null) {
+ module.close();
+ }
+ }
+
+ private static class TestLttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+ /**
+ * Constructor adding the views to the analysis
+ */
+ public TestLttngKernelAnalysisModule() {
+ super();
+ }
+
+ @Override
+ public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
+ if (!(trace instanceof CtfTmfTrace)) {
+ throw new IllegalStateException("TestLttngKernelAnalysisModule: trace should be of type CtfTmfTrace"); //$NON-NLS-1$
+ }
+ super.setTrace(trace);
+ }
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelStateProvider(getTrace());
+ }
+
+ @Override
+ protected StateSystemBackendType getBackendType() {
+ return StateSystemBackendType.INMEM;
+ }
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson
+ * Copyright (c) 2010, 2011 École Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ *
+ * 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
+ *
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+import org.junit.rules.Timeout;
+
+/**
+ * Base unit tests for the StateHistorySystem. Extension can be made to test
+ * different state back-end types or configurations.
+ *
+ * @author Alexandre Montplaisir
+ */
+@SuppressWarnings("javadoc")
+public abstract class StateSystemTest {
+
+ /** Timeout the tests after 2 minutes */
+ @Rule
+ public TestRule timeoutRule = new Timeout(120000);
+
+ /** Test trace used for these tests */
+ protected static final CtfTmfTestTrace testTrace = CtfTmfTestTrace.TRACE2;
+
+ /** Expected start time of the test trace/state history */
+ protected static final long startTime = 1331668247314038062L;
+
+ /** Expected end time of the state history built from the test trace */
+ protected static final long endTime = 1331668259054285979L;
+
+ /** Offset in the trace + start time of the trace */
+ protected static final long interestingTimestamp1 = 18670067372290L + 1331649577946812237L;
+
+ /** Number of nanoseconds in one second */
+ private static final long NANOSECS_PER_SEC = 1000000000L;
+
+ private ITmfStateSystem fixture;
+
+
+ /**
+ * Class set-up
+ */
+ @Before
+ public void setUp() {
+ assumeTrue(testTrace.exists());
+ fixture = this.initialize();
+ assertNotNull(fixture);
+ }
+
+ protected abstract ITmfStateSystem initialize();
+
+ @After
+ public void tearDown() {
+ if (fixture != null) {
+ fixture.dispose();
+ }
+ fixture = null;
+ }
+
+ @Test
+ public void testFullQuery1() {
+ List<ITmfStateInterval> list;
+ ITmfStateInterval interval;
+ int quark, valueInt;
+ String valueStr;
+
+ try {
+ list = fixture.queryFullState(interestingTimestamp1);
+
+ quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ interval = list.get(quark);
+ valueInt = interval.getStateValue().unboxInt();
+ assertEquals(1397, valueInt);
+
+ quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
+ interval = list.get(quark);
+ valueStr = interval.getStateValue().unboxStr();
+ assertEquals("gdbus", valueStr);
+
+ quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.SYSTEM_CALL);
+ interval = list.get(quark);
+ valueStr = interval.getStateValue().unboxStr();
+ assertTrue(valueStr.equals("sys_poll"));
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testSingleQuery1() {
+ long timestamp = interestingTimestamp1;
+ int quark;
+ ITmfStateInterval interval;
+ String valueStr;
+
+ try {
+ quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
+ interval = fixture.querySingleState(timestamp, quark);
+ valueStr = interval.getStateValue().unboxStr();
+ assertEquals("gdbus", valueStr);
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ /**
+ * Test a range query (with no resolution parameter, so all intervals)
+ */
+ @Test
+ public void testRangeQuery1() {
+ long time1 = interestingTimestamp1;
+ long time2 = time1 + 1L * NANOSECS_PER_SEC;
+ int quark;
+ List<ITmfStateInterval> intervals;
+
+ try {
+ quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ intervals = fixture.queryHistoryRange(quark, time1, time2);
+ assertEquals(487, intervals.size()); /* Number of context switches! */
+ assertEquals(1685, intervals.get(100).getStateValue().unboxInt());
+ assertEquals(1331668248427681372L, intervals.get(205).getEndTime());
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ /**
+ * Range query, but with a t2 far off the end of the trace. The result
+ * should still be valid.
+ */
+ @Test
+ public void testRangeQuery2() {
+ List<ITmfStateInterval> intervals;
+
+ try {
+ int quark = fixture.getQuarkAbsolute(Attributes.RESOURCES, Attributes.IRQS, "1");
+ long ts1 = fixture.getStartTime(); /* start of the trace */
+ long ts2 = startTime + 20L * NANOSECS_PER_SEC; /* invalid, but ignored */
+
+ intervals = fixture.queryHistoryRange(quark, ts1, ts2);
+
+ /* Activity of IRQ 1 over the whole trace */
+ assertEquals(65, intervals.size());
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ /**
+ * Test a range query with a resolution
+ */
+ @Test
+ public void testRangeQuery3() {
+ long time1 = interestingTimestamp1;
+ long time2 = time1 + 1L * NANOSECS_PER_SEC;
+ long resolution = 1000000; /* One query every millisecond */
+ int quark;
+ List<ITmfStateInterval> intervals;
+
+ try {
+ quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ intervals = fixture.queryHistoryRange(quark, time1, time2, resolution, null);
+ assertEquals(126, intervals.size()); /* Number of context switches! */
+ assertEquals(1452, intervals.get(50).getStateValue().unboxInt());
+ assertEquals(1331668248815698779L, intervals.get(100).getEndTime());
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ /**
+ * Ask for a time range outside of the trace's range
+ */
+ @Test(expected = TimeRangeException.class)
+ public void testFullQueryInvalidTime1() throws TimeRangeException,
+ StateSystemDisposedException {
+ long ts = startTime + 20L * NANOSECS_PER_SEC;
+ fixture.queryFullState(ts);
+ }
+
+ @Test(expected = TimeRangeException.class)
+ public void testFullQueryInvalidTime2() throws TimeRangeException,
+ StateSystemDisposedException {
+ long ts = startTime - 20L * NANOSECS_PER_SEC;
+ fixture.queryFullState(ts);
+ }
+
+ @Test(expected = TimeRangeException.class)
+ public void testSingleQueryInvalidTime1() throws TimeRangeException {
+ try {
+ int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ long ts = startTime + 20L * NANOSECS_PER_SEC;
+ fixture.querySingleState(ts, quark);
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test(expected = TimeRangeException.class)
+ public void testSingleQueryInvalidTime2() throws TimeRangeException {
+ try {
+ int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ long ts = startTime - 20L * NANOSECS_PER_SEC;
+ fixture.querySingleState(ts, quark);
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test(expected = TimeRangeException.class)
+ public void testRangeQueryInvalidTime1() throws TimeRangeException {
+ try {
+ int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ long ts1 = startTime - 20L * NANOSECS_PER_SEC; /* invalid */
+ long ts2 = startTime + 1L * NANOSECS_PER_SEC; /* valid */
+ fixture.queryHistoryRange(quark, ts1, ts2);
+
+ } catch (AttributeNotFoundException e) {
+ fail();
+ } catch (StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test(expected = TimeRangeException.class)
+ public void testRangeQueryInvalidTime2() throws TimeRangeException {
+ try {
+ int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ long ts1 = startTime - 1L * NANOSECS_PER_SEC; /* invalid */
+ long ts2 = startTime + 20L * NANOSECS_PER_SEC; /* invalid */
+ fixture.queryHistoryRange(quark, ts1, ts2);
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ /**
+ * Ask for a non-existing attribute
+ *
+ * @throws AttributeNotFoundException
+ */
+ @Test(expected = AttributeNotFoundException.class)
+ public void testQueryInvalidAttribute() throws AttributeNotFoundException {
+ fixture.getQuarkAbsolute("There", "is", "no", "cow", "level");
+ }
+
+ /**
+ * Query but with the wrong State Value type
+ */
+ @Test(expected = StateValueTypeException.class)
+ public void testQueryInvalidValuetype1() throws StateValueTypeException {
+ List<ITmfStateInterval> list;
+ ITmfStateInterval interval;
+ int quark;
+
+ try {
+ list = fixture.queryFullState(interestingTimestamp1);
+ quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ interval = list.get(quark);
+
+ /* This is supposed to be an int value */
+ interval.getStateValue().unboxStr();
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test(expected = StateValueTypeException.class)
+ public void testQueryInvalidValuetype2() throws StateValueTypeException {
+ List<ITmfStateInterval> list;
+ ITmfStateInterval interval;
+ int quark;
+
+ try {
+ list = fixture.queryFullState(interestingTimestamp1);
+ quark = fixture.getQuarkAbsolute(Attributes.THREADS, "1432", Attributes.EXEC_NAME);
+ interval = list.get(quark);
+
+ /* This is supposed to be a String value */
+ interval.getStateValue().unboxInt();
+
+ } catch (AttributeNotFoundException | StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFullAttributeName() {
+ try {
+ int quark = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ String name = fixture.getFullAttributePath(quark);
+ assertEquals(name, "CPUs/0/Current_thread");
+
+ } catch (AttributeNotFoundException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testGetQuarks_begin() {
+ List<Integer> list = fixture.getQuarks("*", "1577", Attributes.EXEC_NAME);
+
+ assertEquals(1, list.size());
+ }
+
+ @Test
+ public void testGetQuarks_middle() {
+ List<Integer> list = fixture.getQuarks(Attributes.THREADS, "*", Attributes.EXEC_NAME);
+
+ /* Number of different kernel threads in the trace */
+ assertEquals(168, list.size());
+ }
+
+ @Test
+ public void testGetQuarks_end() {
+ List<Integer> list = fixture.getQuarks(Attributes.THREADS, "1577", "*");
+
+ /* There should be 4 sub-attributes for each Thread node */
+ assertEquals(4, list.size());
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests verifying the *complete* results of a full queries
+ // ------------------------------------------------------------------------
+
+ protected long getStartTimes(int idx) {
+ return TestValues.startTimes[idx];
+ }
+
+ protected long getEndTimes(int idx) {
+ return TestValues.endTimes[idx];
+ }
+
+ protected ITmfStateValue getStateValues(int idx) {
+ return TestValues.values[idx];
+ }
+
+ @Test
+ public void testFullQueryThorough() {
+ try {
+ List<ITmfStateInterval> state = fixture.queryFullState(interestingTimestamp1);
+ assertEquals(TestValues.size, state.size());
+
+ for (int i = 0; i < state.size(); i++) {
+ /* Test each component of the intervals */
+ assertEquals(getStartTimes(i), state.get(i).getStartTime());
+ assertEquals(getEndTimes(i), state.get(i).getEndTime());
+ assertEquals(i, state.get(i).getAttribute());
+ assertEquals(getStateValues(i), state.get(i).getStateValue());
+ }
+
+ } catch (StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testFirstIntervalIsConsidered() {
+ try {
+ List<ITmfStateInterval> list = fixture.queryFullState(1331668248014135800L);
+ ITmfStateInterval interval = list.get(233);
+ assertEquals(1331668247516664825L, interval.getStartTime());
+
+ int valueInt = interval.getStateValue().unboxInt();
+ assertEquals(1, valueInt);
+
+ } catch (StateSystemDisposedException e) {
+ fail();
+ }
+ }
+
+ @Test
+ public void testParentAttribute() {
+ String[] path = { "CPUs/0/Current_thread",
+ "CPUs/0",
+ "CPUs" };
+ try {
+ int q = fixture.getQuarkAbsolute(Attributes.CPUS, "0", Attributes.CURRENT_THREAD);
+ for (int i = 0; i < path.length; i++) {
+ String name = fixture.getFullAttributePath(q);
+ assertEquals(path[i], name);
+ q = fixture.getParentAttributeQuark(q);
+ }
+ assertEquals(-1, q);
+ q = fixture.getParentAttributeQuark(q);
+ assertEquals(-1, q);
+ } catch (AttributeNotFoundException e) {
+ fail();
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Alexandre Montplaisir - Initial implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the LTTng kernel state system tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ LttngKernelStateProviderTest.class,
+ PartialStateSystemTest.class,
+ StateSystemFullHistoryTest.class,
+ StateSystemInMemoryTest.class
+})
+public class TestAll {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.tests.stateprovider;
+
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
+
+/**
+ * Expected return values of querying test trace #1's state system at time
+ * "18670067372290L + 1331649577946812237L"
+ *
+ * @author Alexandre Montplaisir
+ */
+interface TestValues {
+
+ static final int size = 863;
+
+ static final long[] startTimes = {
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248014145796L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247399757985L,
+ 1331668247316320929L,
+ 1331668247316334243L,
+ 1331668247314046266L,
+ 1331668247314038062L,
+ 1331668248014183954L,
+ 1331668247314038062L,
+ 1331668247327098502L,
+ 1331668247327098502L,
+ 1331668247327098502L,
+ 1331668247327098502L,
+ 1331668247314038062L,
+ 1331668247415001807L,
+ 1331668247415001807L,
+ 1331668247415001807L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248013353414L,
+ 1331668248004935409L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248014184526L,
+ 1331668248014130616L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248011125682L,
+ 1331668247314038062L,
+ 1331668247931793142L,
+ 1331668247959041965L,
+ 1331668248011129576L,
+ 1331668247314038062L,
+ 1331668247335106720L,
+ 1331668247335106720L,
+ 1331668247335106720L,
+ 1331668247335106720L,
+ 1331668247931782426L,
+ 1331668247315274351L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247335112802L,
+ 1331668247335112802L,
+ 1331668247335112802L,
+ 1331668247335112802L,
+ 1331668247314038062L,
+ 1331668248004705322L,
+ 1331668247314038062L,
+ 1331668248004935409L,
+ 1331668248004925240L,
+ 1331668247316553071L,
+ 1331668247314038062L,
+ 1331668247399743968L,
+ 1331668247316925661L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247999256178L,
+ 1331668247999250697L,
+ 1331668247318567561L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247999336085L,
+ 1331668247999327778L,
+ 1331668247318631139L,
+ 1331668247314038062L,
+ 1331668247960265258L,
+ 1331668247314038062L,
+ 1331668247903884233L,
+ 1331668247903869067L,
+ 1331668247328403934L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247908495390L,
+ 1331668247908464125L,
+ 1331668247328921944L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247903840082L,
+ 1331668247903831313L,
+ 1331668247329404733L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247960291263L,
+ 1331668247314038062L,
+ 1331668247330548245L,
+ 1331668247314038062L,
+ 1331668247340039213L,
+ 1331668247340083580L,
+ 1331668247966976915L,
+ 1331668247314038062L,
+ 1331668248004729173L,
+ 1331668247314038062L,
+ 1331668247371137735L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247387196023L,
+ 1331668247387191465L,
+ 1331668247376420842L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247400231496L,
+ 1331668247400218303L,
+ 1331668247378430187L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247751186217L,
+ 1331668247314038062L,
+ 1331668247387136191L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247415047817L,
+ 1331668247415047817L,
+ 1331668247415047817L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247400095883L,
+ 1331668247400085049L,
+ 1331668247399991225L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247401441000L,
+ 1331668247401428073L,
+ 1331668247400779449L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247410754305L,
+ 1331668247314038062L,
+ 1331668247519727372L,
+ 1331668247314038062L,
+ 1331668247412887695L,
+ 1331668247314038062L,
+ 1331668247413704524L,
+ 1331668247412877246L,
+ 1331668247410583861L,
+ 1331668247314038062L,
+ 1331668247410735104L,
+ 1331668247410594291L,
+ 1331668247314038062L,
+ 1331668247413682702L,
+ 1331668247410844189L,
+ 1331668247314038062L,
+ 1331668247519712481L,
+ 1331668247411099759L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247924029486L,
+ 1331668247924012402L,
+ 1331668247412302666L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247924105876L,
+ 1331668247924098044L,
+ 1331668247417574343L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248014184526L,
+ 1331668248014130616L,
+ 1331668247417635948L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247928627023L,
+ 1331668247928621067L,
+ 1331668247417978805L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247928556625L,
+ 1331668247928529840L,
+ 1331668247418470511L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247930341625L,
+ 1331668247314038062L,
+ 1331668248014184526L,
+ 1331668248013793850L,
+ 1331668247419578477L,
+ 1331668247314038062L,
+ 1331668247930328175L,
+ 1331668247419655652L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248013753736L,
+ 1331668248013749389L,
+ 1331668247420382626L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247930579872L,
+ 1331668247930574368L,
+ 1331668247420451876L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247926378321L,
+ 1331668247926367737L,
+ 1331668247423543945L,
+ 1331668247314038062L,
+ 1331668247619316825L,
+ 1331668247619491008L,
+ 1331668247314038062L,
+ 1331668247619505885L,
+ 1331668247619495072L,
+ 1331668247434248026L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247434551326L,
+ 1331668247434546203L,
+ 1331668247434365352L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247908325947L,
+ 1331668247908319810L,
+ 1331668247467380509L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247908677700L,
+ 1331668247908640244L,
+ 1331668247467447781L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247869556425L,
+ 1331668247869544380L,
+ 1331668247503177108L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247504321893L,
+ 1331668247504319470L,
+ 1331668247503423094L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668248014183954L,
+ 1331668248014183954L,
+ 1331668247512172527L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247539381562L,
+ 1331668247539369787L,
+ 1331668247539325848L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247735177820L,
+ 1331668247735170303L,
+ 1331668247735128110L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247735168206L,
+ 1331668247735161964L,
+ 1331668247735152717L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247775218227L,
+ 1331668247314038062L,
+ 1331668247775231079L,
+ 1331668247775205377L,
+ 1331668247775191569L,
+ 1331668247314038062L,
+ 1331668247775223776L,
+ 1331668247775218227L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247869483379L,
+ 1331668247869477795L,
+ 1331668247869457807L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247941667986L,
+ 1331668247941650415L,
+ 1331668247941620894L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ 1331668247314038062L,
+ };
+
+ static final long[] endTimes = {
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014620024L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054130388L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014185078L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014620024L,
+ 1331668248014620024L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014548923L,
+ 1331668248014188534L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248015040151L,
+ 1331668259054285979L,
+ 1331668248482983146L,
+ 1331668248015041609L,
+ 1331668248015176320L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248483009726L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248015959980L,
+ 1331668259054285979L,
+ 1331668248016172023L,
+ 1331668248016194935L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054136697L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248016556933L,
+ 1331668248016592456L,
+ 1331668252511012367L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248016623209L,
+ 1331668248016645047L,
+ 1331668252843104826L,
+ 1331668259054285979L,
+ 1331668248486545657L,
+ 1331668259054285979L,
+ 1331668248502954816L,
+ 1331668248503000162L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248020364249L,
+ 1331668248020419523L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248020866943L,
+ 1331668248020888352L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248531200073L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668257323835062L,
+ 1331668257323879563L,
+ 1331668248021867385L,
+ 1331668259054285979L,
+ 1331668248175307354L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259051873438L,
+ 1331668259051879701L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248751061201L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259051838247L,
+ 1331668259051846351L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668257325265220L,
+ 1331668257325277639L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668250005943125L,
+ 1331668259054285979L,
+ 1331668248014565260L,
+ 1331668259054285979L,
+ 1331668250006219013L,
+ 1331668259054285979L,
+ 1331668250004649129L,
+ 1331668250006228246L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668250005962644L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668250004668081L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014624125L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248414826115L,
+ 1331668248414875444L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248420327828L,
+ 1331668248420342919L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248015353903L,
+ 1331668248015428919L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248420617453L,
+ 1331668248420709272L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248421112139L,
+ 1331668248421137268L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248421291701L,
+ 1331668259054285979L,
+ 1331668248014188534L,
+ 1331668248014188534L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248421940554L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014548923L,
+ 1331668248014550770L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248422509298L,
+ 1331668248422523601L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248424325503L,
+ 1331668248424394073L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248140683324L,
+ 1331668248140686546L,
+ 1331668259054285979L,
+ 1331668248140727269L,
+ 1331668248140780012L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251031789570L,
+ 1331668251031812282L,
+ 1331668252047037657L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248269586770L,
+ 1331668248269613258L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248141167328L,
+ 1331668248141400164L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248141004006L,
+ 1331668248141028631L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248141324868L,
+ 1331668248141345677L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248014185078L,
+ 1331668248014185078L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248539549580L,
+ 1331668248539579511L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668255234884605L,
+ 1331668255234905622L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668255234936617L,
+ 1331668255234941684L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252778982101L,
+ 1331668259054285979L,
+ 1331668252779007563L,
+ 1331668252781320133L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252781341690L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248869653287L,
+ 1331668248869679933L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248941858743L,
+ 1331668248941885421L,
+ 1331668252782929207L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248207116451L,
+ 1331668248207177650L,
+ 1331668248207163589L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248207165629L,
+ 1331668248207212201L,
+ 1331668248207197204L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248763171129L,
+ 1331668259054285979L,
+ 1331668248763179780L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668248895005379L,
+ 1331668248895062414L,
+ 1331668248895035146L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668249000328909L,
+ 1331668249000373092L,
+ 1331668249000350716L,
+ 1331668259054285979L,
+ 1331668249548101920L,
+ 1331668259054285979L,
+ 1331668249947171998L,
+ 1331668249947269897L,
+ 1331668249947249018L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668249951033184L,
+ 1331668249951077605L,
+ 1331668249951058138L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668249959079406L,
+ 1331668259054285979L,
+ 1331668249959100633L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668249970937981L,
+ 1331668259054285979L,
+ 1331668249970963407L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668250007423753L,
+ 1331668250007449251L,
+ 1331668250007428034L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668250231124169L,
+ 1331668250231169946L,
+ 1331668250231148973L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668250326525622L,
+ 1331668250329519305L,
+ 1331668250329507458L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251063191270L,
+ 1331668251063256143L,
+ 1331668251063222335L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251065026369L,
+ 1331668251065048462L,
+ 1331668251065030498L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251065058051L,
+ 1331668251065091761L,
+ 1331668251065069765L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251065364590L,
+ 1331668251065412381L,
+ 1331668251065407607L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251065462500L,
+ 1331668251065477027L,
+ 1331668251065465604L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251065780572L,
+ 1331668251065836719L,
+ 1331668251065829440L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251065899750L,
+ 1331668251065913891L,
+ 1331668251065902892L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251066057402L,
+ 1331668251066070617L,
+ 1331668251066060363L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251066495616L,
+ 1331668251066520321L,
+ 1331668251066506338L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251066532840L,
+ 1331668251066546436L,
+ 1331668251066535866L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251066658006L,
+ 1331668251066671812L,
+ 1331668251066660635L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251066883302L,
+ 1331668251066906446L,
+ 1331668251066887423L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251067153808L,
+ 1331668251067176405L,
+ 1331668251067157534L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251067407214L,
+ 1331668251067420770L,
+ 1331668251067410220L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251067763731L,
+ 1331668251067818612L,
+ 1331668251067811009L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251067884367L,
+ 1331668251067897382L,
+ 1331668251067887136L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251068275691L,
+ 1331668251068288692L,
+ 1331668251068278423L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251068706355L,
+ 1331668251068719015L,
+ 1331668251068709290L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251069067645L,
+ 1331668251069122518L,
+ 1331668251069116275L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251069178617L,
+ 1331668251069191305L,
+ 1331668251069181300L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251069664884L,
+ 1331668251069684555L,
+ 1331668251069668097L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251069682852L,
+ 1331668251069708201L,
+ 1331668251069690226L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251715054925L,
+ 1331668259054285979L,
+ 1331668251715066022L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251803784493L,
+ 1331668251803827591L,
+ 1331668251803808547L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251983438636L,
+ 1331668251983448709L,
+ 1331668251983441583L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668251992993580L,
+ 1331668251993008591L,
+ 1331668251992998928L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252022091542L,
+ 1331668252022091542L,
+ 1331668252022091542L,
+ 1331668252022091542L,
+ 1331668259054285979L,
+ 1331668252031771660L,
+ 1331668252031777595L,
+ 1331668252031773847L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252032463013L,
+ 1331668252032502964L,
+ 1331668252032497700L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252032506884L,
+ 1331668252032559227L,
+ 1331668252032539402L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252039535067L,
+ 1331668259054285979L,
+ 1331668252039537404L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252044008981L,
+ 1331668252044014257L,
+ 1331668252044010861L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252044059151L,
+ 1331668252044064004L,
+ 1331668252044060420L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252179391423L,
+ 1331668252184781913L,
+ 1331668252184772369L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252193425490L,
+ 1331668252193432385L,
+ 1331668252193427706L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252253575716L,
+ 1331668252253592491L,
+ 1331668252253581852L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252472449352L,
+ 1331668252472474547L,
+ 1331668252472458163L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252487295286L,
+ 1331668252487300925L,
+ 1331668252487297683L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252495759849L,
+ 1331668252495766026L,
+ 1331668252495762178L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252496219924L,
+ 1331668252496245837L,
+ 1331668252496228816L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252523291829L,
+ 1331668252523482082L,
+ 1331668252523469395L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252764810964L,
+ 1331668252764829827L,
+ 1331668252764814570L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252765021775L,
+ 1331668252765026623L,
+ 1331668252765023841L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252769399706L,
+ 1331668259054285979L,
+ 1331668252769401404L,
+ 1331668259054285979L,
+ 1331668252769446847L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252769456141L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252784988923L,
+ 1331668259054285979L,
+ 1331668252785262589L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252795062126L,
+ 1331668259054285979L,
+ 1331668252795122600L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252828832090L,
+ 1331668259054285979L,
+ 1331668252828859292L,
+ 1331668252828904216L,
+ 1331668252828866041L,
+ 1331668259054285979L,
+ 1331668252829060434L,
+ 1331668252828992804L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252829505108L,
+ 1331668259054285979L,
+ 1331668252829527974L,
+ 1331668252829719292L,
+ 1331668252829638887L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252829643060L,
+ 1331668259054285979L,
+ 1331668252829660274L,
+ 1331668259054285979L,
+ 1331668252829683896L,
+ 1331668259054285979L,
+ 1331668252829799248L,
+ 1331668259054285979L,
+ 1331668252829802278L,
+ 1331668259054285979L,
+ 1331668252829821642L,
+ 1331668259054285979L,
+ 1331668252829840961L,
+ 1331668259054285979L,
+ 1331668252829859256L,
+ 1331668259054285979L,
+ 1331668252829976501L,
+ 1331668252830107659L,
+ 1331668252830085595L,
+ 1331668259054285979L,
+ 1331668252830154848L,
+ 1331668252830139534L,
+ 1331668259054285979L,
+ 1331668252830212497L,
+ 1331668252830194969L,
+ 1331668259054285979L,
+ 1331668252830382459L,
+ 1331668252830368625L,
+ 1331668259054285979L,
+ 1331668252830526491L,
+ 1331668252830499169L,
+ 1331668259054285979L,
+ 1331668252830576634L,
+ 1331668252830564658L,
+ 1331668259054285979L,
+ 1331668252831112505L,
+ 1331668252831083126L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252831228714L,
+ 1331668252831318123L,
+ 1331668252831301843L,
+ 1331668259054285979L,
+ 1331668252831543926L,
+ 1331668252831527998L,
+ 1331668259054285979L,
+ 1331668252831834393L,
+ 1331668252831817197L,
+ 1331668259054285979L,
+ 1331668252832056760L,
+ 1331668252832046333L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252883172744L,
+ 1331668252883172744L,
+ 1331668252883172744L,
+ 1331668252883172744L,
+ 1331668259054285979L,
+ 1331668252885827603L,
+ 1331668252885827603L,
+ 1331668252885827603L,
+ 1331668252885827603L,
+ 1331668259054285979L,
+ 1331668252889337098L,
+ 1331668259054285979L,
+ 1331668252889396688L,
+ 1331668252889396688L,
+ 1331668252889396688L,
+ 1331668252889396688L,
+ 1331668252901232798L,
+ 1331668252901118256L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252901540914L,
+ 1331668252901540914L,
+ 1331668252901540914L,
+ 1331668252901540914L,
+ 1331668259054285979L,
+ 1331668252901573889L,
+ 1331668252901586635L,
+ 1331668252901577276L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252906764880L,
+ 1331668252906764880L,
+ 1331668252906764880L,
+ 1331668252906764880L,
+ 1331668259054285979L,
+ 1331668252912042743L,
+ 1331668259054285979L,
+ 1331668252912048618L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668252927449371L,
+ 1331668252927449371L,
+ 1331668252927449371L,
+ 1331668252927449371L,
+ 1331668259054285979L,
+ 1331668252947156908L,
+ 1331668252947156908L,
+ 1331668252947156908L,
+ 1331668252947156908L,
+ 1331668259054285979L,
+ 1331668252947197386L,
+ 1331668252947197386L,
+ 1331668252947197386L,
+ 1331668252947197386L,
+ 1331668259054285979L,
+ 1331668253035499713L,
+ 1331668253035499713L,
+ 1331668253035499713L,
+ 1331668253035499713L,
+ 1331668259054285979L,
+ 1331668253036766769L,
+ 1331668253036766769L,
+ 1331668253036766769L,
+ 1331668253036766769L,
+ 1331668259054285979L,
+ 1331668253037890651L,
+ 1331668253037890651L,
+ 1331668253037890651L,
+ 1331668253037890651L,
+ 1331668259054285979L,
+ 1331668253051945128L,
+ 1331668253051945128L,
+ 1331668253051945128L,
+ 1331668253051945128L,
+ 1331668259054285979L,
+ 1331668253054627961L,
+ 1331668253054627961L,
+ 1331668253054627961L,
+ 1331668253054627961L,
+ 1331668259054285979L,
+ 1331668253057609433L,
+ 1331668253057609433L,
+ 1331668253057609433L,
+ 1331668253057609433L,
+ 1331668259054285979L,
+ 1331668253062222314L,
+ 1331668253062222314L,
+ 1331668253062222314L,
+ 1331668253062222314L,
+ 1331668259054285979L,
+ 1331668253097239708L,
+ 1331668253097239708L,
+ 1331668253097239708L,
+ 1331668253097239708L,
+ 1331668259054285979L,
+ 1331668253097518746L,
+ 1331668253097518746L,
+ 1331668253097518746L,
+ 1331668253097518746L,
+ 1331668259054285979L,
+ 1331668253267104284L,
+ 1331668253267117055L,
+ 1331668253267107624L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668253267342015L,
+ 1331668253267378405L,
+ 1331668253267367303L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668253278218713L,
+ 1331668253278218713L,
+ 1331668253278218713L,
+ 1331668253278218713L,
+ 1331668259054285979L,
+ 1331668253324119756L,
+ 1331668253324119756L,
+ 1331668253324119756L,
+ 1331668253324119756L,
+ 1331668259054285979L,
+ 1331668253614347227L,
+ 1331668253614347227L,
+ 1331668253614347227L,
+ 1331668253614347227L,
+ 1331668259054285979L,
+ 1331668253619459320L,
+ 1331668253619459320L,
+ 1331668253619459320L,
+ 1331668253619459320L,
+ 1331668259054285979L,
+ 1331668253619867625L,
+ 1331668253619867625L,
+ 1331668253619867625L,
+ 1331668253619867625L,
+ 1331668259054285979L,
+ 1331668253621486721L,
+ 1331668253621508851L,
+ 1331668253621491536L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668253622429608L,
+ 1331668253622429608L,
+ 1331668253622429608L,
+ 1331668253622429608L,
+ 1331668259054285979L,
+ 1331668253857465365L,
+ 1331668253857465365L,
+ 1331668253857465365L,
+ 1331668253857465365L,
+ 1331668259054285979L,
+ 1331668253858125091L,
+ 1331668253858125091L,
+ 1331668253858125091L,
+ 1331668253858125091L,
+ 1331668259054285979L,
+ 1331668253910194540L,
+ 1331668253910194540L,
+ 1331668253910194540L,
+ 1331668253910194540L,
+ 1331668259054285979L,
+ 1331668253910329721L,
+ 1331668253910329721L,
+ 1331668253910329721L,
+ 1331668253910329721L,
+ 1331668259054285979L,
+ 1331668253984922308L,
+ 1331668253984922308L,
+ 1331668253984922308L,
+ 1331668253984922308L,
+ 1331668259054285979L,
+ 1331668254004098152L,
+ 1331668254004098152L,
+ 1331668254004098152L,
+ 1331668254004098152L,
+ 1331668259054285979L,
+ 1331668254047839900L,
+ 1331668254047839900L,
+ 1331668254047839900L,
+ 1331668254047839900L,
+ 1331668259054285979L,
+ 1331668254093066195L,
+ 1331668254093066195L,
+ 1331668254093066195L,
+ 1331668254093066195L,
+ 1331668259054285979L,
+ 1331668254106326339L,
+ 1331668254106326339L,
+ 1331668254106326339L,
+ 1331668254106326339L,
+ 1331668259054285979L,
+ 1331668255052411647L,
+ 1331668255052411647L,
+ 1331668255052411647L,
+ 1331668255052411647L,
+ 1331668259054285979L,
+ 1331668255157088064L,
+ 1331668255157101973L,
+ 1331668255157091812L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668256244508635L,
+ 1331668256244508635L,
+ 1331668256244508635L,
+ 1331668256244508635L,
+ 1331668259054285979L,
+ 1331668257246987050L,
+ 1331668257247036372L,
+ 1331668257247027684L,
+ 1331668259054285979L,
+ 1331668259054285979L,
+ 1331668259045096840L,
+ 1331668259045096840L,
+ 1331668259045096840L,
+ 1331668259045096840L,
+ 1331668259054285979L,
+ 1331668259052126585L,
+ 1331668259052126585L,
+ 1331668259052126585L,
+ 1331668259052126585L,
+ 1331668259054285979L,
+ 1331668259053345550L,
+ 1331668259054285979L,
+ 1331668259053349544L,
+ 1331668259054285979L,
+ };
+
+ static final ITmfStateValue[] values = {
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1397),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("lttng-consumerd"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(5),
+ TmfStateValue.newValueString("swapper/1"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1432),
+ TmfStateValue.newValueInt(2),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("lttng-consumerd"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_ppoll"),
+ TmfStateValue.newValueString("alsa-sink"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_epoll_wait"),
+ TmfStateValue.newValueString("lttng-sessiond"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("firefox"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("firefox"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gnome-terminal"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_select"),
+ TmfStateValue.newValueString("Xorg"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("metacity"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("kworker/0:1"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("ksoftirqd/0"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_read"),
+ TmfStateValue.newValueString("rsyslogd"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("rs:main Q:Reg"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("kworker/1:1"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_select"),
+ TmfStateValue.newValueString("rsyslogd"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_read"),
+ TmfStateValue.newValueString("bash"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("bamfdaemon"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gnome-settings-"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("unity-2d-shell"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("unity-2d-panel"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("indicator-multi"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gdbus"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("dbus-daemon"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gdbus"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("indicator-appli"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(3),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gdbus"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gdbus"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(5),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("unity-panel-ser"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("hud-service"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("gdbus"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("openvpn"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("firefox"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(2),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("gdbus"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_nanosleep"),
+ TmfStateValue.newValueString("gvfs-afc-volume"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("rtkit-daemon"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("rtkit-daemon"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueString("sys_poll"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("thunderbird-bin"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.newValueInt(1),
+ TmfStateValue.newValueString("sys_futex"),
+ TmfStateValue.newValueString("firefox"),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ TmfStateValue.nullValue(),
+ };
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.kernel.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.kernel.core;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.ctf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core,
+ org.eclipse.tracecompass.lttng2.control.core
+Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.core;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui,org.eclipse.tracecompass.lttng2.kernel.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui,org.eclipse.tracecompass.lttng2.kernel.core.tests",
+ org.eclipse.linuxtools.lttng2.kernel.core.analysis,
+ org.eclipse.linuxtools.lttng2.kernel.core.cpuusage,
+ org.eclipse.linuxtools.lttng2.kernel.core.event.matching,
+ org.eclipse.linuxtools.lttng2.kernel.core.trace
+Import-Package: com.google.common.collect
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Kernel Analysis Core Plug-in
+
+tracetype.type.kernel = LTTng Kernel Trace
+analysis.lttngkernel = LTTng Kernel Analysis
+
+cpuusage.lttng.kernel = CPU usage
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.linuxtools.tmf.core.tracetype">
+ <type
+ category="org.eclipse.linuxtools.tmf.ctf.core.category.ctf"
+ event_type="org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent"
+ id="org.eclipse.linuxtools.lttng2.kernel.tracetype"
+ isDirectory="true"
+ name="%tracetype.type.kernel"
+ trace_type="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
+ </type>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.tmf.core.analysis">
+ <module
+ analysis_module="org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule"
+ automatic="true"
+ id="org.eclipse.linuxtools.lttng2.kernel.analysis"
+ name="%analysis.lttngkernel">
+ <tracetype
+ class="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
+ </tracetype>
+ </module>
+ <module
+ analysis_module="org.eclipse.linuxtools.lttng2.kernel.core.cpuusage.LttngKernelCpuUsageAnalysis"
+ id="org.eclipse.linuxtools.lttng2.kernel.core.cpuusage"
+ name="%cpuusage.lttng.kernel">
+ <tracetype
+ applies="true"
+ class="org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace">
+ </tracetype>
+ </module>
+ </extension>
+</plugin>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.kernel.core</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Trace Compass LTTng Kernel Analysis Core Plug-in</name>
+
+ <build>
+ <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching;
+import org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>Activator</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.core"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operators
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ TmfEventMatching.registerMatchObject(new TcpEventMatching());
+ TmfEventMatching.registerMatchObject(new TcpLttngEventMatching());
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Logs a message with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logInfo(String message) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logInfo(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logWarning(String message) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logWarning(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logError(String message) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logError(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.core;
+
+/**
+ * This file defines all the attribute names used in the handler. Both the
+ * construction and query steps should use them.
+ *
+ * These should not be externalized! The values here are used as-is in the
+ * history file on disk, so they should be kept the same to keep the file format
+ * compatible. If a view shows attribute names directly, the localization should
+ * be done on the viewer side.
+ *
+ * @author alexmont
+ *
+ */
+@SuppressWarnings({"nls", "javadoc"})
+public interface Attributes {
+
+ /* First-level attributes */
+ static final String CPUS = "CPUs";
+ static final String THREADS = "Threads";
+ static final String RESOURCES = "Resources";
+
+ /* Sub-attributes of the CPU nodes */
+ static final String CURRENT_THREAD = "Current_thread";
+ static final String STATUS = "Status";
+
+ /* Sub-attributes of the Thread nodes */
+ static final String PPID = "PPID";
+ //static final String STATUS = "Status"
+ static final String EXEC_NAME = "Exec_name";
+ static final String SYSTEM_CALL = "System_call";
+
+ /* Attributes under "Resources" */
+ static final String IRQS = "IRQs";
+ static final String SOFT_IRQS = "Soft_IRQs";
+
+ /* Misc stuff */
+ static final String UNKNOWN = "Unknown";
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.core;
+
+/**
+ * This file defines all the known event and field names for LTTng 2.0 kernel
+ * traces.
+ *
+ * Once again, these should not be externalized, since they need to match
+ * exactly what the tracer outputs. If you want to localize them in a view, you
+ * should do a mapping in the viewer itself.
+ *
+ * @author alexmont
+ */
+@SuppressWarnings({"javadoc", "nls"})
+public interface LttngStrings {
+
+ /* Event names */
+ static final String EXIT_SYSCALL = "exit_syscall";
+ static final String IRQ_HANDLER_ENTRY = "irq_handler_entry";
+ static final String IRQ_HANDLER_EXIT = "irq_handler_exit";
+ static final String SOFTIRQ_ENTRY = "softirq_entry";
+ static final String SOFTIRQ_EXIT = "softirq_exit";
+ static final String SOFTIRQ_RAISE = "softirq_raise";
+ static final String SCHED_SWITCH = "sched_switch";
+ static final String SCHED_WAKEUP = "sched_wakeup";
+ static final String SCHED_WAKEUP_NEW = "sched_wakeup_new";
+ static final String SCHED_PROCESS_FORK = "sched_process_fork";
+ static final String SCHED_PROCESS_EXIT = "sched_process_exit";
+ static final String SCHED_PROCESS_FREE = "sched_process_free";
+ static final String STATEDUMP_PROCESS_STATE = "lttng_statedump_process_state";
+
+ /* System call names */
+ static final String SYSCALL_PREFIX = "sys_";
+ static final String COMPAT_SYSCALL_PREFIX = "compat_sys_";
+ static final String SYS_CLONE = "sys_clone";
+
+ /* Field names */
+ static final String IRQ = "irq";
+ static final String COMM = "comm";
+ static final String NAME = "name";
+ static final String PID = "pid";
+ static final String TID = "tid";
+ static final String PPID = "ppid";
+ static final String STATUS = "status";
+ static final String VEC = "vec";
+ static final String PREV_COMM = "prev_comm";
+ static final String PREV_TID = "prev_tid";
+ static final String PREV_STATE = "prev_state";
+ static final String NEXT_COMM = "next_comm";
+ static final String NEXT_TID = "next_tid";
+ static final String PARENT_TID = "parent_tid";
+ static final String CHILD_COMM = "child_comm";
+ static final String CHILD_TID = "child_tid";
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.core;
+
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
+
+/**
+ * State values that are used in the kernel event handler. It's much better to
+ * use integer values whenever possible, since those take much less space in the
+ * history file.
+ *
+ * @author alexmont
+ *
+ */
+@SuppressWarnings("javadoc")
+public interface StateValues {
+
+ /* CPU Status */
+ static final int CPU_STATUS_IDLE = 0;
+ static final int CPU_STATUS_RUN_USERMODE = 1;
+ static final int CPU_STATUS_RUN_SYSCALL = 2;
+ static final int CPU_STATUS_IRQ = 3;
+ static final int CPU_STATUS_SOFTIRQ = 4;
+
+ static final ITmfStateValue CPU_STATUS_IDLE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IDLE);
+ static final ITmfStateValue CPU_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_USERMODE);
+ static final ITmfStateValue CPU_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(CPU_STATUS_RUN_SYSCALL);
+ static final ITmfStateValue CPU_STATUS_IRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_IRQ);
+ static final ITmfStateValue CPU_STATUS_SOFTIRQ_VALUE = TmfStateValue.newValueInt(CPU_STATUS_SOFTIRQ);
+
+ /* Process status */
+ static final int PROCESS_STATUS_UNKNOWN = 0;
+ static final int PROCESS_STATUS_WAIT_BLOCKED = 1;
+ static final int PROCESS_STATUS_RUN_USERMODE = 2;
+ static final int PROCESS_STATUS_RUN_SYSCALL = 3;
+ static final int PROCESS_STATUS_INTERRUPTED = 4;
+ static final int PROCESS_STATUS_WAIT_FOR_CPU = 5;
+
+ static final ITmfStateValue PROCESS_STATUS_UNKNOWN_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_UNKNOWN);
+ static final ITmfStateValue PROCESS_STATUS_WAIT_BLOCKED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_BLOCKED);
+ static final ITmfStateValue PROCESS_STATUS_RUN_USERMODE_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_USERMODE);
+ static final ITmfStateValue PROCESS_STATUS_RUN_SYSCALL_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_RUN_SYSCALL);
+ static final ITmfStateValue PROCESS_STATUS_INTERRUPTED_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_INTERRUPTED);
+ static final ITmfStateValue PROCESS_STATUS_WAIT_FOR_CPU_VALUE = TmfStateValue.newValueInt(PROCESS_STATUS_WAIT_FOR_CPU);
+
+ /* SoftIRQ-specific stuff. -1: null/disabled, >= 0: running on that CPU */
+ static final int SOFT_IRQ_RAISED = -2;
+
+ static final ITmfStateValue SOFT_IRQ_RAISED_VALUE = TmfStateValue.newValueInt(SOFT_IRQ_RAISED);
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.core;
+
+/**
+ * This file defines all the known event and field names used to trace socket
+ * connection for both the addons module method (
+ * {@link org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpEventMatching}
+ * ) and the net_data_experimental branch (
+ * {@link org.eclipse.linuxtools.lttng2.kernel.core.event.matching.TcpLttngEventMatching}
+ * ).
+ *
+ * These events should be eventually mainlined and when this happens, this class
+ * won't be necessary anymore and they should be moved to {@link LttngStrings}
+ * class
+ *
+ *
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings({ "javadoc", "nls" })
+public interface TcpEventStrings {
+
+ /* Event names */
+ public static final String INET_CONNECT = "inet_connect";
+ public static final String INET_SOCK_CREATE = "inet_sock_create";
+ public static final String INET_SOCK_LOCAL_OUT = "inet_sock_local_out";
+ public static final String INET_SOCK_LOCAL_IN = "inet_sock_local_in";
+ public static final String INET_SOCK_CLONE = "inet_sock_clone";
+ public static final String INET_ACCEPT = "inet_accept";
+ public static final String INET_SOCK_DELETE = "inet_sock_delete";
+ public static final String NETIF_RECEIVE_SKB = "netif_receive_skb";
+ public static final String NET_DEV_QUEUE = "net_dev_queue";
+
+ /* Field names */
+ public static final String SEQ = "seq";
+ public static final String SK = "sk";
+ public static final String OSK = "osk";
+ public static final String NSK = "nsk";
+ public static final String SPORT = "sport";
+ public static final String DPORT = "dport";
+ public static final String SADDR = "saddr";
+ public static final String DADDR = "daddr";
+ public static final String ACKSEQ = "ack_seq";
+ public static final String CHECK = "check";
+ public static final String WINDOW = "window";
+ public static final String FLAGS = "flags";
+ public static final String TRANSPORT_FIELDS = "transport_fields";
+ public static final String TYPE_TCP = "thtype_tcp";
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson
+ * Copyright (c) 2010, 2011 École Polytechnique de Montréal
+ * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
+ *
+ * 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
+ *
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystemBuilder;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+
+/**
+ * This is the state change input plugin for TMF's state system which handles
+ * the LTTng 2.0 kernel traces in CTF format.
+ *
+ * It uses the reference handler defined in CTFKernelHandler.java.
+ *
+ * @author alexmont
+ *
+ */
+public class LttngKernelStateProvider extends AbstractTmfStateProvider {
+
+ /**
+ * Version number of this state provider. Please bump this if you modify the
+ * contents of the generated state history in some way.
+ */
+ private static final int VERSION = 4;
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+
+ /**
+ * Instantiate a new state provider plugin.
+ *
+ * @param trace
+ * The LTTng 2.0 kernel trace directory
+ */
+ public LttngKernelStateProvider(ITmfTrace trace) {
+ super(trace, ITmfEvent.class, "LTTng Kernel"); //$NON-NLS-1$
+ }
+
+ // ------------------------------------------------------------------------
+ // IStateChangeInput
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int getVersion() {
+ return VERSION;
+ }
+
+ @Override
+ public void assignTargetStateSystem(ITmfStateSystemBuilder ssb) {
+ /* We can only set up the locations once the state system is assigned */
+ super.assignTargetStateSystem(ssb);
+ }
+
+ @Override
+ public LttngKernelStateProvider getNewInstance() {
+ return new LttngKernelStateProvider(this.getTrace());
+ }
+
+ @Override
+ protected void eventHandle(ITmfEvent event) {
+ /*
+ * AbstractStateChangeInput should have already checked for the correct
+ * class type
+ */
+
+ final String eventName = event.getType().getName();
+ final long ts = event.getTimestamp().getValue();
+
+ try {
+ /* Shortcut for the "current CPU" attribute node */
+ final Integer currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(), event.getSource());
+
+ /*
+ * Shortcut for the "current thread" attribute node. It requires
+ * querying the current CPU's current thread.
+ */
+ int quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
+ ITmfStateValue value = ss.queryOngoingState(quark);
+ int thread = value.isNull() ? -1 : value.unboxInt();
+ final Integer currentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(thread));
+
+ /*
+ * Feed event to the history system if it's known to cause a state
+ * transition.
+ */
+ switch (eventName) {
+
+ case LttngStrings.EXIT_SYSCALL:
+ /* Fields: int64 ret */
+ {
+ /* Clear the current system call on the process */
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
+ value = TmfStateValue.nullValue();
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Put the process' status back to user mode */
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+ value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Put the CPU's status back to user mode */
+ quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+ value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
+ break;
+
+ case LttngStrings.IRQ_HANDLER_ENTRY:
+ /* Fields: int32 irq, string name */
+ {
+ Integer irqId = ((Long) event.getContent().getField(LttngStrings.IRQ).getValue()).intValue();
+
+ /* Mark this IRQ as active in the resource tree.
+ * The state value = the CPU on which this IRQ is sitting */
+ quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(), irqId.toString());
+ value = TmfStateValue.newValueInt(Integer.parseInt(event.getSource()));
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Change the status of the running process to interrupted */
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+ value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Change the status of the CPU to interrupted */
+ quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+ value = StateValues.CPU_STATUS_IRQ_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
+ break;
+
+ case LttngStrings.IRQ_HANDLER_EXIT:
+ /* Fields: int32 irq, int32 ret */
+ {
+ Integer irqId = ((Long) event.getContent().getField(LttngStrings.IRQ).getValue()).intValue();
+
+ /* Put this IRQ back to inactive in the resource tree */
+ quark = ss.getQuarkRelativeAndAdd(getNodeIRQs(), irqId.toString());
+ value = TmfStateValue.nullValue();
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the previous process back to running */
+ setProcessToRunning(ts, currentThreadNode);
+
+ /* Set the CPU status back to running or "idle" */
+ cpuExitInterrupt(ts, currentCPUNode, currentThreadNode);
+ }
+ break;
+
+ case LttngStrings.SOFTIRQ_ENTRY:
+ /* Fields: int32 vec */
+ {
+ Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
+
+ /* Mark this SoftIRQ as active in the resource tree.
+ * The state value = the CPU on which this SoftIRQ is processed */
+ quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
+ value = TmfStateValue.newValueInt(Integer.parseInt(event.getSource()));
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Change the status of the running process to interrupted */
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+ value = StateValues.PROCESS_STATUS_INTERRUPTED_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Change the status of the CPU to interrupted */
+ quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+ value = StateValues.CPU_STATUS_SOFTIRQ_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
+ break;
+
+ case LttngStrings.SOFTIRQ_EXIT:
+ /* Fields: int32 vec */
+ {
+ Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
+
+ /* Put this SoftIRQ back to inactive (= -1) in the resource tree */
+ quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
+ value = TmfStateValue.nullValue();
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the previous process back to running */
+ setProcessToRunning(ts, currentThreadNode);
+
+ /* Set the CPU status back to "busy" or "idle" */
+ cpuExitInterrupt(ts, currentCPUNode, currentThreadNode);
+ }
+ break;
+
+ case LttngStrings.SOFTIRQ_RAISE:
+ /* Fields: int32 vec */
+ {
+ Integer softIrqId = ((Long) event.getContent().getField(LttngStrings.VEC).getValue()).intValue();
+
+ /* Mark this SoftIRQ as *raised* in the resource tree.
+ * State value = -2 */
+ quark = ss.getQuarkRelativeAndAdd(getNodeSoftIRQs(), softIrqId.toString());
+ value = StateValues.SOFT_IRQ_RAISED_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
+ break;
+
+ case LttngStrings.SCHED_SWITCH:
+ /*
+ * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64 prev_state,
+ * string next_comm, int32 next_tid, int32 next_prio
+ */
+ {
+ ITmfEventField content = event.getContent();
+ Integer prevTid = ((Long) content.getField(LttngStrings.PREV_TID).getValue()).intValue();
+ Long prevState = (Long) content.getField(LttngStrings.PREV_STATE).getValue();
+ String nextProcessName = (String) content.getField(LttngStrings.NEXT_COMM).getValue();
+ Integer nextTid = ((Long) content.getField(LttngStrings.NEXT_TID).getValue()).intValue();
+
+ Integer formerThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), prevTid.toString());
+ Integer newCurrentThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), nextTid.toString());
+
+ /* Set the status of the process that got scheduled out. */
+ quark = ss.getQuarkRelativeAndAdd(formerThreadNode, Attributes.STATUS);
+ if (prevState != 0) {
+ value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
+ } else {
+ value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ }
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the status of the new scheduled process */
+ setProcessToRunning(ts, newCurrentThreadNode);
+
+ /* Set the exec name of the new process */
+ quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.EXEC_NAME);
+ value = TmfStateValue.newValueString(nextProcessName);
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Make sure the PPID and system_call sub-attributes exist */
+ ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
+ ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.PPID);
+
+ /* Set the current scheduled process on the relevant CPU */
+ quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.CURRENT_THREAD);
+ value = TmfStateValue.newValueInt(nextTid);
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the status of the CPU itself */
+ if (nextTid > 0) {
+ /* Check if the entering process is in kernel or user mode */
+ quark = ss.getQuarkRelativeAndAdd(newCurrentThreadNode, Attributes.SYSTEM_CALL);
+ if (ss.queryOngoingState(quark).isNull()) {
+ value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+ } else {
+ value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+ }
+ } else {
+ value = StateValues.CPU_STATUS_IDLE_VALUE;
+ }
+ quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+ ss.modifyAttribute(ts, value, quark);
+ }
+ break;
+
+ case LttngStrings.SCHED_PROCESS_FORK:
+ /* Fields: string parent_comm, int32 parent_tid,
+ * string child_comm, int32 child_tid */
+ {
+ ITmfEventField content = event.getContent();
+ // String parentProcessName = (String) event.getFieldValue("parent_comm");
+ String childProcessName = (String) content.getField(LttngStrings.CHILD_COMM).getValue();
+ // assert ( parentProcessName.equals(childProcessName) );
+
+ Integer parentTid = ((Long) content.getField(LttngStrings.PARENT_TID).getValue()).intValue();
+ Integer childTid = ((Long) content.getField(LttngStrings.CHILD_TID).getValue()).intValue();
+
+ Integer parentTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), parentTid.toString());
+ Integer childTidNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), childTid.toString());
+
+ /* Assign the PPID to the new process */
+ quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.PPID);
+ value = TmfStateValue.newValueInt(parentTid);
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the new process' exec_name */
+ quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.EXEC_NAME);
+ value = TmfStateValue.newValueString(childProcessName);
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the new process' status */
+ quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.STATUS);
+ value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Set the process' syscall name, to be the same as the parent's */
+ quark = ss.getQuarkRelativeAndAdd(parentTidNode, Attributes.SYSTEM_CALL);
+ value = ss.queryOngoingState(quark);
+ if (value.isNull()) {
+ /*
+ * Maybe we were missing info about the parent? At least we
+ * will set the child right. Let's suppose "sys_clone".
+ */
+ value = TmfStateValue.newValueString(LttngStrings.SYS_CLONE);
+ }
+ quark = ss.getQuarkRelativeAndAdd(childTidNode, Attributes.SYSTEM_CALL);
+ ss.modifyAttribute(ts, value, quark);
+ }
+ break;
+
+ case LttngStrings.SCHED_PROCESS_EXIT:
+ /* Fields: string comm, int32 tid, int32 prio */
+ break;
+
+ case LttngStrings.SCHED_PROCESS_FREE:
+ /* Fields: string comm, int32 tid, int32 prio */
+ /*
+ * A sched_process_free will always happen after the sched_switch
+ * that will remove the process from the cpu for the last time. So
+ * this is when we should delete everything wrt to the process.
+ */
+ {
+ Integer tid = ((Long) event.getContent().getField(LttngStrings.TID).getValue()).intValue();
+ /*
+ * Remove the process and all its sub-attributes from the
+ * current state
+ */
+ quark = ss.getQuarkRelativeAndAdd(getNodeThreads(), tid.toString());
+ ss.removeAttribute(ts, quark);
+ }
+ break;
+
+ case LttngStrings.STATEDUMP_PROCESS_STATE:
+ /* Fields:
+ * int32 type, int32 mode, int32 pid, int32 submode, int32 vpid,
+ * int32 ppid, int32 tid, string name, int32 status, int32 vtid */
+ {
+ ITmfEventField content = event.getContent();
+ int tid = ((Long) content.getField(LttngStrings.TID).getValue()).intValue();
+ int pid = ((Long) content.getField(LttngStrings.PID).getValue()).intValue();
+ int ppid = ((Long) content.getField(LttngStrings.PPID).getValue()).intValue();
+ int status = ((Long) content.getField(LttngStrings.STATUS).getValue()).intValue();
+ String name = (String) content.getField(LttngStrings.NAME).getValue();
+ /*
+ * "mode" could be interesting too, but it doesn't seem to be
+ * populated with anything relevant for now.
+ */
+
+ int curThreadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(tid));
+
+ /* Set the process' name */
+ quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.EXEC_NAME);
+ if (ss.queryOngoingState(quark).isNull()) {
+ /* If the value didn't exist previously, set it */
+ value = TmfStateValue.newValueString(name);
+ ss.modifyAttribute(ts, value, quark);
+ }
+
+ /* Set the process' PPID */
+ quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.PPID);
+ if (ss.queryOngoingState(quark).isNull()) {
+ if (pid == tid) {
+ /* We have a process. Use the 'PPID' field. */
+ value = TmfStateValue.newValueInt(ppid);
+ } else {
+ /* We have a thread, use the 'PID' field for the parent. */
+ value = TmfStateValue.newValueInt(pid);
+ }
+ ss.modifyAttribute(ts, value, quark);
+ }
+
+ /* Set the process' status */
+ quark = ss.getQuarkRelativeAndAdd(curThreadNode, Attributes.STATUS);
+ if (ss.queryOngoingState(quark).isNull()) {
+ /* "2" here means "WAIT_FOR_CPU", and "5" "WAIT_BLOCKED" in the LTTng kernel. */
+ if (status == 2) {
+ value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ } else if (status == 5) {
+ value = StateValues.PROCESS_STATUS_WAIT_BLOCKED_VALUE;
+ } else {
+ value = StateValues.PROCESS_STATUS_UNKNOWN_VALUE;
+ }
+ ss.modifyAttribute(ts, value, quark);
+ }
+ }
+ break;
+
+ case LttngStrings.SCHED_WAKEUP:
+ case LttngStrings.SCHED_WAKEUP_NEW:
+ /* Fields (same fields for both types):
+ * string comm, int32 pid, int32 prio, int32 success,
+ * int32 target_cpu */
+ {
+ final int tid = ((Long) event.getContent().getField(LttngStrings.TID).getValue()).intValue();
+ final int threadNode = ss.getQuarkRelativeAndAdd(getNodeThreads(), String.valueOf(tid));
+
+ /*
+ * The process indicated in the event's payload is now ready to
+ * run. Assign it to the "wait for cpu" state, but only if it
+ * was not already running.
+ */
+ quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.STATUS);
+ int status = ss.queryOngoingState(quark).unboxInt();
+
+ if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL &&
+ status != StateValues.PROCESS_STATUS_RUN_USERMODE) {
+ value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
+ }
+ break;
+
+ default:
+ /* Other event types not covered by the main switch */
+ {
+ if (eventName.startsWith(LttngStrings.SYSCALL_PREFIX)
+ || eventName.startsWith(LttngStrings.COMPAT_SYSCALL_PREFIX)) {
+ /*
+ * This is a replacement for the old sys_enter event. Now
+ * syscall names are listed into the event type
+ */
+
+ /* Assign the new system call to the process */
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
+ value = TmfStateValue.newValueString(eventName);
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Put the process in system call mode */
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+ value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+
+ /* Put the CPU in system call (kernel) mode */
+ quark = ss.getQuarkRelativeAndAdd(currentCPUNode, Attributes.STATUS);
+ value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
+ }
+ break;
+ } // End of big switch
+
+ } catch (AttributeNotFoundException ae) {
+ /*
+ * This would indicate a problem with the logic of the manager here,
+ * so it shouldn't happen.
+ */
+ ae.printStackTrace();
+
+ } catch (TimeRangeException tre) {
+ /*
+ * This would happen if the events in the trace aren't ordered
+ * chronologically, which should never be the case ...
+ */
+ System.err.println("TimeRangeExcpetion caught in the state system's event manager."); //$NON-NLS-1$
+ System.err.println("Are the events in the trace correctly ordered?"); //$NON-NLS-1$
+ tre.printStackTrace();
+
+ } catch (StateValueTypeException sve) {
+ /*
+ * This would happen if we were trying to push/pop attributes not of
+ * type integer. Which, once again, should never happen.
+ */
+ sve.printStackTrace();
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Convenience methods for commonly-used attribute tree locations
+ // ------------------------------------------------------------------------
+
+ private int getNodeCPUs() {
+ return ss.getQuarkAbsoluteAndAdd(Attributes.CPUS);
+ }
+
+ private int getNodeThreads() {
+ return ss.getQuarkAbsoluteAndAdd(Attributes.THREADS);
+ }
+
+ private int getNodeIRQs() {
+ return ss.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.IRQS);
+ }
+
+ private int getNodeSoftIRQs() {
+ return ss.getQuarkAbsoluteAndAdd(Attributes.RESOURCES, Attributes.SOFT_IRQS);
+ }
+
+ // ------------------------------------------------------------------------
+ // Advanced state-setting methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * When we want to set a process back to a "running" state, first check
+ * its current System_call attribute. If there is a system call active, we
+ * put the process back in the syscall state. If not, we put it back in
+ * user mode state.
+ */
+ private void setProcessToRunning(long ts, int currentThreadNode)
+ throws AttributeNotFoundException, TimeRangeException,
+ StateValueTypeException {
+ int quark;
+ ITmfStateValue value;
+
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.SYSTEM_CALL);
+ if (ss.queryOngoingState(quark).isNull()) {
+ /* We were in user mode before the interruption */
+ value = StateValues.PROCESS_STATUS_RUN_USERMODE_VALUE;
+ } else {
+ /* We were previously in kernel mode */
+ value = StateValues.PROCESS_STATUS_RUN_SYSCALL_VALUE;
+ }
+ quark = ss.getQuarkRelativeAndAdd(currentThreadNode, Attributes.STATUS);
+ ss.modifyAttribute(ts, value, quark);
+ }
+
+ /**
+ * Similar logic as above, but to set the CPU's status when it's coming out
+ * of an interruption.
+ */
+ private void cpuExitInterrupt(long ts, int currentCpuNode, int currentThreadNode)
+ throws StateValueTypeException, AttributeNotFoundException,
+ TimeRangeException {
+ int quark;
+ ITmfStateValue value;
+
+ quark = ss.getQuarkRelativeAndAdd(currentCpuNode, Attributes.CURRENT_THREAD);
+ if (ss.queryOngoingState(quark).unboxInt() > 0) {
+ /* There was a process on the CPU */
+ quark = ss.getQuarkRelative(currentThreadNode, Attributes.SYSTEM_CALL);
+ if (ss.queryOngoingState(quark).isNull()) {
+ /* That process was in user mode */
+ value = StateValues.CPU_STATUS_RUN_USERMODE_VALUE;
+ } else {
+ /* That process was in a system call */
+ value = StateValues.CPU_STATUS_RUN_SYSCALL_VALUE;
+ }
+ } else {
+ /* There was no real process scheduled, CPU was idle */
+ value = StateValues.CPU_STATUS_IDLE_VALUE;
+ }
+ quark = ss.getQuarkRelativeAndAdd(currentCpuNode, Attributes.STATUS);
+ ss.modifyAttribute(ts, value, quark);
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ * Mathieu Rail - Provide the requirements of the analysis
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.stateprovider.LttngKernelStateProvider;
+import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement.ValuePriorityLevel;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * State System Module for lttng kernel traces
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class LttngKernelAnalysisModule extends TmfStateSystemAnalysisModule {
+
+ /**
+ * The file name of the History Tree
+ */
+ public static final @NonNull String HISTORY_TREE_FILE_NAME = "stateHistory.ht"; //$NON-NLS-1$
+
+ /** The ID of this analysis module */
+ public static final @NonNull String ID = "org.eclipse.linuxtools.lttng2.kernel.analysis"; //$NON-NLS-1$
+
+ /*
+ * TODO: Decide which events should be mandatory for the analysis, once the
+ * appropriate error messages and session setup are in place.
+ */
+ private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of();
+
+ private static final ImmutableSet<String> OPTIONAL_EVENTS = ImmutableSet.of(
+ LttngStrings.EXIT_SYSCALL,
+ LttngStrings.IRQ_HANDLER_ENTRY,
+ LttngStrings.IRQ_HANDLER_EXIT,
+ LttngStrings.SOFTIRQ_ENTRY,
+ LttngStrings.SOFTIRQ_EXIT,
+ LttngStrings.SOFTIRQ_RAISE,
+ LttngStrings.SCHED_PROCESS_FORK,
+ LttngStrings.SCHED_PROCESS_EXIT,
+ LttngStrings.SCHED_PROCESS_FREE,
+ LttngStrings.SCHED_SWITCH,
+ LttngStrings.STATEDUMP_PROCESS_STATE,
+ LttngStrings.SCHED_WAKEUP,
+ LttngStrings.SCHED_WAKEUP_NEW,
+
+ /* FIXME Add the prefix for syscalls */
+ LttngStrings.SYSCALL_PREFIX
+ );
+
+ /** The requirements as an immutable set */
+ private static final ImmutableSet<TmfAnalysisRequirement> REQUIREMENTS;
+
+ static {
+ /* initialize the requirement: domain and events */
+ TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
+ domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_KERNEL, ValuePriorityLevel.MANDATORY);
+
+ TmfAnalysisRequirement eventReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
+ eventReq.addValues(OPTIONAL_EVENTS, ValuePriorityLevel.OPTIONAL);
+
+ REQUIREMENTS = ImmutableSet.of(domainReq, eventReq);
+ }
+
+ @Override
+ @NonNull
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelStateProvider(getTrace());
+ }
+
+ @Override
+ @NonNull
+ protected String getSsFileName() {
+ return HISTORY_TREE_FILE_NAME;
+ }
+
+ @Override
+ protected String getFullHelpText() {
+ return Messages.LttngKernelAnalysisModule_Help;
+ }
+
+ @Override
+ public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
+ return REQUIREMENTS;
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.analysis;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Externalized message strings from the LTTng Kernel Analysis
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.kernel.core.analysis.messages"; //$NON-NLS-1$
+
+ public static String LttngKernelAnalysisModule_Help;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2014 École Polytechnique de Montréal
+#
+# 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:
+# Geneviève Bastien - Initial API and implementation
+###############################################################################
+
+LttngKernelAnalysisModule_Help=Builds the LTTng2 kernel state system to populate the Control Flow view and the Resources View
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * François Rajotte - Initial API and implementation
+ * Geneviève Bastien - Revision of the initial implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.cpuusage;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.LttngStrings;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+
+/**
+ * Creates a state system with the total time spent on CPU for each thread and
+ * for each CPU from a kernel trace.
+ *
+ * This state system in itself keeps the total time on CPU since last time the
+ * process was scheduled out. The state system queries will only be accurate
+ * when the process is not in a running state. To have exact CPU usage when
+ * running, this state system needs to be used along the LTTng Kernel analysis.
+ *
+ * It requires only the 'sched_switch' events enabled on the trace.
+ *
+ * @author François Rajotte
+ * @since 3.0
+ */
+public class LttngKernelCpuStateProvider extends AbstractTmfStateProvider {
+
+ private static final int VERSION = 1;
+
+ /* For each CPU, maps the last time a thread was scheduled in */
+ private final Map<String, Long> fLastStartTimes = new HashMap<>();
+ private final long fTraceStart;
+
+ /**
+ * Constructor
+ *
+ * @param trace
+ * The trace from which to get the CPU usage
+ */
+ public LttngKernelCpuStateProvider(ITmfTrace trace) {
+ super(trace, ITmfEvent.class, "LTTng Kernel CPU usage"); //$NON-NLS-1$
+ fTraceStart = trace.getStartTime().getValue();
+ }
+
+ // ------------------------------------------------------------------------
+ // ITmfStateProvider
+ // ------------------------------------------------------------------------
+
+ @Override
+ public int getVersion() {
+ return VERSION;
+ }
+
+ @Override
+ public LttngKernelCpuStateProvider getNewInstance() {
+ return new LttngKernelCpuStateProvider(this.getTrace());
+ }
+
+ @Override
+ protected void eventHandle(ITmfEvent event) {
+ final String eventName = event.getType().getName();
+
+ if (eventName.equals(LttngStrings.SCHED_SWITCH)) {
+ /*
+ * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64
+ * prev_state, string next_comm, int32 next_tid, int32 next_prio
+ */
+
+ ITmfEventField content = event.getContent();
+ long ts = event.getTimestamp().getValue();
+ String cpu = event.getSource();
+
+ Long prevTid = (Long) content.getField(LttngStrings.PREV_TID).getValue();
+
+ try {
+ Integer currentCPUNode = ss.getQuarkRelativeAndAdd(getNodeCPUs(), cpu);
+
+ /*
+ * This quark contains the value of the cumulative time spent on
+ * the source CPU by the currently running thread
+ */
+ Integer cumulativeTimeQuark = ss.getQuarkRelativeAndAdd(currentCPUNode, prevTid.toString());
+ Long startTime = fLastStartTimes.get(cpu);
+ /*
+ * If start time is null, we haven't seen the start of the
+ * process, so we assume beginning of the trace
+ */
+ if (startTime == null) {
+ startTime = fTraceStart;
+ }
+
+ /*
+ * We add the time from startTime until now to the cumulative
+ * time of the thread
+ */
+ if (startTime != null) {
+ ITmfStateValue value = ss.queryOngoingState(cumulativeTimeQuark);
+
+ /*
+ * Modify cumulative time for this CPU/TID combo: The total
+ * time changes when the process is scheduled out. Nothing
+ * happens when the process is scheduled in.
+ */
+ long prevCumulativeTime = value.unboxLong();
+ long newCumulativeTime = prevCumulativeTime + (ts - startTime);
+
+ value = TmfStateValue.newValueLong(newCumulativeTime);
+ ss.modifyAttribute(ts, value, cumulativeTimeQuark);
+ fLastStartTimes.put(cpu, ts);
+ }
+ } catch (AttributeNotFoundException e) {
+ Activator.getDefault().logError("Attribute not found in LttngKernelCpuStateProvider", e); //$NON-NLS-1$
+ }
+
+ }
+ }
+
+ /* Shortcut for the "current CPU" attribute node */
+ private int getNodeCPUs() {
+ return ss.getQuarkAbsoluteAndAdd(Attributes.CPUS);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.cpuusage;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+
+/**
+ * This analysis module computes the CPU usage of a system from a kernel trace.
+ * It requires the LTTng Kernel analysis module to have accurate CPU usage data.
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class LttngKernelCpuUsageAnalysis extends TmfStateSystemAnalysisModule {
+
+ /** The ID of this analysis */
+ public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.core.cpuusage"; //$NON-NLS-1$
+
+ /** Text used to identify 'total' entries in the returned maps */
+ public static final String TOTAL = "total"; //$NON-NLS-1$
+ /** String used to separate elements in the returned maps */
+ public static final String SPLIT_STRING = "/"; //$NON-NLS-1$
+ /** Idle process thread ID */
+ public static final String TID_ZERO = "0"; //$NON-NLS-1$
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngKernelCpuStateProvider(getTrace());
+ }
+
+ @Override
+ protected StateSystemBackendType getBackendType() {
+ return StateSystemBackendType.FULL;
+ }
+
+ @Override
+ protected boolean executeAnalysis(IProgressMonitor monitor) {
+ /*
+ * This analysis depends on the LTTng kernel analysis, so we'll start
+ * that build at the same time
+ */
+ LttngKernelAnalysisModule module = getTrace().getAnalysisModuleOfClass(LttngKernelAnalysisModule.class, LttngKernelAnalysisModule.ID);
+ if (module != null) {
+ module.schedule();
+ }
+ return super.executeAnalysis(monitor);
+ }
+
+ /**
+ * Get a map of time spent on CPU by various threads during a time range.
+ *
+ * @param start
+ * Start time of requested range
+ * @param end
+ * End time of requested range
+ * @return A map of TID -> time spent on CPU in the [start, end] interval
+ */
+ public Map<String, Long> getCpuUsageInRange(long start, long end) {
+ Map<String, Long> map = new HashMap<>();
+ Map<String, Long> totalMap = new HashMap<>();
+
+ ITmfTrace trace = getTrace();
+ ITmfStateSystem cpuSs = getStateSystem();
+ if (trace == null || cpuSs == null) {
+ return map;
+ }
+ ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
+ if (kernelSs == null) {
+ return map;
+ }
+
+ /*
+ * Make sure the start/end times are within the state history, so we
+ * don't get TimeRange exceptions.
+ */
+ long startTime = Math.max(start, cpuSs.getStartTime());
+ startTime = Math.max(startTime, kernelSs.getStartTime());
+ long endTime = Math.min(end, cpuSs.getCurrentEndTime());
+ endTime = Math.min(endTime, kernelSs.getCurrentEndTime());
+ long totalTime = 0;
+ if (endTime < startTime) {
+ return map;
+ }
+
+ try {
+ /* Get the list of quarks for each CPU and CPU's TIDs */
+ int cpusNode = cpuSs.getQuarkAbsolute(Attributes.CPUS);
+ Map<Integer, List<Integer>> tidsPerCpu = new HashMap<>();
+ for (int cpuNode : cpuSs.getSubAttributes(cpusNode, false)) {
+ tidsPerCpu.put(cpuNode, cpuSs.getSubAttributes(cpuNode, false));
+ }
+
+ /* Query full states at start and end times */
+ List<ITmfStateInterval> kernelEndState = kernelSs.queryFullState(endTime);
+ List<ITmfStateInterval> endState = cpuSs.queryFullState(endTime);
+ List<ITmfStateInterval> kernelStartState = kernelSs.queryFullState(startTime);
+ List<ITmfStateInterval> startState = cpuSs.queryFullState(startTime);
+
+ long countAtStart, countAtEnd;
+
+ for (Entry<Integer, List<Integer>> entry : tidsPerCpu.entrySet()) {
+ int cpuNode = entry.getKey();
+ List<Integer> tidNodes = entry.getValue();
+
+ String curCpuName = cpuSs.getAttributeName(cpuNode);
+ long cpuTotal = 0;
+
+ /* Get the quark of the thread running on this CPU */
+ int currentThreadQuark = kernelSs.getQuarkAbsolute(Attributes.CPUS, curCpuName, Attributes.CURRENT_THREAD);
+ /* Get the currently running thread on this CPU */
+ int startThread = kernelStartState.get(currentThreadQuark).getStateValue().unboxInt();
+ int endThread = kernelEndState.get(currentThreadQuark).getStateValue().unboxInt();
+
+ for (int tidNode : tidNodes) {
+ String curTidName = cpuSs.getAttributeName(tidNode);
+ int tid = Integer.parseInt(curTidName);
+
+ countAtEnd = endState.get(tidNode).getStateValue().unboxLong();
+ countAtStart = startState.get(tidNode).getStateValue().unboxLong();
+ if (countAtStart == -1) {
+ countAtStart = 0;
+ }
+ if (countAtEnd == -1) {
+ countAtEnd = 0;
+ }
+
+ /*
+ * Interpolate start and end time of threads running at
+ * those times
+ */
+ if (tid == startThread || startThread == -1) {
+ long runningTime = kernelStartState.get(currentThreadQuark).getEndTime() - kernelStartState.get(currentThreadQuark).getStartTime();
+ long runningEnd = kernelStartState.get(currentThreadQuark).getEndTime();
+
+ countAtStart = interpolateCount(countAtStart, startTime, runningEnd, runningTime);
+ }
+ if (tid == endThread) {
+ long runningTime = kernelEndState.get(currentThreadQuark).getEndTime() - kernelEndState.get(currentThreadQuark).getStartTime();
+ long runningEnd = kernelEndState.get(currentThreadQuark).getEndTime();
+
+ countAtEnd = interpolateCount(countAtEnd, endTime, runningEnd, runningTime);
+ }
+ /*
+ * If startThread is -1, we made the hypothesis that the
+ * process running at start was the current one. If the
+ * count is negative, we were wrong in this hypothesis. Also
+ * if the time at end is 0, it either means the process
+ * hasn't been on the CPU or that we still don't know who is
+ * running. In both cases, that invalidates the hypothesis.
+ */
+ if ((startThread == -1) && ((countAtEnd - countAtStart < 0) || (countAtEnd == 0))) {
+ countAtStart = 0;
+ }
+
+ long currentCount = countAtEnd - countAtStart;
+ if (currentCount < 0) {
+ Activator.getDefault().logWarning(String.format("Negative count: start %d, end %d", countAtStart, countAtEnd)); //$NON-NLS-1$
+ currentCount = 0;
+ } else if (currentCount > endTime - startTime) {
+ Activator.getDefault().logWarning(String.format("CPU Usage: Spent more time on CPU than allowed: %s spent %d when max should be %d", curTidName, currentCount, endTime - startTime)); //$NON-NLS-1$
+ currentCount = 0;
+ }
+ cpuTotal += currentCount;
+ map.put(curCpuName + SPLIT_STRING + curTidName, currentCount);
+ addToMap(totalMap, curTidName, currentCount);
+ totalTime += (currentCount);
+ }
+ map.put(curCpuName, cpuTotal);
+ }
+
+ /* Add the totals to the map */
+ for (Entry<String, Long> entry : totalMap.entrySet()) {
+ map.put(TOTAL + SPLIT_STRING + entry.getKey(), entry.getValue());
+ }
+ map.put(TOTAL, totalTime);
+
+ } catch (TimeRangeException | AttributeNotFoundException e) {
+ /*
+ * Assume there is no events or the attribute does not exist yet,
+ * nothing will be put in the map.
+ */
+ } catch (StateValueTypeException | StateSystemDisposedException e) {
+ /*
+ * These other exception types would show a logic problem, so they
+ * should not happen.
+ */
+ Activator.getDefault().logError("Error getting CPU usage in a time range", e); //$NON-NLS-1$
+ }
+
+ return map;
+ }
+
+ private static long interpolateCount(long count, long ts, long runningEnd, long runningTime) {
+ long newCount = count;
+
+ /* sanity check */
+ if (runningTime > 0) {
+
+ long runningStart = runningEnd - runningTime;
+
+ if (ts < runningStart) {
+ /*
+ * This interval was not started, this can happen if the current
+ * running thread is unknown and we execute this method. It just
+ * means that this process was not the one running
+ */
+ return newCount;
+ }
+ newCount += (ts - runningStart);
+ }
+ return newCount;
+ }
+
+ /*
+ * Add the value to the previous value in the map. If the key was not set,
+ * assume 0
+ */
+ private static void addToMap(Map<String, Long> map, String key, Long value) {
+ Long addTo = map.get(key);
+ if (addTo == null) {
+ map.put(key, value);
+ } else {
+ map.put(key, addTo + value);
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial implementation and API
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.event.matching;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.TcpEventStrings;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.matching.ITmfNetworkMatchDefinition;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching.MatchingType;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching.Direction;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfEventTypeCollectionHelper;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Class to match tcp type events. This matching class applies to traces
+ * obtained with the 'addons' lttng module. This module can be obtained with
+ * lttng-modules to generate traces at
+ * https://github.com/giraldeau/lttng-modules/tree/addons
+ *
+ * Note: this module only allows to generate traces to be read and analyzed by
+ * TMF, no code from this module is being used here
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class TcpEventMatching implements ITmfNetworkMatchDefinition {
+
+ private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of(
+ TcpEventStrings.INET_SOCK_LOCAL_IN,
+ TcpEventStrings.INET_SOCK_LOCAL_OUT);
+
+ private static boolean canMatchPacket(final ITmfEvent event) {
+ /* Make sure all required fields are present to match with this event */
+ ITmfEventField content = event.getContent();
+ if ((content.getField(TcpEventStrings.SEQ) != null) &&
+ (content.getField(TcpEventStrings.ACKSEQ) != null) && (content.getField(TcpEventStrings.FLAGS) != null)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public Direction getDirection(ITmfEvent event) {
+ String evname = event.getType().getName();
+
+ if (!canMatchPacket(event)) {
+ return null;
+ }
+
+ /* Is the event a tcp socket in or out event */
+ if (evname.equals(TcpEventStrings.INET_SOCK_LOCAL_IN)) {
+ return Direction.IN;
+ } else if (evname.equals(TcpEventStrings.INET_SOCK_LOCAL_OUT)) {
+ return Direction.OUT;
+ }
+ return null;
+ }
+
+ /**
+ * The key to uniquely identify a TCP packet depends on many fields. This
+ * method computes the key for a given event.
+ *
+ * @param event
+ * The event for which to compute the key
+ * @return the unique key for this event
+ */
+ @Override
+ public List<Object> getUniqueField(ITmfEvent event) {
+ List<Object> keys = new ArrayList<>();
+
+ keys.add(event.getContent().getField(TcpEventStrings.SEQ).getValue());
+ keys.add(event.getContent().getField(TcpEventStrings.ACKSEQ).getValue());
+ keys.add(event.getContent().getField(TcpEventStrings.FLAGS).getValue());
+
+ return keys;
+ }
+
+ @Override
+ public boolean canMatchTrace(ITmfTrace trace) {
+ if (!(trace instanceof CtfTmfTrace)) {
+ return false;
+ }
+ CtfTmfTrace ktrace = (CtfTmfTrace) trace;
+
+ Set<String> traceEvents = TmfEventTypeCollectionHelper.getEventNames(ktrace.getContainedEventTypes());
+ traceEvents.retainAll(REQUIRED_EVENTS);
+ return !traceEvents.isEmpty();
+ }
+
+ @Override
+ public MatchingType[] getApplicableMatchingTypes() {
+ MatchingType[] types = { MatchingType.NETWORK };
+ return types;
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial implementation and API
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.event.matching;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.TcpEventStrings;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.matching.ITmfNetworkMatchDefinition;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfEventMatching.MatchingType;
+import org.eclipse.linuxtools.tmf.core.event.matching.TmfNetworkEventMatching.Direction;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfEventTypeCollectionHelper;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Class to match tcp type events. This class applies to traces obtained with
+ * the full network tracepoint data available from an experimental branch of
+ * lttng-modules. This branch is often rebased on lttng-modules master and is
+ * available at
+ * http://git.dorsal.polymtl.ca/~gbastien?p=lttng-modules.git;a=summary
+ * net_data_experimental branch.
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class TcpLttngEventMatching implements ITmfNetworkMatchDefinition {
+
+ private static final String[] key_seq = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP, TcpEventStrings.SEQ };
+ private static final String[] key_ackseq = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP, TcpEventStrings.ACKSEQ };
+ private static final String[] key_flags = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP, TcpEventStrings.FLAGS };
+
+ private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of(
+ TcpEventStrings.NET_DEV_QUEUE,
+ TcpEventStrings.NETIF_RECEIVE_SKB);
+
+ private static boolean canMatchPacket(final ITmfEvent event) {
+ TmfEventField field = (TmfEventField) event.getContent();
+
+ String[] tcp_data = { TcpEventStrings.TRANSPORT_FIELDS, TcpEventStrings.TYPE_TCP };
+ ITmfEventField data = field.getSubField(tcp_data);
+ if (data != null) {
+ return (data.getValue() != null);
+ }
+ return false;
+ }
+
+ /**
+ * The key to uniquely identify a TCP packet depends on many fields. This
+ * method computes the key for a given event.
+ *
+ * @param event
+ * The event for which to compute the key
+ * @return the unique key for this event
+ */
+ @Override
+ public List<Object> getUniqueField(ITmfEvent event) {
+ List<Object> keys = new ArrayList<>();
+
+ TmfEventField field = (TmfEventField) event.getContent();
+ ITmfEventField data;
+
+ data = field.getSubField(key_seq);
+ if (data != null) {
+ keys.add(data.getValue());
+ }
+ data = field.getSubField(key_ackseq);
+ if (data != null) {
+ keys.add(data.getValue());
+ }
+ data = field.getSubField(key_flags);
+ if (data != null) {
+ keys.add(data.getValue());
+ }
+
+ return keys;
+ }
+
+ @Override
+ public boolean canMatchTrace(ITmfTrace trace) {
+ if (!(trace instanceof CtfTmfTrace)) {
+ return false;
+ }
+ CtfTmfTrace ktrace = (CtfTmfTrace) trace;
+
+ Set<String> traceEvents = TmfEventTypeCollectionHelper.getEventNames(ktrace.getContainedEventTypes());
+ traceEvents.retainAll(REQUIRED_EVENTS);
+ return !traceEvents.isEmpty();
+ }
+
+ @Override
+ public Direction getDirection(ITmfEvent event) {
+ String evname = event.getType().getName();
+
+ /* Is the event a tcp socket in or out event */
+ if (evname.equals(TcpEventStrings.NETIF_RECEIVE_SKB) && canMatchPacket(event)) {
+ return Direction.IN;
+ } else if (evname.equals(TcpEventStrings.NET_DEV_QUEUE) && canMatchPacket(event)) {
+ return Direction.OUT;
+ }
+ return null;
+ }
+
+ @Override
+ public MatchingType[] getApplicableMatchingTypes() {
+ MatchingType[] types = { MatchingType.NETWORK };
+ return types;
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ * Matthew Khouzam - Improved validation
+ ******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.trace;
+
+import java.nio.BufferOverflowException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
+import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Activator;
+import org.eclipse.linuxtools.tmf.core.trace.TraceValidationStatus;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+
+/**
+ * This is the specification of CtfTmfTrace for use with LTTng 2.x kernel
+ * traces.
+ *
+ * @author Alexandre Montplaisir
+ * @since 2.0
+ */
+public class LttngKernelTrace extends CtfTmfTrace {
+
+ private static final int CONFIDENCE = 100;
+
+ /**
+ * Default constructor
+ */
+ public LttngKernelTrace() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * This implementation sets the confidence to 100 if the trace is a valid
+ * CTF trace in the "kernel" domain.
+ */
+ @Override
+ public IStatus validate(final IProject project, final String path) {
+ /*
+ * Make sure the trace is openable as a CTF trace. We do this here
+ * instead of calling super.validate() to keep the reference to "temp".
+ */
+ try (CTFTrace temp = new CTFTrace(path);) {
+ /* Make sure the domain is "kernel" in the trace's env vars */
+ String dom = temp.getEnvironment().get("domain"); //$NON-NLS-1$
+ if (dom != null && dom.equals("\"kernel\"")) { //$NON-NLS-1$
+ return new TraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID);
+ }
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngKernelTrace_DomainError);
+
+ } catch (CTFReaderException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ } catch (NullPointerException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ } catch (final BufferOverflowException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngKernelTrace_TraceReadError + ": " + Messages.LttngKernelTrace_MalformedTrace); //$NON-NLS-1$
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.core.trace;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Message bundle for lttng2.kernel.core.trace
+ *
+ * @author Matthew Khouzam
+ * @since 2.0
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.kernel.core.trace.messages"; //$NON-NLS-1$
+
+ /**
+ * The domain is not "kernel"
+ */
+ public static String LttngKernelTrace_DomainError;
+ /**
+ * Malformed trace (buffer overflow maybe?)
+ * @since 2.1
+ */
+ public static String LttngKernelTrace_MalformedTrace;
+ /**
+ * Trace read error
+ * @since 2.1
+ */
+ public static String LttngKernelTrace_TraceReadError;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+LttngKernelTrace_DomainError=Domain mismatch, the environment should be 'kernel'.
+LttngKernelTrace_MalformedTrace=Buffer overflow exception, trace is malformed
+LttngKernelTrace_TraceReadError=Lttng trace read error
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+screenshots/
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Export-Package: org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests
+Require-Bundle: org.apache.log4j,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.lttng2.kernel.core,
+ org.eclipse.tracecompass.lttng2.kernel.ui,
+ org.eclipse.tracecompass.lttng2.control.ui,
+ org.eclipse.linuxtools.tmf.core,
+ org.eclipse.linuxtools.tmf.core.tests,
+ org.eclipse.linuxtools.tmf.ctf.core,
+ org.eclipse.linuxtools.tmf.ctf.core.tests,
+ org.eclipse.linuxtools.tmf.ui,
+ org.eclipse.linuxtools.tmf.ui.swtbot.tests,
+ org.eclipse.swtbot.eclipse.finder,
+ org.eclipse.swtbot.junit4_x,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.views,
+ org.junit
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Kernel UI SWTBot Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2013 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
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Kernel UI SWTBot Tests Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests</testSuite>
+ <testClass>org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests.AllTests</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
+ <product>org.eclipse.platform.ide</product>
+<!-- Disable GTK3 with Luna because it makes the test hang (bug in IcedTea http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1736) -->
+ <environmentVariables>
+ <SWT_GTK3>0</SWT_GTK3>
+ </environmentVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for UI on the lttng kernel perspective
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ImportAndReadKernelSmokeTest.class,
+ KernelPerspectiveChecker.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Matthew Khouzam - Initial API and implementation
+ * Marc-Andre Laperle
+ * Patrick Tasse - Add support for folder elements
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.SimpleLayout;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTimeSynchSignal;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.eclipse.linuxtools.tmf.ui.editors.TmfEventsEditor;
+import org.eclipse.linuxtools.tmf.ui.swtbot.tests.SWTBotUtil;
+import org.eclipse.linuxtools.tmf.ui.swtbot.tests.conditions.ConditionHelpers;
+import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotToolbarButton;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.hamcrest.Matcher;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * SWTBot Smoke test for LTTng Kernel UI.
+ *
+ * @author Matthew Khouzam
+ */
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class ImportAndReadKernelSmokeTest {
+
+ private static final String TRACE_TYPE = "org.eclipse.linuxtools.lttng2.kernel.tracetype";
+ private static final String KERNEL_PERSPECTIVE_ID = "org.eclipse.linuxtools.lttng2.kernel.ui.perspective";
+ private static final String TRACE_PROJECT_NAME = "test";
+
+ private static SWTWorkbenchBot fBot;
+ public static CtfTmfTestTrace ctt = CtfTmfTestTrace.SYNTHETIC_TRACE;
+ private ITmfEvent fDesired1;
+ private ITmfEvent fDesired2;
+
+ /** The Log4j logger instance. */
+ private static final Logger fLogger = Logger.getRootLogger();
+
+ /**
+ * Test Class setup
+ */
+ @BeforeClass
+ public static void init() {
+ SWTBotUtil.failIfUIThread();
+
+ /* set up for swtbot */
+ SWTBotPreferences.TIMEOUT = 20000; /* 20 second timeout */
+ fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
+ fBot = new SWTWorkbenchBot();
+
+ final List<SWTBotView> openViews = fBot.views();
+ for (SWTBotView view : openViews) {
+ if (view.getTitle().equals("Welcome")) {
+ view.close();
+ fBot.waitUntil(ConditionHelpers.ViewIsClosed(view));
+ }
+ }
+ /* Switch perspectives */
+ switchKernelPerspective();
+ /* Finish waiting for eclipse to load */
+ SWTBotUtil.waitForJobs();
+ }
+
+ private static void switchKernelPerspective() {
+ final Exception retE[] = new Exception[1];
+ if (!UIThreadRunnable.syncExec(new BoolResult() {
+ @Override
+ public Boolean run() {
+ try {
+ PlatformUI.getWorkbench().showPerspective(KERNEL_PERSPECTIVE_ID,
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+ } catch (WorkbenchException e) {
+ retE[0] = e;
+ return false;
+ }
+ return true;
+ }
+ })) {
+ fail(retE[0].getMessage());
+ }
+
+ }
+
+ /**
+ * Main test case
+ */
+ @Test
+ public void test() {
+ SWTBotUtil.createProject(TRACE_PROJECT_NAME);
+ SWTBotUtil.openTrace(TRACE_PROJECT_NAME, ctt.getPath(), TRACE_TYPE);
+ openEditor();
+ testHV(getViewPart("Histogram"));
+ testCFV((ControlFlowView) getViewPart("Control Flow"));
+ testRV((ResourcesView) getViewPart("Resources"));
+
+ fBot.closeAllEditors();
+ SWTBotUtil.deleteProject(TRACE_PROJECT_NAME, fBot);
+ }
+
+ private void openEditor() {
+ Matcher<IEditorReference> matcher = WidgetMatcherFactory.withPartName(ctt.getTrace().getName());
+ IEditorPart iep = fBot.editor(matcher).getReference().getEditor(true);
+ fDesired1 = getEvent(100);
+ fDesired2 = getEvent(10000);
+ final TmfEventsEditor tmfEd = (TmfEventsEditor) iep;
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ tmfEd.setFocus();
+ tmfEd.selectionChanged(new SelectionChangedEvent(tmfEd, new StructuredSelection(fDesired1)));
+ }
+ });
+
+ SWTBotUtil.waitForJobs();
+ SWTBotUtil.delay(1000);
+ assertNotNull(tmfEd);
+ }
+
+ private static void testCFV(ControlFlowView vp) {
+ assertNotNull(vp);
+ }
+
+ private void testHV(IViewPart vp) {
+ SWTBotView hvBot = (new SWTWorkbenchBot()).viewById(HistogramView.ID);
+ List<SWTBotToolbarButton> hvTools = hvBot.getToolbarButtons();
+ for (SWTBotToolbarButton hvTool : hvTools) {
+ if (hvTool.getToolTipText().toLowerCase().contains("lost")) {
+ hvTool.click();
+ }
+ }
+ HistogramView hv = (HistogramView) vp;
+ final TmfTimeSynchSignal signal = new TmfTimeSynchSignal(hv, fDesired1.getTimestamp());
+ final TmfTimeSynchSignal signal2 = new TmfTimeSynchSignal(hv, fDesired2.getTimestamp());
+ hv.updateTimeRange(100000);
+ SWTBotUtil.waitForJobs();
+ hv.currentTimeUpdated(signal);
+ hv.broadcast(signal);
+ SWTBotUtil.waitForJobs();
+ SWTBotUtil.delay(1000);
+
+ hv.updateTimeRange(1000000000);
+ SWTBotUtil.waitForJobs();
+ hv.currentTimeUpdated(signal2);
+ hv.broadcast(signal2);
+ SWTBotUtil.waitForJobs();
+ SWTBotUtil.delay(1000);
+ assertNotNull(hv);
+ }
+
+ private static void testRV(ResourcesView vp) {
+ assertNotNull(vp);
+ }
+
+ private static CtfTmfEvent getEvent(int rank) {
+ try (CtfTmfTrace trace = CtfTmfTestTrace.SYNTHETIC_TRACE.getTrace()) {
+ ITmfContext ctx = trace.seekEvent(0);
+ for (int i = 0; i < rank; i++) {
+ trace.getNext(ctx);
+ }
+ return trace.getNext(ctx);
+ }
+
+ }
+
+ private static IViewPart getViewPart(final String viewTile) {
+ final IViewPart[] vps = new IViewPart[1];
+ UIThreadRunnable.syncExec(new VoidResult() {
+ @Override
+ public void run() {
+ IViewReference[] viewRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
+ for (IViewReference viewRef : viewRefs) {
+ IViewPart vp = viewRef.getView(true);
+ if (vp.getTitle().equals(viewTile)) {
+ vps[0] = vp;
+ return;
+ }
+ }
+ }
+ });
+
+ return vps[0];
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.PerspectiveFactory;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
+import org.eclipse.linuxtools.tmf.ui.swtbot.tests.AbstractPerspectiveChecker;
+import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
+import org.eclipse.ui.IPageLayout;
+import org.junit.Before;
+
+/**
+ * Tracing perspective view checker
+ *
+ * @author Matthew Khouzam
+ */
+public class KernelPerspectiveChecker extends AbstractPerspectiveChecker {
+
+ /**
+ * Set up arrays for test
+ */
+ @Before
+ public void init() {
+ fPerspectiveId = PerspectiveFactory.ID;
+ fViewIds = new ArrayList<>();
+ fViewIds.addAll(Arrays.asList(new String[] {
+ // LTTng views
+ HistogramView.ID,
+ ControlView.ID,
+ ControlFlowView.ID,
+ ResourcesView.ID,
+ TmfStatisticsView.ID,
+ // Standard Eclipse views
+ IPageLayout.ID_PROJECT_EXPLORER,
+ IPageLayout.ID_PROP_SHEET,
+ IPageLayout.ID_BOOKMARKS
+ }));
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.kernel.ui.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.kernel.ui.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.tracecompass.lttng2.kernel.ui;bundle-version="3.1.0"
+Export-Package: org.eclipse.linuxtools.lttng2.kernel.ui.tests
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = about.html
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Kernel Analysis UI Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.kernel.ui.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Kernel Analysis UI Tests Plug-in</name>
+
+ <build>
+ <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.tracecompass.lttng2.kernel.ui.tests</testSuite>
+ <testClass>org.eclipse.linuxtools.lttng2.kernel.ui.tests.AllTests</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
+ <product>org.eclipse.platform.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.ui.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Test suite for the Activator class
+ */
+public class ActivatorTest {
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#Activator()}.
+ */
+ @Test
+ public void testActivator() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#getDefault()}.
+ */
+ @Test
+ public void testGetDefault() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#start}.
+ */
+ @Test
+ public void testStartBundleContext() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator#stop}.
+ */
+ @Test
+ public void testStopBundleContext() {
+ assertTrue(true);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ * Alexandre Montplaisir - Port to JUnit4
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.kernel.ui.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Run the lttng2.ui unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+})
+public class AllTests {
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.kernel.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.kernel.ui;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
+ org.eclipse.tracecompass.lttng2.control.core;bundle-version="3.1.0",
+ org.eclipse.tracecompass.lttng2.control.ui;bundle-version="3.1.0",
+ org.eclipse.tracecompass.lttng2.kernel.core;bundle-version="3.1.0"
+Export-Package: org.eclipse.linuxtools.internal.lttng2.kernel.ui;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests",
+ org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests",
+ org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests",
+ org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;x-friends:="org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests"
+Import-Package: com.google.common.collect
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ icons/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Kernel Analysis UI Plug-in
+
+kernel.perspective.name = LTTng Kernel
+
+controlflow.view.name = Control Flow
+resources.view.name = Resources
+cpuusage.view.name = CPU Usage
+
+tracetype.type.kernel = LTTng Kernel Trace
+analysis.lttngkernel = LTTng Kernel Analysis
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.perspectives">
+ <perspective
+ class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.PerspectiveFactory"
+ icon="icons/obj16/garland16.png"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.perspective"
+ name="%kernel.perspective.name">
+ </perspective>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.lttng2.ui.views.category"
+ class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView"
+ icon="icons/eview16/control_flow_view.gif"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow"
+ name="%controlflow.view.name"
+ restorable="true">
+ </view>
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.lttng2.ui.views.category"
+ class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView"
+ icon="icons/eview16/resources_view.gif"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"
+ name="%resources.view.name"
+ restorable="true">
+ </view>
+ <view
+ allowMultiple="false"
+ category="org.eclipse.linuxtools.lttng2.ui.views.category"
+ class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage.CpuUsageView"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.views.cpuusage"
+ name="%cpuusage.view.name"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.linuxtools.tmf.ui.navigator.content"
+ menuGroupId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.menuGroupId"
+ type="new"
+ wizardId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.newProject">
+ <enablement>
+ <with variable="activeWorkbenchWindow.activePerspective">
+ <equals
+ value="org.eclipse.linuxtools.lttng2.kernel.ui.perspective">
+ </equals>
+ </with>
+ </enablement>
+ </commonWizard>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.tmf.core.analysis">
+ <output
+ class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow">
+ <analysisId
+ id="org.eclipse.linuxtools.lttng2.kernel.analysis">
+ </analysisId>
+ </output>
+ <output
+ class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.views.resources">
+ <analysisId
+ id="org.eclipse.linuxtools.lttng2.kernel.analysis">
+ </analysisId>
+ </output>
+ <output
+ class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+ id="org.eclipse.linuxtools.lttng2.kernel.ui.views.cpuusage">
+ <analysisId
+ id="org.eclipse.linuxtools.lttng2.kernel.core.cpuusage">
+ </analysisId>
+ </output>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.tmf.ui.tracetypeui">
+ <type
+ icon="icons/obj16/garland16.png"
+ tracetype="org.eclipse.linuxtools.lttng2.kernel.tracetype">
+ <eventTableColumns
+ class="org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events.LttngEventTableColumns">
+ </eventTableColumns>
+ </type>
+ </extension>
+</plugin>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.kernel.ui</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Trace Compass LTTng Kernel Analysis UI Plug-in</name>
+
+ <build>
+ <!-- workaround for https://issues.sonatype.org/browse/TYCHO-168 -->
+ <resources>
+ <resource>
+ <directory>src</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.kernel.ui"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ------------------------------------------------------------------------
+ // AbstractUIPlugin
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Get the image object from a given path
+ *
+ * @param path
+ * The path to the image file
+ * @return The Image object
+ */
+ public Image getImageFromPath(String path) {
+ return getImageDescripterFromPath(path).createImage();
+ }
+
+ /**
+ * Get the ImageDescriptor from a given path
+ *
+ * @param path
+ * The path to the image file
+ * @return The ImageDescriptor object
+ */
+ public ImageDescriptor getImageDescripterFromPath(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Get the Image from a registry
+ *
+ * @param path
+ * The path to the image registry
+ * @return The Image object
+ */
+ public Image getImageFromImageRegistry(String path) {
+ Image icon = getImageRegistry().get(path);
+ if (icon == null) {
+ icon = getImageDescripterFromPath(path).createImage();
+ plugin.getImageRegistry().put(path, icon);
+ }
+ return icon;
+ }
+
+ /**
+ * Logs a message with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logInfo(String message) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logInfo(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logWarning(String message) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logWarning(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logError(String message) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logError(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Patrick Tassé - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.messages"; //$NON-NLS-1$
+
+ public static String ControlFlowView_birthTimeColumn;
+ public static String ControlFlowView_tidColumn;
+ public static String ControlFlowView_ptidColumn;
+ public static String ControlFlowView_processColumn;
+ public static String ControlFlowView_traceColumn;
+
+ public static String ControlFlowView_stateTypeName;
+ public static String ControlFlowView_multipleStates;
+ public static String ControlFlowView_nextProcessActionNameText;
+ public static String ControlFlowView_nextProcessActionToolTipText;
+ public static String ControlFlowView_previousProcessActionNameText;
+ public static String ControlFlowView_previousProcessActionToolTipText;
+ public static String ControlFlowView_followCPUBwdText;
+ public static String ControlFlowView_followCPUFwdText;
+
+ public static String ControlFlowView_attributeSyscallName;
+ public static String ControlFlowView_attributeCpuName;
+
+ public static String ResourcesView_stateTypeName;
+ public static String ResourcesView_multipleStates;
+ public static String ResourcesView_nextResourceActionNameText;
+ public static String ResourcesView_nextResourceActionToolTipText;
+ public static String ResourcesView_previousResourceActionNameText;
+ public static String ResourcesView_previousResourceActionToolTipText;
+ public static String ResourcesView_attributeCpuName;
+ public static String ResourcesView_attributeIrqName;
+ public static String ResourcesView_attributeSoftIrqName;
+ public static String ResourcesView_attributeHoverTime;
+ public static String ResourcesView_attributeTidName;
+ public static String ResourcesView_attributeProcessName;
+ public static String ResourcesView_attributeSyscallName;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+ControlFlowView_birthTimeColumn=Birth time
+ControlFlowView_tidColumn=TID
+ControlFlowView_ptidColumn=PTID
+ControlFlowView_processColumn=Process
+ControlFlowView_traceColumn=Trace
+
+ControlFlowView_stateTypeName=Process
+ControlFlowView_multipleStates=(multiple)
+ControlFlowView_nextProcessActionNameText=Next Process
+ControlFlowView_nextProcessActionToolTipText=Select Next Process
+ControlFlowView_previousProcessActionNameText=Previous Process
+ControlFlowView_previousProcessActionToolTipText=Select Previous Process
+ControlFlowView_followCPUBwdText=Follow CPU Backward
+ControlFlowView_followCPUFwdText=Follow CPU Forward
+
+ControlFlowView_attributeSyscallName=System Call
+ControlFlowView_attributeCpuName=CPU
+
+ResourcesView_stateTypeName=Resource
+ResourcesView_multipleStates=(multiple)
+ResourcesView_nextResourceActionNameText=Next Resource
+ResourcesView_nextResourceActionToolTipText=Select Next Resource
+ResourcesView_previousResourceActionNameText=Previous Resource
+ResourcesView_previousResourceActionToolTipText=Select Previous Resource
+ResourcesView_attributeCpuName=CPU
+ResourcesView_attributeIrqName=IRQ
+ResourcesView_attributeSoftIrqName=SOFT IRQ
+ResourcesView_attributeHoverTime=> Hover Time
+ResourcesView_attributeTidName=> TID
+ResourcesView_attributeProcessName=> Process
+ResourcesView_attributeSyscallName=> System Call
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;
+
+import java.util.Collection;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.ui.viewers.events.columns.ITmfEventTableColumns;
+import org.eclipse.linuxtools.tmf.ui.viewers.events.columns.TmfEventTableColumn;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * Event table columns for LTTng 2.x kernel traces
+ */
+public class LttngEventTableColumns implements ITmfEventTableColumns {
+
+ // ------------------------------------------------------------------------
+ // Column definition
+ // ------------------------------------------------------------------------
+
+ @SuppressWarnings("null")
+ private static final @NonNull String CHANNEL_HEADER = Messages.EventsTable_channelColumn;
+
+ @SuppressWarnings("null")
+ private static final @NonNull Collection<TmfEventTableColumn> LTTNG_COLUMNS =
+ ImmutableList.<TmfEventTableColumn> of(
+ TmfEventTableColumn.BaseColumns.TIMESTAMP,
+ new LttngChannelColumn(),
+ TmfEventTableColumn.BaseColumns.EVENT_TYPE,
+ TmfEventTableColumn.BaseColumns.CONTENTS);
+
+ private static class LttngChannelColumn extends TmfEventTableColumn {
+
+ public LttngChannelColumn() {
+ super(CHANNEL_HEADER);
+ }
+
+ @Override
+ public String getItemString(ITmfEvent event) {
+ String ret = event.getReference();
+ return (ret == null ? EMPTY_STRING : ret);
+ }
+
+ @Override
+ public String getFilterFieldId() {
+ return ITmfEvent.EVENT_FIELD_REFERENCE;
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+
+ @Override
+ public Collection<? extends TmfEventTableColumn> getEventTableColumns() {
+ return LTTNG_COLUMNS;
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Patrick Tassé - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events;
+
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.viewers.events.messages"; //$NON-NLS-1$
+ public static String EventsTable_channelColumn;
+ public static String EventsTable_timestampColumn;
+ public static String EventsTable_typeColumn;
+ public static String EventsTable_contentColumn;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+EventsTable_channelColumn=Channel
+EventsTable_timestampColumn=Timestamp
+EventsTable_typeColumn=Event Type
+EventsTable_contentColumn=Content
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2013 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:
+ * Francois Chouinard - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;
+
+import org.eclipse.linuxtools.internal.lttng2.control.ui.views.ControlView;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
+import org.eclipse.linuxtools.tmf.ui.project.wizards.NewTmfProjectWizard;
+import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ * The default LTTng perspective.
+ */
+public class PerspectiveFactory implements IPerspectiveFactory {
+
+ /** Perspective ID */
+ public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.perspective"; //$NON-NLS-1$
+
+ // LTTng views
+ private static final String HISTOGRAM_VIEW_ID = HistogramView.ID;
+ private static final String CONTROL_VIEW_ID = ControlView.ID;
+ private static final String CONTROLFLOW_VIEW_ID = ControlFlowView.ID;
+ private static final String RESOURCES_VIEW_ID = ResourcesView.ID;
+ private static final String STATISTICS_VIEW_ID = TmfStatisticsView.ID;
+
+ // Standard Eclipse views
+ private static final String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
+ private static final String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
+ private static final String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
+
+ @Override
+ public void createInitialLayout(IPageLayout layout) {
+
+ layout.setEditorAreaVisible(true);
+
+ addFastViews(layout);
+ addViewShortcuts(layout);
+ addPerspectiveShortcuts(layout);
+
+ // Create the top left folder
+ IFolderLayout topLeftFolder = layout.createFolder(
+ "topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+ topLeftFolder.addView(PROJECT_VIEW_ID);
+
+ // Create the bottom left folder
+ IFolderLayout bottomLeftFolder = layout.createFolder(
+ "bottomLeftFolder", IPageLayout.BOTTOM, 0.70f, "topLeftFolder"); //$NON-NLS-1$ //$NON-NLS-2$
+ bottomLeftFolder.addView(CONTROL_VIEW_ID);
+
+ // Create the top right folder
+ IFolderLayout topRightFolder = layout.createFolder(
+ "topRightFolder", IPageLayout.TOP, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+ topRightFolder.addView(CONTROLFLOW_VIEW_ID);
+ topRightFolder.addView(RESOURCES_VIEW_ID);
+ topRightFolder.addView(STATISTICS_VIEW_ID);
+
+ // Create the bottom right folder
+ IFolderLayout bottomRightFolder = layout.createFolder(
+ "bottomRightFolder", IPageLayout.BOTTOM, 0.50f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+ bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
+ bottomRightFolder.addView(PROPERTIES_VIEW_ID);
+ bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
+
+ layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
+ }
+
+ /**
+ * Add fast views to the perspective
+ *
+ * @param layout
+ */
+ private void addFastViews(IPageLayout layout) {
+ }
+
+ /**
+ * Add view shortcuts to the perspective
+ *
+ * @param layout
+ */
+ private void addViewShortcuts(IPageLayout layout) {
+ }
+
+ /**
+ * Add perspective shortcuts to the perspective
+ *
+ * @param layout
+ */
+ private void addPerspectiveShortcuts(IPageLayout layout) {
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Patrick Tasse - Initial API and implementation
+ * Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+
+/**
+ * An entry in the Control Flow view
+ */
+public class ControlFlowEntry extends TimeGraphEntry {
+
+ private final @NonNull ITmfTrace fTrace;
+ private final int fThreadId;
+ private final int fParentThreadId;
+ private final int fThreadQuark;
+
+ /**
+ * Constructor
+ *
+ * @param quark
+ * The attribute quark matching the thread
+ * @param trace
+ * The trace on which we are working
+ * @param execName
+ * The exec_name of this entry
+ * @param threadId
+ * The TID of the thread
+ * @param parentThreadId
+ * the Parent_TID of this thread
+ * @param startTime
+ * The start time of this process's lifetime
+ * @param endTime
+ * The end time of this process
+ */
+ public ControlFlowEntry(int quark, @NonNull ITmfTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
+ super(execName, startTime, endTime);
+ fTrace = trace;
+ fThreadId = threadId;
+ fParentThreadId = parentThreadId;
+ fThreadQuark = quark;
+ }
+
+ /**
+ * Get this entry's thread ID
+ *
+ * @return The TID
+ */
+ public int getThreadId() {
+ return fThreadId;
+ }
+
+ /**
+ * Get the entry's trace
+ *
+ * @return the entry's trace
+ */
+ public @NonNull ITmfTrace getTrace() {
+ return fTrace;
+ }
+
+ /**
+ * Get this thread's parent TID
+ *
+ * @return The "PTID"
+ */
+ public int getParentThreadId() {
+ return fParentThreadId;
+ }
+
+ /**
+ * Get the quark of the attribute matching this thread's TID
+ *
+ * @return The quark
+ */
+ public int getThreadQuark() {
+ return fThreadQuark;
+ }
+
+ @Override
+ public String toString() {
+ return getClass().getSimpleName() + '(' + getName() + '[' + fThreadId + "])"; //$NON-NLS-1$
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Patrick Tasse - Initial API and implementation
+ * Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+
+/**
+ * Presentation provider for the control flow view
+ */
+public class ControlFlowPresentationProvider extends TimeGraphPresentationProvider {
+
+ private enum State {
+ UNKNOWN (new RGB(100, 100, 100)),
+ WAIT_BLOCKED (new RGB(200, 200, 0)),
+ WAIT_FOR_CPU (new RGB(200, 100, 0)),
+ USERMODE (new RGB(0, 200, 0)),
+ SYSCALL (new RGB(0, 0, 200)),
+ INTERRUPTED (new RGB(200, 0, 100));
+
+ public final RGB rgb;
+
+ private State(RGB rgb) {
+ this.rgb = rgb;
+ }
+
+ }
+
+ /**
+ * Default constructor
+ */
+ public ControlFlowPresentationProvider() {
+ super(Messages.ControlFlowView_stateTypeName);
+ }
+
+ private static State[] getStateValues() {
+ return State.values();
+ }
+
+ @Override
+ public StateItem[] getStateTable() {
+ State[] states = getStateValues();
+ StateItem[] stateTable = new StateItem[states.length];
+ for (int i = 0; i < stateTable.length; i++) {
+ State state = states[i];
+ stateTable[i] = new StateItem(state.rgb, state.toString());
+ }
+ return stateTable;
+ }
+
+ @Override
+ public int getStateTableIndex(ITimeEvent event) {
+ if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+ int status = ((TimeEvent) event).getValue();
+ return getMatchingState(status).ordinal();
+ }
+ return TRANSPARENT;
+ }
+
+ @Override
+ public String getEventName(ITimeEvent event) {
+ if (event instanceof TimeEvent) {
+ TimeEvent ev = (TimeEvent) event;
+ if (ev.hasValue()) {
+ return getMatchingState(ev.getValue()).toString();
+ }
+ }
+ return Messages.ControlFlowView_multipleStates;
+ }
+
+ private static State getMatchingState(int status) {
+ switch (status) {
+ case StateValues.PROCESS_STATUS_WAIT_BLOCKED:
+ return State.WAIT_BLOCKED;
+ case StateValues.PROCESS_STATUS_WAIT_FOR_CPU:
+ return State.WAIT_FOR_CPU;
+ case StateValues.PROCESS_STATUS_RUN_USERMODE:
+ return State.USERMODE;
+ case StateValues.PROCESS_STATUS_RUN_SYSCALL:
+ return State.SYSCALL;
+ case StateValues.PROCESS_STATUS_INTERRUPTED:
+ return State.INTERRUPTED;
+ default:
+ return State.UNKNOWN;
+ }
+ }
+
+ @Override
+ public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
+ Map<String, String> retMap = new LinkedHashMap<>();
+ if (!(event instanceof TimeEvent) || !((TimeEvent) event).hasValue() ||
+ !(event.getEntry() instanceof ControlFlowEntry)) {
+ return retMap;
+ }
+ ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ return retMap;
+ }
+ int tid = entry.getThreadId();
+
+ try {
+ // Find every CPU first, then get the current thread
+ int cpusQuark = ssq.getQuarkAbsolute(Attributes.CPUS);
+ List<Integer> cpuQuarks = ssq.getSubAttributes(cpusQuark, false);
+ for (Integer cpuQuark : cpuQuarks) {
+ int currentThreadQuark = ssq.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+ ITmfStateInterval interval = ssq.querySingleState(event.getTime(), currentThreadQuark);
+ if (!interval.getStateValue().isNull()) {
+ ITmfStateValue state = interval.getStateValue();
+ int currentThreadId = state.unboxInt();
+ if (tid == currentThreadId) {
+ retMap.put(Messages.ControlFlowView_attributeCpuName, ssq.getAttributeName(cpuQuark));
+ break;
+ }
+ }
+ }
+
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ int status = ((TimeEvent) event).getValue();
+ if (status == StateValues.PROCESS_STATUS_RUN_SYSCALL) {
+ try {
+ int syscallQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
+ ITmfStateInterval value = ssq.querySingleState(event.getTime(), syscallQuark);
+ if (!value.getStateValue().isNull()) {
+ ITmfStateValue state = value.getStateValue();
+ retMap.put(Messages.ControlFlowView_attributeSyscallName, state.toString());
+ }
+
+ } catch (AttributeNotFoundException | TimeRangeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }
+
+ return retMap;
+ }
+
+ @Override
+ public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
+ if (bounds.width <= gc.getFontMetrics().getAverageCharWidth()) {
+ return;
+ }
+ if (!(event instanceof TimeEvent)) {
+ return;
+ }
+ ControlFlowEntry entry = (ControlFlowEntry) event.getEntry();
+ ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ss == null) {
+ return;
+ }
+ int status = ((TimeEvent) event).getValue();
+
+ if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL) {
+ return;
+ }
+ try {
+ int syscallQuark = ss.getQuarkRelative(entry.getThreadQuark(), Attributes.SYSTEM_CALL);
+ ITmfStateInterval value = ss.querySingleState(event.getTime(), syscallQuark);
+ if (!value.getStateValue().isNull()) {
+ ITmfStateValue state = value.getStateValue();
+ gc.setForeground(gc.getDevice().getSystemColor(SWT.COLOR_WHITE));
+ Utils.drawText(gc, state.toString().substring(4), bounds.x, bounds.y - 2, bounds.width, true, true);
+ }
+ } catch (AttributeNotFoundException | TimeRangeException e) {
+ Activator.getDefault().logError("Error in ControlFlowPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Patrick Tasse - Initial API and implementation
+ * Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
+import org.eclipse.linuxtools.tmf.ui.views.timegraph.AbstractTimeGraphView;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ILinkEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeLinkEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
+
+/**
+ * The Control Flow view main object
+ *
+ */
+public class ControlFlowView extends AbstractTimeGraphView {
+
+ // ------------------------------------------------------------------------
+ // Constants
+ // ------------------------------------------------------------------------
+
+ /**
+ * View ID.
+ */
+ public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.controlflow"; //$NON-NLS-1$
+
+ private static final String PROCESS_COLUMN = Messages.ControlFlowView_processColumn;
+ private static final String TID_COLUMN = Messages.ControlFlowView_tidColumn;
+ private static final String PTID_COLUMN = Messages.ControlFlowView_ptidColumn;
+ private static final String BIRTH_TIME_COLUMN = Messages.ControlFlowView_birthTimeColumn;
+ private static final String TRACE_COLUMN = Messages.ControlFlowView_traceColumn;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ PROCESS_COLUMN,
+ TID_COLUMN,
+ PTID_COLUMN,
+ BIRTH_TIME_COLUMN,
+ TRACE_COLUMN
+ };
+
+ private static final String[] FILTER_COLUMN_NAMES = new String[] {
+ PROCESS_COLUMN,
+ TID_COLUMN
+ };
+
+ // Timeout between updates in the build thread in ms
+ private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ */
+ public ControlFlowView() {
+ super(ID, new ControlFlowPresentationProvider());
+ setTreeColumns(COLUMN_NAMES);
+ setTreeLabelProvider(new ControlFlowTreeLabelProvider());
+ setFilterColumns(FILTER_COLUMN_NAMES);
+ setFilterLabelProvider(new ControlFlowFilterLabelProvider());
+ setEntryComparator(new ControlFlowEntryComparator());
+ }
+
+ @Override
+ protected void fillLocalToolBar(IToolBarManager manager) {
+ super.fillLocalToolBar(manager);
+ IDialogSettings settings = Activator.getDefault().getDialogSettings();
+ IDialogSettings section = settings.getSection(getClass().getName());
+ if (section == null) {
+ section = settings.addNewSection(getClass().getName());
+ }
+
+ IAction hideArrowsAction = getTimeGraphCombo().getTimeGraphViewer().getHideArrowsAction(section);
+ manager.add(hideArrowsAction);
+
+ IAction followArrowBwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowBwdAction();
+ followArrowBwdAction.setText(Messages.ControlFlowView_followCPUBwdText);
+ followArrowBwdAction.setToolTipText(Messages.ControlFlowView_followCPUBwdText);
+ manager.add(followArrowBwdAction);
+
+ IAction followArrowFwdAction = getTimeGraphCombo().getTimeGraphViewer().getFollowArrowFwdAction();
+ followArrowFwdAction.setText(Messages.ControlFlowView_followCPUFwdText);
+ followArrowFwdAction.setToolTipText(Messages.ControlFlowView_followCPUFwdText);
+ manager.add(followArrowFwdAction);
+ }
+
+ @Override
+ protected String getNextText() {
+ return Messages.ControlFlowView_nextProcessActionNameText;
+ }
+
+ @Override
+ protected String getNextTooltip() {
+ return Messages.ControlFlowView_nextProcessActionToolTipText;
+ }
+
+ @Override
+ protected String getPrevText() {
+ return Messages.ControlFlowView_previousProcessActionNameText;
+ }
+
+ @Override
+ protected String getPrevTooltip() {
+ return Messages.ControlFlowView_previousProcessActionToolTipText;
+ }
+
+ private static class ControlFlowEntryComparator implements Comparator<ITimeGraphEntry> {
+
+ @Override
+ public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
+
+ int result = 0;
+
+ if ((o1 instanceof ControlFlowEntry) && (o2 instanceof ControlFlowEntry)) {
+ ControlFlowEntry entry1 = (ControlFlowEntry) o1;
+ ControlFlowEntry entry2 = (ControlFlowEntry) o2;
+ result = entry1.getTrace().getStartTime().compareTo(entry2.getTrace().getStartTime());
+ if (result == 0) {
+ result = entry1.getTrace().getName().compareTo(entry2.getTrace().getName());
+ }
+ if (result == 0) {
+ result = entry1.getThreadId() < entry2.getThreadId() ? -1 : entry1.getThreadId() > entry2.getThreadId() ? 1 : 0;
+ }
+ }
+
+ if (result == 0) {
+ result = o1.getStartTime() < o2.getStartTime() ? -1 : o1.getStartTime() > o2.getStartTime() ? 1 : 0;
+ }
+
+ return result;
+ }
+ }
+
+ /**
+ * @author gbastien
+ *
+ */
+ protected static class ControlFlowTreeLabelProvider extends TreeLabelProvider {
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ ControlFlowEntry entry = (ControlFlowEntry) element;
+
+ if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_processColumn)) {
+ return entry.getName();
+ } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_tidColumn)) {
+ return Integer.toString(entry.getThreadId());
+ } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_ptidColumn)) {
+ if (entry.getParentThreadId() > 0) {
+ return Integer.toString(entry.getParentThreadId());
+ }
+ } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_birthTimeColumn)) {
+ return Utils.formatTime(entry.getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC);
+ } else if (COLUMN_NAMES[columnIndex].equals(Messages.ControlFlowView_traceColumn)) {
+ return entry.getTrace().getName();
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+ private static class ControlFlowFilterLabelProvider extends TreeLabelProvider {
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ ControlFlowEntry entry = (ControlFlowEntry) element;
+
+ if (columnIndex == 0) {
+ return entry.getName();
+ } else if (columnIndex == 1) {
+ return Integer.toString(entry.getThreadId());
+ }
+ return ""; //$NON-NLS-1$
+ }
+
+ }
+
+ // ------------------------------------------------------------------------
+ // Internal
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void buildEventList(final ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
+ if (trace == null) {
+ return;
+ }
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ return;
+ }
+
+ List<ControlFlowEntry> entryList = new ArrayList<>();
+ Map<Integer, ControlFlowEntry> entryMap = new HashMap<>();
+
+ long start = ssq.getStartTime();
+ setStartTime(Math.min(getStartTime(), start));
+
+ boolean complete = false;
+ while (!complete) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+ if (ssq.isCancelled()) {
+ return;
+ }
+ long end = ssq.getCurrentEndTime();
+ if (start == end && !complete) { // when complete execute one last time regardless of end time
+ continue;
+ }
+ setEndTime(Math.max(getEndTime(), end + 1));
+ List<Integer> threadQuarks = ssq.getQuarks(Attributes.THREADS, "*"); //$NON-NLS-1$
+ for (int threadQuark : threadQuarks) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ String threadName = ssq.getAttributeName(threadQuark);
+ int threadId = -1;
+ try {
+ threadId = Integer.parseInt(threadName);
+ } catch (NumberFormatException e1) {
+ continue;
+ }
+ if (threadId <= 0) { // ignore the 'unknown' (-1) and swapper (0) threads
+ continue;
+ }
+
+ int execNameQuark;
+ List<ITmfStateInterval> execNameIntervals;
+ try {
+ execNameQuark = ssq.getQuarkRelative(threadQuark, Attributes.EXEC_NAME);
+ execNameIntervals = ssq.queryHistoryRange(execNameQuark, start, end);
+ } catch (AttributeNotFoundException e) {
+ /* No information on this thread (yet?), skip it for now */
+ continue;
+ } catch (StateSystemDisposedException e) {
+ /* State system is closing down, no point continuing */
+ break;
+ }
+
+ for (ITmfStateInterval execNameInterval : execNameIntervals) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ ControlFlowEntry entry = entryMap.get(threadId);
+ if (!execNameInterval.getStateValue().isNull() &&
+ execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
+ String execName = execNameInterval.getStateValue().unboxStr();
+ long startTime = execNameInterval.getStartTime();
+ long endTime = execNameInterval.getEndTime() + 1;
+ if (entry == null) {
+ ITmfStateInterval ppidInterval = null;
+ try {
+ int ppidQuark = ssq.getQuarkRelative(threadQuark, Attributes.PPID);
+ ppidInterval = ssq.querySingleState(startTime, ppidQuark);
+ } catch (AttributeNotFoundException e) {
+ /* No info, keep PPID at -1 */
+ } catch (StateSystemDisposedException e) {
+ /* SS is closing down, time to bail */
+ break;
+ }
+ int ppid = -1;
+ if (!(ppidInterval == null) && !ppidInterval.getStateValue().isNull()) {
+ ppid = ppidInterval.getStateValue().unboxInt();
+ }
+ entry = new ControlFlowEntry(threadQuark, trace, execName, threadId, ppid, startTime, endTime);
+ entryList.add(entry);
+ entryMap.put(threadId, entry);
+ } else {
+ // update the name of the entry to the latest
+ // execName
+ entry.setName(execName);
+ entry.updateEndTime(endTime);
+ }
+ } else {
+ entryMap.remove(threadId);
+ }
+ }
+ }
+
+ updateTree(entryList, parentTrace);
+
+ if (parentTrace.equals(getTrace())) {
+ refresh();
+ }
+
+ for (ControlFlowEntry entry : entryList) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ buildStatusEvents(entry.getTrace(), entry, monitor, start, end);
+ }
+
+ start = end;
+ }
+ }
+
+ private void updateTree(List<ControlFlowEntry> entryList, ITmfTrace parentTrace) {
+ List<TimeGraphEntry> rootListToAdd = new ArrayList<>();
+ List<TimeGraphEntry> rootListToRemove = new ArrayList<>();
+ List<TimeGraphEntry> rootList = getEntryList(parentTrace);
+
+ for (ControlFlowEntry entry : entryList) {
+ boolean root = (entry.getParent() == null);
+ if (root && entry.getParentThreadId() > 0) {
+ for (ControlFlowEntry parent : entryList) {
+ if (parent.getThreadId() == entry.getParentThreadId() &&
+ entry.getStartTime() >= parent.getStartTime() &&
+ entry.getStartTime() <= parent.getEndTime()) {
+ parent.addChild(entry);
+ root = false;
+ if (rootList != null && rootList.contains(entry)) {
+ rootListToRemove.add(entry);
+ }
+ break;
+ }
+ }
+ }
+ if (root && (rootList == null || !rootList.contains(entry))) {
+ rootListToAdd.add(entry);
+ }
+ }
+
+ addToEntryList(parentTrace, rootListToAdd);
+ removeFromEntryList(parentTrace, rootListToRemove);
+ }
+
+ private void buildStatusEvents(ITmfTrace trace, ControlFlowEntry entry, IProgressMonitor monitor, long start, long end) {
+ if (start < entry.getEndTime() && end > entry.getStartTime()) {
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ return;
+ }
+
+ long startTime = Math.max(start, entry.getStartTime());
+ long endTime = Math.min(end + 1, entry.getEndTime());
+ long resolution = Math.max(1, (end - ssq.getStartTime()) / getDisplayWidth());
+ List<ITimeEvent> eventList = getEventList(entry, startTime, endTime, resolution, monitor);
+ if (eventList == null) {
+ return;
+ }
+ for (ITimeEvent event : eventList) {
+ entry.addEvent(event);
+ }
+ if (trace.equals(getTrace())) {
+ redraw();
+ }
+ }
+ for (ITimeGraphEntry child : entry.getChildren()) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ buildStatusEvents(trace, (ControlFlowEntry) child, monitor, start, end);
+ }
+ }
+
+ @Override
+ protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry tgentry, long startTime, long endTime, long resolution, IProgressMonitor monitor) {
+ List<ITimeEvent> eventList = null;
+ if (!(tgentry instanceof ControlFlowEntry)) {
+ return eventList;
+ }
+ ControlFlowEntry entry = (ControlFlowEntry) tgentry;
+ final long realStart = Math.max(startTime, entry.getStartTime());
+ final long realEnd = Math.min(endTime, entry.getEndTime());
+ if (realEnd <= realStart) {
+ return null;
+ }
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ return null;
+ }
+ try {
+ int statusQuark = ssq.getQuarkRelative(entry.getThreadQuark(), Attributes.STATUS);
+ List<ITmfStateInterval> statusIntervals = ssq.queryHistoryRange(statusQuark, realStart, realEnd - 1, resolution, monitor);
+ eventList = new ArrayList<>(statusIntervals.size());
+ long lastEndTime = -1;
+ for (ITmfStateInterval statusInterval : statusIntervals) {
+ if (monitor.isCanceled()) {
+ return null;
+ }
+ long time = statusInterval.getStartTime();
+ long duration = statusInterval.getEndTime() - time + 1;
+ int status = -1;
+ try {
+ status = statusInterval.getStateValue().unboxInt();
+ } catch (StateValueTypeException e) {
+ e.printStackTrace();
+ }
+ if (lastEndTime != time && lastEndTime != -1) {
+ eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
+ }
+ eventList.add(new TimeEvent(entry, time, duration, status));
+ lastEndTime = time + duration;
+ }
+ } catch (AttributeNotFoundException | TimeRangeException e) {
+ e.printStackTrace();
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ return eventList;
+ }
+
+ /**
+ * Returns a value corresponding to the selected entry.
+ *
+ * Used in conjunction with synchingToTime to change the selected entry. If
+ * one of these methods is overridden in child class, then both should be.
+ *
+ * @param time
+ * The currently selected time
+ * @return a value identifying the entry
+ */
+ private int getSelectionValue(long time) {
+ int thread = -1;
+ ITmfTrace[] traces = TmfTraceManager.getTraceSet(getTrace());
+ if (traces == null) {
+ return thread;
+ }
+ for (ITmfTrace trace : traces) {
+ if (thread > 0) {
+ break;
+ }
+ if (trace == null) {
+ continue;
+ }
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ continue;
+ }
+ if (time >= ssq.getStartTime() && time <= ssq.getCurrentEndTime()) {
+ List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
+ for (int currentThreadQuark : currentThreadQuarks) {
+ try {
+ ITmfStateInterval currentThreadInterval = ssq.querySingleState(time, currentThreadQuark);
+ int currentThread = currentThreadInterval.getStateValue().unboxInt();
+ if (currentThread > 0) {
+ int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThread), Attributes.STATUS);
+ ITmfStateInterval statusInterval = ssq.querySingleState(time, statusQuark);
+ if (statusInterval.getStartTime() == time) {
+ thread = currentThread;
+ break;
+ }
+ }
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ e.printStackTrace();
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }
+ }
+ }
+ return thread;
+ }
+
+ @Override
+ protected void synchingToTime(long time) {
+ int selected = getSelectionValue(time);
+ if (selected > 0) {
+ for (Object element : getTimeGraphViewer().getExpandedElements()) {
+ if (element instanceof ControlFlowEntry) {
+ ControlFlowEntry entry = (ControlFlowEntry) element;
+ if (entry.getThreadId() == selected) {
+ getTimeGraphCombo().setSelection(entry);
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ protected List<ILinkEvent> getLinkList(long startTime, long endTime, long resolution, IProgressMonitor monitor) {
+ List<ILinkEvent> list = new ArrayList<>();
+ ITmfTrace[] traces = TmfTraceManager.getTraceSet(getTrace());
+ List<TimeGraphEntry> entryList = getEntryList(getTrace());
+ if (traces == null || entryList == null) {
+ return list;
+ }
+ for (ITmfTrace trace : traces) {
+ if (trace == null) {
+ continue;
+ }
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ continue;
+ }
+ try {
+ long start = Math.max(startTime, ssq.getStartTime());
+ long end = Math.min(endTime, ssq.getCurrentEndTime());
+ if (end < start) {
+ continue;
+ }
+ List<Integer> currentThreadQuarks = ssq.getQuarks(Attributes.CPUS, "*", Attributes.CURRENT_THREAD); //$NON-NLS-1$
+ for (int currentThreadQuark : currentThreadQuarks) {
+ // adjust the query range to include the previous and following intervals
+ long qstart = Math.max(ssq.querySingleState(start, currentThreadQuark).getStartTime() - 1, ssq.getStartTime());
+ long qend = Math.min(ssq.querySingleState(end, currentThreadQuark).getEndTime() + 1, ssq.getCurrentEndTime());
+ List<ITmfStateInterval> currentThreadIntervals = ssq.queryHistoryRange(currentThreadQuark, qstart, qend, resolution, monitor);
+ int prevThread = 0;
+ long prevEnd = 0;
+ long lastEnd = 0;
+ for (ITmfStateInterval currentThreadInterval : currentThreadIntervals) {
+ if (monitor.isCanceled()) {
+ return null;
+ }
+ long time = currentThreadInterval.getStartTime();
+ if (time != lastEnd) {
+ // don't create links where there are gaps in intervals due to the resolution
+ prevThread = 0;
+ prevEnd = 0;
+ }
+ int thread = currentThreadInterval.getStateValue().unboxInt();
+ if (thread > 0 && prevThread > 0) {
+ ITimeGraphEntry prevEntry = findEntry(entryList, trace, prevThread);
+ ITimeGraphEntry nextEntry = findEntry(entryList, trace, thread);
+ list.add(new TimeLinkEvent(prevEntry, nextEntry, prevEnd, time - prevEnd, 0));
+ }
+ lastEnd = currentThreadInterval.getEndTime() + 1;
+ if (thread != 0) {
+ prevThread = thread;
+ prevEnd = lastEnd;
+ }
+ }
+ }
+ } catch (TimeRangeException | AttributeNotFoundException | StateValueTypeException e) {
+ e.printStackTrace();
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }
+ return list;
+ }
+
+ private ControlFlowEntry findEntry(List<? extends ITimeGraphEntry> entryList, ITmfTrace trace, int threadId) {
+ for (ITimeGraphEntry entry : entryList) {
+ if (entry instanceof ControlFlowEntry) {
+ ControlFlowEntry controlFlowEntry = (ControlFlowEntry) entry;
+ if (controlFlowEntry.getThreadId() == threadId && controlFlowEntry.getTrace() == trace) {
+ return controlFlowEntry;
+ } else if (entry.hasChildren()) {
+ controlFlowEntry = findEntry(entry.getChildren(), trace, threadId);
+ if (controlFlowEntry != null) {
+ return controlFlowEntry;
+ }
+ }
+ }
+ }
+ return null;
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.lttng2.kernel.core.cpuusage.LttngKernelCpuUsageAnalysis;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.AbstractTmfTreeViewer;
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.ITmfTreeColumnDataProvider;
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.ITmfTreeViewerEntry;
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeColumnData;
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeColumnData.ITmfColumnPercentageProvider;
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeViewerEntry;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Tree viewer to display CPU usage information in a specified time range. It
+ * shows the process's TID, its name, the time spent on the CPU during that
+ * range, in % and absolute value.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageComposite extends AbstractTmfTreeViewer {
+
+ // Timeout between to wait for in the updateElements method
+ private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+ private LttngKernelCpuUsageAnalysis fModule = null;
+ private String fSelectedThread = null;
+
+ private static final String[] COLUMN_NAMES = new String[] {
+ Messages.CpuUsageComposite_ColumnTID,
+ Messages.CpuUsageComposite_ColumnProcess,
+ Messages.CpuUsageComposite_ColumnPercent,
+ Messages.CpuUsageComposite_ColumnTime
+ };
+
+ /* A map that saves the mapping of a thread ID to its executable name */
+ private final Map<String, String> fProcessNameMap = new HashMap<>();
+
+ /** Provides label for the CPU usage tree viewer cells */
+ protected static class CpuLabelProvider extends TreeLabelProvider {
+
+ @Override
+ public String getColumnText(Object element, int columnIndex) {
+ CpuUsageEntry obj = (CpuUsageEntry) element;
+ if (columnIndex == 0) {
+ return obj.getTid();
+ } else if (columnIndex == 1) {
+ return obj.getProcessName();
+ } else if (columnIndex == 2) {
+ return String.format(Messages.CpuUsageComposite_TextPercent, obj.getPercent());
+ } else if (columnIndex == 3) {
+ return NLS.bind(Messages.CpuUsageComposite_TextTime, obj.getTime());
+ }
+
+ return element.toString();
+ }
+
+ }
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * The parent composite that holds this viewer
+ */
+ public CpuUsageComposite(Composite parent) {
+ super(parent, false);
+ setLabelProvider(new CpuLabelProvider());
+ }
+
+ @Override
+ protected ITmfTreeColumnDataProvider getColumnDataProvider() {
+ return new ITmfTreeColumnDataProvider() {
+
+ @Override
+ public List<TmfTreeColumnData> getColumnData() {
+ /* All columns are sortable */
+ List<TmfTreeColumnData> columns = new ArrayList<>();
+ TmfTreeColumnData column = new TmfTreeColumnData(COLUMN_NAMES[0]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ CpuUsageEntry n1 = (CpuUsageEntry) e1;
+ CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+ return n1.getTid().compareTo(n2.getTid());
+
+ }
+ });
+ columns.add(column);
+ column = new TmfTreeColumnData(COLUMN_NAMES[1]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ CpuUsageEntry n1 = (CpuUsageEntry) e1;
+ CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+ return n1.getProcessName().compareTo(n2.getProcessName());
+
+ }
+ });
+ columns.add(column);
+ column = new TmfTreeColumnData(COLUMN_NAMES[2]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ CpuUsageEntry n1 = (CpuUsageEntry) e1;
+ CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+ return n1.getPercent().compareTo(n2.getPercent());
+
+ }
+ });
+ column.setPercentageProvider(new ITmfColumnPercentageProvider() {
+
+ @Override
+ public double getPercentage(Object data) {
+ CpuUsageEntry parent = (CpuUsageEntry) data;
+ return parent.getPercent() / 100;
+ }
+ });
+ columns.add(column);
+ column = new TmfTreeColumnData(COLUMN_NAMES[3]);
+ column.setComparator(new ViewerComparator() {
+ @Override
+ public int compare(Viewer viewer, Object e1, Object e2) {
+ CpuUsageEntry n1 = (CpuUsageEntry) e1;
+ CpuUsageEntry n2 = (CpuUsageEntry) e2;
+
+ return n1.getTime().compareTo(n2.getTime());
+
+ }
+ });
+ columns.add(column);
+
+ return columns;
+ }
+
+ };
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected void contentChanged(ITmfTreeViewerEntry rootEntry) {
+ String selectedThread = fSelectedThread;
+ if (selectedThread != null) {
+ /* Find the selected thread among the inputs */
+ for (ITmfTreeViewerEntry entry : rootEntry.getChildren()) {
+ if (entry instanceof CpuUsageEntry) {
+ if (selectedThread.equals(((CpuUsageEntry) entry).getTid())) {
+ @SuppressWarnings("null")
+ @NonNull List<ITmfTreeViewerEntry> list = Collections.singletonList(entry);
+ super.setSelection(list);
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void initializeDataSource() {
+ fModule = getTrace().getAnalysisModuleOfClass(LttngKernelCpuUsageAnalysis.class, LttngKernelCpuUsageAnalysis.ID);
+ if (fModule == null) {
+ return;
+ }
+ fModule.schedule();
+ fModule.waitForInitialization();
+ fProcessNameMap.clear();
+ }
+
+ @Override
+ protected ITmfTreeViewerEntry updateElements(long start, long end, boolean isSelection) {
+ if (isSelection || (start == end)) {
+ return null;
+ }
+ if (getTrace() == null || fModule == null) {
+ return null;
+ }
+ fModule.waitForInitialization();
+ ITmfStateSystem ss = fModule.getStateSystem();
+ if (ss == null) {
+ return null;
+ }
+
+ boolean complete = false;
+ long currentEnd = start;
+
+ while (!complete && currentEnd < end) {
+ complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+ currentEnd = ss.getCurrentEndTime();
+ }
+
+ /* Initialize the data */
+ Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, getStartTime()), Math.min(end, getEndTime()));
+
+ TmfTreeViewerEntry root = new TmfTreeViewerEntry(""); //$NON-NLS-1$
+ List<ITmfTreeViewerEntry> entryList = root.getChildren();
+
+ for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
+ /*
+ * Process only entries representing the total of all CPUs and that
+ * have time on CPU
+ */
+ if (entry.getValue() == 0) {
+ continue;
+ }
+ if (!entry.getKey().startsWith(LttngKernelCpuUsageAnalysis.TOTAL)) {
+ continue;
+ }
+ String[] strings = entry.getKey().split(LttngKernelCpuUsageAnalysis.SPLIT_STRING, 2);
+
+ if ((strings.length > 1) && !(strings[1].equals(LttngKernelCpuUsageAnalysis.TID_ZERO))) {
+ CpuUsageEntry obj = new CpuUsageEntry(strings[1], getProcessName(strings[1]), (double) entry.getValue() / (double) (end - start) * 100, entry.getValue());
+ entryList.add(obj);
+ }
+ }
+
+ return root;
+ }
+
+ /*
+ * Get the process name from its TID by using the LTTng kernel analysis
+ * module
+ */
+ private String getProcessName(String tid) {
+ String execName = fProcessNameMap.get(tid);
+ if (execName != null) {
+ return execName;
+ }
+ ITmfTrace trace = getTrace();
+ if (trace == null) {
+ return tid;
+ }
+ ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
+ if (kernelSs == null) {
+ return tid;
+ }
+
+ try {
+ int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS);
+
+ /* Get the quarks for each cpu */
+ List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false);
+
+ for (Integer tidQuark : cpuNodes) {
+ if (kernelSs.getAttributeName(tidQuark).equals(tid)) {
+ int execNameQuark;
+ List<ITmfStateInterval> execNameIntervals;
+ try {
+ execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME);
+ execNameIntervals = kernelSs.queryHistoryRange(execNameQuark, getStartTime(), getEndTime());
+ } catch (AttributeNotFoundException e) {
+ /* No information on this thread (yet?), skip it for now */
+ continue;
+ } catch (StateSystemDisposedException e) {
+ /* State system is closing down, no point continuing */
+ break;
+ }
+
+ for (ITmfStateInterval execNameInterval : execNameIntervals) {
+ if (!execNameInterval.getStateValue().isNull() &&
+ execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) {
+ execName = execNameInterval.getStateValue().unboxStr();
+ fProcessNameMap.put(tid, execName);
+ return execName;
+ }
+ }
+ }
+ }
+
+ } catch (AttributeNotFoundException e) {
+ /* can't find the process name, just return the tid instead */
+ }
+ return tid;
+ }
+
+ /**
+ * Set the currently selected thread ID
+ *
+ * @param tid
+ * The selected thread ID
+ */
+ public void setSelectedThread(String tid) {
+ fSelectedThread = tid;
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
+
+import org.eclipse.linuxtools.tmf.ui.viewers.tree.TmfTreeViewerEntry;
+
+/**
+ * Represents an entry in the tree viewer of the CPU usage view. An entry is a
+ * thread that occupied part of the CPU in the selected time range.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageEntry extends TmfTreeViewerEntry {
+ private final String fTid;
+ private final String fProcessName;
+ private final Double fPercent;
+ private final Long fTime;
+
+ /**
+ * Constructor
+ *
+ * @param tid
+ * The TID of the process
+ * @param name
+ * The thread's name
+ * @param percent
+ * The percentage CPU usage
+ * @param time
+ * The total amount of time spent on CPU
+ */
+ public CpuUsageEntry(String tid, String name, double percent, long time) {
+ super(tid);
+ fTid = tid;
+ fProcessName = name;
+ fPercent = percent;
+ fTime = time;
+ }
+
+ /**
+ * Get the TID of the thread represented by this entry
+ *
+ * @return The thread's TID
+ */
+ public String getTid() {
+ return fTid;
+ }
+
+ /**
+ * Get the process name
+ *
+ * @return The process name
+ */
+ public String getProcessName() {
+ return fProcessName;
+ }
+
+ /**
+ * Get the percentage of time spent on CPU in the time interval represented
+ * by this entry.
+ *
+ * @return The percentage of time spent on CPU
+ */
+ public Double getPercent() {
+ return fPercent;
+ }
+
+ /**
+ * Get the total time spent on CPU in the time interval represented by this
+ * entry.
+ *
+ * @return The total time spent on CPU
+ */
+ public Long getTime() {
+ return fTime;
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
+
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.views.TmfView;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * CPU usage view. It contains 2 viewers: one tree viewer showing all the
+ * threads who were on the CPU in the time range, and one XY chart viewer
+ * plotting the total time spent on CPU and the time of the threads selected in
+ * the tree viewer.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageView extends TmfView {
+
+ /** ID string */
+ public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.cpuusage"; //$NON-NLS-1$
+
+ private CpuUsageComposite fTreeViewer = null;
+ private CpuUsageXYViewer fXYViewer = null;
+
+ /**
+ * Constructor
+ */
+ public CpuUsageView() {
+ super(Messages.CpuUsageView_Title);
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+
+ final SashForm sash = new SashForm(parent, SWT.NONE);
+
+ fTreeViewer = new CpuUsageComposite(sash);
+
+ /* Build the XY chart part of the view */
+ fXYViewer = new CpuUsageXYViewer(sash);
+
+ /* Add selection listener to tree viewer */
+ fTreeViewer.addSelectionChangeListener(new ISelectionChangedListener() {
+ @Override
+ public void selectionChanged(SelectionChangedEvent event) {
+ ISelection selection = event.getSelection();
+ if (selection instanceof IStructuredSelection) {
+ Object structSelection = ((IStructuredSelection) selection).getFirstElement();
+ if (structSelection instanceof CpuUsageEntry) {
+ CpuUsageEntry entry = (CpuUsageEntry) structSelection;
+ fTreeViewer.setSelectedThread(entry.getTid());
+ fXYViewer.setSelectedThread(Long.valueOf(entry.getTid()));
+ }
+ }
+ }
+ });
+
+ sash.setLayout(new FillLayout());
+
+ /* Initialize the viewers with the currently selected trace */
+ ITmfTrace trace = getActiveTrace();
+ if (trace != null) {
+ TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace);
+ fTreeViewer.traceSelected(signal);
+ fXYViewer.traceSelected(signal);
+ }
+
+ }
+
+ @Override
+ public void setFocus() {
+ }
+
+ @Override
+ public void dispose() {
+ super.dispose();
+ if (fTreeViewer != null) {
+ fTreeViewer.dispose();
+ }
+ if (fXYViewer != null) {
+ fXYViewer.dispose();
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
+import org.eclipse.linuxtools.lttng2.kernel.core.cpuusage.LttngKernelCpuUsageAnalysis;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.tmf.ui.viewers.xycharts.linecharts.TmfCommonXLineChartViewer;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * CPU usage viewer with XY line chart. It displays the total CPU usage and that
+ * of the threads selected in the CPU usage tree viewer.
+ *
+ * @author Geneviève Bastien
+ */
+public class CpuUsageXYViewer extends TmfCommonXLineChartViewer {
+
+ private LttngKernelCpuUsageAnalysis fModule = null;
+
+ /* Maps a thread ID to a list of y values */
+ private final Map<String, double[]> fYValues = new LinkedHashMap<>();
+ /*
+ * To avoid up and downs CPU usage when process is in and out of CPU
+ * frequently, use a smaller resolution to get better averages.
+ */
+ private static final double RESOLUTION = 0.4;
+
+ // Timeout between updates in the updateData thread
+ private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+ private long fSelectedThread = -1;
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * parent composite
+ */
+ public CpuUsageXYViewer(Composite parent) {
+ super(parent, Messages.CpuUsageXYViewer_Title, Messages.CpuUsageXYViewer_TimeXAxis, Messages.CpuUsageXYViewer_CpuYAxis);
+ setResolution(RESOLUTION);
+ }
+
+ @Override
+ protected void initializeDataSource() {
+ if (getTrace() != null) {
+ fModule = getTrace().getAnalysisModuleOfClass(LttngKernelCpuUsageAnalysis.class, LttngKernelCpuUsageAnalysis.ID);
+ if (fModule == null) {
+ return;
+ }
+ fModule.schedule();
+ }
+ }
+
+ private static double[] zeroFill(int nb) {
+ double[] arr = new double[nb];
+ Arrays.fill(arr, 0.0);
+ return arr;
+ }
+
+ @Override
+ protected void updateData(long start, long end, int nb, IProgressMonitor monitor) {
+ try {
+ if (getTrace() == null || fModule == null) {
+ return;
+ }
+ fModule.waitForInitialization();
+ ITmfStateSystem ss = fModule.getStateSystem();
+ if (ss == null) {
+ return;
+ }
+ double[] xvalues = getXAxis(start, end, nb);
+ if (xvalues.length == 0) {
+ return;
+ }
+ setXAxis(xvalues);
+
+ boolean complete = false;
+ long currentEnd = start;
+
+ while (!complete && currentEnd < end) {
+
+ if (monitor.isCanceled()) {
+ return;
+ }
+
+ long traceStart = getStartTime();
+ long traceEnd = getEndTime();
+ long offset = getTimeOffset();
+ long selectedThread = fSelectedThread;
+
+ complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+ currentEnd = ss.getCurrentEndTime();
+
+ /* Initialize the data */
+ Map<String, Long> cpuUsageMap = fModule.getCpuUsageInRange(Math.max(start, traceStart), Math.min(end, traceEnd));
+ Map<String, String> totalEntries = new HashMap<>();
+ fYValues.clear();
+ fYValues.put(Messages.CpuUsageXYViewer_Total, zeroFill(xvalues.length));
+ String stringSelectedThread = Long.toString(selectedThread);
+ if (selectedThread != -1) {
+ fYValues.put(stringSelectedThread, zeroFill(xvalues.length));
+ }
+
+ for (Entry<String, Long> entry : cpuUsageMap.entrySet()) {
+ /*
+ * Process only entries representing the total of all CPUs
+ * and that have time on CPU
+ */
+ if (entry.getValue() == 0) {
+ continue;
+ }
+ if (!entry.getKey().startsWith(LttngKernelCpuUsageAnalysis.TOTAL)) {
+ continue;
+ }
+ String[] strings = entry.getKey().split(LttngKernelCpuUsageAnalysis.SPLIT_STRING, 2);
+
+ if ((strings.length > 1) && !(strings[1].equals(LttngKernelCpuUsageAnalysis.TID_ZERO))) {
+ /* This is the total cpu usage for a thread */
+ totalEntries.put(strings[1], entry.getKey());
+ }
+ }
+
+ double prevX = xvalues[0];
+ long prevTime = (long) prevX + offset;
+ /*
+ * make sure that time is in the trace range after double to
+ * long conversion
+ */
+ prevTime = Math.max(traceStart, prevTime);
+ prevTime = Math.min(traceEnd, prevTime);
+ /* Get CPU usage statistics for each x value */
+ for (int i = 1; i < xvalues.length; i++) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ long totalCpu = 0;
+ double x = xvalues[i];
+ long time = (long) x + offset;
+ time = Math.max(traceStart, time);
+ time = Math.min(traceEnd, time);
+
+ cpuUsageMap = fModule.getCpuUsageInRange(prevTime, time);
+
+ /*
+ * Calculate the sum of all total entries, and add a data
+ * point to the selected one
+ */
+ for (Entry<String, String> entry : totalEntries.entrySet()) {
+ Long cpuEntry = cpuUsageMap.get(entry.getValue());
+ cpuEntry = cpuEntry != null ? cpuEntry : 0L;
+
+ totalCpu += cpuEntry;
+
+ if (entry.getKey().equals(stringSelectedThread)) {
+ /* This is the total cpu usage for a thread */
+ fYValues.get(entry.getKey())[i] = (double) cpuEntry / (double) (time - prevTime) * 100;
+ }
+
+ }
+ fYValues.get(Messages.CpuUsageXYViewer_Total)[i] = (double) totalCpu / (double) (time - prevTime) * 100;
+ prevTime = time;
+ }
+ for (Entry<String, double[]> entry : fYValues.entrySet()) {
+ setSeries(entry.getKey(), entry.getValue());
+ }
+ if (monitor.isCanceled()) {
+ return;
+ }
+ updateDisplay();
+ }
+ } catch (StateValueTypeException e) {
+ Activator.getDefault().logError("Error updating the data of the CPU usage view", e); //$NON-NLS-1$
+ }
+
+ }
+
+ /**
+ * Set the selected thread ID, which will be graphed in this viewer
+ *
+ * @param tid
+ * The selected thread ID
+ */
+ public void setSelectedThread(long tid) {
+ cancelUpdate();
+ deleteSeries(Long.toString(fSelectedThread));
+ fSelectedThread = tid;
+ updateContent();
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Messages used in the LTTng kernel CPU usage view and viewers.
+ *
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.cpuusage.messages"; //$NON-NLS-1$
+ public static String CpuUsageComposite_ColumnPercent;
+ public static String CpuUsageComposite_ColumnProcess;
+ public static String CpuUsageComposite_ColumnTID;
+ public static String CpuUsageComposite_ColumnTime;
+ public static String CpuUsageComposite_TextPercent;
+ public static String CpuUsageComposite_TextTime;
+ public static String CpuUsageView_Title;
+ public static String CpuUsageXYViewer_CpuYAxis;
+ public static String CpuUsageXYViewer_TimeXAxis;
+ public static String CpuUsageXYViewer_Title;
+ public static String CpuUsageXYViewer_Total;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2014 École Polytechnique de Montréal
+#
+# 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:
+# Geneviève Bastien - Initial API and implementation
+###############################################################################
+
+CpuUsageComposite_ColumnPercent=%
+CpuUsageComposite_ColumnProcess=Process
+CpuUsageComposite_ColumnTID=TID
+CpuUsageComposite_ColumnTime=Time
+CpuUsageComposite_TextPercent=%1$.3f %%
+CpuUsageComposite_TextTime={0} ns
+CpuUsageView_Title=CPU Usage
+CpuUsageXYViewer_CpuYAxis=% CPU
+CpuUsageXYViewer_TimeXAxis=Time
+CpuUsageXYViewer_Title=CPU usage
+CpuUsageXYViewer_Total=Total
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Patrick Tasse - Initial API and implementation
+ * Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+
+/**
+ * An entry, or row, in the resource view
+ *
+ * @author Patrick Tasse
+ */
+public class ResourcesEntry extends TimeGraphEntry implements Comparable<ITimeGraphEntry> {
+
+ /** Type of resource */
+ public static enum Type {
+ /** Null resources (filler rows, etc.) */
+ NULL,
+ /** Entries for CPUs */
+ CPU,
+ /** Entries for IRQs */
+ IRQ,
+ /** Entries for Soft IRQ */
+ SOFT_IRQ
+ }
+
+ private final int fId;
+ private final @NonNull ITmfTrace fTrace;
+ private final Type fType;
+ private final int fQuark;
+
+ /**
+ * Constructor
+ *
+ * @param quark
+ * The attribute quark matching the entry
+ * @param trace
+ * The trace on which we are working
+ * @param name
+ * The exec_name of this entry
+ * @param startTime
+ * The start time of this entry lifetime
+ * @param endTime
+ * The end time of this entry
+ * @param type
+ * The type of this entry
+ * @param id
+ * The id of this entry
+ */
+ public ResourcesEntry(int quark, @NonNull ITmfTrace trace, String name,
+ long startTime, long endTime, Type type, int id) {
+ super(name, startTime, endTime);
+ fId = id;
+ fTrace = trace;
+ fType = type;
+ fQuark = quark;
+ }
+
+ /**
+ * Constructor
+ *
+ * @param trace
+ * The trace on which we are working
+ * @param name
+ * The exec_name of this entry
+ * @param startTime
+ * The start time of this entry lifetime
+ * @param endTime
+ * The end time of this entry
+ * @param id
+ * The id of this entry
+ */
+ public ResourcesEntry(@NonNull ITmfTrace trace, String name,
+ long startTime, long endTime, int id) {
+ this(-1, trace, name, startTime, endTime, Type.NULL, id);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param quark
+ * The attribute quark matching the entry
+ * @param trace
+ * The trace on which we are working
+ * @param startTime
+ * The start time of this entry lifetime
+ * @param endTime
+ * The end time of this entry
+ * @param type
+ * The type of this entry
+ * @param id
+ * The id of this entry
+ */
+ public ResourcesEntry(int quark, @NonNull ITmfTrace trace,
+ long startTime, long endTime, Type type, int id) {
+ this(quark, trace, type.toString() + " " + id, startTime, endTime, type, id); //$NON-NLS-1$
+ }
+
+ /**
+ * Get the entry's id
+ *
+ * @return the entry's id
+ */
+ public int getId() {
+ return fId;
+ }
+
+ /**
+ * Get the entry's trace
+ *
+ * @return the entry's trace
+ */
+ public @NonNull ITmfTrace getTrace() {
+ return fTrace;
+ }
+
+ /**
+ * Get the entry Type of this entry. Uses the inner Type enum.
+ *
+ * @return The entry type
+ */
+ public Type getType() {
+ return fType;
+ }
+
+ /**
+ * Retrieve the attribute quark that's represented by this entry.
+ *
+ * @return The integer quark The attribute quark matching the entry
+ */
+ public int getQuark() {
+ return fQuark;
+ }
+
+ @Override
+ public boolean hasTimeEvents() {
+ if (fType == Type.NULL) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int compareTo(ITimeGraphEntry other) {
+ if (!(other instanceof ResourcesEntry)) {
+ /* Should not happen, but if it does, put those entries at the end */
+ return -1;
+ }
+ ResourcesEntry o = (ResourcesEntry) other;
+
+ /*
+ * Resources entry names should all be of type "ABC 123"
+ *
+ * We want to filter on the Type first (the "ABC" part), then on the ID
+ * ("123") in numerical order (so we get 1,2,10 and not 1,10,2).
+ */
+ int ret = this.getType().compareTo(o.getType());
+ if (ret != 0) {
+ return ret;
+ }
+ return Integer.compare(this.getId(), o.getId());
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Patrick Tasse - Initial API and implementation
+ * Geneviève Bastien - Move code to provide base classes for time graph view
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.StateValues;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Activator;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.StateItem;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.NullTimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.ITmfTimeGraphDrawingHelper;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.Resolution;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.graphics.RGB;
+import org.eclipse.swt.graphics.Rectangle;
+
+/**
+ * Presentation provider for the Resource view, based on the generic TMF
+ * presentation provider.
+ *
+ * @author Patrick Tasse
+ */
+public class ResourcesPresentationProvider extends TimeGraphPresentationProvider {
+
+ private long fLastThreadId = -1;
+ private Color fColorWhite;
+ private Color fColorGray;
+ private Integer fAverageCharWidth;
+
+ private enum State {
+ IDLE (new RGB(200, 200, 200)),
+ USERMODE (new RGB( 0, 200, 0)),
+ SYSCALL (new RGB( 0, 0, 200)),
+ IRQ (new RGB(200, 0, 100)),
+ SOFT_IRQ (new RGB(200, 150, 100)),
+ IRQ_ACTIVE (new RGB(200, 0, 100)),
+ SOFT_IRQ_RAISED (new RGB(200, 200, 0)),
+ SOFT_IRQ_ACTIVE (new RGB(200, 150, 100));
+
+ public final RGB rgb;
+
+ private State(RGB rgb) {
+ this.rgb = rgb;
+ }
+ }
+
+ /**
+ * Default constructor
+ */
+ public ResourcesPresentationProvider() {
+ super();
+ }
+
+ private static State[] getStateValues() {
+ return State.values();
+ }
+
+ private static State getEventState(TimeEvent event) {
+ if (event.hasValue()) {
+ ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+ int value = event.getValue();
+
+ if (entry.getType() == Type.CPU) {
+ if (value == StateValues.CPU_STATUS_IDLE) {
+ return State.IDLE;
+ } else if (value == StateValues.CPU_STATUS_RUN_USERMODE) {
+ return State.USERMODE;
+ } else if (value == StateValues.CPU_STATUS_RUN_SYSCALL) {
+ return State.SYSCALL;
+ } else if (value == StateValues.CPU_STATUS_IRQ) {
+ return State.IRQ;
+ } else if (value == StateValues.CPU_STATUS_SOFTIRQ) {
+ return State.SOFT_IRQ;
+ }
+ } else if (entry.getType() == Type.IRQ) {
+ return State.IRQ_ACTIVE;
+ } else if (entry.getType() == Type.SOFT_IRQ) {
+ if (value == StateValues.SOFT_IRQ_RAISED) {
+ return State.SOFT_IRQ_RAISED;
+ }
+ return State.SOFT_IRQ_ACTIVE;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public int getStateTableIndex(ITimeEvent event) {
+ State state = getEventState((TimeEvent) event);
+ if (state != null) {
+ return state.ordinal();
+ }
+ if (event instanceof NullTimeEvent) {
+ return INVISIBLE;
+ }
+ return TRANSPARENT;
+ }
+
+ @Override
+ public StateItem[] getStateTable() {
+ State[] states = getStateValues();
+ StateItem[] stateTable = new StateItem[states.length];
+ for (int i = 0; i < stateTable.length; i++) {
+ State state = states[i];
+ stateTable[i] = new StateItem(state.rgb, state.toString());
+ }
+ return stateTable;
+ }
+
+ @Override
+ public String getEventName(ITimeEvent event) {
+ State state = getEventState((TimeEvent) event);
+ if (state != null) {
+ return state.toString();
+ }
+ if (event instanceof NullTimeEvent) {
+ return null;
+ }
+ return Messages.ResourcesView_multipleStates;
+ }
+
+ @Override
+ public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event, long hoverTime) {
+
+ Map<String, String> retMap = new LinkedHashMap<>();
+ if (event instanceof TimeEvent && ((TimeEvent) event).hasValue()) {
+
+ TimeEvent tcEvent = (TimeEvent) event;
+ ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+
+ if (tcEvent.hasValue()) {
+ ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ss == null) {
+ return retMap;
+ }
+ // Check for IRQ or Soft_IRQ type
+ if (entry.getType().equals(Type.IRQ) || entry.getType().equals(Type.SOFT_IRQ)) {
+
+ // Get CPU of IRQ or SoftIRQ and provide it for the tooltip display
+ int cpu = tcEvent.getValue();
+ if (cpu >= 0) {
+ retMap.put(Messages.ResourcesView_attributeCpuName, String.valueOf(cpu));
+ }
+ }
+
+ // Check for type CPU
+ else if (entry.getType().equals(Type.CPU)) {
+ int status = tcEvent.getValue();
+
+ if (status == StateValues.CPU_STATUS_IRQ) {
+ // In IRQ state get the IRQ that caused the interruption
+ int cpu = entry.getId();
+
+ try {
+ List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
+ List<Integer> irqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
+
+ for (int irqQuark : irqQuarks) {
+ if (fullState.get(irqQuark).getStateValue().unboxInt() == cpu) {
+ ITmfStateInterval value = ss.querySingleState(event.getTime(), irqQuark);
+ if (!value.getStateValue().isNull()) {
+ int irq = Integer.parseInt(ss.getAttributeName(irqQuark));
+ retMap.put(Messages.ResourcesView_attributeIrqName, String.valueOf(irq));
+ }
+ break;
+ }
+ }
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ } else if (status == StateValues.CPU_STATUS_SOFTIRQ) {
+ // In SOFT_IRQ state get the SOFT_IRQ that caused the interruption
+ int cpu = entry.getId();
+
+ try {
+ List<ITmfStateInterval> fullState = ss.queryFullState(event.getTime());
+ List<Integer> softIrqQuarks = ss.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
+
+ for (int softIrqQuark : softIrqQuarks) {
+ if (fullState.get(softIrqQuark).getStateValue().unboxInt() == cpu) {
+ ITmfStateInterval value = ss.querySingleState(event.getTime(), softIrqQuark);
+ if (!value.getStateValue().isNull()) {
+ int softIrq = Integer.parseInt(ss.getAttributeName(softIrqQuark));
+ retMap.put(Messages.ResourcesView_attributeSoftIrqName, String.valueOf(softIrq));
+ }
+ break;
+ }
+ }
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ } else if (status == StateValues.CPU_STATUS_RUN_USERMODE || status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+ // In running state get the current tid
+
+ try {
+ retMap.put(Messages.ResourcesView_attributeHoverTime, Utils.formatTime(hoverTime, TimeFormat.CALENDAR, Resolution.NANOSEC));
+ int cpuQuark = entry.getQuark();
+ int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+ ITmfStateInterval interval = ss.querySingleState(hoverTime, currentThreadQuark);
+ if (!interval.getStateValue().isNull()) {
+ ITmfStateValue value = interval.getStateValue();
+ int currentThreadId = value.unboxInt();
+ retMap.put(Messages.ResourcesView_attributeTidName, Integer.toString(currentThreadId));
+ int execNameQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.EXEC_NAME);
+ interval = ss.querySingleState(hoverTime, execNameQuark);
+ if (!interval.getStateValue().isNull()) {
+ value = interval.getStateValue();
+ retMap.put(Messages.ResourcesView_attributeProcessName, value.unboxStr());
+ }
+ if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+ int syscallQuark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), Attributes.SYSTEM_CALL);
+ interval = ss.querySingleState(hoverTime, syscallQuark);
+ if (!interval.getStateValue().isNull()) {
+ value = interval.getStateValue();
+ retMap.put(Messages.ResourcesView_attributeSyscallName, value.unboxStr());
+ }
+ }
+ }
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }
+ }
+ }
+ }
+
+ return retMap;
+ }
+
+ @Override
+ public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
+ if (fColorGray == null) {
+ fColorGray = gc.getDevice().getSystemColor(SWT.COLOR_GRAY);
+ }
+ if (fColorWhite == null) {
+ fColorWhite = gc.getDevice().getSystemColor(SWT.COLOR_WHITE);
+ }
+ if (fAverageCharWidth == null) {
+ fAverageCharWidth = gc.getFontMetrics().getAverageCharWidth();
+ }
+
+ ITmfTimeGraphDrawingHelper drawingHelper = getDrawingHelper();
+ if (bounds.width <= fAverageCharWidth) {
+ return;
+ }
+
+ if (!(event instanceof TimeEvent)) {
+ return;
+ }
+ TimeEvent tcEvent = (TimeEvent) event;
+ if (!tcEvent.hasValue()) {
+ return;
+ }
+
+ ResourcesEntry entry = (ResourcesEntry) event.getEntry();
+ if (!entry.getType().equals(Type.CPU)) {
+ return;
+ }
+
+ int status = tcEvent.getValue();
+ if (status != StateValues.CPU_STATUS_RUN_USERMODE && status != StateValues.CPU_STATUS_RUN_SYSCALL) {
+ return;
+ }
+
+ ITmfStateSystem ss = TmfStateSystemAnalysisModule.getStateSystem(entry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ss == null) {
+ return;
+ }
+ long time = event.getTime();
+ try {
+ while (time < event.getTime() + event.getDuration()) {
+ int cpuQuark = entry.getQuark();
+ int currentThreadQuark = ss.getQuarkRelative(cpuQuark, Attributes.CURRENT_THREAD);
+ ITmfStateInterval tidInterval = ss.querySingleState(time, currentThreadQuark);
+ long startTime = Math.max(tidInterval.getStartTime(), event.getTime());
+ int x = Math.max(drawingHelper.getXForTime(startTime), bounds.x);
+ if (x >= bounds.x + bounds.width) {
+ break;
+ }
+ if (!tidInterval.getStateValue().isNull()) {
+ ITmfStateValue value = tidInterval.getStateValue();
+ int currentThreadId = value.unboxInt();
+ long endTime = Math.min(tidInterval.getEndTime() + 1, event.getTime() + event.getDuration());
+ int xForEndTime = drawingHelper.getXForTime(endTime);
+ if (xForEndTime > bounds.x) {
+ int width = Math.min(xForEndTime, bounds.x + bounds.width) - x - 1;
+ if (width > 0) {
+ String attribute = null;
+ int beginIndex = 0;
+ if (status == StateValues.CPU_STATUS_RUN_USERMODE && currentThreadId != fLastThreadId) {
+ attribute = Attributes.EXEC_NAME;
+ } else if (status == StateValues.CPU_STATUS_RUN_SYSCALL) {
+ attribute = Attributes.SYSTEM_CALL;
+ beginIndex = 4; // skip the 'sys_'
+ }
+ if (attribute != null) {
+ int quark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(currentThreadId), attribute);
+ ITmfStateInterval interval = ss.querySingleState(time, quark);
+ if (!interval.getStateValue().isNull()) {
+ value = interval.getStateValue();
+ gc.setForeground(fColorWhite);
+ int drawn = Utils.drawText(gc, value.unboxStr().substring(beginIndex), x + 1, bounds.y - 2, width, true, true);
+ if (drawn > 0) {
+ fLastThreadId = currentThreadId;
+ }
+ }
+ }
+ if (xForEndTime < bounds.x + bounds.width) {
+ gc.setForeground(fColorGray);
+ gc.drawLine(xForEndTime, bounds.y + 1, xForEndTime, bounds.y + bounds.height - 2);
+ }
+ }
+ }
+ }
+ // make sure next time is at least at the next pixel
+ time = Math.max(tidInterval.getEndTime() + 1, drawingHelper.getTimeAtX(x + 1));
+ }
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ Activator.getDefault().logError("Error in ResourcesPresentationProvider", e); //$NON-NLS-1$
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ }
+
+ @Override
+ public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {
+ fLastThreadId = -1;
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2012, 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Patrick Tasse - Initial API and implementation
+ * Geneviève Bastien - Move code to provide base classes for time graph views
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.internal.lttng2.kernel.core.Attributes;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.Messages;
+import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesEntry.Type;
+import org.eclipse.linuxtools.lttng2.kernel.core.analysis.LttngKernelAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.views.timegraph.AbstractTimeGraphView;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.NullTimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
+import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
+
+/**
+ * Main implementation for the LTTng 2.0 kernel Resource view
+ *
+ * @author Patrick Tasse
+ */
+public class ResourcesView extends AbstractTimeGraphView {
+
+ /** View ID. */
+ public static final String ID = "org.eclipse.linuxtools.lttng2.kernel.ui.views.resources"; //$NON-NLS-1$
+
+ private static final String[] FILTER_COLUMN_NAMES = new String[] {
+ Messages.ResourcesView_stateTypeName
+ };
+
+ // Timeout between updates in the build thread in ms
+ private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Default constructor
+ */
+ public ResourcesView() {
+ super(ID, new ResourcesPresentationProvider());
+ setFilterColumns(FILTER_COLUMN_NAMES);
+ }
+
+ // ------------------------------------------------------------------------
+ // Internal
+ // ------------------------------------------------------------------------
+
+ @Override
+ protected String getNextText() {
+ return Messages.ResourcesView_nextResourceActionNameText;
+ }
+
+ @Override
+ protected String getNextTooltip() {
+ return Messages.ResourcesView_nextResourceActionToolTipText;
+ }
+
+ @Override
+ protected String getPrevText() {
+ return Messages.ResourcesView_previousResourceActionNameText;
+ }
+
+ @Override
+ protected String getPrevTooltip() {
+ return Messages.ResourcesView_previousResourceActionToolTipText;
+ }
+
+ @Override
+ protected void buildEventList(ITmfTrace trace, ITmfTrace parentTrace, IProgressMonitor monitor) {
+ if (trace == null) {
+ return;
+ }
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ return;
+ }
+ Comparator<ITimeGraphEntry> comparator = new Comparator<ITimeGraphEntry>() {
+ @Override
+ public int compare(ITimeGraphEntry o1, ITimeGraphEntry o2) {
+ return ((ResourcesEntry) o1).compareTo(o2);
+ }
+ };
+
+ Map<Integer, ResourcesEntry> entryMap = new HashMap<>();
+ TimeGraphEntry traceEntry = null;
+
+ long startTime = ssq.getStartTime();
+ long start = startTime;
+ setStartTime(Math.min(getStartTime(), startTime));
+ boolean complete = false;
+ while (!complete) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ complete = ssq.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+ if (ssq.isCancelled()) {
+ return;
+ }
+ long end = ssq.getCurrentEndTime();
+ if (start == end && !complete) { // when complete execute one last time regardless of end time
+ continue;
+ }
+ long endTime = end + 1;
+ setEndTime(Math.max(getEndTime(), endTime));
+
+ if (traceEntry == null) {
+ traceEntry = new ResourcesEntry(trace, trace.getName(), startTime, endTime, 0);
+ traceEntry.sortChildren(comparator);
+ List<TimeGraphEntry> entryList = Collections.singletonList(traceEntry);
+ addToEntryList(parentTrace, entryList);
+ } else {
+ traceEntry.updateEndTime(endTime);
+ }
+
+ List<Integer> cpuQuarks = ssq.getQuarks(Attributes.CPUS, "*"); //$NON-NLS-1$
+ for (Integer cpuQuark : cpuQuarks) {
+ int cpu = Integer.parseInt(ssq.getAttributeName(cpuQuark));
+ ResourcesEntry entry = entryMap.get(cpuQuark);
+ if (entry == null) {
+ entry = new ResourcesEntry(cpuQuark, trace, startTime, endTime, Type.CPU, cpu);
+ entryMap.put(cpuQuark, entry);
+ traceEntry.addChild(entry);
+ } else {
+ entry.updateEndTime(endTime);
+ }
+ }
+ List<Integer> irqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.IRQS, "*"); //$NON-NLS-1$
+ for (Integer irqQuark : irqQuarks) {
+ int irq = Integer.parseInt(ssq.getAttributeName(irqQuark));
+ ResourcesEntry entry = entryMap.get(irqQuark);
+ if (entry == null) {
+ entry = new ResourcesEntry(irqQuark, trace, startTime, endTime, Type.IRQ, irq);
+ entryMap.put(irqQuark, entry);
+ traceEntry.addChild(entry);
+ } else {
+ entry.updateEndTime(endTime);
+ }
+ }
+ List<Integer> softIrqQuarks = ssq.getQuarks(Attributes.RESOURCES, Attributes.SOFT_IRQS, "*"); //$NON-NLS-1$
+ for (Integer softIrqQuark : softIrqQuarks) {
+ int softIrq = Integer.parseInt(ssq.getAttributeName(softIrqQuark));
+ ResourcesEntry entry = entryMap.get(softIrqQuark);
+ if (entry == null) {
+ entry = new ResourcesEntry(softIrqQuark, trace, startTime, endTime, Type.SOFT_IRQ, softIrq);
+ entryMap.put(softIrqQuark, entry);
+ traceEntry.addChild(entry);
+ } else {
+ entry.updateEndTime(endTime);
+ }
+ }
+
+ if (parentTrace.equals(getTrace())) {
+ refresh();
+ }
+ long resolution = Math.max(1, (endTime - ssq.getStartTime()) / getDisplayWidth());
+ for (ITimeGraphEntry child : traceEntry.getChildren()) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ if (child instanceof TimeGraphEntry) {
+ TimeGraphEntry entry = (TimeGraphEntry) child;
+ List<ITimeEvent> eventList = getEventList(entry, start, endTime, resolution, monitor);
+ if (eventList != null) {
+ for (ITimeEvent event : eventList) {
+ entry.addEvent(event);
+ }
+ }
+ redraw();
+ }
+ }
+
+ start = end;
+ }
+ }
+
+ @Override
+ protected @Nullable List<ITimeEvent> getEventList(TimeGraphEntry entry,
+ long startTime, long endTime, long resolution,
+ IProgressMonitor monitor) {
+ ResourcesEntry resourcesEntry = (ResourcesEntry) entry;
+ ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(resourcesEntry.getTrace(), LttngKernelAnalysisModule.ID);
+ if (ssq == null) {
+ return null;
+ }
+ final long realStart = Math.max(startTime, ssq.getStartTime());
+ final long realEnd = Math.min(endTime, ssq.getCurrentEndTime() + 1);
+ if (realEnd <= realStart) {
+ return null;
+ }
+ List<ITimeEvent> eventList = null;
+ int quark = resourcesEntry.getQuark();
+
+ try {
+ if (resourcesEntry.getType().equals(Type.CPU)) {
+ int statusQuark = ssq.getQuarkRelative(quark, Attributes.STATUS);
+ List<ITmfStateInterval> statusIntervals = ssq.queryHistoryRange(statusQuark, realStart, realEnd - 1, resolution, monitor);
+ eventList = new ArrayList<>(statusIntervals.size());
+ long lastEndTime = -1;
+ for (ITmfStateInterval statusInterval : statusIntervals) {
+ if (monitor.isCanceled()) {
+ return null;
+ }
+ int status = statusInterval.getStateValue().unboxInt();
+ long time = statusInterval.getStartTime();
+ long duration = statusInterval.getEndTime() - time + 1;
+ if (!statusInterval.getStateValue().isNull()) {
+ if (lastEndTime != time && lastEndTime != -1) {
+ eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime));
+ }
+ eventList.add(new TimeEvent(entry, time, duration, status));
+ } else if (lastEndTime == -1 || time + duration >= endTime) {
+ // add null event if it intersects the start or end time
+ eventList.add(new NullTimeEvent(entry, time, duration));
+ }
+ lastEndTime = time + duration;
+ }
+ } else if (resourcesEntry.getType().equals(Type.IRQ)) {
+ List<ITmfStateInterval> irqIntervals = ssq.queryHistoryRange(quark, realStart, realEnd - 1, resolution, monitor);
+ eventList = new ArrayList<>(irqIntervals.size());
+ long lastEndTime = -1;
+ boolean lastIsNull = true;
+ for (ITmfStateInterval irqInterval : irqIntervals) {
+ if (monitor.isCanceled()) {
+ return null;
+ }
+ long time = irqInterval.getStartTime();
+ long duration = irqInterval.getEndTime() - time + 1;
+ if (!irqInterval.getStateValue().isNull()) {
+ int cpu = irqInterval.getStateValue().unboxInt();
+ eventList.add(new TimeEvent(entry, time, duration, cpu));
+ lastIsNull = false;
+ } else {
+ if (lastEndTime == -1) {
+ // add null event if it intersects the start time
+ eventList.add(new NullTimeEvent(entry, time, duration));
+ } else {
+ if (lastEndTime != time && lastIsNull) {
+ /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
+ eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
+ }
+ if (time + duration >= endTime) {
+ // add null event if it intersects the end time
+ eventList.add(new NullTimeEvent(entry, time, duration));
+ }
+ }
+ lastIsNull = true;
+ }
+ lastEndTime = time + duration;
+ }
+ } else if (resourcesEntry.getType().equals(Type.SOFT_IRQ)) {
+ List<ITmfStateInterval> softIrqIntervals = ssq.queryHistoryRange(quark, realStart, realEnd - 1, resolution, monitor);
+ eventList = new ArrayList<>(softIrqIntervals.size());
+ long lastEndTime = -1;
+ boolean lastIsNull = true;
+ for (ITmfStateInterval softIrqInterval : softIrqIntervals) {
+ if (monitor.isCanceled()) {
+ return null;
+ }
+ long time = softIrqInterval.getStartTime();
+ long duration = softIrqInterval.getEndTime() - time + 1;
+ if (!softIrqInterval.getStateValue().isNull()) {
+ int cpu = softIrqInterval.getStateValue().unboxInt();
+ eventList.add(new TimeEvent(entry, time, duration, cpu));
+ } else {
+ if (lastEndTime == -1) {
+ // add null event if it intersects the start time
+ eventList.add(new NullTimeEvent(entry, time, duration));
+ } else {
+ if (lastEndTime != time && lastIsNull) {
+ /* This is a special case where we want to show IRQ_ACTIVE state but we don't know the CPU (it is between two null samples) */
+ eventList.add(new TimeEvent(entry, lastEndTime, time - lastEndTime, -1));
+ }
+ if (time + duration >= endTime) {
+ // add null event if it intersects the end time
+ eventList.add(new NullTimeEvent(entry, time, duration));
+ }
+ }
+ lastIsNull = true;
+ }
+ lastEndTime = time + duration;
+ }
+ }
+
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ e.printStackTrace();
+ } catch (StateSystemDisposedException e) {
+ /* Ignored */
+ }
+ return eventList;
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.kernel</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+bin.includes = feature.xml,\
+ feature.properties,\
+ p2.inf
--- /dev/null
+###############################################################################
+# Copyright (c) 2009, 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+featureName=LTTng Kernel Analysis
+
+description=Plug-ins to integrate LTTng kernel analysis tools into the workbench. \
+Includes the LTTng (Linux Tracing Toolkit), TMF (Tracing and Monitoring Framework) \
+and CTF (Common Trace Format) features.
+
+featureProvider=Eclipse Linux Tools
+
+copyright=Copyright 2013 Ericsson
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- For PDE build, remove "ws" and "arch" -->
+<feature
+ id="org.eclipse.tracecompass.lttng2.kernel"
+ label="%featureName"
+ version="3.2.0.qualifier"
+ provider-name="%featureProvider"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Linux Tools Update Site" url="http://download.eclipse.org/linuxtools/update"/>
+ </url>
+
+ <includes
+ id="org.eclipse.tracecompass.lttng2.control"
+ version="0.0.0"
+ name="Linux Tracing Toolkit next generation (LTTng)"/>
+
+ <includes
+ id="org.eclipse.linuxtools.tmf.ctf"
+ version="0.0.0"
+ name="CTF Support for TMF"/>
+
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.tracecompass.ctf.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.linuxtools.tmf.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.linuxtools.tmf.ui" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tracecompass.lttng2.control.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tracecompass.lttng2.control.ui" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.tracecompass.lttng2.kernel.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.help"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.tracecompass.lttng2.kernel.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tracecompass.lttng2.kernel.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.lttng.help"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
--- /dev/null
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, Red Hat, Inc.
+
+ 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.kernel</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+
+ <name>Trace Compass LTTng Kernel Analysis Feature</name>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <plugin id="org.eclipse.linuxtools.lttng.help"/>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.ust.core.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.ust.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.linuxtools.tmf.core,
+ org.eclipse.linuxtools.tmf.core.tests;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core,
+ org.eclipse.linuxtools.tmf.ctf.core.tests,
+ org.eclipse.tracecompass.lttng2.ust.core,
+ org.eclipse.tracecompass.lttng2.control.core
+Export-Package: org.eclipse.linuxtools.lttng2.ust.core.tests,
+ org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack
+Import-Package: com.google.common.collect
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Userspace Tracer Analysis Core Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, 2013 Red Hat Inc., 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.ust.core.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Userspace Tracer Analysis Core Test Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <useUIHarness>false</useUIHarness>
+ <useUIThread>false</useUIThread>
+ <product>org.eclipse.platform.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests;
+
+import junit.framework.TestCase;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * <b><u>ActivatorTest</u></b>
+ * <p>
+ * Test suite for the Activator class
+ * <p>
+ */
+@SuppressWarnings("javadoc")
+public class ActivatorTest extends TestCase {
+
+ // ------------------------------------------------------------------------
+ // JUnit
+ // ------------------------------------------------------------------------
+
+ @BeforeClass
+ public static void setUpBeforeClass() {
+ }
+
+ @AfterClass
+ public static void tearDownAfterClass() {
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ }
+
+ /**
+ * @throws java.lang.Exception
+ */
+ @After
+ @Override
+ public void tearDown() throws Exception {
+ }
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#Activator()}.
+ */
+ @Test
+ public void testActivator() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#getDefault()}.
+ */
+ @Test
+ public void testGetDefault() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#start(org.osgi.framework.BundleContext)}.
+ */
+ @Test
+ public void testStartBundleContext() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.lttng2.kernel.core.Activator#stop(org.osgi.framework.BundleContext)}.
+ */
+ @Test
+ public void testStopBundleContext() {
+ assertTrue(true);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Runner for the lttng2.kernel unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+ org.eclipse.linuxtools.lttng2.ust.core.tests.analysis.memory.AllTests.class,
+ org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack.AllTests.class
+})
+public class AllTests { }
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests.analysis.memory;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ UstMemoryAnalysisModuleTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests.analysis.memory;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Set;
+
+import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.UstMemoryStrings;
+import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
+import org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.UstMemoryAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Tests for the {@link UstMemoryAnalysisModule}
+ *
+ * @author Guilliano Molaire
+ */
+public class UstMemoryAnalysisModuleTest {
+
+ /** The analysis module */
+ private UstMemoryAnalysisModule fUstAnalysisModule;
+
+ /**
+ * Set-up the test
+ */
+ @Before
+ public void setup() {
+ fUstAnalysisModule = new UstMemoryAnalysisModule();
+ }
+
+ /**
+ * Test for {@link UstMemoryAnalysisModule#getAnalysisRequirements()}
+ */
+ @Test
+ public void testGetAnalysisRequirements() {
+ Iterable<TmfAnalysisRequirement> requirements = fUstAnalysisModule.getAnalysisRequirements();
+ assertNotNull(requirements);
+ assertTrue(requirements.iterator().hasNext());
+
+ /* There should be the event and domain type */
+ TmfAnalysisRequirement eventReq = null;
+ TmfAnalysisRequirement domainReq = null;
+ int numberOfRequirement = 0;
+ for (TmfAnalysisRequirement requirement : requirements) {
+ ++numberOfRequirement;
+ if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_EVENT)) {
+ eventReq = requirement;
+ } else if (requirement.getType().equals(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN)) {
+ domainReq = requirement;
+ }
+ }
+ assertNotNull(eventReq);
+ assertNotNull(domainReq);
+
+ /* There should be two requirements */
+ assertEquals(2, numberOfRequirement);
+
+ /* Verify the content of the requirements themselves */
+ /* Domain should be kernel */
+ assertEquals(1, domainReq.getValues().size());
+ for (String domain : domainReq.getValues()) {
+ assertEquals(SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST, domain);
+ }
+
+ /* Events */
+ Set<String> expectedEvents = ImmutableSet.of(
+ UstMemoryStrings.MALLOC,
+ UstMemoryStrings.FREE,
+ UstMemoryStrings.CALLOC,
+ UstMemoryStrings.REALLOC,
+ UstMemoryStrings.MEMALIGN,
+ UstMemoryStrings.POSIX_MEMALIGN
+ );
+
+ assertEquals(6, eventReq.getValues().size());
+ for (String event : eventReq.getValues()) {
+ assertTrue("Unexpected event " + event, expectedEvents.contains(event));
+ }
+
+ Set<String> infos = eventReq.getInformation();
+ assertEquals(2, infos.size());
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack.LttngUstCallStackProvider;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.interval.ITmfStateInterval;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTraceManager;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TestRule;
+import org.junit.rules.Timeout;
+
+/**
+ * Base class for the UST callstack state provider tests.
+ *
+ * @author Alexandre Montplaisir
+ */
+public abstract class AbstractProviderTest {
+
+ /** Time-out tests after 20 seconds */
+ @Rule public TestRule globalTimeout= new Timeout(20000);
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ private static final CtfTmfTestTrace otherUstTrace = CtfTmfTestTrace.HELLO_LOST;
+
+ private CtfTmfTrace fTrace = null;
+ private ITmfStateSystem fSS = null;
+ private TestLttngCallStackModule fModule;
+
+
+ // ------------------------------------------------------------------------
+ // Abstract methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * @return The test trace to use for this test
+ */
+ protected abstract CtfTmfTestTrace getTestTrace();
+
+ /**
+ * @return The name of the executable process in that particular trace
+ */
+ protected abstract String getProcName();
+
+ /**
+ * Get the list of timestamps to query in that trace.
+ *
+ * @param index
+ * Which of the test timestamps?
+ * @return That particular timestamp
+ */
+ protected abstract long getTestTimestamp(int index);
+
+ // ------------------------------------------------------------------------
+ // Maintenance
+ // ------------------------------------------------------------------------
+
+ /**
+ * Perform pre-class initialization.
+ */
+ @Before
+ public void setUp() {
+ CtfTmfTestTrace testTrace = getTestTrace();
+
+ fTrace = testTrace.getTrace();
+ fModule = new TestLttngCallStackModule();
+ try {
+ fModule.setTrace(fTrace);
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ fModule.schedule();
+ assertTrue(fModule.waitForCompletion());
+
+ fSS = fModule.getStateSystem();
+ assertNotNull(fSS);
+ }
+
+ /**
+ * Perform post-class clean-up.
+ */
+ @After
+ public void tearDown() {
+ fModule.close();
+ if (fTrace != null) {
+ fTrace.dispose();
+ File suppDir = new File(TmfTraceManager.getSupplementaryFileDir(fTrace));
+ deleteDirectory(suppDir);
+ }
+ }
+
+ // ------------------------------------------------------------------------
+ // Test methods
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test the handling of generic UST traces who do not contain the required
+ * information.
+ */
+ @Test
+ public void testOtherUstTrace() {
+ /* Initialize the trace and analysis module */
+ File suppDir;
+ try (CtfTmfTrace ustTrace = otherUstTrace.getTrace();) {
+ try (TestLttngCallStackModule module = new TestLttngCallStackModule();) {
+ try {
+ module.setTrace(ustTrace);
+ } catch (TmfAnalysisException e) {
+ fail();
+ }
+ module.schedule();
+ assertTrue(module.waitForCompletion());
+
+ /* Make sure the generated state system exists, but is empty */
+ ITmfStateSystem ss = module.getStateSystem();
+ assertNotNull(ss);
+ assertTrue(ss.getStartTime() >= ustTrace.getStartTime().normalize(0, ITmfTimestamp.NANOSECOND_SCALE).getValue());
+ assertEquals(0, ss.getNbAttributes());
+ }
+ suppDir = new File(TmfTraceManager.getSupplementaryFileDir(ustTrace));
+ }
+ deleteDirectory(suppDir);
+ assertFalse(suppDir.exists());
+ }
+
+ /**
+ * Test that the callstack state system is there and contains data.
+ */
+ @Test
+ public void testConstruction() {
+ assertNotNull(fSS);
+ assertTrue(fSS.getNbAttributes() > 0);
+ }
+
+ /**
+ * Test the callstack at the beginning of the state system.
+ */
+ @Test
+ public void testCallStackBegin() {
+ long start = fSS.getStartTime();
+ String[] cs = getCallStack(fSS, getProcName(), start);
+ assertEquals(1, cs.length);
+
+ assertEquals("40472b", cs[0]);
+ }
+
+ /**
+ * Test the callstack somewhere in the trace.
+ */
+ @Test
+ public void testCallStack1() {
+ String[] cs = getCallStack(fSS, getProcName(), getTestTimestamp(0));
+ assertEquals(2, cs.length);
+
+ assertEquals("40472b", cs[0]);
+ assertEquals("403d60", cs[1]);
+ }
+
+ /**
+ * Test the callstack somewhere in the trace.
+ */
+ @Test
+ public void testCallStack2() {
+ String[] cs = getCallStack(fSS, getProcName(), getTestTimestamp(1));
+ assertEquals(3, cs.length);
+
+ assertEquals("40472b", cs[0]);
+ assertEquals("403b14", cs[1]);
+ assertEquals("401b23", cs[2]);
+ }
+
+ /**
+ * Test the callstack somewhere in the trace.
+ */
+ @Test
+ public void testCallStack3() {
+ String[] cs = getCallStack(fSS, getProcName(), getTestTimestamp(2));
+ assertEquals(4, cs.length);
+
+ assertEquals("40472b", cs[0]);
+ assertEquals("4045c8", cs[1]);
+ assertEquals("403760", cs[2]);
+ assertEquals("401aac", cs[3]);
+ }
+
+ /**
+ * Test the callstack at the end of the trace/state system.
+ */
+ @Test
+ public void testCallStackEnd() {
+ long end = fSS.getCurrentEndTime();
+ String[] cs = getCallStack(fSS, getProcName(), end);
+ assertEquals(3, cs.length);
+
+ assertEquals("40472b", cs[0]);
+ assertEquals("4045c8", cs[1]);
+ assertEquals("403760", cs[2]);
+ }
+
+ // ------------------------------------------------------------------------
+ // Utility methods
+ // ------------------------------------------------------------------------
+
+ /** Empty and delete a directory */
+ private static void deleteDirectory(File dir) {
+ /* Assuming the dir only contains file or empty directories */
+ for (File file : dir.listFiles()) {
+ file.delete();
+ }
+ dir.delete();
+ }
+
+ /** Get the callstack for the given timestamp, for this particular trace */
+ private static String[] getCallStack(ITmfStateSystem ss, String processName, long timestamp) {
+ try {
+ int stackAttribute = ss.getQuarkAbsolute("Threads", processName, "CallStack");
+ List<ITmfStateInterval> state = ss.queryFullState(timestamp);
+ int depth = state.get(stackAttribute).getStateValue().unboxInt();
+
+ int stackTop = ss.getQuarkRelative(stackAttribute, String.valueOf(depth));
+ ITmfStateValue top = state.get(stackTop).getStateValue();
+ assertEquals(top, ss.querySingleStackTop(timestamp, stackAttribute).getStateValue());
+
+ String[] ret = new String[depth];
+ for (int i = 0; i < depth; i++) {
+ int quark = ss.getQuarkRelative(stackAttribute, String.valueOf(i + 1));
+ ret[i] = state.get(quark).getStateValue().unboxStr();
+ }
+ return ret;
+
+ } catch (AttributeNotFoundException e) {
+ fail(e.getMessage());
+ } catch (StateSystemDisposedException e) {
+ fail(e.getMessage());
+ }
+ fail();
+ return null;
+ }
+
+ private class TestLttngCallStackModule extends TmfStateSystemAnalysisModule {
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngUstCallStackProvider(getTrace());
+ }
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ LttngUstCallStackProviderFastTest.class,
+ LttngUstCallStackProviderTest.class
+})
+public class AllTests {
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
+
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
+
+/**
+ * Test suite for the UST callstack state provider, using the trace of a program
+ * instrumented with lttng-ust-cyg-profile-fast.so tracepoints. These do not
+ * contain the function addresses in the func_exit events.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class LttngUstCallStackProviderFastTest extends AbstractProviderTest {
+
+ private static final long[] timestamps = { 1379361250310000000L,
+ 1379361250498400000L,
+ 1379361250499759000L };
+
+ /**
+ * Class setup
+ */
+ @BeforeClass
+ public static void setUpClass() {
+ assumeTrue(CtfTmfTestTrace.CYG_PROFILE_FAST.exists());
+ }
+
+ @Override
+ protected CtfTmfTestTrace getTestTrace() {
+ return CtfTmfTestTrace.CYG_PROFILE_FAST;
+ }
+
+ @Override
+ protected String getProcName() {
+ return "glxgears-29822";
+ }
+
+ @Override
+ protected long getTestTimestamp(int index) {
+ return timestamps[index];
+ }
+
+}
\ No newline at end of file
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.tests.trace.callstack;
+
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.linuxtools.tmf.ctf.core.tests.shared.CtfTmfTestTrace;
+import org.junit.BeforeClass;
+
+/**
+ * Test suite for the UST callstack state provider, using the trace of a program
+ * instrumented with lttng-ust-cyg-profile.so tracepoints.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class LttngUstCallStackProviderTest extends AbstractProviderTest {
+
+ private static final long[] timestamps = { 1378850463600000000L,
+ 1378850463770000000L,
+ 1378850463868753000L };
+
+ /**
+ * Class setup
+ */
+ @BeforeClass
+ public static void setUpClass() {
+ assumeTrue(CtfTmfTestTrace.CYG_PROFILE.exists());
+ }
+
+ @Override
+ protected CtfTmfTestTrace getTestTrace() {
+ return CtfTmfTestTrace.CYG_PROFILE;
+ }
+
+ @Override
+ protected String getProcName() {
+ return "glxgears-16073";
+ }
+
+ @Override
+ protected long getTestTimestamp(int index) {
+ return timestamps[index];
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.ust.core</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.ust.core;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.ust.core.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Export-Package: org.eclipse.linuxtools.internal.lttng2.ust.core;x-internal:=true,
+ org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage;x-friends:="org.eclipse.tracecompass.lttng2.ust.ui,org.eclipse.tracecompass.lttng2.ust.core.tests",
+ org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack;x-friends:="org.eclipse.tracecompass.lttng2.ust.ui,org.eclipse.tracecompass.lttng2.ust.core.tests",
+ org.eclipse.linuxtools.lttng2.ust.core.analysis.memory,
+ org.eclipse.linuxtools.lttng2.ust.core.trace
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.ctf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core,
+ org.eclipse.tracecompass.lttng2.control.core
+Import-Package: com.google.common.collect
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ plugin.xml
+src.includes = about.html
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Userspace Tracer Analysis Core Plug-in
+
+tracetype.type.ust = LTTng UST Trace
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.linuxtools.tmf.core.tracetype">
+ <type
+ category="org.eclipse.linuxtools.tmf.ctf.core.category.ctf"
+ event_type="org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent"
+ id="org.eclipse.linuxtools.lttng2.ust.tracetype"
+ isDirectory="true"
+ name="%tracetype.type.ust"
+ trace_type="org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace">
+ </type>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.tmf.core.analysis">
+ <module
+ analysis_module="org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.UstMemoryAnalysisModule"
+ id="org.eclipse.linuxtools.lttng2.ust.analysis.memory"
+ name="Ust Memory">
+ <tracetype
+ class="org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace">
+ </tracetype>
+ </module>
+ </extension>
+</plugin>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, 2013 Red Hat Inc., 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.ust.core</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Trace Compass LTTng Userspace Tracer Analysis Core Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>Activator</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.ust.core"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ------------------------------------------------------------------------
+ // Operators
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Logs a message with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logInfo(String message) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logInfo(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logWarning(String message) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logWarning(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logError(String message) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logError(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Matthew Khouzam - Initial API and implementation
+ * Geneviève Bastien - Memory is per thread and only total is kept
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
+
+/**
+ * State provider to track the memory of the threads using the UST libc wrapper
+ * memory events.
+ *
+ * @author Matthew Khouzam
+ * @author Geneviève Bastien
+ */
+public class MemoryUsageStateProvider extends AbstractTmfStateProvider {
+
+ /* Version of this state provider */
+ private static final int VERSION = 1;
+
+ /* Maps a pointer to a memory zone to the size of the memory */
+ private final Map<Long, Long> fMemory = new HashMap<>();
+
+ private static final Long MINUS_ONE = Long.valueOf(-1);
+ private static final Long ZERO = Long.valueOf(0);
+ private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ /**
+ * Constructor
+ *
+ * @param trace
+ * trace
+ */
+ public MemoryUsageStateProvider(LttngUstTrace trace) {
+ super(trace, CtfTmfEvent.class, "Ust:Memory"); //$NON-NLS-1$
+ }
+
+ @Override
+ protected void eventHandle(ITmfEvent event) {
+ String name = event.getType().getName();
+ switch (name) {
+ case UstMemoryStrings.MALLOC: {
+ Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
+ if (ZERO.equals(ptr)) {
+ return;
+ }
+ Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
+ setMem(event, ptr, size);
+ }
+ break;
+ case UstMemoryStrings.FREE: {
+ Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
+ if (ZERO.equals(ptr)) {
+ return;
+ }
+ setMem(event, ptr, ZERO);
+ }
+ break;
+ case UstMemoryStrings.CALLOC: {
+ Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
+ if (ZERO.equals(ptr)) {
+ return;
+ }
+ Long nmemb = (Long) event.getContent().getField(UstMemoryStrings.FIELD_NMEMB).getValue();
+ Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
+ setMem(event, ptr, size * nmemb);
+ }
+ break;
+ case UstMemoryStrings.REALLOC: {
+ Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
+ if (ZERO.equals(ptr)) {
+ return;
+ }
+ Long newPtr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_INPTR).getValue();
+ Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
+ setMem(event, ptr, ZERO);
+ setMem(event, newPtr, size);
+ }
+ break;
+ case UstMemoryStrings.MEMALIGN: {
+ Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_PTR).getValue();
+ if (ZERO.equals(ptr)) {
+ return;
+ }
+ Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
+ setMem(event, ptr, size);
+ }
+ break;
+ case UstMemoryStrings.POSIX_MEMALIGN: {
+ Long ptr = (Long) event.getContent().getField(UstMemoryStrings.FIELD_OUTPTR).getValue();
+ if (ZERO.equals(ptr)) {
+ return;
+ }
+ Long size = (Long) event.getContent().getField(UstMemoryStrings.FIELD_SIZE).getValue();
+ setMem(event, ptr, size);
+ }
+ break;
+ default:
+ break;
+ }
+
+ }
+
+ @Override
+ public ITmfStateProvider getNewInstance() {
+ return new MemoryUsageStateProvider(getTrace());
+ }
+
+ @Override
+ public LttngUstTrace getTrace() {
+ return (LttngUstTrace) super.getTrace();
+ }
+
+ @Override
+ public int getVersion() {
+ return VERSION;
+ }
+
+ private static Long getVtid(ITmfEvent event) {
+ ITmfEventField field = event.getContent().getField(UstMemoryStrings.CONTEXT_VTID);
+ if (field == null) {
+ return MINUS_ONE;
+ }
+ return (Long) field.getValue();
+ }
+
+ private static String getProcname(ITmfEvent event) {
+ ITmfEventField field = event.getContent().getField(UstMemoryStrings.CONTEXT_PROCNAME);
+ if (field == null) {
+ return EMPTY_STRING;
+ }
+ return (String) field.getValue();
+ }
+
+ private void setMem(ITmfEvent event, Long ptr, Long size) {
+ long ts = event.getTimestamp().getValue();
+ Long tid = getVtid(event);
+
+ Long memoryDiff = size;
+ /* Size is 0, it means it was deleted */
+ if (ZERO.equals(size)) {
+ Long memSize = fMemory.remove(ptr);
+ if (memSize == null) {
+ return;
+ }
+ memoryDiff = -memSize;
+ } else {
+ fMemory.put(ptr, size);
+ }
+ try {
+ int tidQuark = ss.getQuarkAbsoluteAndAdd(tid.toString());
+ int tidMemQuark = ss.getQuarkRelativeAndAdd(tidQuark, UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE);
+
+ ITmfStateValue prevMem = ss.queryOngoingState(tidMemQuark);
+ /* First time we set this value */
+ if (prevMem.isNull()) {
+ int procNameQuark = ss.getQuarkRelativeAndAdd(tidQuark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE);
+ String procName = getProcname(event);
+ /*
+ * No tid/procname for the event for the event, added to a
+ * 'others' thread
+ */
+ if (tid.equals(MINUS_ONE)) {
+ procName = UstMemoryStrings.OTHERS;
+ }
+ ss.modifyAttribute(ts, TmfStateValue.newValueString(procName), procNameQuark);
+ prevMem = TmfStateValue.newValueLong(0);
+ }
+
+ long prevMemValue = prevMem.unboxLong();
+ prevMemValue += memoryDiff.longValue();
+ ss.modifyAttribute(ts, TmfStateValue.newValueLong(prevMemValue), tidMemQuark);
+ } catch (AttributeNotFoundException | TimeRangeException | StateValueTypeException e) {
+ throw new IllegalStateException(e);
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Matthew Khouzam, Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage;
+
+/**
+ * Strings for the memory usage state system using the LTTng UST libc
+ * instrumentation
+ *
+ * @author Matthew Khouzam
+ * @author Geneviève Bastien
+ */
+@SuppressWarnings({ "nls", "javadoc" })
+public interface UstMemoryStrings {
+
+ /** Memory state system attribute name */
+ static final String UST_MEMORY_MEMORY_ATTRIBUTE = "Memory"; //$NON-NLS-1$
+ /** Procname state system attribute name */
+ static final String UST_MEMORY_PROCNAME_ATTRIBUTE = "Procname"; //$NON-NLS-1$
+ /** Name of the attribute to store memory usage of events with no context */
+ static final String OTHERS = "Others";
+
+ /* UST_libc event names */
+ static final String MALLOC = "ust_libc:malloc";
+ static final String CALLOC = "ust_libc:calloc";
+ static final String REALLOC = "ust_libc:realloc";
+ static final String FREE = "ust_libc:free";
+ static final String MEMALIGN = "ust_libc:memalign";
+ static final String POSIX_MEMALIGN = "ust_libc:posix_memalign";
+
+ /* Possible contexts */
+ static final String CONTEXT_VTID = "context._vtid";
+ static final String CONTEXT_PROCNAME = "context._procname";
+
+ /* Event fields */
+ static final String FIELD_PTR = "ptr";
+ static final String FIELD_NMEMB = "nmemb";
+ static final String FIELD_SIZE = "size";
+ static final String FIELD_OUTPTR = "out_ptr";
+ static final String FIELD_INPTR = "in_ptr";
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ * Patrick Tasse - Add support for thread id
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.linuxtools.tmf.core.callstack.CallStackStateProvider;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfEvent;
+
+/**
+ * Callstack provider for LTTng-UST traces.
+ *
+ * If the traces contains 'func_entry' and 'func_exit' event (see the
+ * lttng-ust-cyg-profile manpage), AND contains vtid and procname contexts, we
+ * can use this information to populate the TMF Callstack View.
+ *
+ * Granted, most UST traces will not contain this information. In this case,
+ * this will simply build an empty state system, and the view will remain
+ * unavailable.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class LttngUstCallStackProvider extends CallStackStateProvider {
+
+ // ------------------------------------------------------------------------
+ // Event strings
+ // ------------------------------------------------------------------------
+
+ /** Name of the fake field for the vtid contexts */
+ private static final String CONTEXT_VTID = "context._vtid"; //$NON-NLS-1$
+
+ /** Name of the fake field for the procname context */
+ private static final String CONTEXT_PROCNAME = "context._procname"; //$NON-NLS-1$
+
+ /** Field name for the target function address */
+ private static final String FIELD_ADDR = "addr"; //$NON-NLS-1$
+
+ /** Event names indicating function entry */
+ private static final Set<String> FUNC_ENTRY_EVENTS = new HashSet<>();
+
+ /** Event names indicating function exit */
+ private static final Set<String> FUNC_EXIT_EVENTS = new HashSet<>();
+
+ static {
+ /* This seems overkill, but it will be checked every event. Gotta go FAST! */
+ FUNC_ENTRY_EVENTS.add("lttng_ust_cyg_profile:func_entry"); //$NON-NLS-1$
+ FUNC_ENTRY_EVENTS.add("lttng_ust_cyg_profile_fast:func_entry"); //$NON-NLS-1$
+
+ FUNC_EXIT_EVENTS.add("lttng_ust_cyg_profile:func_exit"); //$NON-NLS-1$
+ FUNC_EXIT_EVENTS.add("lttng_ust_cyg_profile_fast:func_exit"); //$NON-NLS-1$
+ }
+
+ /**
+ * Version number of this state provider. Please bump this if you modify
+ * the contents of the generated state history in some way.
+ */
+ private static final int VERSION = 2;
+
+ // ------------------------------------------------------------------------
+ // Constructor
+ // ------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @param trace
+ * The UST trace
+ */
+ public LttngUstCallStackProvider(ITmfTrace trace) {
+ super(trace);
+ }
+
+ // ------------------------------------------------------------------------
+ // Methods from AbstractTmfStateProvider
+ // ------------------------------------------------------------------------
+
+ @Override
+ public LttngUstCallStackProvider getNewInstance() {
+ return new LttngUstCallStackProvider(getTrace());
+ }
+
+ @Override
+ public int getVersion() {
+ return VERSION;
+ }
+
+ // ------------------------------------------------------------------------
+ // Methods from CallStackStateProvider
+ // ------------------------------------------------------------------------
+
+ /**
+ * Check that this event contains the required information we need to be
+ * used in the call stack view. We need at least the "procname" and "vtid"
+ * contexts.
+ */
+ @Override
+ protected boolean considerEvent(ITmfEvent event) {
+ if (!(event instanceof CtfTmfEvent)) {
+ return false;
+ }
+ ITmfEventField content = ((CtfTmfEvent) event).getContent();
+ if (content.getField(CONTEXT_VTID) == null ||
+ content.getField(CONTEXT_PROCNAME) == null) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public String functionEntry(ITmfEvent event) {
+ String eventName = event.getType().getName();
+ if (!FUNC_ENTRY_EVENTS.contains(eventName)) {
+ return null;
+ }
+ Long address = (Long) event.getContent().getField(FIELD_ADDR).getValue();
+ return Long.toHexString(address);
+ }
+
+ @Override
+ public String functionExit(ITmfEvent event) {
+ String eventName = event.getType().getName();
+ if (!FUNC_EXIT_EVENTS.contains(eventName)) {
+ return null;
+ }
+ /*
+ * The 'addr' field may or may not be present in func_exit events,
+ * depending on if cyg-profile.so or cyg-profile-fast.so was used.
+ */
+ ITmfEventField field = event.getContent().getField(FIELD_ADDR);
+ if (field == null) {
+ return CallStackStateProvider.UNDEFINED;
+ }
+ Long address = (Long) field.getValue();
+ return Long.toHexString(address);
+ }
+
+ @Override
+ public String getThreadName(ITmfEvent event) {
+ /* Class type and content was already checked if we get called here */
+ ITmfEventField content = ((CtfTmfEvent) event).getContent();
+ String procName = (String) content.getField(CONTEXT_PROCNAME).getValue();
+ Long vtid = (Long) content.getField(CONTEXT_VTID).getValue();
+
+ if (procName == null || vtid == null) {
+ throw new IllegalStateException();
+ }
+
+ return new String(procName + '-' + vtid.toString());
+ }
+
+ @Override
+ protected Long getThreadId(ITmfEvent event) {
+ ITmfEventField content = ((CtfTmfEvent) event).getContent();
+ return (Long) content.getField(CONTEXT_VTID).getValue();
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Guilliano Molaire - Initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.lttng2.ust.core.analysis.memory;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Message bundle for the ust memory analysis module
+ *
+ * @author Guilliano Molaire
+ * @since 3.0
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.messages"; //$NON-NLS-1$
+
+ /** Information regarding events loading prior to the analysis execution */
+ public static String UstMemoryAnalysisModule_EventsLoadingInformation;
+
+ /** Example of how to execute the application with the libc wrapper */
+ public static String UstMemoryAnalysisModule_EventsLoadingExampleInformation;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ * Guilliano Molaire - Provide the requirements of the analysis
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.analysis.memory;
+
+import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.MemoryUsageStateProvider;
+import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.UstMemoryStrings;
+import org.eclipse.linuxtools.lttng2.control.core.session.SessionConfigStrings;
+import org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAnalysisRequirement.ValuePriorityLevel;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * This analysis build a state system from the libc memory instrumentation on a
+ * UST trace
+ *
+ * @author Geneviève Bastien
+ * @since 3.0
+ */
+public class UstMemoryAnalysisModule extends TmfStateSystemAnalysisModule {
+
+ /**
+ * Analysis ID, it should match that in the plugin.xml file
+ */
+ public static String ID = "org.eclipse.linuxtools.lttng2.ust.analysis.memory"; //$NON-NLS-1$
+
+ private static final ImmutableSet<String> REQUIRED_EVENTS = ImmutableSet.of(
+ UstMemoryStrings.MALLOC,
+ UstMemoryStrings.FREE,
+ UstMemoryStrings.CALLOC,
+ UstMemoryStrings.REALLOC,
+ UstMemoryStrings.MEMALIGN,
+ UstMemoryStrings.POSIX_MEMALIGN
+ );
+
+ /** The requirements as an immutable set */
+ private static final ImmutableSet<TmfAnalysisRequirement> REQUIREMENTS;
+
+ static {
+ /* Initialize the requirements for the analysis: domain and events */
+ TmfAnalysisRequirement eventsReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_EVENT, REQUIRED_EVENTS, ValuePriorityLevel.MANDATORY);
+ /*
+ * In order to have these events, the libc wrapper with probes should be
+ * loaded
+ */
+ eventsReq.addInformation(Messages.UstMemoryAnalysisModule_EventsLoadingInformation);
+ eventsReq.addInformation(Messages.UstMemoryAnalysisModule_EventsLoadingExampleInformation);
+
+ /* The domain type of the analysis */
+ TmfAnalysisRequirement domainReq = new TmfAnalysisRequirement(SessionConfigStrings.CONFIG_ELEMENT_DOMAIN);
+ domainReq.addValue(SessionConfigStrings.CONFIG_DOMAIN_TYPE_UST, ValuePriorityLevel.MANDATORY);
+
+ REQUIREMENTS = ImmutableSet.of(domainReq, eventsReq);
+ }
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new MemoryUsageStateProvider(getTrace());
+ }
+
+ @Override
+ public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
+ if (!(trace instanceof LttngUstTrace)) {
+ throw new IllegalStateException("UstMemoryAnalysisModule: trace should be of type LttngUstTrace"); //$NON-NLS-1$
+ }
+ super.setTrace(trace);
+ }
+
+ @Override
+ protected LttngUstTrace getTrace() {
+ return (LttngUstTrace) super.getTrace();
+ }
+
+ @Override
+ public Iterable<TmfAnalysisRequirement> getAnalysisRequirements() {
+ return REQUIREMENTS;
+ }
+}
--- /dev/null
+UstMemoryAnalysisModule_EventsLoadingInformation=The libc wrapper should be loaded in order to get the events in the trace output.
+UstMemoryAnalysisModule_EventsLoadingExampleInformation=Start the application to trace with: LD_PRELOAD=/path/to/liblttng-ust-libc-wrapper.so ./myProgram.
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2013, 2014 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:
+ * Matthew Khouzam - Initial API and implementation
+ * Alexandre Montplaisir - Add UST callstack state system
+ * Marc-Andre Laperle - Handle BufferOverflowException (Bug 420203)
+ **********************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.trace;
+
+import java.nio.BufferOverflowException;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.linuxtools.ctf.core.trace.CTFReaderException;
+import org.eclipse.linuxtools.ctf.core.trace.CTFTrace;
+import org.eclipse.linuxtools.internal.lttng2.ust.core.Activator;
+import org.eclipse.linuxtools.tmf.core.trace.TraceValidationStatus;
+import org.eclipse.linuxtools.tmf.ctf.core.CtfTmfTrace;
+
+/**
+ * Class to contain LTTng-UST traces
+ *
+ * @author Matthew Khouzam
+ * @since 2.1
+ */
+public class LttngUstTrace extends CtfTmfTrace {
+
+ private static final int CONFIDENCE = 100;
+
+ /**
+ * Default constructor
+ */
+ public LttngUstTrace() {
+ super();
+ }
+
+ /**
+ * {@inheritDoc}
+ * <p>
+ * This implementation sets the confidence to 100 if the trace is a valid
+ * CTF trace in the "ust" domain.
+ */
+ @Override
+ public IStatus validate(final IProject project, final String path) {
+ try (CTFTrace temp = new CTFTrace(path);) {
+ /* Make sure the domain is "ust" in the trace's env vars */
+ String dom = temp.getEnvironment().get("domain"); //$NON-NLS-1$
+ if (dom != null && dom.equals("\"ust\"")) { //$NON-NLS-1$
+ return new TraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID);
+ }
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngUstTrace_DomainError);
+
+ } catch (CTFReaderException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ } catch (NullPointerException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString(), e);
+ } catch (final BufferOverflowException e) {
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LttngUstTrace_TraceReadError + ": " + Messages.LttngUstTrace_MalformedTrace); //$NON-NLS-1$
+ }
+ }
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.core.trace;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Message bundle for lttng2.kernel.core.trace
+ *
+ * @author Matthew Khouzam
+ * @since 2.1
+ */
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.lttng2.ust.core.trace.messages"; //$NON-NLS-1$
+
+ /**
+ * The domain is not "ust"
+ */
+ public static String LttngUstTrace_DomainError;
+
+ /**
+ * Malformed trace (buffer overflow maybe?)
+ */
+ public static String LttngUstTrace_MalformedTrace;
+
+ /**
+ * Trace read error
+ */
+ public static String LttngUstTrace_TraceReadError;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+LttngUstTrace_DomainError=Domain mismatch, the environment should be 'ust'.
+LttngUstTrace_MalformedTrace=Buffer overflow exception, trace is malformed
+LttngUstTrace_TraceReadError=Lttng UST trace read error
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.ust.ui.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.ust.ui.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.ui,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.tracecompass.lttng2.ust.ui;bundle-version="3.1.0"
+Export-Package: org.eclipse.linuxtools.lttng2.ust.ui.tests
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties
+src.includes = about.html
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Userspace Tracer Analysis UI Tests Plug-in
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, 2013 Red Hat Inc., 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.ust.ui.tests</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+
+ <name>Trace Compass LTTng Userspace Tracer Analysis UI Tests Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.tracecompass.lttng2.ust.ui.tests</testSuite>
+ <testClass>org.eclipse.linuxtools.lttng2.ust.ui.tests.AllTests</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
+ <product>org.eclipse.platform.ide</product>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.ui.tests;
+
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Test suite for the Activator class
+ */
+public class ActivatorTest {
+
+ // ------------------------------------------------------------------------
+ // Tests
+ // ------------------------------------------------------------------------
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#Activator()}.
+ */
+ @Test
+ public void testActivator() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#getDefault()}.
+ */
+ @Test
+ public void testGetDefault() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#start}.
+ */
+ @Test
+ public void testStartBundleContext() {
+ assertTrue(true);
+ }
+
+ /**
+ * Test method for {@link org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator#stop}.
+ */
+ @Test
+ public void testStopBundleContext() {
+ assertTrue(true);
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.ui.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Run the lttng2.ust.ui unit tests.
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+ ActivatorTest.class,
+})
+public class AllTests {
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.ust.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
--- /dev/null
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=false
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=false
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=false
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=false
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
--- /dev/null
+ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
+ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
+ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
+API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
+API_USE_SCAN_FIELD_SEVERITY=Error
+API_USE_SCAN_METHOD_SEVERITY=Error
+API_USE_SCAN_TYPE_SEVERITY=Error
+CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
+CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
+CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
+CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
+CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
+ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
+ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
+ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
+FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
+FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
+FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
+FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
+ILLEGAL_EXTEND=Warning
+ILLEGAL_IMPLEMENT=Warning
+ILLEGAL_INSTANTIATE=Warning
+ILLEGAL_OVERRIDE=Warning
+ILLEGAL_REFERENCE=Warning
+INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
+INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
+INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
+INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+INVALID_JAVADOC_TAG=Warning
+INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
+LEAK_EXTEND=Warning
+LEAK_FIELD_DECL=Warning
+LEAK_IMPLEMENT=Warning
+LEAK_METHOD_PARAM=Warning
+LEAK_METHOD_RETURN_TYPE=Warning
+METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
+METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
+METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
+METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
+METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
+METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
+METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
+MISSING_EE_DESCRIPTIONS=Ignore
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
+TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
+UNUSED_PROBLEM_FILTERS=Warning
+automatically_removed_unused_problem_filters=false
+eclipse.preferences.version=1
+incompatible_api_component_version=Error
+incompatible_api_component_version_include_major_without_breaking_change=Disabled
+incompatible_api_component_version_include_minor_without_api_change=Disabled
+invalid_since_tag_version=Error
+malformed_since_tag=Error
+missing_since_tag=Error
+report_api_breakage_when_major_version_incremented=Disabled
+report_resolution_errors_api_component=Warning
--- /dev/null
+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.build.bin.includes=1
+compilers.p.build.encodings=2
+compilers.p.build.java.compiler=2
+compilers.p.build.java.compliance=1
+compilers.p.build.missing.output=2
+compilers.p.build.output.library=1
+compilers.p.build.source.library=1
+compilers.p.build.src.includes=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=1
+compilers.p.internal=1
+compilers.p.missing-packages=1
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
--- /dev/null
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.lttng2.ust.ui;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.lttng2.ust.ui.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.tracecompass.lttng2.ust.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ctf.core
+Export-Package: org.eclipse.linuxtools.internal.lttng2.ust.ui;x-friends:="org.eclipse.tracecompass.lttng2.ust.ui.tests",
+ org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;x-friends:="org.eclipse.tracecompass.lttng2.ust.ui.tests",
+ org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2006</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
\ No newline at end of file
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ icons/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
--- /dev/null
+###############################################################################
+# Copyright (c) 2013, 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass LTTng Userspace Tracer Analysis UI Plug-in
+
+tracetype.type.ust = LTTng UST Trace
+memoryusage.view.name = UST Memory Usage
+
+analysis.callstack = LTTng-UST CallStack Analysis
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.linuxtools.tmf.ui.tracetypeui">
+ <type
+ icon="icons/obj16/garland16.png"
+ tracetype="org.eclipse.linuxtools.lttng2.ust.tracetype">
+ </type>
+ </extension>
+ <extension
+ point="org.eclipse.ui.views">
+ <view
+ category="org.eclipse.linuxtools.lttng2.ui.views.category"
+ class="org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage.MemoryUsageView"
+ id="org.eclipse.linuxtools.lttng2.ust.memoryusage"
+ name="%memoryusage.view.name"
+ restorable="true">
+ </view>
+ </extension>
+ <extension
+ point="org.eclipse.linuxtools.tmf.core.analysis">
+ <module
+ analysis_module="org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack.LttngUstCallStackAnalysis"
+ automatic="false"
+ id="org.eclipse.linuxtools.lttng2.ust.analysis.callstack"
+ name="%analysis.callstack">
+ <tracetype
+ applies="true"
+ class="org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace">
+ </tracetype>
+ </module>
+ <output
+ class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+ id="org.eclipse.linuxtools.lttng2.ust.memoryusage">
+ <analysisId
+ id="org.eclipse.linuxtools.lttng2.ust.analysis.memory">
+ </analysisId>
+ </output>
+ </extension>
+</plugin>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, 2013 Red Hat Inc., 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.ust.ui</artifactId>
+ <version>3.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <name>Trace Compass LTTng Userspace Tracer Analysis UI Plug-in</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2013 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // ------------------------------------------------------------------------
+ // Attributes
+ // ------------------------------------------------------------------------
+
+ /**
+ * The plug-in ID
+ */
+ public static final String PLUGIN_ID = "org.eclipse.linuxtools.lttng2.ust.ui"; //$NON-NLS-1$
+
+ /**
+ * The shared instance
+ */
+ private static Activator plugin;
+
+ // ------------------------------------------------------------------------
+ // Constructors
+ // ------------------------------------------------------------------------
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ // ------------------------------------------------------------------------
+ // Accessors
+ // ------------------------------------------------------------------------
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ // ------------------------------------------------------------------------
+ // AbstractUIPlugin
+ // ------------------------------------------------------------------------
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ }
+
+ // ------------------------------------------------------------------------
+ // Operations
+ // ------------------------------------------------------------------------
+
+ /**
+ * Get the image object from a given path
+ *
+ * @param path
+ * The path to the image file
+ * @return The Image object
+ */
+ public Image getImageFromPath(String path) {
+ return getImageDescripterFromPath(path).createImage();
+ }
+
+ /**
+ * Get the ImageDescriptor from a given path
+ *
+ * @param path
+ * The path to the image file
+ * @return The ImageDescriptor object
+ */
+ public ImageDescriptor getImageDescripterFromPath(String path) {
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ /**
+ * Get the Image from a registry
+ *
+ * @param path
+ * The path to the image registry
+ * @return The Image object
+ */
+ public Image getImageFromImageRegistry(String path) {
+ Image icon = getImageRegistry().get(path);
+ if (icon == null) {
+ icon = getImageDescripterFromPath(path).createImage();
+ plugin.getImageRegistry().put(path, icon);
+ }
+ return icon;
+ }
+
+ /**
+ * Logs a message with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logInfo(String message) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logInfo(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logWarning(String message) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logWarning(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ */
+ public void logError(String message) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+ }
+
+ /**
+ * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+ *
+ * @param message A message to log
+ * @param exception A exception to log
+ */
+ public void logError(String message, Throwable exception) {
+ getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+ }
+
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 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:
+ * Matthew Khouzam - Initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;
+
+import org.eclipse.linuxtools.tmf.ui.views.TmfChartView;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Memory Usage View
+ *
+ * @author Matthew Khouzam
+ */
+public class MemoryUsageView extends TmfChartView {
+
+ /** ID string */
+ public static final String ID = "org.eclipse.linuxtools.lttng2.ust.memoryusage"; //$NON-NLS-1$
+
+ /**
+ * Constructor
+ */
+ public MemoryUsageView() {
+ super(Messages.MemoryUsageView_Title);
+ }
+
+ @Override
+ public void createPartControl(Composite parent) {
+ setChartViewer( new MemoryUsageViewer(parent));
+ super.createPartControl(parent);
+ }
+
+ @Override
+ public void setFocus() {
+ }
+}
--- /dev/null
+/**********************************************************************
+ * Copyright (c) 2014 Ericsson, École Polytechnique de Montréal
+ *
+ * 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:
+ * Bernd Hufmann - Initial API and implementation
+ * Geneviève Bastien - Create and use base class for XY plots
+ **********************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.linuxtools.internal.lttng2.ust.core.memoryusage.UstMemoryStrings;
+import org.eclipse.linuxtools.internal.tmf.core.Activator;
+import org.eclipse.linuxtools.lttng2.ust.core.analysis.memory.UstMemoryAnalysisModule;
+import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
+import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateSystemDisposedException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.StateValueTypeException;
+import org.eclipse.linuxtools.statesystem.core.exceptions.TimeRangeException;
+import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
+import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
+import org.eclipse.linuxtools.tmf.ui.viewers.xycharts.linecharts.TmfCommonXLineChartViewer;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Memory usage view
+ *
+ * @author Matthew Khouzam
+ */
+@SuppressWarnings("restriction")
+public class MemoryUsageViewer extends TmfCommonXLineChartViewer {
+
+ private TmfStateSystemAnalysisModule fModule = null;
+
+ private final Map<Integer, double[]> fYValues = new HashMap<>();
+ private final Map<Integer, Integer> fMemoryQuarks = new HashMap<>();
+ private final Map<Integer, String> fSeriesName = new HashMap<>();
+
+ private static final int BYTES_TO_KB = 1024;
+
+ // Timeout between updates in the updateData thread
+ private static final long BUILD_UPDATE_TIMEOUT = 500;
+
+ /**
+ * Constructor
+ *
+ * @param parent
+ * parent view
+ */
+ public MemoryUsageViewer(Composite parent) {
+ super(parent, Messages.MemoryUsageViewer_Title, Messages.MemoryUsageViewer_XAxis, Messages.MemoryUsageViewer_YAxis);
+ }
+
+ @Override
+ protected void initializeDataSource() {
+ if (getTrace() != null) {
+ fModule = getTrace().getAnalysisModuleOfClass(TmfStateSystemAnalysisModule.class, UstMemoryAnalysisModule.ID);
+ if (fModule == null) {
+ return;
+ }
+ fModule.schedule();
+ }
+ }
+
+ @Override
+ protected void updateData(long start, long end, int nb, IProgressMonitor monitor) {
+ try {
+ if (getTrace() == null || fModule == null) {
+ return;
+ }
+ fModule.waitForInitialization();
+ ITmfStateSystem ss = fModule.getStateSystem();
+ /* Don't wait for the module completion, when it's ready, we'll know */
+ if (ss == null) {
+ return;
+ }
+
+ double[] xvalues = getXAxis(start, end, nb);
+ setXAxis(xvalues);
+
+ boolean complete = false;
+ long currentEnd = start;
+
+ while (!complete && currentEnd < end) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ complete = ss.waitUntilBuilt(BUILD_UPDATE_TIMEOUT);
+ currentEnd = ss.getCurrentEndTime();
+ List<Integer> tidQuarks = ss.getSubAttributes(-1, false);
+ long traceStart = getStartTime();
+ long traceEnd = getEndTime();
+ long offset = this.getTimeOffset();
+
+ /* Initialize quarks and series names */
+ for (int quark : tidQuarks) {
+ fYValues.put(quark, new double[xvalues.length]);
+ fMemoryQuarks.put(quark, ss.getQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_MEMORY_ATTRIBUTE));
+ int procNameQuark = ss.getQuarkRelative(quark, UstMemoryStrings.UST_MEMORY_PROCNAME_ATTRIBUTE);
+ try {
+ ITmfStateValue procnameValue = ss.querySingleState(start, procNameQuark).getStateValue();
+ String procname = new String();
+ if (!procnameValue.isNull()) {
+ procname = procnameValue.unboxStr();
+ }
+ fSeriesName.put(quark, new String(procname + ' ' + '(' + ss.getAttributeName(quark) + ')').trim());
+ } catch (TimeRangeException e) {
+ fSeriesName.put(quark, '(' + ss.getAttributeName(quark) + ')');
+ }
+ }
+
+ /*
+ * TODO: It should only show active threads in the time range. If a
+ * tid does not have any memory value (only 1 interval in the time
+ * range with value null or 0), then its series should not be
+ * displayed.
+ */
+ double yvalue = 0.0;
+ for (int i = 0; i < xvalues.length; i++) {
+ if (monitor.isCanceled()) {
+ return;
+ }
+ double x = xvalues[i];
+ long time = (long) x + offset;
+ // make sure that time is in the trace range after double to
+ // long conversion
+ time = time < traceStart ? traceStart : time;
+ time = time > traceEnd ? traceEnd : time;
+
+ for (int quark : tidQuarks) {
+ try {
+ yvalue = ss.querySingleState(time, fMemoryQuarks.get(quark)).getStateValue().unboxLong() / BYTES_TO_KB;
+ fYValues.get(quark)[i] = yvalue;
+ } catch (TimeRangeException e) {
+ fYValues.get(quark)[i] = 0;
+ }
+ }
+ }
+ for (int quark : tidQuarks) {
+ setSeries(fSeriesName.get(quark), fYValues.get(quark));
+ }
+ updateDisplay();
+ }
+ } catch (AttributeNotFoundException | StateValueTypeException | StateSystemDisposedException e) {
+ Activator.logError("Error updating the data of the Memory usage view", e); //$NON-NLS-1$
+ }
+ }
+
+}
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 École Polytechnique de Montréal
+ *
+ * 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:
+ * Geneviève Bastien - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * Translatable strings for the ust memory usage view
+ *
+ * @author Geneviève Bastien
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.lttng2.ust.ui.views.memusage.messages"; //$NON-NLS-1$
+ /** Title of the memory usage xy view */
+ public static String MemoryUsageView_Title;
+
+ /** Title of the memory viewer */
+ public static String MemoryUsageViewer_Title;
+ /** X axis caption */
+ public static String MemoryUsageViewer_XAxis;
+ /** Y axis caption */
+ public static String MemoryUsageViewer_YAxis;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
--- /dev/null
+###############################################################################
+# Copyright (c) 2014 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+MemoryUsageView_Title=Memory Usage
+MemoryUsageViewer_Title=Memory Allocation vs Time
+MemoryUsageViewer_XAxis=Time
+MemoryUsageViewer_YAxis=Usage (KB)
--- /dev/null
+/*******************************************************************************
+ * Copyright (c) 2014 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:
+ * Alexandre Montplaisir - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.lttng2.ust.ui.analysis.callstack;
+
+import org.eclipse.linuxtools.internal.lttng2.ust.core.trace.callstack.LttngUstCallStackProvider;
+import org.eclipse.linuxtools.lttng2.ust.core.trace.LttngUstTrace;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.ui.views.callstack.AbstractCallStackAnalysis;
+
+/**
+ * Call-stack analysis to populate the TMF CallStack View from UST cyg-profile
+ * events.
+ *
+ * @author Alexandre Montplaisir
+ * @since 3.0
+ */
+public class LttngUstCallStackAnalysis extends AbstractCallStackAnalysis {
+
+ @Override
+ public void setTrace(ITmfTrace trace) throws TmfAnalysisException {
+ if (!(trace instanceof LttngUstTrace)) {
+ throw new IllegalArgumentException("Trace should be of type LttngUstTrace"); //$NON-NLS-1$
+ }
+ super.setTrace(trace);
+ }
+
+ @Override
+ protected LttngUstTrace getTrace() {
+ return (LttngUstTrace) super.getTrace();
+ }
+
+ @Override
+ protected ITmfStateProvider createStateProvider() {
+ return new LttngUstCallStackProvider(getTrace());
+ }
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.tracecompass.lttng2.ust</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
--- /dev/null
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
--- /dev/null
+eclipse.preferences.version=1
+line.separator=\n
--- /dev/null
+###############################################################################
+# Copyright (c) 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+bin.includes = feature.xml,\
+ feature.properties,\
+ p2.inf
--- /dev/null
+###############################################################################
+# Copyright (c) 2009, 2013 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:
+# Ericsson - Initial API and implementation
+###############################################################################
+
+featureName=Trace Compass LTTng Userspace Analysis
+
+description=Plug-ins to integrate LTTng-UST analysis tools into the workbench. \
+Includes the LTTng (Linux Tracing Toolkit), TMF (Tracing and Monitoring Framework) \
+and CTF (Common Trace Format) features.
+
+featureProvider=Eclipse Trace Compass
+
+copyright=Copyright 2013 Ericsson
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- For PDE build, remove "ws" and "arch" -->
+<feature
+ id="org.eclipse.tracecompass.lttng2.ust"
+ label="%featureName"
+ version="3.2.0.qualifier"
+ provider-name="%featureProvider"
+ license-feature="org.eclipse.license"
+ license-feature-version="0.0.0">
+
+ <description>
+ %description
+ </description>
+
+ <copyright>
+ %copyright
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <url>
+ <update label="Linux Tools Update Site" url="http://download.eclipse.org/linuxtools/update"/>
+ </url>
+
+ <includes
+ id="org.eclipse.tracecompass.lttng2.control"
+ version="0.0.0"
+ name="Linux Tracing Toolkit next generation (LTTng)"/>
+
+ <includes
+ id="org.eclipse.linuxtools.tmf.ctf"
+ version="0.0.0"
+ name="CTF Support for TMF"/>
+
+ <requires>
+ <import plugin="org.eclipse.core.runtime"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.tracecompass.ctf.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.linuxtools.tmf.core" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.ui"/>
+ <import plugin="org.eclipse.ui.ide"/>
+ <import plugin="org.eclipse.linuxtools.tmf.ui" version="3.1.0" match="greaterOrEqual"/>
+ <import plugin="org.eclipse.help"/>
+ </requires>
+
+ <plugin
+ id="org.eclipse.tracecompass.lttng2.ust.core"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.tracecompass.lttng2.ust.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.linuxtools.lttng.help"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+</feature>
--- /dev/null
+instructions.configure=\
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:0,name:Linux Tools,enabled:false); \
+org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/linuxtools/updates-nightly,type:1,name:Linux Tools,enabled:false);
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (C) 2011, 2013 Red Hat Inc., 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
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <artifactId>org.eclipse.tracecompass</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>org.eclipse.tracecompass.lttng2.ust</artifactId>
+ <groupId>org.eclipse.tracecompass</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+
+ <name>Trace Compass LTTng Userspace Tracer Analysis Feature</name>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <plugin id="org.eclipse.linuxtools.lttng.help"/>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attached-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
<description>
Nightly builds of Trace Compass project.
</description>
- <feature url="features/org.eclipse.linuxtools.lttng2.kernel_0.0.0.qualifier.jar" id="org.eclipse.linuxtools.lttng2.kernel" version="0.0.0">
+ <feature url="features/org.eclipse.tracecompass.lttng2.kernel_0.0.0.qualifier.jar" id="org.eclipse.tracecompass.lttng2.kernel" version="0.0.0">
<category name="Trace Compass"/>
</feature>
- <feature url="features/org.eclipse.linuxtools.lttng2.ust_0.0.0.qualifier.jar" id="org.eclipse.linuxtools.lttng2.ust" version="0.0.0">
+ <feature url="features/org.eclipse.tracecompass.lttng2.ust_0.0.0.qualifier.jar" id="org.eclipse.tracecompass.lttng2.ust" version="0.0.0">
<category name="Trace Compass"/>
</feature>
<feature url="features/org.eclipse.tracecompass.gdbtrace_0.0.0.qualifier.jar" id="org.eclipse.tracecompass.gdbtrace" version="0.0.0">
<module>org.eclipse.tracecompass.target</module>
<module>org.eclipse.linuxtools.lttng.testing</module>
- <module>org.eclipse.linuxtools.lttng2.control</module>
- <module>org.eclipse.linuxtools.lttng2.control.core</module>
- <module>org.eclipse.linuxtools.lttng2.control.core.tests</module>
- <module>org.eclipse.linuxtools.lttng2.control.ui</module>
- <module>org.eclipse.linuxtools.lttng2.control.ui.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.control</module>
+ <module>org.eclipse.tracecompass.lttng2.control.core</module>
+ <module>org.eclipse.tracecompass.lttng2.control.core.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.control.ui</module>
+ <module>org.eclipse.tracecompass.lttng2.control.ui.tests</module>
- <module>org.eclipse.linuxtools.lttng2.kernel</module>
- <module>org.eclipse.linuxtools.lttng2.kernel.core</module>
- <module>org.eclipse.linuxtools.lttng2.kernel.core.tests</module>
- <module>org.eclipse.linuxtools.lttng2.kernel.ui</module>
- <module>org.eclipse.linuxtools.lttng2.kernel.ui.tests</module>
- <module>org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.kernel</module>
+ <module>org.eclipse.tracecompass.lttng2.kernel.core</module>
+ <module>org.eclipse.tracecompass.lttng2.kernel.core.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.kernel.ui</module>
+ <module>org.eclipse.tracecompass.lttng2.kernel.ui.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.kernel.ui.swtbot.tests</module>
- <module>org.eclipse.linuxtools.lttng2.ust</module>
- <module>org.eclipse.linuxtools.lttng2.ust.core</module>
- <module>org.eclipse.linuxtools.lttng2.ust.core.tests</module>
- <module>org.eclipse.linuxtools.lttng2.ust.ui</module>
- <module>org.eclipse.linuxtools.lttng2.ust.ui.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.ust</module>
+ <module>org.eclipse.tracecompass.lttng2.ust.core</module>
+ <module>org.eclipse.tracecompass.lttng2.ust.core.tests</module>
+ <module>org.eclipse.tracecompass.lttng2.ust.ui</module>
+ <module>org.eclipse.tracecompass.lttng2.ust.ui.tests</module>
<module>org.eclipse.tracecompass.gdbtrace</module>
<module>org.eclipse.tracecompass.gdbtrace.core</module>