tmf: Integration of the pcap parser within TMF
authorVincent Perot <vincent.perot@ericsson.com>
Tue, 5 Aug 2014 21:02:10 +0000 (17:02 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Mon, 11 Aug 2014 20:00:53 +0000 (16:00 -0400)
Change-Id: I1f5cdac29ceaa8e513467965b889bf152d2f4edb
Signed-off-by: Vincent Perot <vincent.perot@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/28450
Tested-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
71 files changed:
org.eclipse.linuxtools.tmf.pcap.core/.classpath [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.project [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/META-INF/MANIFEST.MF [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/about.html [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/build.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/plugin.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/plugin.xml [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/pom.xml [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/Activator.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/PcapEventFactory.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/ProtocolConversion.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/analysis/StreamListAnalysis.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/analysis/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEventField.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEventType.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapRootEventField.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/TmfPacketStream.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/TmfPacketStreamBuilder.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/protocol/TmfProtocol.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/protocol/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.classpath [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.project [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/about.html [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/build.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/icons/network.png [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/icons/pcap.png [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/icons/pcapng.png [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/icons/stream_list_view.gif [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/plugin.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/plugin.xml [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/pom.xml [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/internal/tmf/pcap/ui/Activator.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/internal/tmf/pcap/ui/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/NetworkingPerspectiveFactory.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/PcapEventsTable.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/package-info.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/Messages.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/messages.properties [new file with mode: 0644]
org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/package-info.java [new file with mode: 0644]
pom.xml

diff --git a/org.eclipse.linuxtools.tmf.pcap.core/.classpath b/org.eclipse.linuxtools.tmf.pcap.core/.classpath
new file mode 100644 (file)
index 0000000..098194c
--- /dev/null
@@ -0,0 +1,7 @@
+<?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/org.eclipse.linuxtools.tmf.pcap.core/.project b/org.eclipse.linuxtools.tmf.pcap.core/.project
new file mode 100644 (file)
index 0000000..ea9c87f
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.tmf.pcap.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/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..b2b3622
--- /dev/null
@@ -0,0 +1,393 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=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=error
+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/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..4fd0c70
--- /dev/null
@@ -0,0 +1,56 @@
+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/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644 (file)
index 0000000..acc3abd
--- /dev/null
@@ -0,0 +1,97 @@
+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/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.pde.prefs b/org.eclipse.linuxtools.tmf.pcap.core/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..d92b94f
--- /dev/null
@@ -0,0 +1,32 @@
+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/org.eclipse.linuxtools.tmf.pcap.core/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.tmf.pcap.core/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..f8c18df
--- /dev/null
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.linuxtools.tmf.pcap.core;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.tmf.pcap.core.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.pcap.core
+Export-Package: org.eclipse.linuxtools.internal.tmf.pcap.core;x-internal:=true,
+ org.eclipse.linuxtools.internal.tmf.pcap.core.util;x-internal:=true,
+ org.eclipse.linuxtools.tmf.pcap.core.analysis,
+ org.eclipse.linuxtools.tmf.pcap.core.event,
+ org.eclipse.linuxtools.tmf.pcap.core.protocol,
+ org.eclipse.linuxtools.tmf.pcap.core.signal,
+ org.eclipse.linuxtools.tmf.pcap.core.trace
+Import-Package: com.google.common.collect
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/about.html b/org.eclipse.linuxtools.tmf.pcap.core/about.html
new file mode 100644 (file)
index 0000000..28737f6
--- /dev/null
@@ -0,0 +1,28 @@
+<!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/org.eclipse.linuxtools.tmf.pcap.core/build.properties b/org.eclipse.linuxtools.tmf.pcap.core/build.properties
new file mode 100644 (file)
index 0000000..78168e2
--- /dev/null
@@ -0,0 +1,22 @@
+###############################################################################
+# 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/,\
+               .,\
+               about.html,\
+               plugin.properties,\
+               plugin.xml
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/plugin.properties b/org.eclipse.linuxtools.tmf.pcap.core/plugin.properties
new file mode 100644 (file)
index 0000000..113c709
--- /dev/null
@@ -0,0 +1,19 @@
+###############################################################################
+# 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
+###############################################################################
+
+#Properties file for org.eclipse.linuxtools.tmf.pcap.core
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Pcap support for TMF Core Plug-in
+
+# Pcap trace type
+tracetype.category.pcap = Network Traces
+tracetype.type.pcap = Pcap Trace
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/plugin.xml b/org.eclipse.linuxtools.tmf.pcap.core/plugin.xml
new file mode 100644 (file)
index 0000000..15f4181
--- /dev/null
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.tracetype">
+      <category
+            id="org.eclipse.linuxtools.tmf.pcap.core.category"
+            name="Network">
+      </category>
+      <type
+            category="org.eclipse.linuxtools.tmf.pcap.core.category"
+            event_type="org.eclipse.linuxtools.tmf.core.event.TmfEvent"
+            id="org.eclipse.linuxtools.tmf.pcap.core.pcaptrace"
+            isDirectory="false"
+            name="Pcap Trace"
+            trace_type="org.eclipse.linuxtools.tmf.pcap.core.trace.PcapTrace">
+      </type>
+   </extension>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <module
+            analysis_module="org.eclipse.linuxtools.tmf.pcap.core.analysis.StreamListAnalysis"
+            automatic="true"
+            id="org.eclipse.linuxtools.tmf.pcap.core.analysis.stream"
+            name="Stream List">
+         <tracetype
+               applies="true"
+               class="org.eclipse.linuxtools.tmf.pcap.core.trace.PcapTrace">
+         </tracetype>
+         <tracetype
+               applies="true"
+               class="org.eclipse.linuxtools.tmf.core.trace.TmfExperiment">
+         </tracetype>
+      </module>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/pom.xml b/org.eclipse.linuxtools.tmf.pcap.core/pom.xml
new file mode 100644 (file)
index 0000000..3305d6d
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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
+-->
+<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.1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.linuxtools.tmf.pcap.core</artifactId>
+  <version>3.1.0-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>Pcap support for TMF Core Plug-in</name>
+
+ <build>
+    <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/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/Activator.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/Activator.java
new file mode 100644 (file)
index 0000000..86f2a81
--- /dev/null
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.pcap.core;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.Nullable;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>Activator</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     * The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.pcap.core"; //$NON-NLS-1$
+
+    /**
+     * The shared instance
+     */
+    private static @Nullable Activator fPlugin;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Constructor
+     */
+    public Activator() {
+        setDefault(this);
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns the TMF Core plug-in instance.
+     *
+     * @return the TMF Core plug-in instance.
+     */
+    public static @Nullable Activator getDefault() {
+        return fPlugin;
+    }
+
+    // Sets plug-in instance
+    private static void setDefault(@Nullable Activator plugin) {
+        fPlugin = plugin;
+    }
+
+    // ------------------------------------------------------------------------
+    // Plugin
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void start(@Nullable BundleContext context) throws Exception {
+        super.start(context);
+        setDefault(this);
+    }
+
+    @Override
+    public void stop(@Nullable BundleContext context) throws Exception {
+        setDefault(null);
+        super.stop(context);
+    }
+
+
+    // ------------------------------------------------------------------------
+    // Log an IStatus
+    // ------------------------------------------------------------------------
+
+    /**
+     * Log an IStatus object directly
+     *
+     * @param status
+     *            The status to log
+     */
+    public static void log(IStatus status) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/package-info.java
new file mode 100644 (file)
index 0000000..ce245a8
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.internal.tmf.pcap.core;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/Messages.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/Messages.java
new file mode 100644 (file)
index 0000000..46b5b97
--- /dev/null
@@ -0,0 +1,29 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.pcap.core.util;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.tmf.pcap.core.util.messages"; //$NON-NLS-1$
+    public static @Nullable String PcapEventFactory_LinkType;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/PcapEventFactory.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/PcapEventFactory.java
new file mode 100644 (file)
index 0000000..6f21b1a
--- /dev/null
@@ -0,0 +1,130 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.pcap.core.util;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.pcap.core.packet.Packet;
+import org.eclipse.linuxtools.pcap.core.protocol.Protocol;
+import org.eclipse.linuxtools.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.linuxtools.pcap.core.trace.PcapFile;
+import org.eclipse.linuxtools.pcap.core.util.LinkTypeHelper;
+import org.eclipse.linuxtools.pcap.core.util.PcapTimestampScale;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEventField;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEventType;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapRootEventField;
+import org.eclipse.linuxtools.tmf.pcap.core.trace.PcapTrace;
+
+/**
+ * Factory class that helps generating Pcap Events.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventFactory {
+
+    private static final ITmfEventField[] EMPTY_FIELD_ARRAY = new ITmfEventField[0];
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+    private static final Map<Protocol, TmfEventType> fEventTypes = new HashMap<>();
+
+    private PcapEventFactory() {
+    }
+
+    /**
+     * Method that create a PcapEvent from a packet.
+     *
+     * @param pcapPacket
+     *            The packet to generate the event from.
+     * @param pcap
+     *            The pcap file to which the packet belongs.
+     * @param trace
+     *            The trace to which this packet belongs.
+     * @return The generated PcapEvent.
+     */
+    public static @Nullable PcapEvent createEvent(PcapPacket pcapPacket, PcapFile pcap, PcapTrace trace) {
+        long rank = pcapPacket.getIndex();
+        long timestamp = pcapPacket.getTimestamp();
+        PcapTimestampScale scale = pcapPacket.getTimestampScale();
+        ITmfTimestamp tmfTimestamp;
+        switch (scale) {
+        case MICROSECOND:
+            tmfTimestamp = new TmfTimestamp(timestamp, ITmfTimestamp.MICROSECOND_SCALE, (int) pcap.getTimeAccuracy());
+            break;
+        case NANOSECOND:
+            tmfTimestamp = new TmfTimestamp(timestamp, ITmfTimestamp.NANOSECOND_SCALE, (int) pcap.getTimeAccuracy());
+            break;
+        default:
+            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
+        }
+        String fileName = pcap.getPath().substring(pcap.getPath().lastIndexOf('/') + 1);
+        if (fileName == null) {
+            fileName = EMPTY_STRING;
+        }
+        String dataLink = Messages.PcapEventFactory_LinkType + ':' + LinkTypeHelper.toString((int) pcapPacket.getPcapFile().getDataLinkType());
+
+        ITmfEventField[] fields = generatePacketFields(pcapPacket);
+        ITmfEventField field = new PcapRootEventField(EMPTY_STRING, fields, pcapPacket);
+        Packet packet = pcapPacket.getMostEcapsulatedPacket();
+        if (!fEventTypes.containsKey(packet.getProtocol())) {
+            String typeIdString = PcapEventType.DEFAULT_PCAP_TYPE_ID + ':' + packet.getProtocol().getShortName();
+            fEventTypes.put(packet.getProtocol(), new PcapEventType(typeIdString, null));
+        }
+        TmfEventType eventType = fEventTypes.get(packet.getProtocol());
+        if (eventType == null) {
+            eventType = new TmfEventType();
+        }
+        return new PcapEvent(trace, rank, tmfTimestamp, dataLink, eventType, field, fileName, packet);
+
+    }
+
+    private static ITmfEventField[] generatePacketFields(Packet packet) {
+        // TODO This is SOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO slow. Must find a
+        // way to use less intermediate data structures.
+        List<ITmfEventField> fieldList = new ArrayList<>();
+        List<ITmfEventField> subfieldList = new ArrayList<>();
+        Packet localPacket = packet.getPacket(Protocol.PCAP);
+
+        while (localPacket != null) {
+            subfieldList.clear();
+            for (Map.Entry<String, String> entry : localPacket.getFields().entrySet()) {
+
+                @SuppressWarnings("null")
+                @NonNull String key = entry.getKey();
+
+                @SuppressWarnings("null")
+                @NonNull String value = entry.getValue();
+                subfieldList.add(new TmfEventField(key, value, null));
+            }
+            ITmfEventField[] subfieldArray = subfieldList.toArray(new ITmfEventField[subfieldList.size()]);
+            fieldList.add(new PcapEventField(localPacket.getProtocol().getName(), EMPTY_STRING, subfieldArray, localPacket));
+            localPacket = localPacket.getChildPacket();
+        }
+
+        ITmfEventField[] fieldArray = fieldList.toArray(new ITmfEventField[fieldList.size()]);
+        if (fieldArray == null) {
+            return EMPTY_FIELD_ARRAY;
+        }
+        return fieldArray;
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/ProtocolConversion.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/ProtocolConversion.java
new file mode 100644 (file)
index 0000000..6c33be4
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.pcap.core.util;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.pcap.core.protocol.Protocol;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+
+/**
+ * Helper class that allows the conversion between Protocol and TmfProtocol.
+ * This is only used by this project and thus is internal (not API).
+ *
+ * @author Vincent Perot
+ */
+public class ProtocolConversion {
+
+    /**
+     * Wrap a Protocol into a TmfProtocol.
+     *
+     * @param protocol
+     *            The Protocol.
+     * @return The TmfProtocol.
+     */
+    public static TmfProtocol wrap(Protocol protocol) {
+        @SuppressWarnings("null")
+        @NonNull String name = protocol.name();
+
+        @NonNull TmfProtocol wrappedProtocol = TmfProtocol.valueOf(name);
+        return wrappedProtocol;
+    }
+
+    /**
+     * Unwrap a TmfProtocol into a Protocol.
+     *
+     * @param protocol
+     *            The TmfProtocol.
+     * @return The Protocol.
+     */
+    public static Protocol unwrap(TmfProtocol protocol) {
+        @SuppressWarnings("null")
+        @NonNull String name = protocol.name();
+        return Protocol.valueOf(name);
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/messages.properties b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/messages.properties
new file mode 100644 (file)
index 0000000..5630ca0
--- /dev/null
@@ -0,0 +1,13 @@
+###############################################################################
+# 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
+###############################################################################
+
+PcapEventFactory_LinkType=linktype
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/internal/tmf/pcap/core/util/package-info.java
new file mode 100644 (file)
index 0000000..e209f6b
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.internal.tmf.pcap.core.util;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/analysis/StreamListAnalysis.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/analysis/StreamListAnalysis.java
new file mode 100644 (file)
index 0000000..de3c814
--- /dev/null
@@ -0,0 +1,164 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.analysis;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.tmf.core.analysis.TmfAbstractAnalysisModule;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.linuxtools.tmf.core.request.ITmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.request.TmfEventRequest;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.linuxtools.tmf.pcap.core.event.TmfPacketStreamBuilder;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+import org.eclipse.linuxtools.tmf.pcap.core.trace.PcapTrace;
+
+/**
+ * A pcap-specific analysis that parse an entire trace to find all the streams.
+ *
+ * @author Vincent Perot
+ */
+public class StreamListAnalysis extends TmfAbstractAnalysisModule {
+
+    /**
+     * The Stream List analysis ID.
+     */
+    public static final String ID = "org.eclipse.linuxtools.tmf.pcap.core.analysis.stream"; //$NON-NLS-1$
+
+    private @Nullable ITmfEventRequest fRequest;
+    private final Map<TmfProtocol, TmfPacketStreamBuilder> fBuilders;
+
+    /**
+     * The default constructor. It initializes all variables.
+     */
+    public StreamListAnalysis() {
+        super();
+        fBuilders = new HashMap<>();
+        for (TmfProtocol protocol : TmfProtocol.getAllProtocols()) {
+            if (protocol.supportsStream()) {
+                fBuilders.put(protocol, new TmfPacketStreamBuilder(protocol));
+            }
+        }
+    }
+
+    @Override
+    public boolean canExecute(ITmfTrace trace) {
+
+        // Trace is Pcap
+        if (trace instanceof PcapTrace) {
+            return true;
+        }
+
+        // Trace is not a TmfExperiment
+        if (!(trace instanceof TmfExperiment)) {
+            return false;
+        }
+
+        // Trace is TmfExperiment. Check if it has a PcapTrace.
+        TmfExperiment experiment = (TmfExperiment) trace;
+        ITmfTrace[] traces = experiment.getTraces();
+        for (int i = 0; i < traces.length; i++) {
+            if (traces[i] instanceof PcapTrace) {
+                return true;
+            }
+        }
+
+        // No Pcap :(
+        return false;
+    }
+
+    @Override
+    protected boolean executeAnalysis(@Nullable IProgressMonitor monitor) throws TmfAnalysisException {
+        IProgressMonitor mon = (monitor == null ? new NullProgressMonitor() : monitor);
+        if (getTrace() == null) {
+            return false;
+        }
+
+        ITmfEventRequest request = fRequest;
+        if ((request != null) && (!request.isCompleted())) {
+            request.cancel();
+        }
+
+        request = new TmfEventRequest(PcapEvent.class,
+                TmfTimeRange.ETERNITY, 0L, ITmfEventRequest.ALL_DATA,
+                ITmfEventRequest.ExecutionType.BACKGROUND) {
+
+            @Override
+            public void handleData(ITmfEvent data) {
+                // Called for each event
+                super.handleData(data);
+                if (!(data instanceof PcapEvent)) {
+                    return;
+                }
+                PcapEvent event = (PcapEvent) data;
+                for (TmfProtocol protocol : fBuilders.keySet()) {
+                    fBuilders.get(protocol).addEventToStream(event);
+                }
+
+            }
+        };
+        getTrace().sendRequest(request);
+        fRequest = request;
+        try {
+            request.waitForCompletion();
+        } catch (InterruptedException e) {
+            // Request was canceled.
+            return false;
+        }
+
+        return !mon.isCanceled() && !request.isCancelled() && !request.isFailed();
+
+    }
+
+    @Override
+    protected void canceling() {
+        ITmfEventRequest req = fRequest;
+        if ((req != null) && (!req.isCompleted())) {
+            req.cancel();
+        }
+    }
+
+    /**
+     * Getter method that returns the packet builder associated to a particular
+     * protocol.
+     *
+     * @param protocol
+     *            The specified protocol.
+     * @return The builder.
+     */
+    public @Nullable TmfPacketStreamBuilder getBuilder(TmfProtocol protocol) {
+        return fBuilders.get(protocol);
+    }
+
+    /**
+     * Method that indicates if the analysis is still running or has finished.
+     *
+     * @return Whether the analysis is finished or not.
+     */
+    public boolean isFinished() {
+        ITmfEventRequest req = fRequest;
+        if (req == null) {
+            return false;
+        }
+        return req.isCompleted();
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/analysis/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/analysis/package-info.java
new file mode 100644 (file)
index 0000000..da0741b
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.core.analysis;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/Messages.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/Messages.java
new file mode 100644 (file)
index 0000000..8fc7818
--- /dev/null
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+@NonNullByDefault(false)
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.pcap.core.event.messages"; //$NON-NLS-1$
+    public static @Nullable String PcapEventType_DefaultContext;
+    public static @Nullable String PcapEventType_DefaultTypeID;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEvent.java
new file mode 100644 (file)
index 0000000..d3521d0
--- /dev/null
@@ -0,0 +1,238 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.internal.tmf.pcap.core.util.ProtocolConversion;
+import org.eclipse.linuxtools.pcap.core.packet.Packet;
+import org.eclipse.linuxtools.pcap.core.protocol.Protocol;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEvent;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * Class that extends TmfEvent to allow TMF to use the packets from the parser.
+ * It is a simple TmfEvent that wraps a Packet.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEvent extends TmfEvent {
+
+    /** Packet Source Field ID */
+    public static final String EVENT_FIELD_PACKET_SOURCE = ":packetsource:"; //$NON-NLS-1$
+    /** Packet Destination Field ID */
+    public static final String EVENT_FIELD_PACKET_DESTINATION = ":packetdestination:"; //$NON-NLS-1$
+    /** Packet Protocol Field ID */
+    public static final String EVENT_FIELD_PACKET_PROTOCOL = ":protocol:"; //$NON-NLS-1$
+
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+    private final Packet fPacket;
+    private @Nullable List<TmfProtocol> fList;
+
+    /**
+     * Full constructor.
+     *
+     * @param trace
+     *            the parent trace
+     * @param rank
+     *            the event rank (in the trace)
+     * @param timestamp
+     *            the event timestamp
+     * @param source
+     *            the event source
+     * @param type
+     *            the event type
+     * @param content
+     *            the event content (payload)
+     * @param reference
+     *            the event reference
+     * @param packet
+     *            The packet contained in this event
+     */
+    public PcapEvent(ITmfTrace trace,
+            long rank,
+            ITmfTimestamp timestamp,
+            String source,
+            TmfEventType type,
+            ITmfEventField content,
+            String reference,
+            Packet packet) {
+
+        super(trace, rank, timestamp, source, type, content, reference);
+        fPacket = packet;
+    }
+
+    /**
+     * Method that returns an immutable map containing all the fields of a
+     * packet at a certain protocol. For instance, to get the Source IP Address,
+     * use:
+     * <code>event.getFields(TmfProtocol.IPV4).get("Source IP Address");</code>. <br>
+     * It returns null if the protocol is inexistent in the PcapEvent.
+     *
+     * @param protocol
+     *            The specified protocol
+     * @return A map containing the fields.
+     */
+    public @Nullable Map<String, String> getFields(TmfProtocol protocol) {
+        Protocol p = ProtocolConversion.unwrap(protocol);
+        Packet packet = fPacket.getPacket(p);
+        if (packet == null) {
+            return null;
+        }
+        return packet.getFields();
+    }
+
+    /**
+     * Method that returns the payload at a certain protocol level. It returns
+     * null if the protocol is inexistent in the PcapEvent.
+     *
+     * @param protocol
+     *            The specified protocol
+     * @return The payload as a ByteBuffer.
+     */
+    public @Nullable ByteBuffer getPayload(TmfProtocol protocol) {
+        Protocol p = ProtocolConversion.unwrap(protocol);
+        Packet packet = fPacket.getPacket(p);
+        if (packet == null) {
+            return null;
+        }
+        return packet.getPayload();
+    }
+
+    /**
+     * Method that returns the source endpoint at a certain protocol level. It
+     * returns null if the protocol is inexistent in the PcapEvent.
+     *
+     * @param protocol
+     *            The specified protocol
+     * @return The source endpoint.
+     */
+    public @Nullable String getSourceEndpoint(TmfProtocol protocol) {
+        Protocol p = ProtocolConversion.unwrap(protocol);
+        Packet packet = fPacket.getPacket(p);
+        if (packet == null) {
+            return null;
+        }
+        return packet.getSourceEndpoint().toString();
+    }
+
+    /**
+     * Method that returns the destination endpoint at a certain protocol level.
+     * It returns null if the protocol is inexistent in the PcapEvent.
+     *
+     * @param protocol
+     *            The specified protocol
+     * @return The destination endpoint.
+     */
+    public @Nullable String getDestinationEndpoint(TmfProtocol protocol) {
+        Protocol p = ProtocolConversion.unwrap(protocol);
+        Packet packet = fPacket.getPacket(p);
+        if (packet == null) {
+            return null;
+        }
+        return packet.getDestinationEndpoint().toString();
+    }
+
+    /**
+     * Method that returns the most encapsulated protocol in this PcapEvent. If
+     * it is an unknown protocol, it returns the last known protocol.
+     *
+     * @return The most encapsulated TmfProtocol.
+     */
+    public TmfProtocol getMostEncapsulatedProtocol() {
+        return ProtocolConversion.wrap(fPacket.getMostEcapsulatedPacket().getProtocol());
+    }
+
+    /**
+     * Method that returns a list of all the protocols in this PcapEvent.
+     *
+     * @return A list containing all the TmfProtocol.
+     */
+    public List<TmfProtocol> getProtocols() {
+        if (fList != null) {
+            return fList;
+        }
+        List<TmfProtocol> list = new ArrayList<>();
+        Packet packet = fPacket;
+
+        // Go to start.
+        while (packet != null && packet.getParentPacket() != null) {
+            packet = packet.getParentPacket();
+        }
+
+        if (packet == null) {
+            @SuppressWarnings("null")
+            @NonNull List<TmfProtocol> emptyList = Collections.EMPTY_LIST;
+            fList = emptyList;
+            return fList;
+        }
+        // Go through all the packets and add them to list.
+        list.add(ProtocolConversion.wrap(packet.getProtocol()));
+        while (packet != null && packet.getChildPacket() != null) {
+            packet = packet.getChildPacket();
+            if (packet != null) {
+                list.add(ProtocolConversion.wrap(packet.getProtocol()));
+            }
+        }
+
+        @SuppressWarnings("null")
+        @NonNull ImmutableList<TmfProtocol> immutableList = ImmutableList.copyOf(list);
+        fList = immutableList;
+        return immutableList;
+    }
+
+    /**
+     * Getter method that returns the packet. This is default visible since it
+     * is only used by tmf.pcap.core and thus should not be visible to other
+     * packages
+     *
+     * @return The packet.
+     */
+    Packet getPacket() {
+        return fPacket;
+    }
+
+    @Override
+    public String toString() {
+        return fPacket.getGlobalSummaryString();
+    }
+
+    /**
+     * Return the signification of the PcapEvent at a specific protocol level.
+     *
+     * @param protocol
+     *            The specified protocol.
+     * @return The signification as a String.
+     */
+    public String toString(TmfProtocol protocol) {
+        Protocol p = ProtocolConversion.unwrap(protocol);
+        Packet packet = fPacket.getPacket(p);
+        if (packet == null) {
+            return EMPTY_STRING;
+        }
+        return packet.getLocalSummaryString();
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEventField.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEventField.java
new file mode 100644 (file)
index 0000000..c2469f4
--- /dev/null
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.pcap.core.packet.Packet;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
+
+/**
+ * Class that represents a TMF Pcap Event Field. It is identical to a
+ * TmfEventField, except that it overrides the toString() method.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventField extends TmfEventField {
+
+    private final String fSummaryString;
+
+    /**
+     * Full constructor
+     *
+     * @param name
+     *            The event field id.
+     * @param value
+     *            The event field value.
+     * @param fields
+     *            The list of subfields.
+     * @param packet
+     *            The packet from which to take the fields from.
+     * @throws IllegalArgumentException
+     *             If 'name' is null, or if 'fields' has duplicate field names.
+     */
+    public PcapEventField(String name, Object value, @Nullable ITmfEventField[] fields, Packet packet) {
+        super(name, value, fields);
+        fSummaryString = packet.getLocalSummaryString();
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param field
+     *            the other event field
+     */
+    public PcapEventField(final PcapEventField field) {
+        super(field);
+        fSummaryString = field.fSummaryString;
+    }
+
+    @Override
+    public String toString() {
+        return fSummaryString;
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEventType.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapEventType.java
new file mode 100644 (file)
index 0000000..464bb96
--- /dev/null
@@ -0,0 +1,75 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventType;
+
+/**
+ * Class that represents the type of a PcapEvent.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventType extends TmfEventType {
+
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+    /**
+     * The default Context ID for a PcapEvent
+     */
+    @SuppressWarnings("null")
+    public static final @NonNull String DEFAULT_PCAP_CONTEXT_ID = Messages.PcapEventType_DefaultContext == null ? EMPTY_STRING : Messages.PcapEventType_DefaultContext;
+
+    /**
+     * The default Pcap Type ID for a PcapEvent
+     */
+    @SuppressWarnings("null")
+    public static final @NonNull String DEFAULT_PCAP_TYPE_ID = Messages.PcapEventType_DefaultTypeID == null ? EMPTY_STRING : Messages.PcapEventType_DefaultTypeID;
+
+    /**
+     * Default constructor
+     */
+    public PcapEventType() {
+        this(DEFAULT_PCAP_TYPE_ID, null);
+    }
+
+    /**
+     * Full constructor
+     *
+     * @param typeId
+     *            the type name
+     * @param root
+     *            the root field
+     */
+    public PcapEventType(final String typeId, final @Nullable ITmfEventField root) {
+        super(DEFAULT_PCAP_CONTEXT_ID, typeId, root);
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param type
+     *            the other type
+     */
+    public PcapEventType(final PcapEventType type) {
+        super(type);
+    }
+
+    @Override
+    public @Nullable String toString() {
+        return getName();
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapRootEventField.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/PcapRootEventField.java
new file mode 100644 (file)
index 0000000..de5bc0c
--- /dev/null
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.pcap.core.packet.Packet;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEventField;
+import org.eclipse.linuxtools.tmf.core.event.TmfEventField;
+
+/**
+ * Class that represents the root node of Pcap Event Field.
+ *
+ * @author Vincent Perot
+ */
+public class PcapRootEventField extends TmfEventField {
+
+    private final TmfEventField fPacketSourceField;
+    private final TmfEventField fPacketDestinationField;
+    private final TmfEventField fProtocolField;
+    private final String fSummaryString;
+
+    /**
+     * Full constructor
+     *
+     * @param value
+     *            The event field value.
+     * @param fields
+     *            The list of subfields.
+     * @param packet
+     *            The packet from which to take the fields from.
+     * @throws IllegalArgumentException
+     *             If 'name' is null, or if 'fields' has duplicate field names.
+     */
+    public PcapRootEventField(Object value, @Nullable ITmfEventField[] fields, Packet packet) {
+        super(ITmfEventField.ROOT_FIELD_ID, value, fields);
+        fPacketSourceField = new TmfEventField(PcapEvent.EVENT_FIELD_PACKET_SOURCE,
+                packet.getMostEcapsulatedPacket().getSourceEndpoint().toString(), null);
+        fPacketDestinationField = new TmfEventField(PcapEvent.EVENT_FIELD_PACKET_DESTINATION,
+                packet.getMostEcapsulatedPacket().getDestinationEndpoint().toString(), null);
+        fProtocolField = new TmfEventField(PcapEvent.EVENT_FIELD_PACKET_PROTOCOL,
+                packet.getMostEcapsulatedPacket().getProtocol().getShortName().toUpperCase(), null);
+        fSummaryString = packet.getGlobalSummaryString();
+    }
+
+    /**
+     * Copy constructor
+     *
+     * @param field
+     *            the other event field
+     */
+    public PcapRootEventField(final PcapRootEventField field) {
+        super(field);
+        fPacketSourceField = field.fPacketSourceField;
+        fPacketDestinationField = field.fPacketDestinationField;
+        fProtocolField = field.fProtocolField;
+        fSummaryString = field.fSummaryString;
+    }
+
+    @Override
+    public String toString() {
+        return fSummaryString;
+    }
+
+    @Override
+    public @Nullable ITmfEventField getField(@Nullable String name) {
+        if (name == null) {
+            return null;
+        }
+        switch (name) {
+        case PcapEvent.EVENT_FIELD_PACKET_SOURCE:
+            return fPacketSourceField;
+        case PcapEvent.EVENT_FIELD_PACKET_DESTINATION:
+            return fPacketDestinationField;
+        case PcapEvent.EVENT_FIELD_PACKET_PROTOCOL:
+            return fProtocolField;
+        default:
+            return super.getField(name);
+        }
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/TmfPacketStream.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/TmfPacketStream.java
new file mode 100644 (file)
index 0000000..ff5c85c
--- /dev/null
@@ -0,0 +1,175 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import org.eclipse.linuxtools.internal.tmf.pcap.core.util.ProtocolConversion;
+import org.eclipse.linuxtools.pcap.core.stream.PacketStream;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+
+/**
+ * Class that wraps a Packet Stream.
+ *
+ * @author Vincent Perot
+ */
+public class TmfPacketStream {
+
+    private final PacketStream fPacketStream;
+
+    /**
+     * Class constructor.
+     *
+     * @param stream
+     *            The stream to build the TmfPacketStream from.
+     */
+    public TmfPacketStream(PacketStream stream) {
+        fPacketStream = stream;
+    }
+
+    /**
+     * Method that returns the first endpoint of the packet stream.
+     *
+     * @return The first endpoint.
+     */
+    public String getFirstEndpoint() {
+        return fPacketStream.getEndpointPair().getFirstEndpoint().toString();
+    }
+
+    /**
+     * Method that returns the second endpoint of the packet stream.
+     *
+     * @return The second endpoint.
+     */
+    public String getSecondEndpoint() {
+        return fPacketStream.getEndpointPair().getSecondEndpoint().toString();
+    }
+
+    /**
+     * Method that returns the ID of the packet stream.
+     *
+     * @return The ID of the packet stream.
+     */
+    public int getID() {
+        return fPacketStream.getID();
+    }
+
+    /**
+     * Method that returns the TmfProtocol of the packet stream.
+     *
+     * @return The TmfProtocol of the packet stream.
+     */
+    public TmfProtocol getProtocol() {
+        return ProtocolConversion.wrap(fPacketStream.getProtocol());
+    }
+
+    /**
+     * Get the number of packets going from the first endpoint to the second.
+     *
+     * @return The number of packets from A to B.
+     */
+    public synchronized long getNbPacketsAtoB() {
+        return fPacketStream.getNbPacketsAtoB();
+    }
+
+    /**
+     * Get the number of packets going from the second endpoint to the first.
+     *
+     * @return The number of packets from B to A.
+     */
+    public synchronized long getNbPacketsBtoA() {
+        return fPacketStream.getNbPacketsBtoA();
+    }
+
+    /**
+     * Get the total number of packets in this stream.
+     *
+     * @return The total number of packets.
+     */
+    public synchronized long getNbPackets() {
+        return fPacketStream.getNbPackets();
+    }
+
+    /**
+     * Get the number of bytes going from the first endpoint to the second.
+     *
+     * @return The number of bytes from A to B.
+     */
+    public synchronized long getNbBytesAtoB() {
+        return fPacketStream.getNbBytesAtoB();
+    }
+
+    /**
+     * Get the number of bytes going from the second endpoint to the first.
+     *
+     * @return The number of bytes from B to A.
+     */
+    public synchronized long getNbBytesBtoA() {
+        return fPacketStream.getNbBytesBtoA();
+    }
+
+    /**
+     * Get the total number of bytes in this stream.
+     *
+     * @return The total number of bytes.
+     */
+    public synchronized long getNbBytes() {
+        return fPacketStream.getNbBytes();
+    }
+
+    /**
+     * Get the start time of this stream.
+     *
+     * @return The start time.
+     */
+    public synchronized ITmfTimestamp getStartTime() {
+        return new TmfTimestamp(fPacketStream.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE);
+    }
+
+    /**
+     * Get the stop time of this stream.
+     *
+     * @return The stop time.
+     */
+    public synchronized ITmfTimestamp getStopTime() {
+        return new TmfTimestamp(fPacketStream.getStopTime(), ITmfTimestamp.NANOSECOND_SCALE);
+    }
+
+    /**
+     * Get the duration of this stream, in seconds
+     *
+     * @return The duration of this stream.
+     */
+    public synchronized double getDuration() {
+        return fPacketStream.getDuration();
+    }
+
+    /**
+     * Get the the average byte per second from A to B.
+     *
+     * @return the average byte per second from A to B.
+     */
+    public synchronized double getBPSAtoB() {
+        return fPacketStream.getBPSAtoB();
+    }
+
+    /**
+     * Get the the average byte per second from B to A.
+     *
+     * @return the average byte per second from B to A.
+     */
+    public synchronized double getBPSBtoA() {
+        return fPacketStream.getBPSBtoA();
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/TmfPacketStreamBuilder.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/TmfPacketStreamBuilder.java
new file mode 100644 (file)
index 0000000..1f84736
--- /dev/null
@@ -0,0 +1,86 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.linuxtools.internal.tmf.pcap.core.util.ProtocolConversion;
+import org.eclipse.linuxtools.pcap.core.packet.Packet;
+import org.eclipse.linuxtools.pcap.core.protocol.Protocol;
+import org.eclipse.linuxtools.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.linuxtools.pcap.core.stream.PacketStream;
+import org.eclipse.linuxtools.pcap.core.stream.PacketStreamBuilder;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+
+/**
+ * Class that wraps a PacketStreamBuilder.
+ *
+ * @author Vincent Perot
+ */
+public class TmfPacketStreamBuilder {
+
+    private final PacketStreamBuilder fBuilder;
+
+    /**
+     * Constructor.
+     *
+     * @param protocol
+     *            The protocol of the streams to build.
+     */
+    public TmfPacketStreamBuilder(TmfProtocol protocol) {
+        fBuilder = new PacketStreamBuilder(ProtocolConversion.unwrap(protocol));
+    }
+
+    /**
+     * Method that adds an event to this builder.
+     *
+     * @param event
+     *            The event to add.
+     */
+    public synchronized void addEventToStream(PcapEvent event) {
+        Packet packet = event.getPacket().getPacket(Protocol.PCAP);
+        if (packet == null || !(packet instanceof PcapPacket)) {
+            return;
+        }
+        PcapPacket pcapPacket = (PcapPacket) packet;
+        fBuilder.addPacketToStream(pcapPacket);
+    }
+
+    /**
+     * Method that returns the number of streams built.
+     *
+     * @return The number of streams built.
+     */
+    public synchronized int getNbStreams() {
+        return fBuilder.getNbStreams();
+    }
+
+    /**
+     * Method that returns an iterable on the streams built so far.
+     *
+     * @return An iterable on the streams.
+     */
+    public synchronized Iterable<TmfPacketStream> getStreams() {
+        // We can't store in immutable list since the stream number/content can
+        // change dynamically.
+        List<TmfPacketStream> list = new ArrayList<>();
+        for (PacketStream stream : fBuilder.getStreams()) {
+            if (stream != null) {
+                list.add(new TmfPacketStream(stream));
+            }
+        }
+        return list;
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/messages.properties b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/messages.properties
new file mode 100644 (file)
index 0000000..fcf8ca2
--- /dev/null
@@ -0,0 +1,14 @@
+###############################################################################
+# 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
+###############################################################################
+
+PcapEventType_DefaultContext=Network/Pcap Event
+PcapEventType_DefaultTypeID=packet
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/event/package-info.java
new file mode 100644 (file)
index 0000000..03ab3be
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.core.event;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/protocol/TmfProtocol.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/protocol/TmfProtocol.java
new file mode 100644 (file)
index 0000000..0e4330b
--- /dev/null
@@ -0,0 +1,136 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.protocol;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.linuxtools.pcap.core.protocol.Protocol;
+
+/**
+ * Enumeration as a TMF wrapper of the different Protocols. To register a
+ * protocol in TMF, it must be present in
+ * org.eclipse.linuxtools.pcap.core.protocol.Protocol and must have the same
+ * name.
+ *
+ * @author Vincent Perot
+ */
+public enum TmfProtocol {
+
+    // Layer 0
+    /**
+     * The Pcap Protocol is not a real protocol but is used as an helper to
+     * generate Pcap packets.
+     */
+    PCAP,
+
+    // Layer 1
+    // Should always be empty.
+
+    // Layer 2
+    /**
+     * The description of the Ethernet II Protocol.
+     */
+    ETHERNET_II,
+
+    // Layer 3
+    /**
+     * The description of the Internet Protocol Version 4.
+     */
+    IPV4,
+
+    // Layer 4
+    /**
+     * The description of the Transmission Control Protocol.
+     */
+    TCP,
+    /**
+     * The description of the User Datagram Protocol.
+     */
+    UDP,
+
+    // Layer 5
+
+    // Layer 6
+
+    // Layer 7
+    /**
+     * This protocol is used as an helper if the protocol of a packet is not
+     * recognized. Since all its data goes into payload, it can also be seen as
+     * a "payload packet". This is considered to be on layer 7 since its always
+     * the most encapsulated packet if present.
+     */
+    UNKNOWN;
+
+    private final String fName;
+    private final String fShortName;
+    private final int fLayer;
+    private final boolean fSupportsStream;
+
+    private TmfProtocol() {
+        @SuppressWarnings("null")
+        @NonNull String name = this.name();
+        fName = Protocol.valueOf(name).getName();
+        fShortName = Protocol.valueOf(name).getShortName();
+        fLayer = Protocol.valueOf(name).getLayer();
+        fSupportsStream = Protocol.valueOf(name).supportsStream();
+    }
+
+    /**
+     * Getter method for the long name of the protocol.
+     *
+     * @return The long name of the protocol, as a string.
+     */
+    public String getName() {
+        return fName;
+    }
+
+    /**
+     * Getter method for the short name of the protocol.
+     *
+     * @return The short name of the protocol, as a string.
+     */
+    public String getShortName() {
+        return fShortName;
+    }
+
+    /**
+     * Getter method for the OSI layer of the protocol.
+     *
+     * @return The layer of the protocol.
+     */
+    public int getLayer() {
+        return fLayer;
+    }
+
+    /**
+     * Getter method that indicates if the protocol supports streams.
+     *
+     * @return Whether the protocol supports streams or not.
+     */
+    public boolean supportsStream() {
+        return fSupportsStream;
+    }
+
+    /**
+     * Method that returns all the protocol defined.
+     *
+     * @return A list containing all the protocols.
+     */
+    public static List<TmfProtocol> getAllProtocols() {
+        return new ArrayList<>(Arrays.asList(TmfProtocol.values()));
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/protocol/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/protocol/package-info.java
new file mode 100644 (file)
index 0000000..01395c5
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.core.protocol;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java
new file mode 100644 (file)
index 0000000..c87df4a
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.signal;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
+import org.eclipse.linuxtools.tmf.pcap.core.event.TmfPacketStream;
+
+/**
+ * TmfSignal that is broadcasted when a new packet stream is chosen. Views that
+ * are network-specific can uses this signal to track when the user selects a
+ * new stream.
+ *
+ * @author Vincent Perot
+ */
+public class TmfPacketStreamSelectedSignal extends TmfSignal {
+
+    private final @Nullable TmfPacketStream fStream;
+
+    /**
+     * Standard constructor
+     *
+     * @param source
+     *            Object sending this signal
+     * @param reference
+     *            Reference index to assign to this signal
+     * @param stream
+     *            The new stream. It can be null if the user cleared the
+     *            selection.
+     */
+    public TmfPacketStreamSelectedSignal(Object source, int reference, @Nullable TmfPacketStream stream) {
+        super(source, reference);
+            fStream = stream;
+    }
+
+    /**
+     * Getter method that returns the stream.
+     *
+     * @return The stream.
+     */
+    public @Nullable TmfPacketStream getStream() {
+        return fStream;
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/signal/package-info.java
new file mode 100644 (file)
index 0000000..57faa44
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.core.signal;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/Messages.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/Messages.java
new file mode 100644 (file)
index 0000000..5f71e43
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.trace;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.pcap.core.trace.messages"; //$NON-NLS-1$
+    public static @Nullable String PcapTrace_FileEndianness;
+    public static @Nullable String PcapTrace_LinkLayerHeaderType;
+    public static @Nullable String PcapTrace_MaxSnapLength;
+    public static @Nullable String PcapTrace_TimestampAccuracy;
+    public static @Nullable String PcapTrace_TimeZoneCorrection;
+    public static @Nullable String PcapTrace_Version;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/PcapTrace.java
new file mode 100644 (file)
index 0000000..f310750
--- /dev/null
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.core.trace;
+
+import java.io.IOException;
+import java.nio.channels.ClosedChannelException;
+import java.util.Map;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.internal.tmf.pcap.core.Activator;
+import org.eclipse.linuxtools.internal.tmf.pcap.core.util.PcapEventFactory;
+import org.eclipse.linuxtools.pcap.core.packet.BadPacketException;
+import org.eclipse.linuxtools.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.linuxtools.pcap.core.trace.BadPcapFileException;
+import org.eclipse.linuxtools.pcap.core.trace.PcapFile;
+import org.eclipse.linuxtools.pcap.core.util.LinkTypeHelper;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfContext;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfEventParser;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTraceProperties;
+import org.eclipse.linuxtools.tmf.core.trace.TmfContext;
+import org.eclipse.linuxtools.tmf.core.trace.TmfTrace;
+import org.eclipse.linuxtools.tmf.core.trace.TraceValidationStatus;
+import org.eclipse.linuxtools.tmf.core.trace.location.ITmfLocation;
+import org.eclipse.linuxtools.tmf.core.trace.location.TmfLongLocation;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEvent;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Class that represents a TMF Pcap Trace. It is used to make the glue between
+ * the Pcap parser and TMF.
+ *
+ * TODO handle fields in TmfEventType for the filter view.
+ *
+ * @author Vincent Perot
+ */
+public class PcapTrace extends TmfTrace implements ITmfEventParser, ITmfTraceProperties, AutoCloseable {
+
+    @SuppressWarnings("null")
+    private static final @NonNull Map<String, String> EMPTY_MAP = ImmutableMap.of();
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+    private static final int CONFIDENCE = 50;
+    private @Nullable PcapFile fPcapFile;
+    private @Nullable ImmutableMap<String, String> fTraceProperties = null;
+
+    @Override
+    public synchronized ITmfLocation getCurrentLocation() {
+        PcapFile pcap = fPcapFile;
+        if (pcap == null) {
+            return new TmfLongLocation(0);
+        }
+        return new TmfLongLocation(pcap.getCurrentRank());
+    }
+
+    @Override
+    public synchronized double getLocationRatio(@Nullable ITmfLocation location) {
+        TmfLongLocation loc = (TmfLongLocation) location;
+        PcapFile pcap = fPcapFile;
+        if (loc == null || pcap == null) {
+            return 0;
+        }
+        try {
+            return (pcap.getTotalNbPackets() == 0 ? 0 : ((double) loc.getLocationInfo()) / pcap.getTotalNbPackets());
+        } catch (IOException | BadPcapFileException e) {
+            String message = e.getMessage();
+            if (message == null) {
+                message = EMPTY_STRING;
+            }
+            Activator.logError(message, e);
+            return 0;
+        }
+
+    }
+
+    @Override
+    public synchronized void initTrace(@Nullable IResource resource, @Nullable String path, @Nullable Class<? extends ITmfEvent> type) throws TmfTraceException {
+        super.initTrace(resource, path, type);
+        if (path == null) {
+            throw new TmfTraceException("No path has been specified."); //$NON-NLS-1$
+        }
+        try {
+            fPcapFile = new PcapFile(path);
+        } catch (IOException | BadPcapFileException e) {
+            throw new TmfTraceException(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public synchronized @Nullable PcapEvent parseEvent(@Nullable ITmfContext context) {
+        if (context == null) {
+            return null;
+        }
+
+        long rank = context.getRank();
+        PcapPacket packet = null;
+        PcapFile pcap = fPcapFile;
+        if (pcap == null) {
+            return null;
+        }
+        try {
+            pcap.seekPacket(rank);
+            packet = pcap.parseNextPacket();
+        } catch (ClosedChannelException e) {
+            /*
+             * This is handled independently and happens when the user closes
+             * the trace while it is being parsed. It simply stops the parsing.
+             * No need to log a error.
+             */
+            return null;
+        } catch (IOException | BadPcapFileException | BadPacketException e) {
+            String message = e.getMessage();
+            if (message == null) {
+                message = EMPTY_STRING;
+            }
+            Activator.logError(message, e);
+            return null;
+        }
+
+        if (packet == null) {
+            return null;
+        }
+
+        // Generate an event from this packet and return it.
+        return PcapEventFactory.createEvent(packet, pcap, this);
+
+    }
+
+    @Override
+    public synchronized ITmfContext seekEvent(double ratio) {
+        long position;
+        PcapFile pcap = fPcapFile;
+        if (pcap == null) {
+            return new TmfContext(new TmfLongLocation(0), 0);
+        }
+
+        try {
+            /*
+             * The ratio is between 0 and 1. We multiply it by the total number
+             * of packets to get the position.
+             */
+            position = (long) (ratio * pcap.getTotalNbPackets());
+        } catch (IOException | BadPcapFileException e) {
+            String message = e.getMessage();
+            if (message == null) {
+                message = EMPTY_STRING;
+            }
+            Activator.logError(message, e);
+            return new TmfContext(new TmfLongLocation(0), 0);
+        }
+        TmfLongLocation loc = new TmfLongLocation(position);
+        return new TmfContext(loc, loc.getLocationInfo());
+    }
+
+    @Override
+    public synchronized ITmfContext seekEvent(@Nullable ITmfLocation location) {
+        TmfLongLocation loc = (TmfLongLocation) location;
+        if (loc == null) {
+            return new TmfContext(new TmfLongLocation(0));
+        }
+
+        return new TmfContext(loc, loc.getLocationInfo());
+    }
+
+    @Override
+    public IStatus validate(@Nullable IProject project, @Nullable String path) {
+
+        // All validations are made when making a new pcap file.
+        if (path == null) {
+            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, EMPTY_STRING);
+        }
+        try (PcapFile file = new PcapFile(path)) {
+        } catch (IOException | BadPcapFileException e) {
+            return new Status(IStatus.ERROR, Activator.PLUGIN_ID, e.toString());
+        }
+        return new TraceValidationStatus(CONFIDENCE, Activator.PLUGIN_ID);
+    }
+
+    @Override
+    public synchronized void dispose() {
+        super.dispose();
+        PcapFile pcap = fPcapFile;
+        if (pcap == null) {
+            return;
+        }
+        try {
+            pcap.close();
+            fPcapFile = null;
+        } catch (IOException e) {
+            String message = e.getMessage();
+            if (message == null) {
+                message = EMPTY_STRING;
+            }
+            Activator.logError(message, e);
+            return;
+        }
+    }
+
+    @Override
+    public synchronized Map<String, String> getTraceProperties() {
+        PcapFile pcap = fPcapFile;
+        if (pcap == null) {
+            return EMPTY_MAP;
+        }
+
+        ImmutableMap<String, String> properties = fTraceProperties;
+        if (properties == null) {
+            @SuppressWarnings("null")
+            @NonNull ImmutableMap<String, String> newProperties = ImmutableMap.<String, String> builder()
+                    .put(Messages.PcapTrace_Version, String.format("%d%c%d", pcap.getMajorVersion(), '.', pcap.getMinorVersion())) //$NON-NLS-1$
+                    .put(Messages.PcapTrace_TimeZoneCorrection, pcap.getTimeZoneCorrection() + " s") //$NON-NLS-1$
+                    .put(Messages.PcapTrace_TimestampAccuracy, String.valueOf(pcap.getTimeAccuracy()))
+                    .put(Messages.PcapTrace_MaxSnapLength, pcap.getSnapLength() + " bytes") //$NON-NLS-1$
+                    .put(Messages.PcapTrace_LinkLayerHeaderType, LinkTypeHelper.toString((int) pcap.getDataLinkType()) + " (" + pcap.getDataLinkType() + ")") //$NON-NLS-1$ //$NON-NLS-2$
+                    .put(Messages.PcapTrace_FileEndianness, pcap.getByteOrder().toString())
+                    .build();
+            fTraceProperties = newProperties;
+            return newProperties;
+
+        }
+
+        return properties;
+    }
+
+    @Override
+    public void close() {
+        dispose();
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/messages.properties b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/messages.properties
new file mode 100644 (file)
index 0000000..9a39027
--- /dev/null
@@ -0,0 +1,18 @@
+###############################################################################
+# 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
+###############################################################################
+
+PcapTrace_FileEndianness=File Endianness
+PcapTrace_LinkLayerHeaderType=Link-Layer Header Type
+PcapTrace_MaxSnapLength=Maximum Snapshot Length
+PcapTrace_TimestampAccuracy=Timestamp Accuracy
+PcapTrace_TimeZoneCorrection=Time Zone Correction
+PcapTrace_Version=Version
diff --git a/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/package-info.java b/org.eclipse.linuxtools.tmf.pcap.core/src/org/eclipse/linuxtools/tmf/pcap/core/trace/package-info.java
new file mode 100644 (file)
index 0000000..96352e4
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.core.trace;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/.classpath b/org.eclipse.linuxtools.tmf.pcap.ui/.classpath
new file mode 100644 (file)
index 0000000..098194c
--- /dev/null
@@ -0,0 +1,7 @@
+<?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/org.eclipse.linuxtools.tmf.pcap.ui/.project b/org.eclipse.linuxtools.tmf.pcap.ui/.project
new file mode 100644 (file)
index 0000000..ca480fb
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.linuxtools.tmf.pcap.ui</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs
new file mode 100644 (file)
index 0000000..99f26c0
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs
new file mode 100644 (file)
index 0000000..5a0ad22
--- /dev/null
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..b2b3622
--- /dev/null
@@ -0,0 +1,393 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=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=error
+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/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..4fd0c70
--- /dev/null
@@ -0,0 +1,56 @@
+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/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs
new file mode 100644 (file)
index 0000000..acc3abd
--- /dev/null
@@ -0,0 +1,97 @@
+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/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.linuxtools.tmf.pcap.ui/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..d92b94f
--- /dev/null
@@ -0,0 +1,32 @@
+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/org.eclipse.linuxtools.tmf.pcap.ui/META-INF/MANIFEST.MF b/org.eclipse.linuxtools.tmf.pcap.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..38069ea
--- /dev/null
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 3.1.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.linuxtools.tmf.pcap.ui;singleton:=true
+Bundle-Activator: org.eclipse.linuxtools.internal.tmf.pcap.ui.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.linuxtools.tmf.core;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.ui;bundle-version="3.1.0",
+ org.eclipse.linuxtools.tmf.pcap.core;bundle-version="3.1.0"
+Export-Package: org.eclipse.linuxtools.internal.tmf.pcap.ui;x-internal:=true,
+ org.eclipse.linuxtools.tmf.pcap.ui,
+ org.eclipse.linuxtools.tmf.pcap.ui.editor,
+ org.eclipse.linuxtools.tmf.pcap.ui.stream
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/about.html b/org.eclipse.linuxtools.tmf.pcap.ui/about.html
new file mode 100644 (file)
index 0000000..28737f6
--- /dev/null
@@ -0,0 +1,28 @@
+<!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/org.eclipse.linuxtools.tmf.pcap.ui/build.properties b/org.eclipse.linuxtools.tmf.pcap.ui/build.properties
new file mode 100644 (file)
index 0000000..78168e2
--- /dev/null
@@ -0,0 +1,22 @@
+###############################################################################
+# 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/,\
+               .,\
+               about.html,\
+               plugin.properties,\
+               plugin.xml
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/icons/network.png b/org.eclipse.linuxtools.tmf.pcap.ui/icons/network.png
new file mode 100644 (file)
index 0000000..56f18da
Binary files /dev/null and b/org.eclipse.linuxtools.tmf.pcap.ui/icons/network.png differ
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/icons/pcap.png b/org.eclipse.linuxtools.tmf.pcap.ui/icons/pcap.png
new file mode 100644 (file)
index 0000000..208cc69
Binary files /dev/null and b/org.eclipse.linuxtools.tmf.pcap.ui/icons/pcap.png differ
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/icons/pcapng.png b/org.eclipse.linuxtools.tmf.pcap.ui/icons/pcapng.png
new file mode 100644 (file)
index 0000000..affe9d1
Binary files /dev/null and b/org.eclipse.linuxtools.tmf.pcap.ui/icons/pcapng.png differ
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/icons/stream_list_view.gif b/org.eclipse.linuxtools.tmf.pcap.ui/icons/stream_list_view.gif
new file mode 100644 (file)
index 0000000..1ef74cf
Binary files /dev/null and b/org.eclipse.linuxtools.tmf.pcap.ui/icons/stream_list_view.gif differ
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/plugin.properties b/org.eclipse.linuxtools.tmf.pcap.ui/plugin.properties
new file mode 100644 (file)
index 0000000..b7d1264
--- /dev/null
@@ -0,0 +1,23 @@
+###############################################################################
+# 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
+###############################################################################
+
+#Properties file for org.eclipse.linuxtools.tmf.pcap.ui
+Bundle-Vendor = Eclipse Linux Tools
+Bundle-Name = Pcap support for TMF UI Plug-in
+
+# Pcap trace type
+tracetype.category.pcap = Network Traces
+tracetype.type.pcap = Pcap Trace
+
+category.networking = Network Tracing
+view.stream.list = Stream List
+perspective.networking = Network Tracing
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/plugin.xml b/org.eclipse.linuxtools.tmf.pcap.ui/plugin.xml
new file mode 100644 (file)
index 0000000..c93467b
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.linuxtools.tmf.ui.tracetypeui">
+      <type
+            icon="icons/pcap.png"
+            tracetype="org.eclipse.linuxtools.tmf.pcap.core.pcaptrace">
+         <eventsTableType
+               class="org.eclipse.linuxtools.tmf.pcap.ui.editor.PcapEventsTable">
+         </eventsTableType>
+      </type>
+   </extension>
+   <extension
+         point="org.eclipse.ui.views">
+      <category
+            id="org.eclipse.linuxtools.tmf.pcap.ui.view.category.network"
+            name="%category.networking">
+      </category>
+      <view
+            allowMultiple="false"
+            category="org.eclipse.linuxtools.tmf.pcap.ui.view.category.network"
+            class="org.eclipse.linuxtools.tmf.pcap.ui.stream.StreamListView"
+            icon="icons/stream_list_view.gif"
+            id="org.eclipse.linuxtools.tmf.pcap.ui.view.stream.list"
+            name="%view.stream.list"
+            restorable="true">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectives">
+      <perspective
+            class="org.eclipse.linuxtools.tmf.pcap.ui.NetworkingPerspectiveFactory"
+            fixed="false"
+            icon="icons/network.png"
+            id="org.eclipse.linuxtools.tmf.pcap.ui.perspective.network"
+            name="%perspective.networking">
+      </perspective>
+   </extension>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <output
+            class="org.eclipse.linuxtools.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.linuxtools.tmf.pcap.ui.view.stream.list">
+         <analysisModuleClass
+               class="org.eclipse.linuxtools.tmf.pcap.core.analysis.StreamListAnalysis">
+         </analysisModuleClass>
+      </output>
+   </extension>
+
+</plugin>
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/pom.xml b/org.eclipse.linuxtools.tmf.pcap.ui/pom.xml
new file mode 100644 (file)
index 0000000..ce41355
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   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
+-->
+<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.1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.linuxtools.tmf.pcap.ui</artifactId>
+  <version>3.1.0-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>Pcap support for TMF UI Plug-in</name>
+
+ <build>
+    <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/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/internal/tmf/pcap/ui/Activator.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/internal/tmf/pcap/ui/Activator.java
new file mode 100644 (file)
index 0000000..5c9ebaa
--- /dev/null
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.internal.tmf.pcap.ui;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.Nullable;
+import org.osgi.framework.BundleContext;
+
+/**
+ * <b><u>Activator</u></b>
+ * <p>
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     * The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.linuxtools.tmf.pcap.ui"; //$NON-NLS-1$
+
+    /**
+     * The shared instance
+     */
+    private static @Nullable Activator fPlugin;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Constructor
+     */
+    public Activator() {
+        setDefault(this);
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns the TMF Core plug-in instance.
+     *
+     * @return the TMF Core plug-in instance.
+     */
+    public static @Nullable Activator getDefault() {
+        return fPlugin;
+    }
+
+    // Sets plug-in instance
+    private static void setDefault(@Nullable Activator plugin) {
+        fPlugin = plugin;
+    }
+
+    // ------------------------------------------------------------------------
+    // Plugin
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void start(@Nullable BundleContext context) throws Exception {
+        super.start(context);
+        setDefault(this);
+    }
+
+    @Override
+    public void stop(@Nullable BundleContext context) throws Exception {
+        setDefault(null);
+        super.stop(context);
+    }
+
+
+    // ------------------------------------------------------------------------
+    // Log an IStatus
+    // ------------------------------------------------------------------------
+
+    /**
+     * Log an IStatus object directly
+     *
+     * @param status
+     *            The status to log
+     */
+    public static void log(IStatus status) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.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) {
+        Activator activator = fPlugin;
+        if (activator == null) {
+            return;
+        }
+        activator.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/internal/tmf/pcap/ui/package-info.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/internal/tmf/pcap/ui/package-info.java
new file mode 100644 (file)
index 0000000..0567038
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.internal.tmf.pcap.ui;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/NetworkingPerspectiveFactory.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/NetworkingPerspectiveFactory.java
new file mode 100644 (file)
index 0000000..ec89977
--- /dev/null
@@ -0,0 +1,90 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.ui;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.tmf.pcap.ui.stream.StreamListView;
+import org.eclipse.linuxtools.tmf.ui.project.wizards.NewTmfProjectWizard;
+import org.eclipse.linuxtools.tmf.ui.views.colors.ColorsView;
+import org.eclipse.linuxtools.tmf.ui.views.filter.FilterView;
+import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
+import org.eclipse.ui.IFolderLayout;
+import org.eclipse.ui.IPageLayout;
+import org.eclipse.ui.IPerspectiveFactory;
+
+/**
+ * The networking perspective definition.
+ *
+ * @author Vincent Perot
+ */
+public class NetworkingPerspectiveFactory implements IPerspectiveFactory {
+
+    // ------------------------------------------------------------------------
+    // Constants
+    // ------------------------------------------------------------------------
+
+    /** The Perspective ID */
+    public static final String ID = "org.eclipse.linuxtools.tmf.pcap.ui.perspective.network"; //$NON-NLS-1$
+
+    // Views
+    @SuppressWarnings("null")
+    private static final @NonNull String PROJECT_VIEW_ID = IPageLayout.ID_PROJECT_EXPLORER;
+    @SuppressWarnings("null")
+    private static final @NonNull String PROPERTIES_VIEW_ID = IPageLayout.ID_PROP_SHEET;
+    @SuppressWarnings("null")
+    private static final @NonNull String BOOKMARKS_VIEW_ID = IPageLayout.ID_BOOKMARKS;
+    private static final String FILTER_VIEW_ID = FilterView.ID;
+    private static final String HISTOGRAM_VIEW_ID = HistogramView.ID;
+    private static final String STATISTICS_VIEW_ID = TmfStatisticsView.ID;
+    private static final String COLOR_VIEW_ID = ColorsView.ID;
+    private static final String STREAM_LIST_VIEW_ID = StreamListView.ID;
+
+    // ------------------------------------------------------------------------
+    // IPerspectiveFactory
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void createInitialLayout(@Nullable IPageLayout layout) {
+
+        if (layout == null) {
+            return;
+        }
+
+        // Editor area
+        layout.setEditorAreaVisible(true);
+
+        // Create the top left folder
+        IFolderLayout topLeftFolder = layout.createFolder("topLeftFolder", IPageLayout.LEFT, 0.15f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        topLeftFolder.addView(PROJECT_VIEW_ID);
+
+        // Create the middle right folder
+        IFolderLayout middleRightFolder = layout.createFolder("middleRightFolder", IPageLayout.BOTTOM, 0.40f, IPageLayout.ID_EDITOR_AREA); //$NON-NLS-1$
+        middleRightFolder.addView(PROPERTIES_VIEW_ID);
+        middleRightFolder.addView(HISTOGRAM_VIEW_ID);
+        middleRightFolder.addView(STATISTICS_VIEW_ID);
+        middleRightFolder.addView(COLOR_VIEW_ID);
+
+        // Create the bottom right folder
+        IFolderLayout bottomRightFolder = layout.createFolder("bottomRightFolder", IPageLayout.BOTTOM, 0.65f, "middleRightFolder"); //$NON-NLS-1$ //$NON-NLS-2$
+        bottomRightFolder.addView(FILTER_VIEW_ID);
+        bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
+        bottomRightFolder.addView(STREAM_LIST_VIEW_ID);
+
+        // Populate menus, etc
+        layout.addPerspectiveShortcut(ID);
+        layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/Messages.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/Messages.java
new file mode 100644 (file)
index 0000000..f890a69
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.ui.editor;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.pcap.ui.editor.messages"; //$NON-NLS-1$
+    public static @Nullable String PcapEventsTable_Content;
+    public static @Nullable String PcapEventsTable_Destination;
+    public static @Nullable String PcapEventsTable_Protocol;
+    public static @Nullable String PcapEventsTable_Reference;
+    public static @Nullable String PcapEventsTable_Source;
+    public static @Nullable String PcapEventsTable_Timestamp;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/PcapEventsTable.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/PcapEventsTable.java
new file mode 100644 (file)
index 0000000..06d9fa1
--- /dev/null
@@ -0,0 +1,95 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.ui.editor;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.tmf.core.event.ITmfEvent;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+import org.eclipse.linuxtools.tmf.ui.viewers.events.TmfEventsTable;
+import org.eclipse.linuxtools.tmf.ui.widgets.virtualtable.ColumnData;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * Default event table for pcap traces.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventsTable extends TmfEventsTable {
+
+    // ------------------------------------------------------------------------
+    // Table data
+    // ------------------------------------------------------------------------
+
+    // Table column names
+    private static final String[] COLUMN_NAMES = new String[] {
+            Messages.PcapEventsTable_Timestamp,
+            Messages.PcapEventsTable_Source,
+            Messages.PcapEventsTable_Destination,
+            Messages.PcapEventsTable_Reference,
+            Messages.PcapEventsTable_Protocol,
+            Messages.PcapEventsTable_Content
+    };
+
+    private static final ColumnData[] COLUMN_DATA = new ColumnData[] {
+            new ColumnData(COLUMN_NAMES[0], 150, SWT.LEFT),
+            new ColumnData(COLUMN_NAMES[1], 120, SWT.LEFT),
+            new ColumnData(COLUMN_NAMES[2], 200, SWT.LEFT),
+            new ColumnData(COLUMN_NAMES[3], 100, SWT.LEFT),
+            new ColumnData(COLUMN_NAMES[4], 100, SWT.LEFT),
+            new ColumnData(COLUMN_NAMES[5], 100, SWT.LEFT)
+    };
+
+    // ------------------------------------------------------------------------
+    // Constructor
+    // ------------------------------------------------------------------------
+
+    /**
+     * Constructor
+     *
+     * @param parent
+     *            The parent composite
+     * @param cacheSize
+     *            The size of the rows cache
+     */
+    public PcapEventsTable(Composite parent, int cacheSize) {
+        super(parent, cacheSize, COLUMN_DATA);
+        fTable.getColumns()[0].setData(Key.FIELD_ID, ITmfEvent.EVENT_FIELD_TIMESTAMP);
+        fTable.getColumns()[1].setData(Key.FIELD_ID, PcapEvent.EVENT_FIELD_PACKET_SOURCE);
+        fTable.getColumns()[2].setData(Key.FIELD_ID, PcapEvent.EVENT_FIELD_PACKET_DESTINATION);
+        fTable.getColumns()[3].setData(Key.FIELD_ID, ITmfEvent.EVENT_FIELD_REFERENCE);
+        fTable.getColumns()[4].setData(Key.FIELD_ID, PcapEvent.EVENT_FIELD_PACKET_PROTOCOL);
+        fTable.getColumns()[5].setData(Key.FIELD_ID, ITmfEvent.EVENT_FIELD_CONTENT);
+    }
+
+    @Override
+    public String[] getItemStrings(@Nullable ITmfEvent event) {
+
+        if (event == null || !(event instanceof PcapEvent)) {
+            return EMPTY_STRING_ARRAY;
+        }
+
+        PcapEvent pcapEvent = (PcapEvent) event;
+        TmfProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
+
+        return new String[] {
+                pcapEvent.getTimestamp().toString(),
+                pcapEvent.getSourceEndpoint(protocol),
+                pcapEvent.getDestinationEndpoint(protocol),
+                pcapEvent.getReference(),
+                protocol.getShortName().toUpperCase(),
+                pcapEvent.getContent().toString()
+        };
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/messages.properties b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/messages.properties
new file mode 100644 (file)
index 0000000..fe4006d
--- /dev/null
@@ -0,0 +1,18 @@
+###############################################################################
+# 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
+###############################################################################
+
+PcapEventsTable_Content=Content
+PcapEventsTable_Destination=Destination
+PcapEventsTable_Protocol=Protocol
+PcapEventsTable_Reference=Reference
+PcapEventsTable_Source=Source
+PcapEventsTable_Timestamp=Timestamp
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/package-info.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/editor/package-info.java
new file mode 100644 (file)
index 0000000..cdbeedd
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.ui.editor;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/package-info.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/package-info.java
new file mode 100644 (file)
index 0000000..9af1459
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.ui;
\ No newline at end of file
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/Messages.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/Messages.java
new file mode 100644 (file)
index 0000000..d257664
--- /dev/null
@@ -0,0 +1,46 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.ui.stream;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.osgi.util.NLS;
+
+@SuppressWarnings("javadoc")
+public class Messages extends NLS {
+    private static final String BUNDLE_NAME = "org.eclipse.linuxtools.tmf.pcap.ui.stream.messages"; //$NON-NLS-1$
+    public static @Nullable String StreamListView_BPSAtoB;
+    public static @Nullable String StreamListView_BPSBtoA;
+    public static @Nullable String StreamListView_BytesAtoB;
+    public static @Nullable String StreamListView_BytesBtoA;
+    public static @Nullable String StreamListView_Clear;
+    public static @Nullable String StreamListView_Duration;
+    public static @Nullable String StreamListView_EndpointA;
+    public static @Nullable String StreamListView_EndpointB;
+    public static @Nullable String StreamListView_ExtractAsFilter;
+    public static @Nullable String StreamListView_FilterName_Stream;
+    public static @Nullable String StreamListView_FollowStream;
+    public static @Nullable String StreamListView_ID;
+    public static @Nullable String StreamListView_PacketsAtoB;
+    public static @Nullable String StreamListView_PacketsBtoA;
+    public static @Nullable String StreamListView_StartTime;
+    public static @Nullable String StreamListView_StopTime;
+    public static @Nullable String StreamListView_TotalBytes;
+    public static @Nullable String StreamListView_TotalPackets;
+    static {
+        // initialize resource bundle
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/StreamListView.java
new file mode 100644 (file)
index 0000000..ff4fd8c
--- /dev/null
@@ -0,0 +1,498 @@
+/*******************************************************************************
+ * 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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.linuxtools.tmf.pcap.ui.stream;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.linuxtools.internal.tmf.pcap.ui.Activator;
+import org.eclipse.linuxtools.tmf.core.filter.model.ITmfFilterTreeNode;
+import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterAndNode;
+import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterContainsNode;
+import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterNode;
+import org.eclipse.linuxtools.tmf.core.filter.model.TmfFilterOrNode;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
+import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceClosedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.linuxtools.tmf.core.signal.TmfTraceSelectedSignal;
+import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace;
+import org.eclipse.linuxtools.tmf.pcap.core.analysis.StreamListAnalysis;
+import org.eclipse.linuxtools.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.linuxtools.tmf.pcap.core.event.TmfPacketStream;
+import org.eclipse.linuxtools.tmf.pcap.core.event.TmfPacketStreamBuilder;
+import org.eclipse.linuxtools.tmf.pcap.core.protocol.TmfProtocol;
+import org.eclipse.linuxtools.tmf.pcap.core.signal.TmfPacketStreamSelectedSignal;
+import org.eclipse.linuxtools.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.linuxtools.tmf.ui.project.model.TraceUtils;
+import org.eclipse.linuxtools.tmf.ui.views.TmfView;
+import org.eclipse.linuxtools.tmf.ui.views.filter.FilterManager;
+import org.eclipse.linuxtools.tmf.ui.views.filter.FilterView;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.CTabFolder;
+import org.eclipse.swt.custom.CTabItem;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.swt.widgets.TableItem;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * Class that represents the Stream List View. Such a view lists all the
+ * available streams from the current experiment. <br>
+ * <br>
+ * TODO Switch to TmfUiRefreshHandler once the behavior is fixed
+ *
+ * FIXME analysis is leaking ressource. Someone I will not name told me not to worry about it since
+ * AnalysisModule will not be autocloseable later.
+ *
+ * @author Vincent Perot
+ */
+public class StreamListView extends TmfView {
+
+    /**
+     * The Stream List View ID.
+     */
+    public static final String ID = "org.eclipse.linuxtools.tmf.pcap.ui.view.stream.list"; //$NON-NLS-1$
+
+    private static final String[] COLUMN_NAMES =
+    { Messages.StreamListView_ID,
+            Messages.StreamListView_EndpointA,
+            Messages.StreamListView_EndpointB,
+            Messages.StreamListView_TotalPackets,
+            Messages.StreamListView_TotalBytes,
+            Messages.StreamListView_PacketsAtoB,
+            Messages.StreamListView_BytesAtoB,
+            Messages.StreamListView_PacketsBtoA,
+            Messages.StreamListView_BytesBtoA,
+            Messages.StreamListView_StartTime,
+            Messages.StreamListView_StopTime,
+            Messages.StreamListView_Duration,
+            Messages.StreamListView_BPSAtoB,
+            Messages.StreamListView_BPSBtoA
+    };
+
+    private static final int[] COLUMN_SIZES =
+        { 75,
+        350,
+        350,
+        110,
+        110,
+        110,
+        110,
+        110,
+        110,
+        180,
+        180,
+        110,
+        110,
+        110 };
+
+    private static final String KEY_PROTOCOL = "$protocol$"; //$NON-NLS-1$
+    private static final String KEY_STREAM = "$stream$"; //$NON-NLS-1$
+
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+    private static final long WAIT_TIME = 1000;
+
+    private @Nullable CTabFolder fTabFolder;
+    private @Nullable Map<TmfProtocol, Table> fTableMap;
+
+    private @Nullable TmfPacketStream fCurrentStream;
+    private @Nullable ITmfTrace fCurrentTrace;
+
+    private volatile boolean fStopThread;
+
+    /**
+     * Constructor of the StreamListView class.
+     */
+    public StreamListView() {
+        super(ID);
+    }
+
+    /**
+     * Handler called when an trace is opened.
+     *
+     * @param signal
+     *            Contains the information about the selection.
+     */
+    @TmfSignalHandler
+    public void traceOpened(TmfTraceOpenedSignal signal) {
+        fCurrentTrace = signal.getTrace();
+        resetView();
+        queryAnalysis();
+    }
+
+    /**
+     * Handler called when an trace is closed. Checks if the trace is the
+     * current trace and update the view accordingly.
+     *
+     * @param signal
+     *            Contains the information about the selection.
+     */
+    @TmfSignalHandler
+    public void traceClosed(TmfTraceClosedSignal signal) {
+        if (fCurrentTrace == signal.getTrace()) {
+            fCurrentTrace = null;
+            resetView();
+        }
+    }
+
+    /**
+     * Handler called when an trace is selected. Checks if the trace has changed
+     * and requests the selected trace if it has not yet been cached.
+     *
+     * @param signal
+     *            Contains the information about the selection.
+     */
+    @TmfSignalHandler
+    public void traceSelected(TmfTraceSelectedSignal signal) {
+        if (fCurrentTrace != signal.getTrace()) {
+            fCurrentTrace = signal.getTrace();
+            resetView();
+            queryAnalysis();
+        }
+    }
+
+    private void queryAnalysis() {
+        Thread thread = new Thread(new Runnable() {
+
+            @Override
+            public void run() {
+                ITmfTrace trace = fCurrentTrace;
+                if (trace == null || (!(trace instanceof PcapTrace))) {
+                    return;
+                }
+                StreamListAnalysis analysis = trace.getAnalysisModuleOfClass(StreamListAnalysis.class, StreamListAnalysis.ID);
+                if (analysis == null) {
+                    return;
+                }
+                while (!analysis.isFinished() && !fStopThread) {
+                    updateUI();
+                    try {
+                        Thread.sleep(WAIT_TIME);
+                    } catch (InterruptedException e) {
+                        String message = e.getMessage();
+                        if (message == null) {
+                            message = EMPTY_STRING;
+                        }
+                        Activator.logError(message, e);
+                        return;
+                    }
+                }
+                // Update UI one more time (daft punk)
+                if (!fStopThread) {
+                    updateUI();
+                }
+
+            }
+        });
+
+        fStopThread = false;
+        thread.start();
+    }
+
+    private void resetView() {
+
+        // Stop thread if needed
+        fStopThread = true;
+
+        // Remove all content in tables
+        final Display display = Display.getDefault();
+        if (display == null || display.isDisposed()) {
+            return;
+        }
+        display.asyncExec(new Runnable() {
+
+            @Override
+            public void run() {
+                if (display.isDisposed()) {
+                    return;
+                }
+                Map<TmfProtocol, Table> tableMap = fTableMap;
+                if (tableMap == null) {
+                    return;
+                }
+                for (TmfProtocol protocol : tableMap.keySet()) {
+                    if (!(tableMap.get(protocol).isDisposed())) {
+                        tableMap.get(protocol).removeAll();
+                    }
+                }
+            }
+        });
+    }
+
+    private void updateUI() {
+        final Display display = Display.getDefault();
+        if (display == null || display.isDisposed()) {
+            return;
+        }
+        display.asyncExec(new Runnable() {
+
+            @Override
+            public void run() {
+                if (display.isDisposed()) {
+                    return;
+                }
+                ITmfTrace trace = fCurrentTrace;
+                if (trace == null) {
+                    return;
+                }
+
+                StreamListAnalysis analysis = trace.getAnalysisModuleOfClass(StreamListAnalysis.class, StreamListAnalysis.ID);
+                if (analysis == null) {
+                    return;
+                }
+
+                Map<TmfProtocol, Table> tables = fTableMap;
+                if (tables == null) {
+                    return;
+                }
+                for (TmfProtocol p : tables.keySet()) {
+                    @SuppressWarnings("null")
+                    @NonNull TmfProtocol protocol = p;
+                    TmfPacketStreamBuilder builder = analysis.getBuilder(protocol);
+                    if (builder != null && !(tables.get(protocol).isDisposed())) {
+                        for (TmfPacketStream stream : builder.getStreams()) {
+
+                            TableItem item;
+                            if (stream.getID() < tables.get(protocol).getItemCount()) {
+                                item = tables.get(protocol).getItem(stream.getID());
+                            } else {
+                                item = new TableItem(tables.get(protocol), SWT.NONE);
+                            }
+                            item.setText(0, String.valueOf(stream.getID()));
+                            item.setText(1, stream.getFirstEndpoint().toString());
+                            item.setText(2, stream.getSecondEndpoint().toString());
+                            item.setText(3, String.valueOf(stream.getNbPackets()));
+                            item.setText(4, String.valueOf(stream.getNbBytes()));
+                            item.setText(5, String.valueOf(stream.getNbPacketsAtoB()));
+                            item.setText(6, String.valueOf(stream.getNbBytesAtoB()));
+                            item.setText(7, String.valueOf(stream.getNbPacketsBtoA()));
+                            item.setText(8, String.valueOf(stream.getNbBytesBtoA()));
+                            item.setText(9, stream.getStartTime().toString());
+                            item.setText(10, stream.getStopTime().toString());
+                            item.setText(11, String.format("%.3f", stream.getDuration())); //$NON-NLS-1$
+                            item.setText(12, String.format("%.3f", stream.getBPSAtoB())); //$NON-NLS-1$
+                            item.setText(13, String.format("%.3f", stream.getBPSBtoA())); //$NON-NLS-1$
+                            item.setData(KEY_STREAM, stream);
+                        }
+                    }
+                }
+            }
+
+        });
+    }
+
+    @Override
+    public void createPartControl(@Nullable Composite parent) {
+        // Initialize
+        fTableMap = new HashMap<>();
+        fCurrentTrace = getActiveTrace();
+        fCurrentStream = null;
+
+        // Add a tab folder
+        fTabFolder = new CTabFolder(parent, SWT.NONE);
+        fTabFolder.addSelectionListener(new SelectionAdapter() {
+
+            @Override
+            public void widgetSelected(@Nullable SelectionEvent e) {
+                Map<TmfProtocol, Table> tables = fTableMap;
+                if (tables == null || e == null) {
+                    return;
+                }
+                TmfProtocol protocol = (TmfProtocol) e.item.getData(KEY_PROTOCOL);
+                tables.get(protocol).deselectAll();
+                fCurrentStream = null;
+            }
+
+        });
+
+        // Add items and tables for each protocol
+        for (TmfProtocol protocol : TmfProtocol.getAllProtocols()) {
+            if (protocol.supportsStream()) {
+                CTabItem item = new CTabItem(fTabFolder, SWT.NONE);
+                item.setText(protocol.getName());
+                item.setData(KEY_PROTOCOL, protocol);
+                Table table = new Table(fTabFolder, SWT.NONE);
+                table.setHeaderVisible(true);
+                table.setLinesVisible(true);
+
+                // Add columns to table
+                for (int i = 0; i < COLUMN_NAMES.length || i < COLUMN_SIZES.length; i++) {
+                    TableColumn column = new TableColumn(table, SWT.NONE);
+                    column.setText(COLUMN_NAMES[i]);
+                    column.setWidth(COLUMN_SIZES[i]);
+                }
+                item.setControl(table);
+                table.addSelectionListener(new SelectionAdapter() {
+
+                    @Override
+                    public void widgetSelected(@Nullable SelectionEvent e) {
+                        if (e == null) {
+                            return;
+                        }
+                        fCurrentStream = (TmfPacketStream) e.item.getData(KEY_STREAM);
+                    }
+
+                });
+
+                Map<TmfProtocol, Table> tables = fTableMap;
+                if (tables == null) {
+                    return;
+                }
+
+                tables.put(protocol, table);
+
+                // Add right click menu
+                Menu menu = new Menu(table);
+                MenuItem menuItem = new MenuItem(menu, SWT.PUSH);
+                menuItem.setText(Messages.StreamListView_FollowStream);
+                menuItem.addListener(SWT.Selection, new Listener() {
+
+                    @Override
+                    public void handleEvent(@Nullable Event event) {
+                        TmfSignal signal = new TmfPacketStreamSelectedSignal(this, 0, fCurrentStream);
+                        TmfSignalManager.dispatchSignal(signal);
+                    }
+                });
+                menuItem = new MenuItem(menu, SWT.PUSH);
+                menuItem.setText(Messages.StreamListView_Clear);
+                menuItem.addListener(SWT.Selection, new Listener() {
+
+                    @Override
+                    public void handleEvent(@Nullable Event event) {
+                        TmfSignal signal = new TmfPacketStreamSelectedSignal(this, 0, null);
+                        TmfSignalManager.dispatchSignal(signal);
+
+                    }
+                });
+                menuItem = new MenuItem(menu, SWT.PUSH);
+                menuItem.setText(Messages.StreamListView_ExtractAsFilter);
+                menuItem.addListener(SWT.Selection, new Listener() {
+
+                    @Override
+                    public void handleEvent(@Nullable Event event) {
+                        // Generate filter.
+                        ITmfFilterTreeNode filter = generateFilter();
+
+                        // Update view and XML
+                        updateFilters(filter);
+
+                    }
+
+                    private void updateFilters(@Nullable ITmfFilterTreeNode filter) {
+                        if (filter == null) {
+                            return;
+                        }
+
+                        // Update XML
+                        List<ITmfFilterTreeNode> newFilters = new ArrayList<>();
+                        ITmfFilterTreeNode[] oldFilters = FilterManager.getSavedFilters();
+                        for (int i = 0; i < oldFilters.length; i++) {
+                            newFilters.add(oldFilters[i]);
+                        }
+                        if (!(newFilters.contains(filter))) {
+                            newFilters.add(filter);
+                            FilterManager.setSavedFilters(newFilters.toArray(new ITmfFilterTreeNode[newFilters.size()]));
+                        }
+
+                        // Update Filter View
+                        try {
+                            final IWorkbench wb = PlatformUI.getWorkbench();
+                            final IWorkbenchPage activePage = wb.getActiveWorkbenchWindow().getActivePage();
+                            IViewPart view = activePage.showView(FilterView.ID);
+                            FilterView filterView = (FilterView) view;
+                            filterView.addFilter(filter);
+                        } catch (final PartInitException e) {
+                            TraceUtils.displayErrorMsg(Messages.StreamListView_ExtractAsFilter, "Error opening view " + FilterView.ID + e.getMessage()); //$NON-NLS-1$
+                            Activator.logError("Error opening view " + FilterView.ID, e); //$NON-NLS-1$
+                            return;
+                        }
+
+                    }
+
+                    private @Nullable ITmfFilterTreeNode generateFilter() {
+                        TmfPacketStream stream = fCurrentStream;
+                        if (stream == null) {
+                            return null;
+                        }
+
+                        // First stage - root
+                        String name = Messages.StreamListView_FilterName_Stream + ' ' + stream.getProtocol().getShortName() + ' ' + stream.getFirstEndpoint()
+                                + " <--> " + stream.getSecondEndpoint(); //$NON-NLS-1$
+                        TmfFilterNode root = new TmfFilterNode(name);
+
+                        // Second stage - and
+                        TmfFilterAndNode and = new TmfFilterAndNode(root);
+
+                        // Third stage - protocol + or
+                        TmfFilterContainsNode protocolFilter = new TmfFilterContainsNode(and);
+                        protocolFilter.setField(stream.getProtocol().getName());
+                        protocolFilter.setValue(EMPTY_STRING);
+                        TmfFilterOrNode or = new TmfFilterOrNode(and);
+
+                        // Fourth stage - and
+                        TmfFilterAndNode andA = new TmfFilterAndNode(or);
+                        TmfFilterAndNode andB = new TmfFilterAndNode(or);
+
+                        // Fourth stage - endpoints
+                        TmfFilterContainsNode endpointAAndA = new TmfFilterContainsNode(andA);
+                        endpointAAndA.setField(PcapEvent.EVENT_FIELD_PACKET_SOURCE);
+                        endpointAAndA.setValue(stream.getFirstEndpoint());
+                        TmfFilterContainsNode endpointBAndA = new TmfFilterContainsNode(andA);
+                        endpointBAndA.setField(PcapEvent.EVENT_FIELD_PACKET_DESTINATION);
+                        endpointBAndA.setValue(stream.getSecondEndpoint());
+                        TmfFilterContainsNode endpointAAndB = new TmfFilterContainsNode(andB);
+                        endpointAAndB.setField(PcapEvent.EVENT_FIELD_PACKET_SOURCE);
+                        endpointAAndB.setValue(stream.getSecondEndpoint());
+                        TmfFilterContainsNode endpointBAndB = new TmfFilterContainsNode(andB);
+                        endpointBAndB.setField(PcapEvent.EVENT_FIELD_PACKET_DESTINATION);
+                        endpointBAndB.setValue(stream.getFirstEndpoint());
+
+                        return root;
+                    }
+                });
+                table.setMenu(menu);
+            }
+        }
+
+        // Ask the analysis for data.
+        queryAnalysis();
+    }
+
+    @Override
+    public void setFocus() {
+        CTabFolder tabFolder = fTabFolder;
+        if (tabFolder != null && !(tabFolder.isDisposed())) {
+            tabFolder.setFocus();
+        }
+    }
+
+}
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/messages.properties b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/messages.properties
new file mode 100644 (file)
index 0000000..2ceb87c
--- /dev/null
@@ -0,0 +1,30 @@
+###############################################################################
+# 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
+###############################################################################
+
+StreamListView_Clear=Clear
+StreamListView_Duration=Duration
+StreamListView_EndpointA=Endpoint A
+StreamListView_EndpointB=Endpoint B
+StreamListView_ExtractAsFilter=Extract as Filter
+StreamListView_FilterName_Stream=stream
+StreamListView_FollowStream=Follow Stream
+StreamListView_ID=ID
+StreamListView_TotalBytes=Bytes
+StreamListView_TotalPackets=Packets
+StreamListView_PacketsAtoB=Packets A -> B
+StreamListView_PacketsBtoA=Packets B -> A
+StreamListView_BytesAtoB=Bytes A -> B
+StreamListView_BytesBtoA=Bytes B -> A
+StreamListView_StartTime=Start Time
+StreamListView_StopTime=Stop Time
+StreamListView_BPSBtoA=BPS B -> A
+StreamListView_BPSAtoB=BPS A -> B
diff --git a/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/package-info.java b/org.eclipse.linuxtools.tmf.pcap.ui/src/org/eclipse/linuxtools/tmf/pcap/ui/stream/package-info.java
new file mode 100644 (file)
index 0000000..aebf25a
--- /dev/null
@@ -0,0 +1,14 @@
+/*******************************************************************************
+ * 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
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.linuxtools.tmf.pcap.ui.stream;
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index b42315bc9c8140c4403d665d5760b4283fe40300..6ea34041999ce7ad74cfbd45602ce616258f0ee6 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>org.eclipse.linuxtools.tmf.ctf.core.tests</module>
     <module>org.eclipse.linuxtools.tmf.ctf.ui.swtbot.tests</module>
 
+    <module>org.eclipse.linuxtools.tmf.pcap.core</module>
+    <module>org.eclipse.linuxtools.tmf.pcap.ui</module>
+
     <module>org.eclipse.linuxtools.tmf.analysis.xml.core</module>
     <module>org.eclipse.linuxtools.tmf.analysis.xml.core.tests</module>
     <module>org.eclipse.linuxtools.tmf.analysis.xml.ui</module>
This page took 0.079613 seconds and 5 git commands to generate.