Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'lttng/org.eclipse.linuxtools.tmf.analysis.xml.core')
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.classpath7
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.project34
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.resources.prefs2
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.core.prefs394
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.ui.prefs56
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.api.tools.prefs97
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.prefs32
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/META-INF/MANIFEST.MF18
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/about.html28
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/build.properties21
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.properties17
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.xml6
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/pom.xml45
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/schema/org.eclipse.linuxtools.tmf.analysis.xml.core.files.exsd114
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/core/Activator.java163
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlModelFactory.java112
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateAttribute.java56
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateValue.java78
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java217
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlEventHandler.java135
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlLocation.java125
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateAttribute.java327
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateChange.java218
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateValue.java495
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyModelFactory.java88
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateAttribute.java55
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateValue.java69
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteModelFactory.java87
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateAttribute.java61
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java375
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/ITmfXmlTopLevelElement.java34
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlStateSystemContainer.java52
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java41
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java252
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties15
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlCommon.xsd44
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlDefinition.xsd35
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd295
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlView.xsd178
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java96
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java185
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java85
43 files changed, 0 insertions, 4846 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.classpath b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.classpath
deleted file mode 100644
index 098194ca4b..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?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>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.project b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.project
deleted file mode 100644
index 9fb9fb08d5..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.linuxtools.tmf.analysis.xml.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>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.resources.prefs b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644
index 99f26c0203..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.resources.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.runtime.prefs b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644
index 5a0ad22d2a..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.core.runtime.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.core.prefs b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 9f3662cd78..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,394 +0,0 @@
-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
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.ui.prefs b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index 4fd0c7006a..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,56 +0,0 @@
-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
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.api.tools.prefs b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644
index acc3abd47c..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.api.tools.prefs
+++ /dev/null
@@ -1,97 +0,0 @@
-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
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.prefs b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index d92b94fd4b..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,32 +0,0 @@
-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
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/META-INF/MANIFEST.MF b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 30a372056d..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.2.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.linuxtools.tmf.analysis.xml.core;singleton:=true
-Bundle-Activator: org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Bundle-ActivationPolicy: lazy
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.linuxtools.tmf.core
-Export-Package: org.eclipse.linuxtools.internal.tmf.analysis.xml.core;x-friends:="org.eclipse.linuxtools.tmf.analysis.xml.core.tests",
- org.eclipse.linuxtools.tmf.analysis.xml.core.model,
- org.eclipse.linuxtools.tmf.analysis.xml.core.model.readonly,
- org.eclipse.linuxtools.tmf.analysis.xml.core.model.readwrite,
- org.eclipse.linuxtools.tmf.analysis.xml.core.module,
- org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/about.html b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/about.html
deleted file mode 100644
index c258ef55d8..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!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 (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). 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, &quot;Program&quot; 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 (&quot;Redistributor&quot;) 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
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/build.properties b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/build.properties
deleted file mode 100644
index c41c68cce4..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/build.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# 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/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.properties,\
- about.html,\
- plugin.xml
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.properties b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.properties
deleted file mode 100644
index d90d593f73..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-###############################################################################
-# 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:
-# École Polytechnique de Montréal - Initial API and implementation
-###############################################################################
-
-#Properties file for org.eclipse.linuxtools.tmf.core
-Bundle-Vendor = Eclipse Linux Tools
-Bundle-Name = Linux Tools TMF XML Analysis Core Plug-in
-
-extensionpoint.xml_files.name = Plugin's builtin XML files \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.xml b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.xml
deleted file mode 100644
index 6ebb1f6eab..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/plugin.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension-point id="org.eclipse.linuxtools.tmf.analysis.xml.core.files" name="%extensionpoint.xml_files.name" schema="schema/org.eclipse.linuxtools.tmf.analysis.xml.core.files.exsd"/>
-
-</plugin>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/pom.xml b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/pom.xml
deleted file mode 100644
index 3695da4e76..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/pom.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- 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
--->
-<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>linuxtools-lttng-parent</artifactId>
- <groupId>org.eclipse.linuxtools.lttng</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>org.eclipse.linuxtools.tmf.analysis.xml.core</artifactId>
- <version>1.2.0-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <name>Linux Tools TMF Xml 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.tmf</groupId>
-</project>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/schema/org.eclipse.linuxtools.tmf.analysis.xml.core.files.exsd b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/schema/org.eclipse.linuxtools.tmf.analysis.xml.core.files.exsd
deleted file mode 100644
index fbbefa1063..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/schema/org.eclipse.linuxtools.tmf.analysis.xml.core.files.exsd
+++ /dev/null
@@ -1,114 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.linuxtools.tmf.analysis.xml.core" xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.eclipse.linuxtools.tmf.analysis.xml.core" id="org.eclipse.linuxtools.tmf.analysis.xml.core.files" name="Builtin XML files"/>
- </appinfo>
- <documentation>
- This extension point is used by plugins to contribute built-in XML files to provide XML-defined components. The files will not be writeable, but they can be copied and modified locally in the workspace by a user.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="xmlfile" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
- a fully qualified identifier of the target extension point
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
- an optional identifier of the extension instance
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
- an optional name of the extension instance
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="xmlfile">
- <complexType>
- <attribute name="file" type="string" use="required">
- <annotation>
- <documentation>
- The path to the XML file containing the XML-defined components.
- </documentation>
- <appinfo>
- <meta.attribute kind="resource"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- 1.0
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- &lt;p&gt;
-The xml file path is relative to the plugin&apos;s root directory. Here is an example where a plugin adds an XML file name &apos;test_builtin.xml&apos; located in the &apos;test_xml_files&apos; directory.
-&lt;/p&gt;
-
-&lt;extension
- point=&quot;org.eclipse.linuxtools.tmf.analysis.xml.core.files&quot;&gt;
- &lt;xmlfile
- file=&quot;test_xml_files/test_builtin.xml&quot;&gt;
- &lt;/xmlfile&gt;
-&lt;/extension&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- &lt;p&gt;
-The XML file advertised by this extension point should validate with the XML plugin&apos;s XSD files, or otherwise, it will be ignored. To validate it with the XSD, it can be imported in a project from a running TMF before adding it to an extension point. Any error will be reported.
-&lt;/p&gt;
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- 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 &lt;a href=&quot;http://www.eclipse.org/legal/epl-v10.html&quot;&gt;http://www.eclipse.org/legal/epl-v10.html&lt;/a&gt;
- </documentation>
- </annotation>
-
-</schema>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/core/Activator.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/core/Activator.java
deleted file mode 100644
index 115b273be2..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/internal/tmf/analysis/xml/core/Activator.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*******************************************************************************
- * 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
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.tmf.analysis.xml.core;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- *
- * @author Geneviève Bastien
- */
-public class Activator extends Plugin {
-
- /** The plug-in ID */
- public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.analysis.xml.core"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator fPlugin;
-
- /**
- * The constructor
- */
- public Activator() {
- setDefault(this);
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- setDefault(this);
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- setDefault(null);
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return fPlugin;
- }
-
- // Sets plug-in instance
- private static void setDefault(Activator plugin) {
- fPlugin = plugin;
- }
-
- // ------------------------------------------------------------------------
- // Log an IStatus
- // ------------------------------------------------------------------------
-
- /**
- * Log an IStatus object directly
- *
- * @param status
- * The status to log
- */
- public static void log(IStatus status) {
- fPlugin.getLog().log(status);
- }
-
- // ------------------------------------------------------------------------
- // Log INFO
- // ------------------------------------------------------------------------
-
- /**
- * Logs a message with severity INFO in the runtime log of the plug-in.
- *
- * @param message
- * A message to log
- */
- public static void logInfo(String message) {
- fPlugin.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
- * The corresponding exception
- */
- public static void logInfo(String message, Throwable exception) {
- fPlugin.getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
- }
-
- // ------------------------------------------------------------------------
- // Log WARNING
- // ------------------------------------------------------------------------
-
- /**
- * Logs a message and exception with severity WARNING in the runtime log of
- * the plug-in.
- *
- * @param message
- * A message to log
- */
- public static void logWarning(String message) {
- fPlugin.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
- * The corresponding exception
- */
- public static void logWarning(String message, Throwable exception) {
- fPlugin.getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
- }
-
- // ------------------------------------------------------------------------
- // Log ERROR
- // ------------------------------------------------------------------------
-
- /**
- * Logs a message and exception with severity ERROR in the runtime log of
- * the plug-in.
- *
- * @param message
- * A message to log
- */
- public static void logError(String message) {
- fPlugin.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
- * The corresponding exception
- */
- public static void logError(String message, Throwable exception) {
- fPlugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlModelFactory.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlModelFactory.java
deleted file mode 100644
index bf7bdde065..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlModelFactory.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model;
-
-import java.util.List;
-
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.w3c.dom.Element;
-
-/**
- * Interface to create XML model elements in different contexts. This allows to
- * reuse the same XML syntax and parsers, but use the elements differently
- * depending on the what is intended to be done with them.
- *
- * @author Geneviève Bastien
- */
-public interface ITmfXmlModelFactory {
-
- /**
- * Create a new XML state attribute
- *
- * @param attribute
- * XML element of the attribute
- * @param container
- * The state system container this state attribute belongs to
- * @return The new state attribute
- */
- ITmfXmlStateAttribute createStateAttribute(Element attribute, IXmlStateSystemContainer container);
-
- /**
- * Create a new state value where the value corresponds to a path of
- * {@link ITmfXmlStateAttribute}
- *
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param attributes
- * The attributes representing the path to this value
- * @return The new state value
- */
- ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes);
-
- /**
- * Create a new state value where the value corresponds to a field in an
- * event
- *
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param eventField
- * The event field where to get the value
- * @return The new state value
- */
- ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, String eventField);
-
- /**
- * Create a new XML condition
- *
- * @param node
- * The XML root of this condition
- * @param container
- * The state system container this condition belongs to
- * @return The new XML condition
- */
- TmfXmlCondition createCondition(Element node, IXmlStateSystemContainer container);
-
- /**
- * Create a new XML event handler
- *
- * @param node
- * The XML event handler element
- * @param container
- * The state system container this state value belongs to
- * @return The new XML event handler
- */
- TmfXmlEventHandler createEventHandler(Element node, IXmlStateSystemContainer container);
-
- /**
- * Create a new XML state change
- *
- * @param node
- * The XML state change element
- * @param container
- * The state system container this state change belongs to
- * @return The new XML state change
- */
- TmfXmlStateChange createStateChange(Element node, IXmlStateSystemContainer container);
-
- /**
- * Create a new XML location
- *
- * @param node
- * The XML location element
- * @param container
- * The state system container this location belongs to
- * @return The new XML location
- */
- TmfXmlLocation createLocation(Element node, IXmlStateSystemContainer container);
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateAttribute.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateAttribute.java
deleted file mode 100644
index efb362b793..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model;
-
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-
-/**
- * Interface that describe a state attribute defined in an XML element
- *
- * @author Geneviève Bastien
- */
-public interface ITmfXmlStateAttribute {
-
- /**
- * This method gets the quark for this state attribute in the State System.
- *
- * Unless this attribute is a location, in which case the quark must exist,
- * the quark will be added to the state system if the state system is in
- * builder mode.
- *
- * @param startQuark
- * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to search
- * the full attribute tree
- * @return the quark described by attribute or
- * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be found
- */
- int getAttributeQuark(int startQuark);
-
- /**
- * This method gets the quark for this state attribute in the State System.
- *
- * Unless this attribute is a location, in which case the quark must exist,
- * the quark will be added to the state system if the state system is in
- * builder mode.
- *
- * @param event
- * The current event being handled
- * @param startQuark
- * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to search
- * the full attribute tree
- * @return the quark described by attribute or
- * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be found
- */
- int getAttributeQuark(ITmfEvent event, int startQuark);
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateValue.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateValue.java
deleted file mode 100644
index 623d1fa3d1..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/ITmfXmlStateValue.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model;
-
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-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.tmf.core.event.ITmfEvent;
-
-/**
- * Interface that describe operations on a state value described in an XML
- * element
- *
- * @author Geneviève Bastien
- */
-public interface ITmfXmlStateValue {
-
- /**
- * Get the current {@link ITmfStateValue} of this state value for an event.
- * It does not increment the value and does not any other processing of the
- * value.
- *
- * @param event
- * The current event or <code>null</code> if no event is
- * available.
- * @return the {@link ITmfStateValue}
- * @throws AttributeNotFoundException
- * May be thrown by the state system during the query
- */
- ITmfStateValue getValue(@Nullable ITmfEvent event) throws AttributeNotFoundException;
-
- /**
- * Get the value of the event field that is the path of this state value
- *
- * @param event
- * The current event
- * @return the value of the event field
- */
- ITmfStateValue getEventFieldValue(@NonNull ITmfEvent event);
-
- /**
- * Get the list of state attributes, the path to the state value
- *
- * @return the list of Attribute to have the path in the State System
- */
- List<ITmfXmlStateAttribute> getAttributes();
-
- /**
- * Handles an event, by setting the value of the attribute described by the
- * state attribute path in the state system.
- *
- * @param event
- * The event to process
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- * @throws TimeRangeException
- * Pass through the exception it received
- * @throws StateValueTypeException
- * Pass through the exception it received
- */
- void handleEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException, StateValueTypeException, TimeRangeException;
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java
deleted file mode 100644
index 71679d2a4b..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlCondition.java
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique de Montreal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.statesystem.core.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.w3c.dom.Element;
-
-/**
- * This Class implement a condition tree in the XML-defined state system.
- *
- * <pre>
- * example:
- * <and>
- * <condition>
- * <stateAttribute type="location" value="CurrentThread" />
- * <stateAttribute type="constant" value="System_call" />
- * <stateValue type="null" />
- * </condition>
- * <condition>
- * </condition>
- * </and>
- * </pre>
- *
- * @author Florian Wininger
- */
-public class TmfXmlCondition {
-
- private final List<TmfXmlCondition> fConditions = new ArrayList<>();
- private final ITmfXmlStateValue fStateValue;
- private final ConditionOperator fOperator;
- private final IXmlStateSystemContainer fContainer;
-
- private enum ConditionOperator {
- NONE,
- NOT,
- AND,
- OR,
- }
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The XML root of this condition
- * @param container
- * The state system container this condition belongs to
- */
- public TmfXmlCondition(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer container) {
- fContainer = container;
-
- Element rootNode = node;
- /* Process the conditions: in each case, only process Element nodes */
- List<Element> childElements = XmlUtils.getChildElements(rootNode);
-
- /*
- * If the node is an if, take the child as the root condition
- *
- * FIXME: Maybe the caller should do this instead.
- */
- if (node.getNodeName().equals(TmfXmlStrings.IF)) {
- if (childElements.isEmpty()) {
- throw new IllegalArgumentException("TmfXmlCondition constructor: IF node has no child element"); //$NON-NLS-1$
- }
- rootNode = childElements.get(0);
- childElements = XmlUtils.getChildElements(rootNode);
- }
-
- switch (rootNode.getNodeName()) {
- case TmfXmlStrings.CONDITION:
- fOperator = ConditionOperator.NONE;
- /* The last element is a state value node */
- Element stateValueElement = childElements.remove(childElements.size() - 1);
-
- /*
- * A state value is either preceded by an eventField or a number of
- * state attributes
- */
- if (childElements.size() == 1 && childElements.get(0).getNodeName().equals(TmfXmlStrings.ELEMENT_FIELD)) {
- fStateValue = modelFactory.createStateValue(stateValueElement, fContainer, childElements.get(0).getAttribute(TmfXmlStrings.NAME));
- } else {
- List<ITmfXmlStateAttribute> attributes = new ArrayList<>();
- for (Element element : childElements) {
- if (!element.getNodeName().equals(TmfXmlStrings.STATE_ATTRIBUTE)) {
- throw new IllegalArgumentException("TmfXmlCondition: a condition either has a eventField element or a number of TmfXmlStateAttribute elements before the state value"); //$NON-NLS-1$
- }
- ITmfXmlStateAttribute attribute = modelFactory.createStateAttribute(element, fContainer);
- attributes.add(attribute);
- }
- fStateValue = modelFactory.createStateValue(stateValueElement, fContainer, attributes);
- }
- break;
- case TmfXmlStrings.NOT:
- fOperator = ConditionOperator.NOT;
- fStateValue = null;
- fConditions.add(modelFactory.createCondition(childElements.get(0), fContainer));
- break;
- case TmfXmlStrings.AND:
- fOperator = ConditionOperator.AND;
- fStateValue = null;
- for (Element condition : childElements) {
- fConditions.add(modelFactory.createCondition(condition, fContainer));
- }
- break;
- case TmfXmlStrings.OR:
- fOperator = ConditionOperator.OR;
- fStateValue = null;
- for (Element condition : childElements) {
- fConditions.add(modelFactory.createCondition(condition, fContainer));
- }
- break;
- default:
- throw new IllegalArgumentException("TmfXmlCondition constructor: XML node is of the wrong type"); //$NON-NLS-1$
- }
- }
-
- /**
- * Test the result of the condition for an event
- *
- * @param event
- * The event on which to test the condition
- * @return Whether the condition is true or not
- * @throws AttributeNotFoundException
- * The state attribute was not found
- */
- public boolean testForEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException {
- ITmfStateSystem ss = fContainer.getStateSystem();
- /*
- * The condition is either the equality check of a state value or a
- * boolean operation on other conditions
- */
- if (fStateValue != null) {
- ITmfXmlStateValue filter = fStateValue;
- int quark = IXmlStateSystemContainer.ROOT_QUARK;
- for (ITmfXmlStateAttribute attribute : filter.getAttributes()) {
- quark = attribute.getAttributeQuark(event, quark);
- /*
- * When verifying a condition, the state attribute must exist,
- * if it does not, the query is not valid, we stop the condition
- * check
- */
- if (quark == IXmlStateSystemContainer.ERROR_QUARK) {
- throw new AttributeNotFoundException();
- }
- }
-
- /* Get the value to compare to from the XML file */
- ITmfStateValue valueXML;
- valueXML = filter.getValue(event);
-
- /*
- * The actual value: it can be either queried in the state system or
- * found in the event
- */
- ITmfStateValue valueState = (quark != IXmlStateSystemContainer.ROOT_QUARK) ? ss.queryOngoingState(quark) :
- filter.getEventFieldValue(event);
-
- return valueXML.equals(valueState);
-
- } else if (!fConditions.isEmpty()) {
- /* Verify a condition tree */
- switch (fOperator) {
- case AND:
- for (TmfXmlCondition childCondition : fConditions) {
- if (!childCondition.testForEvent(event)) {
- return false;
- }
- }
- return true;
- case NONE:
- break;
- case NOT:
- return !fConditions.get(0).testForEvent(event);
- case OR:
- for (TmfXmlCondition childCondition : fConditions) {
- if (childCondition.testForEvent(event)) {
- return true;
- }
- }
- return false;
- default:
- break;
-
- }
- } else {
- throw new IllegalStateException("TmfXmlCondition: the condition should be either a state value or be the result of a condition tree"); //$NON-NLS-1$
- }
- return true;
- }
-
- @Override
- public String toString() {
- return "TmfXmlCondition: " + fOperator + " on " + fConditions; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlEventHandler.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlEventHandler.java
deleted file mode 100644
index 4540fa57ee..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlEventHandler.java
+++ /dev/null
@@ -1,135 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique de Montreal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
-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.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * This Class implements an EventHandler in the XML-defined state system
- *
- * <pre>
- * example:
- * <eventHandler eventName="eventName">
- * <stateChange>
- * ...
- * </stateChange>
- * <stateChange>
- * ...
- * </stateChange>
- * </eventHandler>
- * </pre>
- *
- * @author Florian Wininger
- */
-public class TmfXmlEventHandler {
-
- /* list of states changes */
- private final List<TmfXmlStateChange> fStateChangeList = new ArrayList<>();
- private final String fName;
- private final IXmlStateSystemContainer fParent;
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * XML event handler element
- * @param parent
- * The state system container this event handler belongs to
- */
- public TmfXmlEventHandler(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer parent) {
- fParent = parent;
- fName = node.getAttribute(TmfXmlStrings.HANDLER_EVENT_NAME);
-
- NodeList nodesChanges = node.getElementsByTagName(TmfXmlStrings.STATE_CHANGE);
- /* load state changes */
- for (int i = 0; i < nodesChanges.getLength(); i++) {
- TmfXmlStateChange stateChange = modelFactory.createStateChange((Element) nodesChanges.item(i), fParent);
- fStateChangeList.add(stateChange);
- }
- }
-
- private boolean appliesToEvent(ITmfEvent event) {
- String eventName = event.getType().getName();
-
- /* test for full name */
- if (eventName.equals(fName)) {
- return true;
- }
-
- /* test for the wildcard at the end */
- if ((fName.endsWith(TmfXmlStrings.WILDCARD) && eventName.startsWith(fName.replace(TmfXmlStrings.WILDCARD, TmfXmlStrings.NULL)))) {
- return true;
- }
- return false;
- }
-
- /**
- * If the event handler can handle the event, it applies all state changes
- * to modify the state system accordingly
- *
- * @param event
- * The trace event to handle
- */
- public void handleEvent(@NonNull ITmfEvent event) {
- if (!appliesToEvent(event)) {
- return;
- }
-
- /* Process all state changes */
- for (TmfXmlStateChange stateChange : fStateChangeList) {
- try {
- stateChange.handleEvent(event);
- } catch (AttributeNotFoundException ae) {
- /*
- * This would indicate a problem with the logic of the manager
- * here, so it shouldn't happen.
- */
- Activator.logError("Attribute not found", ae); //$NON-NLS-1$
- } catch (TimeRangeException tre) {
- /*
- * This would happen if the events in the trace aren't ordered
- * chronologically, which should never be the case ...
- */
- Activator.logError("TimeRangeException caught in the state system's event manager. Are the events in the trace correctly ordered?", tre); //$NON-NLS-1$
- } catch (StateValueTypeException sve) {
- /*
- * This would happen if we were trying to push/pop attributes
- * not of type integer. Which, once again, should never happen.
- */
- Activator.logError("State value type error", sve); //$NON-NLS-1$
- }
-
- }
-
- }
-
- @Override
- public String toString() {
- return "TmfXmlEventHandler: " + fName; //$NON-NLS-1$
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlLocation.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlLocation.java
deleted file mode 100644
index 817a3bed29..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlLocation.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique de Montreal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.model;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.w3c.dom.Element;
-
-/**
- * This Class implements a Location in the XML-defined state system, ie a named
- * shortcut to reach a given attribute, used in state attributes
- *
- * <pre>
- * example:
- * <location id="CurrentCPU">
- * <stateAttribute type="constant" value="CPUs" />
- * <stateAttribute type="eventField" name="cpu" />
- * ...
- * </location>
- * </pre>
- *
- * @author Florian Wininger
- */
-public class TmfXmlLocation {
-
- /** Path in the State System */
- private final List<ITmfXmlStateAttribute> fPath = new LinkedList<>();
-
- /** ID : name of the location */
- private final String fId;
- private final IXmlStateSystemContainer fContainer;
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param location
- * XML node element
- * @param container
- * The state system container this location belongs to
- */
- public TmfXmlLocation(ITmfXmlModelFactory modelFactory, Element location, IXmlStateSystemContainer container) {
- fId = location.getAttribute(TmfXmlStrings.ID);
- fContainer = container;
-
- List<Element> childElements = XmlUtils.getChildElements(location);
- for (Element attribute : childElements) {
- ITmfXmlStateAttribute xAttribute = modelFactory.createStateAttribute(attribute, fContainer);
- fPath.add(xAttribute);
- }
- }
-
- /**
- * Get the id of the location
- *
- * @return The id of a location
- */
- public String getId() {
- return fId;
- }
-
- /**
- * Get the quark for the path represented by this location
- *
- * @param event
- * The event being handled
- * @param startQuark
- * The starting quark for relative search, use
- * {@link IXmlStateSystemContainer#ROOT_QUARK} for the root of
- * the attribute tree
- * @return The quark at the leaf of the path
- */
- public int getLocationQuark(ITmfEvent event, int startQuark) {
- int quark = startQuark;
- for (ITmfXmlStateAttribute attrib : fPath) {
- quark = attrib.getAttributeQuark(event, quark);
- if (quark == IXmlStateSystemContainer.ERROR_QUARK) {
- break;
- }
- }
- return quark;
- }
-
- /**
- * Get the quark for the path represented by this location
- *
- * @param startQuark
- * The starting quark for relative search, use
- * {@link IXmlStateSystemContainer#ROOT_QUARK} for the root of
- * the attribute tree
- * @return The quark at the leaf of the path
- */
- public int getLocationQuark(int startQuark) {
- int quark = startQuark;
- for (ITmfXmlStateAttribute attrib : fPath) {
- quark = attrib.getAttributeQuark(quark);
- if (quark == IXmlStateSystemContainer.ERROR_QUARK) {
- break;
- }
- }
- return quark;
- }
-
- @Override
- public String toString() {
- return "TmfXmlLocation " + fId + ": " + fPath; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateAttribute.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateAttribute.java
deleted file mode 100644
index 020b4311e0..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateAttribute.java
+++ /dev/null
@@ -1,327 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique de Montreal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.model;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-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.statevalue.ITmfStateValue;
-import org.eclipse.linuxtools.statesystem.core.statevalue.TmfStateValue;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.w3c.dom.Element;
-
-/**
- * This Class implements a single attribute value in the XML-defined state
- * system.
- *
- * <pre>
- * Examples:
- * <stateAttribute type="constant" value="Threads" />
- * <stateAttribute type="query" />
- * <stateAttribute type="constant" value="CPUs" />
- * <stateAttribute type="eventField" value="cpu" />
- * <stateAttribute type="constant" value="Current_thread" />
- * </attribute>
- * </pre>
- *
- * @author Florian Wininger
- */
-public abstract class TmfXmlStateAttribute implements ITmfXmlStateAttribute {
-
- private enum StateAttributeType {
- NONE,
- CONSTANT,
- EVENTFIELD,
- QUERY,
- LOCATION,
- SELF
- }
-
- /** Type of attribute */
- private final StateAttributeType fType;
-
- /** Attribute's name */
- private final String fName;
-
- /** List of attributes for a query */
- private final List<ITmfXmlStateAttribute> fQueryList = new LinkedList<>();
-
- private final IXmlStateSystemContainer fContainer;
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param attribute
- * XML element of the attribute
- * @param container
- * The state system container this state attribute belongs to
- */
- protected TmfXmlStateAttribute(ITmfXmlModelFactory modelFactory, Element attribute, IXmlStateSystemContainer container) {
- fContainer = container;
-
- switch (attribute.getAttribute(TmfXmlStrings.TYPE)) {
- case TmfXmlStrings.TYPE_CONSTANT:
- fType = StateAttributeType.CONSTANT;
- fName = fContainer.getAttributeValue(attribute.getAttribute(TmfXmlStrings.VALUE));
- break;
- case TmfXmlStrings.EVENT_FIELD:
- fType = StateAttributeType.EVENTFIELD;
- fName = fContainer.getAttributeValue(attribute.getAttribute(TmfXmlStrings.VALUE));
- break;
- case TmfXmlStrings.TYPE_LOCATION:
- fType = StateAttributeType.LOCATION;
- fName = fContainer.getAttributeValue(attribute.getAttribute(TmfXmlStrings.VALUE));
- break;
- case TmfXmlStrings.TYPE_QUERY:
- List<Element> childElements = XmlUtils.getChildElements(attribute);
- for (Element subAttributeNode : childElements) {
- ITmfXmlStateAttribute subAttribute = modelFactory.createStateAttribute(subAttributeNode, fContainer);
- fQueryList.add(subAttribute);
- }
- fType = StateAttributeType.QUERY;
- fName = null;
- break;
- case TmfXmlStrings.NULL:
- fType = StateAttributeType.NONE;
- fName = null;
- break;
- case TmfXmlStrings.TYPE_SELF:
- fType = StateAttributeType.SELF;
- fName = null;
- break;
- default:
- throw new IllegalArgumentException("TmfXmlStateAttribute constructor: The XML element is not of the right type"); //$NON-NLS-1$
- }
- }
-
- /**
- * This method gets the quark for this state attribute in the State System.
- *
- * Unless this attribute is a location, in which case the quark must exist,
- * the quark will be added to the state system if the state system is in
- * builder mode.
- *
- * @param startQuark
- * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to
- * search the full attribute tree
- * @return the quark described by attribute or
- * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be
- * found
- */
- @Override
- public int getAttributeQuark(int startQuark) {
- return getAttributeQuark(null, startQuark);
- }
-
- /**
- * Basic quark-retrieving method. Pass an attribute in parameter as an array
- * of strings, the matching quark will be returned. If the attribute does
- * not exist, it will add the quark to the state system if the context
- * allows it.
- *
- * See {@link ITmfStateSystemBuilder#getQuarkAbsoluteAndAdd(String...)}
- *
- * @param path
- * Full path to the attribute
- * @return The quark for this attribute
- * @throws AttributeNotFoundException
- * The attribute does not exist and cannot be added
- */
- protected abstract int getQuarkAbsoluteAndAdd(String... path) throws AttributeNotFoundException;
-
- /**
- * Quark-retrieving method, but the attribute is queried starting from the
- * startNodeQuark. If the attribute does not exist, it will add it to the
- * state system if the context allows it.
- *
- * See {@link ITmfStateSystemBuilder#getQuarkRelativeAndAdd(int, String...)}
- *
- * @param startNodeQuark
- * The quark of the attribute from which 'path' originates.
- * @param path
- * Relative path to the attribute
- * @return The quark for this attribute
- * @throws AttributeNotFoundException
- * The attribute does not exist and cannot be added
- */
- protected abstract int getQuarkRelativeAndAdd(int startNodeQuark, String... path) throws AttributeNotFoundException;
-
- /**
- * Get the state system associated with this attribute's container
- *
- * @return The state system associated with this state attribute
- */
- protected ITmfStateSystem getStateSystem() {
- return fContainer.getStateSystem();
- }
-
- /**
- * This method gets the quark for this state attribute in the State System.
- *
- * Unless this attribute is a location, in which case the quark must exist,
- * the quark will be added to the state system if the state system is in
- * builder mode.
- *
- * @param event
- * The current event being handled, or <code>null</code> if no
- * event available in the context
- * @param startQuark
- * root quark, use {@link IXmlStateSystemContainer#ROOT_QUARK} to
- * search the full attribute tree
- * @return the quark described by attribute or
- * {@link IXmlStateSystemContainer#ERROR_QUARK} if quark cannot be
- * found
- */
- @Override
- public int getAttributeQuark(@Nullable ITmfEvent event, int startQuark) {
- ITmfStateSystem ss = getStateSystem();
-
- try {
- switch (fType) {
- case CONSTANT: {
- int quark;
- if (startQuark == IXmlStateSystemContainer.ROOT_QUARK) {
- quark = getQuarkAbsoluteAndAdd(fName);
- } else {
- quark = getQuarkRelativeAndAdd(startQuark, fName);
- }
- return quark;
- }
- case EVENTFIELD: {
- int quark = IXmlStateSystemContainer.ERROR_QUARK;
- if (event == null) {
- Activator.logWarning("XML State attribute: looking for an event field, but event is null"); //$NON-NLS-1$
- return quark;
- }
- /* special case if field is CPU which is not in the field */
- if (fName.equals(TmfXmlStrings.CPU)) {
- quark = getQuarkRelativeAndAdd(startQuark, event.getSource());
- } else {
- final ITmfEventField content = event.getContent();
- /* stop if the event field doesn't exist */
- if (content.getField(fName) == null) {
- return IXmlStateSystemContainer.ERROR_QUARK;
- }
-
- Object field = content.getField(fName).getValue();
-
- if (field instanceof String) {
- String fieldString = (String) field;
- quark = getQuarkRelativeAndAdd(startQuark, fieldString);
- } else if (field instanceof Long) {
- Long fieldLong = (Long) field;
- quark = getQuarkRelativeAndAdd(startQuark, fieldLong.toString());
- } else if (field instanceof Integer) {
- Integer fieldInterger = (Integer) field;
- quark = getQuarkRelativeAndAdd(startQuark, fieldInterger.toString());
- }
- }
- return quark;
- }
- case QUERY: {
- int quark;
- ITmfStateValue value = TmfStateValue.nullValue();
- int quarkQuery = IXmlStateSystemContainer.ROOT_QUARK;
-
- for (ITmfXmlStateAttribute attrib : fQueryList) {
- quarkQuery = attrib.getAttributeQuark(event, quarkQuery);
- if (quarkQuery == IXmlStateSystemContainer.ERROR_QUARK) {
- break;
- }
- }
-
- // the query may fail: for example CurrentThread if there
- // has not been a sched_switch event
- if (quarkQuery != IXmlStateSystemContainer.ERROR_QUARK) {
- value = ss.queryOngoingState(quarkQuery);
- }
-
- switch (value.getType()) {
- case INTEGER: {
- int result = value.unboxInt();
- quark = getQuarkRelativeAndAdd(startQuark, String.valueOf(result));
- break;
- }
- case LONG: {
- long result = value.unboxLong();
- quark = getQuarkRelativeAndAdd(startQuark, String.valueOf(result));
- break;
- }
- case STRING: {
- String result = value.unboxStr();
- quark = getQuarkRelativeAndAdd(startQuark, result);
- break;
- }
- case DOUBLE:
- case NULL:
- default:
- quark = IXmlStateSystemContainer.ERROR_QUARK; // error
- break;
- }
- return quark;
- }
- case LOCATION: {
- int quark = startQuark;
- String idLocation = fName;
-
- /* TODO: Add a fContainer.getLocation(id) method */
- for (TmfXmlLocation location : fContainer.getLocations()) {
- if (location.getId().equals(idLocation)) {
- quark = location.getLocationQuark(event, quark);
- if (quark == IXmlStateSystemContainer.ERROR_QUARK) {
- break;
- }
- }
- }
- return quark;
- }
- case SELF:
- return startQuark;
- case NONE:
- default:
- return startQuark;
- }
- } catch (AttributeNotFoundException ae) {
- /*
- * This can be happen before the creation of the node for a query in
- * the state system. Example : current thread before a sched_switch
- */
- return IXmlStateSystemContainer.ERROR_QUARK;
- } catch (StateValueTypeException e) {
- /*
- * This would happen if we were trying to push/pop attributes not of
- * type integer. Which, once again, should never happen.
- */
- Activator.logError("StateValueTypeException", e); //$NON-NLS-1$
- return IXmlStateSystemContainer.ERROR_QUARK;
- }
- }
-
- @Override
- public String toString() {
- return "TmfXmlStateAttribute " + fType + ": " + fName; //$NON-NLS-1$ //$NON-NLS-2$
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateChange.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateChange.java
deleted file mode 100644
index f21e322381..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateChange.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique de Montreal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-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.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
-/**
- * This Class implement a State Change in the XML-defined state system
- *
- * <pre>
- * example 1: Simple state change
- * <stateChange>
- * <stateAttribute type="location" value="CurrentThread" />
- * <stateAttribute type="constant" value="System_call" />
- * <stateValue type="null" />
- * </stateChange>
- *
- * example 2: Conditional state change
- * <stateChange>
- * <if>
- * <condition>
- * <stateAttribute type="location" value="CurrentThread" />
- * <stateAttribute type="constant" value="System_call" />
- * <stateValue type="null" />
- * </condition>
- * </if>
- * <then>
- * <stateAttribute type="location" value="CurrentThread" />
- * <stateAttribute type="constant" value="Status" />
- * <stateValue int="$PROCESS_STATUS_RUN_USERMODE"/>
- * </then>
- * <else>
- * <stateAttribute type="location" value="CurrentThread" />
- * <stateAttribute type="constant" value="Status" />
- * <stateValue int="$PROCESS_STATUS_RUN_SYSCALL"/>
- * </else>
- * </stateChange>
- * </pre>
- *
- * @author Florian Wininger
- */
-public class TmfXmlStateChange {
-
- private final IXmlStateChange fChange;
- private final IXmlStateSystemContainer fContainer;
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param statechange
- * XML node root of this state change
- * @param container
- * The state system container this state change belongs to
- */
- public TmfXmlStateChange(ITmfXmlModelFactory modelFactory, Element statechange, IXmlStateSystemContainer container) {
- fContainer = container;
-
- /*
- * child nodes is either a list of TmfXmlStateAttributes and
- * TmfXmlStateValues, or an if-then-else series of nodes.
- */
- Node ifNode = statechange.getElementsByTagName(TmfXmlStrings.IF).item(0);
- if (ifNode != null) {
- /* the state change has a condition */
- fChange = new XmlConditionalChange(modelFactory, statechange);
- } else {
- /* the state change does not have a condition */
- fChange = new XmlStateValueChange(modelFactory, statechange);
- }
- }
-
- /**
- * Execute the state change for an event. If necessary, it validates the
- * condition and executes the required change.
- *
- * @param event
- * The event to process
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- * @throws TimeRangeException
- * Pass through the exception it received
- * @throws StateValueTypeException
- * Pass through the exception it received
- */
- public void handleEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException, StateValueTypeException, TimeRangeException {
- fChange.handleEvent(event);
- }
-
- @Override
- public String toString() {
- return "TmfXmlStateChange: " + fChange; //$NON-NLS-1$
- }
-
- /* Interface for both private classes to handle the event */
- private interface IXmlStateChange {
- void handleEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException, StateValueTypeException, TimeRangeException;
- }
-
- /**
- * Conditional state change with a condition to verify
- */
- private class XmlConditionalChange implements IXmlStateChange {
- private final TmfXmlCondition fCondition;
- private final TmfXmlStateChange fThenChange;
- private final TmfXmlStateChange fElseChange;
-
- public XmlConditionalChange(ITmfXmlModelFactory modelFactory, Element statechange) {
- /*
- * The if node exists, it has been verified before calling this
- */
- Node ifNode = statechange.getElementsByTagName(TmfXmlStrings.IF).item(0);
- fCondition = modelFactory.createCondition((Element) ifNode, fContainer);
-
- Node thenNode = statechange.getElementsByTagName(TmfXmlStrings.THEN).item(0);
- if (thenNode == null) {
- throw new IllegalArgumentException("Conditional state change: there should be a then clause."); //$NON-NLS-1$
- }
- fThenChange = modelFactory.createStateChange((Element) thenNode, fContainer);
-
- Node elseNode = statechange.getElementsByTagName(TmfXmlStrings.ELSE).item(0);
- if (elseNode != null) {
- fElseChange = modelFactory.createStateChange((Element) elseNode, fContainer);
- } else {
- fElseChange = null;
- }
- }
-
- @Override
- public void handleEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException, StateValueTypeException, TimeRangeException {
- TmfXmlStateChange toExecute = fThenChange;
- try {
- if (!fCondition.testForEvent(event)) {
- toExecute = fElseChange;
- }
- } catch (AttributeNotFoundException e) {
- /*
- * An attribute in the condition did not exist (yet), return
- * from the state change
- */
- return;
- }
-
- if (toExecute == null) {
- return;
- }
- toExecute.handleEvent(event);
- }
-
- @Override
- public String toString() {
- return "Condition: " + fCondition; //$NON-NLS-1$
- }
- }
-
- /**
- * State change with no condition
- */
- private class XmlStateValueChange implements IXmlStateChange {
- private final ITmfXmlStateValue fValue;
-
- public XmlStateValueChange(ITmfXmlModelFactory modelFactory, Element statechange) {
- List<Element> childElements = XmlUtils.getChildElements(statechange);
-
- /*
- * Last child element is the state value, the others are attributes
- * to reach to value to set
- */
- Element stateValueElement = childElements.remove(childElements.size() - 1);
- List<ITmfXmlStateAttribute> attributes = new ArrayList<>();
- for (Element element : childElements) {
- if (!element.getNodeName().equals(TmfXmlStrings.STATE_ATTRIBUTE)) {
- throw new IllegalArgumentException("TmfXmlStateChange: a state change must have only TmfXmlStateAttribute elements before the state value"); //$NON-NLS-1$
- }
- ITmfXmlStateAttribute attribute = modelFactory.createStateAttribute(element, fContainer);
- attributes.add(attribute);
- }
- if (attributes.isEmpty()) {
- throw new IllegalArgumentException("TmfXmlStateChange: a state change must have at least one TmfXmlStateAttribute element before the state value"); //$NON-NLS-1$
- }
- fValue = modelFactory.createStateValue(stateValueElement, fContainer, attributes);
- }
-
- @Override
- public void handleEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException, StateValueTypeException, TimeRangeException {
- fValue.handleEvent(event);
- }
-
- @Override
- public String toString() {
- return "Value: " + fValue; //$NON-NLS-1$
- }
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateValue.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateValue.java
deleted file mode 100644
index 2b30ca9f06..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/TmfXmlStateValue.java
+++ /dev/null
@@ -1,495 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique de Montreal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.model;
-
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-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.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
-import org.w3c.dom.Element;
-
-/**
- * This Class implements a State Value in the XML-defined state system, along
- * with the path to get to the value (either a list of state attributes or an
- * event field)
- *
- * <pre>
- * Example:
- * <stateAttribute type="location" value="CurrentThread" />
- * <stateAttribute type="constant" value="System_call" />
- * <stateValue type="null" />
- * </pre>
- *
- * @author Florian Wininger
- */
-public abstract class TmfXmlStateValue implements ITmfXmlStateValue {
-
- private final TmfXmlStateValueBase fStateValue;
-
- /* Path in the State System */
- private final List<ITmfXmlStateAttribute> fPath;
- /* Event field to match with this state value */
- private final String fEventField;
-
- /* Whether this state value is an increment of the previous value */
- private final boolean fIncrement;
- /* Stack value */
- private final ValueTypeStack fStackType;
- /* Forced value type */
- private final ITmfStateValue.Type fForcedType;
-
- private final IXmlStateSystemContainer fContainer;
-
- /**
- * Different behaviors of an attribute that is to be stacked
- */
- protected enum ValueTypeStack {
- /** Not stacked */
- NULL,
- /** Peek at the value at the top of the stack */
- PEEK,
- /** Take the value at the top of the stack */
- POP,
- /** Push the value on the stack */
- PUSH;
-
- /**
- * Get the type stack value corresponding to a string
- *
- * @param input
- * The string to match to a value
- * @return The ValueTypeStack value
- */
- public static ValueTypeStack getTypeFromString(String input) {
- switch (input) {
- case TmfXmlStrings.STACK_PUSH:
- return PUSH;
- case TmfXmlStrings.STACK_POP:
- return POP;
- case TmfXmlStrings.STACK_PEEK:
- return PEEK;
- default:
- return NULL;
- }
- }
- }
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param eventField
- * The event field where to get the value
- * @param attributes
- * The attributes representing the path to this value
- */
- protected TmfXmlStateValue(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes, String eventField) {
- fPath = attributes;
- fContainer = container;
- fEventField = eventField;
- if (!node.getNodeName().equals(TmfXmlStrings.STATE_VALUE)) {
- throw new IllegalArgumentException("TmfXmlStateValue constructor: Element is not a stateValue"); //$NON-NLS-1$
- }
-
- /* Check if there is an increment for the value */
- fIncrement = Boolean.parseBoolean(node.getAttribute(TmfXmlStrings.INCREMENT));
-
- /* Process the XML Element state value */
- fStateValue = initializeStateValue(modelFactory, node);
-
- /*
- * Forced type allows to convert the value to a certain type : For
- * example, a process's TID in an event field may arrive with a LONG
- * format but we want to store the data in an INT
- */
- switch (node.getAttribute(TmfXmlStrings.FORCED_TYPE)) {
- case TmfXmlStrings.TYPE_STRING:
- fForcedType = ITmfStateValue.Type.STRING;
- break;
- case TmfXmlStrings.TYPE_INT:
- fForcedType = ITmfStateValue.Type.INTEGER;
- break;
- case TmfXmlStrings.TYPE_LONG:
- fForcedType = ITmfStateValue.Type.LONG;
- break;
- default:
- fForcedType = ITmfStateValue.Type.NULL;
- }
-
- /*
- * Stack Actions : allow to define a stack with PUSH/POP/PEEK methods
- */
- String stack = node.getAttribute(TmfXmlStrings.ATTRIBUTE_STACK);
- fStackType = ValueTypeStack.getTypeFromString(stack);
- }
-
- /**
- * Initialize a {@link TmfXmlStateValueBase} object for the type and value
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The state value XML element
- * @return The internal state value type corresponding to this state value
- */
- protected TmfXmlStateValueBase initializeStateValue(ITmfXmlModelFactory modelFactory, Element node) {
- return new TmfXmlStateValueNull();
- }
-
- /**
- * Return the state system container this class is attached to
- *
- * @return The state system container
- */
- protected IXmlStateSystemContainer getSsContainer() {
- return fContainer;
- }
-
- /**
- * Get the state system associated with this value's container
- *
- * @return The state system associated with the state system container
- */
- protected ITmfStateSystem getStateSystem() {
- return fContainer.getStateSystem();
- }
-
- /**
- * Return whether this value is an increment of the previous value
- *
- * @return <code>true</code> if the value is an increment
- */
- protected boolean isIncrement() {
- return fIncrement;
- }
-
- /**
- * Get the stack type of this attribute. If the attribute is to be pushed or
- * popped to a stack. The behavior of the stack attribute will depend on the
- * implementation of the model.
- *
- * @return The stack type of the attribute
- */
- protected ValueTypeStack getStackType() {
- return fStackType;
- }
-
- /**
- * Get the forced type of the value. For example, if the value obtained from
- * the attributes is not in this forced type, it will be converted to this.
- *
- * @return The desired type of the value
- */
- protected ITmfStateValue.Type getForcedType() {
- return fForcedType;
- }
-
- /**
- * Get the current {@link ITmfStateValue} of this state value for an event.
- * It does not increment the value and does not any other processing of the
- * value.
- *
- * @param event
- * The current event, or <code>null</code> if no event available.
- * @return the {@link ITmfStateValue}
- * @throws AttributeNotFoundException
- * May be thrown by the state system during the query
- */
- @Override
- public ITmfStateValue getValue(@Nullable ITmfEvent event) throws AttributeNotFoundException {
- return fStateValue.getValue(event);
- }
-
- /**
- * Get the value of the event field that is the path of this state value
- *
- * @param event
- * The current event
- * @return the value of the event field
- */
- @Override
- public ITmfStateValue getEventFieldValue(@NonNull ITmfEvent event) {
- return getEventFieldValue(event, fEventField);
- }
-
- /**
- * Get the value of an event field
- *
- * @param event
- * The current event
- * @param fieldName
- * The name of the field of which to get the value
- * @return The value of the event field
- */
- protected ITmfStateValue getEventFieldValue(@NonNull ITmfEvent event, String fieldName) {
-
- ITmfStateValue value = TmfStateValue.nullValue();
-
- final ITmfEventField content = event.getContent();
-
- /* Exception for "CPU", returns the source of this event */
- /* FIXME : Nameclash if a eventfield have "cpu" for name. */
- if (fieldName.equals(TmfXmlStrings.CPU)) {
- return TmfStateValue.newValueInt(Integer.valueOf(event.getSource()));
- }
- /* Exception also for "TIMESTAMP", returns the timestamp of this event */
- if (fieldName.equals(TmfXmlStrings.TIMESTAMP)) {
- return TmfStateValue.newValueLong(event.getTimestamp().getValue());
- }
- if (content.getField(fieldName) == null) {
- return value;
- }
-
- Object field = content.getField(fieldName).getValue();
-
- /*
- * Try to find the right type. The type can be forced by
- * "forcedType" argument.
- */
-
- if (field instanceof String) {
- String fieldString = (String) field;
-
- switch (fForcedType) {
- case INTEGER:
- value = TmfStateValue.newValueInt(Integer.parseInt(fieldString));
- break;
- case LONG:
- value = TmfStateValue.newValueLong(Long.parseLong(fieldString));
- break;
- case DOUBLE:
- value = TmfStateValue.newValueDouble(Double.parseDouble(fieldString));
- break;
- case NULL:
- case STRING:
- default:
- value = TmfStateValue.newValueString(fieldString);
- break;
- }
- } else if (field instanceof Long) {
- Long fieldLong = (Long) field;
-
- switch (fForcedType) {
- case INTEGER:
- value = TmfStateValue.newValueInt(fieldLong.intValue());
- break;
- case STRING:
- value = TmfStateValue.newValueString(fieldLong.toString());
- break;
- case DOUBLE:
- value = TmfStateValue.newValueDouble(fieldLong.doubleValue());
- break;
- case LONG:
- case NULL:
- default:
- value = TmfStateValue.newValueLong(fieldLong);
- break;
- }
- } else if (field instanceof Integer) {
- Integer fieldInteger = (Integer) field;
-
- switch (fForcedType) {
- case LONG:
- value = TmfStateValue.newValueLong(fieldInteger.longValue());
- break;
- case STRING:
- value = TmfStateValue.newValueString(fieldInteger.toString());
- break;
- case DOUBLE:
- value = TmfStateValue.newValueDouble(fieldInteger.doubleValue());
- break;
- case INTEGER:
- case NULL:
- default:
- value = TmfStateValue.newValueInt(fieldInteger);
- break;
- }
- } else if (field instanceof Double) {
- Double fieldDouble = (Double) field;
-
- switch (fForcedType) {
- case LONG:
- value = TmfStateValue.newValueLong(fieldDouble.longValue());
- break;
- case STRING:
- value = TmfStateValue.newValueString(fieldDouble.toString());
- break;
- case INTEGER:
- value = TmfStateValue.newValueInt(fieldDouble.intValue());
- break;
- case DOUBLE:
- case NULL:
- default:
- value = TmfStateValue.newValueDouble(fieldDouble);
- break;
- }
- }
- return value;
- }
-
- /**
- * Get the list of state attributes, the path to the state value
- *
- * @return the list of Attribute to have the path in the State System
- */
- @Override
- public List<ITmfXmlStateAttribute> getAttributes() {
- return fPath;
- }
-
- /**
- * Handles an event, by setting the value of the attribute described by the
- * state attribute path in the state system.
- *
- * @param event
- * The event to process
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- * @throws TimeRangeException
- * Pass through the exception it received
- * @throws StateValueTypeException
- * Pass through the exception it received
- */
- @Override
- public void handleEvent(@NonNull ITmfEvent event) throws AttributeNotFoundException, StateValueTypeException, TimeRangeException {
- int quark = IXmlStateSystemContainer.ROOT_QUARK;
-
- for (ITmfXmlStateAttribute attribute : fPath) {
- quark = attribute.getAttributeQuark(event, quark);
- /* the query is not valid, we stop the state change */
- if (quark == IXmlStateSystemContainer.ERROR_QUARK) {
- throw new AttributeNotFoundException("Not found XML attribute " + attribute); //$NON-NLS-1$
- }
- }
-
- long ts = event.getTimestamp().getValue();
- fStateValue.handleEvent(event, quark, ts);
- }
-
- @Override
- public String toString() {
- return "TmfXmlStateValue: " + fStateValue; //$NON-NLS-1$
- }
-
- /**
- * Base class for all state values. Contain default methods to handle event,
- * process or increment the value
- */
- protected abstract class TmfXmlStateValueBase {
-
- /**
- * Get the value associated with this state value.
- *
- * @param event
- * The event which can be used to retrieve the value if
- * necessary. The event can be <code>null</code> if no event
- * is required.
- * @return The state value corresponding to this XML state value
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- */
- public abstract ITmfStateValue getValue(@Nullable ITmfEvent event) throws AttributeNotFoundException;
-
- /**
- * Do something with the state value, possibly using an event
- *
- * @param event
- * The event being handled. If there is no event is
- * available, use <code>null</code>.
- * @param quark
- * The quark for this value
- * @param timestamp
- * The timestamp of the event
- * @throws StateValueTypeException
- * Pass through the exception it received
- * @throws TimeRangeException
- * Pass through the exception it received
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- */
- public void handleEvent(@NonNull ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- if (fIncrement) {
- incrementValue(event, quark, timestamp);
- } else {
- ITmfStateValue value = getValue(event);
- processValue(quark, timestamp, value);
- }
- }
-
- /**
- * Set the value of a quark at a given timestamp.
- *
- * @param quark
- * The quark for this value
- * @param timestamp
- * The timestamp
- * @param value
- * The value of this state value
- * @throws TimeRangeException
- * Pass through the exception it received
- * @throws StateValueTypeException
- * Pass through the exception it received
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- */
- @SuppressWarnings("unused")
- protected void processValue(int quark, long timestamp, ITmfStateValue value) throws TimeRangeException, StateValueTypeException, AttributeNotFoundException {
- }
-
- /**
- * Increments the value of the parameter
- *
- * @param event
- * The event being handled
- * @param quark
- * The quark for this value
- * @param timestamp
- * The timestamp of the event
- * @throws StateValueTypeException
- * Pass through the exception it received
- * @throws TimeRangeException
- * Pass through the exception it received
- * @throws AttributeNotFoundException
- * Pass through the exception it received
- */
- @SuppressWarnings("unused")
- protected void incrementValue(ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- }
- }
-
- /* This state value uses a constant value, defined in the XML */
- private class TmfXmlStateValueNull extends TmfXmlStateValueBase {
-
- @Override
- public ITmfStateValue getValue(@Nullable ITmfEvent event) throws AttributeNotFoundException {
- return TmfStateValue.nullValue();
- }
-
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyModelFactory.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyModelFactory.java
deleted file mode 100644
index df6be51284..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyModelFactory.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model.readonly;
-
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlModelFactory;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateAttribute;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateValue;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlCondition;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlEventHandler;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlLocation;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateChange;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.readwrite.TmfXmlReadWriteModelFactory;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.w3c.dom.Element;
-
-/**
- * Concrete factory for XML model elements in read only mode
- *
- * @author Geneviève Bastien
- */
-public class TmfXmlReadOnlyModelFactory implements ITmfXmlModelFactory {
-
- private static ITmfXmlModelFactory fInstance = null;
-
- /**
- * Get the instance of this model creator
- *
- * @return The {@link TmfXmlReadWriteModelFactory} instance
- */
- @NonNull
- public static synchronized ITmfXmlModelFactory getInstance() {
- ITmfXmlModelFactory instance = fInstance;
- if (instance == null) {
- instance = new TmfXmlReadOnlyModelFactory();
- fInstance = instance;
- }
- return instance;
- }
-
- @Override
- public ITmfXmlStateAttribute createStateAttribute(Element attribute, IXmlStateSystemContainer container) {
- return new TmfXmlReadOnlyStateAttribute(this, attribute, container);
- }
-
- @Override
- public ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes) {
- return new TmfXmlReadOnlyStateValue(this, node, container, attributes);
- }
-
- @Override
- public ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, String eventField) {
- return new TmfXmlReadOnlyStateValue(this, node, container, eventField);
- }
-
- @Override
- public TmfXmlCondition createCondition(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlCondition(this, node, container);
- }
-
- @Override
- public TmfXmlEventHandler createEventHandler(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlEventHandler(this, node, container);
- }
-
- @Override
- public TmfXmlStateChange createStateChange(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlStateChange(this, node, container);
- }
-
- @Override
- public TmfXmlLocation createLocation(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlLocation(this, node, container);
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateAttribute.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateAttribute.java
deleted file mode 100644
index e3d53f39fb..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateAttribute.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model.readonly;
-
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateAttribute;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.w3c.dom.Element;
-
-/**
- * Implements a state attribute in a read only mode. See
- * {@link TmfXmlStateAttribute} for the syntax of this attribute.
- *
- * In read-only mode, attributes that are requested but do not exist in the
- * state system will not be added.
- *
- * @author Geneviève Bastien
- */
-public class TmfXmlReadOnlyStateAttribute extends TmfXmlStateAttribute {
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param attribute
- * The XML element corresponding to this attribute
- * @param container
- * The state system container this state value belongs to
- */
- public TmfXmlReadOnlyStateAttribute(TmfXmlReadOnlyModelFactory modelFactory, Element attribute, IXmlStateSystemContainer container) {
- super(modelFactory, attribute, container);
- }
-
- @Override
- protected int getQuarkAbsoluteAndAdd(String... path) throws AttributeNotFoundException {
- return getStateSystem().getQuarkAbsolute(path);
- }
-
- @Override
- protected int getQuarkRelativeAndAdd(int startNodeQuark, String... path) throws AttributeNotFoundException {
- return getStateSystem().getQuarkRelative(startNodeQuark, path);
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateValue.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateValue.java
deleted file mode 100644
index 99f3f8d041..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readonly/TmfXmlReadOnlyStateValue.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model.readonly;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateAttribute;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateValue;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.w3c.dom.Element;
-
-/**
- * Implements a state value is a read only mode. See {@link TmfXmlStateValue}
- * for the syntax of the state value.
- *
- * In read mode, a state value will typically be used to find a path to a value,
- * so the value is known and there is a path of attributes that should lead to
- * it.
- *
- * @author Geneviève Bastien
- */
-public class TmfXmlReadOnlyStateValue extends TmfXmlStateValue {
-
- /**
- * Constructor where the path to the value is a list of state attributes
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param attributes
- * The attributes representing the path to this value
- */
- public TmfXmlReadOnlyStateValue(TmfXmlReadOnlyModelFactory modelFactory, Element node,
- IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes) {
- super(modelFactory, node, container, attributes, null);
- }
-
- /**
- * Constructor where the path to the value is an event field
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param eventField
- * The event field where to get the value
- */
- public TmfXmlReadOnlyStateValue(TmfXmlReadOnlyModelFactory modelFactory, Element node,
- IXmlStateSystemContainer container, String eventField) {
- super(modelFactory, node, container, Collections.EMPTY_LIST, eventField);
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteModelFactory.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteModelFactory.java
deleted file mode 100644
index 1380bf08f2..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteModelFactory.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model.readwrite;
-
-import java.util.List;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlModelFactory;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateAttribute;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateValue;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlCondition;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlEventHandler;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlLocation;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateChange;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.w3c.dom.Element;
-
-/**
- * Concrete factory for XML model elements in read write mode
- *
- * @author Geneviève Bastien
- */
-public class TmfXmlReadWriteModelFactory implements ITmfXmlModelFactory {
-
- private static ITmfXmlModelFactory fInstance = null;
-
- /**
- * Get the instance of this model creator
- *
- * @return The {@link TmfXmlReadWriteModelFactory} instance
- */
- @NonNull
- public static synchronized ITmfXmlModelFactory getInstance() {
- ITmfXmlModelFactory instance = fInstance;
- if (instance == null) {
- instance = new TmfXmlReadWriteModelFactory();
- fInstance = instance;
- }
- return instance;
- }
-
- @Override
- public ITmfXmlStateAttribute createStateAttribute(Element attribute, IXmlStateSystemContainer container) {
- return new TmfXmlReadWriteStateAttribute(this, attribute, container);
- }
-
- @Override
- public ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes) {
- return new TmfXmlReadWriteStateValue(this, node, container, attributes);
- }
-
- @Override
- public ITmfXmlStateValue createStateValue(Element node, IXmlStateSystemContainer container, String eventField) {
- return new TmfXmlReadWriteStateValue(this, node, container, eventField);
- }
-
- @Override
- public TmfXmlCondition createCondition(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlCondition(this, node, container);
- }
-
- @Override
- public TmfXmlEventHandler createEventHandler(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlEventHandler(this, node, container);
- }
-
- @Override
- public TmfXmlStateChange createStateChange(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlStateChange(this, node, container);
- }
-
- @Override
- public TmfXmlLocation createLocation(Element node, IXmlStateSystemContainer container) {
- return new TmfXmlLocation(this, node, container);
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateAttribute.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateAttribute.java
deleted file mode 100644
index 4303f50c15..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateAttribute.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model.readwrite;
-
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystemBuilder;
-import org.eclipse.linuxtools.statesystem.core.exceptions.AttributeNotFoundException;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateAttribute;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.w3c.dom.Element;
-
-/**
- * Implements a state attribute in a read write mode. See
- * {@link TmfXmlStateAttribute} for the syntax of this attribute.
- *
- * In read-write mode, attributes that are requested but do not exist are added
- * to the state system.
- *
- * @author Geneviève Bastien
- */
-public class TmfXmlReadWriteStateAttribute extends TmfXmlStateAttribute {
-
- /**
- * Constructor
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param attribute
- * The XML element corresponding to this attribute
- * @param container
- * The state system container this state value belongs to
- */
- public TmfXmlReadWriteStateAttribute(TmfXmlReadWriteModelFactory modelFactory, Element attribute, IXmlStateSystemContainer container) {
- super(modelFactory, attribute, container);
- }
-
- @Override
- protected ITmfStateSystemBuilder getStateSystem() {
- return (ITmfStateSystemBuilder) super.getStateSystem();
- }
-
- @Override
- protected int getQuarkAbsoluteAndAdd(String... path) throws AttributeNotFoundException {
- return getStateSystem().getQuarkAbsoluteAndAdd(path);
- }
-
- @Override
- protected int getQuarkRelativeAndAdd(int startNodeQuark, String... path) throws AttributeNotFoundException {
- return getStateSystem().getQuarkRelativeAndAdd(startNodeQuark, path);
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java
deleted file mode 100644
index 18c8a58bbd..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/model/readwrite/TmfXmlReadWriteStateValue.java
+++ /dev/null
@@ -1,375 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.model.readwrite;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-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.analysis.xml.core.model.ITmfXmlModelFactory;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlStateAttribute;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlStateValue;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.w3c.dom.Element;
-
-/**
- * Implements a state value in a read write mode. See {@link TmfXmlStateValue}
- * for the syntax of the state value.
- *
- * In read/write mode, a state value can be considered as an assignation where
- * the state value is assigned to the quark represented by the state attributes
- *
- * @author Geneviève Bastien
- */
-public class TmfXmlReadWriteStateValue extends TmfXmlStateValue {
-
- /**
- * Constructor where the path to the value is a list of state attributes
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param attributes
- * The attributes representing the path to this value
- */
- public TmfXmlReadWriteStateValue(TmfXmlReadWriteModelFactory modelFactory, Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes) {
- this(modelFactory, node, container, attributes, null);
- }
-
- /**
- * Constructor where the path to the value is an event field
- *
- * @param modelFactory
- * The factory used to create XML model elements
- * @param node
- * The state value XML element
- * @param container
- * The state system container this state value belongs to
- * @param eventField
- * The event field where to get the value
- */
- public TmfXmlReadWriteStateValue(TmfXmlReadWriteModelFactory modelFactory, Element node, IXmlStateSystemContainer container, String eventField) {
- this(modelFactory, node, container, new ArrayList<ITmfXmlStateAttribute>(), eventField);
- }
-
- private TmfXmlReadWriteStateValue(ITmfXmlModelFactory modelFactory, Element node, IXmlStateSystemContainer container, List<ITmfXmlStateAttribute> attributes, String eventField) {
- super(modelFactory, node, container, attributes, eventField);
- }
-
- @Override
- protected ITmfStateSystemBuilder getStateSystem() {
- return (ITmfStateSystemBuilder) super.getStateSystem();
- }
-
- @Override
- protected TmfXmlStateValueBase initializeStateValue(ITmfXmlModelFactory modelFactory, Element node) {
- TmfXmlStateValueBase stateValueType = null;
- /* Process the XML Element state value */
- String type = node.getAttribute(TmfXmlStrings.TYPE);
- String value = getSsContainer().getAttributeValue(node.getAttribute(TmfXmlStrings.VALUE));
-
- switch (type) {
- case TmfXmlStrings.TYPE_INT: {
- /* Integer value */
- ITmfStateValue stateValue = TmfStateValue.newValueInt(Integer.parseInt(value));
- stateValueType = new TmfXmlStateValueTmf(stateValue);
- break;
- }
- case TmfXmlStrings.TYPE_LONG: {
- /* Long value */
- ITmfStateValue stateValue = TmfStateValue.newValueLong(Long.parseLong(value));
- stateValueType = new TmfXmlStateValueTmf(stateValue);
- break;
- }
- case TmfXmlStrings.TYPE_STRING: {
- /* String value */
- ITmfStateValue stateValue = TmfStateValue.newValueString(value);
- stateValueType = new TmfXmlStateValueTmf(stateValue);
- break;
- }
- case TmfXmlStrings.TYPE_NULL: {
- /* Null value */
- ITmfStateValue stateValue = TmfStateValue.nullValue();
- stateValueType = new TmfXmlStateValueTmf(stateValue);
- break;
- }
- case TmfXmlStrings.EVENT_FIELD:
- /* Event field */
- stateValueType = new TmfXmlStateValueEventField(value);
- break;
- case TmfXmlStrings.TYPE_EVENT_NAME:
- /* The value is the event name */
- stateValueType = new TmfXmlStateValueEventName();
- break;
- case TmfXmlStrings.TYPE_DELETE:
- /* Deletes the value of an attribute */
- stateValueType = new TmfXmlStateValueDelete();
- break;
- case TmfXmlStrings.TYPE_QUERY:
- /* Value is the result of a query */
- List<Element> children = XmlUtils.getChildElements(node);
- List<ITmfXmlStateAttribute> childAttributes = new ArrayList<>();
- for (Element child : children) {
- ITmfXmlStateAttribute queryAttribute = modelFactory.createStateAttribute(child, getSsContainer());
- childAttributes.add(queryAttribute);
- }
- stateValueType = new TmfXmlStateValueQuery(childAttributes);
- break;
- default:
- throw new IllegalArgumentException(String.format("TmfXmlStateValue constructor: unexpected element %s for stateValue type", type)); //$NON-NLS-1$
- }
- return stateValueType;
- }
-
- // ----------------------------------------------------------
- // Internal state value classes for the different types
- // ----------------------------------------------------------
-
- /**
- * Base class for all state value. Contain default methods to handle event,
- * process or increment the value
- */
- protected abstract class TmfXmlStateValueTypeReadWrite extends TmfXmlStateValueBase {
-
- @Override
- public final void handleEvent(ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- if (isIncrement()) {
- incrementValue(event, quark, timestamp);
- } else {
- ITmfStateValue value = getValue(event);
- processValue(quark, timestamp, value);
- }
- }
-
- @Override
- protected void processValue(int quark, long timestamp, ITmfStateValue value) throws AttributeNotFoundException, TimeRangeException, StateValueTypeException {
- switch (getStackType()) {
- case POP:
- getStateSystem().popAttribute(timestamp, quark);
- break;
- case PUSH:
- getStateSystem().pushAttribute(timestamp, value, quark);
- break;
- case NULL:
- case PEEK:
- default:
- getStateSystem().modifyAttribute(timestamp, value, quark);
- break;
- }
- }
-
- @Override
- protected void incrementValue(ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- getStateSystem().incrementAttribute(timestamp, quark);
- }
- }
-
- /* This state value uses a constant value, defined in the XML */
- private class TmfXmlStateValueTmf extends TmfXmlStateValueTypeReadWrite {
-
- private final ITmfStateValue fValue;
-
- public TmfXmlStateValueTmf(ITmfStateValue value) {
- fValue = value;
- }
-
- @Override
- public ITmfStateValue getValue(ITmfEvent event) {
- return fValue;
- }
-
- @Override
- public void incrementValue(ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- ITmfStateSystem ss = getStateSystem();
- switch (fValue.getType()) {
- case LONG: {
- long incrementLong = fValue.unboxLong();
- long currentValue = ss.queryOngoingState(quark).unboxLong();
- ITmfStateValue value = TmfStateValue.newValueLong(incrementLong + currentValue);
- processValue(quark, timestamp, value);
- return;
- }
- case INTEGER: {
- int increment = fValue.unboxInt();
- int currentValue = ss.queryOngoingState(quark).unboxInt();
- ITmfStateValue value = TmfStateValue.newValueInt(increment + currentValue);
- processValue(quark, timestamp, value);
- break;
- }
- case DOUBLE:
- case NULL:
- case STRING:
- default:
- Activator.logWarning("TmfXmlStateValue: The increment value is not a number type"); //$NON-NLS-1$
- break;
- }
- }
- }
-
- /* The state value uses the value of an event field */
- private class TmfXmlStateValueEventField extends TmfXmlStateValueTypeReadWrite {
-
- private final String fFieldName;
-
- public TmfXmlStateValueEventField(String field) {
- fFieldName = field;
- }
-
- @Override
- public ITmfStateValue getValue(ITmfEvent event) {
- if (event == null) {
- Activator.logWarning("XML State value: requested an event field, but event is null"); //$NON-NLS-1$
- return TmfStateValue.nullValue();
- }
- return getEventFieldValue(event, fFieldName);
- }
-
- @Override
- public void incrementValue(ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- ITmfStateSystem ss = getSsContainer().getStateSystem();
- ITmfStateValue incrementValue = getValue(event);
- switch (incrementValue.getType()) {
- case INTEGER: {
- int increment = incrementValue.unboxInt();
- int currentValue = ss.queryOngoingState(quark).unboxInt();
- ITmfStateValue value = TmfStateValue.newValueInt(increment + currentValue);
- processValue(quark, timestamp, value);
- break;
- }
- case LONG: {
- long incrementLong = incrementValue.unboxLong();
- long currentValue = ss.queryOngoingState(quark).unboxLong();
- ITmfStateValue value = TmfStateValue.newValueLong(incrementLong + currentValue);
- processValue(quark, timestamp, value);
- break;
- }
- case DOUBLE:
- case NULL:
- case STRING:
- default:
- Activator.logWarning(String.format("TmfXmlStateValue: The event field increment %s is not a number type but a %s", fFieldName, incrementValue.getType())); //$NON-NLS-1$
- break;
- }
- }
- }
-
- /* The state value is the event name */
- private class TmfXmlStateValueEventName extends TmfXmlStateValueTypeReadWrite {
-
- @Override
- public ITmfStateValue getValue(ITmfEvent event) {
- if (event == null) {
- Activator.logWarning("XML State value: request event name, but event is null"); //$NON-NLS-1$
- return TmfStateValue.nullValue();
- }
- return TmfStateValue.newValueString(event.getType().getName());
- }
-
- }
-
- /* The state value deletes an attribute */
- private class TmfXmlStateValueDelete extends TmfXmlStateValueTypeReadWrite {
-
- @Override
- public ITmfStateValue getValue(ITmfEvent event) throws AttributeNotFoundException {
- return TmfStateValue.nullValue();
- }
-
- @Override
- protected void processValue(int quark, long timestamp, ITmfStateValue value) throws TimeRangeException, AttributeNotFoundException {
- ITmfStateSystem ss = getStateSystem();
- if (!(ss instanceof ITmfStateSystemBuilder)) {
- throw new IllegalStateException("incrementValue should never be called when not building the state system"); //$NON-NLS-1$
- }
- ITmfStateSystemBuilder builder = (ITmfStateSystemBuilder) ss;
- builder.removeAttribute(timestamp, quark);
- }
-
- }
-
- /* The state value uses the result of a query */
- private class TmfXmlStateValueQuery extends TmfXmlStateValueTypeReadWrite {
-
- private final List<ITmfXmlStateAttribute> fQueryValue;
-
- public TmfXmlStateValueQuery(List<ITmfXmlStateAttribute> childAttributes) {
- fQueryValue = childAttributes;
- }
-
- @Override
- public ITmfStateValue getValue(ITmfEvent event) throws AttributeNotFoundException {
- /* Query the state system for the value */
- ITmfStateValue value = TmfStateValue.nullValue();
- int quarkQuery = IXmlStateSystemContainer.ROOT_QUARK;
- ITmfStateSystem ss = getStateSystem();
-
- for (ITmfXmlStateAttribute attribute : fQueryValue) {
- quarkQuery = attribute.getAttributeQuark(event, quarkQuery);
- if (quarkQuery == IXmlStateSystemContainer.ERROR_QUARK) {
- /* the query is not valid, we stop the state change */
- break;
- }
- }
- /*
- * the query can fail : for example, if a value is requested but has
- * not been set yet
- */
- if (quarkQuery != IXmlStateSystemContainer.ERROR_QUARK) {
- value = ss.queryOngoingState(quarkQuery);
- }
- return value;
- }
-
- @Override
- public void incrementValue(ITmfEvent event, int quark, long timestamp) throws StateValueTypeException, TimeRangeException, AttributeNotFoundException {
- ITmfStateSystem ss = getStateSystem();
- ITmfStateValue incrementValue = getValue(event);
- switch (incrementValue.getType()) {
- case INTEGER: {
- int increment = incrementValue.unboxInt();
- int currentValue = ss.queryOngoingState(quark).unboxInt();
- ITmfStateValue value = TmfStateValue.newValueInt(increment + currentValue);
- processValue(quark, timestamp, value);
- break;
- }
- case LONG: {
- long incrementLong = incrementValue.unboxLong();
- long currentValue = ss.queryOngoingState(quark).unboxLong();
- ITmfStateValue value = TmfStateValue.newValueLong(incrementLong + currentValue);
- processValue(quark, timestamp, value);
- break;
- }
- case DOUBLE:
- case NULL:
- case STRING:
- default:
- Activator.logWarning("TmfXmlStateValue: The query result increment is not a number type"); //$NON-NLS-1$
- break;
- }
- }
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/ITmfXmlTopLevelElement.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/ITmfXmlTopLevelElement.java
deleted file mode 100644
index cfb59591c2..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/ITmfXmlTopLevelElement.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.module;
-
-/**
- * Interface implemented by all classes representing XML top-level elements, for
- * example state providers and views
- *
- * @author Geneviève Bastien
- */
-public interface ITmfXmlTopLevelElement {
-
- /**
- * Get the requested value for an attribute. If the value is a pre-defined
- * value, we return the string corresponding in the defined values map in
- * the top-level XML element.
- *
- * @param name
- * the string to get
- * @return the actual string value
- */
- String getAttributeValue(String name);
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlStateSystemContainer.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlStateSystemContainer.java
deleted file mode 100644
index 0803dbac88..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/IXmlStateSystemContainer.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.module;
-
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlLocation;
-
-/**
- * Interface that all XML defined objects who provide, use or contain state
- * system must implement in order to use the state provider model elements in
- * {@link org.eclipse.linuxtools.tmf.analysis.xml.core.model} package
- *
- * @author Geneviève Bastien
- */
-public interface IXmlStateSystemContainer extends ITmfXmlTopLevelElement {
-
- /** Root quark, to get values at the root of the state system */
- static final int ROOT_QUARK = -1;
- /**
- * Error quark, value taken when a state system quark query is in error.
- *
- * FIXME: Originally in the code, the -1 was used for both root quark and
- * return errors, so it has the same value as root quark, but maybe it can
- * be changed to something else -2? A quark can never be negative
- */
- static final int ERROR_QUARK = -1;
-
- /**
- * Get the state system managed by this XML object
- *
- * @return The state system
- */
- ITmfStateSystem getStateSystem();
-
- /**
- * Get the list of locations defined in this top level XML element
- *
- * @return The list of {@link TmfXmlLocation}
- */
- Iterable<TmfXmlLocation> getLocations();
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java
deleted file mode 100644
index b8ac122f2f..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/Messages.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.module;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * Externalized messages for the XML analysis module package
- *
- * @author Geneviève Bastien
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.analysis.xml.core.module.messages"; //$NON-NLS-1$
-
- /** Error copying XML file to workspace folder */
- public static String XmlUtils_ErrorCopyingFile;
- /** XML parse error */
- public static String XmlUtils_XmlParseError;
- /** Error occurred while validating XML */
- public static String XmlUtils_XmlValidateError;
- /** XML validation error */
- public static String XmlUtils_XmlValidationError;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java
deleted file mode 100644
index 475eb78ed9..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/XmlUtils.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.module;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.channels.FileChannel;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.XMLConstants;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.transform.Source;
-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.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.internal.tmf.analysis.xml.core.Activator;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider.TmfXmlStrings;
-import org.eclipse.osgi.util.NLS;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Class containing some utilities for the XML plug-in packages: for example, it
- * manages the XML files and validates them
- *
- * @author Geneviève Bastien
- */
-public class XmlUtils {
-
- /** Sub-directory of the plug-in where XML files are stored */
- private static final String XML_DIRECTORY = "xml_files"; //$NON-NLS-1$
-
- /** Name of the XSD schema file */
- private static final String XSD = "xmlDefinition.xsd"; //$NON-NLS-1$
-
- /** Make this class non-instantiable */
- private XmlUtils() {
-
- }
-
- /**
- * Get the path where the XML files are stored. Create it if it does not
- * exist
- *
- * @return path to XML files
- */
- public static IPath getXmlFilesPath() {
- IPath path = Activator.getDefault().getStateLocation();
- path = path.addTrailingSeparator().append(XML_DIRECTORY);
-
- /* Check if directory exists, otherwise create it */
- File dir = path.toFile();
- if (!dir.exists() || !dir.isDirectory()) {
- dir.mkdirs();
- }
-
- return path;
- }
-
- /**
- * Validate the XML file input with the XSD schema
- *
- * @param xmlFile
- * XML file to validate
- * @return True if the XML validates
- */
- public static IStatus xmlValidate(File xmlFile) {
- URL url = XmlUtils.class.getResource(XSD);
- SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
- Source xmlSource = new StreamSource(xmlFile);
- try {
- Schema schema = schemaFactory.newSchema(url);
- Validator validator = schema.newValidator();
- validator.validate(xmlSource);
- } catch (SAXParseException e) {
- String error = NLS.bind(Messages.XmlUtils_XmlParseError, e.getLineNumber(), e.getLocalizedMessage());
- Activator.logError(error);
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- } catch (SAXException e) {
- String error = NLS.bind(Messages.XmlUtils_XmlValidationError, e.getLocalizedMessage());
- Activator.logError(error);
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- } catch (IOException e) {
- String error = Messages.XmlUtils_XmlValidateError;
- Activator.logError("IO exception occurred", e); //$NON-NLS-1$
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Adds an XML file to the plugin's path. The XML file should have been
- * validated using the {@link XmlUtils#xmlValidate(File)} method before
- * calling this method.
- *
- * @param fromFile
- * The XML file to add
- * @return Whether the file was successfully added
- */
- public static IStatus addXmlFile(File fromFile) {
-
- /* Copy file to path */
- File toFile = getXmlFilesPath().addTrailingSeparator().append(fromFile.getName()).toFile();
-
- try {
- if (!toFile.exists()) {
- toFile.createNewFile();
- }
- } catch (IOException e) {
- String error = Messages.XmlUtils_ErrorCopyingFile;
- Activator.logError(error, e);
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- }
-
- try (FileInputStream fis = new FileInputStream(fromFile);
- FileOutputStream fos = new FileOutputStream(toFile);
- FileChannel source = fis.getChannel();
- FileChannel destination = fos.getChannel();) {
- destination.transferFrom(source, 0, source.size());
- } catch (IOException e) {
- String error = Messages.XmlUtils_ErrorCopyingFile;
- Activator.logError(error, e);
- return new Status(IStatus.ERROR, Activator.PLUGIN_ID, error, e);
- }
- return Status.OK_STATUS;
- }
-
- /**
- * Get only the XML element children of an XML element.
- *
- * @param parent
- * The parent element to get children from
- * @return The list of children Element of the parent
- */
- public static List<Element> getChildElements(Element parent) {
- NodeList childNodes = parent.getChildNodes();
- List<Element> childElements = new ArrayList<>();
- for (int index = 0; index < childNodes.getLength(); index++) {
- if (childNodes.item(index).getNodeType() == Node.ELEMENT_NODE) {
- childElements.add((Element) childNodes.item(index));
- }
- }
- return childElements;
- }
-
- /**
- * Get the XML children element of an XML element, but only those of a
- * certain type
- *
- * @param parent
- * The parent element to get the children from
- * @param elementTag
- * The tag of the elements to return
- * @return The list of children {@link Element} of the parent
- */
- public static List<Element> getChildElements(Element parent, String elementTag) {
- /* get the state providers and find the corresponding one */
- NodeList nodes = parent.getElementsByTagName(elementTag);
- List<Element> childElements = new ArrayList<>();
-
- for (int i = 0; i < nodes.getLength(); i++) {
- Element node = (Element) nodes.item(i);
- if (node.getParentNode().equals(parent)) {
- childElements.add(node);
- }
- }
- return childElements;
- }
-
- /**
- * Return the node element corresponding to the requested type in the file.
- *
- * TODO: Nothing prevents from having duplicate type -> id in a same file.
- * That should not be allowed. If you want an element with the same ID as
- * another one, it should be in a different file and we should check it at
- * validation time.
- *
- * @param filePath
- * The absolute path to the XML file
- * @param elementType
- * The type of top level element to search for
- * @param elementId
- * The ID of the desired element
- * @return The XML element or <code>null</code> if not found
- */
- public static Element getElementInFile(String filePath, @NonNull String elementType, @NonNull String elementId) {
-
- if (filePath == null) {
- return null;
- }
-
- IPath path = new Path(filePath);
- File file = path.toFile();
- if (file == null || !file.exists() || !file.isFile() || !xmlValidate(file).isOK()) {
- return null;
- }
-
- try {
- /* Load the XML File */
- DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
- DocumentBuilder dBuilder;
-
- dBuilder = dbFactory.newDocumentBuilder();
- Document doc = dBuilder.parse(file);
- doc.getDocumentElement().normalize();
-
- /* get the state providers and find the corresponding one */
- NodeList nodes = doc.getElementsByTagName(elementType);
- Element foundNode = null;
-
- for (int i = 0; i < nodes.getLength(); i++) {
- Element node = (Element) nodes.item(i);
- String id = node.getAttribute(TmfXmlStrings.ID);
- if (id.equals(elementId)) {
- foundNode = node;
- }
- }
- return foundNode;
- } catch (ParserConfigurationException | SAXException | IOException e) {
- return null;
- }
-
- }
-
-}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties
deleted file mode 100644
index 2f81a3d996..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/messages.properties
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# 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
-###############################################################################
-XmlUtils_ErrorCopyingFile=An error occurred while copying the XML file to the TMF directory. The file was not imported.
-XmlUtils_XmlParseError=XML Parsing error at line {0}: {1}
-XmlUtils_XmlValidateError=An error occurred while validating the XML file.
-XmlUtils_XmlValidationError=Error validating XML file {0}
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlCommon.xsd b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlCommon.xsd
deleted file mode 100644
index 453a219155..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlCommon.xsd
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- ***************************************************************************
- * 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:
- * Florian Wininger - Initial API and implementation
- *************************************************************************** -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- attributeFormDefault="unqualified" elementFormDefault="qualified">
-
- <xs:complexType name="definedValue">
- <xs:annotation>
- <xs:documentation>Maps a string (usually a human-readable value used by the XML elements) to another string (a value in the system, which can be converted to an integer, long by the a stateValue element or used as-is).</xs:documentation></xs:annotation>
- <xs:attribute name="name" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The human-readable string to identify this value. This is what will be manipulated by the XML and shown to the end-user (if applicable).</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="value" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>A system value the 'name' maps to. It will usually not be shown to the end user.</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="color" type="xs:string" use="optional" >
- <xs:annotation>
- <xs:documentation>Optional color attribute to this mapping. This attribute is used in XML-defined views to represent this mapping.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="location">
- <xs:annotation>
- <xs:documentation>Define a path in a state system, that can then be used as a shortcut in other XML elements.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" >
- <xs:annotation>
- <xs:documentation>Define each element of the path represented by this location. For instance, if location "abc" has path "a/b/c", there would be a sequence of 3 stateAttribute elements of type constant.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The identifier of this location, used inside the XML element in the scope of which it is defined.</xs:documentation></xs:annotation></xs:attribute>
- <xs:anyAttribute />
- </xs:complexType>
-
-</xs:schema>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlDefinition.xsd b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlDefinition.xsd
deleted file mode 100644
index f6e059f796..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlDefinition.xsd
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- ***************************************************************************
- * 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:
- * Florian Wininger - Initial API and implementation
- *************************************************************************** -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- attributeFormDefault="unqualified" elementFormDefault="qualified">
-
- <xs:include schemaLocation="xmlCommon.xsd" />
- <xs:include schemaLocation="xmlStateProvider.xsd" />
- <xs:include schemaLocation="xmlView.xsd" />
- <xs:element name="tmfxml">
- <xs:complexType>
- <xs:choice maxOccurs="unbounded">
- <xs:element maxOccurs="unbounded" minOccurs="0" name="timeGraphView" type="timeGraphView" >
- <xs:annotation>
- <xs:documentation>Define a new time graph view.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="xyView" type="xyView" >
- <xs:annotation>
- <xs:documentation>Define a new XY chart view.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="stateProvider" type="stateProvider" >
- <xs:annotation>
- <xs:documentation>Define a new state provider</xs:documentation></xs:annotation></xs:element>
- </xs:choice>
- </xs:complexType>
- </xs:element>
-
-</xs:schema>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd
deleted file mode 100644
index dcafbfd6b6..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlStateProvider.xsd
+++ /dev/null
@@ -1,295 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- ***************************************************************************
- * 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:
- * Florian Wininger - Initial API and implementation
- *************************************************************************** -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- attributeFormDefault="unqualified" elementFormDefault="qualified">
-
- <xs:complexType name="stateProvider">
- <xs:annotation>
- <xs:documentation>Declares a data-driven state provider which defines how events change the state of attributes of the system. Each state provider defined in XML will become an analysis in TMF.</xs:documentation></xs:annotation>
- <xs:sequence maxOccurs="1" minOccurs="1">
- <xs:element maxOccurs="1" minOccurs="0" name="head" type="headProvider" >
- <xs:annotation>
- <xs:documentation>Provide meta-information on this state provider, like labels and applicable trace types.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="definedValue" type="definedValue" >
- <xs:annotation>
- <xs:documentation>Define a value that maps a string used in the state provider to a numbered value.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="location" type="location" >
- <xs:annotation>
- <xs:documentation>Declare shortcuts to frequently used attribute/data locations. For instance, if a path to an often-used attribute is CPUs/{event.some_field}/Threads/Status, it may be a good idea to put this path in a location and then use the location name in the event handlers.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="1" name="eventHandler" type="eventHandler" >
- <xs:annotation>
- <xs:documentation>Define how a given event will modify the state system being built. For each event in the trace that causes a state change, a event handler should be defined.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The unique ID of this state provider. It will be used to identify the analysis that will be built from this state provider.</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="version" type="xs:integer" use="required" >
- <xs:annotation>
- <xs:documentation>The version ID of this state provider. Whenever the state provider changes so that the resulting state system is different from previous versions, this version number should be bumped.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="headProvider">
- <xs:annotation>
- <xs:documentation>Declares the meta-information that can be defined for an XML state provider.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="traceType">
- <xs:annotation>
- <xs:documentation>Indicate that the state provider applies to a given trace type.</xs:documentation></xs:annotation>
- <xs:complexType>
- <xs:attribute name="id" use="required" >
- <xs:annotation>
- <xs:documentation>The ID of the trace type, as declared in a org.eclipse.linuxtools.tmf.core.tracetype extension point or a custom trace parser. For example: "org.eclipse.linuxtools.lttng2.kernel.tracetype" or "org.eclipse.linuxtools.lttng2.ust.tracetype" for respectively LTTng Kernel and LTTng UST traces.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="label">
- <xs:annotation>
- <xs:documentation>Add a label to the state provider. If provided, this text will be the name of the analysis that the user will see in TMF.</xs:documentation></xs:annotation>
- <xs:complexType>
- <xs:attribute name="value" >
- <xs:annotation>
- <xs:documentation>The text to name this state provider (and the analysis it will generate).</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="eventHandler">
- <xs:annotation>
- <xs:documentation>Define how an event modifies the state of the system. There should be one event handler for each event causing a state change.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="1" name="stateChange" type="stateChange" >
- <xs:annotation>
- <xs:documentation>Define how the state system is modified by the event. An event may cause more than one state change.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="eventName" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>Name of the event that causes a state change.</xs:documentation></xs:annotation></xs:attribute>
- <xs:anyAttribute />
- </xs:complexType>
-
- <xs:complexType name="stateChange">
- <xs:annotation>
- <xs:documentation>Define a change of state in the state system being built.</xs:documentation></xs:annotation>
- <xs:choice maxOccurs="1" minOccurs="1">
- <xs:sequence maxOccurs="1" minOccurs="1">
- <xs:annotation>
- <xs:documentation>Describe a single attribute assignation. Simply put: a state change where path/to/attribute=value.</xs:documentation></xs:annotation>
- <xs:element maxOccurs="unbounded" minOccurs="1" name="stateAttribute" type="stateAttribute" >
- <xs:annotation>
- <xs:documentation>Explain how to reach an attribute in the state system. It describes the path/to/attribute.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="1" name="stateValue" type="stateValue" >
- <xs:annotation>
- <xs:documentation>Explain how to obtain the value of the state attribute to modify.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:sequence maxOccurs="1" minOccurs="1">
- <xs:annotation>
- <xs:documentation>Describe a conditional state change, where different path conditions may lead to different state changes.</xs:documentation></xs:annotation>
- <xs:element maxOccurs="1" minOccurs="1" name="if" type="conditionSingle" >
- <xs:annotation>
- <xs:documentation>Define the condition to verify.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="1" name="then" type="stateChange" >
- <xs:annotation>
- <xs:documentation>Define the state change to use if the previous condition is true.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="else" type="stateChange" >
- <xs:annotation>
- <xs:documentation>Optionally define the state change to use if the condition is false.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- </xs:choice>
- </xs:complexType>
-
- <xs:complexType name="condition">
- <xs:annotation>
- <xs:documentation>Define a conditional statement. Conditions may use values of the state system or from the event being handled. This element defines a statement in the form of "if (some_path == value)".</xs:documentation></xs:annotation>
- <xs:sequence maxOccurs="1" minOccurs="1">
- <xs:choice maxOccurs="1" minOccurs="1">
- <xs:element maxOccurs="unbounded" minOccurs="1" name="stateAttribute" type="stateAttribute" >
- <xs:annotation>
- <xs:documentation>Compare the current value of an attribute of the state system.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="1" name="field" type="eventField" >
- <xs:annotation>
- <xs:documentation>Compare the value of an event field.</xs:documentation></xs:annotation></xs:element>
- </xs:choice>
- <xs:element maxOccurs="1" minOccurs="1" name="stateValue" type="stateValue" >
- <xs:annotation>
- <xs:documentation>Define the value to compare to.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:anyAttribute />
- </xs:complexType>
-
- <xs:complexType name="conditionSingle">
- <xs:annotation>
- <xs:documentation>Define a conditional statement with only one child. From this element, a condition may be composed of other conditional elements to create more complex conditional statements.</xs:documentation></xs:annotation>
- <xs:choice maxOccurs="1" minOccurs="1">
- <xs:element name="condition" type="condition" >
- <xs:annotation>
- <xs:documentation>Define a condition element, in the form "if (some_path == value)".</xs:documentation></xs:annotation></xs:element>
- <xs:element name="not" type="conditionSingle" >
- <xs:annotation>
- <xs:documentation>Negate the result of the following condition, allowing statements of the form "if (!cond)".</xs:documentation></xs:annotation></xs:element>
- <xs:element name="and" type="conditionMultiple" >
- <xs:annotation>
- <xs:documentation>ANDs 2 conditional statements, allowing statements of the form "if (condA AND condB)"</xs:documentation></xs:annotation></xs:element>
- <xs:element name="or" type="conditionMultiple" >
- <xs:annotation>
- <xs:documentation>ORs 2 conditional statements, allowing statements of the form "if (condA OR condB)"</xs:documentation></xs:annotation></xs:element>
- </xs:choice>
- <xs:anyAttribute />
- </xs:complexType>
-
- <xs:complexType name="conditionMultiple">
- <xs:annotation>
- <xs:documentation>Allows the composition of more than one conditional statements.</xs:documentation></xs:annotation>
- <xs:sequence maxOccurs="unbounded" minOccurs="1">
- <xs:element maxOccurs="1" minOccurs="0" name="condition" type="condition" >
- <xs:annotation>
- <xs:documentation>Define a condition element, in the form "if (some_path == value)".</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="or" type="conditionMultiple" >
- <xs:annotation>
- <xs:documentation>ORs 2 conditional statements, allowing statements of the form "if (condA OR condB)"</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="and" type="conditionMultiple" >
- <xs:annotation>
- <xs:documentation>ANDs 2 conditional statements, allowing statements of the form "if (condA AND condB)"</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="not" type="conditionSingle" >
- <xs:annotation>
- <xs:documentation>Negate the result of the following condition, allowing statements of the form "if (!cond)".</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:anyAttribute />
- </xs:complexType>
-
- <xs:complexType name="stateAttribute">
- <xs:annotation>
- <xs:documentation>Define a path to an attribute of the state system.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" >
- <xs:annotation>
- <xs:documentation>If the type is a "query", those stateAttribute elements describe the elements of the query.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="type" use="required">
- <xs:annotation>
- <xs:documentation>The type of path to this attribute. The meaning of those paths type will depend on the context where the stateAttribute is being used. Not all types will make sense everywhere.</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="null" >
- <xs:annotation>
- <xs:documentation>This type does not change the current attribute. Whatever attribute was the reference attribute at a given time, it will be returned as is.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="constant" >
- <xs:annotation>
- <xs:documentation>This type identifies the state system attribute by a constant string. For instance, if the first level attribute of the state system is "Threads", then a constant type with "Threads" value should be used.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="eventField" >
- <xs:annotation>
- <xs:documentation>This type identifies the attribute by the value of an event field. Note that the event field corresponds to the attribute name, not its value. For example, if the event has a field called "current_cpu" with a value of "2", "2" would be the attribute name we want.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="location" >
- <xs:annotation>
- <xs:documentation>This type indicates that the path to the attribute is at the specified location. Location simply avoids having to write full path to an attribute each time it is being used, but the location itself is a sequence of stateAttribute elements. For example, if we previously defined a location named "CurrentThead" for path "CPUs/{current_cpu}/CurrentThread", we can use a stateAttribute of type location with "CurrentThread" value.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="query" >
- <xs:annotation>
- <xs:documentation>This type indicates that the path to the attribute is the result of a query. If this type is selected, a sequence of stateAttribute elements needs to be specified for this state attribute. The result of the query is the attribute name of the current element. For example, if the attribute we want is the PID of the current process on CPU 0, that PID can be found through the query "CPUs/0/CurrentThread". The value of this attribute would be, for example, 1234, the attribute we are looking for.</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="value" type="xs:string" >
- <xs:annotation>
- <xs:documentation>The value of this state attribute. A value should be specified only if the type is "constant", "eventField" or "location".</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="stateValue">
- <xs:annotation>
- <xs:documentation>Define a value, that can be assigned to an attribute of the state system.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:annotation>
- <xs:documentation>For a "query" value type, a sequence of stateAttributes will define the query whose result is the value.</xs:documentation></xs:annotation>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="stateAttribute" ></xs:element>
- </xs:sequence>
- <xs:attribute name="type" use="required">
- <xs:annotation>
- <xs:documentation>The type of this state value. It will describe how to obtain to value and/or what to do with it.</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="null" >
- <xs:annotation>
- <xs:documentation>Indicate that the value is a null value.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="int" >
- <xs:annotation>
- <xs:documentation>The value is a constant of type integer.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="long" >
- <xs:annotation>
- <xs:documentation>The value is a constant of type long</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="string" >
- <xs:annotation>
- <xs:documentation>The value is a constant of type string</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="eventField" >
- <xs:annotation>
- <xs:documentation>The value is the content of an event field. The "value" attribute is the field name. To convert this field to a certain type, attribute "forcedType" may be used.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="eventName" >
- <xs:annotation>
- <xs:documentation>The value is the name of the event.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="delete" >
- <xs:annotation>
- <xs:documentation>Indicate that the attribute the value is to be applied to should be deleted.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="query" >
- <xs:annotation>
- <xs:documentation>The value is the result of a query to the state system. If this type is selected, a sequence of stateAttributes must be defined in this stateValue element.</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="increment" type="xs:boolean" >
- <xs:annotation>
- <xs:documentation>Indicate that the current value will be added to any previously available value.</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="stack">
- <xs:annotation>
- <xs:documentation>Indicate that a stack operation will be performed with the value</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="pop">
- <xs:annotation>
- <xs:documentation>The value will be popped from the stack</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="push">
- <xs:annotation>
- <xs:documentation>The value will be pushed on a stack</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="peek">
- <xs:annotation>
- <xs:documentation>The value will be peeked from the top of the stack, but it will stay there</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="forcedType">
- <xs:annotation>
- <xs:documentation>Indicate the desired type for the state value. If the value is not already of this type, a conversion will be attempted. The forcedType is used to convert values of event fields.</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="int" >
- <xs:annotation>
- <xs:documentation>The value should be an integer</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="long" >
- <xs:annotation>
- <xs:documentation>The value should be a long</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="string" >
- <xs:annotation>
- <xs:documentation>The value should be a double</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="value" type="xs:string" >
- <xs:annotation>
- <xs:documentation>Indicate what the value is. A value should be specified only if the type is int, long, string or event_field. See the documentation on types for information on what to put for value.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="eventField">
- <xs:annotation>
- <xs:documentation>This element is used in conditions where the value of an event field is compared to something else. It is not the same as the stateAttribute's type eventField, where the eventField is used as the name for an attribute to the state system.</xs:documentation></xs:annotation>
- <xs:attribute name="name" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>Indicate which field to use.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
-</xs:schema>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlView.xsd b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlView.xsd
deleted file mode 100644
index 1931843ea7..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/module/xmlView.xsd
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- ***************************************************************************
- * 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:
- * Florian Wininger - Initial API and implementation
- *************************************************************************** -->
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- attributeFormDefault="unqualified" elementFormDefault="qualified">
-
- <xs:complexType name="timeGraphView">
- <xs:annotation>
- <xs:documentation>Declares a data-driven time graph view, which defines how the view will display the results of an analysis. For now, only state system analysis are supported by this view.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="0" name="head" type="headOutput" >
- <xs:annotation>
- <xs:documentation>Provider meta-information on this view, like labels and analysis it applies to.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="definedValue" type="definedValue" >
- <xs:annotation>
- <xs:documentation>Define a mapping between a human-readable text and the value used in the analysis. The "definedValue"'s optional "color" attribute is the color with which this value will be displayed.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="entry" type="viewEntry" >
- <xs:annotation>
- <xs:documentation>Define how to determine the entries (lines) to show on the time graph view. An entry may have children entry elements defined as children, where children are sub-elements of this one (for example, child attributes in the state system). A parent/child relationship may be defined for entries of the same level. See the viewEntry element documentation for more details.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The unique identifier of this view element. It will be used by the framework to identify this view.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="xyView">
- <xs:annotation>
- <xs:documentation>Declares a data-driven XY chart view, which defines how the view will display the results of an analysis. For now, only state system analyses are supported by this view.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="0" name="head" type="headOutput" >
- <xs:annotation>
- <xs:documentation>Provider meta-information on this view, like labels and analyses it applies to.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="1" name="entry" type="xyViewEntry" >
- <xs:annotation>
- <xs:documentation>Define how to determine the entries (series) to show on the XY view. See the xyViewEntry element documentation for more details.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="id" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The unique identifier of this view element. It will be used by the framework to identify this view.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="headOutput">
- <xs:annotation>
- <xs:documentation>Declares the meta-information that can be defined for an XML time graph view.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="analysis">
- <xs:annotation>
- <xs:documentation>Indicate that the view applies to the analysis identified with the given ID. To have a view apply to an XML-defined state system analysis, you'd use the state provider ID in the "stateProvider" element.</xs:documentation></xs:annotation>
- <xs:complexType>
- <xs:attribute name="id" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The ID of the analysis this view applies to.</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="ssid" type="xs:string" use="optional" >
- <xs:annotation>
- <xs:documentation>The ID of the state system this view applies to. The attribute is used only if the analysis contains more than one state system.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
- </xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="label">
- <xs:annotation>
- <xs:documentation>Add a label to the time graph view. If provided, this text will be displayed to the user to identify this view, otherwise, the view's ID will be used.</xs:documentation></xs:annotation>
- <xs:complexType>
- <xs:attribute name="value" use="required" >
- <xs:annotation>
- <xs:documentation>The text used as a name for this time graph view.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-
- <xs:complexType name="viewEntry">
- <xs:annotation>
- <xs:documentation>Define a path to entries in the view. If this element is at the top level, the base path to reach the entry is the root of the state system. Otherwise, it will use the parent element's corresponding attribute as the base. Each view entry element corresponds to a time graph view entry that will actually be displayed.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="0" name="display" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>Indicate the attribute whose value will be displayed in the time graph (the value that changes over time). If this element is not specified, no entry will be created for this element, and all other elements will be ignored.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="id" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>Specify which attribute to use as ID for this entry. This ID will be used in the ID column in the view, and will also be used to build the tree if a parent element is specified. If this element is not present, the display attribute's name will be used as ID.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="parent" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>Specify how to find the parent's ID of this entry. By default, the parent/child hierarchy is the same as defined in the timeGraphView element of the XML file. This element will add to this default parent/child relationship so that elements at the same XML-defined level can still have a relationship.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="name" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>Specify how to find the name of this entry. Typically, the name will be human-readable. If not specified, the display attribute's name will be used as the name.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="entry" type="viewEntry" >
- <xs:annotation>
- <xs:documentation>Define child entries for this entry. Child entries will be shown as children of this entry (with or without additional parent/child relationship defined through the viewEntry element's "parent" element).</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="path" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The path of the entry in the state system. Wildcards '*' may be used. For example, to display entries from all CPUs, the path could be "CPUs/*" and one entry will be created for each sub-attribute of the "CPUs" attribute. Each entry will be used as the base for all child elements, unless specified otherwise.</xs:documentation></xs:annotation></xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="xyViewEntry">
- <xs:annotation>
- <xs:documentation>Define a path to entries in the view. If this element is at the top level, the base path to reach the entry is the root of the state system. Otherwise, it will use the parent element's corresponding attribute as the base. Each XY view entry element corresponds to a series in the resulting view.</xs:documentation></xs:annotation>
- <xs:sequence>
- <xs:element maxOccurs="1" minOccurs="0" name="display" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>Indicate the attribute whose value will be displayed in the time graph (the value that changes over time). If this element is not specified, no entry will be created for this element, and all other elements will be ignored.</xs:documentation></xs:annotation></xs:element>
- <xs:element maxOccurs="1" minOccurs="0" name="name" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>Specify how to find the name of this entry. Typically, the name will be human-readable. If not specified, the display attribute's name will be used as the name.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="path" type="xs:string" use="required" >
- <xs:annotation>
- <xs:documentation>The path of the entry in the state system. Wildcards '*' may be used. For example, to display entries from all CPUs, the path could be "CPUs/*" and one series will be created for each sub-attribute of the "CPUs" attribute. Each entry will be used as the base for all child elements, unless specified otherwise.</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="displayType" use="optional" default="absolute" >
- <xs:annotation>
- <xs:documentation>Indicate how to display the value, compared with preceding values.</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="absolute" >
- <xs:annotation>
- <xs:documentation>The value is shown as is.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="delta" >
- <xs:annotation>
- <xs:documentation>The value is the difference between the value at current timestamp and the value at the preceding timestamp.</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
-
- <xs:complexType name="viewStateAttribute">
- <xs:sequence>
- <xs:element maxOccurs="unbounded" minOccurs="0" name="stateAttribute" type="viewStateAttribute" >
- <xs:annotation>
- <xs:documentation>If the type is a "query", those stateAttribute elements describe the elements of the query.</xs:documentation></xs:annotation></xs:element>
- </xs:sequence>
- <xs:attribute name="type" use="required">
- <xs:annotation>
- <xs:documentation>The type of path to this attribute. The value of the other attributes will depend on the selected type.</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="constant" >
- <xs:annotation>
- <xs:documentation>This type identifies the state system attribute by a constant string. For instance, if the state system attribute to display is "Status", it would be a constant type with value "Status".</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="location" >
- <xs:annotation>
- <xs:documentation>This type indicates that the path to the attribute is at the specified location. A location avoids having to write the full path to an attribute every time it is being used. The location itself is a sequence of stateAttribute elements. For example, if we previously defined a location named "Procname" for path "Threads/tid/Procname", we can use a stateAttribute of type location with "Procname" value.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="query" >
- <xs:annotation>
- <xs:documentation>This type indicates that the path to the attribute is the result of a query. If this type is selected, a sequence of stateAttribute elements needs to be specified for this viewStateAttribute. The result of the query is the attribute name of the current element. For example, if the attribute we want is the PID of the current process on CPU 0, that PID can be found through the query "CPUs/0/CurrentThread". The value of this attribute would be for example 1234, which is the attribute we are looking for.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="self" >
- <xs:annotation>
- <xs:documentation>This type indicates that the requested attribute is the attribute itself. For this attribute, the reference is always relative (setting it to absolute will be ignored).</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- <xs:attribute name="value" type="xs:string" >
- <xs:annotation>
- <xs:documentation>The value of this state attribute. A value should be specified if the type is "constant" or "location".</xs:documentation></xs:annotation></xs:attribute>
- <xs:attribute name="reference" use="optional" default="relative">
- <xs:annotation>
- <xs:documentation>Specify which state system attribute to use as the base to reach this path. It is either absolute or relative. By default, it is relative to the current entry.</xs:documentation></xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:string">
- <xs:enumeration value="relative" >
- <xs:annotation>
- <xs:documentation>The path will be calculated starting from the entry under which this viewStateAttribute element is defined.</xs:documentation></xs:annotation></xs:enumeration>
- <xs:enumeration value="absolute" >
- <xs:annotation>
- <xs:documentation>The path will be calculated starting from the root of the state system. That means that if the entry itself is one of "CPUs/*", we could reach another attribute from the root of the state system, like "Threads/tid".</xs:documentation></xs:annotation></xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
- </xs:attribute>
- </xs:complexType>
-</xs:schema>
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java
deleted file mode 100644
index a3f61ef8a7..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/TmfXmlStrings.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ecole Polytechnique
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Florian Wininger - Initial implementation
- ******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-
-/**
- * This file defines all name in the XML Structure for the State Provider
- *
- * @author Florian Wininger
- * @noimplement This interface only contains static defines
- */
-@SuppressWarnings({ "javadoc", "nls" })
-@NonNullByDefault
-public interface TmfXmlStrings {
-
- /* XML generic Element attribute names */
- static final String VALUE = "value";
- static final String NAME = "name";
- static final String VERSION = "version";
- static final String TYPE = "type";
-
- /* XML header element */
- static final String HEAD = "head";
- static final String TRACETYPE = "traceType";
- static final String ID = "id";
- static final String LABEL = "label";
- static final String ANALYSIS = "analysis";
-
- /* XML String */
- static final String NULL = "";
- static final String WILDCARD = "*";
- static final String VARIABLE_PREFIX = "$";
- static final String COLOR = "color";
- static final String COLOR_PREFIX = "#";
-
- /* XML Element Name */
- static final String STATE_PROVIDER = "stateProvider";
- static final String DEFINED_VALUE = "definedValue";
- static final String LOCATION = "location";
- static final String EVENT_HANDLER = "eventHandler";
- static final String STATE_ATTRIBUTE = "stateAttribute";
- static final String STATE_VALUE = "stateValue";
- static final String STATE_CHANGE = "stateChange";
- static final String ELEMENT_FIELD = "field";
-
- /* XML Condition strings */
- static final String IF = "if";
- static final String CONDITION = "condition";
- static final String THEN = "then";
- static final String ELSE = "else";
-
- /* XML event handler strings */
- static final String HANDLER_EVENT_NAME = "eventName";
-
- /* XML constant for Type of Attribute and Value */
- static final String TYPE_NULL = "null";
- static final String TYPE_CONSTANT = "constant";
- static final String EVENT_FIELD = "eventField";
- static final String TYPE_LOCATION = "location";
- static final String TYPE_QUERY = "query";
- static final String TYPE_SELF = "self";
- static final String TYPE_INT = "int";
- static final String TYPE_LONG = "long";
- static final String TYPE_STRING = "string";
- static final String TYPE_EVENT_NAME = "eventName";
- static final String TYPE_DELETE = "delete";
- static final String INCREMENT = "increment";
- static final String FORCED_TYPE = "forcedType";
- static final String ATTRIBUTE_STACK = "stack";
- static final String STACK_POP = "pop";
- static final String STACK_PUSH = "push";
- static final String STACK_PEEK = "peek";
- static final String CPU = "cpu";
-
- /**
- * @since 1.2
- */
- static final String TIMESTAMP = "timestamp";
-
- /* Operator type */
- static final String NOT = "not";
- static final String AND = "and";
- static final String OR = "or";
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java
deleted file mode 100644
index 29267fd1c1..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateProvider.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*******************************************************************************
- * 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:
- * Florian Wininger - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.tmf.analysis.xml.core.stateprovider;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.linuxtools.statesystem.core.ITmfStateSystem;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.ITmfXmlModelFactory;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlEventHandler;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.TmfXmlLocation;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.model.readwrite.TmfXmlReadWriteModelFactory;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.IXmlStateSystemContainer;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
-import org.eclipse.linuxtools.tmf.core.statesystem.AbstractTmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
-import org.w3c.dom.Element;
-import org.w3c.dom.NodeList;
-
-/**
- * This is the state change input plug-in for TMF's state system which handles
- * the XML Format
- *
- * @author Florian Wininger
- */
-public class XmlStateProvider extends AbstractTmfStateProvider implements IXmlStateSystemContainer {
-
- private final IPath fFilePath;
- @NonNull private final String fStateId;
-
- /** List of all Event Handlers */
- private final Set<TmfXmlEventHandler> fEventHandlers = new HashSet<>();
-
- /** List of all Locations */
- private final Set<TmfXmlLocation> fLocations;
-
- /** Map for defined values */
- private final Map<String, String> fDefinedValues = new HashMap<>();
-
- // ------------------------------------------------------------------------
- // Constructor
- // ------------------------------------------------------------------------
-
- /**
- * Instantiate a new state provider plug-in.
- *
- * @param trace
- * The trace
- * @param stateid
- * The state system id, corresponding to the analysis_id
- * attribute of the state provider element of the XML file
- * @param file
- * Path to the XML file containing the state provider definition
- */
- public XmlStateProvider(ITmfTrace trace, @NonNull String stateid, IPath file) {
- super(trace, ITmfEvent.class, stateid);
- fStateId = stateid;
- fFilePath = file;
- Element doc = XmlUtils.getElementInFile(fFilePath.makeAbsolute().toOSString(), TmfXmlStrings.STATE_PROVIDER, fStateId);
- if (doc == null) {
- fLocations = new HashSet<>();
- return;
- }
-
- ITmfXmlModelFactory modelFactory = TmfXmlReadWriteModelFactory.getInstance();
- /* parser for defined Values */
- NodeList definedStateNodes = doc.getElementsByTagName(TmfXmlStrings.DEFINED_VALUE);
- for (int i = 0; i < definedStateNodes.getLength(); i++) {
- Element element = (Element) definedStateNodes.item(i);
- fDefinedValues.put(element.getAttribute(TmfXmlStrings.NAME), element.getAttribute(TmfXmlStrings.VALUE));
- }
-
- /* parser for the locations */
- NodeList locationNodes = doc.getElementsByTagName(TmfXmlStrings.LOCATION);
- Set<TmfXmlLocation> locations = new HashSet<>();
- for (int i = 0; i < locationNodes.getLength(); i++) {
- Element element = (Element) locationNodes.item(i);
- TmfXmlLocation location = modelFactory.createLocation(element, this);
- locations.add(location);
- }
- fLocations = Collections.unmodifiableSet(locations);
-
- /* parser for the event handlers */
- NodeList nodes = doc.getElementsByTagName(TmfXmlStrings.EVENT_HANDLER);
- for (int i = 0; i < nodes.getLength(); i++) {
- Element element = (Element) nodes.item(i);
- TmfXmlEventHandler handler = modelFactory.createEventHandler(element, this);
- fEventHandlers.add(handler);
- }
- }
-
- /**
- * Get the state id of the state provider
- *
- * @return The state id of the state provider
- */
- @NonNull
- public String getStateId() {
- return fStateId;
- }
-
- // ------------------------------------------------------------------------
- // IStateChangeInput
- // ------------------------------------------------------------------------
-
- @Override
- public int getVersion() {
- Element ssNode = XmlUtils.getElementInFile(fFilePath.makeAbsolute().toOSString(), TmfXmlStrings.STATE_PROVIDER, fStateId);
- if (ssNode != null) {
- return Integer.parseInt(ssNode.getAttribute(TmfXmlStrings.VERSION));
- }
- /*
- * The version attribute is mandatory and XML files that don't validate
- * with the XSD are ignored, so this should never happen
- */
- throw new IllegalStateException("The state provider XML node should have a version attribute"); //$NON-NLS-1$
- }
-
- @Override
- public XmlStateProvider getNewInstance() {
- return new XmlStateProvider(this.getTrace(), getStateId(), fFilePath);
- }
-
- @Override
- protected void eventHandle(ITmfEvent event) {
- if (event == null) {
- return;
- }
- for (TmfXmlEventHandler eventHandler : fEventHandlers) {
- eventHandler.handleEvent(event);
- }
- }
-
- @Override
- public ITmfStateSystem getStateSystem() {
- return ss;
- }
-
- // ------------------------------------------------------------------------
- // Operations
- // ------------------------------------------------------------------------
-
- @Override
- public Iterable<TmfXmlLocation> getLocations() {
- return fLocations;
- }
-
- /**
- * Get the defined value associated with a constant
- *
- * @param constant
- * The constant defining this value
- * @return The actual value corresponding to this constant
- */
- public String getDefinedValue(String constant) {
- return fDefinedValues.get(constant);
- }
-
- @Override
- public String getAttributeValue(String name) {
- String attribute = name;
- if (attribute.startsWith(TmfXmlStrings.VARIABLE_PREFIX)) {
- /* search the attribute in the map without the fist character $ */
- attribute = getDefinedValue(attribute.substring(1));
- }
- return attribute;
- }
-
-} \ No newline at end of file
diff --git a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java b/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java
deleted file mode 100644
index 66c8ee9a81..0000000000
--- a/lttng/org.eclipse.linuxtools.tmf.analysis.xml.core/src/org/eclipse/linuxtools/tmf/analysis/xml/core/stateprovider/XmlStateSystemModule.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * 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.tmf.analysis.xml.core.stateprovider;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.linuxtools.tmf.analysis.xml.core.module.XmlUtils;
-import org.eclipse.linuxtools.tmf.core.statesystem.ITmfStateProvider;
-import org.eclipse.linuxtools.tmf.core.statesystem.TmfStateSystemAnalysisModule;
-import org.w3c.dom.Element;
-
-/**
- * Analysis module for the data-driven state systems, defined in XML.
- *
- * @author Geneviève Bastien
- * @since 3.0
- */
-public class XmlStateSystemModule extends TmfStateSystemAnalysisModule {
-
- private @Nullable IPath fXmlFile;
-
- @Override
- protected StateSystemBackendType getBackendType() {
- return StateSystemBackendType.FULL;
- }
-
- @Override
- @NonNull
- protected ITmfStateProvider createStateProvider() {
- return new XmlStateProvider(getTrace(), getId(), fXmlFile);
- }
-
- @Override
- public String getName() {
- String name = getId();
- IPath xmlFile = fXmlFile;
- if (xmlFile == null) {
- return name;
- }
- Element doc = XmlUtils.getElementInFile(xmlFile.makeAbsolute().toString(), TmfXmlStrings.STATE_PROVIDER, getId());
- /* Label may be available in XML header */
- List<Element> head = XmlUtils.getChildElements(doc, TmfXmlStrings.HEAD);
- if (head.size() == 1) {
- List<Element> labels = XmlUtils.getChildElements(head.get(0), TmfXmlStrings.LABEL);
- if (!labels.isEmpty()) {
- name = labels.get(0).getAttribute(TmfXmlStrings.VALUE);
- }
- }
-
- return name;
- }
-
- /**
- * Sets the file path of the XML file containing the state provider
- *
- * @param file
- * The full path to the XML file
- */
- public void setXmlFile(IPath file) {
- fXmlFile = file;
- }
-
- /**
- * Get the path to the XML file containing this state provider definition.
- *
- * @return XML file path
- */
- public IPath getXmlFile() {
- return fXmlFile;
- }
-
-}

Back to the top