pcap: Move plugins to their own sub-directory
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Mon, 11 May 2015 16:48:15 +0000 (12:48 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 16 Jun 2015 18:39:47 +0000 (14:39 -0400)
The "alltests" plugin won't be able to find the pcap test
traces, but this will be rectified once that plugin is also
moved to a sub-directory (we will be able to have a relative
path that works for everyone).

Change-Id: Ic9c3644abfa5d97622769d23a855521e2d5c9371
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
454 files changed:
org.eclipse.tracecompass.pcap.core.tests/.classpath [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.project [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.pcap.core.tests/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.pcap.core.tests/about.html [deleted file]
org.eclipse.tracecompass.pcap.core.tests/build.properties [deleted file]
org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/AllPerfTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapReadBenchmark.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapSeekBenchmark.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/plugin.properties [deleted file]
org.eclipse.tracecompass.pcap.core.tests/pom.xml [deleted file]
org.eclipse.tracecompass.pcap.core.tests/rsc/.gitignore [deleted file]
org.eclipse.tracecompass.pcap.core.tests/rsc/get-traces.xml [deleted file]
org.eclipse.tracecompass.pcap.core.tests/shared/org/eclipse/tracecompass/pcap/core/tests/shared/PcapTestTrace.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/AllPcapCoreTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileEndiannessTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenFailTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileReadTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/BadPacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/PacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ProtocolTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/EthernetIIPacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/IPv4PacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/PcapPacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/TCPPacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/UDPPacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/UnknownPacketTest.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/AllTests.java [deleted file]
org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/StreamBuildTest.java [deleted file]
org.eclipse.tracecompass.pcap.core/.classpath [deleted file]
org.eclipse.tracecompass.pcap.core/.project [deleted file]
org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.pcap.core/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.pcap.core/about.html [deleted file]
org.eclipse.tracecompass.pcap.core/build.properties [deleted file]
org.eclipse.tracecompass.pcap.core/plugin.properties [deleted file]
org.eclipse.tracecompass.pcap.core/pom.xml [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/Activator.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpointPair.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/IPacketFilter.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/PacketFilterByProtocol.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/BadPacketException.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/Packet.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/PcapProtocol.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIEndpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIPacket.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIValues.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Endpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Packet.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Values.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapEndpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapPacket.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPEndpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPPacket.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPValues.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPEndpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPPacket.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownEndpoint.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownPacket.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStream.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStreamBuilder.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/BadPcapFileException.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFile.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFileValues.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/package-info.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/ConversionHelper.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/EthertypeHelper.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/IPProtocolNumberHelper.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/LinkTypeHelper.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/PcapTimestampScale.java [deleted file]
org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.classpath [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.project [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/about.html [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/build.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/plugin.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/pom.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/shared/org/eclipse/tracecompass/tmf/pcap/core/tests/shared/PcapTmfTestTrace.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/AllTmfPcapCoreTests.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/AllTests.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/StreamListAnalysisTest.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/AllTests.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventFieldTest.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventTest.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/AllTests.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/PcapTraceTest.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core.tests/stubs/org/eclipse/tracecompass/tmf/pcap/core/tests/stubs/PcapTmfTraceStub.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.classpath [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.project [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/about.html [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/build.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/plugin.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/plugin.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/pom.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/Activator.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/StreamListAnalysis.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/Messages.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEvent.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventField.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventType.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapRootEventField.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStream.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStreamBuilder.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/Messages.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapDestinationAspect.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapProtocolAspect.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapReferenceAspect.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapSourceAspect.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/messages.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/messages.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/TmfPcapProtocol.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/Messages.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/PcapTrace.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/messages.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/Messages.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/PcapEventFactory.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/ProtocolConversion.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/messages.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.classpath [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.gitignore [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.project [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/about.html [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/build.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/plugin.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/pom.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/AllTests.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.classpath [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.project [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/META-INF/MANIFEST.MF [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/about.html [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/build.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/plugin.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/plugin.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/pom.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/Activator.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/NetworkingPerspectiveFactory.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/Messages.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/StreamListView.java [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/messages.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/package-info.java [deleted file]
org.eclipse.tracecompass.tmf.pcap/.project [deleted file]
org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.resources.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.runtime.prefs [deleted file]
org.eclipse.tracecompass.tmf.pcap/build.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap/feature.properties [deleted file]
org.eclipse.tracecompass.tmf.pcap/feature.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap/p2.inf [deleted file]
org.eclipse.tracecompass.tmf.pcap/pom.xml [deleted file]
org.eclipse.tracecompass.tmf.pcap/sourceTemplateFeature/p2.inf [deleted file]
pcap/org.eclipse.tracecompass.pcap.core.tests/.classpath [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/META-INF/MANIFEST.MF [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/about.html [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/AllPerfTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapReadBenchmark.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapSeekBenchmark.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/plugin.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/rsc/.gitignore [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/rsc/get-traces.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/shared/org/eclipse/tracecompass/pcap/core/tests/shared/PcapTestTrace.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/AllPcapCoreTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileEndiannessTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenFailTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileReadTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/BadPacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/PacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ProtocolTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/EthernetIIPacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/IPv4PacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/PcapPacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/TCPPacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/UDPPacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/UnknownPacketTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/StreamBuildTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.classpath [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/META-INF/MANIFEST.MF [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/about.html [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/plugin.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/Activator.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpointPair.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/IPacketFilter.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/PacketFilterByProtocol.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/BadPacketException.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/Packet.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/PcapProtocol.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIEndpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIPacket.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIValues.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Endpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Packet.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Values.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapEndpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapPacket.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPEndpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPPacket.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPValues.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPEndpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPPacket.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownEndpoint.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownPacket.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStream.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStreamBuilder.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/BadPcapFileException.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFile.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFileValues.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/ConversionHelper.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/EthertypeHelper.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/IPProtocolNumberHelper.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/LinkTypeHelper.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/PcapTimestampScale.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.classpath [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/META-INF/MANIFEST.MF [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/about.html [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/plugin.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/shared/org/eclipse/tracecompass/tmf/pcap/core/tests/shared/PcapTmfTestTrace.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/AllTmfPcapCoreTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/StreamListAnalysisTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventFieldTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/PcapTraceTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/stubs/org/eclipse/tracecompass/tmf/pcap/core/tests/stubs/PcapTmfTraceStub.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.classpath [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/META-INF/MANIFEST.MF [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/about.html [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/plugin.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/plugin.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/Activator.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/StreamListAnalysis.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/Messages.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEvent.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventField.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventType.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapRootEventField.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStream.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStreamBuilder.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/Messages.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapDestinationAspect.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapProtocolAspect.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapReferenceAspect.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapSourceAspect.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/messages.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/messages.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/TmfPcapProtocol.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/Messages.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/PcapTrace.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/messages.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/Messages.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/PcapEventFactory.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/ProtocolConversion.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/messages.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.classpath [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.gitignore [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/META-INF/MANIFEST.MF [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/about.html [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/plugin.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/AllTests.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.classpath [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/META-INF/MANIFEST.MF [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/about.html [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/plugin.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/plugin.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/Activator.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/NetworkingPerspectiveFactory.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/Messages.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/StreamListView.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/messages.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/package-info.java [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/.project [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.resources.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.runtime.prefs [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/build.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/feature.properties [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/feature.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/p2.inf [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/pom.xml [new file with mode: 0644]
pcap/org.eclipse.tracecompass.tmf.pcap/sourceTemplateFeature/p2.inf [new file with mode: 0644]
pcap/pom.xml [new file with mode: 0644]
pom.xml

diff --git a/org.eclipse.tracecompass.pcap.core.tests/.classpath b/org.eclipse.tracecompass.pcap.core.tests/.classpath
deleted file mode 100644 (file)
index 8fbc9a2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="src" path="perf"/>
-       <classpathentry kind="src" path="shared"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.pcap.core.tests/.project b/org.eclipse.tracecompass.pcap.core.tests/.project
deleted file mode 100644 (file)
index 76c8be9..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.pcap.core.tests</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 0409c61..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-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=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-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.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index 62cfa90..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.pcap.core.tests/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.pcap.core.tests/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index d0cf8eb..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.pcap.core.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.tracecompass.pcap.core
-Export-Package: org.eclipse.tracecompass.pcap.core.tests,
- org.eclipse.tracecompass.pcap.core.tests.file;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.packet;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.perf,
- org.eclipse.tracecompass.pcap.core.tests.perf.trace;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol.ethernet2;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol.ipv4;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol.pcap;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol.tcp;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol.udp;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.protocol.unknown;x-internal:=true,
- org.eclipse.tracecompass.pcap.core.tests.shared;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests",
- org.eclipse.tracecompass.pcap.core.tests.stream;x-internal:=true
-Import-Package: com.google.common.collect,
- org.eclipse.test.performance
diff --git a/org.eclipse.tracecompass.pcap.core.tests/about.html b/org.eclipse.tracecompass.pcap.core.tests/about.html
deleted file mode 100644 (file)
index 28737f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core.tests/build.properties b/org.eclipse.tracecompass.pcap.core.tests/build.properties
deleted file mode 100644 (file)
index 15b000d..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/,\
-           perf/,\
-           shared/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.properties,\
-               about.html
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/AllPerfTests.java b/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/AllPerfTests.java
deleted file mode 100644 (file)
index 2b1da2b..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial implementation and API
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.perf;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Run all performance test suites.
- *
- * @author Vincent Perot
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        org.eclipse.tracecompass.pcap.core.tests.perf.trace.AllTests.class
-})
-public class AllPerfTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/AllTests.java
deleted file mode 100644 (file)
index a4b4c92..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.perf.trace;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        PcapReadBenchmark.class,
-        PcapSeekBenchmark.class
-})
-public class AllTests {
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapReadBenchmark.java b/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapReadBenchmark.java
deleted file mode 100644 (file)
index da5530f..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.perf.trace;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * Benchmark of the Pcap parser for reading a trace. Note: We should get a
- * bigger trace. One that has WAYYYY more events since this current trace is
- * just parsed too fast.
- *
- * @author Vincent Perot
- */
-public class PcapReadBenchmark {
-
-    private static final String TEST_SUITE_NAME = "Pcap Read Benchmark";
-    private static final String TEST_ID = "org.eclipse.linuxtools#" + TEST_SUITE_NAME;
-    private static final int LOOP_COUNT = 25;
-    private static final int RUN_BETWEEN_COMMIT_COUNT = 15;
-
-    /**
-     * Benchmark reading the pcap trace
-     */
-    @Test
-    public void testPcapTrace() {
-        readTrace(PcapTestTrace.BENCHMARK_TRACE, "trace-pcap", true);
-    }
-
-    private static void readTrace(PcapTestTrace testTrace, String testName, boolean inGlobalSummary) {
-        assumeTrue(testTrace.exists());
-
-        Performance perf = Performance.getDefault();
-        PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + '#' + testName);
-        perf.tagAsSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
-
-        if (inGlobalSummary) {
-            perf.tagAsGlobalSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
-        }
-
-        for (int loop = 0; loop < LOOP_COUNT; loop++) {
-            pm.start();
-            try (PcapFile trace = testTrace.getTrace();) {
-                for (int i = 0; i < RUN_BETWEEN_COMMIT_COUNT; i++) {
-                    trace.seekPacket(0);
-                    while (trace.hasNextPacket()) {
-                        Packet packet = trace.parseNextPacket();
-                        if (packet == null) {
-                            fail("Test failed at iteration " + loop + '.' + i + ", at packet " + trace.getCurrentRank());
-                            return;
-                        }
-                        /* Do something with the packet because we are awesome */
-                        packet.getPayload();
-                    }
-                }
-            } catch (IOException | BadPcapFileException | BadPacketException e) {
-                fail("Test failed at iteration " + loop + ':' + e.getMessage());
-            }
-            pm.stop();
-        }
-        pm.commit();
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapSeekBenchmark.java b/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapSeekBenchmark.java
deleted file mode 100644 (file)
index d4a5fdc..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.perf.trace;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Random;
-
-import org.eclipse.test.performance.Dimension;
-import org.eclipse.test.performance.Performance;
-import org.eclipse.test.performance.PerformanceMeter;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * Tests for performance regressions of the pcap reader. It only tests the pcap
- * reader, not tmf. <br>
- * This test runs in 3 passes.
- * <ul>
- * <li>first it opens a trace</li>
- * <li>then it reads the trace completely</li>
- * <li>then it randomly (seeded) seeks NB_SEEKS locations in the trace and reads
- * one event at each position.</li>
- * </ul>
- * <li>Note: We should make more seeks, since the current number is just too
- * fast.</li>
- *
- * @author Vincent Perot
- */
-public class PcapSeekBenchmark {
-
-    private static final Random RND = new Random(1000);
-
-    private static final int LOOP_COUNT = 25;
-    private static final int NB_SEEKS = 1000000;
-    private static final String TEST_SUITE_NAME = "Pcap Read & Seek Benchmark (" + NB_SEEKS + " seeks)";
-    private static final String TEST_ID = "org.eclipse.linuxtools#" + TEST_SUITE_NAME;
-
-    /**
-     * Run the benchmark scenario for the pcap trace.
-     */
-    @Test
-    public void testPcapTrace() {
-        readAndSeekTrace(PcapTestTrace.BENCHMARK_TRACE, "trace-pcap", true);
-    }
-
-    private static void readAndSeekTrace(PcapTestTrace testTrace, String testName, boolean inGlobalSummary) {
-        assumeTrue(testTrace.exists());
-
-        Performance perf = Performance.getDefault();
-        PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + '#' + testName);
-        perf.tagAsSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
-
-        if (inGlobalSummary) {
-            perf.tagAsGlobalSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
-        }
-
-        for (int loop = 0; loop < LOOP_COUNT; loop++) {
-            try (PcapFile trace = testTrace.getTrace()) {
-                trace.seekPacket(0);
-
-                /* Read the whole trace to find out the number of packets */
-                long nbPackets = trace.getTotalNbPackets();
-
-                /* Generate the timestamps we will seek to */
-                List<Long> seekTimestamps = new LinkedList<>();
-                final long range = nbPackets;
-                for (int i = 0; i < NB_SEEKS; i++) {
-                    long rank = (RND.nextLong() % range);
-                    if (rank < 0) {
-                        // This is needed since modulus can return a negative
-                        // number.
-                        rank += range;
-                    }
-                    seekTimestamps.add(rank);
-                }
-
-                /* Benchmark seeking to the generated timestamps */
-                pm.start();
-                for (Long rank : seekTimestamps) {
-                    trace.seekPacket(rank);
-                    trace.parseNextPacket();
-                }
-                pm.stop();
-
-            } catch (IOException | BadPcapFileException | BadPacketException e) {
-                /* Should not happen if assumeTrue() passed above */
-                fail("Test failed at iteration " + loop + ':' + e.getMessage());
-            }
-        }
-        pm.commit();
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/plugin.properties b/org.eclipse.tracecompass.pcap.core.tests/plugin.properties
deleted file mode 100644 (file)
index 8f0d91d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Trace Compass Pcap Parser Core Tests Plug-in
diff --git a/org.eclipse.tracecompass.pcap.core.tests/pom.xml b/org.eclipse.tracecompass.pcap.core.tests/pom.xml
deleted file mode 100644 (file)
index faa592a..0000000
+++ /dev/null
@@ -1,116 +0,0 @@
-<?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 xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.pcap.core.tests</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-test-plugin</packaging>
-
-  <name>Trace Compass Pcap Parser Core Tests Plug-in</name>
-
-  <!-- Do not download the test traces if "maven.test.skip" is set -->
-  <profiles>
-    <profile>
-      <id>download-traces</id>
-      <activation>
-        <property>
-          <name>!maven.test.skip</name>
-        </property>
-      </activation>
-
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.8</version>
-            <executions>
-              <execution>
-                <id>prepare</id>
-                <phase>pre-integration-test</phase>
-                <configuration>
-                  <target>
-                    <ant antfile="get-traces.xml" dir="rsc" />
-                  </target>
-                </configuration>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-  </profiles>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-surefire-plugin</artifactId>
-        <version>${tycho-version}</version>
-        <configuration>
-          <testSuite>org.eclipse.tracecompass.pcap.core.tests</testSuite>
-          <testClass>org.eclipse.tracecompass.pcap.core.tests.AllPcapCoreTests</testClass>
-          <useUIHarness>false</useUIHarness>
-          <useUIThread>false</useUIThread>
-          <product>org.eclipse.platform.ide</product>
-        </configuration>
-      </plugin>
-
-      <!-- We don't use the ant file to clean because of http://jira.codehaus.org/browse/MANTRUN-78 -->
-      <plugin>
-        <artifactId>maven-clean-plugin</artifactId>
-        <version>2.6.1</version>
-        <executions>
-          <execution>
-            <id>clean-traces</id>
-            <phase>clean</phase>
-            <configuration>
-              <filesets>
-                <fileset>
-                  <directory>rsc</directory>
-                  <includes>
-                    <include>*.zip</include>
-                    <include>*.pcap</include>
-                    <include>*.cap</include>
-                    <include>*.tar*</include>
-                  </includes>
-                  <excludes>
-                    <exclude>*.xml</exclude>
-                    <exclude>*.sh</exclude>
-                  </excludes>
-                </fileset>
-                <fileset><directory>rsc/kernel</directory></fileset>
-              </filesets>
-            </configuration>
-            <goals>
-              <goal>clean</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-
-    </plugins>
-  </build>
-
- <groupId>org.eclipse.tracecompass</groupId>
-</project>
diff --git a/org.eclipse.tracecompass.pcap.core.tests/rsc/.gitignore b/org.eclipse.tracecompass.pcap.core.tests/rsc/.gitignore
deleted file mode 100644 (file)
index a8ddf0a..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-*.zip
-*.pcap
-*.cap
-*.tar*
-/kernel
diff --git a/org.eclipse.tracecompass.pcap.core.tests/rsc/get-traces.xml b/org.eclipse.tracecompass.pcap.core.tests/rsc/get-traces.xml
deleted file mode 100644 (file)
index 73d7df9..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-   Copyright (C) 2013, Red Hat, Inc. and others
-
-   All rights reserved. This program and the accompanying materials
-   are made available under the terms of the Eclipse Public License v1.0
-   which accompanies this distribution, and is available at
-   http://www.eclipse.org/legal/epl-v10.html
--->
-<!--
-Most traces are taken from the Wireshark website and are available under the GNU General Public License.
-http://wiki.wireshark.org/SampleCaptures
--->
-
-<project name="Extract Traces" default="main" >
-
-<target name="main">
-  <echo message="Attempting to download test traces"/>
-  <get ignoreerrors="true" maxtime="20" dest="Short_LittleEndian.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/1/18/Short_LittleEndian.pcap.zip" />
-  <get ignoreerrors="true" maxtime="20" dest="Short_BigEndian.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/2/25/Short_BigEndian.pcap.zip" />
-  <get ignoreerrors="true" maxtime="20" dest="MostlyUDP.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/6/64/MostlyUDP.pcap.zip" />
-  <get ignoreerrors="true" maxtime="20" dest="MostlyTCP.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/8/8d/MostlyTCP.pcap.zip" />
-  <get ignoreerrors="true" maxtime="20" dest="EmptyPcap.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/c/c1/EmptyPcap.pcap.zip" />
-  <get ignoreerrors="true" maxtime="20" dest="BadPcapFile.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/5/5e/BadPcapFile.pcap.zip" />
-  <get ignoreerrors="true" maxtime="60" dest="BenchmarkTrace.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/1/12/BenchmarkTrace.pcap.zip" />
-  <get ignoreerrors="true" maxtime="20" dest="sample-ctf-trace-20120412.tar.bz2" skipexisting="true" src="http://lttng.org/files/samples/sample-ctf-trace-20120412.tar.bz2"/>
-  <condition property="testSuiteExists">
-    <and>
-      <available file="pcap-testsuite" type="dir"/>
-    </and>
-  </condition>
-  <condition property="tracesExist">
-    <and>
-        <available file="Short_LittleEndian.pcap.zip"/>
-        <available file="Short_BigEndian.pcap.zip"/>
-        <available file="MostlyUDP.pcap.zip"/>
-        <available file="MostlyTCP.pcap.zip"/>
-        <available file="EmptyPcap.pcap.zip"/>
-        <available file="BadPcapFile.pcap.zip"/>
-        <available file="BenchmarkTrace.pcap.zip"/>
-        <available file="sample-ctf-trace-20120412.tar.bz2"/>
-    </and>
-  </condition>
-  <antcall target="extractTraces"/>
-</target>
-
-<target name="extractTraces" if="tracesExist">
-    <unzip src="Short_LittleEndian.pcap.zip" dest="." />
-    <unzip src="Short_BigEndian.pcap.zip" dest="." />
-    <unzip src="MostlyUDP.pcap.zip" dest="." />
-    <unzip src="MostlyTCP.pcap.zip" dest="." />
-    <unzip src="EmptyPcap.pcap.zip" dest="." />
-    <unzip src="BadPcapFile.pcap.zip" dest="." />
-    <unzip src="BenchmarkTrace.pcap.zip" dest="." />
-    <bunzip2 src="sample-ctf-trace-20120412.tar.bz2"/>
-    <untar src="sample-ctf-trace-20120412.tar" dest="." />
-    <echo message="Traces extracted successfully"/>
-</target>
-</project>
diff --git a/org.eclipse.tracecompass.pcap.core.tests/shared/org/eclipse/tracecompass/pcap/core/tests/shared/PcapTestTrace.java b/org.eclipse.tracecompass.pcap.core.tests/shared/org/eclipse/tracecompass/pcap/core/tests/shared/PcapTestTrace.java
deleted file mode 100644 (file)
index 61b0425..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.shared;
-
-import java.io.IOException;
-import java.nio.file.FileSystems;
-import java.nio.file.Files;
-import java.nio.file.Path;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-
-/**
- * Here is the list of the available test traces for the Pcap parser.
- *
- * @author Vincent Perot
- */
-public enum PcapTestTrace {
-
-    /** A bad pcap file. */
-    BAD_PCAPFILE("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "BadPcapFile.pcap"),
-
-    /** A Valid Pcap that is empty. */
-    EMPTY_PCAP("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "EmptyPcap.pcap"),
-
-    /** A Pcap that mostly contains TCP packets. */
-    MOSTLY_TCP("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "mostlyTCP.pcap"),
-
-    /** A Pcap that mostly contains UDP packets. */
-    MOSTLY_UDP("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "mostlyUDP.pcap"),
-
-    /** A big-endian trace that contains two packets. */
-    SHORT_BIG_ENDIAN("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "Short_BigEndian.pcap"),
-
-    /** A little-endian trace that contains two packets. */
-    SHORT_LITTLE_ENDIAN("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "Short_LittleEndian.pcap"),
-
-    /** A large trace for benchmarking. */
-    BENCHMARK_TRACE("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "benchmarkTrace.pcap"),
-
-    /** A Kernel trace directory. */
-    KERNEL_DIRECTORY("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "kernel"),
-
-    /** A Kernel trace file. */
-    KERNEL_TRACE("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "kernel", "channel0_0");
-
-    private final @NonNull Path fPath;
-
-    private PcapTestTrace(@NonNull String first, String... more) {
-        @SuppressWarnings("null")
-        @NonNull Path path = FileSystems.getDefault().getPath(first, more);
-        fPath = path;
-    }
-
-    /** @return The path to the test trace */
-    public @NonNull Path getPath() {
-        return fPath;
-    }
-
-    /**
-     * Get a Pcap Trace instance of a test trace. Make sure to call
-     * {@link #exists()} before calling this!
-     *
-     * @return The PcapFile object
-     * @throws IOException
-     *             Thrown when some IO error occurs.
-     * @throws BadPcapFileException
-     *             Thrown when the file is not a valid Pcap File.
-     */
-    public PcapFile getTrace() throws BadPcapFileException, IOException {
-        return new PcapFile(fPath);
-    }
-
-    /**
-     * Check if this test trace actually exists on disk.
-     *
-     * @return If the trace exists
-     */
-    public boolean exists() {
-        if (Files.notExists(fPath)) {
-            return false;
-        }
-        return true;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/AllPcapCoreTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/AllPcapCoreTests.java
deleted file mode 100644 (file)
index 8aae4ab..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Master test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        org.eclipse.tracecompass.pcap.core.tests.file.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.packet.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.ethernet2.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.ipv4.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.pcap.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.tcp.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.udp.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.protocol.unknown.AllTests.class,
-        org.eclipse.tracecompass.pcap.core.tests.stream.AllTests.class
-})
-public class AllPcapCoreTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/AllTests.java
deleted file mode 100644 (file)
index c04a036..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.file;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * File test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        PcapFileOpenTest.class,
-        PcapFileOpenFailTest.class,
-        PcapFileReadTest.class,
-        PcapFileEndiannessTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileEndiannessTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileEndiannessTest.java
deleted file mode 100644 (file)
index 2ea3000..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.file;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteOrder;
-import java.nio.file.Path;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests whether the Pcap parser can read both big endian and
- * little endian files.
- *
- * @author Vincent Perot
- */
-public class PcapFileEndiannessTest {
-
-    /**
-     * Test that verify that two files with different endianness contain the
-     * same packets.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void EndiannessTest() throws IOException, BadPcapFileException, BadPacketException {
-        PcapTestTrace trace = PcapTestTrace.SHORT_LITTLE_ENDIAN;
-        assumeTrue(trace.exists());
-        Path path1 = trace.getPath();
-
-        trace = PcapTestTrace.SHORT_LITTLE_ENDIAN;
-        assumeTrue(trace.exists());
-        Path path2 = PcapTestTrace.SHORT_BIG_ENDIAN.getPath();
-
-        try (PcapFile littleEndian = new PcapFile(path1);
-                PcapFile bigEndian = new PcapFile(path2);) {
-            assertEquals(ByteOrder.BIG_ENDIAN, bigEndian.getByteOrder());
-            assertEquals(ByteOrder.LITTLE_ENDIAN, littleEndian.getByteOrder());
-            while (littleEndian.hasNextPacket() && bigEndian.hasNextPacket()) {
-                assertEquals(littleEndian.parseNextPacket(), bigEndian.parseNextPacket());
-            }
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenFailTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenFailTest.java
deleted file mode 100644 (file)
index 22f85c4..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.file;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests the opening of non-valid pcap files.
- *
- * @author Vincent Perot
- */
-public class PcapFileOpenFailTest {
-
-    /**
-     * Test that tries to open a pcap with a bad magic number
-     *
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     */
-    @Test
-    public void FileOpenBadPcapTest() throws IOException {
-        PcapTestTrace trace = PcapTestTrace.BAD_PCAPFILE;
-        assumeTrue(trace.exists());
-
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-            fail("The pcap was accepted even though the magic number is invalid!");
-        } catch (BadPcapFileException e) {
-            assertEquals("c3d4a1b2 is not a known magic number.", e.getMessage());
-        }
-    }
-
-    /**
-     * Test that tries to open a non-pcap binary file
-     *
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     */
-    @Test
-    public void FileOpenBinaryFile() throws IOException {
-        PcapTestTrace trace = PcapTestTrace.KERNEL_TRACE;
-        assumeTrue(trace.exists());
-
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-            fail("The file was accepted even though it is not a pcap file!");
-        } catch (BadPcapFileException e) {
-            assertEquals("c11ffcc1 is not a known magic number.", e.getMessage());
-        }
-    }
-
-    /**
-     * Test that tries to open a directory
-     *
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     */
-    @Test
-    public void FileOpenDirectory() throws IOException {
-        PcapTestTrace trace = PcapTestTrace.KERNEL_DIRECTORY;
-        assumeTrue(trace.exists());
-
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-            fail("The file was accepted even though it is not a pcap file!");
-        } catch (BadPcapFileException e) {
-            assertEquals("Bad Pcap File.", e.getMessage());
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenTest.java
deleted file mode 100644 (file)
index 342b5e1..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.file;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteOrder;
-
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests the opening of valid pcap files.
- *
- * @author Vincent Perot
- */
-public class PcapFileOpenTest {
-
-    /**
-     * Test that verify that an empty pcap file is properly opened and that the
-     * file properties are correct.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     */
-    @Test
-    public void FileOpenEmptyTest() throws IOException, BadPcapFileException {
-
-        PcapTestTrace trace = PcapTestTrace.EMPTY_PCAP;
-        assumeTrue(trace.exists());
-
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-            assertEquals(PcapTestTrace.EMPTY_PCAP.getPath(), file.getPath());
-            assertEquals(2, file.getMajorVersion());
-            assertEquals(4, file.getMinorVersion());
-            assertEquals(1, file.getDataLinkType());
-            assertEquals(65535, file.getSnapLength());
-            assertEquals(0, file.getTimeAccuracy());
-            assertEquals(0, file.getTimeZoneCorrection());
-            assertEquals(ByteOrder.LITTLE_ENDIAN, file.getByteOrder());
-
-            assertEquals(0, file.getTotalNbPackets());
-
-        }
-    }
-
-    /**
-     * Test that verify that an non-empty pcap file is properly opened and that
-     * the file properties are correct.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     */
-
-    @Test
-    public void FileOpenTest() throws IOException, BadPcapFileException {
-
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-            assertEquals(PcapTestTrace.MOSTLY_TCP.getPath(), file.getPath());
-            assertEquals(2, file.getMajorVersion());
-            assertEquals(4, file.getMinorVersion());
-            assertEquals(1, file.getDataLinkType());
-            assertEquals(65535, file.getSnapLength());
-            assertEquals(0, file.getTimeAccuracy());
-            assertEquals(0, file.getTimeZoneCorrection());
-            assertEquals(ByteOrder.LITTLE_ENDIAN, file.getByteOrder());
-
-            assertEquals(43, file.getTotalNbPackets());
-
-        }
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileReadTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileReadTest.java
deleted file mode 100644 (file)
index 565f276..0000000
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.file;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests if packets are read without error.
- *
- * @author Vincent Perot
- */
-public class PcapFileReadTest {
-
-    /**
-     * Test that verify that packets are well read and that no error happens in
-     * file index.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void FileReadTest() throws IOException, BadPcapFileException, BadPacketException {
-
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_UDP;
-        assumeTrue(trace.exists());
-
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-
-            PcapPacket packet = file.parseNextPacket();
-            if (packet == null) {
-                fail("FileReadTest() failed!");
-                return;
-            }
-
-            assertEquals(1, file.getCurrentRank());
-            // Verify Pcap packet.
-            assertEquals(file, packet.getPcapFile());
-            assertEquals(PcapProtocol.PCAP, packet.getProtocol());
-            assertEquals(0, packet.getIndex());
-            assertEquals(1120469540839312L, packet.getTimestamp());
-            assertEquals(92, packet.getOriginalLength());
-            assertEquals(92, packet.getIncludedLength());
-            assertEquals(false, packet.isTruncated());
-            assertEquals(true, packet.validate());
-            // Verify Ethernet Packet
-            if (!packet.hasProtocol(PcapProtocol.ETHERNET_II)) {
-                fail("Packet doesn't have ethernet!");
-            }
-            // Verify IPv4 Packet
-            if (!packet.hasProtocol(PcapProtocol.IPV4)) {
-                fail("Packet doesn't have IPv4!");
-            }
-            // Verify UDP Packet
-            if (!packet.hasProtocol(PcapProtocol.UDP)) {
-                fail("Packet doesn't have UDP!");
-            }
-            // Verify Unknown Packet
-            if (!packet.hasProtocol(PcapProtocol.UNKNOWN)) {
-                fail("Packet doesn't have payload!");
-            }
-
-            // Parse a "random" packet
-            file.seekPacket(58);
-            packet = file.parseNextPacket();
-            if (packet == null) {
-                fail("FileReadTest() failed!");
-                return;
-            }
-
-            // Verify Pcap packet.
-            assertEquals(file, packet.getPcapFile());
-            assertEquals(PcapProtocol.PCAP, packet.getProtocol());
-            assertEquals(58, packet.getIndex());
-            assertEquals(1120469635045415L, packet.getTimestamp());
-            assertEquals(113, packet.getOriginalLength());
-            assertEquals(113, packet.getIncludedLength());
-            assertEquals(false, packet.isTruncated());
-            assertEquals(true, packet.validate());
-            // Verify Ethernet Packet
-            if (!packet.hasProtocol(PcapProtocol.ETHERNET_II)) {
-                fail("Packet doesn't have ethernet!");
-            }
-            // Verify IPv4 Packet
-            if (!packet.hasProtocol(PcapProtocol.IPV4)) {
-                fail("Packet doesn't have IPv4!");
-            }
-            // Verify TCP Packet
-            if (!packet.hasProtocol(PcapProtocol.TCP)) {
-                fail("Packet doesn't have TCP!");
-            }
-            // Verify Unknown Packet
-            if (!packet.hasProtocol(PcapProtocol.UNKNOWN)) {
-                fail("Packet doesn't have payload!");
-            }
-
-            // Skip packet
-            file.skipNextPacket();
-            assertEquals(60, file.getCurrentRank());
-
-            // Parse outside of file.
-            file.seekPacket(99999999);
-            assertEquals(file.getTotalNbPackets(), file.getCurrentRank());
-            file.skipNextPacket(); // Should be a no-op
-            assertEquals(file.getTotalNbPackets(), file.getCurrentRank());
-            packet = file.parseNextPacket();
-            assertNull(packet);
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/AllTests.java
deleted file mode 100644 (file)
index d40c2ae..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.packet;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Generic Packet test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        PacketTest.class,
-        BadPacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/BadPacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/BadPacketTest.java
deleted file mode 100644 (file)
index 2de750c..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.packet;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests if BadPacketExceptions are thrown correctly.
- *
- * @author Vincent Perot
- */
-public class BadPacketTest {
-
-    private ByteBuffer fEthernetPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fEthernetPacket = ByteBuffer.allocate(8);
-        fEthernetPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // This packet is erroneous. It contains 8 bytes while the minimum is 14
-        // bytes for an Ethernet II packet.
-
-        // Destination MAC - 6 bytes
-        fEthernetPacket.put((byte) 0x34);
-        fEthernetPacket.put((byte) 0x67);
-        fEthernetPacket.put((byte) 0x0C);
-        fEthernetPacket.put((byte) 0xD2);
-        fEthernetPacket.put((byte) 0x91);
-        fEthernetPacket.put((byte) 0x51);
-
-        // Source MAC - 2 bytes
-        fEthernetPacket.put((byte) 0x10);
-        fEthernetPacket.put((byte) 0xF8);
-
-        fEthernetPacket.flip();
-
-    }
-
-    /**
-     * Test that verify if a BadPacketException is correctly thrown (when a
-     * packet is erroneous).
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Expected from the test.
-     */
-    @Test(expected = BadPacketException.class)
-    public void PacketExceptionTest() throws BadPacketException, IOException, BadPcapFileException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer packet = fEthernetPacket;
-            if (packet != null) {
-                new EthernetIIPacket(dummy, null, packet);
-            }
-            fail("PacketExceptionTest has failed!");
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/PacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/PacketTest.java
deleted file mode 100644 (file)
index aa7e4e3..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.packet;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests the generic Packet class and its method.
- *
- * @author Vincent Perot
- */
-public class PacketTest {
-
-    private ByteBuffer fEthernetPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fEthernetPacket = ByteBuffer.allocate(15);
-        fEthernetPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // Destination MAC - 6 bytes
-        fEthernetPacket.put((byte) 0x34);
-        fEthernetPacket.put((byte) 0x67);
-        fEthernetPacket.put((byte) 0x0C);
-        fEthernetPacket.put((byte) 0xD2);
-        fEthernetPacket.put((byte) 0x91);
-        fEthernetPacket.put((byte) 0x51);
-
-        // Source MAC - 6 bytes
-        fEthernetPacket.put((byte) 0x10);
-        fEthernetPacket.put((byte) 0xF8);
-        fEthernetPacket.put((byte) 0x82);
-        fEthernetPacket.put((byte) 0xB3);
-        fEthernetPacket.put((byte) 0x44);
-        fEthernetPacket.put((byte) 0x78);
-
-        // Ethertype - 2 bytes
-        fEthernetPacket.put((byte) 0xA2);
-        fEthernetPacket.put((byte) 0x56);
-
-        // Payload - 1 byte
-        fEthernetPacket.put((byte) 0xA6);
-
-        fEthernetPacket.flip();
-
-    }
-
-    /**
-     * Test that verify the correctness of the Packet's methods.
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void GenericPacketTest() throws BadPacketException, IOException, BadPcapFileException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer byteBuffer = fEthernetPacket;
-            if (byteBuffer == null) {
-                fail("GenericPacketTest has failed!");
-                return;
-            }
-
-            Packet packet = new EthernetIIPacket(dummy, null, byteBuffer);
-            assertTrue(packet.hasProtocol(PcapProtocol.ETHERNET_II));
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
-            assertEquals(PcapProtocol.ETHERNET_II, packet.getProtocol());
-
-            assertEquals(packet, packet.getPacket(PcapProtocol.ETHERNET_II));
-            assertNull(packet.getPacket(PcapProtocol.TCP));
-            assertEquals(packet.getChildPacket(), packet.getPacket(PcapProtocol.UNKNOWN));
-            assertEquals(packet.getPacket(PcapProtocol.ETHERNET_II), packet.getMostEcapsulatedPacket());
-
-            assertNull(packet.getParentPacket());
-            assertFalse(packet.getPcapFile().equals(null));
-
-            Packet child = packet.getChildPacket();
-            if (child == null) {
-                fail("GenericPacketTest has failed!");
-                return;
-            }
-            assertEquals(packet.getPayload(), child.getPayload());
-            assertEquals(packet.getGlobalSummaryString(), "Source MAC: 10:f8:82:b3:44:78 , Destination MAC: 34:67:0c:d2:91:51");
-
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/AllTests.java
deleted file mode 100644 (file)
index 22ca134..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Protocol test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        ProtocolTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ProtocolTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ProtocolTest.java
deleted file mode 100644 (file)
index c8c3cb0..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests whether protocol operation are happening without
- * error.
- *
- * @author Vincent Perot
- */
-public class ProtocolTest {
-
-    /**
-     * Test that verify if the protocol attributes are as expected.
-     */
-    @Test
-    public void TestProtocolAttributes() {
-        assertEquals(PcapProtocol.PCAP.getName(), "Packet Capture");
-        assertEquals(PcapProtocol.PCAP.getShortName(), "pcap");
-        assertEquals(PcapProtocol.PCAP.getLayer(), PcapProtocol.Layer.LAYER_0);
-    }
-
-    /**
-     * Test that verify if the protocol getter methods are working properly.
-     */
-    @Test
-    public void TestgetProtocols() {
-        List<PcapProtocol> manualListLayer = new ArrayList<>();
-        for (PcapProtocol.Layer layer : PcapProtocol.Layer.values()) {
-            assertNotNull(layer);
-            Collection<PcapProtocol> listLayer = PcapProtocol.getProtocolsOnLayer(layer);
-
-            manualListLayer.clear();
-            switch (layer) {
-            case LAYER_0:
-                manualListLayer.add(PcapProtocol.PCAP);
-                break;
-            case LAYER_1:
-                break;
-            case LAYER_2:
-                manualListLayer.add(PcapProtocol.ETHERNET_II);
-                break;
-            case LAYER_3:
-                manualListLayer.add(PcapProtocol.IPV4);
-                break;
-            case LAYER_4:
-                manualListLayer.add(PcapProtocol.TCP);
-                manualListLayer.add(PcapProtocol.UDP);
-                break;
-            case LAYER_5:
-                break;
-            case LAYER_6:
-                break;
-            case LAYER_7:
-                manualListLayer.add(PcapProtocol.UNKNOWN);
-                break;
-            default:
-                fail("Illegal layer value!");
-            }
-            assertEquals(manualListLayer, listLayer);
-        }
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/AllTests.java
deleted file mode 100644 (file)
index a36a423..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.ethernet2;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Ethernet II test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        EthernetIIPacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/EthernetIIPacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/EthernetIIPacketTest.java
deleted file mode 100644 (file)
index 1238876..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.ethernet2;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.Map;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIValues;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * JUnit Class that tests the EthernetIIPacket class and its method.
- *
- * @author Vincent Perot
- */
-public class EthernetIIPacketTest {
-
-    private static final Map<String, String> EXPECTED_FIELDS = ImmutableMap.of(
-            "Source MAC Address", "10:f8:82:b3:44:78",
-            "Destination MAC Address", "34:67:0c:d2:91:51",
-            "Ethertype", "Unknown (0xa256)"
-            );
-
-    private static final String EXPECTED_TOSTRING =
-            "Ethernet II, Source: 10:f8:82:b3:44:78, Destination: 34:67:0c:d2:91:51, Type: Unknown (0xa256)\nPayload: a6";
-
-    private ByteBuffer fPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fPacket = ByteBuffer.allocate(15);
-        fPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // Destination MAC - 6 bytes
-        fPacket.put((byte) 0x34);
-        fPacket.put((byte) 0x67);
-        fPacket.put((byte) 0x0C);
-        fPacket.put((byte) 0xD2);
-        fPacket.put((byte) 0x91);
-        fPacket.put((byte) 0x51);
-
-        // Source MAC - 6 bytes
-        fPacket.put((byte) 0x10);
-        fPacket.put((byte) 0xF8);
-        fPacket.put((byte) 0x82);
-        fPacket.put((byte) 0xB3);
-        fPacket.put((byte) 0x44);
-        fPacket.put((byte) 0x78);
-
-        // Ethertype - 2 bytes
-        fPacket.put((byte) 0xA2);
-        fPacket.put((byte) 0x56);
-
-        // Payload - 1 byte
-        fPacket.put((byte) 0xA6);
-
-        fPacket.flip();
-    }
-
-    /**
-     * Test that verify the correctness of the EthernetIIPacket's methods.
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void CompleteEthernetIIPacketTest() throws IOException, BadPcapFileException, BadPacketException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer byteBuffer = fPacket;
-            if (byteBuffer == null) {
-                fail("CompleteEthernetIIPacketTest has failed!");
-                return;
-            }
-            EthernetIIPacket packet = new EthernetIIPacket(dummy, null, byteBuffer);
-
-            // Protocol Testing
-            assertEquals(PcapProtocol.ETHERNET_II, packet.getProtocol());
-            assertTrue(packet.hasProtocol(PcapProtocol.ETHERNET_II));
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
-
-            // Abstract methods Testing
-            assertTrue(packet.validate());
-            assertEquals(-653947816, packet.hashCode());
-            assertFalse(packet.equals(null));
-            assertEquals(new EthernetIIPacket(dummy, null, byteBuffer), packet);
-
-            assertEquals(EXPECTED_FIELDS, packet.getFields());
-            assertEquals(EXPECTED_TOSTRING, packet.toString());
-            assertEquals("Src: 10:f8:82:b3:44:78 , Dst: 34:67:0c:d2:91:51", packet.getLocalSummaryString());
-            assertEquals("Source MAC: 10:f8:82:b3:44:78 , Destination MAC: 34:67:0c:d2:91:51", packet.getGlobalSummaryString());
-
-            assertEquals(new EthernetIIEndpoint(packet, true), packet.getSourceEndpoint());
-            assertEquals(new EthernetIIEndpoint(packet, false), packet.getDestinationEndpoint());
-
-            fPacket.position(14);
-            byte[] payload = new byte[1];
-            fPacket.get(payload);
-            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
-
-            // Packet-specific methods Testing
-            assertTrue(Arrays.equals(packet.getSourceMacAddress(), Arrays.copyOfRange(fPacket.array(), EthernetIIValues.MAC_ADDRESS_SIZE, EthernetIIValues.MAC_ADDRESS_SIZE + EthernetIIValues.MAC_ADDRESS_SIZE)));
-            assertTrue(Arrays.equals(packet.getDestinationMacAddress(), Arrays.copyOfRange(fPacket.array(), 0, 0 + EthernetIIValues.MAC_ADDRESS_SIZE)));
-            assertEquals(0xA256, packet.getEthertype());
-
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/AllTests.java
deleted file mode 100644 (file)
index 5222ea5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.ipv4;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * IPv4 test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        IPv4PacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/IPv4PacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/IPv4PacketTest.java
deleted file mode 100644 (file)
index 2be192c..0000000
+++ /dev/null
@@ -1,211 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.ipv4;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Endpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests the IPv4Packet class and its method.
- *
- * @author Vincent Perot
- */
-public class IPv4PacketTest {
-
-    private static final Map<String, String> EXPECTED_FIELDS;
-    static {
-        EXPECTED_FIELDS = new LinkedHashMap<>();
-        EXPECTED_FIELDS.put("Version", "4");
-        EXPECTED_FIELDS.put("Header Length", "24 bytes");
-        EXPECTED_FIELDS.put("Differentiated Services Field", "0x26");
-        EXPECTED_FIELDS.put("Explicit Congestion Notification", "0x02");
-        EXPECTED_FIELDS.put("Total Length", "255 bytes");
-        EXPECTED_FIELDS.put("Identification", "0x0ff0");
-        EXPECTED_FIELDS.put("Don't Fragment Flag", "false");
-        EXPECTED_FIELDS.put("More Fragment Flag", "false");
-        EXPECTED_FIELDS.put("Fragment Offset", "7905");
-        EXPECTED_FIELDS.put("Time to live", "160");
-        EXPECTED_FIELDS.put("Protocol", "Unknown (254)");
-        EXPECTED_FIELDS.put("Checksum", "0x3344");
-        EXPECTED_FIELDS.put("Source IP Address", "192.168.1.0");
-        EXPECTED_FIELDS.put("Destination IP Address", "193.169.2.1");
-        EXPECTED_FIELDS.put("Options", "a2 56 a2 56");
-    }
-
-    private static final String EXPECTED_TOSTRING;
-    static {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Internet Protocol Version 4, Source: 192.168.1.0, Destination: 193.169.2.1\n");
-        sb.append("Version: 4, Identification: 0x0ff0, Header Length: 24 bytes, Total Length: 255 bytes\n");
-        sb.append("Differentiated Services Code Point: 0x26; Explicit Congestion Notification: 0x02\n");
-        sb.append("Flags: 0x00 (Don't have more fragments), Fragment Offset: 7905\n");
-        sb.append("Time to live: 160\n");
-        sb.append("Protocol: 254\n");
-        sb.append("Header Checksum: 0x3344\n");
-        sb.append("Payload: a6");
-
-        EXPECTED_TOSTRING = sb.toString();
-    }
-
-    private ByteBuffer fPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fPacket = ByteBuffer.allocate(25);
-        fPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // Version + IHL
-        fPacket.put((byte) 0x46);
-
-        // DSCP + ECN
-        fPacket.put((byte) 0x9A);
-
-        // Total length - this is randomly chosen so that we verify that the
-        // packet handles wrong total length.
-        fPacket.put((byte) 0x00);
-        fPacket.put((byte) 0xFF);
-
-        // Identification
-        fPacket.put((byte) 0x0F);
-        fPacket.put((byte) 0xF0);
-
-        // Flags + Fragment Offset
-        fPacket.put((byte) 0x1E);
-        fPacket.put((byte) 0xE1);
-
-        // Time to live
-        fPacket.put((byte) 0xA0);
-
-        // Protocol - Unknown
-        fPacket.put((byte) 0xFE);
-
-        // Header checksum - chosen randomly
-        fPacket.put((byte) 0x33);
-        fPacket.put((byte) 0x44);
-
-        // Source IP - 4 bytes
-        fPacket.put((byte) 192);
-        fPacket.put((byte) 168);
-        fPacket.put((byte) 1);
-        fPacket.put((byte) 0);
-
-        // Destination IP - 4 bytes
-        fPacket.put((byte) 193);
-        fPacket.put((byte) 169);
-        fPacket.put((byte) 2);
-        fPacket.put((byte) 1);
-
-        // Options - 4 bytes
-        fPacket.put((byte) 0xA2);
-        fPacket.put((byte) 0x56);
-        fPacket.put((byte) 0xA2);
-        fPacket.put((byte) 0x56);
-
-        // Payload - 1 byte
-        fPacket.put((byte) 0xA6);
-
-        fPacket.flip();
-    }
-
-    /**
-     * Test that verify the correctness of the IPv4Packet's methods.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void CompleteIPv4PacketTest() throws IOException, BadPcapFileException, BadPacketException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer byteBuffer = fPacket;
-            if (byteBuffer == null) {
-                fail("CompleteIPv4PacketTest has failed!");
-                return;
-            }
-            IPv4Packet packet = new IPv4Packet(dummy, null, byteBuffer);
-
-            // Protocol Testing
-            assertEquals(PcapProtocol.IPV4, packet.getProtocol());
-            assertTrue(packet.hasProtocol(PcapProtocol.IPV4));
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
-
-            // Abstract methods Testing
-            assertTrue(packet.validate());
-            assertEquals(-222021887, packet.hashCode());
-            assertFalse(packet.equals(null));
-            assertEquals(new IPv4Packet(dummy, null, byteBuffer), packet);
-
-            assertEquals(EXPECTED_FIELDS, packet.getFields());
-            assertEquals(EXPECTED_TOSTRING, packet.toString());
-            assertEquals("Src: 192.168.1.0 , Dst: 193.169.2.1", packet.getLocalSummaryString());
-            assertEquals("192.168.1.0 > 193.169.2.1 Id=4080 Len=1", packet.getGlobalSummaryString());
-
-            assertEquals(new IPv4Endpoint(packet, true), packet.getSourceEndpoint());
-            assertEquals(new IPv4Endpoint(packet, false), packet.getDestinationEndpoint());
-
-            fPacket.position(24);
-            byte[] payload = new byte[1];
-            fPacket.get(payload);
-            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
-
-            // Packet-specific methods Testing
-            assertEquals(InetAddress.getByAddress(Arrays.copyOfRange(fPacket.array(), 12, 16)), packet.getSourceIpAddress());
-            assertEquals(InetAddress.getByAddress(Arrays.copyOfRange(fPacket.array(), 16, 20)), packet.getDestinationIpAddress());
-            assertTrue(Arrays.equals(packet.getOptions(), Arrays.copyOfRange(fPacket.array(), 20, 24)));
-            assertEquals(4, packet.getVersion());
-            assertEquals(24, packet.getHeaderLength());
-            assertEquals(0x26, packet.getDSCP());
-            assertEquals(0x02, packet.getExplicitCongestionNotification());
-            assertEquals(255, packet.getTotalLength());
-            assertEquals(0x0FF0, packet.getIdentification());
-            assertFalse(packet.getReservedFlag());
-            assertFalse(packet.getDontFragmentFlag());
-            assertFalse(packet.getHasMoreFragment());
-            assertEquals(7905, packet.getFragmentOffset());
-            assertEquals(160, packet.getTimeToLive());
-            assertEquals(0xFE, packet.getIpDatagramProtocol());
-            assertEquals(0x3344, packet.getHeaderChecksum());
-
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/AllTests.java
deleted file mode 100644 (file)
index e3d325b..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.pcap;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Pcap test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        PcapPacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/PcapPacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/PcapPacketTest.java
deleted file mode 100644 (file)
index 9e85ced..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.pcap;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Map;
-import java.util.TimeZone;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * JUnit Class that tests the PcapPacket class and its method.
- *
- * @author Vincent Perot
- */
-public class PcapPacketTest {
-
-    private static final String EXPECTED_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
-    private static final String EXPECTED_GMT_TIME = "2005-07-04 09:33:52.829";
-
-    private static final Map<String, String> EXPECTED_FIELDS;
-    private static final String EXPECTED_TOSTRING;
-    static {
-
-        // Convert known GMT time to default (local) time zone. The local time
-        // is the expected value.
-        String captureTime = "";
-        try {
-            SimpleDateFormat gmtFormat = new SimpleDateFormat(EXPECTED_DATE_FORMAT);
-            gmtFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
-            Date gmtDate = gmtFormat.parse(EXPECTED_GMT_TIME);
-
-            SimpleDateFormat defaultFormat = new SimpleDateFormat(EXPECTED_DATE_FORMAT);
-            captureTime = defaultFormat.format(gmtDate);
-        } catch (ParseException e) {
-            fail("failed to parse date");
-        }
-
-        StringBuilder sb = new StringBuilder();
-        sb.append("Packet Capture 36: 75 bytes on wire, 75 bytes captured.\n");
-        sb.append("Arrival time: " + captureTime + ".277.000\n");
-        sb.append("Ethernet II, Source: 00:e0:ed:01:6e:bd, Destination: 00:30:54:00:34:56, Type: Internet Protocol Version 4 (0x0800)\n");
-        sb.append("Internet Protocol Version 4, Source: 192.168.1.2, Destination: 192.168.1.1\n");
-        sb.append("Version: 4, Identification: 0x69aa, Header Length: 20 bytes, Total Length: 61 bytes\n");
-        sb.append("Differentiated Services Code Point: 0x00; Explicit Congestion Notification: 0x00\n");
-        sb.append("Flags: 0x00 (Don't have more fragments), Fragment Offset: 0\n");
-        sb.append("Time to live: 128\n");
-        sb.append("Protocol: 17\n");
-        sb.append("Header Checksum: 0x4db2\n");
-        sb.append("User Datagram Protocol, Source Port: 2719, Destination Port: 53, Length: 41, Checksum: 19038\n");
-        sb.append("Payload: ed d4 01 00 00 01 00 00 00 00 00 00 03 66 74 70 07 65 63 69 74 65 6c 65 03 63 6f 6d 00 00 01 00 01");
-
-        EXPECTED_TOSTRING = sb.toString();
-        EXPECTED_FIELDS = ImmutableMap.of(
-                "Frame", "36",
-                "Frame Length", "75 bytes",
-                "Capture Length", "75 bytes",
-                "Capture Time", captureTime + ".277.000"
-                );
-    }
-
-    private ByteBuffer fPayload;
-
-    /**
-     * Initialize the payload.
-     */
-    @Before
-    public void initialize() {
-        fPayload = ByteBuffer.allocate(75);
-        fPayload.order(ByteOrder.BIG_ENDIAN);
-
-        // Values copied from wireshark
-
-        // Bytes 0x01-0x10
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x30);
-        fPayload.put((byte) 0x54);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x34);
-        fPayload.put((byte) 0x56);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0xE0);
-        fPayload.put((byte) 0xED);
-        fPayload.put((byte) 0x01);
-        fPayload.put((byte) 0x6E);
-        fPayload.put((byte) 0xBD);
-        fPayload.put((byte) 0x08);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x45);
-        fPayload.put((byte) 0x00);
-
-        // Bytes 0x11-0x20
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x3D);
-        fPayload.put((byte) 0x69);
-        fPayload.put((byte) 0xAA);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x80);
-        fPayload.put((byte) 0x11);
-        fPayload.put((byte) 0x4D);
-        fPayload.put((byte) 0xB2);
-        fPayload.put((byte) 0xC0);
-        fPayload.put((byte) 0xA8);
-        fPayload.put((byte) 0x01);
-        fPayload.put((byte) 0x02);
-        fPayload.put((byte) 0xC0);
-        fPayload.put((byte) 0xA8);
-
-        // Bytes 0x21-0x30
-        fPayload.put((byte) 0x01);
-        fPayload.put((byte) 0x01);
-        fPayload.put((byte) 0x0A);
-        fPayload.put((byte) 0x9F);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x35);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x29);
-        fPayload.put((byte) 0x4A);
-        fPayload.put((byte) 0x5E);
-        fPayload.put((byte) 0xED);
-        fPayload.put((byte) 0xd4);
-        fPayload.put((byte) 0x01);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x01);
-
-        // Bytes 0x31-0x40
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x03);
-        fPayload.put((byte) 0x66);
-        fPayload.put((byte) 0x74);
-        fPayload.put((byte) 0x70);
-        fPayload.put((byte) 0x07);
-        fPayload.put((byte) 0x65);
-        fPayload.put((byte) 0x63);
-        fPayload.put((byte) 0x69);
-        fPayload.put((byte) 0x74);
-        fPayload.put((byte) 0x65);
-
-        // Bytes 0x41-0x4B
-        fPayload.put((byte) 0x6C);
-        fPayload.put((byte) 0x65);
-        fPayload.put((byte) 0x03);
-        fPayload.put((byte) 0x63);
-        fPayload.put((byte) 0x6F);
-        fPayload.put((byte) 0x6D);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x01);
-        fPayload.put((byte) 0x00);
-        fPayload.put((byte) 0x01);
-
-        fPayload.flip();
-    }
-
-    /**
-     * Test that verify the correctness of the PcapPacket's methods.
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void CompletePcapPacketTest() throws IOException, BadPcapFileException, BadPacketException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_UDP;
-        assumeTrue(trace.exists());
-        try (PcapFile file = new PcapFile(trace.getPath());) {
-
-            file.seekPacket(36);
-            PcapPacket packet = file.parseNextPacket();
-            if (packet == null) {
-                fail("CompletePcapPacketTest has failed!");
-                return;
-            }
-            // Protocol Testing
-            assertEquals(PcapProtocol.PCAP, packet.getProtocol());
-            assertTrue(packet.hasProtocol(PcapProtocol.PCAP));
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
-
-            // Abstract methods Testing
-            assertTrue(packet.validate());
-            assertEquals(86567859, packet.hashCode());
-            assertFalse(packet.equals(null));
-            assertFalse(packet.equals(file.parseNextPacket()));
-
-            assertEquals(EXPECTED_FIELDS, packet.getFields());
-            assertEquals(EXPECTED_TOSTRING, packet.toString());
-            assertEquals("Frame 36: 75 bytes on wire, 75 bytes captured", packet.getLocalSummaryString());
-            assertEquals("Source Port: 2719, Destination Port: 53", packet.getGlobalSummaryString());
-
-            assertEquals(new PcapEndpoint(packet, true), packet.getSourceEndpoint());
-            assertEquals(new PcapEndpoint(packet, false), packet.getDestinationEndpoint());
-
-            ByteBuffer payload = packet.getPayload();
-            if (payload == null) {
-                fail("CompletePcapPacketTest has failed!");
-                return;
-            }
-            assertEquals(fPayload, payload.flip());
-
-            // Packet-specific methods Testing
-            assertEquals(36, packet.getIndex());
-            assertEquals(75, packet.getOriginalLength());
-            assertEquals(75, packet.getIncludedLength());
-            assertEquals(1120469632829277L, packet.getTimestamp());
-            assertFalse(packet.isTruncated());
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/AllTests.java
deleted file mode 100644 (file)
index 17b014a..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.tcp;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * TCP test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        TCPPacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/TCPPacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/TCPPacketTest.java
deleted file mode 100644 (file)
index 2483d6e..0000000
+++ /dev/null
@@ -1,213 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.tcp;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.tcp.TCPEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.tcp.TCPPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests the TCPPacket class and its method.
- *
- * @author Vincent Perot
- */
-public class TCPPacketTest {
-
-    private static final Map<String, String> EXPECTED_FIELDS;
-    static {
-        EXPECTED_FIELDS = new LinkedHashMap<>();
-        EXPECTED_FIELDS.put("Source Port", "18057");
-        EXPECTED_FIELDS.put("Destination Port", "39611");
-        EXPECTED_FIELDS.put("Sequence Number", "2575857510");
-        EXPECTED_FIELDS.put("Acknowledgement Number", "1430532898");
-        EXPECTED_FIELDS.put("Length", "24 bytes");
-        EXPECTED_FIELDS.put("ECN-Nonce Flag", "true");
-        EXPECTED_FIELDS.put("Congestion Window Reduced Flag", "false");
-        EXPECTED_FIELDS.put("ECN-Echo Flag", "true");
-        EXPECTED_FIELDS.put("Urgent Flag", "false");
-        EXPECTED_FIELDS.put("ACK Flag", "true");
-        EXPECTED_FIELDS.put("PSH Flag", "false");
-        EXPECTED_FIELDS.put("RST Flag", "true");
-        EXPECTED_FIELDS.put("SYN Flag", "false");
-        EXPECTED_FIELDS.put("FIN Flag", "true");
-        EXPECTED_FIELDS.put("Window Size Value", "4352");
-        EXPECTED_FIELDS.put("Checksum", "0xffee");
-        EXPECTED_FIELDS.put("Urgent Pointer", "0xddcc");
-        EXPECTED_FIELDS.put("Options", "ad da bc cb");
-    }
-
-    private static final String EXPECTED_TOSTRING;
-    static {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Transmission Control Protocol, Source Port: 18057, Destination Port: 39611\n");
-        sb.append("Sequence Number: 2575857510, Acknowledgment Number: 1430532898\n");
-        sb.append("Header length: 24 bytes, Data length: 4\n");
-        sb.append("Window size value: 4352, Urgent Pointer: 0xddcc\n");
-        sb.append("Checksum: 0xffee\n");
-        sb.append("Payload: 99 88 77 66");
-
-        EXPECTED_TOSTRING = sb.toString();
-    }
-
-    private ByteBuffer fPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fPacket = ByteBuffer.allocate(28);
-        fPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // Source Port
-        fPacket.put((byte) 0x46);
-        fPacket.put((byte) 0x89);
-
-        // Destination Port
-        fPacket.put((byte) 0x9A);
-        fPacket.put((byte) 0xBB);
-
-        // Sequence Number
-        fPacket.put((byte) 0x99);
-        fPacket.put((byte) 0x88);
-        fPacket.put((byte) 0x77);
-        fPacket.put((byte) 0x66);
-
-        // Acknowledgment Number
-        fPacket.put((byte) 0x55);
-        fPacket.put((byte) 0x44);
-        fPacket.put((byte) 0x33);
-        fPacket.put((byte) 0x22);
-
-        // Data Offset + Reserved + NS
-        fPacket.put((byte) 0x61);
-
-        // Other flags
-        fPacket.put((byte) 0b01010101);
-
-        // Window Size
-        fPacket.put((byte) 0x11);
-        fPacket.put((byte) 0x00);
-
-        // Checksum
-        fPacket.put((byte) 0xFF);
-        fPacket.put((byte) 0xEE);
-
-        // Urgent Pointer
-        fPacket.put((byte) 0xDD);
-        fPacket.put((byte) 0xCC);
-
-        // Options - 4 bytes
-        fPacket.put((byte) 0xAD);
-        fPacket.put((byte) 0xDA);
-        fPacket.put((byte) 0xBC);
-        fPacket.put((byte) 0xCB);
-
-        // Payload - 4 bytes
-        fPacket.put((byte) 0x99);
-        fPacket.put((byte) 0x88);
-        fPacket.put((byte) 0x77);
-        fPacket.put((byte) 0x66);
-
-        fPacket.flip();
-    }
-
-    /**
-     * Test that verify the correctness of the TCPPacket's methods.
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void CompleteTCPPacketTest() throws BadPacketException, IOException, BadPcapFileException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer byteBuffer = fPacket;
-            if (byteBuffer == null) {
-                fail("CompleteTCPPacketTest has failed!");
-                return;
-            }
-            TCPPacket packet = new TCPPacket(dummy, null, byteBuffer);
-
-            // Protocol Testing
-            assertEquals(PcapProtocol.TCP, packet.getProtocol());
-            assertTrue(packet.hasProtocol(PcapProtocol.TCP));
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.IPV4));
-
-            // Abstract methods Testing
-            assertTrue(packet.validate());
-            assertEquals(-677046102, packet.hashCode());
-            assertFalse(packet.equals(null));
-            assertEquals(new TCPPacket(dummy, null, byteBuffer), packet);
-
-            assertEquals(EXPECTED_FIELDS, packet.getFields());
-            assertEquals(EXPECTED_TOSTRING, packet.toString());
-            assertEquals("Src Port: 18057, Dst Port: 39611, Seq: 2575857510, Ack: 1430532898, Len: 24", packet.getLocalSummaryString());
-            assertEquals("18057 > 39611 [ACK, FIN, RST, NS, ECE] Seq=2575857510 Ack=1430532898 Len=24", packet.getGlobalSummaryString());
-
-            assertEquals(new TCPEndpoint(packet, true), packet.getSourceEndpoint());
-            assertEquals(new TCPEndpoint(packet, false), packet.getDestinationEndpoint());
-
-            fPacket.position(24);
-            byte[] payload = new byte[4];
-            fPacket.get(payload);
-            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
-
-            // Packet-specific methods Testing
-            assertEquals(0x4689, packet.getSourcePort());
-            assertEquals(0x9ABB, packet.getDestinationPort());
-            assertEquals(2575857510L, packet.getSequenceNumber());
-            assertEquals(1430532898L, packet.getAcknowledgmentNumber());
-            assertEquals(6, packet.getDataOffset());
-            assertEquals(0, packet.getReservedField());
-            assertEquals(true, packet.isNSFlagSet());
-            assertEquals(false, packet.isCongestionWindowReducedFlagSet());
-            assertEquals(true, packet.isECNEchoFlagSet());
-            assertEquals(false, packet.isUrgentFlagSet());
-            assertEquals(true, packet.isAcknowledgeFlagSet());
-            assertEquals(false, packet.isPushFlagSet());
-            assertEquals(true, packet.isResetFlagSet());
-            assertEquals(false, packet.isSynchronizationFlagSet());
-            assertEquals(true, packet.isFinalFlagSet());
-            assertEquals(4352, packet.getWindowSize());
-            assertEquals(65518, packet.getChecksum());
-            assertEquals(56780, packet.getUrgentPointer());
-            assertTrue(Arrays.equals(packet.getOptions(), Arrays.copyOfRange(fPacket.array(), 20, 24)));
-
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/AllTests.java
deleted file mode 100644 (file)
index e896476..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.udp;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * UDP test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        UDPPacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/UDPPacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/UDPPacketTest.java
deleted file mode 100644 (file)
index d156e28..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.udp;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Map;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.udp.UDPEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.udp.UDPPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * JUnit Class that tests the UDPPacket class and its method.
- *
- * @author Vincent Perot
- */
-public class UDPPacketTest {
-
-    private static final Map<String, String> EXPECTED_FIELDS = ImmutableMap.of(
-            "Source Port", "18057",
-            "Destination Port", "39611",
-            "Length", "41452 bytes",
-            "Checksum", "0xfaaf"
-            );
-
-    private static final String EXPTECTED_TOSTRING;
-    static {
-        StringBuilder sb = new StringBuilder();
-        sb.append("User Datagram Protocol, Source Port: 18057, Destination Port: 39611, Length: 41452, Checksum: 64175\n");
-        sb.append("Payload: 99 88 77 66");
-
-        EXPTECTED_TOSTRING = sb.toString();
-    }
-
-    private ByteBuffer fPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fPacket = ByteBuffer.allocate(12);
-        fPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // Source Port
-        fPacket.put((byte) 0x46);
-        fPacket.put((byte) 0x89);
-
-        // Destination Port
-        fPacket.put((byte) 0x9A);
-        fPacket.put((byte) 0xBB);
-
-        // Total length - this is randomly chosen so that we verify that the
-        // packet handles wrong total length.
-        fPacket.put((byte) 0xA1);
-        fPacket.put((byte) 0xEC);
-
-        // Checksum
-        fPacket.put((byte) 0xFA);
-        fPacket.put((byte) 0xAF);
-
-        // Payload - 4 bytes
-        fPacket.put((byte) 0x99);
-        fPacket.put((byte) 0x88);
-        fPacket.put((byte) 0x77);
-        fPacket.put((byte) 0x66);
-
-        fPacket.flip();
-    }
-
-    /**
-     * Test that verify the correctness of the UDPPacket's methods.
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     * @throws BadPacketException
-     *             Thrown when a packet is erroneous. Fails the test.
-     */
-    @Test
-    public void CompleteUDPPacketTest() throws IOException, BadPcapFileException, BadPacketException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer byteBuffer = fPacket;
-            if (byteBuffer == null) {
-                fail("CompleteUDPPacketTest has failed!");
-                return;
-            }
-            UDPPacket packet = new UDPPacket(dummy, null, byteBuffer);
-
-            // Protocol Testing
-            assertEquals(PcapProtocol.UDP, packet.getProtocol());
-            assertTrue(packet.hasProtocol(PcapProtocol.UDP));
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.ETHERNET_II));
-
-            // Abstract methods Testing
-            assertTrue(packet.validate());
-            assertEquals(473000225, packet.hashCode());
-            assertFalse(packet.equals(null));
-            assertEquals(new UDPPacket(dummy, null, byteBuffer), packet);
-
-            assertEquals(EXPECTED_FIELDS, packet.getFields());
-            assertEquals(EXPTECTED_TOSTRING, packet.toString());
-            assertEquals("Src Port: 18057, Dst Port: 39611", packet.getLocalSummaryString());
-            assertEquals("Source Port: 18057, Destination Port: 39611", packet.getGlobalSummaryString());
-
-            assertEquals(new UDPEndpoint(packet, true), packet.getSourceEndpoint());
-            assertEquals(new UDPEndpoint(packet, false), packet.getDestinationEndpoint());
-
-            fPacket.position(8);
-            byte[] payload = new byte[4];
-            fPacket.get(payload);
-            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
-
-            // Packet-specific methods Testing
-            assertEquals(0x4689, packet.getSourcePort());
-            assertEquals(0x9ABB, packet.getDestinationPort());
-            assertEquals(0xA1EC, packet.getTotalLength());
-            assertEquals(0xFAAF, packet.getChecksum());
-
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/AllTests.java
deleted file mode 100644 (file)
index 99136d5..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.unknown;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Unknown test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        UnknownPacketTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/UnknownPacketTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/UnknownPacketTest.java
deleted file mode 100644 (file)
index f1849a8..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.protocol.unknown;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Map;
-
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Before;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * JUnit Class that tests the UnknownPacket class and its method.
- *
- * @author Vincent Perot
- */
-public class UnknownPacketTest {
-
-    private static final Map<String, String> EXPECTED_FIELDS = ImmutableMap.of(
-            "Binary", "61",
-            "Character", "a"
-            );
-
-    private static final String fToString = "Payload: 61";
-
-    private ByteBuffer fPacket;
-
-    /**
-     * Initialize the packet.
-     */
-    @Before
-    public void initialize() {
-        fPacket = ByteBuffer.allocate(1);
-        fPacket.order(ByteOrder.BIG_ENDIAN);
-
-        // Payload - 1 byte
-        fPacket.put((byte) 97);
-
-        fPacket.flip();
-    }
-
-    /**
-     * Test that verify the correctness of the UnknownPacket's methods.
-     * @throws BadPcapFileException
-     *             Thrown when the file is erroneous. Fails the test.
-     * @throws IOException
-     *             Thrown when an IO error occurs. Fails the test.
-     */
-    @Test
-    public void CompleteUnknownPacketTest() throws IOException, BadPcapFileException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            ByteBuffer byteBuffer = fPacket;
-            if (byteBuffer == null) {
-                fail("CompleteUnknownPacketTest has failed!");
-                return;
-            }
-            UnknownPacket packet = new UnknownPacket(dummy, null, byteBuffer);
-
-            // Protocol Testing
-            assertEquals(PcapProtocol.UNKNOWN, packet.getProtocol());
-            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
-            assertFalse(packet.hasProtocol(PcapProtocol.UDP));
-
-            // Abstract methods Testing
-            assertTrue(packet.validate());
-            assertEquals(1089, packet.hashCode());
-            assertFalse(packet.equals(null));
-            assertEquals(new UnknownPacket(dummy, null, byteBuffer), packet);
-
-            assertEquals(EXPECTED_FIELDS, packet.getFields());
-            assertEquals(fToString, packet.toString());
-            assertEquals("Len: 1 bytes", packet.getLocalSummaryString());
-            assertEquals("Data: 1 bytes", packet.getGlobalSummaryString());
-            // TODO take care of plural form.
-
-            // Unknown Endpoints are never equal!
-            assertFalse(packet.getSourceEndpoint().equals(new UnknownEndpoint(packet, true)));
-            assertFalse(packet.getDestinationEndpoint().equals(new UnknownEndpoint(packet, false)));
-
-            fPacket.position(0);
-            byte[] payload = new byte[1];
-            fPacket.get(payload);
-            ByteBuffer payloadBB = ByteBuffer.wrap(payload);
-            payloadBB.flip();
-
-            assertEquals(payloadBB, packet.getPayload());
-
-            // Packet-specific methods Testing
-            // None
-
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/AllTests.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/AllTests.java
deleted file mode 100644 (file)
index 9c2edb8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.stream;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Stream test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        StreamBuildTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/StreamBuildTest.java b/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/StreamBuildTest.java
deleted file mode 100644 (file)
index 5ef0fc9..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.pcap.core.tests.stream;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStream;
-import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStreamBuilder;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.junit.Test;
-
-/**
- * JUnit Class that tests whether packet streams are built correctly.
- *
- * @author Vincent Perot
- */
-public class StreamBuildTest {
-
-    private static final double DELTA = 0.001;
-
-    /**
-     * Test that verify that stream building is done correctly.
-     */
-    @Test
-    public void StreamBuildingTest() {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-
-        try {
-            // Test Ethernet II stream
-            PacketStreamBuilder builder = new PacketStreamBuilder(PcapProtocol.ETHERNET_II);
-            builder.parsePcapFile(trace.getPath());
-            assertEquals(PcapProtocol.ETHERNET_II, builder.getProtocol());
-            // Should do one loop only, so hardcoded values are okay.
-            for (PacketStream stream : builder.getStreams()) {
-                assertEquals("Stream eth.0, Number of Packets: 43\n", stream.toString());
-                assertEquals(43, stream.getNbPackets());
-                assertEquals(25091, stream.getNbBytes());
-                assertEquals(20, stream.getNbPacketsAtoB());
-                assertEquals(2323, stream.getNbBytesAtoB());
-                assertEquals(23, stream.getNbPacketsBtoA());
-                assertEquals(22768, stream.getNbBytesBtoA());
-                assertEquals(1084443427311224000L, stream.getStartTime());
-                assertEquals(1084443457704928000L, stream.getStopTime());
-                assertEquals(30.393704, stream.getDuration(), DELTA);
-                assertEquals(76.43030280218561, stream.getBPSAtoB(), DELTA);
-                assertEquals(749.1025114938278, stream.getBPSBtoA(), DELTA);
-            }
-
-            // Test TCP streams and other constructor
-            builder = new PacketStreamBuilder(PcapProtocol.TCP);
-            builder.parsePcapFile(trace.getPath());
-            assertEquals(PcapProtocol.TCP, builder.getProtocol());
-
-            PacketStream stream = builder.getStream(0);
-            if (stream == null) {
-                fail("StreamBuildingTest has failed!");
-                return;
-            }
-            assertEquals(PcapProtocol.TCP, stream.getProtocol());
-            assertEquals(0, stream.getID());
-            assertEquals("tcp.0", stream.getUniqueID());
-            assertEquals(34, stream.getNbPackets());
-            assertEquals(20695, stream.getNbBytes());
-            assertEquals(16, stream.getNbPacketsAtoB());
-            assertEquals(1351, stream.getNbBytesAtoB());
-            assertEquals(18, stream.getNbPacketsBtoA());
-            assertEquals(19344, stream.getNbBytesBtoA());
-            assertEquals(1084443427311224000L, stream.getStartTime());
-            assertEquals(1084443457704928000L, stream.getStopTime());
-            assertEquals(30.393704, stream.getDuration(), DELTA);
-            assertEquals(44.449995301658525, stream.getBPSAtoB(), DELTA);
-            assertEquals(636.4476011216008, stream.getBPSBtoA(), DELTA);
-
-            stream = builder.getStream(1);
-            if (stream == null) {
-                fail("StreamBuildingTest has failed!");
-                return;
-            }
-            assertEquals(PcapProtocol.TCP, stream.getProtocol());
-            assertEquals(1, stream.getID());
-            assertEquals("tcp.1", stream.getUniqueID());
-            assertEquals(7, stream.getNbPackets());
-            assertEquals(4119, stream.getNbBytes());
-            assertEquals(3, stream.getNbPacketsAtoB());
-            assertEquals(883, stream.getNbBytesAtoB());
-            assertEquals(4, stream.getNbPacketsBtoA());
-            assertEquals(3236, stream.getNbBytesBtoA());
-            assertEquals(1084443430295515000L, stream.getStartTime());
-            assertEquals(1084443432088092000L, stream.getStopTime());
-            assertEquals(1.792577, stream.getDuration(), DELTA);
-            assertEquals(492.58692932019096, stream.getBPSAtoB(), DELTA);
-            assertEquals(1805.2223140205413, stream.getBPSBtoA(), DELTA);
-
-            builder.clear();
-            assertEquals(0, builder.getNbStreams());
-        } catch (IOException | BadPcapFileException e) {
-            fail("StreamBuildingTest has failed!");
-        }
-
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/.classpath b/org.eclipse.tracecompass.pcap.core/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.pcap.core/.project b/org.eclipse.tracecompass.pcap.core/.project
deleted file mode 100644 (file)
index 1574fd6..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.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.tracecompass.pcap.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index a2b5e6b..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-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=error
-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.tracecompass.pcap.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-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.tracecompass.pcap.core/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index d92b94f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.pcap.core/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.pcap.core/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 43e6a6c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.pcap.core;singleton:=true
-Bundle-Activator: org.eclipse.tracecompass.internal.pcap.core.Activator
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.tracecompass.common.core
-Export-Package: org.eclipse.tracecompass.internal.pcap.core;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
- org.eclipse.tracecompass.internal.pcap.core.endpoint;x-friends:="org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.filter;x-internal:=true,
- org.eclipse.tracecompass.internal.pcap.core.packet;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.protocol;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
- org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.protocol.pcap;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
- org.eclipse.tracecompass.internal.pcap.core.protocol.udp;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
- org.eclipse.tracecompass.internal.pcap.core.protocol.unknown;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
- org.eclipse.tracecompass.internal.pcap.core.stream;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.trace;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
- org.eclipse.tracecompass.internal.pcap.core.util;x-friends:="org.eclipse.tracecompass.tmf.pcap.core"
-Import-Package: com.google.common.collect,
- com.google.common.math
diff --git a/org.eclipse.tracecompass.pcap.core/about.html b/org.eclipse.tracecompass.pcap.core/about.html
deleted file mode 100644 (file)
index 28737f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/build.properties b/org.eclipse.tracecompass.pcap.core/build.properties
deleted file mode 100644 (file)
index 857bf1e..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               plugin.properties,\
-               about.html,\
-               .
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.pcap.core/plugin.properties b/org.eclipse.tracecompass.pcap.core/plugin.properties
deleted file mode 100644 (file)
index 49400fc..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Trace Compass Pcap Parser Core Plug-in
-
diff --git a/org.eclipse.tracecompass.pcap.core/pom.xml b/org.eclipse.tracecompass.pcap.core/pom.xml
deleted file mode 100644 (file)
index d6691ea..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.pcap.core</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-plugin</packaging>
-
-  <name>Trace Compass Pcap Parser Core Plug-in</name>
-
- <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-source-plugin</artifactId>
-      </plugin>
-    </plugins>
-  </build>
-
- <groupId>org.eclipse.tracecompass</groupId>
-</project>
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/Activator.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/Activator.java
deleted file mode 100644 (file)
index 052d191..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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.tracecompass.internal.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 final class Activator extends Plugin {
-
-    // ------------------------------------------------------------------------
-    // Attributes
-    // ------------------------------------------------------------------------
-
-    /**
-     * The plug-in ID
-     */
-    public static final String PLUGIN_ID = "org.eclipse.tracecompass.pcap.core"; //$NON-NLS-1$
-
-    /**
-     * The shared instance
-     */
-    private static @Nullable Activator plugin;
-
-    // ------------------------------------------------------------------------
-    // Constructors
-    // ------------------------------------------------------------------------
-
-    /**
-     * The constructor
-     */
-    public Activator() {
-    }
-
-    // ------------------------------------------------------------------------
-    // Accessors
-    // ------------------------------------------------------------------------
-
-    /**
-     * Returns the shared instance
-     *
-     * @return the shared instance
-     */
-    public static @Nullable Activator getDefault() {
-        return plugin;
-    }
-
-    // ------------------------------------------------------------------------
-    // Operators
-    // ------------------------------------------------------------------------
-
-    @Override
-    public void start(@Nullable BundleContext context) throws Exception {
-        super.start(context);
-        plugin = this;
-    }
-
-    @Override
-    public void stop(@Nullable BundleContext context) throws Exception {
-        plugin = null;
-        super.stop(context);
-    }
-
-    /**
-     * Logs a message with severity INFO in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logInfo(String message) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logInfo(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logWarning(String message) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logWarning(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     */
-    public void logError(String message) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
-    }
-
-    /**
-     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
-     *
-     * @param message A message to log
-     * @param exception A exception to log
-     */
-    public void logError(String message, Throwable exception) {
-        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpoint.java
deleted file mode 100644 (file)
index d05218f..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.endpoint;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-
-/**
- * Abstract class that represents an endpoint. An endpoint is an address where a
- * packet is received or sent. Therefore, it is protocol dependent. For
- * instance, an Ethernet II endpoint is the MAC address. An Ipv4 endpoint is the
- * combination of the MAC address and the IP address. This is useful for
- * building packet streams.
- *
- * @author Vincent Perot
- */
-public abstract class ProtocolEndpoint {
-
-    /**
-     * Empty string for child classes.
-     */
-    protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
-    /**
-     * The encapsulating endpoint. Much like packets, endpoints are
-     * encapsulated. The higher the layer of the packet protocol is, the more
-     * parents an endpoint will have.
-     */
-    private final @Nullable ProtocolEndpoint fParentEndpoint;
-
-    /**
-     * Constructor of the {@link ProtocolEndpoint} class. It takes a packet to
-     * get its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public ProtocolEndpoint(Packet packet, boolean isSourceEndpoint) {
-        Packet parentPacket = packet.getParentPacket();
-        if (parentPacket == null) {
-            fParentEndpoint = null;
-        } else {
-            fParentEndpoint = isSourceEndpoint ?
-                    parentPacket.getSourceEndpoint() :
-                    parentPacket.getDestinationEndpoint();
-        }
-    }
-
-    /**
-     * Getter method that returns the parent endpoint.
-     *
-     * @return The parent endpoint.
-     */
-    public @Nullable ProtocolEndpoint getParentEndpoint() {
-        return fParentEndpoint;
-    }
-
-    @Override
-    public abstract int hashCode();
-
-    @Override
-    public abstract boolean equals(@Nullable Object obj);
-
-    @Override
-    public abstract String toString();
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpointPair.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpointPair.java
deleted file mode 100644 (file)
index 3dcb76b..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.endpoint;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-
-/**
- * Class that represents a pair of endpoints. This is used to find a packet
- * stream between to endpoints.
- *
- * @author Vincent Perot
- */
-public class ProtocolEndpointPair {
-
-    private final ProtocolEndpoint fEndpointA;
-    private final ProtocolEndpoint fEndpointB;
-
-    /**
-     * Constructor of the class {@link ProtocolEndpointPair}. It constructs a
-     * {@link ProtocolEndpointPair} object from a packet.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     */
-    public ProtocolEndpointPair(Packet packet) {
-        fEndpointA = packet.getSourceEndpoint();
-        fEndpointB = packet.getDestinationEndpoint();
-    }
-
-    /**
-     * Getter method that returns the first endpoint of the pair.
-     *
-     * @return The first endpoint.
-     */
-    public ProtocolEndpoint getFirstEndpoint() {
-        return fEndpointA;
-    }
-
-    /**
-     * Getter method that returns the second endpoint of the pair.
-     *
-     * @return The second endpoint.
-     */
-    public ProtocolEndpoint getSecondEndpoint() {
-        return fEndpointB;
-    }
-
-    /**
-     * Constructor of the class {@link ProtocolEndpointPair}. It constructs a
-     * {@link ProtocolEndpointPair} object from two endpoints.
-     *
-     * @param endpointA
-     *            The first endpoint.
-     * @param endpointB
-     *            The second endpoint.
-     */
-    public ProtocolEndpointPair(ProtocolEndpoint endpointA, ProtocolEndpoint endpointB) {
-        fEndpointA = endpointA;
-        fEndpointB = endpointB;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + fEndpointA.hashCode() * fEndpointB.hashCode();
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof ProtocolEndpointPair)) {
-            return false;
-        }
-        ProtocolEndpointPair other = (ProtocolEndpointPair) obj;
-
-        return (this.fEndpointA.equals(other.fEndpointA) && this.fEndpointB.equals(other.fEndpointB)) ||
-                (this.fEndpointA.equals(other.fEndpointB) && this.fEndpointB.equals(other.fEndpointA));
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/package-info.java
deleted file mode 100644 (file)
index d352000..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.endpoint;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/IPacketFilter.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/IPacketFilter.java
deleted file mode 100644 (file)
index 0fe206d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.filter;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-
-/**
- * Interface used to filter the packets.
- *
- * @author Vincent Perot
- */
-public interface IPacketFilter {
-
-    /**
-     * Accept a packet or not.
-     *
-     * @param packet
-     *            the packet to accept or not
-     *
-     * @return The decision regarding the packet.
-     */
-    boolean accepts(Packet packet);
-}
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/PacketFilterByProtocol.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/PacketFilterByProtocol.java
deleted file mode 100644 (file)
index 967ed65..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.filter;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-
-/**
- * Class used to filter the packets by protocol. This is used, for instance, to
- * build the packet streams.
- *
- * @author Vincent Perot
- */
-public class PacketFilterByProtocol implements IPacketFilter {
-
-    private final PcapProtocol fProtocol;
-
-    /**
-     * Constructor of the PacketFilterByProtocol class.
-     *
-     * @param protocol
-     *            The protocol that the incoming packets must contain.
-     */
-    public PacketFilterByProtocol(PcapProtocol protocol) {
-        fProtocol = protocol;
-    }
-
-    @Override
-    public boolean accepts(Packet packet) {
-        return packet.hasProtocol(fProtocol);
-    }
-
-    /**
-     * Getter method for the protocol of this filter.
-     *
-     * @return The protocol of this filter.
-     */
-    public PcapProtocol getProtocol() {
-        return fProtocol;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/package-info.java
deleted file mode 100644 (file)
index 9c1005e..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.filter;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/package-info.java
deleted file mode 100644 (file)
index c3246d8..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/BadPacketException.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/BadPacketException.java
deleted file mode 100644 (file)
index 0d40946..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.packet;
-
-/**
- * Exception that is thrown when Packet is erroneous. This is different than an
- * invalid packet. An invalid packet contains bad fields (such as bad checksum)
- * and does not throw exceptions while an erroneous packet is a packet that is
- * impossible to obtain. For instance, an erroneous packet can be smaller than
- * the minimum required size. Erroneous packets throw BadPacketExceptions.
- *
- * @author Vincent Perot
- */
-public class BadPacketException extends Exception {
-
-    private static final long serialVersionUID = 7071588720009577619L;
-
-    /**
-     * Default constructor with no message.
-     */
-    public BadPacketException() {
-        super();
-    }
-
-    /**
-     * Constructor with an attached message.
-     *
-     * @param message
-     *            The message attached to this exception
-     */
-    public BadPacketException(String message) {
-        super(message);
-    }
-
-    /**
-     * Re-throw an exception into this type.
-     *
-     * @param e
-     *            The previous Exception we caught
-     */
-    public BadPacketException(Exception e) {
-        super(e);
-    }
-
-    /**
-     * Constructor with an attached message and re-throw an exception into this
-     * type.
-     *
-     * @param message
-     *            The message attached to this exception
-     * @param exception
-     *            The previous Exception caught
-     */
-    public BadPacketException(String message, Throwable exception) {
-        super(message, exception);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/Packet.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/Packet.java
deleted file mode 100644 (file)
index fc7b712..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.packet;
-
-import java.nio.ByteBuffer;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-
-// TODO For all packets, make checks on dimension.
-// TODO maybe add a invalid packet type?
-
-/**
- * Abstract class that implements the methods that are common to every packets.
- *
- * @author Vincent Perot
- */
-public abstract class Packet {
-
-    /** Empty string */
-    protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
-    /** The Pcap File to which this packet belong */
-    private final PcapFile fPcapFile;
-
-    /** The parent packet of this packet */
-    private final @Nullable Packet fParentPacket;
-
-    /** The protocol that this packet uses */
-    private final PcapProtocol fProtocol;
-
-    /**
-     * Constructor of the Packet Class.
-     *
-     * @param file
-     *            The file to which this packet belongs.
-     * @param parent
-     *            The parent packet of this packet.
-     * @param protocol
-     *            The protocol of the packet.
-     */
-    public Packet(PcapFile file, @Nullable Packet parent, PcapProtocol protocol) {
-        fPcapFile = file;
-        fParentPacket = parent;
-        fProtocol = protocol;
-    }
-
-    /**
-     * Getter method for the Pcap File that contains this packet.
-     *
-     * @return The Pcap File.
-     */
-    public PcapFile getPcapFile() {
-        return fPcapFile;
-    }
-
-    /**
-     * Method that returns the parent (encapsulating) packet of this packet.
-     * This method returns null if the packet is a Pcap Packet (highest level of
-     * encapsulation).
-     *
-     * @return The parent packet.
-     */
-    public @Nullable Packet getParentPacket() {
-        return fParentPacket;
-    }
-
-    /**
-     * Method that returns the child (encapsulated) packet of this packet. This
-     * method returns null if the packet is at the lowest level of
-     * encapsulation.
-     *
-     * @return The child packet.
-     */
-    public abstract @Nullable Packet getChildPacket();
-
-    /**
-     * Getter method for the protocol of the packet.
-     *
-     * @return The protocol of the packet.
-     */
-    public PcapProtocol getProtocol() {
-        return fProtocol;
-    }
-
-    /**
-     * Getter method for the payload of the packet. Returns null if there is no
-     * payload.
-     *
-     * @return the payload of the packet.
-     */
-    public abstract @Nullable ByteBuffer getPayload();
-
-    /**
-     * Method that looks for the packet that respects the specified protocol. It
-     * will go through all the layers of encapsulation and return the wanted
-     * packet, or null if the protocol is not present.
-     *
-     * @param protocol
-     *            The specified protocol.
-     * @return The packet that respects the protocol.
-     */
-    public final @Nullable Packet getPacket(PcapProtocol protocol) {
-
-        Packet wantedPacket = this;
-
-        while (wantedPacket != null) {
-            if (wantedPacket.getProtocol() == protocol) {
-                return wantedPacket;
-            }
-            wantedPacket = wantedPacket.getParentPacket();
-        }
-        wantedPacket = this.getChildPacket();
-
-        while (wantedPacket != null) {
-            if (wantedPacket.getProtocol() == protocol) {
-                return wantedPacket;
-            }
-            wantedPacket = wantedPacket.getChildPacket();
-        }
-
-        return null;
-    }
-
-    /**
-     * Method that looks if the protocol is contained in the packet, or in one
-     * of the encapsulating/encapsulated packet. It will go through all the
-     * layers of encapsulation and return true if it finds the specified
-     * protocol, and false otherwise. *
-     *
-     * @param protocol
-     *            The specified protocol.
-     * @return The presence of the protocol.
-     */
-    public final boolean hasProtocol(PcapProtocol protocol) {
-
-        // TODO Verify inputs
-        Packet wantedPacket = this;
-
-        while (wantedPacket != null) {
-            if (wantedPacket.getProtocol() == protocol) {
-                return true;
-            }
-            wantedPacket = wantedPacket.getParentPacket();
-        }
-        wantedPacket = this.getChildPacket();
-
-        while (wantedPacket != null) {
-            if (wantedPacket.getProtocol() == protocol) {
-                return true;
-            }
-            wantedPacket = wantedPacket.getChildPacket();
-        }
-
-        return false;
-    }
-
-    /**
-     * Method that returns the most encapsulated packet possible. If the global
-     * packet contains the protocol Unknown, it will stop at the packet just
-     * before this protocol. This is because the {@link UnknownPacket} can be
-     * considered as plain payload.
-     *
-     * @return The most encapsulated packet.
-     */
-    public Packet getMostEcapsulatedPacket() {
-        @NonNull Packet packet = this;
-        while (packet.getProtocol() != PcapProtocol.UNKNOWN) {
-            Packet childPacket = packet.getChildPacket();
-            if (childPacket == null || childPacket.getProtocol() == PcapProtocol.UNKNOWN) {
-                break;
-            }
-            packet = childPacket;
-        }
-        return packet;
-    }
-
-    /**
-     * Method that look at the validity of the different fields (such as
-     * checksum). This is protocol dependent and is used to identify bad
-     * packets.
-     *
-     * @return The validity of the packet.
-     */
-    public abstract boolean validate();
-
-    /**
-     * Internal method that is used to find the child packet. This is protocol
-     * dependent and must be implemented by each packet class.
-     *
-     * @return The child packet.
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    protected abstract @Nullable Packet findChildPacket() throws BadPacketException;
-
-    /**
-     * This method returns the source endpoint of this packet. The endpoint is
-     * equivalent to the address of this packet, and is protocol dependent. For
-     * instance, a UDP endpoint is the combination of the MAC address, the IP
-     * address and the port number.
-     *
-     * @return The source endpoint of this packet.
-     */
-    public abstract ProtocolEndpoint getSourceEndpoint();
-
-    /**
-     * This method returns the destination endpoint of this packet. The endpoint
-     * is equivalent to the address of this packet, and is protocol dependent.
-     * For instance, a UDP endpoint is the combination of the MAC address, the
-     * IP address and the port number.
-     *
-     * @return The destination endpoint of this packet.
-     */
-    public abstract ProtocolEndpoint getDestinationEndpoint();
-
-    /**
-     * Method that returns all the fields of the packet as a Map<Field ID, Field
-     * Value>. All child classes of {@link Packet} must implement this method.
-     *
-     * @return All the packet fields as a map.
-     */
-    public abstract Map<String, String> getFields();
-
-    /**
-     * Method that returns a short summary of the local packet, such as the most
-     * useful information.
-     *
-     * For instance, a possible summary string of an {@link IPv4Packet} can be:
-     * "Src: 192.168.0.1, Dst: 192.168.1.12".
-     *
-     * @return A short summary of the local packet, as a string.
-     */
-    public abstract String getLocalSummaryString();
-
-    /**
-     * Method that returns the local meaning of a packet, based on its fields.
-     *
-     * For instance, a possible signification of an ARP packet can be:
-     * "Who has 192.168.1.12? Tell 192.168.0.1".
-     *
-     * @return The local meaning of the packet, as a string.
-     */
-    protected abstract String getSignificationString();
-
-    /**
-     * Method that returns the global meaning of the packet. As such, it will
-     * look for the most relevant packet and display its signification.
-     *
-     * For instance, a possible signification of an ARP packet can be:
-     * "Who has 192.168.1.12? Tell 192.168.0.1".
-     *
-     * @return The meaning of the global packet, as a string.
-     */
-    public final String getGlobalSummaryString() {
-        Packet packet = this.getMostEcapsulatedPacket();
-        return packet.getSignificationString();
-    }
-
-    @Override
-    public abstract boolean equals(@Nullable Object obj);
-
-    @Override
-    public abstract int hashCode();
-
-    /**
-     * Method that is used by child packet classes to verify if a bit is set.
-     *
-     * @param value
-     *            the byte containing the flags.
-     * @param bit
-     *            the bit index.
-     * @return Whether the bit is set or not.
-     */
-    protected static final boolean isBitSet(byte value, int bit) {
-        if (bit < 0 || bit > 7) {
-            throw new IllegalArgumentException("The byte index is not valid!"); //$NON-NLS-1$
-        }
-        return ((value >>> bit & 0b1) == 0b1);
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/package-info.java
deleted file mode 100644 (file)
index 74fc4a4..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.packet;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/PcapProtocol.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/PcapProtocol.java
deleted file mode 100644 (file)
index 63f534a..0000000
+++ /dev/null
@@ -1,179 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * Enumeration used for describing the different known protocols.
- *
- * @author Vincent Perot
- */
-public enum PcapProtocol {
-
-    // Layer 0
-    /**
-     * The Pcap Protocol is not a real protocol but is used as an helper to
-     * generate Pcap packets.
-     */
-    PCAP("Packet Capture", "pcap", Layer.LAYER_0, false), //$NON-NLS-1$ //$NON-NLS-2$
-
-    // Layer 1
-    // Should always be empty.
-
-    // Layer 2
-    /**
-     * The description of the Ethernet II Protocol.
-     */
-    ETHERNET_II("Ethernet II", "eth", Layer.LAYER_2, true), //$NON-NLS-1$ //$NON-NLS-2$
-
-    // Layer 3
-    /**
-     * The description of the Internet Protocol Version 4.
-     */
-    IPV4("Internet Protocol Version 4", "ipv4", Layer.LAYER_3, true), //$NON-NLS-1$ //$NON-NLS-2$
-
-    // Layer 4
-    /**
-     * The description of the Transmission Control Protocol.
-     */
-    TCP("Transmission Control Protocol", "tcp", Layer.LAYER_4, true), //$NON-NLS-1$ //$NON-NLS-2$
-    /**
-     * The description of the User Datagram Protocol.
-     */
-    UDP("User Datagram Protocol", "udp", Layer.LAYER_4, true), //$NON-NLS-1$ //$NON-NLS-2$
-
-    // 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("Payload", "???", Layer.LAYER_7, false); //$NON-NLS-1$ //$NON-NLS-2$
-
-
-    /**
-     * Enum that lists constants related to protocols/layers.
-     *
-     * See http://en.wikipedia.org/wiki/OSI_model#Description_of_OSI_layers.
-     *
-     * @author Vincent Perot
-     */
-    public static enum Layer {
-
-        /**
-         * Layer 0. This layer is not an OSI layer but is used as an helper to store
-         * the pseudo-protocol PCAP.
-         */
-        LAYER_0,
-
-        /** Layer 1 of the OSI model */
-        LAYER_1,
-
-        /** Layer 2 of the OSI model */
-        LAYER_2,
-
-        /** Layer 3 of the OSI model */
-        LAYER_3,
-
-        /** Layer 4 of the OSI model */
-        LAYER_4,
-
-        /** Layer 5 of the OSI model */
-        LAYER_5,
-
-        /** Layer 6 of the OSI model */
-        LAYER_6,
-
-        /** Layer 7 of the OSI model */
-        LAYER_7;
-    }
-
-
-    // Fields
-    private final String fName;
-    private final String fShortName;
-    private final Layer fLayer;
-    private final boolean fSupportsStream;
-
-    private PcapProtocol(String name, String shortName, Layer layer, boolean supportsStream) {
-        fName = name;
-        fShortName = shortName;
-        fLayer = layer;
-        fSupportsStream = 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 Layer 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;
-    }
-
-    // TODO make an immutable list that holds this data instead of computing it
-    // everytime.
-
-    /**
-     * Method that returns a list of all the protocols included in a certain OSI
-     * layer.
-     *
-     * @param layer
-     *            The layer of the protocols.
-     * @return The protocols on that layer.
-     */
-    public static Collection<PcapProtocol> getProtocolsOnLayer(Layer layer) {
-        List<PcapProtocol> protocolsOnLayer = new ArrayList<>();
-        for (PcapProtocol p : PcapProtocol.values()) {
-            if (p.getLayer() == layer) {
-                protocolsOnLayer.add(p);
-            }
-        }
-        return protocolsOnLayer;
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIEndpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIEndpoint.java
deleted file mode 100644 (file)
index 347daf1..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2;
-
-import java.util.Arrays;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-
-/**
- * Class that extends the {@link ProtocolEndpoint} class. It represents the
- * endpoint at an Ethernet II level.
- *
- * @author Vincent Perot
- */
-public class EthernetIIEndpoint extends ProtocolEndpoint {
-
-    private final byte[] fMacAddress;
-
-    /**
-     * Constructor of the {@link EthernetIIEndpoint} class. It takes a packet to
-     * get its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public EthernetIIEndpoint(EthernetIIPacket packet, boolean isSourceEndpoint) {
-        super(packet, isSourceEndpoint);
-        fMacAddress = isSourceEndpoint ? packet.getSourceMacAddress() : packet.getDestinationMacAddress();
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            result = 0;
-        } else {
-            result = endpoint.hashCode();
-        }
-        result = prime * result + Arrays.hashCode(fMacAddress);
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof EthernetIIEndpoint)) {
-            return false;
-        }
-
-        EthernetIIEndpoint other = (EthernetIIEndpoint) obj;
-
-        // Check on layer
-        boolean localEquals = Arrays.equals(fMacAddress, other.fMacAddress);
-        if (!localEquals) {
-            return false;
-        }
-
-        // Check above layers.
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint != null) {
-            return endpoint.equals(other.getParentEndpoint());
-        }
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            return ConversionHelper.toMacAddress(fMacAddress);
-        }
-        return (endpoint.toString().equals(EMPTY_STRING) ?
-                ConversionHelper.toMacAddress(fMacAddress) :
-                endpoint.toString() + '/' + ConversionHelper.toMacAddress(fMacAddress));
-
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIPacket.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIPacket.java
deleted file mode 100644 (file)
index 24e35d1..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-import org.eclipse.tracecompass.internal.pcap.core.util.EthertypeHelper;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Class that represents an Ethernet II packet. This should be called an
- * Ethernet frame, but in order to keep the nomenclature consistent, this is
- * called a packet.
- *
- * @author Vincent Perot
- */
-public class EthernetIIPacket extends Packet {
-
-    private final @Nullable Packet fChildPacket;
-    private final @Nullable ByteBuffer fPayload;
-
-    /* We store MAC addresses as byte arrays since
-     * there is no standard java class to store them. */
-    private final byte[] fSourceMacAddress;
-    private final byte[] fDestinationMacAddress;
-
-    private final int fType;
-
-    private @Nullable EthernetIIEndpoint fSourceEndpoint;
-    private @Nullable EthernetIIEndpoint fDestinationEndpoint;
-
-    private @Nullable Map<String, String> fFields;
-
-    /**
-     * Constructor of the Ethernet Packet class.
-     *
-     * @param file
-     *            The file that contains this packet.
-     * @param parent
-     *            The parent packet of this packet (the encapsulating packet).
-     * @param packet
-     *            The entire packet (header and payload).
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    public EthernetIIPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
-        super(file, parent, PcapProtocol.ETHERNET_II);
-
-        if (packet.array().length <= EthernetIIValues.ETHERNET_II_MIN_SIZE) {
-            throw new BadPacketException("An Ethernet II packet can't be smaller than 14 bytes."); //$NON-NLS-1$
-        }
-
-        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
-        // methods.
-        fSourceEndpoint = null;
-        fDestinationEndpoint = null;
-
-        fFields = null;
-
-        fDestinationMacAddress = new byte[EthernetIIValues.MAC_ADDRESS_SIZE];
-        fSourceMacAddress = new byte[EthernetIIValues.MAC_ADDRESS_SIZE];
-        packet.order(ByteOrder.BIG_ENDIAN);
-        packet.position(0);
-        packet.get(fDestinationMacAddress);
-        packet.get(fSourceMacAddress);
-        fType = ConversionHelper.unsignedShortToInt(packet.getShort());
-
-        // Get payload if it exists.
-        if (packet.array().length - packet.position() > 0) {
-            byte[] array = new byte[packet.array().length - packet.position()];
-            packet.get(array);
-            ByteBuffer payload = ByteBuffer.wrap(array);
-            if (payload != null) {
-                payload.order(ByteOrder.BIG_ENDIAN);
-                payload.position(0);
-            }
-            fPayload = payload;
-
-        } else {
-            fPayload = null;
-        }
-
-        // Find child
-        fChildPacket = findChildPacket();
-
-    }
-
-    @Override
-    public @Nullable Packet getChildPacket() {
-        return fChildPacket;
-    }
-
-    @Override
-    public @Nullable ByteBuffer getPayload() {
-        return fPayload;
-    }
-
-    /**
-     * Getter method for the source MAC Address.
-     *
-     * @return The source MAC address.
-     */
-    public byte[] getSourceMacAddress() {
-        return checkNotNull(Arrays.copyOf(fSourceMacAddress, fSourceMacAddress.length));
-    }
-
-    /**
-     * Getter method for the destination MAC Address.
-     *
-     * @return The destination MAC address.
-     */
-    public byte[] getDestinationMacAddress() {
-        return checkNotNull(Arrays.copyOf(fDestinationMacAddress, fDestinationMacAddress.length));
-    }
-
-    /**
-     * Getter method for Ethertype. See
-     * http://standards.ieee.org/develop/regauth/ethertype/eth.txt
-     *
-     * @return The Ethertype. This is used to determine the child packet..
-     */
-    public int getEthertype() {
-        return fType;
-    }
-
-    @Override
-    protected @Nullable Packet findChildPacket() throws BadPacketException {
-        // TODO Add more protocols.
-        ByteBuffer payload = fPayload;
-        if (payload == null) {
-            return null;
-        }
-        switch (fType) {
-        case EthertypeHelper.ETHERTYPE_IPV4:
-            return new IPv4Packet(getPcapFile(), this, payload);
-        default:
-            return new UnknownPacket(getPcapFile(), this, payload);
-        }
-    }
-
-    @Override
-    public String toString() {
-        String string = getProtocol().getName() + ", Source: " + ConversionHelper.toMacAddress(fSourceMacAddress) + //$NON-NLS-1$
-                ", Destination: " + ConversionHelper.toMacAddress(fDestinationMacAddress) + ", Type: " + //$NON-NLS-1$ //$NON-NLS-2$
-                EthertypeHelper.toEtherType(fType) + "\n"; //$NON-NLS-1$
-        final Packet child = fChildPacket;
-        if (child != null) {
-            return string + child.toString();
-        }
-        return string;
-    }
-
-    @Override
-    public boolean validate() {
-        // Not yet implemented. ATM, we consider that all packets are valid.
-        // This is the case for all packets.
-        // TODO Implement it.
-        return true;
-    }
-
-    @Override
-    public EthernetIIEndpoint getSourceEndpoint() {
-        @Nullable EthernetIIEndpoint endpoint = fSourceEndpoint;
-        if (endpoint == null) {
-            endpoint = new EthernetIIEndpoint(this, true);
-        }
-        fSourceEndpoint = endpoint;
-        return fSourceEndpoint;
-    }
-
-    @Override
-    public EthernetIIEndpoint getDestinationEndpoint() {
-        @Nullable EthernetIIEndpoint endpoint = fDestinationEndpoint;
-
-        if (endpoint == null) {
-            endpoint = new EthernetIIEndpoint(this, false);
-        }
-        fDestinationEndpoint = endpoint;
-        return fDestinationEndpoint;
-    }
-
-    @Override
-    public Map<String, String> getFields() {
-        Map<String, String> map = fFields;
-        if (map == null) {
-            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder();
-            builder.put("Source MAC Address", ConversionHelper.toMacAddress(fSourceMacAddress)); //$NON-NLS-1$
-            builder.put("Destination MAC Address", ConversionHelper.toMacAddress(fDestinationMacAddress)); //$NON-NLS-1$
-            builder.put("Ethertype", String.valueOf(EthertypeHelper.toEtherType(fType))); //$NON-NLS-1$
-
-            fFields = checkNotNull(builder.build());
-            return fFields;
-        }
-        return map;
-    }
-
-    @Override
-    public String getLocalSummaryString() {
-        return "Src: " + ConversionHelper.toMacAddress(fSourceMacAddress) + " , Dst: " + ConversionHelper.toMacAddress(fDestinationMacAddress); //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    protected String getSignificationString() {
-        return "Source MAC: " + ConversionHelper.toMacAddress(fSourceMacAddress) + " , Destination MAC: " + ConversionHelper.toMacAddress(fDestinationMacAddress); //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        final Packet child = fChildPacket;
-        if (child != null) {
-            result = prime * result + child.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + Arrays.hashCode(fDestinationMacAddress);
-        final ByteBuffer payload = fPayload;
-        if (payload != null) {
-            result = prime * result + payload.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + Arrays.hashCode(fSourceMacAddress);
-        result = prime * result + fType;
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        EthernetIIPacket other = (EthernetIIPacket) obj;
-        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)) {
-            return false;
-        }
-        if (!Arrays.equals(fDestinationMacAddress, other.fDestinationMacAddress)) {
-            return false;
-        }
-        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)) {
-            return false;
-        }
-
-        if (!Arrays.equals(fSourceMacAddress, other.fSourceMacAddress)) {
-            return false;
-        }
-        if (fType != other.fType) {
-            return false;
-        }
-        return true;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIValues.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIValues.java
deleted file mode 100644 (file)
index f244f11..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2;
-
-/**
- * Interface that lists constants related to Ethernet II.
- *
- * See http://en.wikipedia.org/wiki/Ethernet_frame#Ethernet_II.
- *
- * @author Vincent Perot
- */
-public interface EthernetIIValues {
-
-    /** Size in bytes of a MAC address */
-    int MAC_ADDRESS_SIZE = 6;
-
-    /** Size in bytes of the ethertype field */
-    int ETHERTYPE_SIZE = 4;
-
-    /** Size in bytes of the CRC checksum */
-    int CRC_CHECKSUM_SIZE = 4;
-
-    /** Maximum size in bytes of a entire Ethernet II Frame */
-    int ETHERNET_II_MAX_SIZE = 1518;
-
-    /** Minimum size in bytes of a entire Ethernet II Frame */
-    int ETHERNET_II_MIN_SIZE = 14;
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/package-info.java
deleted file mode 100644 (file)
index 43cfa8b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Endpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Endpoint.java
deleted file mode 100644 (file)
index 0acc7b7..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.net.Inet4Address;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-
-/**
- * Class that extends the {@link ProtocolEndpoint} class. It represents the
- * endpoint at an IPv4 level.
- *
- * @author Vincent Perot
- */
-public class IPv4Endpoint extends ProtocolEndpoint {
-
-    private final Inet4Address fIPAddress;
-
-    /**
-     * Constructor of the {@link IPv4Endpoint} class. It takes a packet to get
-     * its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public IPv4Endpoint(IPv4Packet packet, boolean isSourceEndpoint) {
-        super(packet, isSourceEndpoint);
-        fIPAddress = isSourceEndpoint ? packet.getSourceIpAddress() : packet.getDestinationIpAddress();
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            result = 0;
-        } else {
-            result = endpoint.hashCode();
-        }
-
-        result = prime * result + fIPAddress.hashCode();
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof IPv4Endpoint)) {
-            return false;
-        }
-
-        IPv4Endpoint other = (IPv4Endpoint) obj;
-
-        // Check on layer
-        boolean localEquals = fIPAddress.equals(other.fIPAddress);
-        if (!localEquals) {
-            return false;
-        }
-
-        // Check above layers.
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint != null) {
-            return endpoint.equals(other.getParentEndpoint());
-        }
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            return checkNotNull(fIPAddress.getHostAddress());
-        }
-        return endpoint.toString() + '/' + fIPAddress.getHostAddress();
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Packet.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Packet.java
deleted file mode 100644 (file)
index cff6996..0000000
+++ /dev/null
@@ -1,622 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.net.Inet4Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.tcp.TCPPacket;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.udp.UDPPacket;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-import org.eclipse.tracecompass.internal.pcap.core.util.IPProtocolNumberHelper;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMap.Builder;
-
-/**
- * Class that represents an Ethernet II packet.
- *
- * @author Vincent Perot
- */
-public class IPv4Packet extends Packet {
-
-    private final @Nullable Packet fChildPacket;
-    private final @Nullable ByteBuffer fPayload;
-
-    private final int fVersion;
-    private final int fInternetHeaderLength; // in 4 bytes blocks
-    private final int fDSCP;
-    private final int fExplicitCongestionNotification;
-    private final int fTotalLength; // in bytes
-    private final int fIdentification;
-    private final boolean fReservedFlag;
-    private final boolean fDontFragmentFlag;
-    private final boolean fMoreFragmentFlag;
-    private final int fFragmentOffset;
-    private final int fTimeToLive;
-    private final int fIpDatagramProtocol;
-    private final int fHeaderChecksum;
-    private final Inet4Address fSourceIpAddress;
-    private final Inet4Address fDestinationIpAddress;
-    private final @Nullable byte[] fOptions;
-
-    private @Nullable IPv4Endpoint fSourceEndpoint;
-    private @Nullable IPv4Endpoint fDestinationEndpoint;
-
-    private @Nullable Map<String, String> fFields;
-
-    // TODO Interpret options. See
-    // http://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml
-
-    /**
-     * Constructor of the IPv4 Packet class.
-     *
-     * @param file
-     *            The file that contains this packet.
-     * @param parent
-     *            The parent packet of this packet (the encapsulating packet).
-     * @param packet
-     *            The entire packet (header and payload).
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    public IPv4Packet(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
-        super(file, parent, PcapProtocol.IPV4);
-
-        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
-        // methods.
-        fSourceEndpoint = null;
-        fDestinationEndpoint = null;
-
-        fFields = null;
-
-        packet.order(ByteOrder.BIG_ENDIAN);
-        packet.position(0);
-
-        byte storage = packet.get();
-        fVersion = ((storage & 0xF0) >> 4) & 0x000000FF;
-        fInternetHeaderLength = storage & 0x0F;
-
-        storage = packet.get();
-        fDSCP = ((storage & 0b11111100) >> 2) & 0x000000FF;
-        fExplicitCongestionNotification = storage & 0b00000011;
-
-        fTotalLength = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fIdentification = ConversionHelper.unsignedShortToInt(packet.getShort());
-
-        storage = packet.get();
-        fReservedFlag = isBitSet(storage, 7);
-        fDontFragmentFlag = isBitSet(storage, 6);
-        fMoreFragmentFlag = isBitSet(storage, 5);
-        int msb = ((storage & 0b00011111) << 8);
-        int lsb = ConversionHelper.unsignedByteToInt(packet.get());
-        fFragmentOffset = msb + lsb;
-
-        fTimeToLive = ConversionHelper.unsignedByteToInt(packet.get());
-        fIpDatagramProtocol = ConversionHelper.unsignedByteToInt(packet.get());
-        fHeaderChecksum = ConversionHelper.unsignedShortToInt(packet.getShort());
-
-        byte[] source = new byte[IPv4Values.IP_ADDRESS_SIZE];
-        byte[] destination = new byte[IPv4Values.IP_ADDRESS_SIZE];
-        packet.get(source);
-        packet.get(destination);
-
-        try {
-            fSourceIpAddress = (Inet4Address) checkNotNull(InetAddress.getByAddress(source));
-            fDestinationIpAddress = (Inet4Address) checkNotNull(InetAddress.getByAddress(destination));
-        } catch (UnknownHostException e) {
-            throw new BadPacketException("The IP Address size is not valid!"); //$NON-NLS-1$
-        }
-
-        // Get options if there are any
-        if (fInternetHeaderLength > IPv4Values.DEFAULT_HEADER_LENGTH) {
-            fOptions = new byte[(fInternetHeaderLength - IPv4Values.DEFAULT_HEADER_LENGTH) * IPv4Values.BLOCK_SIZE];
-            packet.get(fOptions);
-        } else {
-            fOptions = null;
-        }
-
-        // Get payload if any.
-        if (packet.array().length - packet.position() > 0) {
-            byte[] array = new byte[packet.array().length - packet.position()];
-            packet.get(array);
-            ByteBuffer payload = ByteBuffer.wrap(array);
-            payload.order(ByteOrder.BIG_ENDIAN);
-            payload.position(0);
-            fPayload = payload;
-        } else {
-            fPayload = null;
-        }
-
-        // Find child
-        fChildPacket = findChildPacket();
-
-    }
-
-    @Override
-    public @Nullable Packet getChildPacket() {
-        return fChildPacket;
-    }
-
-    @Override
-    public @Nullable ByteBuffer getPayload() {
-        return fPayload;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * See http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
-     */
-    @Override
-    protected @Nullable Packet findChildPacket() throws BadPacketException {
-        // TODO Implement more protocols
-        ByteBuffer payload = fPayload;
-        if (payload == null) {
-            return null;
-        }
-
-        switch (fIpDatagramProtocol) {
-        case IPProtocolNumberHelper.PROTOCOL_NUMBER_TCP:
-            return new TCPPacket(getPcapFile(), this, payload);
-        case IPProtocolNumberHelper.PROTOCOL_NUMBER_UDP:
-            return new UDPPacket(getPcapFile(), this, payload);
-        default:
-            return new UnknownPacket(getPcapFile(), this, payload);
-        }
-
-    }
-
-    @Override
-    public String toString() {
-        // Generate flagString
-        // This is very ugly.
-        String flagString = null;
-
-        if (fReservedFlag && fDontFragmentFlag && fMoreFragmentFlag) { // 111
-            flagString = "Flags: 0x07 (Invalid)"; //$NON-NLS-1$
-        } else if (fReservedFlag && fDontFragmentFlag && !fMoreFragmentFlag) { // 110
-            flagString = "Flags: 0x06 (Invalid)"; //$NON-NLS-1$
-        } else if (fReservedFlag && !fDontFragmentFlag && fMoreFragmentFlag) { // 101
-            flagString = "Flags: 0x05 (Invalid)"; //$NON-NLS-1$
-        } else if (fReservedFlag && !fDontFragmentFlag && !fMoreFragmentFlag) { // 100
-            flagString = "Flags: 0x04 (Invalid)"; //$NON-NLS-1$
-        } else if (!fReservedFlag && fDontFragmentFlag && fMoreFragmentFlag) { // 011
-            flagString = "Flags: 0x03 (Invalid)"; //$NON-NLS-1$
-        } else if (!fReservedFlag && fDontFragmentFlag && !fMoreFragmentFlag) { // 010
-            flagString = "Flags: 0x02 (Don't fragment)"; //$NON-NLS-1$
-        } else if (!fReservedFlag && !fDontFragmentFlag && fMoreFragmentFlag) { // 001
-            flagString = "Flags: 0x01 (More fragments)"; //$NON-NLS-1$
-        } else if (!fReservedFlag && !fDontFragmentFlag && !fMoreFragmentFlag) { // 000
-            flagString = "Flags: 0x00 (Don't have more fragments)"; //$NON-NLS-1$
-        }
-
-        flagString += ", Fragment Offset: " + fFragmentOffset; //$NON-NLS-1$
-
-        // Generate checksum string
-        // TODO calculate the expected checksum from packet
-        String checksumString = "Header Checksum: " + String.format("%s%04x", "0x", fHeaderChecksum); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-        String string = getProtocol().getName() + ", Source: " + fSourceIpAddress.getHostAddress() + ", Destination: " + fDestinationIpAddress.getHostAddress() + //$NON-NLS-1$ //$NON-NLS-2$
-                "\nVersion: " + fVersion + ", Identification: " + String.format("%s%04x", "0x", fIdentification) + ", Header Length: " + getHeaderLength() + " bytes, Total Length: " + getTotalLength() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-                " bytes\nDifferentiated Services Code Point: " + String.format("%s%02x", "0x", fDSCP) + "; Explicit Congestion Notification: " + String.format("%s%02x", "0x", fExplicitCongestionNotification) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-                + "\n" + flagString + "\nTime to live: " + fTimeToLive + //$NON-NLS-1$ //$NON-NLS-2$
-                "\nProtocol: " + fIpDatagramProtocol + "\n" //$NON-NLS-1$ //$NON-NLS-2$
-                + checksumString + "\n"; //$NON-NLS-1$
-        final Packet child = fChildPacket;
-        if (child != null) {
-            return string + child.toString();
-        }
-        return string;
-    }
-
-    /**
-     * Getter method that returns the version of the IP protocol used. This
-     * should always be set to 4 as IPv6 has its own class.
-     *
-     * @return The version of the IP used.
-     */
-    public int getVersion() {
-        return fVersion;
-    }
-
-    /**
-     * Getter method that returns the header length in bytes. In the IPv4
-     * packet, this is specified in 4-bytes data block. By default, this method
-     * returns 20 if there are no options present. Otherwise, it will return a
-     * higher number.
-     *
-     * @return The header length in bytes.
-     */
-    public int getHeaderLength() {
-        return fInternetHeaderLength * IPv4Values.BLOCK_SIZE;
-    }
-
-    /**
-     * Getter method that returns the Differentiated Services Code Point (a.k.a.
-     * the Type of Service). This is useful for some technologies that require
-     * real-time data exchange.
-     *
-     * @return The DSCP
-     */
-    public int getDSCP() {
-        return fDSCP;
-    }
-
-    /**
-     * Getter method that returns the Explicit Congestion Notification (ECN).
-     * This allows end-to-end communication without dropping packets.
-     *
-     * @return The ECN.
-     */
-    public int getExplicitCongestionNotification() {
-        return fExplicitCongestionNotification;
-    }
-
-    /**
-     * Getter method to retrieve the length of the entire packet, in bytes. This
-     * number is according to the packet, and might not be true if the packet is
-     * erroneous.
-     *
-     * @return The total length (packet and payload) in bytes.
-     */
-    public int getTotalLength() {
-        return fTotalLength;
-    }
-
-    /**
-     * Getter method to retrieve the Identification. This is a field that is
-     * used to uniquely identify the packets, thus allowing the reconstruction
-     * of fragmented IP packets.
-     *
-     * @return The packet identification.
-     */
-    public int getIdentification() {
-        return fIdentification;
-    }
-
-    /**
-     * Getter method that returns the state of the Reserved flag. This must
-     * always be zero.
-     *
-     * @return The state of the Reserved flag.
-     */
-    public boolean getReservedFlag() {
-        return fReservedFlag;
-    }
-
-    /**
-     * Getter method that indicates if the packet can be fragmented or not.
-     *
-     * @return Whether the packet can be fragmented or not.
-     */
-    public boolean getDontFragmentFlag() {
-        return fDontFragmentFlag;
-    }
-
-    /**
-     * Getter method that indicates if the packet has more fragments or not.
-     *
-     * @return Whether the packet has more fragments or not.
-     */
-    public boolean getHasMoreFragment() {
-        return fMoreFragmentFlag;
-    }
-
-    /**
-     * Getter method that specify the offset of a particular fragment relative
-     * to the original unfragmented packet, in 8-bytes blocks. *
-     *
-     * @return The fragment offset.
-     */
-    public int getFragmentOffset() {
-        return fFragmentOffset;
-    }
-
-    /**
-     * Getter method that returns the time to live in seconds. In practice, this
-     * is a hop count. This is used to prevent packets from persisting.
-     *
-     * @return The time left to live for the packet.
-     */
-    public int getTimeToLive() {
-        return fTimeToLive;
-    }
-
-    /**
-     * Getter method that returns the encapsulated protocol.
-     *
-     * See http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
-     *
-     * @return The encapsulated protocol.
-     */
-    public int getIpDatagramProtocol() {
-        return fIpDatagramProtocol;
-    }
-
-    /**
-     * Getter method that returns the checksum, according to the packet. This
-     * checksum might be wrong if the packet is erroneous.
-     *
-     * @return The header checksum.
-     */
-    public int getHeaderChecksum() {
-        return fHeaderChecksum;
-    }
-
-    /**
-     * Getter method that returns the source IP address.
-     *
-     * @return The source IP address, as a byte array in big-endian.
-     */
-    public Inet4Address getSourceIpAddress() {
-        return fSourceIpAddress;
-    }
-
-    /**
-     * Getter method that returns the destination IP address.
-     *
-     * @return The destination IP address, as a byte array in big-endian.
-     */
-    public Inet4Address getDestinationIpAddress() {
-        return fDestinationIpAddress;
-    }
-
-    /**
-     * Getter method that returns the options. This method returns null if no
-     * options are present.
-     *
-     * @return The options of the packet.
-     */
-    public @Nullable byte[] getOptions() {
-        final byte[] options = fOptions;
-        if (options == null) {
-            return null;
-        }
-        return Arrays.copyOf(options, options.length);
-    }
-
-    @Override
-    public boolean validate() {
-        // Not yet implemented. ATM, we consider that all packets are valid.
-        // This is the case for all packets.
-        // TODO Implement it.
-        return true;
-    }
-
-    @Override
-    public IPv4Endpoint getSourceEndpoint() {
-        @Nullable
-        IPv4Endpoint endpoint = fSourceEndpoint;
-        if (endpoint == null) {
-            endpoint = new IPv4Endpoint(this, true);
-        }
-        fSourceEndpoint = endpoint;
-        return fSourceEndpoint;
-    }
-
-    @Override
-    public IPv4Endpoint getDestinationEndpoint() {
-        @Nullable
-        IPv4Endpoint endpoint = fDestinationEndpoint;
-
-        if (endpoint == null) {
-            endpoint = new IPv4Endpoint(this, false);
-        }
-        fDestinationEndpoint = endpoint;
-        return fDestinationEndpoint;
-    }
-
-    @Override
-    public Map<String, String> getFields() {
-        Map<String, String> map = fFields;
-        if (map == null) {
-            Builder<String, String> builder = ImmutableMap.<String, String> builder()
-                    .put("Version", String.valueOf(fVersion)) //$NON-NLS-1$
-                    .put("Header Length", String.valueOf(getHeaderLength()) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
-                    .put("Differentiated Services Field", String.format("%s%02x", "0x", fDSCP)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    .put("Explicit Congestion Notification", String.format("%s%02x", "0x", fExplicitCongestionNotification)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    .put("Total Length", String.valueOf(fTotalLength) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
-                    .put("Identification", String.format("%s%04x", "0x", fIdentification)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    .put("Don't Fragment Flag", String.valueOf(fDontFragmentFlag)) //$NON-NLS-1$
-                    .put("More Fragment Flag", String.valueOf(fMoreFragmentFlag)) //$NON-NLS-1$
-                    .put("Fragment Offset", String.valueOf(fFragmentOffset)) //$NON-NLS-1$
-                    .put("Time to live", String.valueOf(fTimeToLive)) //$NON-NLS-1$
-                    .put("Protocol", IPProtocolNumberHelper.toString(fIpDatagramProtocol) + " (" + String.valueOf(fIpDatagramProtocol) + ")") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    .put("Checksum", String.format("%s%04x", "0x", fHeaderChecksum)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    .put("Source IP Address", fSourceIpAddress.getHostAddress()) //$NON-NLS-1$
-                    .put("Destination IP Address", fDestinationIpAddress.getHostAddress()); //$NON-NLS-1$
-            byte[] options = fOptions;
-            if (options == null) {
-                builder.put("Options", EMPTY_STRING); //$NON-NLS-1$
-            } else {
-                builder.put("Options", ConversionHelper.bytesToHex(options, true)); //$NON-NLS-1$
-
-            }
-            fFields = checkNotNull(builder.build());
-            return fFields;
-        }
-        return map;
-    }
-
-    @Override
-    public String getLocalSummaryString() {
-        return "Src: " + fSourceIpAddress.getHostAddress() + " , Dst: " + fDestinationIpAddress.getHostAddress(); //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    protected String getSignificationString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(fSourceIpAddress.getHostAddress())
-                .append(" > ") //$NON-NLS-1$
-                .append(fDestinationIpAddress.getHostAddress());
-
-        String flags = generateFlagString();
-        if (!(flags.equals(""))) { //$NON-NLS-1$
-            sb.append(' ')
-                    .append('[')
-                    .append(flags)
-                    .append(']');
-        }
-        sb.append(" Id=") //$NON-NLS-1$
-        .append(fIdentification);
-
-        final ByteBuffer payload = fPayload;
-        if (payload != null) {
-            sb.append(" Len=") //$NON-NLS-1$
-            .append(payload.array().length);
-        } else {
-            sb.append(" Len=0"); //$NON-NLS-1$
-        }
-        return NonNullUtils.nullToEmptyString(sb);
-    }
-
-    private String generateFlagString() {
-        StringBuilder sb = new StringBuilder();
-        boolean start = true;
-
-        if (fDontFragmentFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("DF"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fMoreFragmentFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("MF"); //$NON-NLS-1$
-            start = false;
-        }
-        return NonNullUtils.nullToEmptyString(sb);
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        final Packet child = fChildPacket;
-        if (child != null) {
-            result = prime * result + child.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + fDSCP;
-        result = prime * result + fDestinationIpAddress.hashCode();
-        result = prime * result + (fDontFragmentFlag ? 1231 : 1237);
-        result = prime * result + fExplicitCongestionNotification;
-        result = prime * result + fFragmentOffset;
-        result = prime * result + fHeaderChecksum;
-        result = prime * result + fIdentification;
-        result = prime * result + fInternetHeaderLength;
-        result = prime * result + fIpDatagramProtocol;
-        result = prime * result + (fMoreFragmentFlag ? 1231 : 1237);
-        result = prime * result + Arrays.hashCode(fOptions);
-        final ByteBuffer payload = fPayload;
-        if (payload != null) {
-            result = prime * result + payload.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + (fReservedFlag ? 1231 : 1237);
-        result = prime * result + fSourceIpAddress.hashCode();
-        result = prime * result + fTimeToLive;
-        result = prime * result + fTotalLength;
-        result = prime * result + fVersion;
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        IPv4Packet other = (IPv4Packet) obj;
-        if (!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)) {
-            return false;
-        }
-        if (fDSCP != other.fDSCP) {
-            return false;
-        }
-        if (!(fDestinationIpAddress.equals(other.fDestinationIpAddress))) {
-            return false;
-        }
-        if (fDontFragmentFlag != other.fDontFragmentFlag) {
-            return false;
-        }
-        if (fExplicitCongestionNotification != other.fExplicitCongestionNotification) {
-            return false;
-        }
-        if (fFragmentOffset != other.fFragmentOffset) {
-            return false;
-        }
-        if (fHeaderChecksum != other.fHeaderChecksum) {
-            return false;
-        }
-        if (fIdentification != other.fIdentification) {
-            return false;
-        }
-        if (fInternetHeaderLength != other.fInternetHeaderLength) {
-            return false;
-        }
-        if (fIpDatagramProtocol != other.fIpDatagramProtocol) {
-            return false;
-        }
-        if (fMoreFragmentFlag != other.fMoreFragmentFlag) {
-            return false;
-        }
-        if (!Arrays.equals(fOptions, other.fOptions)) {
-            return false;
-        }
-        if (!NonNullUtils.equalsNullable(fPayload, other.fPayload)) {
-            return false;
-        }
-        if (fReservedFlag != other.fReservedFlag) {
-            return false;
-        }
-        if (!(fSourceIpAddress.equals(other.fSourceIpAddress))) {
-            return false;
-        }
-        if (fTimeToLive != other.fTimeToLive) {
-            return false;
-        }
-        if (fTotalLength != other.fTotalLength) {
-            return false;
-        }
-        if (fVersion != other.fVersion) {
-            return false;
-        }
-        return true;
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Values.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Values.java
deleted file mode 100644 (file)
index 92f0cfe..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4;
-
-/**
- * Interface that lists constants related to Internet Protocol v4.
- *
- * See http://en.wikipedia.org/wiki/IPv4#Packet_structure.
- *
- * @author Vincent Perot
- */
-public interface IPv4Values {
-
-    /** Size in bytes of an IP address */
-    int IP_ADDRESS_SIZE = 4;
-
-    /** Size in bytes of a default IPv4 packet header */
-    int DEFAULT_HEADER_LENGTH = 5;
-
-    /** Size in bytes of a block of data. Used to convert data block to bytes */
-    int BLOCK_SIZE = 4;
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/package-info.java
deleted file mode 100644 (file)
index efae947..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/package-info.java
deleted file mode 100644 (file)
index 0f13140..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapEndpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapEndpoint.java
deleted file mode 100644 (file)
index 8e9d320..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.pcap;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-
-/**
- * Class that extends the {@link ProtocolEndpoint} class. It represents the endpoint at
- * a Pcap level.
- *
- * @author Vincent Perot
- */
-public class PcapEndpoint extends ProtocolEndpoint {
-
-    /**
-     * Constructor of the {@link PcapEndpoint} class. It takes a packet to get
-     * its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public PcapEndpoint(PcapPacket packet, boolean isSourceEndpoint) {
-        super(packet, isSourceEndpoint);
-    }
-
-    @Override
-    public int hashCode() {
-        return 0;
-    }
-
-    @Override
-    public String toString() {
-        return EMPTY_STRING;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof PcapEndpoint)) {
-            return false;
-        }
-
-        PcapEndpoint other = (PcapEndpoint) obj;
-
-        // Check above layers.
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint != null) {
-            return endpoint.equals(other.getParentEndpoint());
-        }
-        return true;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapPacket.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapPacket.java
deleted file mode 100644 (file)
index be6ae08..0000000
+++ /dev/null
@@ -1,355 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.pcap;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFileValues;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-import org.eclipse.tracecompass.internal.pcap.core.util.LinkTypeHelper;
-import org.eclipse.tracecompass.internal.pcap.core.util.PcapTimestampScale;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Class that represents a Pcap packet. This is the highest level of
- * encapsulation.
- *
- * @author Vincent Perot
- */
-public class PcapPacket extends Packet {
-
-    private static final int TIMESTAMP_MICROSECOND_MAX = 1000000;
-    private static final int TIMESTAMP_NANOSECOND_MAX = 1000000000;
-
-    private final @Nullable Packet fChildPacket;
-    private final @Nullable ByteBuffer fPayload;
-
-    private final long fTimestamp; // In microseconds
-    private final long fIncludedLength;
-    private final long fOriginalLength;
-    private final long fPacketIndex;
-
-    private @Nullable PcapEndpoint fSourceEndpoint;
-    private @Nullable PcapEndpoint fDestinationEndpoint;
-
-    private @Nullable Map<String, String> fFields;
-
-    /**
-     * Constructor of the Pcap Packet class.
-     *
-     * @param file
-     *            The file that contains this packet.
-     * @param parent
-     *            The parent packet of this packet (the encapsulating packet).
-     * @param header
-     *            The header of the packet.
-     * @param payload
-     *            The payload of this packet.
-     * @param index
-     *            The index of the packet in the file.
-     * @throws BadPacketException
-     *             Thrown when the Packet is erroneous.
-     */
-    public PcapPacket(PcapFile file, @Nullable Packet parent, ByteBuffer header, @Nullable ByteBuffer payload, long index) throws BadPacketException {
-        super(file, parent, PcapProtocol.PCAP);
-
-        if (header.array().length < PcapFileValues.PACKET_HEADER_SIZE) {
-            fChildPacket = null;
-            throw new BadPacketException("The Pcap packet header is too small."); //$NON-NLS-1$
-        }
-
-        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
-        // methods.
-        fSourceEndpoint = null;
-        fDestinationEndpoint = null;
-
-        fFields = null;
-
-        fPacketIndex = index;
-
-        // PcapPacket header in File endian
-        header.order(getPcapFile().getByteOrder());
-        header.position(0);
-        long timestampMostSignificant = ConversionHelper.unsignedIntToLong(header.getInt());
-        long timestampLeastSignificant = ConversionHelper.unsignedIntToLong(header.getInt());
-
-        switch (getTimestampScale()) {
-        case MICROSECOND:
-            if (timestampLeastSignificant > TIMESTAMP_MICROSECOND_MAX) {
-                fChildPacket = null;
-                throw new BadPacketException("The timestamp is erroneous."); //$NON-NLS-1$
-            }
-            fTimestamp = TIMESTAMP_MICROSECOND_MAX * timestampMostSignificant + timestampLeastSignificant;
-            break;
-        case NANOSECOND:
-            if (timestampLeastSignificant > TIMESTAMP_NANOSECOND_MAX) {
-                fChildPacket = null;
-                throw new BadPacketException("The timestamp is erroneous."); //$NON-NLS-1$
-            }
-            fTimestamp = TIMESTAMP_NANOSECOND_MAX * timestampMostSignificant + timestampLeastSignificant;
-            break;
-        default:
-            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
-        }
-
-        fIncludedLength = ConversionHelper.unsignedIntToLong(header.getInt());
-        fOriginalLength = ConversionHelper.unsignedIntToLong(header.getInt());
-
-        // Set up payload
-        final ByteBuffer pcapPacket = payload;
-        if (pcapPacket == null) {
-            fChildPacket = null;
-            fPayload = null;
-            return;
-        }
-
-        pcapPacket.order(ByteOrder.BIG_ENDIAN);
-        pcapPacket.position(0);
-        fPayload = pcapPacket;
-
-        // Find Child Packet
-        fChildPacket = findChildPacket();
-
-    }
-
-    @Override
-    public @Nullable Packet getChildPacket() {
-        return fChildPacket;
-    }
-
-    @Override
-    public @Nullable ByteBuffer getPayload() {
-        return fPayload;
-    }
-
-    /**
-     * Getter method that returns the timestamp of this packet, in microseconds/nanoseconds
-     * relative to epoch.
-     *
-     * @return The timestamp of the packet.
-     */
-    public long getTimestamp() {
-        return fTimestamp;
-    }
-
-    /**
-     * Getter method that returns the length in bytes of the packet that was
-     * included in the {@link PcapFile}.
-     *
-     * @return The included length of the packet.
-     */
-    public long getIncludedLength() {
-        return fIncludedLength;
-    }
-
-    /**
-     * Getter method that returns the original length in bytes of the packet.
-     *
-     * @return The included length of the packet.
-     */
-    public long getOriginalLength() {
-        return fOriginalLength;
-    }
-
-    /**
-     * Method that indicates if this packet was truncated at capture time.
-     *
-     * @return Whether the packet is truncated or not.
-     */
-    public boolean isTruncated() {
-        return fIncludedLength != fOriginalLength;
-    }
-
-    /**
-     * Getter method that returns the index of the packet.
-     *
-     * @return The index of the packet.
-     */
-    public long getIndex() {
-        return fPacketIndex;
-    }
-
-    @Override
-    public String toString() {
-        // TODO Decide if first capture is 0 or 1. Right now, it is 0.
-        String string = getProtocol().getName() + " " + fPacketIndex +  //$NON-NLS-1$
-                ": " + fOriginalLength + " bytes on wire, " + //$NON-NLS-1$ //$NON-NLS-2$
-                fIncludedLength + " bytes captured.\nArrival time: " +  //$NON-NLS-1$
-                ConversionHelper.toGMTTime(fTimestamp, getTimestampScale()) + "\n"; //$NON-NLS-1$
-
-        final Packet child = fChildPacket;
-        if (child != null) {
-            return string + child.toString();
-        }
-        return string;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * See http://www.tcpdump.org/linktypes.html
-     */
-    @Override
-    protected @Nullable Packet findChildPacket() throws BadPacketException {
-        @Nullable
-        ByteBuffer payload = fPayload;
-        if (payload == null) {
-            return null;
-        }
-
-        switch ((int) getPcapFile().getDataLinkType()) {
-        case LinkTypeHelper.LINKTYPE_ETHERNET:
-            return new EthernetIIPacket(getPcapFile(), this, payload);
-        default: // TODO add more protocols
-            return new UnknownPacket(getPcapFile(), this, payload);
-        }
-    }
-
-    @Override
-    public boolean validate() {
-        // Not yet implemented. ATM, we consider that all packets are valid.
-        // This is the case for all packets.
-        // TODO Implement it.
-        return true;
-    }
-
-    @Override
-    public PcapEndpoint getSourceEndpoint() {
-        @Nullable PcapEndpoint endpoint = fSourceEndpoint;
-        if (endpoint == null) {
-            endpoint = new PcapEndpoint(this, true);
-        }
-        fSourceEndpoint = endpoint;
-        return fSourceEndpoint;
-    }
-
-    @Override
-    public PcapEndpoint getDestinationEndpoint() {
-        @Nullable
-        PcapEndpoint endpoint = fDestinationEndpoint;
-
-        if (endpoint == null) {
-            endpoint = new PcapEndpoint(this, false);
-        }
-        fDestinationEndpoint = endpoint;
-        return fDestinationEndpoint;
-    }
-
-    // TODO handle plural form correctly
-    // TODO microsec
-    @Override
-    public Map<String, String> getFields() {
-        Map<String, String> map = fFields;
-        if (map == null) {
-            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder();
-            builder.put("Frame", String.valueOf(fPacketIndex)); //$NON-NLS-1$
-            builder.put("Frame Length", String.valueOf(fOriginalLength) + " bytes"); //$NON-NLS-1$ //$NON-NLS-2$
-            builder.put("Capture Length", String.valueOf(fIncludedLength) + " bytes"); //$NON-NLS-1$ //$NON-NLS-2$
-            builder.put("Capture Time", ConversionHelper.toGMTTime(fTimestamp, getTimestampScale())); //$NON-NLS-1$
-
-            fFields = NonNullUtils.checkNotNull(builder.build());
-            return fFields;
-        }
-        return map;
-    }
-
-    @Override
-    public String getLocalSummaryString() {
-        return "Frame " + fPacketIndex + ": " + fOriginalLength + " bytes on wire, " + fIncludedLength + " bytes captured"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-    }
-
-    @Override
-    protected String getSignificationString() {
-        return "New Frame: " + fOriginalLength + " bytes on wire"; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-
-        Packet child = fChildPacket;
-        if (child == null) {
-            result = prime * result;
-        } else {
-            result = prime * result + child.hashCode();
-        }
-
-        result = prime * result + (int) (fIncludedLength ^ (fIncludedLength >>> 32));
-        result = prime * result + (int) (fOriginalLength ^ (fOriginalLength >>> 32));
-        result = prime * result + (int) (fPacketIndex ^ (fPacketIndex >>> 32));
-
-        ByteBuffer payload = fPayload;
-        if (payload == null) {
-            result = prime * result;
-        } else {
-            result = prime * result + payload.hashCode();
-        }
-
-        result = prime * result + (int) (fTimestamp ^ (fTimestamp >>> 32));
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        PcapPacket other = (PcapPacket) obj;
-        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)){
-            return false;
-        }
-        if (fIncludedLength != other.fIncludedLength) {
-            return false;
-        }
-        if (fOriginalLength != other.fOriginalLength) {
-            return false;
-        }
-        if (fPacketIndex != other.fPacketIndex) {
-            return false;
-        }
-        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)) {
-            return false;
-        }
-        if (fTimestamp != other.fTimestamp) {
-            return false;
-        }
-        return true;
-    }
-
-    /**
-     * Getter method that returns the Timestamp precision of the packet.
-     *
-     * @return the Timestamp precision.
-     */
-    public PcapTimestampScale getTimestampScale() {
-        return getPcapFile().getTimestampPrecision();
-    }
-}
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/package-info.java
deleted file mode 100644 (file)
index 3876002..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol.pcap;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPEndpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPEndpoint.java
deleted file mode 100644 (file)
index a5d4004..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-
-/**
- * Class that extends the {@link ProtocolEndpoint} class. It represents the
- * endpoint at a TCP level.
- *
- * @author Vincent Perot
- */
-public class TCPEndpoint extends ProtocolEndpoint {
-
-    private final int fPort;
-
-    /**
-     * Constructor of the {@link TCPEndpoint} class. It takes a packet to get
-     * its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public TCPEndpoint(TCPPacket packet, boolean isSourceEndpoint) {
-        super(packet, isSourceEndpoint);
-        fPort = isSourceEndpoint ? packet.getSourcePort() : packet.getDestinationPort();
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            result = 0;
-        } else {
-            result = endpoint.hashCode();
-        }
-        result = prime * result + fPort;
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof TCPEndpoint)) {
-            return false;
-        }
-
-        TCPEndpoint other = (TCPEndpoint) obj;
-
-        // Check on layer
-        boolean localEquals = (fPort == other.fPort);
-        if (!localEquals) {
-            return false;
-        }
-
-        // Check above layers.
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint != null) {
-            return endpoint.equals(other.getParentEndpoint());
-        }
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            return checkNotNull(String.valueOf(fPort));
-        }
-        return endpoint.toString() + '/' + fPort;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPPacket.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPPacket.java
deleted file mode 100644 (file)
index 6e6109d..0000000
+++ /dev/null
@@ -1,678 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Arrays;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMap.Builder;
-
-/**
- * Class that represents a TCP packet.
- *
- * @author Vincent Perot
- */
-public class TCPPacket extends Packet {
-
-    private final @Nullable Packet fChildPacket;
-    private final @Nullable ByteBuffer fPayload;
-
-    private final int fSourcePort;
-    private final int fDestinationPort;
-    private final long fSequenceNumber;
-    private final long fAcknowledgmentNumber;
-    private final int fDataOffset; // in 4 bytes block
-    private final byte fReservedField;
-    private final boolean fNSFlag;
-    private final boolean fCWRFlag;
-    private final boolean fECEFlag;
-    private final boolean fURGFlag;
-    private final boolean fACKFlag;
-    private final boolean fPSHFlag;
-    private final boolean fRSTFlag;
-    private final boolean fSYNFlag;
-    private final boolean fFINFlag;
-    private final int fWindowSize;
-    private final int fChecksum;
-    private final int fUrgentPointer;
-    private final @Nullable byte[] fOptions; // TODO Interpret options.
-
-    private @Nullable TCPEndpoint fSourceEndpoint;
-    private @Nullable TCPEndpoint fDestinationEndpoint;
-
-    private @Nullable Map<String, String> fFields;
-
-    /**
-     * Constructor of the TCP Packet class.
-     *
-     * @param file
-     *            The file that contains this packet.
-     * @param parent
-     *            The parent packet of this packet (the encapsulating packet).
-     * @param packet
-     *            The entire packet (header and payload).
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    public TCPPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
-        super(file, parent, PcapProtocol.TCP);
-
-        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
-        // methods.
-        fSourceEndpoint = null;
-        fDestinationEndpoint = null;
-
-        fFields = null;
-
-        packet.order(ByteOrder.BIG_ENDIAN);
-        packet.position(0);
-
-        fSourcePort = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fDestinationPort = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fSequenceNumber = ConversionHelper.unsignedIntToLong(packet.getInt());
-        fAcknowledgmentNumber = ConversionHelper.unsignedIntToLong(packet.getInt());
-
-        byte storage = packet.get();
-        fDataOffset = ((storage & 0b11110000) >>> 4) & 0x000000FF;
-        fReservedField = (byte) ((storage & 0b00001110) >>> 1);
-        fNSFlag = isBitSet(storage, 0);
-
-        storage = packet.get();
-        fCWRFlag = isBitSet(storage, 7);
-        fECEFlag = isBitSet(storage, 6);
-        fURGFlag = isBitSet(storage, 5);
-        fACKFlag = isBitSet(storage, 4);
-        fPSHFlag = isBitSet(storage, 3);
-        fRSTFlag = isBitSet(storage, 2);
-        fSYNFlag = isBitSet(storage, 1);
-        fFINFlag = isBitSet(storage, 0);
-
-        fWindowSize = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fChecksum = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fUrgentPointer = ConversionHelper.unsignedShortToInt(packet.getShort());
-
-        // Get options if any
-        if (fDataOffset > TCPValues.DEFAULT_HEADER_LENGTH) {
-            fOptions = new byte[(fDataOffset - TCPValues.DEFAULT_HEADER_LENGTH) * TCPValues.BLOCK_SIZE];
-            packet.get(fOptions);
-        } else {
-            fOptions = null;
-        }
-
-        // Get payload if any.
-        if (packet.array().length - packet.position() > 0) {
-            byte[] array = new byte[packet.array().length - packet.position()];
-            packet.get(array);
-            ByteBuffer payload = ByteBuffer.wrap(array);
-            payload.order(ByteOrder.BIG_ENDIAN);
-            payload.position(0);
-            fPayload = payload;
-        } else {
-            fPayload = null;
-        }
-
-        // find child packet
-        fChildPacket = findChildPacket();
-
-    }
-
-    @Override
-    public @Nullable Packet getChildPacket() {
-        return fChildPacket;
-    }
-
-    @Override
-    public @Nullable ByteBuffer getPayload() {
-        return fPayload;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * See http://www.iana.org/assignments/service-names-port-numbers/service-
-     * names-port-numbers.xhtml or
-     * http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
-     */
-    @Override
-    protected @Nullable Packet findChildPacket() throws BadPacketException {
-        // TODO implement further protocols and update this
-        ByteBuffer payload = fPayload;
-        if (payload == null) {
-            return null;
-        }
-
-        return new UnknownPacket(getPcapFile(), this, payload);
-    }
-
-    @Override
-    public String toString() {
-        final ByteBuffer payload = fPayload;
-        int length = 0;
-        if (payload != null) {
-            length = payload.array().length;
-        }
-
-        String flagString = ""; // TODO Finish it. Im just too lazy. //$NON-NLS-1$
-        String string = getProtocol().getName() + ", Source Port: " + fSourcePort + ", Destination Port: " + fDestinationPort + //$NON-NLS-1$ //$NON-NLS-2$
-                "\nSequence Number: " + fSequenceNumber + ", Acknowledgment Number: " + fAcknowledgmentNumber + //$NON-NLS-1$ //$NON-NLS-2$
-                "\nHeader length: " + fDataOffset * TCPValues.BLOCK_SIZE + " bytes, Data length: " + length + //$NON-NLS-1$ //$NON-NLS-2$
-                "\n" + flagString + "Window size value: " + fWindowSize + ", Urgent Pointer: " + String.format("%s%04x", "0x", fUrgentPointer) + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-                "\nChecksum: " + String.format("%s%04x", "0x", fChecksum) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
-        final Packet child = fChildPacket;
-        if (child != null) {
-            return string + child.toString();
-        }
-        return string;
-    }
-
-    /**
-     * Getter method that returns the TCP Source Port.
-     *
-     * @return The source Port.
-     */
-    public int getSourcePort() {
-        return fSourcePort;
-    }
-
-    /**
-     * Getter method that returns the TCP Destination Port.
-     *
-     * @return The destination Port.
-     */
-    public int getDestinationPort() {
-        return fDestinationPort;
-    }
-
-    /**
-     * Getter method that returns the Sequence Number. The sequence number has a
-     * dual role:
-     * <ul>
-     * <li>If the SYN flag is set (1), then this is the initial sequence number.
-     * The sequence number of the actual first data byte and the acknowledged
-     * number in the corresponding ACK are then this sequence number plus 1.</li>
-     * <li>If the SYN flag is clear (0), then this is the accumulated sequence
-     * number of the first data byte of this segment for the current session.</li>
-     * </ul>
-     *
-     * Source: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
-     *
-     * @return The Sequence Number.
-     */
-    public long getSequenceNumber() {
-        return fSequenceNumber;
-    }
-
-    /**
-     * Getter method that returns the Acknowledgment Number.
-     *
-     * If the ACK flag is set then the value of this field is the next sequence
-     * number that the receiver is expecting. This acknowledges receipt of all
-     * prior bytes (if any). The first ACK sent by each end acknowledges the
-     * other end's initial sequence number itself, but no data.
-     *
-     * Source: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
-     *
-     * @return The Acknowledgment Number.
-     */
-    public long getAcknowledgmentNumber() {
-        return fAcknowledgmentNumber;
-    }
-
-    /**
-     * Getter method that returns the size of the TCP header in 4 bytes data
-     * block. The minimum size is 5 words and the maximum is 15 words.
-     *
-     * @return The Data Offset.
-     */
-    public int getDataOffset() {
-        return fDataOffset;
-    }
-
-    /**
-     * Getter method that returns the Reserved field. This field is for future
-     * use and should always be zero. In this library, it is used as a mean to
-     * verify the validity of a TCP packet.
-     *
-     * @return The Reserved Field.
-     */
-    public byte getReservedField() {
-        return fReservedField;
-    }
-
-    /**
-     * Getter method that returns the state of the NS flag.
-     *
-     * @return The state of the NS flag.
-     */
-    public boolean isNSFlagSet() {
-        return fNSFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the CWR flag.
-     *
-     * @return The state of the CWR flag.
-     */
-    public boolean isCongestionWindowReducedFlagSet() {
-        return fCWRFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the ECE flag.
-     *
-     * @return The state of the ECE flag.
-     */
-    public boolean isECNEchoFlagSet() {
-        return fECEFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the URG flag.
-     *
-     * @return The state of the URG flag.
-     */
-    public boolean isUrgentFlagSet() {
-        return fURGFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the ACK flag.
-     *
-     * @return The state of the ACK flag.
-     */
-    public boolean isAcknowledgeFlagSet() {
-        return fACKFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the PSH flag.
-     *
-     * @return The state of the PSH flag.
-     */
-    public boolean isPushFlagSet() {
-        return fPSHFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the RST flag.
-     *
-     * @return The state of the RST flag.
-     */
-    public boolean isResetFlagSet() {
-        return fRSTFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the SYN flag.
-     *
-     * @return The state of the SYN flag.
-     */
-    public boolean isSynchronizationFlagSet() {
-        return fSYNFlag;
-    }
-
-    /**
-     * Getter method that returns the state of the FIN flag.
-     *
-     * @return The state of the FIN flag.
-     */
-    public boolean isFinalFlagSet() {
-        return fFINFlag;
-    }
-
-    /**
-     * Getter method that returns the size of the windows, in windows size unit
-     * (by default, bytes), that the sender of this packet is willing to
-     * receive.
-     *
-     * @return The Window Size.
-     */
-    public int getWindowSize() {
-        return fWindowSize;
-    }
-
-    /**
-     * Getter method that returns the checksum of this packet. This checksum may
-     * be wrong if the packet is erroneous.
-     *
-     * @return The data and header checksum.
-     */
-    public int getChecksum() {
-        return fChecksum;
-    }
-
-    /**
-     * Getter method that returns the Urgent Pointer. If the URG flag is set,
-     * this field is an offset from the sequence number indicating the last
-     * urgent data byte.
-     *
-     * @return The Urgent Pointer.
-     */
-    public int getUrgentPointer() {
-        return fUrgentPointer;
-    }
-
-    /**
-     * Getter method that returns the options. This method returns null if no
-     * options are present.
-     *
-     * @return The options of the packet.
-     */
-    public @Nullable byte[] getOptions() {
-        byte[] options = fOptions;
-        if (options == null) {
-            return null;
-        }
-        return Arrays.copyOf(options, options.length);
-    }
-
-    @Override
-    public boolean validate() {
-        // Not yet implemented. ATM, we consider that all packets are valid.
-        // This is the case for all packets.
-        // TODO Implement it.
-        return true;
-    }
-
-    @Override
-    public TCPEndpoint getSourceEndpoint() {
-        @Nullable
-        TCPEndpoint endpoint = fSourceEndpoint;
-        if (endpoint == null) {
-            endpoint = new TCPEndpoint(this, true);
-        }
-        fSourceEndpoint = endpoint;
-        return fSourceEndpoint;
-    }
-
-    @Override
-    public TCPEndpoint getDestinationEndpoint() {
-        @Nullable
-        TCPEndpoint endpoint = fDestinationEndpoint;
-
-        if (endpoint == null) {
-            endpoint = new TCPEndpoint(this, false);
-        }
-        fDestinationEndpoint = endpoint;
-        return fDestinationEndpoint;
-    }
-
-    @Override
-    public Map<String, String> getFields() {
-        Map<String, String> map = fFields;
-        if (map == null) {
-            Builder<String, String> builder = ImmutableMap.<String, String> builder()
-                    .put("Source Port", String.valueOf(fSourcePort)) //$NON-NLS-1$
-                    .put("Destination Port", String.valueOf(fDestinationPort)) //$NON-NLS-1$
-                    .put("Sequence Number", String.valueOf(fSequenceNumber)) //$NON-NLS-1$
-                    .put("Acknowledgement Number", String.valueOf(fAcknowledgmentNumber)) //$NON-NLS-1$
-                    .put("Length", String.valueOf(fDataOffset * TCPValues.BLOCK_SIZE) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
-                    .put("ECN-Nonce Flag", String.valueOf(fNSFlag)) //$NON-NLS-1$
-                    .put("Congestion Window Reduced Flag", String.valueOf(fCWRFlag)) //$NON-NLS-1$
-                    .put("ECN-Echo Flag", String.valueOf(fECEFlag)) //$NON-NLS-1$
-                    .put("Urgent Flag", String.valueOf(fURGFlag)) //$NON-NLS-1$
-                    .put("ACK Flag", String.valueOf(fACKFlag)) //$NON-NLS-1$
-                    .put("PSH Flag", String.valueOf(fPSHFlag)) //$NON-NLS-1$
-                    .put("RST Flag", String.valueOf(fRSTFlag)) //$NON-NLS-1$
-                    .put("SYN Flag", String.valueOf(fSYNFlag)) //$NON-NLS-1$
-                    .put("FIN Flag", String.valueOf(fFINFlag)) //$NON-NLS-1$
-                    .put("Window Size Value", String.valueOf(fWindowSize)) //$NON-NLS-1$
-                    .put("Checksum", String.format("%s%04x", "0x", fChecksum)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-                    .put("Urgent Pointer", String.format("%s%04x", "0x", fUrgentPointer)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-            byte[] options = fOptions;
-            if (options == null) {
-                builder.put("Options", EMPTY_STRING); //$NON-NLS-1$
-            } else {
-                builder.put("Options", ConversionHelper.bytesToHex(options, true)); //$NON-NLS-1$
-
-            }
-            fFields = checkNotNull(builder.build());
-            return fFields;
-        }
-        return map;
-    }
-
-    @Override
-    public String getLocalSummaryString() {
-        return "Src Port: " + fSourcePort + ", Dst Port: " + fDestinationPort + //$NON-NLS-1$ //$NON-NLS-2$
-                ", Seq: " + fSequenceNumber + ", Ack: " + fAcknowledgmentNumber + //$NON-NLS-1$ //$NON-NLS-2$
-                ", Len: " + (fDataOffset * TCPValues.BLOCK_SIZE); //$NON-NLS-1$    }
-    }
-
-    @Override
-    protected String getSignificationString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(fSourcePort)
-                .append(" > ") //$NON-NLS-1$
-                .append(fDestinationPort);
-
-        if (!(generateFlagString().equals(EMPTY_STRING))) {
-            sb.append(' ')
-                    .append('[')
-                    .append(generateFlagString())
-                    .append(']');
-        }
-        sb.append(" Seq=") //$NON-NLS-1$
-        .append(fSequenceNumber);
-
-        if (fACKFlag) {
-            sb.append(" Ack=") //$NON-NLS-1$
-            .append(fAcknowledgmentNumber);
-        }
-
-        sb.append(" Len=") //$NON-NLS-1$
-        .append((fDataOffset * TCPValues.BLOCK_SIZE));
-
-        return NonNullUtils.nullToEmptyString(sb);    }
-
-    private String generateFlagString() {
-        StringBuilder sb = new StringBuilder();
-        boolean start = true;
-
-        if (fSYNFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("SYN"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fACKFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("ACK"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fFINFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("FIN"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fRSTFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("RST"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fPSHFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("PSH"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fURGFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("URG"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fNSFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("NS"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fCWRFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("CWR"); //$NON-NLS-1$
-            start = false;
-        }
-        if (fECEFlag) {
-            if (!start) {
-                sb.append(", "); //$NON-NLS-1$
-            }
-            sb.append("ECE"); //$NON-NLS-1$
-            start = false;
-        }
-        return NonNullUtils.nullToEmptyString(sb);
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + (fACKFlag ? 1231 : 1237);
-        result = prime * result + (int) (fAcknowledgmentNumber ^ (fAcknowledgmentNumber >>> 32));
-        result = prime * result + (fCWRFlag ? 1231 : 1237);
-        result = prime * result + fChecksum;
-        final Packet child = fChildPacket;
-        if (child != null) {
-            result = prime * result + child.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + fDataOffset;
-        result = prime * result + fDestinationPort;
-        result = prime * result + (fECEFlag ? 1231 : 1237);
-        result = prime * result + (fFINFlag ? 1231 : 1237);
-        result = prime * result + (fNSFlag ? 1231 : 1237);
-        result = prime * result + Arrays.hashCode(fOptions);
-        result = prime * result + (fPSHFlag ? 1231 : 1237);
-        final ByteBuffer payload = fPayload;
-        if (payload != null) {
-            result = prime * result + payload.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + (fRSTFlag ? 1231 : 1237);
-        result = prime * result + fReservedField;
-        result = prime * result + (fSYNFlag ? 1231 : 1237);
-        result = prime * result + (int) (fSequenceNumber ^ (fSequenceNumber >>> 32));
-        result = prime * result + fSourcePort;
-        result = prime * result + (fURGFlag ? 1231 : 1237);
-        result = prime * result + fUrgentPointer;
-        result = prime * result + fWindowSize;
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        TCPPacket other = (TCPPacket) obj;
-        if (fACKFlag != other.fACKFlag) {
-            return false;
-        }
-        if (fAcknowledgmentNumber != other.fAcknowledgmentNumber) {
-            return false;
-        }
-        if (fCWRFlag != other.fCWRFlag) {
-            return false;
-        }
-        if (fChecksum != other.fChecksum) {
-            return false;
-        }
-        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)){
-            return false;
-        }
-        if (fDataOffset != other.fDataOffset) {
-            return false;
-        }
-        if (fDestinationPort != other.fDestinationPort) {
-            return false;
-        }
-        if (fECEFlag != other.fECEFlag) {
-            return false;
-        }
-        if (fFINFlag != other.fFINFlag) {
-            return false;
-        }
-        if (fNSFlag != other.fNSFlag) {
-            return false;
-        }
-        if (!Arrays.equals(fOptions, other.fOptions)) {
-            return false;
-        }
-        if (fPSHFlag != other.fPSHFlag) {
-            return false;
-        }
-        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)){
-            return false;
-        }
-        if (fRSTFlag != other.fRSTFlag) {
-            return false;
-        }
-        if (fReservedField != other.fReservedField) {
-            return false;
-        }
-        if (fSYNFlag != other.fSYNFlag) {
-            return false;
-        }
-        if (fSequenceNumber != other.fSequenceNumber) {
-            return false;
-        }
-        if (fSourcePort != other.fSourcePort) {
-            return false;
-        }
-        if (fURGFlag != other.fURGFlag) {
-            return false;
-        }
-        if (fUrgentPointer != other.fUrgentPointer) {
-            return false;
-        }
-        if (fWindowSize != other.fWindowSize) {
-            return false;
-        }
-        return true;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPValues.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPValues.java
deleted file mode 100644 (file)
index b838c2d..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;
-
-/**
- * Interface that lists constants related to TCP.
- *
- * See http://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure.
- *
- * @author Vincent Perot
- */
-public interface TCPValues {
-
-    /** Size in bytes of a default TCP packet header */
-    int DEFAULT_HEADER_LENGTH = 5;
-
-    /** Size in bytes of a block of data. Used to convert data block to bytes. */
-    int BLOCK_SIZE = 4;
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/package-info.java
deleted file mode 100644 (file)
index 4d0363f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPEndpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPEndpoint.java
deleted file mode 100644 (file)
index 7367e8a..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.udp;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-
-/**
- * Class that extends the ProtocolEndpoint class. It represents the endpoint at
- * an UDP level.
- *
- * @author Vincent Perot
- */
-public class UDPEndpoint extends ProtocolEndpoint {
-
-    private final int fPort;
-
-    /**
-     * Constructor of the {@link UDPEndpoint} class. It takes a packet to get
-     * its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public UDPEndpoint(UDPPacket packet, boolean isSourceEndpoint) {
-        super(packet, isSourceEndpoint);
-        fPort = isSourceEndpoint ? packet.getSourcePort() : packet.getDestinationPort();
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            result = 0;
-        } else {
-            result = endpoint.hashCode();
-        }
-        result = prime * result + fPort;
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (!(obj instanceof UDPEndpoint)) {
-            return false;
-        }
-
-        UDPEndpoint other = (UDPEndpoint) obj;
-
-        // Check on layer
-        boolean localEquals = (fPort == other.fPort);
-        if (!localEquals) {
-            return false;
-        }
-
-        // Check above layers.
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint != null) {
-            return endpoint.equals(other.getParentEndpoint());
-        }
-        return true;
-    }
-
-    @Override
-    public String toString() {
-        ProtocolEndpoint endpoint = getParentEndpoint();
-        if (endpoint == null) {
-            return checkNotNull(String.valueOf(fPort));
-        }
-        return endpoint.toString() + '/' + fPort;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPPacket.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPPacket.java
deleted file mode 100644 (file)
index 1abbf0a..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.udp;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-
-import com.google.common.collect.ImmutableMap;
-
-/**
- * Class that represents a UDP packet.
- *
- * @author Vincent Perot
- */
-public class UDPPacket extends Packet {
-
-    private final @Nullable Packet fChildPacket;
-    private final @Nullable ByteBuffer fPayload;
-
-    private final int fSourcePort;
-    private final int fDestinationPort;
-    private final int fTotalLength;
-    private final int fChecksum;
-
-    private @Nullable UDPEndpoint fSourceEndpoint;
-    private @Nullable UDPEndpoint fDestinationEndpoint;
-
-    private @Nullable Map<String, String> fFields;
-
-    /**
-     * Constructor of the UDP Packet class.
-     *
-     * @param file
-     *            The file that contains this packet.
-     * @param parent
-     *            The parent packet of this packet (the encapsulating packet).
-     * @param packet
-     *            The entire packet (header and payload).
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    public UDPPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
-        super(file, parent, PcapProtocol.UDP);
-
-        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
-        // methods.
-        fSourceEndpoint = null;
-        fDestinationEndpoint = null;
-
-        fFields = null;
-
-        packet.order(ByteOrder.BIG_ENDIAN);
-        packet.position(0);
-
-        fSourcePort = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fDestinationPort = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fTotalLength = ConversionHelper.unsignedShortToInt(packet.getShort());
-        fChecksum = ConversionHelper.unsignedShortToInt(packet.getShort());
-
-        if (packet.array().length - packet.position() > 0) {
-            byte[] array = new byte[packet.array().length - packet.position()];
-            packet.get(array);
-
-            ByteBuffer payload = ByteBuffer.wrap(array);
-            payload.order(ByteOrder.BIG_ENDIAN);
-            payload.position(0);
-            fPayload = payload;
-        } else {
-            fPayload = null;
-        }
-
-        // Find child
-        fChildPacket = findChildPacket();
-
-    }
-
-    @Override
-    public @Nullable Packet getChildPacket() {
-        return fChildPacket;
-    }
-
-    @Override
-    public @Nullable ByteBuffer getPayload() {
-        return fPayload;
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * See http://www.iana.org/assignments/service-names-port-numbers/service-
-     * names-port-numbers.xhtml or
-     * http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
-     */
-    @Override
-    protected @Nullable Packet findChildPacket() throws BadPacketException {
-        // TODO implement further protocols and update this
-        ByteBuffer payload = fPayload;
-        if (payload == null) {
-            return null;
-        }
-
-        return new UnknownPacket(getPcapFile(), this, payload);
-    }
-
-    @Override
-    public String toString() {
-        String string = getProtocol().getName() + ", Source Port: " + fSourcePort + ", Destination Port: " + fDestinationPort + //$NON-NLS-1$ //$NON-NLS-2$
-                ", Length: " + fTotalLength + ", Checksum: " + fChecksum + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-        final Packet child = fChildPacket;
-        if (child != null) {
-            return string + child.toString();
-        }
-        return string;
-    }
-
-    /**
-     * Getter method that returns the UDP Source Port.
-     *
-     * @return The source Port.
-     */
-    public int getSourcePort() {
-        return fSourcePort;
-    }
-
-    /**
-     * Getter method that returns the UDP Destination Port.
-     *
-     * @return The destination Port.
-     */
-    public int getDestinationPort() {
-        return fDestinationPort;
-    }
-
-    /**
-     * Getter method that returns the total length of the packet in bytes. The
-     * values it can take go from 8 to 65,515.
-     *
-     * @return The total length of the packet in bytes.
-     */
-    public int getTotalLength() {
-        return fTotalLength;
-    }
-
-    /**
-     * Getter method that returns the checksum (on header and payload). If the
-     * transmitter does not use this field, it is set to zero. This checksum
-     * might be wrong if the packet is erroneous.
-     *
-     * @return The checksum received from the packet.
-     */
-    public int getChecksum() {
-        return fChecksum;
-    }
-
-    @Override
-    public boolean validate() {
-        // Not yet implemented. ATM, we consider that all packets are valid.
-        // This is the case for all packets.
-        // TODO Implement it.
-        return true;
-    }
-
-    @Override
-    public UDPEndpoint getSourceEndpoint() {
-        @Nullable
-        UDPEndpoint endpoint = fSourceEndpoint;
-        if (endpoint == null) {
-            endpoint = new UDPEndpoint(this, true);
-        }
-        fSourceEndpoint = endpoint;
-        return fSourceEndpoint;
-    }
-
-    @Override
-    public UDPEndpoint getDestinationEndpoint() {
-        @Nullable UDPEndpoint endpoint = fDestinationEndpoint;
-        if (endpoint == null) {
-            endpoint = new UDPEndpoint(this, false);
-        }
-        fDestinationEndpoint = endpoint;
-        return fDestinationEndpoint;
-    }
-
-    @Override
-    public Map<String, String> getFields() {
-        Map<String, String> map = fFields;
-        if (map == null) {
-            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder()
-                    .put("Source Port", String.valueOf(fSourcePort)) //$NON-NLS-1$
-                    .put("Destination Port", String.valueOf(fDestinationPort)) //$NON-NLS-1$
-                    .put("Length", String.valueOf(fTotalLength) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
-                    .put("Checksum", String.format("%s%04x", "0x", fChecksum)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
-            fFields = NonNullUtils.checkNotNull(builder.build());
-            return fFields;
-        }
-        return map;
-    }
-
-    @Override
-    public String getLocalSummaryString() {
-        return "Src Port: " + fSourcePort + ", Dst Port: " + fDestinationPort; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    protected String getSignificationString() {
-        return "Source Port: " + fSourcePort + ", Destination Port: " + fDestinationPort; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = 1;
-        result = prime * result + fChecksum;
-        final Packet child = fChildPacket;
-        if (child != null) {
-            result = prime * result + child.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + fDestinationPort;
-        final ByteBuffer payload = fPayload;
-        if (payload != null) {
-            result = prime * result + payload.hashCode();
-        } else {
-            result = prime * result;
-        }
-        result = prime * result + fSourcePort;
-        result = prime * result + fTotalLength;
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        UDPPacket other = (UDPPacket) obj;
-        if (fChecksum != other.fChecksum) {
-            return false;
-        }
-        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)){
-            return false;
-        }
-        if (fDestinationPort != other.fDestinationPort) {
-            return false;
-        }
-        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)){
-            return false;
-        }
-        if (fSourcePort != other.fSourcePort) {
-            return false;
-        }
-        if (fTotalLength != other.fTotalLength) {
-            return false;
-        }
-        return true;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/package-info.java
deleted file mode 100644 (file)
index f292a2a..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol.udp;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownEndpoint.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownEndpoint.java
deleted file mode 100644 (file)
index b1a8de1..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.unknown;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-
-/**
- * Class that extends the {@link ProtocolEndpoint} class. It represents the
- * endpoint for a protocol that is unknown.
- *
- * @author Vincent Perot
- */
-public class UnknownEndpoint extends ProtocolEndpoint {
-
-    /**
-     * Constructor of the {@link UnknownEndpoint} class. It takes a packet to
-     * get its endpoint. Since every packet has two endpoints (source and
-     * destination), the isSourceEndpoint parameter is used to specify which
-     * endpoint to take.
-     *
-     * @param packet
-     *            The packet that contains the endpoints.
-     * @param isSourceEndpoint
-     *            Whether to take the source or the destination endpoint of the
-     *            packet.
-     */
-    public UnknownEndpoint(UnknownPacket packet, boolean isSourceEndpoint) {
-        super(packet, isSourceEndpoint);
-    }
-
-    @Override
-    public int hashCode() {
-        return 0;
-    }
-
-    @Override
-    public String toString() {
-        return EMPTY_STRING;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownPacket.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownPacket.java
deleted file mode 100644 (file)
index 54a7c1c..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.protocol.unknown;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.io.UnsupportedEncodingException;
-import java.nio.ByteBuffer;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-
-import com.google.common.collect.ImmutableMap;
-import com.google.common.collect.ImmutableMap.Builder;
-
-/**
- * Class that represents an Unknown packet. It is possible to get such a packet
- * if the protocol has not been implemented in this library or if the parent
- * packet was invalid (in certain cases only). The header of such a packet is
- * inexistent.
- *
- * @author Vincent Perot
- */
-public class UnknownPacket extends Packet {
-
-    private final @Nullable Packet fChildPacket;
-    private final ByteBuffer fPayload;
-
-    private @Nullable UnknownEndpoint fSourceEndpoint;
-    private @Nullable UnknownEndpoint fDestinationEndpoint;
-
-    private @Nullable Map<String, String> fFields;
-
-    /**
-     * Constructor of an Unknown Packet object.
-     *
-     * @param file
-     *            The file to which this packet belongs.
-     * @param parent
-     *            The parent packet of this packet.
-     * @param packet
-     *            The entire packet (header and payload).
-     */
-    public UnknownPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) {
-        super(file, parent, PcapProtocol.UNKNOWN);
-
-        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
-        // methods.
-        fSourceEndpoint = null;
-        fDestinationEndpoint = null;
-
-        fFields = null;
-
-        // Header is not used. All data go into payload.
-        fPayload = packet;
-
-        fChildPacket = findChildPacket();
-    }
-
-    @Override
-    public @Nullable Packet getChildPacket() {
-        return fChildPacket;
-    }
-
-    @Override
-    public @Nullable ByteBuffer getPayload() {
-        return fPayload;
-    }
-
-    @Override
-    protected @Nullable Packet findChildPacket() {
-        return null;
-    }
-
-    @Override
-    public String toString() {
-        byte[] array = checkNotNull(fPayload.array());
-        String string = "Payload: " + ConversionHelper.bytesToHex(array, true); //$NON-NLS-1$
-        final Packet child = fChildPacket;
-        if (child != null) {
-            return string + child.toString();
-        }
-        return string;
-    }
-
-    @Override
-    public boolean validate() {
-        // Not yet implemented. ATM, we consider that all packets are valid.
-        // This is the case for all packets.
-        // TODO Implement it.
-        return true;
-    }
-
-    @Override
-    public UnknownEndpoint getSourceEndpoint() {
-        @Nullable
-        UnknownEndpoint endpoint = fSourceEndpoint;
-        if (endpoint == null) {
-            endpoint = new UnknownEndpoint(this, true);
-        }
-        fSourceEndpoint = endpoint;
-        return fSourceEndpoint;
-    }
-
-    @Override
-    public UnknownEndpoint getDestinationEndpoint() {
-        @Nullable
-        UnknownEndpoint endpoint = fDestinationEndpoint;
-        if (endpoint == null) {
-            endpoint = new UnknownEndpoint(this, false);
-        }
-        fDestinationEndpoint = endpoint;
-        return fDestinationEndpoint;
-    }
-
-    @Override
-    public Map<String, String> getFields() {
-        Map<String, String> map = fFields;
-        if (map == null) {
-            byte[] array = checkNotNull(fPayload.array());
-
-            Builder<String, String> builder = ImmutableMap.<String, String> builder()
-                    .put("Binary", ConversionHelper.bytesToHex(array, true)); //$NON-NLS-1$
-            try {
-                String s = new String(array, "UTF-8"); //$NON-NLS-1$
-                builder.put("Character", s); //$NON-NLS-1$
-            } catch (UnsupportedEncodingException e) {
-                // Do nothing. The string won't be added to the map anyway.
-            }
-            fFields = checkNotNull(builder.build());
-            return fFields;
-        }
-        return map;
-    }
-
-    @Override
-    public String getLocalSummaryString() {
-        return "Len: " + fPayload.array().length + " bytes"; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    protected String getSignificationString() {
-        return "Data: " + fPayload.array().length + " bytes"; //$NON-NLS-1$ //$NON-NLS-2$
-    }
-
-    @Override
-    public Packet getMostEcapsulatedPacket() {
-        Packet packet = this.getParentPacket();
-        if (packet == null) {
-            return this;
-        }
-        return packet;
-    }
-
-    @Override
-    public int hashCode() {
-        final int prime = 31;
-        int result = prime;
-        final Packet child = fChildPacket;
-        if (child != null) {
-            result += child.hashCode();
-        }
-        result = prime * result + fPayload.hashCode();
-        return result;
-    }
-
-    @Override
-    public boolean equals(@Nullable Object obj) {
-        if (this == obj) {
-            return true;
-        }
-        if (obj == null) {
-            return false;
-        }
-        if (getClass() != obj.getClass()) {
-            return false;
-        }
-        UnknownPacket other = (UnknownPacket) obj;
-        if (!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)) {
-            return false;
-        }
-        if (!fPayload.equals(other.fPayload)) {
-            return false;
-        }
-        return true;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/package-info.java
deleted file mode 100644 (file)
index 124c3a2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.protocol.unknown;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStream.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStream.java
deleted file mode 100644 (file)
index ddb835a..0000000
+++ /dev/null
@@ -1,268 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.stream;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpointPair;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-
-import com.google.common.math.DoubleMath;
-
-// TODO decide if default modifier a good idea. This allows only the
-// stream builder to call that method (and any class that is added to this
-// package). This effectively makes the stream read-only.
-
-/**
- * Class that represents a packet stream, which is a collection of packets that
- * share the same endpoints. The endpoints of a packet are protocol-dependent.
- * For example, a TCP stream is a collection of packets that share the same MAC
- * address, IP address, and Port couple.
- *
- * @author Vincent Perot
- */
-public class PacketStream {
-
-    private static final double SECOND_TO_NANOSECOND = 1000000000.0;
-    private static final double DELTA = 0.000000001;
-    private final PcapProtocol fProtocol;
-    private final int fId;
-    private final ProtocolEndpointPair fEndpointPair;
-
-    private long fNbPacketsAtoB;
-    private long fNbPacketsBtoA;
-    private long fNbBytesAtoB;
-    private long fNbBytesBtoA;
-    private long fStartTime;
-    private long fEndTime;
-
-    /**
-     * Constructor of a packet stream.
-     *
-     * @param protocol
-     *            The protocol of the packets of the stream. This is needed
-     *            because the definition of a stream is protocol-dependent.
-     * @param id
-     *            The id of this stream.
-     * @param endpointPair
-     *            The common endpoints of the packets in this stream.
-     */
-    PacketStream(PcapProtocol protocol, int id, ProtocolEndpointPair endpointPair) {
-        fProtocol = protocol;
-        fId = id;
-        fEndpointPair = endpointPair;
-        fNbPacketsAtoB = 0;
-        fNbPacketsBtoA = 0;
-        fNbBytesAtoB = 0;
-        fNbBytesBtoA = 0;
-        fStartTime = Long.MAX_VALUE;
-        fEndTime = Long.MIN_VALUE;
-    }
-
-    /**
-     * Add a packet to the stream.
-     *
-     * @param packet
-     *            The packet that must be added.
-     */
-    synchronized void add(PcapPacket packet) {
-
-        Packet newPacket = packet.getPacket(fProtocol);
-        if (newPacket == null) {
-            return;
-        }
-
-        // Update packet and byte number
-        if (fEndpointPair.getFirstEndpoint().equals(newPacket.getSourceEndpoint()) &&
-                fEndpointPair.getSecondEndpoint().equals(newPacket.getDestinationEndpoint())) {
-            fNbPacketsAtoB++;
-            fNbBytesAtoB += packet.getOriginalLength();
-        } else if (fEndpointPair.getFirstEndpoint().equals(newPacket.getDestinationEndpoint()) &&
-                fEndpointPair.getSecondEndpoint().equals(newPacket.getSourceEndpoint())) {
-            fNbPacketsBtoA++;
-            fNbBytesBtoA += packet.getOriginalLength();
-        } else {
-            throw new IllegalStateException();
-        }
-
-        // Update start and stop time
-        // Stream timestamp is ALWAYS in nanoseconds.
-        long timestamp;
-        switch (packet.getTimestampScale()) {
-        case MICROSECOND:
-            timestamp = packet.getTimestamp() * 1000;
-            break;
-        case NANOSECOND:
-            timestamp = packet.getTimestamp();
-            break;
-        default:
-            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
-        }
-        fStartTime = Math.min(fStartTime, timestamp);
-        fEndTime = Math.max(fEndTime, timestamp);
-    }
-
-    /**
-     * Get the Protocol of this stream.
-     *
-     * @return The protocol of this stream.
-     */
-    public PcapProtocol getProtocol() {
-        return fProtocol;
-    }
-
-    /**
-     * Method that returns the non-unique ID of this stream.
-     *
-     * @return the non-unique ID of this stream.
-     */
-    public int getID() {
-        return fId;
-    }
-
-    /**
-     * Method that returns the unique ID of this stream.
-     *
-     * @return the unique ID of this stream.
-     */
-    public String getUniqueID() {
-        return fProtocol.getShortName() + '.' + fId;
-    }
-
-    /**
-     * Method that returns the endpoint pair of the stream.
-     *
-     * @return The endpoint pair of the stream.
-     */
-    public ProtocolEndpointPair getEndpointPair() {
-        return fEndpointPair;
-    }
-
-    // TODO return also the endpoint set.
-    @Override
-    public synchronized String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("Stream " + getUniqueID() + ", Number of Packets: " + getNbPackets() + "\n"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
-
-        return checkNotNull(sb.toString());
-
-    }
-
-    /**
-     * 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 fNbPacketsAtoB;
-    }
-
-    /**
-     * 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 fNbPacketsBtoA;
-    }
-
-    /**
-     * Get the total number of packets in this stream.
-     *
-     * @return The total number of packets.
-     */
-    public synchronized long getNbPackets() {
-        return fNbPacketsAtoB + fNbPacketsBtoA;
-    }
-
-    /**
-     * 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 fNbBytesAtoB;
-    }
-
-    /**
-     * 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 fNbBytesBtoA;
-    }
-
-    /**
-     * Get the total number of bytes in this stream.
-     *
-     * @return The total number of bytes.
-     */
-    public synchronized long getNbBytes() {
-        return fNbBytesAtoB + fNbBytesBtoA;
-    }
-
-    /**
-     * Get the start time of this stream, in nanoseconds relative to epoch.
-     *
-     * @return The start time.
-     */
-    public synchronized long getStartTime() {
-        return fStartTime;
-    }
-
-    /**
-     * Get the stop time of this stream, in nanoseconds relative to epoch.
-     *
-     * @return The stop time.
-     */
-    public synchronized long getStopTime() {
-        return fEndTime;
-    }
-
-    /**
-     * Get the duration of this stream, in seconds
-     *
-     * @return The duration of this stream.
-     */
-    public synchronized double getDuration() {
-        return (fEndTime - fStartTime) / SECOND_TO_NANOSECOND;
-    }
-
-    /**
-     * 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() {
-        if (DoubleMath.fuzzyEquals(getDuration(), 0, DELTA)) {
-            return 0;
-        }
-        return fNbBytesAtoB / getDuration();
-    }
-
-    /**
-     * 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() {
-        if (DoubleMath.fuzzyEquals(getDuration(), 0, DELTA)) {
-            return 0;
-        }
-        return fNbBytesBtoA / getDuration();
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStreamBuilder.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStreamBuilder.java
deleted file mode 100644 (file)
index 60f2a79..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.stream;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
-import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpointPair;
-import org.eclipse.tracecompass.internal.pcap.core.filter.IPacketFilter;
-import org.eclipse.tracecompass.internal.pcap.core.filter.PacketFilterByProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-
-/**
- * Class that parse an entire pcap file to build the different streams.
- *
- * @author Vincent Perot
- */
-public class PacketStreamBuilder {
-
-    private final IPacketFilter fPacketFilter;
-    private final PcapProtocol fProtocol;
-
-    private final Map<Integer, PacketStream> fStreams;
-    private final Map<ProtocolEndpointPair, Integer> fIDs;
-    private int fCurrentId;
-
-    /**
-     * Main constructor.
-     *
-     * @param protocol
-     *            The protocol of the builder.
-     */
-    public PacketStreamBuilder(PcapProtocol protocol) {
-        fCurrentId = 0;
-        fProtocol = protocol;
-        fPacketFilter = new PacketFilterByProtocol(protocol);
-        fStreams = new HashMap<>();
-        fIDs = new HashMap<>();
-    }
-
-    /**
-     * Method that returns a particular stream based on its ID.
-     *
-     * @param id
-     *            The ID of the stream.
-     * @return The stream that has the specified ID.
-     */
-    public synchronized @Nullable PacketStream getStream(int id) {
-        return fStreams.get(id);
-    }
-
-    /**
-     * Method that returns a particular stream based on its endpoints. It
-     * returns null if no corresponding stream is found.
-     *
-     * @param endpointA
-     *            The first endpoint of the stream.
-     * @param endpointB
-     *            The second endpoint of the stream.
-     *
-     * @return The stream that has the specified endpoints. Return Null if no
-     *         stream is found between the two endpoints.
-     */
-    public synchronized @Nullable PacketStream getStream(ProtocolEndpoint endpointA, ProtocolEndpoint endpointB) {
-        ProtocolEndpointPair set = new ProtocolEndpointPair(endpointA, endpointB);
-        int id = fIDs.get(set);
-        return fStreams.get(id);
-    }
-
-    /**
-     * Method that returns all the streams at the specified protocol level.
-     *
-     * @return The streams as a list.
-     */
-    public synchronized Iterable<PacketStream> getStreams() {
-        Iterable<PacketStream> iterable = new LinkedList<>(fStreams.values());
-        return iterable;
-    }
-
-    /**
-     * Method that is called when the filter accepts a packet. This methods add
-     * the packet to a stream based on its characteristics.
-     *
-     * @param packet
-     *            The packet to be added.
-     */
-    public synchronized void addPacketToStream(PcapPacket packet) {
-        if (fPacketFilter.accepts(packet)) {
-            @Nullable Packet newPacket = packet.getPacket(fProtocol);
-            if (newPacket == null) {
-                return;
-            }
-            ProtocolEndpointPair endpointSet = new ProtocolEndpointPair(newPacket);
-            if (!fIDs.containsKey(endpointSet)) {
-                fIDs.put(endpointSet, fCurrentId);
-                fStreams.put(fCurrentId, new PacketStream(fProtocol, fCurrentId, endpointSet));
-                fStreams.get(fCurrentId).add(packet);
-                fCurrentId++;
-            } else {
-                Integer id = fIDs.get(endpointSet);
-                fStreams.get(id).add(packet);
-            }
-        }
-        return;
-    }
-
-    /**
-     * Getter method for the protocol of the stream builder.
-     *
-     * @return The protocol.
-     */
-    public PcapProtocol getProtocol() {
-        return fProtocol;
-    }
-
-    /**
-     * Method that clears the builder.
-     */
-    public void clear() {
-        fStreams.clear();
-        fIDs.clear();
-        fCurrentId = 0;
-    }
-
-    /**
-     * Method that returns the number of streams built.
-     *
-     * @return The number of streams built.
-     */
-    public synchronized int getNbStreams() {
-        return fStreams.size();
-    }
-
-    /**
-     * Method that parse an entire file and build the streams contained in the
-     * file.
-     *
-     * @param filePath
-     *            The file path.
-     * @throws IOException
-     *             When an IO error occurs.
-     * @throws BadPcapFileException
-     *             When the PcapFile is not valid.
-     */
-    public synchronized void parsePcapFile(Path filePath) throws IOException, BadPcapFileException {
-        try (PcapFile pcapFile = new PcapFile(filePath);) {
-            while (pcapFile.hasNextPacket()) { // not eof
-                PcapPacket packet;
-                try {
-                    packet = pcapFile.parseNextPacket();
-                    if (packet == null) {
-                        return;
-                    }
-                    addPacketToStream(packet);
-                } catch (BadPacketException e) {
-                    // Ignore packet. Do nothing.
-                }
-            }
-        }
-
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/package-info.java
deleted file mode 100644 (file)
index 3135d26..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.stream;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/BadPcapFileException.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/BadPcapFileException.java
deleted file mode 100644 (file)
index 898f9a9..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.trace;
-
-/**
- * Exception that is thrown when the Pcap file is not valid.
- *
- * @author Vincent Perot
- */
-public class BadPcapFileException extends Exception {
-
-    private static final long serialVersionUID = 8228512814116052260L;
-
-    /**
-     * Default constructor with no message.
-     */
-    public BadPcapFileException() {
-        super();
-    }
-
-    /**
-     * Constructor with an attached message.
-     *
-     * @param message
-     *            The message attached to this exception
-     */
-    public BadPcapFileException(String message) {
-        super(message);
-    }
-
-    /**
-     * Re-throw an exception into this type.
-     *
-     * @param e
-     *            The previous Exception we caught
-     */
-    public BadPcapFileException(Exception e) {
-        super(e);
-    }
-
-    /**
-     * Constructor with an attached message and re-throw an exception into this
-     * type.
-     *
-     * @param message
-     *            The message attached to this exception
-     * @param exception
-     *            The previous Exception caught
-     */
-    public BadPcapFileException(String message, Throwable exception) {
-        super(message, exception);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFile.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFile.java
deleted file mode 100644 (file)
index 08bc61f..0000000
+++ /dev/null
@@ -1,395 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.trace;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.nio.channels.SeekableByteChannel;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.util.TreeMap;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
-import org.eclipse.tracecompass.internal.pcap.core.util.PcapTimestampScale;
-
-/**
- * Class that allows the interaction with a pcap file.
- *
- * @author Vincent Perot
- */
-public class PcapFile implements Closeable {
-
-    // TODO add pcapng support.
-    // TODO Make parsing faster by buffering the data.
-
-    private final Path fPcapFilePath;
-    private final ByteOrder fByteOrder;
-    private final SeekableByteChannel fFileChannel;
-    private final PcapTimestampScale fTimestampPrecision;
-
-    private final int fMajorVersion;
-    private final int fMinorVersion;
-    private final long fTimeAccuracy;
-    private final long fTimeZoneCorrection;
-    private final long fSnapshotLength;
-    private final long fDataLinkType;
-
-    private final TreeMap<Long, Long> fFileIndex;
-
-    private long fCurrentRank;
-    private long fTotalNumberPackets;
-
-    /**
-     * Constructor of the PcapFile Class.
-     *
-     * @param filePath
-     *            The path to the pcap file.
-     *
-     * @throws BadPcapFileException
-     *             Thrown if the Pcap File is not valid.
-     * @throws IOException
-     *             Thrown if there is an IO error while reading the file.
-     */
-    public PcapFile(Path filePath) throws BadPcapFileException, IOException {
-
-        fFileIndex = new TreeMap<>();
-        fCurrentRank = 0;
-        fTotalNumberPackets = -1;
-        fPcapFilePath = filePath;
-
-        // Check file validity
-        if (Files.notExists(fPcapFilePath) || !Files.isRegularFile(fPcapFilePath) ||
-                Files.size(fPcapFilePath) < PcapFileValues.GLOBAL_HEADER_SIZE) {
-            throw new BadPcapFileException("Bad Pcap File."); //$NON-NLS-1$
-        }
-
-        if (!Files.isReadable(fPcapFilePath)) {
-            throw new BadPcapFileException("File is not readable."); //$NON-NLS-1$
-        }
-
-        // File is not empty. Try to open.
-        fFileChannel = checkNotNull(Files.newByteChannel(fPcapFilePath));
-
-        // Parse the global header.
-        // Read the magic number (4 bytes) from the input stream
-        // and determine the mode (big endian or little endian)
-        ByteBuffer globalHeader = ByteBuffer.allocate(PcapFileValues.GLOBAL_HEADER_SIZE);
-        globalHeader.clear();
-        fFileChannel.read(globalHeader);
-        globalHeader.flip();
-        int magicNumber = globalHeader.getInt();
-
-        switch (magicNumber) {
-        case PcapFileValues.MAGIC_BIG_ENDIAN_MICRO: // file is big endian
-            fByteOrder = checkNotNull(ByteOrder.BIG_ENDIAN);
-            fTimestampPrecision = PcapTimestampScale.MICROSECOND;
-            break;
-        case PcapFileValues.MAGIC_LITTLE_ENDIAN_MICRO: // file is little endian
-            fByteOrder = checkNotNull(ByteOrder.LITTLE_ENDIAN);
-            fTimestampPrecision = PcapTimestampScale.MICROSECOND;
-            break;
-        case PcapFileValues.MAGIC_BIG_ENDIAN_NANO: // file is big endian
-            fByteOrder = checkNotNull(ByteOrder.BIG_ENDIAN);
-            fTimestampPrecision = PcapTimestampScale.NANOSECOND;
-            break;
-        case PcapFileValues.MAGIC_LITTLE_ENDIAN_NANO: // file is little endian
-            fByteOrder = checkNotNull(ByteOrder.LITTLE_ENDIAN);
-            fTimestampPrecision = PcapTimestampScale.NANOSECOND;
-            break;
-        default:
-            this.close();
-            throw new BadPcapFileException(String.format("%08x", magicNumber) + " is not a known magic number."); //$NON-NLS-1$ //$NON-NLS-2$
-        }
-
-        // Put the rest of the buffer in file endian.
-        globalHeader.order(fByteOrder);
-
-        // Initialization of global header fields.
-        fMajorVersion = ConversionHelper.unsignedShortToInt(globalHeader.getShort());
-        fMinorVersion = ConversionHelper.unsignedShortToInt(globalHeader.getShort());
-        fTimeAccuracy = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
-        fTimeZoneCorrection = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
-        fSnapshotLength = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
-        fDataLinkType = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
-
-        fFileIndex.put(fCurrentRank, fFileChannel.position());
-
-    }
-
-    /**
-     * Method that allows the parsing of a packet at the current position.
-     *
-     * @return The parsed Pcap Packet.
-     * @throws IOException
-     *             Thrown when there is an error while reading the file.
-     * @throws BadPcapFileException
-     *             Thrown when a packet header is invalid.
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    public synchronized @Nullable PcapPacket parseNextPacket() throws IOException, BadPcapFileException, BadPacketException {
-
-        // Parse the packet header
-        if (fFileChannel.size() - fFileChannel.position() == 0) {
-            return null;
-        }
-        if (fFileChannel.size() - fFileChannel.position() < PcapFileValues.PACKET_HEADER_SIZE) {
-            throw new BadPcapFileException("A pcap header is invalid."); //$NON-NLS-1$
-        }
-
-        ByteBuffer pcapPacketHeader = ByteBuffer.allocate(PcapFileValues.PACKET_HEADER_SIZE);
-        pcapPacketHeader.clear();
-        pcapPacketHeader.order(fByteOrder);
-
-        fFileChannel.read(pcapPacketHeader);
-
-        pcapPacketHeader.flip();
-        pcapPacketHeader.position(PcapFileValues.INCLUDED_LENGTH_POSITION);
-        long includedPacketLength = ConversionHelper.unsignedIntToLong(pcapPacketHeader.getInt());
-
-        if (fFileChannel.size() - fFileChannel.position() < includedPacketLength) {
-            throw new BadPcapFileException("A packet header is invalid."); //$NON-NLS-1$
-        }
-
-        if (includedPacketLength > Integer.MAX_VALUE) {
-            throw new BadPacketException("Packets that are bigger than 2^31-1 bytes are not supported."); //$NON-NLS-1$
-        }
-
-        ByteBuffer pcapPacketData = ByteBuffer.allocate((int) includedPacketLength);
-        pcapPacketData.clear();
-        pcapPacketHeader.order(ByteOrder.BIG_ENDIAN); // Not really needed.
-        fFileChannel.read(pcapPacketData);
-
-        pcapPacketData.flip();
-
-        fFileIndex.put(++fCurrentRank, fFileChannel.position());
-
-        return new PcapPacket(this, null, pcapPacketHeader, pcapPacketData, fCurrentRank - 1);
-
-    }
-
-    /**
-     * Method that allows to skip a packet at the current position.
-     *
-     * @throws IOException
-     *             Thrown when there is an error while reading the file.
-     * @throws BadPcapFileException
-     *             Thrown when a packet header is invalid.
-     */
-    public synchronized void skipNextPacket() throws IOException, BadPcapFileException {
-
-        // Parse the packet header
-        if (fFileChannel.size() - fFileChannel.position() == 0) {
-            return;
-        }
-        if (fFileChannel.size() - fFileChannel.position() < PcapFileValues.PACKET_HEADER_SIZE) {
-            throw new BadPcapFileException("A pcap header is invalid."); //$NON-NLS-1$
-        }
-
-        ByteBuffer pcapPacketHeader = ByteBuffer.allocate(PcapFileValues.PACKET_HEADER_SIZE);
-        pcapPacketHeader.clear();
-        pcapPacketHeader.order(fByteOrder);
-
-        fFileChannel.read(pcapPacketHeader);
-
-        pcapPacketHeader.flip();
-        pcapPacketHeader.position(PcapFileValues.INCLUDED_LENGTH_POSITION);
-        long includedPacketLength = ConversionHelper.unsignedIntToLong(pcapPacketHeader.getInt());
-
-        if (fFileChannel.size() - fFileChannel.position() < includedPacketLength) {
-            throw new BadPcapFileException("A packet header is invalid."); //$NON-NLS-1$
-        }
-
-        fFileChannel.position(fFileChannel.position() + includedPacketLength);
-
-        fFileIndex.put(++fCurrentRank, fFileChannel.position());
-
-    }
-
-    /**
-     * Method that moves the position to the specified rank.
-     *
-     * @param rank
-     *            The rank of the packet.
-     *
-     * @throws IOException
-     *             Thrown when there is an error while reading the file.
-     * @throws BadPcapFileException
-     *             Thrown when a packet header is invalid.
-     */
-    public synchronized void seekPacket(long rank) throws IOException, BadPcapFileException {
-
-        // Verify argument
-        if (rank < 0) {
-            throw new IllegalArgumentException();
-        }
-
-        Long positionInBytes = fFileIndex.get(rank);
-
-        if (positionInBytes != null) {
-            // Index is known. Move to position.
-            fFileChannel.position(positionInBytes.longValue());
-            fCurrentRank = rank;
-        } else {
-            // Index is unknown. Find the corresponding position.
-            // Find closest index
-            fCurrentRank = fFileIndex.floorKey(rank);
-            // skip until wanted packet is found
-            do {
-                skipNextPacket();
-            } while (fCurrentRank != rank && hasNextPacket());
-        }
-    }
-
-    /**
-     * Method that indicates if there are packets remaining to read. It is an
-     * end of file indicator.
-     *
-     * @return Whether the pcap still has packets or not.
-     * @throws IOException
-     *             If some IO error occurs.
-     */
-    public synchronized boolean hasNextPacket() throws IOException {
-        return ((fFileChannel.size() - fFileChannel.position()) > 0);
-    }
-
-    /**
-     * Getter method for the Byte Order of the file.
-     *
-     * @return The byte Order of the file.
-     */
-    public ByteOrder getByteOrder() {
-        return fByteOrder;
-    }
-
-    /**
-     * Getter method for the Major Version of the file.
-     *
-     * @return The Major Version of the file.
-     */
-    public int getMajorVersion() {
-        return fMajorVersion;
-    }
-
-    /**
-     * Getter method for the Minor Version of the file.
-     *
-     * @return The Minor Version of the file.
-     */
-    public int getMinorVersion() {
-        return fMinorVersion;
-    }
-
-    /**
-     * Getter method for the time accuracy of the file.
-     *
-     * @return The time accuracy of the file.
-     */
-    public long getTimeAccuracy() {
-        return fTimeAccuracy;
-    }
-
-    /**
-     * Getter method for the time zone correction of the file.
-     *
-     * @return The time zone correction of the file.
-     */
-    public long getTimeZoneCorrection() {
-        return fTimeZoneCorrection;
-    }
-
-    /**
-     * Getter method for the snapshot length of the file.
-     *
-     * @return The snapshot length of the file.
-     */
-    public long getSnapLength() {
-        return fSnapshotLength;
-    }
-
-    /**
-     * Getter method for the datalink type of the file. This parameter is used
-     * to determine higher-level protocols (Ethernet, WLAN, SLL).
-     *
-     * @return The datalink type of the file.
-     */
-    public long getDataLinkType() {
-        return fDataLinkType;
-    }
-
-    /**
-     * Getter method for the path of the file.
-     *
-     * @return The path of the file.
-     */
-    public Path getPath() {
-        return fPcapFilePath;
-    }
-
-    /**
-     * Method that returns the total number of packets in the file.
-     *
-     * @return The total number of packets.
-     * @throws IOException
-     *             Thrown when some IO error occurs.
-     * @throws BadPcapFileException
-     *             Thrown when a packet header is invalid.
-     */
-    public synchronized long getTotalNbPackets() throws IOException, BadPcapFileException {
-        if (fTotalNumberPackets == -1) {
-            long rank = fCurrentRank;
-            fCurrentRank = fFileIndex.floorKey(rank);
-
-            // skip until end of file.
-            while (hasNextPacket()) {
-                skipNextPacket();
-            }
-            fTotalNumberPackets = fCurrentRank;
-            fCurrentRank = rank;
-            seekPacket(rank);
-        }
-        return fTotalNumberPackets;
-    }
-
-    /**
-     * Getter method that returns the current rank in the file (the packet
-     * number).
-     *
-     * @return The current rank.
-     */
-    public synchronized long getCurrentRank() {
-        return fCurrentRank;
-    }
-
-    /**
-     * Getter method that returns the timestamp precision of the file.
-     *
-     * @return The the timestamp precision of the file.
-     */
-    public PcapTimestampScale getTimestampPrecision() {
-        return fTimestampPrecision;
-    }
-
-    @Override
-    public void close() throws IOException {
-        fFileChannel.close();
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFileValues.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFileValues.java
deleted file mode 100644 (file)
index 485f7c3..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.trace;
-
-/**
- * Interface that lists constants related to a Pcap File.
- *
- * See http://wiki.wireshark.org/Development/LibpcapFileFormat.
- *
- * @author Vincent Perot
- */
-public interface PcapFileValues {
-
-    /** Number used to determine the endianness and precision of the file */
-    int MAGIC_BIG_ENDIAN_MICRO = 0xa1b2c3d4;
-
-    /** Number used to determine the endianness and precision of the file */
-    int MAGIC_LITTLE_ENDIAN_MICRO = 0xd4c3b2a1;
-
-    /** Number used to determine the endianness and precision of the file */
-    int MAGIC_BIG_ENDIAN_NANO = 0xa1b23c4d;
-
-    /** Number used to determine the endianness and precision of the file */
-    int MAGIC_LITTLE_ENDIAN_NANO = 0x4d3cb2a1;
-
-    /** Size in bytes of a Pcap file global header */
-    int GLOBAL_HEADER_SIZE = 24;
-
-    /** Size in bytes of a Pcap packet header */
-    int PACKET_HEADER_SIZE = 16;
-
-    /** Position in bytes in the packet header of the packet's length */
-    int INCLUDED_LENGTH_POSITION = 8;
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/package-info.java
deleted file mode 100644 (file)
index 4ae5aa2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.trace;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/ConversionHelper.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/ConversionHelper.java
deleted file mode 100644 (file)
index 500f2b2..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.util;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIValues;
-
-/**
- * Class for helping with the conversion of data.
- *
- * @author Vincent Perot
- */
-public final class ConversionHelper {
-
-    private static final char[] HEX_ARRAY = checkNotNull("0123456789abcdef".toCharArray()); //$NON-NLS-1$
-    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-    private static final String DEFAULT_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$
-    private static final DateFormat DATE_FORMATTER = new SimpleDateFormat(DEFAULT_TIME_PATTERN);
-
-    private ConversionHelper() {
-    }
-
-    /**
-     * Generate an integer from an unsigned byte.
-     *
-     * @param n
-     *            the unsigned byte.
-     * @return the integer representing the unsigned value.
-     */
-    public static int unsignedByteToInt(byte n) {
-        return n & 0x000000FF;
-    }
-
-    /**
-     * Generate an integer from an unsigned short.
-     *
-     * @param n
-     *            the unsigned short.
-     * @return the integer representing the unsigned value.
-     */
-    public static int unsignedShortToInt(short n) {
-        return n & 0x0000FFFF;
-    }
-
-    /**
-     * Generate a long from an unsigned integer.
-     *
-     * @param n
-     *            the unsigned integer.
-     * @return the long representing the unsigned value.
-     */
-    public static long unsignedIntToLong(int n) {
-        return n & 0x00000000FFFFFFFFL;
-    }
-
-    /**
-     * Generate an hex number from a byte array.
-     *
-     * @param bytes
-     *            The array of bytes.
-     * @param spaced
-     *            Whether there must be a space between each byte or not.
-     * @return the hex as a string.
-     */
-    public static String bytesToHex(byte[] bytes, boolean spaced) {
-        // No need to check for character encoding since bytes represents a
-        // number.
-
-        if (bytes.length == 0) {
-            return EMPTY_STRING;
-        }
-
-        char[] hexChars = spaced ? new char[bytes.length * 3 - 1] : new char[bytes.length * 2];
-        int delta = spaced ? 3 : 2;
-        char separator = ' ';
-
-        for (int j = 0; j < bytes.length; j++) {
-
-            int v = bytes[j] & 0xFF;
-            hexChars[j * delta] = HEX_ARRAY[v >>> 4];
-            hexChars[j * delta + 1] = HEX_ARRAY[v & 0x0F];
-
-            if (spaced && (j != bytes.length - 1)) {
-                hexChars[j * delta + 2] = separator;
-            }
-        }
-        return new String(hexChars);
-    }
-
-    // TODO Add little endian support
-    /**
-     * Generate a string representing the MAC address.
-     *
-     * @param mac
-     *            The MAC address as a byte array.
-     * @return The string representing the MAC address.
-     */
-    public static String toMacAddress(byte[] mac) {
-
-        if (mac.length != EthernetIIValues.MAC_ADDRESS_SIZE) {
-            throw new IllegalArgumentException();
-        }
-        char separator = ':';
-        return String.format("%02x", mac[0]) + separator + //$NON-NLS-1$
-                String.format("%02x", mac[1]) + separator + //$NON-NLS-1$
-                String.format("%02x", mac[2]) + separator + //$NON-NLS-1$
-                String.format("%02x", mac[3]) + separator + //$NON-NLS-1$
-                String.format("%02x", mac[4]) + separator + //$NON-NLS-1$
-                String.format("%02x", mac[5]); //$NON-NLS-1$
-
-    }
-
-    // TODO support non GMT time.
-
-    /**
-     * Convert a timestamp into a date.
-     *
-     * @param ts
-     *            The timestamp. It represents the time since Epoch in
-     *            microseconds.
-     * @param scale
-     *            The scale of the timestamp.
-     * @return The date as a string.
-     */
-    public static String toGMTTime(long ts, PcapTimestampScale scale) {
-        long timestamp;
-        switch (scale) {
-        case MICROSECOND:
-            timestamp = ts * 1000;
-            break;
-        case NANOSECOND:
-            timestamp = ts;
-            break;
-        default:
-            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
-        }
-        return format(timestamp);
-    }
-
-    /**
-     * Format the timestamp to a string.
-     *
-     * @param value
-     *            the timestamp value to format (in ns)
-     * @return the formatted timestamp
-     */
-    private static String format(long value) {
-        // Split the timestamp value into its sub-components
-        long date = value / 1000000; // milliseconds since epoch
-        long cs = Math.abs((value % 1000000) / 1000); // microseconds
-        long ns = Math.abs(value % 1000); // nanoseconds
-
-        Date dateObject = new Date(date);
-
-        StringBuilder sb = new StringBuilder(DATE_FORMATTER.format(dateObject));
-        sb.append('.')
-                .append(String.format("%03d", cs)) //$NON-NLS-1$
-                .append('.')
-                .append(String.format("%03d", ns)); //$NON-NLS-1$
-
-        return NonNullUtils.nullToEmptyString(sb);
-
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/EthertypeHelper.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/EthertypeHelper.java
deleted file mode 100644 (file)
index 84b0aa1..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.util;
-
-// TODO finish this
-// TODO maybe match it to protocol instead of string.
-
-/**
- * Helper that is used to help mapping a certain ethertype to a particular
- * protocol (i.e. IPv4). This is used when finding the child packet of an
- * Ethernet packet, for instance.
- *
- * See http://en.wikipedia.org/wiki/EtherType
- *
- * @author Vincent Perot
- */
-public final class EthertypeHelper {
-
-    /** EtherType IPv4 */
-    public static final int ETHERTYPE_IPV4 = 0x0800;
-
-    /** EtherType ARP */
-    public static final int ETHERTYPE_ARP = 0x0806;
-
-    /** EtherType Wake-On-LAN */
-    public static final int ETHERTYPE_WAKE_ON_LAN = 0x0842;
-
-    /** EtherType TRILL */
-    public static final int ETHERTYPE_TRILL = 0x22F3;
-
-    /** EtherType DECnet Phase IV */
-    public static final int ETHERTYPE_DECNET_PHASE_IV = 0x6003;
-
-    private EthertypeHelper() {}
-
-    /**
-     * Method that matches the ethertype as a number, to a protocol as a string.
-     *
-     * @param ethertype
-     *            The Ethertype as an int.
-     * @return The protocol as a string.
-     */
-    public static String toString(int ethertype) {
-        switch (ethertype) {
-        case ETHERTYPE_IPV4:
-            return "Internet Protocol Version 4"; //$NON-NLS-1$
-        case ETHERTYPE_ARP:
-            return "Address Resolution Protocol"; //$NON-NLS-1$
-        case ETHERTYPE_WAKE_ON_LAN:
-            return "Wake-on-LAN"; //$NON-NLS-1$
-        case ETHERTYPE_TRILL:
-            return "IETF TRILL Protocol"; //$NON-NLS-1$
-        case ETHERTYPE_DECNET_PHASE_IV:
-            return "DECnet Phase IV"; //$NON-NLS-1$
-        default:
-            return "Unknown"; //$NON-NLS-1$
-        }
-    }
-
-    /**
-     * Convert an ethertype (int) into its string representation. This allows
-     * the mapping of ethertype to the real protocol name.
-     *
-     * @param type
-     *            The Ethertype to convert.
-     * @return The Ethertype as a string.
-     */
-    public static String toEtherType(int type) {
-        return toString(type) + " (0x" + String.format("%04x", type) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/IPProtocolNumberHelper.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/IPProtocolNumberHelper.java
deleted file mode 100644 (file)
index 41b2c5c..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.util;
-
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-
-// TODO finish this
-// TODO maybe match it to protocol instead of string.
-
-/**
- * Helper that is used to help mapping a certain protocol number to a particular
- * protocol (i.e. TCP). This is used when finding the child packet of an IPv4
- * packet, for instance.
- *
- * See http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
- *
- * @author Vincent Perot
- */
-public final class IPProtocolNumberHelper {
-
-    /** Protocol Number ICMP */
-    public static final int PROTOCOL_NUMBER_ICMP = 1;
-
-    /** Protocol Number IGMP */
-    public static final int PROTOCOL_NUMBER_IGMP = 2;
-
-    /** Protocol Number TCP */
-    public static final int PROTOCOL_NUMBER_TCP = 6;
-
-    /** Protocol Number UDP */
-    public static final int PROTOCOL_NUMBER_UDP = 17;
-
-    /** Protocol Number Encapsulated IPv6 */
-    public static final int PROTOCOL_NUMBER_ENCAP_IPV6 = 41;
-
-    /** Protocol Number OSPF */
-    public static final int PROTOCOL_NUMBER_OSPF = 89;
-
-    /** Protocol Number SCTP */
-    public static final int PROTOCOL_NUMBER_SCTP = 132;
-
-    private IPProtocolNumberHelper() {}
-
-    /**
-     * Method that match the protocol number to a protocol as a string.
-     *
-     * @param protocolNumber
-     *            The protocol number as an int.
-     * @return The protocol as a string.
-     */
-    public static String toString(int protocolNumber) {
-        switch (protocolNumber) {
-        case PROTOCOL_NUMBER_ICMP:
-            return "ICMP"; //$NON-NLS-1$
-        case PROTOCOL_NUMBER_IGMP:
-            return "IGMP"; //$NON-NLS-1$
-        case PROTOCOL_NUMBER_TCP:
-            return PcapProtocol.TCP.getName();
-        case PROTOCOL_NUMBER_UDP:
-            return PcapProtocol.UDP.getName();
-        case PROTOCOL_NUMBER_ENCAP_IPV6:
-            return "IPv6"; //$NON-NLS-1$
-        case PROTOCOL_NUMBER_OSPF:
-            return "OSPF"; //$NON-NLS-1$
-        case PROTOCOL_NUMBER_SCTP:
-            return "SCTP"; //$NON-NLS-1$
-        default:
-            return "Unknown"; //$NON-NLS-1$
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/LinkTypeHelper.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/LinkTypeHelper.java
deleted file mode 100644 (file)
index 24cffc9..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.util;
-
-// TODO finish this
-// TODO map to protocol instead of string? that would make more sense imo.
-
-/**
- * Helper that is used to help mapping a certain linktype to a particular
- * protocol (i.e. ethernet).
- *
- * See http://www.tcpdump.org/linktypes.html
- *
- * @author Vincent Perot
- */
-public final class LinkTypeHelper {
-
-    /** Linktype Null */
-    public static final int LINKTYPE_NULL = 0;
-
-    /** Linktype Ethernet II */
-    public static final int LINKTYPE_ETHERNET = 1;
-
-    /** Linktype AX25 */
-    public static final int LINKTYPE_AX25 = 3;
-
-    /** Linktype IEEE802.5 */
-    public static final int LINKTYPE_IEEE802_5 = 6;
-
-    /** Linktype Raw */
-    public static final int LINKTYPE_RAW = 101;
-
-    /** Linktype IEEE802.11 */
-    public static final int LINKTYPE_IEEE802_11 = 105;
-
-    /** Linktype Linux SLL */
-    public static final int LINKTYPE_LINUX_SLL = 113;
-
-    private LinkTypeHelper() {}
-
-    /**
-     * Method that match the linktype as an int to a protocol as a string.
-     *
-     * @param linkType
-     *            The linkType as an int.
-     * @return The protocol as a string.
-     */
-    public static String toString(int linkType) {
-        switch (linkType) {
-        case LINKTYPE_NULL:
-            return "null"; //$NON-NLS-1$
-        case LINKTYPE_ETHERNET:
-            return "ethernet"; //$NON-NLS-1$
-        case LINKTYPE_AX25:
-            return "ax25"; //$NON-NLS-1$
-        case LINKTYPE_IEEE802_5:
-            return "ieee802.5"; //$NON-NLS-1$
-        case LINKTYPE_RAW:
-            return "raw"; //$NON-NLS-1$
-        case LINKTYPE_IEEE802_11:
-            return "ieee802.11"; //$NON-NLS-1$
-        case LINKTYPE_LINUX_SLL:
-            return "linux_sll"; //$NON-NLS-1$
-        default:
-            return "unknown"; //$NON-NLS-1$
-        }
-    }
-
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/PcapTimestampScale.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/PcapTimestampScale.java
deleted file mode 100644 (file)
index 876140a..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.pcap.core.util;
-
-/**
- * Enum for the different time precision for pcap files.
- *
- * @author Vincent Perot
- */
-public enum PcapTimestampScale {
-
-    /** Microsecond Pcap */
-    MICROSECOND,
-    /** Nanosecond Pcap */
-    NANOSECOND
-}
diff --git a/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/package-info.java b/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/package-info.java
deleted file mode 100644 (file)
index d03b212..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.pcap.core.util;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.classpath b/org.eclipse.tracecompass.tmf.pcap.core.tests/.classpath
deleted file mode 100644 (file)
index 68143fe..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="src" path="shared"/>
-       <classpathentry kind="src" path="stubs"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.project b/org.eclipse.tracecompass.tmf.pcap.core.tests/.project
deleted file mode 100644 (file)
index 05ad442..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.tmf.pcap.core.tests</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 0409c61..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-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=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-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.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index 62cfa90..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.tmf.pcap.core.tests/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 8030628..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.core.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Require-Bundle: org.junit;bundle-version="4.0.0",
- org.eclipse.core.runtime,
- org.eclipse.core.resources,
- org.eclipse.tracecompass.pcap.core,
- org.eclipse.tracecompass.pcap.core.tests,
- org.eclipse.tracecompass.tmf.core,
- org.eclipse.tracecompass.tmf.core.tests,
- org.eclipse.tracecompass.tmf.pcap.core
-Import-Package: com.google.common.collect
-Export-Package: org.eclipse.tracecompass.tmf.pcap.core.tests,
- org.eclipse.tracecompass.tmf.pcap.core.tests.analysis;x-internal:=true,
- org.eclipse.tracecompass.tmf.pcap.core.tests.event;x-internal:=true,
- org.eclipse.tracecompass.tmf.pcap.core.tests.shared;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests",
- org.eclipse.tracecompass.tmf.pcap.core.tests.stubs;x-internal:=true,
- org.eclipse.tracecompass.tmf.pcap.core.tests.trace;x-internal:=true
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/about.html b/org.eclipse.tracecompass.tmf.pcap.core.tests/about.html
deleted file mode 100644 (file)
index 28737f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/build.properties b/org.eclipse.tracecompass.tmf.pcap.core.tests/build.properties
deleted file mode 100644 (file)
index 48bac50..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms 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/,\
-           shared/,\
-           stubs
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               plugin.properties,\
-               about.html
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/plugin.properties b/org.eclipse.tracecompass.tmf.pcap.core.tests/plugin.properties
deleted file mode 100644 (file)
index 2912f68..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Pcap support for TMF Core Tests Plug-in
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/pom.xml b/org.eclipse.tracecompass.tmf.pcap.core.tests/pom.xml
deleted file mode 100644 (file)
index 5d8d928..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2011, Red Hat, Inc.
-
-   All rights reserved. This program and the accompanying materials
-   are made available under the terms of the Eclipse Public License v1.0
-   which accompanies this distribution, and is available at
-   http://www.eclipse.org/legal/epl-v10.html
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.tmf.pcap.core.tests</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-test-plugin</packaging>
-
-  <name>Pcap Support for TMF Core Tests Plug-in</name>
-
- <build>
-    <plugins>
-        <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.8</version>
-            <executions>
-                <execution>
-                    <id>prepare</id>
-                    <phase>validate</phase>
-                    <configuration>
-                    <target>
-                        <echo message="prepare phase" />
-                    </target>
-                    </configuration>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                </execution>
-            </executions>
-        </plugin>
-        <plugin>
-            <groupId>org.eclipse.tycho</groupId>
-            <artifactId>tycho-surefire-plugin</artifactId>
-            <version>${tycho-version}</version>
-            <configuration>
-                <includes>
-                    <include>**/AllTests.*</include>
-                </includes>
-                <useUIHarness>false</useUIHarness>
-                <useUIThread>false</useUIThread>
-                <product>org.eclipse.platform.ide</product>
-            </configuration>
-        </plugin>
-    </plugins>
-  </build>
-
- <groupId>org.eclipse.tracecompass</groupId>
-</project>
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/shared/org/eclipse/tracecompass/tmf/pcap/core/tests/shared/PcapTmfTestTrace.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/shared/org/eclipse/tracecompass/tmf/pcap/core/tests/shared/PcapTmfTestTrace.java
deleted file mode 100644 (file)
index 4270092..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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.tracecompass.tmf.pcap.core.tests.shared;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.pcap.core.tests.stubs.PcapTmfTraceStub;
-
-/**
- * Available Pcap TMF test traces. Kind-of-extends {@link PcapTestTrace}.
- *
- * To run tests using these, you first need to run the "get-traces.[xml|sh]"
- * script located under org.eclipse.tracecompass.pcap.core.tests/rsc/ .
- *
- * @author Vincent Perot
- */
-@NonNullByDefault
-public enum PcapTmfTestTrace {
-    /** A bad pcap file. */
-    BAD_PCAPFILE,
-
-    /** A Valid Pcap that is empty. */
-    EMPTY_PCAP,
-
-    /** A Pcap that mostly contains TCP packets. */
-    MOSTLY_TCP,
-
-    /** A Pcap that mostly contains UDP packets. */
-    MOSTLY_UDP,
-
-    /** A big-endian trace that contains two packets. */
-    SHORT_BIG_ENDIAN,
-
-    /** A little-endian trace that contains two packets. */
-    SHORT_LITTLE_ENDIAN,
-
-    /** A trace used for benchmarking. */
-    BENCHMARK_TRACE,
-
-    /** A Kernel trace directory. */
-    KERNEL_DIRECTORY,
-
-    /** A Kernel trace file. */
-    KERNEL_TRACE;
-
-    private final String fPath;
-    private @Nullable PcapTmfTraceStub fTrace = null;
-
-    private PcapTmfTestTrace() {
-        @SuppressWarnings("null")
-        @NonNull String path = PcapTestTrace.valueOf(this.name()).getPath().toString();
-        fPath = path;
-    }
-
-    /**
-     * @return The path of this trace
-     */
-    public String getPath() {
-        return fPath;
-    }
-
-    /**
-     * Return a PcapTmfTraceStub object of this test trace. It will be already
-     * initTrace()'ed.
-     *
-     * Make sure you call {@link #exists()} before calling this!
-     *
-     * After being used by unit tests, traces must be properly disposed of by
-     * calling the {@link PcapTmfTestTrace#dispose()} method.
-     *
-     * @return A PcapTmfTrace reference to this trace
-     */
-    public synchronized PcapTrace getTrace() {
-        PcapTmfTraceStub trace = fTrace;
-        if (trace != null) {
-            trace.dispose();
-        }
-        trace = new PcapTmfTraceStub();
-        try {
-            trace.initTrace(null, fPath, PcapEvent.class);
-        } catch (TmfTraceException e) {
-            /* Should not happen if tracesExist() passed */
-            throw new RuntimeException(e);
-        }
-        fTrace = trace;
-        return trace;
-    }
-
-    /**
-     * Check if the trace actually exists on disk or not.
-     *
-     * @return If the trace is present
-     */
-    public boolean exists() {
-        return PcapTestTrace.valueOf(this.name()).exists();
-    }
-
-    /**
-     * Dispose of the trace
-     */
-    public void dispose() {
-        if (fTrace != null) {
-            fTrace.dispose();
-            fTrace = null;
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/AllTmfPcapCoreTests.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/AllTmfPcapCoreTests.java
deleted file mode 100644 (file)
index 9ba2ad4..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial generation with CodePro tools
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests;
-
-import org.eclipse.tracecompass.tmf.core.tests.shared.DebugSuite;
-import org.junit.runner.RunWith;
-
-/**
- * The class <code>AllTmfPcapCoreTests</code> builds a suite to run all the
- * tests.
- *
- * @author Vincent Perot
- */
-@RunWith(DebugSuite.class)
-@DebugSuite.SuiteClasses({
-        org.eclipse.tracecompass.tmf.pcap.core.tests.analysis.AllTests.class,
-        org.eclipse.tracecompass.tmf.pcap.core.tests.event.AllTests.class,
-        org.eclipse.tracecompass.tmf.pcap.core.tests.trace.AllTests.class
-})
-public class AllTmfPcapCoreTests {
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/AllTests.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/AllTests.java
deleted file mode 100644 (file)
index 1e53578..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.analysis;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Analysis test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        StreamListAnalysisTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/StreamListAnalysisTest.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/StreamListAnalysisTest.java
deleted file mode 100644 (file)
index 0bc479a..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.analysis;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.tracecompass.internal.tmf.pcap.core.analysis.StreamListAnalysis;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStreamBuilder;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.junit.Test;
-
-/**
- * JUnit that test the StreamListAnalysis class.
- *
- * @author Vincent Perot
- */
-public class StreamListAnalysisTest {
-
-    /**
-     * Method that tests the constructor.
-     */
-    @Test
-    public void constructorTest() {
-        StreamListAnalysis analysis = new StreamListAnalysis();
-        analysis.setId(StreamListAnalysis.ID);
-        for (TmfPcapProtocol protocol : TmfPcapProtocol.values()) {
-            if (protocol.supportsStream()) {
-                assertNotNull(analysis.getBuilder(protocol));
-            }
-        }
-        assertFalse(analysis.isFinished());
-
-        analysis.dispose();
-    }
-
-    /**
-     * Method that tests canExecute().
-     *
-     * @throws TmfTraceException
-     *             Thrown when the trace cannot be initialized. Fails the test.
-     */
-    @Test
-    public void canExecuteTest() throws TmfTraceException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        String path = trace.getPath().toString();
-        try (PcapTrace pcapTrace = new PcapTrace();) {
-            StreamListAnalysis analysis = new StreamListAnalysis();
-            analysis.setId(StreamListAnalysis.ID);
-            pcapTrace.initTrace(null, path, null);
-            assertTrue(analysis.canExecute(pcapTrace));
-
-            analysis.dispose();
-        }
-    }
-
-    /**
-     * Method that execute the analysis and verify the results.
-     *
-     * @throws TmfAnalysisException
-     *             Thrown when an analysis error occurs during the setup or
-     *             execution. Fails the test.
-     * @throws TmfTraceException
-     *             Thrown when the trace cannot be initialized. Fails the test.
-     */
-    @Test
-    public void executeAnalysisTest() throws TmfAnalysisException, TmfTraceException {
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        String path = trace.getPath().toString();
-        try (PcapTrace pcapTrace = new PcapTrace();) {
-            StreamListAnalysis analysis = new StreamListAnalysis();
-
-            pcapTrace.initTrace(null, path, null);
-            analysis.setId(StreamListAnalysis.ID);
-            analysis.setTrace(pcapTrace);
-            analysis.schedule();
-            analysis.waitForCompletion();
-
-            // Verify that builders are not empty.
-            TmfPacketStreamBuilder builder = analysis.getBuilder(TmfPcapProtocol.ETHERNET_II);
-            if (builder == null) {
-                fail("The PacketStreamBuilder is null!");
-                return;
-            }
-            assertEquals(1, builder.getNbStreams());
-
-            builder = analysis.getBuilder(TmfPcapProtocol.IPV4);
-            if (builder == null) {
-                fail("The PacketStreamBuilder is null!");
-                return;
-            }
-            assertEquals(3, builder.getNbStreams());
-
-            builder = analysis.getBuilder(TmfPcapProtocol.TCP);
-            if (builder == null) {
-                fail("The PacketStreamBuilder is null!");
-                return;
-            }
-            assertEquals(2, builder.getNbStreams());
-
-            builder = analysis.getBuilder(TmfPcapProtocol.UDP);
-            if (builder == null) {
-                fail("The PacketStreamBuilder is null!");
-                return;
-            }
-            assertEquals(1, builder.getNbStreams());
-
-            analysis.dispose();
-        }
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/AllTests.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/AllTests.java
deleted file mode 100644 (file)
index ffc4de3..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.event;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Event and Event Field test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    PcapEventTest.class,
-    PcapEventFieldTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventFieldTest.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventFieldTest.java
deleted file mode 100644 (file)
index 9f8757b..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.event;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.NonNull;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEventField;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapRootEventField;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * JUnit that test the PcapEventField class.
- *
- * @author Vincent Perot
- */
-public class PcapEventFieldTest {
-
-    private static final @NonNull String EMPTY_STRING = "";
-    private static PcapEventField fRegularField;
-    private static PcapRootEventField fRootField;
-
-    /**
-     * Initialize the Packet and the Event.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the pcap file is erroneous.
-     * @throws IOException
-     *             Thrown when an IO error occurs.
-     * @throws BadPacketException
-     *             Thrown when the packet is erroneous.
-     */
-    @BeforeClass
-    public static void setUp() throws IOException, BadPcapFileException, BadPacketException {
-        ByteBuffer bb = ByteBuffer.allocate(25);
-        bb.order(ByteOrder.BIG_ENDIAN);
-
-        // Version + IHL
-        bb.put((byte) 0x46);
-
-        // DSCP + ECN
-        bb.put((byte) 0x9A);
-
-        // Total length - this is randomly chosen so that we verify that the
-        // packet handles wrong total length.
-        bb.put((byte) 0x00);
-        bb.put((byte) 0xFF);
-
-        // Identification
-        bb.put((byte) 0x0F);
-        bb.put((byte) 0xF0);
-
-        // Flags + Fragment Offset
-        bb.put((byte) 0x1E);
-        bb.put((byte) 0xE1);
-
-        // Time to live
-        bb.put((byte) 0xA0);
-
-        // Protocol - Unknown
-        bb.put((byte) 0xFE);
-
-        // Header checksum - chosen randomly
-        bb.put((byte) 0x33);
-        bb.put((byte) 0x44);
-
-        // Source IP - 4 bytes
-        bb.put((byte) 192);
-        bb.put((byte) 168);
-        bb.put((byte) 1);
-        bb.put((byte) 0);
-
-        // Destination IP - 4 bytes
-        bb.put((byte) 193);
-        bb.put((byte) 169);
-        bb.put((byte) 2);
-        bb.put((byte) 1);
-
-        // Options - 4 bytes
-        bb.put((byte) 0xA2);
-        bb.put((byte) 0x56);
-        bb.put((byte) 0xA2);
-        bb.put((byte) 0x56);
-
-        // Payload - 1 byte
-        bb.put((byte) 0xA6);
-
-        bb.flip();
-
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile dummy = new PcapFile(trace.getPath())) {
-            IPv4Packet packet = new IPv4Packet(dummy, null, bb);
-            ITmfEventField[] fieldArray = generatePacketFields(packet);
-            fRegularField = new PcapEventField("Regular Field", EMPTY_STRING, fieldArray, packet);
-            fRootField = new PcapRootEventField(fieldArray, packet);
-        }
-
-    }
-
-    /**
-     * Method that tests the copy constructor.
-     */
-    @Test
-    public void copyConstructorTest() {
-        PcapEventField oldField = fRegularField;
-        if (oldField == null) {
-            fail("The field has not been initialized!");
-            return;
-        }
-        PcapEventField newField = new PcapEventField(oldField);
-        assertEquals(fRegularField.hashCode(), newField.hashCode());
-        assertEquals(fRegularField, newField);
-    }
-
-    /**
-     * Method that tests a standard field value request.
-     */
-    @Test
-    public void regularFieldValueRequestTest() {
-        ITmfEventField field = fRootField.getField("Internet Protocol Version 4");
-        if (field == null) {
-            fail("The field is null!");
-            return;
-        }
-
-        ITmfEventField subfield = field.getField("Source IP Address");
-        if (subfield == null) {
-            fail("The subfield is null!");
-            return;
-        }
-
-        String string = subfield.getValue().toString();
-        assertEquals("192.168.1.0", string);
-    }
-
-    /**
-     * Method that tests a custom field value request.
-     */
-    @Test
-    public void customFieldValueRequestTest() {
-        ITmfEventField field = fRootField.getField(":protocol:");
-        if (field == null) {
-            fail("The field is null!");
-            return;
-        }
-        String string = field.getValue().toString();
-        assertEquals("IPV4", string);
-
-        field = fRootField.getField(":packetsource:");
-        if (field == null) {
-            fail("The field is null!");
-            return;
-        }
-        string = field.getValue().toString();
-        assertEquals("192.168.1.0", string);
-
-        field = fRootField.getField(":packetdestination:");
-        if (field == null) {
-            fail("The field is null!");
-            return;
-        }
-        string = field.getValue().toString();
-        assertEquals("193.169.2.1", string);
-
-    }
-
-    /**
-     * Method that teststhe toString() method for a non-root field.
-     */
-    @Test
-    public void regularToStringTest() {
-        assertEquals("Src: 192.168.1.0 , Dst: 193.169.2.1", fRegularField.toString());
-    }
-
-    /**
-     * Method that teststhe toString() method for a root field.
-     */
-    @Test
-    public void rootToStringTest() {
-        assertEquals("192.168.1.0 > 193.169.2.1 Id=4080 Len=1", fRootField.toString());
-    }
-
-    // Convenience method
-    private static ITmfEventField[] generatePacketFields(Packet packet) {
-        List<ITmfEventField> fieldList = new ArrayList<>();
-        List<ITmfEventField> subfieldList = new ArrayList<>();
-        Packet localPacket = packet;
-
-        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 new ITmfEventField[0];
-        }
-        return fieldArray;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventTest.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventTest.java
deleted file mode 100644 (file)
index c9e80a4..0000000
+++ /dev/null
@@ -1,153 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.event;
-
-import static org.junit.Assert.*;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.core.trace.TmfContext;
-import org.eclipse.tracecompass.tmf.core.trace.location.TmfLongLocation;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import com.google.common.collect.ImmutableList;
-
-/**
- * JUnit that test the PcapEvent class.
- *
- * @author Vincent Perot
- */
-public class PcapEventTest {
-
-    private static PcapEvent fEvent;
-    private static List<TmfPcapProtocol> fProtocolList;
-
-    /**
-     * Initialize the Packet and the EventField.
-     *
-     * @throws BadPcapFileException
-     *             Thrown when the pcap file is erroneous.
-     * @throws IOException
-     *             Thrown when an IO error occurs.
-     * @throws TmfTraceException
-     *             Thrown when the trace is not valid.
-     */
-    @BeforeClass
-    public static void setUp() throws IOException, BadPcapFileException, TmfTraceException {
-
-        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
-        assumeTrue(trace.exists());
-        try (PcapFile pcap = new PcapFile(trace.getPath());
-                PcapTrace pcapTrace = new PcapTrace();) {
-            pcapTrace.initTrace(null, trace.getPath().toString(), PcapEvent.class);
-            fEvent = pcapTrace.parseEvent(new TmfContext(new TmfLongLocation(3), 3));
-        }
-
-        // Initialize protocol list.
-        List<TmfPcapProtocol> list = new ArrayList<>();
-        list.add(TmfPcapProtocol.PCAP);
-        list.add(TmfPcapProtocol.ETHERNET_II);
-        list.add(TmfPcapProtocol.IPV4);
-        list.add(TmfPcapProtocol.TCP);
-        list.add(TmfPcapProtocol.UNKNOWN);
-        fProtocolList = ImmutableList.copyOf(list);
-    }
-
-    /**
-     * Method that tests getProtocols of PcapEvent.
-     */
-    @Test
-    public void getProtocolsTest() {
-        assertEquals(fProtocolList, fEvent.getProtocols());
-    }
-
-    /**
-     * Method that tests getMostEncapsulatedProtocol of PcapEvent.
-     */
-    @Test
-    public void getMostEncapsulatedProtocolTest() {
-        assertEquals(TmfPcapProtocol.TCP, fEvent.getMostEncapsulatedProtocol());
-    }
-
-    /**
-     * Method that tests getFields of PcapEvent.
-     */
-    @Test
-    public void getFieldsTest() {
-        Map<String, String> map = fEvent.getFields(TmfPcapProtocol.IPV4);
-        if (map == null) {
-            fail("getFieldsTest() failed because map is null!");
-            return;
-        }
-        assertEquals("145.254.160.237", map.get("Source IP Address"));
-    }
-
-    /**
-     * Method that tests getPayload of PcapEvent.
-     */
-    @Test
-    public void getPayloadTest() {
-        ByteBuffer bb = fEvent.getPayload(TmfPcapProtocol.TCP);
-        if (bb == null) {
-            fail("getPayloadTest() failed because bb is null!");
-            return;
-        }
-        assertEquals((byte) 0x47, bb.get());
-    }
-
-    /**
-     * Method that tests getSourceEndpoint of PcapEvent.
-     */
-    @Test
-    public void getSourceEndpointTest() {
-        assertEquals("00:00:01:00:00:00/145.254.160.237/3372", fEvent.getSourceEndpoint(TmfPcapProtocol.TCP));
-    }
-
-    /**
-     * Method that tests getDestinationEndpointTest of PcapEvent.
-     */
-    @Test
-    public void getDestinationEndpointTest() {
-        assertEquals("fe:ff:20:00:01:00", fEvent.getDestinationEndpoint(TmfPcapProtocol.ETHERNET_II));
-    }
-
-    /**
-     * Method that tests toString() of PcapEvent.
-     */
-    @Test
-    public void toStringTest() {
-        assertEquals("3372 > 80 [ACK, PSH] Seq=951057940 Ack=290218380 Len=20", fEvent.toString());
-    }
-
-    /**
-     * Method that tests toString(protocol) of PcapEvent.
-     */
-    @Test
-    public void toStringAtSpecificProtocolTest() {
-        assertEquals("Src: 145.254.160.237 , Dst: 65.208.228.223", fEvent.toString(TmfPcapProtocol.IPV4));
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/AllTests.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/AllTests.java
deleted file mode 100644 (file)
index f359830..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.trace;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Pcap trace test suite
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-        PcapTraceTest.class
-})
-public class AllTests {
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/PcapTraceTest.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/PcapTraceTest.java
deleted file mode 100644 (file)
index cce04a1..0000000
+++ /dev/null
@@ -1,307 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- ******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.trace;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeTrue;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.core.signal.TmfEndSynchSignal;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
-import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
-import org.eclipse.tracecompass.tmf.core.trace.location.TmfLongLocation;
-import org.eclipse.tracecompass.tmf.pcap.core.tests.shared.PcapTmfTestTrace;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * JUnit that test the PcapTrace class.
- *
- * @author Vincent Perot
- */
-public class PcapTraceTest {
-
-    private static final PcapTmfTestTrace TEST_TRACE = PcapTmfTestTrace.MOSTLY_TCP;
-
-    private PcapTrace fFixture;
-
-    /**
-     * Perform pre-test initialization.
-     *
-     * @throws TmfTraceException
-     *             If the test trace is not found
-     */
-    @Before
-    public void setUp() throws TmfTraceException {
-        assumeTrue(TEST_TRACE.exists());
-        fFixture = new PcapTrace();
-        fFixture.initTrace((IResource) null, TEST_TRACE.getPath(), PcapEvent.class);
-    }
-
-    /**
-     * Perform post-test clean-up.
-     */
-    @After
-    public void tearDown() {
-        if (fFixture != null) {
-            fFixture.dispose();
-        }
-    }
-
-    /**
-     * Run the PcapTrace() constructor test.
-     */
-    @Test
-    public void testPcapTrace() {
-        try (PcapTrace result = new PcapTrace();) {
-            assertNotNull(result);
-            assertEquals(1000, result.getCacheSize());
-            assertEquals(0L, result.getNbEvents());
-            assertEquals(0L, result.getStreamingInterval());
-            assertNull(result.getResource());
-            assertNull(result.getType());
-        }
-    }
-
-    /**
-     * Test the parseEvent() method
-     */
-    @Test
-    public void testParseEvent() {
-        ITmfContext ctx = fFixture.seekEvent(0);
-        fFixture.getNext(ctx);
-        PcapEvent event = fFixture.parseEvent(ctx);
-        assertNotNull(event);
-    }
-
-    /**
-     * Run the void broadcast(TmfSignal) method test.
-     */
-    @Test
-    public void testBroadcast() {
-        TmfSignal signal = new TmfEndSynchSignal(1);
-        fFixture.broadcast(signal);
-    }
-
-    /**
-     * Run the void dispose() method test.
-     */
-    @Test
-    public void testClose() {
-        try (PcapTrace emptyFixture = new PcapTrace();) {
-        }
-    }
-
-    /**
-     * Run the int getCacheSize() method test.
-     */
-    @Test
-    public void testGetCacheSize() {
-        try (PcapTrace emptyFixture = new PcapTrace();) {
-            int result = emptyFixture.getCacheSize();
-            assertEquals(1000, result);
-        }
-    }
-
-    /**
-     * Run the ITmfLocation<Comparable> getCurrentLocation() method test.
-     */
-    @Test
-    public void testGetCurrentLocation() {
-        TmfLongLocation result = (TmfLongLocation) fFixture.getCurrentLocation();
-        assertEquals(new TmfLongLocation(0), result);
-    }
-
-    /**
-     * Test the seekEvent() method with a null location.
-     */
-    @Test
-    public void testSeekEventLoc_null() {
-        TmfLongLocation loc = null;
-        fFixture.seekEvent(loc);
-        assertNotNull(fFixture);
-    }
-
-    /**
-     * Test the seekEvent() method with a normal location.
-     */
-    @Test
-    public void testSeekEventLoc_normal() {
-        TmfLongLocation loc = new TmfLongLocation(3L);
-        fFixture.seekEvent(loc);
-        assertNotNull(fFixture);
-    }
-
-    /**
-     * Run the ITmfTimestamp getEndTime() method test.
-     */
-    @Test
-    public void testGetEndTime() {
-        ITmfTimestamp result = fFixture.getEndTime();
-        assertNotNull(result);
-    }
-
-    /**
-     * Test the {@link PcapTrace#getEventType()} method.
-     */
-    @Test
-    public void testGetEventType() {
-        Class<?> result = fFixture.getEventType();
-        assertNotNull(result);
-        assertEquals(PcapEvent.class, result);
-    }
-
-    /**
-     * Run the double getLocationRatio(ITmfLocation<?>) method test.
-     */
-    @Test
-    public void testGetLocationRatio() {
-        TmfLongLocation location = new TmfLongLocation(20L);
-        double result = fFixture.getLocationRatio(location);
-
-        assertEquals(20.0 / 43.0, result, 0.01);
-    }
-
-    /**
-     * Run the String getName() method test.
-     */
-    @Test
-    public void testGetName() {
-        String result = fFixture.getName();
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the getTraceProperties() method test.
-     */
-    @Test
-    public void testGetTraceProperties() {
-        int result = fFixture.getTraceProperties().size();
-        assertEquals(6, result);
-    }
-
-    /**
-     * Run the long getNbEvents() method test.
-     */
-    @Test
-    public void testGetNbEvents() {
-        long result = fFixture.getNbEvents();
-        assertEquals(0, result);
-    }
-
-    /**
-     * Run the String getPath() method test.
-     */
-    @Test
-    public void testGetPath() {
-        String result = fFixture.getPath();
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the IResource getResource() method test.
-     */
-    @Test
-    public void testGetResource() {
-        IResource result = fFixture.getResource();
-        assertNull(result);
-    }
-
-    /**
-     * Run the ITmfTimestamp getStartTime() method test.
-     */
-    @Test
-    public void testGetStartTime() {
-        ITmfTimestamp result = fFixture.getStartTime();
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the long getStreamingInterval() method test.
-     */
-    @Test
-    public void testGetStreamingInterval() {
-        long result = fFixture.getStreamingInterval();
-        assertEquals(0L, result);
-    }
-
-    /**
-     * Run the TmfTimeRange getTimeRange() method test.
-     */
-    @Test
-    public void testGetTimeRange() {
-        TmfTimeRange result = fFixture.getTimeRange();
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the ITmfContext seekEvent(double) method test.
-     */
-    @Test
-    public void testSeekEvent_ratio() {
-        double ratio = 21.0 / 43.0;
-        ITmfContext result = fFixture.seekEvent(ratio);
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the ITmfContext seekEvent(long) method test.
-     */
-    @Test
-    public void testSeekEvent_rank() {
-        long rank = 1L;
-        ITmfContext result = fFixture.seekEvent(rank);
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
-     */
-    @Test
-    public void testSeekEvent_location() {
-        TmfLongLocation pcapLocation = new TmfLongLocation(10L);
-        ITmfContext result = fFixture.seekEvent(pcapLocation);
-        assertNotNull(result);
-    }
-
-    /**
-     * Run the boolean validate(IProject,String) method test.
-     */
-    @Test
-    public void testValidate() {
-        IProject project = null;
-        IStatus result = fFixture.validate(project, TEST_TRACE.getPath());
-        assertTrue(result.isOK());
-    }
-
-    /**
-     * Run the String getHostId() method test
-     */
-    @Test
-    public void getSource() {
-        String a = fFixture.getHostId();
-        assertEquals("mostlyTCP.pcap", a);
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core.tests/stubs/org/eclipse/tracecompass/tmf/pcap/core/tests/stubs/PcapTmfTraceStub.java b/org.eclipse.tracecompass.tmf.pcap.core.tests/stubs/org/eclipse/tracecompass/tmf/pcap/core/tests/stubs/PcapTmfTraceStub.java
deleted file mode 100644 (file)
index 808d148..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ã‰cole Polytechnique de Montréal
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.core.tests.stubs;
-
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
-
-/**
- * Dummy test pcap trace
- */
-public class PcapTmfTraceStub extends PcapTrace {
-
-    /**
-     * Simulate trace opening, to be called by tests who need an actively opened
-     * trace
-     */
-    public void openTrace() {
-        TmfSignalManager.dispatchSignal(new TmfTraceOpenedSignal(this, this, null));
-        selectTrace();
-    }
-
-    /**
-     * Simulate selecting the trace
-     */
-    public void selectTrace() {
-        TmfSignalManager.dispatchSignal(new TmfTraceSelectedSignal(this, this));
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/.classpath b/org.eclipse.tracecompass.tmf.pcap.core/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/.project b/org.eclipse.tracecompass.tmf.pcap.core/.project
deleted file mode 100644 (file)
index a2de098..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.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.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index a2b5e6b..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-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=error
-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.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-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.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index d92b94f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.tmf.pcap.core/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index e58e062..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.core;singleton:=true
-Bundle-Activator: org.eclipse.tracecompass.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.tracecompass.common.core,
- org.eclipse.tracecompass.tmf.core,
- org.eclipse.tracecompass.pcap.core
-Export-Package: org.eclipse.tracecompass.internal.tmf.pcap.core;x-internal:=true,
- org.eclipse.tracecompass.internal.tmf.pcap.core.analysis;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
- org.eclipse.tracecompass.internal.tmf.pcap.core.event;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
- org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
- org.eclipse.tracecompass.internal.tmf.pcap.core.protocol;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
- org.eclipse.tracecompass.internal.tmf.pcap.core.signal;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui",
- org.eclipse.tracecompass.internal.tmf.pcap.core.trace;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui,org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests",
- org.eclipse.tracecompass.internal.tmf.pcap.core.util;x-internal:=true
-Import-Package: com.google.common.collect
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/about.html b/org.eclipse.tracecompass.tmf.pcap.core/about.html
deleted file mode 100644 (file)
index 28737f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/build.properties b/org.eclipse.tracecompass.tmf.pcap.core/build.properties
deleted file mode 100644 (file)
index 78168e2..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               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.tracecompass.tmf.pcap.core/plugin.properties b/org.eclipse.tracecompass.tmf.pcap.core/plugin.properties
deleted file mode 100644 (file)
index 6df8477..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-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.tracecompass.tmf.pcap.core/plugin.xml b/org.eclipse.tracecompass.tmf.pcap.core/plugin.xml
deleted file mode 100644 (file)
index 227adf5..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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.tracecompass.tmf.core.event.TmfEvent"
-            id="org.eclipse.linuxtools.tmf.pcap.core.pcaptrace"
-            isDirectory="false"
-            name="Pcap Trace"
-            trace_type="org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace">
-      </type>
-   </extension>
-   <extension
-         point="org.eclipse.linuxtools.tmf.core.analysis">
-      <module
-            analysis_module="org.eclipse.tracecompass.internal.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.tracecompass.internal.tmf.pcap.core.trace.PcapTrace">
-         </tracetype>
-      </module>
-   </extension>
-
-</plugin>
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/pom.xml b/org.eclipse.tracecompass.tmf.pcap.core/pom.xml
deleted file mode 100644 (file)
index 830b559..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.tmf.pcap.core</artifactId>
-  <version>1.0.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.tracecompass</groupId>
-</project>
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/Activator.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/Activator.java
deleted file mode 100644 (file)
index 54568bc..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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.tracecompass.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.tracecompass.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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/StreamListAnalysis.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/StreamListAnalysis.java
deleted file mode 100644 (file)
index 7978bda..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.analysis;
-
-import java.util.HashMap;
-import java.util.List;
-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.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStreamBuilder;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
-import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest;
-import org.eclipse.tracecompass.tmf.core.request.TmfEventRequest;
-import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment;
-
-/**
- * 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<TmfPcapProtocol, TmfPacketStreamBuilder> fBuilders;
-
-    /**
-     * The default constructor. It initializes all variables.
-     */
-    public StreamListAnalysis() {
-        super();
-        fBuilders = new HashMap<>();
-        for (TmfPcapProtocol protocol : TmfPcapProtocol.values()) {
-            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;
-        List<ITmfTrace> traces = experiment.getTraces();
-        for (ITmfTrace expTrace : traces) {
-            if (expTrace instanceof PcapTrace) {
-                return true;
-            }
-        }
-
-        // No Pcap :(
-        return false;
-    }
-
-    @Override
-    protected boolean executeAnalysis(@Nullable IProgressMonitor monitor) throws TmfAnalysisException {
-        IProgressMonitor mon = (monitor == null ? new NullProgressMonitor() : monitor);
-        ITmfTrace trace = getTrace();
-        if (trace == null) {
-            /* This analysis was cancelled in the meantime */
-            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 (TmfPcapProtocol protocol : fBuilders.keySet()) {
-                    fBuilders.get(protocol).addEventToStream(event);
-                }
-
-            }
-        };
-        trace.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(TmfPcapProtocol 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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/package-info.java
deleted file mode 100644 (file)
index d6732b3..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.analysis;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/Messages.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/Messages.java
deleted file mode 100644 (file)
index f9ce624..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.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.tracecompass.internal.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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEvent.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEvent.java
deleted file mode 100644 (file)
index 8e9c1fc..0000000
+++ /dev/null
@@ -1,260 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.nio.ByteBuffer;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Map;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.util.ProtocolConversion;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
-import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-
-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 final String fSource;
-    private final String fReference;
-
-    /**
-     * Lazy-loaded field representing all the protocols in this event
-     */
-    private transient @Nullable Collection<TmfPcapProtocol> fProtocols;
-
-    /**
-     * 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, type, content);
-        fPacket = packet;
-        fSource = source;
-        fReference = reference;
-    }
-
-    /**
-     * Return this event's source.
-     *
-     * @return The event's source
-     */
-    public String getSource() {
-        return fSource;
-    }
-
-    /**
-     * Return this event's reference
-     *
-     * @return The event's reference
-     */
-    public String getReference() {
-        return fReference;
-    }
-
-    /**
-     * 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(TmfPcapProtocol protocol) {
-        PcapProtocol 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(TmfPcapProtocol protocol) {
-        PcapProtocol 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(TmfPcapProtocol protocol) {
-        PcapProtocol 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(TmfPcapProtocol protocol) {
-        PcapProtocol 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 TmfPcapProtocol getMostEncapsulatedProtocol() {
-        return ProtocolConversion.wrap(fPacket.getMostEcapsulatedPacket().getProtocol());
-    }
-
-    /**
-     * Method that returns all the protocols in this PcapEvent.
-     *
-     * @return A list containing all the TmfProtocol.
-     */
-    public Collection<TmfPcapProtocol> getProtocols() {
-        if (fProtocols != null) {
-            return fProtocols;
-        }
-        ImmutableList.Builder<TmfPcapProtocol> builder = new ImmutableList.Builder<>();
-        Packet packet = fPacket;
-
-        // Go to start.
-        while (packet != null && packet.getParentPacket() != null) {
-            packet = packet.getParentPacket();
-        }
-
-        if (packet == null) {
-            fProtocols = checkNotNull(Collections.EMPTY_LIST);
-            return fProtocols;
-        }
-        // Go through all the packets and add them to list.
-        builder.add(ProtocolConversion.wrap(packet.getProtocol()));
-        while (packet != null && packet.getChildPacket() != null) {
-            packet = packet.getChildPacket();
-            if (packet != null) {
-                builder.add(ProtocolConversion.wrap(packet.getProtocol()));
-            }
-        }
-
-        fProtocols = checkNotNull(builder.build());
-        return fProtocols;
-    }
-
-    /**
-     * 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(TmfPcapProtocol protocol) {
-        PcapProtocol p = ProtocolConversion.unwrap(protocol);
-        Packet packet = fPacket.getPacket(p);
-        if (packet == null) {
-            return EMPTY_STRING;
-        }
-        return packet.getLocalSummaryString();
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventField.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventField.java
deleted file mode 100644 (file)
index daa3fad..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventType.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventType.java
deleted file mode 100644 (file)
index 8c040d7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.common.core.NonNullUtils;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
-
-/**
- * Class that represents the type of a PcapEvent.
- *
- * @author Vincent Perot
- */
-public class PcapEventType extends TmfEventType {
-
-    /**
-     * The default Pcap Type ID for a PcapEvent
-     */
-    public static final String DEFAULT_PCAP_TYPE_ID = NonNullUtils.nullToEmptyString(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(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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapRootEventField.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapRootEventField.java
deleted file mode 100644 (file)
index 795a70d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Patrick Tasse - Remove getSubField
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.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 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(@Nullable ITmfEventField[] fields, Packet packet) {
-        super(ITmfEventField.ROOT_FIELD_ID, null, 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(String... path) {
-        if (path.length != 1) {
-            return super.getField(path);
-        }
-        switch (path[0]) {
-        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(path);
-        }
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStream.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStream.java
deleted file mode 100644 (file)
index b4809ea..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
-
-import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStream;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.util.ProtocolConversion;
-import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
-
-/**
- * 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 TmfPcapProtocol 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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStreamBuilder.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStreamBuilder.java
deleted file mode 100644 (file)
index 07eb86f..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStream;
-import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStreamBuilder;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.util.ProtocolConversion;
-
-/**
- * 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(TmfPcapProtocol 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(PcapProtocol.PCAP);
-        if (!(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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/Messages.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/Messages.java
deleted file mode 100644 (file)
index 583e1ad..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
-
-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.tracecompass.internal.tmf.pcap.core.event.aspect.messages"; //$NON-NLS-1$
-
-    public static @Nullable String PcapAspectName_Destination;
-    public static @Nullable String PcapAspectName_Protocol;
-    public static @Nullable String PcapAspectName_Reference;
-    public static @Nullable String PcapAspectName_Source;
-
-    static {
-        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
-    }
-
-    private Messages() {
-    }
-
-    /**
-     * Helper method to expose externalized strings as non-null objects.
-     */
-    static String getMessage(@Nullable String msg) {
-        if (msg == null) {
-            return ""; //$NON-NLS-1$
-        }
-        return msg;
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapDestinationAspect.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapDestinationAspect.java
deleted file mode 100644 (file)
index ee73270..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Alexandre Montplaisir - Update to new ITmfEventAspect API
- *   Patrick Tasse - Make pcap aspects singletons
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-
-/**
- * The "packet destination" aspect for pcap events.
- *
- * @author Alexandre Montplaisir
- */
-public class PcapDestinationAspect implements ITmfEventAspect {
-
-    /** Singleton instance */
-    public static final PcapDestinationAspect INSTANCE = new PcapDestinationAspect();
-
-    private PcapDestinationAspect() {
-    }
-
-    @Override
-    public String getName() {
-        return Messages.getMessage(Messages.PcapAspectName_Destination);
-    }
-
-    @Override
-    public String getHelpText() {
-        return EMPTY_STRING;
-    }
-
-    @Override
-    public @Nullable String resolve(ITmfEvent event) {
-        if (!(event instanceof PcapEvent)) {
-            return null;
-        }
-        PcapEvent pcapEvent = (PcapEvent) event;
-        TmfPcapProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
-
-        return pcapEvent.getDestinationEndpoint(protocol);
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapProtocolAspect.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapProtocolAspect.java
deleted file mode 100644 (file)
index 31bf56a..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Alexandre Montplaisir - Update to new ITmfEventAspect API
- *   Patrick Tasse - Make pcap aspects singletons
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-
-/**
- * The "packet protocol" aspect for pcap events
- *
- * @author Alexandre Montplaisir
- */
-public class PcapProtocolAspect implements ITmfEventAspect {
-
-    /** Singleton instance */
-    public static final PcapProtocolAspect INSTANCE = new PcapProtocolAspect();
-
-    private PcapProtocolAspect() {
-    }
-
-    @Override
-    public String getName() {
-        return Messages.getMessage(Messages.PcapAspectName_Protocol);
-    }
-
-    @Override
-    public String getHelpText() {
-        return EMPTY_STRING;
-    }
-
-    @Override
-    public @Nullable String resolve(ITmfEvent event) {
-        if (!(event instanceof PcapEvent)) {
-            return null;
-        }
-        PcapEvent pcapEvent = (PcapEvent) event;
-        TmfPcapProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
-        return protocol.getShortName().toUpperCase();
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapReferenceAspect.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapReferenceAspect.java
deleted file mode 100644 (file)
index 0432358..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Alexandre Montplaisir - Update to new ITmfEventAspect API
- *   Patrick Tasse - Make pcap aspects singletons
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-
-/**
- * The "packet reference" aspect for pcap events
- *
- * @author Alexandre Montplaisir
- */
-public class PcapReferenceAspect implements ITmfEventAspect {
-
-    /** Singleton instance */
-    public static final PcapReferenceAspect INSTANCE = new PcapReferenceAspect();
-
-    private PcapReferenceAspect() {
-    }
-
-    @Override
-    public String getName() {
-        return Messages.getMessage(Messages.PcapAspectName_Reference);
-    }
-
-    @Override
-    public String getHelpText() {
-        return EMPTY_STRING;
-    }
-
-    @Override
-    public @Nullable String resolve(ITmfEvent event) {
-        if (!(event instanceof PcapEvent)) {
-            return null;
-        }
-        return ((PcapEvent) event).getReference();
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapSourceAspect.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapSourceAspect.java
deleted file mode 100644 (file)
index 7732d5f..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Alexandre Montplaisir - Update to new ITmfEventAspect API
- *   Patrick Tasse - Make pcap aspects singletons
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-
-/**
- * The packet source aspect for pcap events.
- *
- * This normally represents the source address of the packet, and the format
- * depends on the protocol (e.g. source IP address, source port, etc.)
- *
- * @author Alexandre Montplaisir
- */
-public class PcapSourceAspect implements ITmfEventAspect {
-
-    /** Singleton instance */
-    public static final PcapSourceAspect INSTANCE = new PcapSourceAspect();
-
-    private PcapSourceAspect() {
-    }
-
-    @Override
-    public String getName() {
-        return Messages.getMessage(Messages.PcapAspectName_Source);
-    }
-
-    @Override
-    public String getHelpText() {
-        return EMPTY_STRING;
-    }
-
-    @Override
-    public @Nullable String resolve(ITmfEvent event) {
-        if (!(event instanceof PcapEvent)) {
-            return null;
-        }
-        PcapEvent pcapEvent = (PcapEvent) event;
-        TmfPcapProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
-
-        return pcapEvent.getSourceEndpoint(protocol);
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/messages.properties b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/messages.properties
deleted file mode 100644 (file)
index 21ab85b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-PcapAspectName_Destination=Destination
-PcapAspectName_Protocol=Protocol
-PcapAspectName_Reference=Reference
-PcapAspectName_Source=Source
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/package-info.java
deleted file mode 100644 (file)
index e17f94d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/messages.properties b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/messages.properties
deleted file mode 100644 (file)
index fcf8ca2..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-PcapEventType_DefaultContext=Network/Pcap Event
-PcapEventType_DefaultTypeID=packet
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/package-info.java
deleted file mode 100644 (file)
index e50a3db..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/package-info.java
deleted file mode 100644 (file)
index 3216bff..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/TmfPcapProtocol.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/TmfPcapProtocol.java
deleted file mode 100644 (file)
index 1301020..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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.tracecompass.internal.tmf.pcap.core.protocol;
-
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-
-/**
- * Enumeration as a TMF wrapper of the different Protocols. To register a
- * protocol in TMF, it must be present in {@link PcapProtocol} and must have the
- * same name.
- *
- * @author Vincent Perot
- */
-public enum TmfPcapProtocol {
-
-    // Layer 0
-    /**
-     * The Pcap Protocol is not a real protocol but is used as an helper to
-     * generate Pcap packets.
-     */
-    PCAP(PcapProtocol.PCAP),
-
-    // Layer 1
-    // Should always be empty.
-
-    // Layer 2
-    /**
-     * The description of the Ethernet II Protocol.
-     */
-    ETHERNET_II(PcapProtocol.ETHERNET_II),
-
-    // Layer 3
-    /**
-     * The description of the Internet Protocol Version 4.
-     */
-    IPV4(PcapProtocol.IPV4),
-
-    // Layer 4
-    /**
-     * The description of the Transmission Control Protocol.
-     */
-    TCP(PcapProtocol.TCP),
-    /**
-     * The description of the User Datagram Protocol.
-     */
-    UDP(PcapProtocol.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(PcapProtocol.UNKNOWN);
-
-    private final String fName;
-    private final String fShortName;
-    private final boolean fSupportsStream;
-
-    private TmfPcapProtocol(PcapProtocol pcapProto) {
-        fName = pcapProto.getName();
-        fShortName = pcapProto.getShortName();
-        fSupportsStream = pcapProto.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 that indicates if the protocol supports streams.
-     *
-     * @return Whether the protocol supports streams or not.
-     */
-    public boolean supportsStream() {
-        return fSupportsStream;
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/package-info.java
deleted file mode 100644 (file)
index 1e64e74..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.protocol;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java
deleted file mode 100644 (file)
index a1c142f..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.signal;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStream;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
-
-/**
- * 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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/package-info.java
deleted file mode 100644 (file)
index 3433b23..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.signal;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/Messages.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/Messages.java
deleted file mode 100644 (file)
index 2b1b844..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.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.tracecompass.internal.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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/PcapTrace.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/PcapTrace.java
deleted file mode 100644 (file)
index 42e30d9..0000000
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Alexandre Montplaisir - Update to new ITmfEventAspect API
- *   Patrick Tasse - Make pcap aspects singletons
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.trace;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.io.IOException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Collection;
-import java.util.Collections;
-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.Nullable;
-import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.LinkTypeHelper;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.Activator;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapDestinationAspect;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapProtocolAspect;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapReferenceAspect;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapSourceAspect;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.util.PcapEventFactory;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTraceProperties;
-import org.eclipse.tracecompass.tmf.core.trace.TmfContext;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TraceValidationStatus;
-import org.eclipse.tracecompass.tmf.core.trace.location.ITmfLocation;
-import org.eclipse.tracecompass.tmf.core.trace.location.TmfLongLocation;
-
-import com.google.common.collect.ImmutableList;
-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 ITmfTraceProperties, AutoCloseable {
-
-    /** pcap trace type id as defined in plugin.xml */
-    public static final String TRACE_TYPE_ID = "org.eclipse.linuxtools.tmf.pcap.core.pcaptrace"; //$NON-NLS-1$
-
-    private static final Collection<ITmfEventAspect> PCAP_ASPECTS =
-            checkNotNull(ImmutableList.of(
-                    ITmfEventAspect.BaseAspects.TIMESTAMP,
-                    PcapSourceAspect.INSTANCE,
-                    PcapDestinationAspect.INSTANCE,
-                    PcapReferenceAspect.INSTANCE,
-                    PcapProtocolAspect.INSTANCE,
-                    ITmfEventAspect.BaseAspects.CONTENTS
-                    ));
-
-    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-    private static final int CONFIDENCE = 50;
-    private @Nullable PcapFile fPcapFile;
-    private @Nullable Map<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$
-        }
-        Path filePath = checkNotNull(Paths.get(path));
-        try {
-            fPcapFile = new PcapFile(filePath);
-        } catch (IOException | BadPcapFileException e) {
-            throw new TmfTraceException(e.getMessage(), e);
-        }
-    }
-
-    @Override
-    public Iterable<ITmfEventAspect> getEventAspects() {
-        return PCAP_ASPECTS;
-    }
-
-    @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);
-        }
-        Path filePath = checkNotNull(Paths.get(path));
-        try (PcapFile file = new PcapFile(filePath)) {
-        } 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 checkNotNull(Collections.<String, String> emptyMap());
-        }
-
-        Map<String, String> properties = fTraceProperties;
-        if (properties == null) {
-            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder();
-            builder.put(Messages.PcapTrace_Version, String.format("%d%c%d", pcap.getMajorVersion(), '.', pcap.getMinorVersion())); //$NON-NLS-1$
-            builder.put(Messages.PcapTrace_TimeZoneCorrection, pcap.getTimeZoneCorrection() + " s"); //$NON-NLS-1$
-            builder.put(Messages.PcapTrace_TimestampAccuracy, String.valueOf(pcap.getTimeAccuracy()));
-            builder.put(Messages.PcapTrace_MaxSnapLength, pcap.getSnapLength() + " bytes"); //$NON-NLS-1$
-            builder.put(Messages.PcapTrace_LinkLayerHeaderType, LinkTypeHelper.toString((int) pcap.getDataLinkType()) + " (" + pcap.getDataLinkType() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
-            builder.put(Messages.PcapTrace_FileEndianness, pcap.getByteOrder().toString());
-
-            return checkNotNull(builder.build());
-
-        }
-
-        return properties;
-    }
-
-    @Override
-    public void close() {
-        dispose();
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/messages.properties b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/messages.properties
deleted file mode 100644 (file)
index 9a39027..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/package-info.java
deleted file mode 100644 (file)
index 5c651a0..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.trace;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/Messages.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/Messages.java
deleted file mode 100644 (file)
index 50bc090..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.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.tracecompass.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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/PcapEventFactory.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/PcapEventFactory.java
deleted file mode 100644 (file)
index b50522c..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.util;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import java.nio.file.Path;
-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.tracecompass.internal.pcap.core.packet.Packet;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
-import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
-import org.eclipse.tracecompass.internal.pcap.core.util.LinkTypeHelper;
-import org.eclipse.tracecompass.internal.pcap.core.util.PcapTimestampScale;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEventField;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEventType;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapRootEventField;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
-import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
-import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
-import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
-import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
-
-/**
- * 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<PcapProtocol, 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:
-            long us = trace.getTimestampTransform().transform(timestamp * 1000) / 1000;
-            tmfTimestamp = new TmfTimestamp(us, ITmfTimestamp.MICROSECOND_SCALE);
-            break;
-        case NANOSECOND:
-            long ns = trace.getTimestampTransform().transform(timestamp);
-            tmfTimestamp = new TmfTimestamp(ns, ITmfTimestamp.NANOSECOND_SCALE);
-            break;
-        default:
-            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
-        }
-        Path filePath = pcap.getPath().getFileName();
-        @NonNull String fileName = (filePath == null ? EMPTY_STRING : checkNotNull(filePath.toString()));
-
-        String dataLink = Messages.PcapEventFactory_LinkType + ':' + LinkTypeHelper.toString((int) pcapPacket.getPcapFile().getDataLinkType());
-
-        ITmfEventField[] fields = generatePacketFields(pcapPacket);
-        ITmfEventField field = new PcapRootEventField(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(PcapProtocol.PCAP);
-
-        while (localPacket != null) {
-            subfieldList.clear();
-            for (Map.Entry<String, String> entry : localPacket.getFields().entrySet()) {
-                String key = entry.getKey();
-                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.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/ProtocolConversion.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/ProtocolConversion.java
deleted file mode 100644 (file)
index 4a2e01a..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.core.util;
-
-import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-
-/**
- * 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 final class ProtocolConversion {
-
-    private ProtocolConversion() {}
-
-    /**
-     * Wrap a {@link PcapProtocol} into a {@link TmfPcapProtocol}.
-     *
-     * @param protocol
-     *            The {@link PcapProtocol} to match
-     * @return The TmfProtocol
-     */
-    public static TmfPcapProtocol wrap(PcapProtocol protocol) {
-        switch (protocol) {
-        case ETHERNET_II:
-            return TmfPcapProtocol.ETHERNET_II;
-        case IPV4:
-            return TmfPcapProtocol.IPV4;
-        case PCAP:
-            return TmfPcapProtocol.PCAP;
-        case TCP:
-            return TmfPcapProtocol.TCP;
-        case UDP:
-            return TmfPcapProtocol.UDP;
-        case UNKNOWN:
-            return TmfPcapProtocol.UNKNOWN;
-        default:
-            throw new IllegalArgumentException();
-        }
-    }
-
-    /**
-     * Unwrap a {@link TmfPcapProtocol} from a {@link PcapProtocol}.
-     *
-     * @param protocol
-     *            The TmfProtocol
-     * @return The Protocol
-     */
-    public static PcapProtocol unwrap(TmfPcapProtocol protocol) {
-        switch (protocol) {
-        case ETHERNET_II:
-            return PcapProtocol.ETHERNET_II;
-        case IPV4:
-            return PcapProtocol.IPV4;
-        case PCAP:
-            return PcapProtocol.PCAP;
-        case TCP:
-            return PcapProtocol.TCP;
-        case UDP:
-            return PcapProtocol.UDP;
-        case UNKNOWN:
-            return PcapProtocol.UNKNOWN;
-        default:
-            throw new IllegalArgumentException();
-        }
-    }
-
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/messages.properties b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/messages.properties
deleted file mode 100644 (file)
index 5630ca0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-PcapEventFactory_LinkType=linktype
diff --git a/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/package-info.java b/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/package-info.java
deleted file mode 100644 (file)
index 44a29fe..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.core.util;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.classpath b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.classpath
deleted file mode 100644 (file)
index 3bc2475..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.gitignore b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.gitignore
deleted file mode 100644 (file)
index 750e145..0000000
+++ /dev/null
@@ -1 +0,0 @@
-screenshots/
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.project b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.project
deleted file mode 100644 (file)
index b43ed70..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.jdt.core.javabuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.ManifestBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.SchemaBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-               <buildCommand>
-                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.jdt.core.javanature</nature>
-               <nature>org.eclipse.pde.PluginNature</nature>
-               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index 0409c61..0000000
+++ /dev/null
@@ -1,403 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-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=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
-org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
-org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.7
-org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
-org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
-org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
-org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_after_package=1
-org.eclipse.jdt.core.formatter.blank_lines_before_field=0
-org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
-org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
-org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
-org.eclipse.jdt.core.formatter.blank_lines_before_method=1
-org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
-org.eclipse.jdt.core.formatter.blank_lines_before_package=0
-org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
-org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
-org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
-org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
-org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
-org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
-org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
-org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=false
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=250
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=space
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_on_off_tags=false
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
-org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
-org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-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.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index 62cfa90..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=2
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=2
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index eb39bfa..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;singleton:=true
-Bundle-ActivationPolicy: lazy
-Bundle-RequiredExecutionEnvironment: JavaSE-1.7
-Export-Package: org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests
-Require-Bundle: org.apache.log4j,
- org.eclipse.core.resources,
- org.eclipse.core.runtime,
- org.eclipse.swtbot.eclipse.finder,
- org.eclipse.swtbot.junit4_x,
- org.eclipse.ui,
- org.eclipse.ui.ide,
- org.eclipse.ui.views,
- org.junit,
- org.eclipse.tracecompass.tmf.core,
- org.eclipse.tracecompass.tmf.pcap.core,
- org.eclipse.tracecompass.tmf.pcap.core.tests,
- org.eclipse.tracecompass.tmf.ui,
- org.eclipse.tracecompass.tmf.pcap.ui,
- org.eclipse.tracecompass.tmf.ui.swtbot.tests
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/about.html b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/about.html
deleted file mode 100644 (file)
index 28737f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/build.properties b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/build.properties
deleted file mode 100644 (file)
index cee367f..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#    Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-bin.includes = META-INF/,\
-               .,\
-               plugin.properties,\
-               about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/plugin.properties b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/plugin.properties
deleted file mode 100644 (file)
index c94ac4f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-Bundle-Name = Pcap Support for TMF SWTBot Tests Plug-in
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/pom.xml b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/pom.xml
deleted file mode 100644 (file)
index 7bd6284..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?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 xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</artifactId>
-  <version>1.0.0-SNAPSHOT</version>
-  <packaging>eclipse-test-plugin</packaging>
-
-  <name>Pcap Support for TMF SWTBot Tests Plug-in</name>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-surefire-plugin</artifactId>
-        <version>${tycho-version}</version>
-        <configuration>
-          <testSuite>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</testSuite>
-          <testClass>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests.AllTests</testClass>
-          <useUIHarness>true</useUIHarness>
-          <useUIThread>false</useUIThread>
-          <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
-          <product>org.eclipse.platform.ide</product>
-          <environmentVariables>
-            <SWT_GTK3>${SWT_GTK3}</SWT_GTK3>
-          </environmentVariables>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-
- <groupId>org.eclipse.tracecompass</groupId>
-</project>
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/AllTests.java b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/AllTests.java
deleted file mode 100644 (file)
index 2766171..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;
-
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Test suite for UI on the PCAP parser and networking perspective
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({
-    ImportAndReadPcapTest.class,
-    NetworkPerspectiveChecker.class
-})
-public class AllTests {
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java
deleted file mode 100644 (file)
index 1486e32..0000000
+++ /dev/null
@@ -1,279 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeTrue;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.log4j.ConsoleAppender;
-import org.apache.log4j.Logger;
-import org.apache.log4j.SimpleLayout;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.jface.viewers.SelectionChangedEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
-import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.results.BoolResult;
-import org.eclipse.swtbot.swt.finder.results.VoidResult;
-import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.internal.tmf.pcap.ui.NetworkingPerspectiveFactory;
-import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView;
-import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
-import org.eclipse.tracecompass.tmf.pcap.core.tests.shared.PcapTmfTestTrace;
-import org.eclipse.tracecompass.tmf.ui.editors.TmfEventsEditor;
-import org.eclipse.tracecompass.tmf.ui.project.model.TmfOpenTraceHelper;
-import org.eclipse.tracecompass.tmf.ui.project.model.TmfProjectRegistry;
-import org.eclipse.tracecompass.tmf.ui.project.model.TmfTraceFolder;
-import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.ConditionHelpers;
-import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotUtils;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IViewPart;
-import org.eclipse.ui.IViewReference;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.WorkbenchException;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * SWTBot Smoke test for Pcap UI.
- *
- * @author Matthew Khouzam
- */
-@RunWith(SWTBotJunit4ClassRunner.class)
-public class ImportAndReadPcapTest {
-
-    private static final String NETWORK_PERSPECTIVE_ID = NetworkingPerspectiveFactory.ID;
-    private static final String TRACE_PROJECT_NAME = "test";
-
-    private static SWTWorkbenchBot fBot;
-    private ITmfEvent fDesired1;
-    private static PcapTmfTestTrace pttt = PcapTmfTestTrace.BENCHMARK_TRACE;
-
-    /** The Log4j logger instance. */
-    private static final Logger fLogger = Logger.getRootLogger();
-
-    /**
-     * Test Class setup
-     */
-    @BeforeClass
-    public static void init() {
-
-        SWTBotUtils.failIfUIThread();
-
-        /* set up for swtbot */
-        SWTBotPreferences.TIMEOUT = 300000; /* 300 second timeout */
-        fLogger.removeAllAppenders();
-        fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
-        fBot = new SWTWorkbenchBot();
-
-        final List<SWTBotView> openViews = fBot.views();
-        for (SWTBotView view : openViews) {
-            if (view.getTitle().equals("Welcome")) {
-                view.close();
-                fBot.waitUntil(ConditionHelpers.ViewIsClosed(view));
-            }
-        }
-        /* Switch perspectives */
-        switchNetworkPerspective();
-        /* Finish waiting for eclipse to load */
-        SWTBotUtils.waitForJobs();
-    }
-
-    /**
-     * Test Class teardown
-     */
-    @AfterClass
-    public static void terminate() {
-        fLogger.removeAllAppenders();
-    }
-
-    private static void switchNetworkPerspective() {
-        final Exception retE[] = new Exception[1];
-        if (!UIThreadRunnable.syncExec(new BoolResult() {
-            @Override
-            public Boolean run() {
-                try {
-                    PlatformUI.getWorkbench().showPerspective(NETWORK_PERSPECTIVE_ID,
-                            PlatformUI.getWorkbench().getActiveWorkbenchWindow());
-                } catch (WorkbenchException e) {
-                    retE[0] = e;
-                    return false;
-                }
-                return true;
-            }
-        })) {
-            fail(retE[0].getMessage());
-        }
-
-    }
-
-    /**
-     * Main test case
-     */
-    @Test
-    public void test() {
-        assumeTrue(pttt.exists());
-        SWTBotUtils.createProject(TRACE_PROJECT_NAME);
-        openTrace();
-        openEditor();
-        testHV(getViewPart("Histogram"));
-        testStreamView(getViewPartRef("Stream List"));
-        fBot.closeAllEditors();
-        SWTBotUtils.deleteProject(TRACE_PROJECT_NAME, fBot);
-    }
-
-    private void testStreamView(IViewReference viewPart) {
-        SWTBotView botView = new SWTBotView(viewPart, fBot);
-        StreamListView slv = (StreamListView) getViewPart("Stream List");
-        botView.setFocus();
-        SWTBotTree botTree = fBot.tree();
-        assertNotNull(botTree);
-        final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(slv, fDesired1.getTimestamp());
-        slv.broadcast(signal);
-        SWTBotUtils.waitForJobs();
-        // FIXME This is a race condition:
-        // TmfEventsTable launches an async exec that may be run after the wait
-        // for jobs. This last delay catches it.
-        SWTBotUtils.delay(1000);
-
-    }
-
-    private static void openTrace() {
-        final Exception exception[] = new Exception[1];
-        exception[0] = null;
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                try {
-                    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME);
-                    TmfTraceFolder destinationFolder = TmfProjectRegistry.getProject(project, true).getTracesFolder();
-                    String absolutePath = (new File(pttt.getTrace().getPath())).getAbsolutePath();
-                    TmfOpenTraceHelper.openTraceFromPath(destinationFolder, absolutePath, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "org.eclipse.linuxtools.tmf.pcap.core.pcaptrace");
-                } catch (CoreException e) {
-                    exception[0] = e;
-                }
-            }
-        });
-        if (exception[0] != null) {
-            fail(exception[0].getMessage());
-        }
-
-        SWTBotUtils.delay(1000);
-        SWTBotUtils.waitForJobs();
-    }
-
-    private void openEditor() {
-        final List<IEditorReference> editorRefs = new ArrayList<>();
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                IEditorReference[] ieds = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
-                editorRefs.addAll(Arrays.asList(ieds));
-            }
-
-        });
-        assertFalse(editorRefs.isEmpty());
-        IEditorPart iep = null;
-        for (IEditorReference ied : editorRefs) {
-            if (ied.getTitle().equals(pttt.getTrace().getName())) {
-                iep = ied.getEditor(true);
-                break;
-            }
-        }
-        assertNotNull(iep);
-        fDesired1 = getEvent(100);
-        final TmfEventsEditor tmfEd = (TmfEventsEditor) iep;
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                tmfEd.setFocus();
-                tmfEd.selectionChanged(new SelectionChangedEvent(tmfEd, new StructuredSelection(fDesired1)));
-            }
-        });
-
-        SWTBotUtils.waitForJobs();
-        SWTBotUtils.delay(1000);
-        assertNotNull(tmfEd);
-    }
-
-    private static void testHV(IViewPart vp) {
-        assertNotNull(vp);
-    }
-
-    private static ITmfEvent getEvent(int rank) {
-        try (PcapTrace trace = pttt.getTrace()) {
-            ITmfContext ctx = trace.seekEvent(0);
-            for (int i = 0; i < rank; i++) {
-                trace.getNext(ctx);
-            }
-            return trace.getNext(ctx);
-        }
-
-    }
-
-    private static IViewPart getViewPart(final String viewTile) {
-        final IViewPart[] vps = new IViewPart[1];
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                IViewReference[] viewRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
-                for (IViewReference viewRef : viewRefs) {
-                    IViewPart vp = viewRef.getView(true);
-                    if (vp.getTitle().equals(viewTile)) {
-                        vps[0] = vp;
-                        return;
-                    }
-                }
-            }
-        });
-
-        return vps[0];
-    }
-
-    private static IViewReference getViewPartRef(final String viewTile) {
-        final IViewReference[] vrs = new IViewReference[1];
-        UIThreadRunnable.syncExec(new VoidResult() {
-            @Override
-            public void run() {
-                IViewReference[] viewRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
-                for (IViewReference viewRef : viewRefs) {
-                    IViewPart vp = viewRef.getView(true);
-                    if (vp.getTitle().equals(viewTile)) {
-                        vrs[0] = viewRef;
-                        return;
-                    }
-                }
-            }
-        });
-
-        return vrs[0];
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java b/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java
deleted file mode 100644 (file)
index 32e2ffc..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Matthew Khouzam - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-import org.eclipse.tracecompass.internal.tmf.pcap.ui.NetworkingPerspectiveFactory;
-import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView;
-import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.AbstractPerspectiveChecker;
-import org.eclipse.tracecompass.tmf.ui.views.colors.ColorsView;
-import org.eclipse.tracecompass.tmf.ui.views.filter.FilterView;
-import org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView;
-import org.eclipse.tracecompass.tmf.ui.views.statistics.TmfStatisticsView;
-import org.eclipse.ui.IPageLayout;
-import org.junit.Before;
-
-/**
- * Tracing perspective view checker
- *
- * @author Matthew Khouzam
- */
-public class NetworkPerspectiveChecker extends AbstractPerspectiveChecker {
-
-    /**
-     * Set up arrays for test
-     */
-    @Before
-    public void init() {
-        fPerspectiveId = NetworkingPerspectiveFactory.ID;
-        fViewIds = new ArrayList<>();
-        fViewIds.addAll(Arrays.asList(new String[] {
-                // TMF views
-                HistogramView.ID,
-                TmfStatisticsView.ID,
-                FilterView.ID,
-                ColorsView.ID,
-                // PCAP
-                StreamListView.ID,
-                // Standard Eclipse views
-                IPageLayout.ID_PROJECT_EXPLORER,
-                IPageLayout.ID_PROP_SHEET,
-                IPageLayout.ID_BOOKMARKS
-        }));
-    }
-}
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/.classpath b/org.eclipse.tracecompass.tmf.pcap.ui/.classpath
deleted file mode 100644 (file)
index 098194c..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
-       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-       <classpathentry kind="src" path="src"/>
-       <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/.project b/org.eclipse.tracecompass.tmf.pcap.ui/.project
deleted file mode 100644 (file)
index 3a29736..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.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.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644 (file)
index a2b5e6b..0000000
+++ /dev/null
@@ -1,405 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.codeComplete.argumentPrefixes=
-org.eclipse.jdt.core.codeComplete.argumentSuffixes=
-org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
-org.eclipse.jdt.core.codeComplete.fieldSuffixes=
-org.eclipse.jdt.core.codeComplete.localPrefixes=
-org.eclipse.jdt.core.codeComplete.localSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
-org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
-org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
-org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
-org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
-org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
-org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
-org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.7
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.doc.comment.support=enabled
-org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
-org.eclipse.jdt.core.compiler.problem.deadCode=error
-org.eclipse.jdt.core.compiler.problem.deprecation=error
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=error
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
-org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
-org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
-org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
-org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
-org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
-org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
-org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
-org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
-org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
-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=error
-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.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644 (file)
index 232a3fd..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-eclipse.preferences.version=1
-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
-formatter_profile=_tmf-style
-formatter_settings_version=12
-org.eclipse.jdt.ui.exception.name=e
-org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.keywordthis=false
-org.eclipse.jdt.ui.overrideannotation=true
-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.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs b/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs
deleted file mode 100644 (file)
index acc3abd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error
-ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error
-ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error
-API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error
-API_USE_SCAN_FIELD_SEVERITY=Error
-API_USE_SCAN_METHOD_SEVERITY=Error
-API_USE_SCAN_TYPE_SEVERITY=Error
-CLASS_ELEMENT_TYPE_ADDED_METHOD=Error
-CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error
-CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error
-CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error
-CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error
-ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error
-ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error
-ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-FIELD_ELEMENT_TYPE_ADDED_VALUE=Error
-FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error
-FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error
-FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error
-FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error
-ILLEGAL_EXTEND=Warning
-ILLEGAL_IMPLEMENT=Warning
-ILLEGAL_INSTANTIATE=Warning
-ILLEGAL_OVERRIDE=Warning
-ILLEGAL_REFERENCE=Warning
-INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error
-INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error
-INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error
-INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-INVALID_JAVADOC_TAG=Warning
-INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning
-LEAK_EXTEND=Warning
-LEAK_FIELD_DECL=Warning
-LEAK_IMPLEMENT=Warning
-LEAK_METHOD_PARAM=Warning
-LEAK_METHOD_RETURN_TYPE=Warning
-METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error
-METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error
-METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error
-METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error
-METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error
-METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error
-METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error
-MISSING_EE_DESCRIPTIONS=Ignore
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error
-TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error
-UNUSED_PROBLEM_FILTERS=Warning
-automatically_removed_unused_problem_filters=false
-eclipse.preferences.version=1
-incompatible_api_component_version=Error
-incompatible_api_component_version_include_major_without_breaking_change=Disabled
-incompatible_api_component_version_include_minor_without_api_change=Disabled
-invalid_since_tag_version=Error
-malformed_since_tag=Error
-missing_since_tag=Error
-report_api_breakage_when_major_version_incremented=Disabled
-report_resolution_errors_api_component=Warning
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.prefs b/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.prefs
deleted file mode 100644 (file)
index d92b94f..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-compilers.f.unresolved-features=1
-compilers.f.unresolved-plugins=1
-compilers.incompatible-environment=1
-compilers.p.build=1
-compilers.p.build.bin.includes=1
-compilers.p.build.encodings=2
-compilers.p.build.java.compiler=2
-compilers.p.build.java.compliance=1
-compilers.p.build.missing.output=2
-compilers.p.build.output.library=1
-compilers.p.build.source.library=1
-compilers.p.build.src.includes=1
-compilers.p.deprecated=1
-compilers.p.discouraged-class=1
-compilers.p.internal=1
-compilers.p.missing-packages=1
-compilers.p.missing-version-export-package=2
-compilers.p.missing-version-import-package=2
-compilers.p.missing-version-require-bundle=2
-compilers.p.no-required-att=0
-compilers.p.not-externalized-att=1
-compilers.p.unknown-attribute=1
-compilers.p.unknown-class=1
-compilers.p.unknown-element=1
-compilers.p.unknown-identifier=1
-compilers.p.unknown-resource=1
-compilers.p.unresolved-ex-points=0
-compilers.p.unresolved-import=0
-compilers.s.create-docs=false
-compilers.s.doc-folder=doc
-compilers.s.open-tags=1
-eclipse.preferences.version=1
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/META-INF/MANIFEST.MF b/org.eclipse.tracecompass.tmf.pcap.ui/META-INF/MANIFEST.MF
deleted file mode 100644 (file)
index 70287a2..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-Vendor: %Bundle-Vendor
-Bundle-Version: 1.0.0.qualifier
-Bundle-Localization: plugin
-Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.ui;singleton:=true
-Bundle-Activator: org.eclipse.tracecompass.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.tracecompass.common.core,
- org.eclipse.tracecompass.tmf.core,
- org.eclipse.tracecompass.tmf.ui,
- org.eclipse.tracecompass.tmf.pcap.core
-Export-Package: org.eclipse.tracecompass.internal.tmf.pcap.ui;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests",
- org.eclipse.tracecompass.internal.tmf.pcap.ui.stream;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests"
-Import-Package: com.google.common.collect
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/about.html b/org.eclipse.tracecompass.tmf.pcap.ui/about.html
deleted file mode 100644 (file)
index 28737f6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 5, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content.  Check the Redistributor's license that was
-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/build.properties b/org.eclipse.tracecompass.tmf.pcap.ui/build.properties
deleted file mode 100644 (file)
index 9d5346e..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .,\
-               about.html,\
-               plugin.properties,\
-               plugin.xml,\
-               icons/
-src.includes = about.html
-additional.bundles = org.eclipse.jdt.annotation
-jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png b/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png
deleted file mode 100644 (file)
index 56f18da..0000000
Binary files a/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png and /dev/null differ
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png b/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png
deleted file mode 100644 (file)
index 208cc69..0000000
Binary files a/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png and /dev/null differ
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png b/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png
deleted file mode 100644 (file)
index affe9d1..0000000
Binary files a/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png and /dev/null differ
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif b/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif
deleted file mode 100644 (file)
index 1ef74cf..0000000
Binary files a/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif and /dev/null differ
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/plugin.properties b/org.eclipse.tracecompass.tmf.pcap.ui/plugin.properties
deleted file mode 100644 (file)
index 1ceaf25..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-Bundle-Vendor = Eclipse Trace Compass
-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
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/plugin.xml b/org.eclipse.tracecompass.tmf.pcap.ui/plugin.xml
deleted file mode 100644 (file)
index 84ccf31..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-<?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">
-      </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.tracecompass.internal.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.tracecompass.internal.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.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
-            id="org.eclipse.linuxtools.tmf.pcap.ui.view.stream.list">
-         <analysisModuleClass
-               class="org.eclipse.tracecompass.internal.tmf.pcap.core.analysis.StreamListAnalysis">
-         </analysisModuleClass>
-      </output>
-   </extension>
-
-</plugin>
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/pom.xml b/org.eclipse.tracecompass.tmf.pcap.ui/pom.xml
deleted file mode 100644 (file)
index b52451c..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?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>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>org.eclipse.tracecompass.tmf.pcap.ui</artifactId>
-  <version>1.0.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.tracecompass</groupId>
-</project>
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/Activator.java b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/Activator.java
deleted file mode 100644 (file)
index b05627a..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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.tracecompass.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.tracecompass.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.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/NetworkingPerspectiveFactory.java b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/NetworkingPerspectiveFactory.java
deleted file mode 100644 (file)
index d67631a..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.ui;
-
-import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
-
-import org.eclipse.jdt.annotation.Nullable;
-import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView;
-import org.eclipse.tracecompass.tmf.ui.project.wizards.NewTmfProjectWizard;
-import org.eclipse.tracecompass.tmf.ui.views.colors.ColorsView;
-import org.eclipse.tracecompass.tmf.ui.views.filter.FilterView;
-import org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView;
-import org.eclipse.tracecompass.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
-    private static final String PROJECT_VIEW_ID = checkNotNull(IPageLayout.ID_PROJECT_EXPLORER);
-    private static final String PROPERTIES_VIEW_ID = checkNotNull(IPageLayout.ID_PROP_SHEET);
-    private static final String BOOKMARKS_VIEW_ID = checkNotNull(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.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/package-info.java b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/package-info.java
deleted file mode 100644 (file)
index 0106fac..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.ui;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/Messages.java b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/Messages.java
deleted file mode 100644 (file)
index f0880db..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms of the Eclipse Public License v1.0 which
- * accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *   Vincent Perot - Initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.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.tracecompass.internal.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.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/StreamListView.java b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/StreamListView.java
deleted file mode 100644 (file)
index 54c312b..0000000
+++ /dev/null
@@ -1,517 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014, 2015 Ericsson
- *
- * All rights reserved. This program and the accompanying materials are
- * made available under the terms 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
- *   Patrick Tasse - Support aspect filters
- *******************************************************************************/
-
-package org.eclipse.tracecompass.internal.tmf.pcap.ui.stream;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.jdt.annotation.Nullable;
-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.tracecompass.internal.tmf.pcap.core.analysis.StreamListAnalysis;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStream;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStreamBuilder;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapDestinationAspect;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapSourceAspect;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.signal.TmfPacketStreamSelectedSignal;
-import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
-import org.eclipse.tracecompass.internal.tmf.pcap.ui.Activator;
-import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
-import org.eclipse.tracecompass.tmf.core.filter.model.ITmfFilterTreeNode;
-import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterAndNode;
-import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterAspectNode;
-import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterContainsNode;
-import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterNode;
-import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterOrNode;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler;
-import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
-import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
-import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
-import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
-import org.eclipse.tracecompass.tmf.ui.project.model.TraceUtils;
-import org.eclipse.tracecompass.tmf.ui.views.TmfView;
-import org.eclipse.tracecompass.tmf.ui.views.filter.FilterManager;
-import org.eclipse.tracecompass.tmf.ui.views.filter.FilterView;
-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;
-
-import com.google.common.collect.Lists;
-
-/**
- * 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<TmfPcapProtocol, 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 = TmfTraceUtils.getAnalysisModuleOfClass(trace, 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<TmfPcapProtocol, Table> tableMap = fTableMap;
-                if (tableMap == null) {
-                    return;
-                }
-                for (Table table : tableMap.values()) {
-                    if (!table.isDisposed()) {
-                        table.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 = TmfTraceUtils.getAnalysisModuleOfClass(trace, StreamListAnalysis.class, StreamListAnalysis.ID);
-                if (analysis == null) {
-                    return;
-                }
-
-                Map<TmfPcapProtocol, Table> tables = fTableMap;
-                if (tables == null) {
-                    return;
-                }
-                for (Entry<TmfPcapProtocol, Table> protocolEntry : tables.entrySet()) {
-                    TmfPcapProtocol protocol = protocolEntry.getKey();
-                    if (protocol == null) {
-                        throw new IllegalStateException();
-                    }
-                    TmfPacketStreamBuilder builder = analysis.getBuilder(protocol);
-                    Table table = protocolEntry.getValue();
-                    if (builder != null && !(table.isDisposed())) {
-                        for (TmfPacketStream stream : builder.getStreams()) {
-
-                            TableItem item;
-                            if (stream.getID() < table.getItemCount()) {
-                                item = table.getItem(stream.getID());
-                            } else {
-                                item = new TableItem(table, 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 = TmfTraceManager.getInstance().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<TmfPcapProtocol, Table> tables = fTableMap;
-                if (tables == null || e == null) {
-                    return;
-                }
-                TmfPcapProtocol protocol = (TmfPcapProtocol) e.item.getData(KEY_PROTOCOL);
-                tables.get(protocol).deselectAll();
-                fCurrentStream = null;
-            }
-
-        });
-
-        // Add items and tables for each protocol
-        for (TmfPcapProtocol protocol : TmfPcapProtocol.values()) {
-            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<TmfPcapProtocol, 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> filters = Lists.newArrayList(FilterManager.getSavedFilters());
-                        boolean newFilter = true;
-                        for (ITmfFilterTreeNode savedFilter : filters) {
-                            // Use toString(explicit) equality because equals() is not implemented
-                            if (savedFilter.toString(true).equals(filter.toString(true))) {
-                                newFilter = false;
-                                break;
-                            }
-                        }
-                        if (newFilter) {
-                            filters.add(filter);
-                            FilterManager.setSavedFilters(filters.toArray(new ITmfFilterTreeNode[filters.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.setEventAspect(ITmfEventAspect.BaseAspects.CONTENTS.forField(stream.getProtocol().getName()));
-                        protocolFilter.setTraceTypeId(TmfFilterAspectNode.BASE_ASPECT_ID);
-                        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.setEventAspect(PcapSourceAspect.INSTANCE);
-                        endpointAAndA.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
-                        endpointAAndA.setValue(stream.getFirstEndpoint());
-                        TmfFilterContainsNode endpointBAndA = new TmfFilterContainsNode(andA);
-                        endpointBAndA.setEventAspect(PcapDestinationAspect.INSTANCE);
-                        endpointBAndA.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
-                        endpointBAndA.setValue(stream.getSecondEndpoint());
-                        TmfFilterContainsNode endpointAAndB = new TmfFilterContainsNode(andB);
-                        endpointAAndB.setEventAspect(PcapSourceAspect.INSTANCE);
-                        endpointAAndB.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
-                        endpointAAndB.setValue(stream.getSecondEndpoint());
-                        TmfFilterContainsNode endpointBAndB = new TmfFilterContainsNode(andB);
-                        endpointBAndB.setEventAspect(PcapDestinationAspect.INSTANCE);
-                        endpointBAndB.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
-                        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.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/messages.properties b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/messages.properties
deleted file mode 100644 (file)
index 2ceb87c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-###############################################################################
-# Copyright (c) 2014 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-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.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/package-info.java b/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/package-info.java
deleted file mode 100644 (file)
index 026591b..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2014 Ericsson
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *    Ericsson - Initial API and implementation
- *******************************************************************************/
-
-@org.eclipse.jdt.annotation.NonNullByDefault
-package org.eclipse.tracecompass.internal.tmf.pcap.ui.stream;
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap/.project b/org.eclipse.tracecompass.tmf.pcap/.project
deleted file mode 100644 (file)
index 4da7509..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-       <name>org.eclipse.tracecompass.tmf.pcap</name>
-       <comment></comment>
-       <projects>
-       </projects>
-       <buildSpec>
-               <buildCommand>
-                       <name>org.eclipse.pde.FeatureBuilder</name>
-                       <arguments>
-                       </arguments>
-               </buildCommand>
-       </buildSpec>
-       <natures>
-               <nature>org.eclipse.pde.FeatureNature</nature>
-       </natures>
-</projectDescription>
diff --git a/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.resources.prefs b/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.resources.prefs
deleted file mode 100644 (file)
index 99f26c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-encoding/<project>=UTF-8
diff --git a/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.runtime.prefs
deleted file mode 100644 (file)
index 5a0ad22..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-line.separator=\n
diff --git a/org.eclipse.tracecompass.tmf.pcap/build.properties b/org.eclipse.tracecompass.tmf.pcap/build.properties
deleted file mode 100644 (file)
index 43f158a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2014, 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-bin.includes = feature.xml,\
-               feature.properties,\
-               p2.inf
-src.includes = sourceTemplateFeature/p2.inf
diff --git a/org.eclipse.tracecompass.tmf.pcap/feature.properties b/org.eclipse.tracecompass.tmf.pcap/feature.properties
deleted file mode 100644 (file)
index 7097cf6..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-###############################################################################
-# Copyright (c) 2015 Ericsson
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-#     Ericsson - Initial API and implementation
-###############################################################################
-
-featureName=Pcap (Packet Capture Format) Analysis
-
-description=Plug-ins to integrate PCAP into the workbench.
-
-featureProvider=Eclipse Trace Compass
-
-copyright=Copyright 2015 Ericsson
-
diff --git a/org.eclipse.tracecompass.tmf.pcap/feature.xml b/org.eclipse.tracecompass.tmf.pcap/feature.xml
deleted file mode 100644 (file)
index 8f93afa..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
-      id="org.eclipse.tracecompass.tmf.pcap"
-      label="%featureName"
-      version="1.0.0.qualifier"
-      provider-name="%featureProvider"
-      license-feature="org.eclipse.license"
-      license-feature-version="0.0.0">
-
-   <description url="http://www.example.com/description">
-      %description
-   </description>
-
-   <copyright url="http://www.example.com/copyright">
-      %copyright
-   </copyright>
-
-   <license url="%licenseURL">
-      %license
-   </license>
-
-   <includes
-         id="org.eclipse.tracecompass.tmf"
-         version="0.0.0"/>
-
-   <requires>
-      <import plugin="org.eclipse.core.runtime"/>
-      <import plugin="org.eclipse.core.resources"/>
-      <import plugin="com.google.guava"/>
-      <import plugin="org.eclipse.ui"/>
-      <import plugin="org.eclipse.ui.ide"/>
-      <import plugin="org.eclipse.tracecompass.tmf.core" version="1.0.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.tracecompass.tmf.ui" version="1.0.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.tracecompass.tmf.pcap.core" version="1.0.0" match="greaterOrEqual"/>
-      <import plugin="org.eclipse.tracecompass.pcap.core" version="1.0.0" match="greaterOrEqual"/>
-   </requires>
-
-   <plugin
-         id="org.eclipse.tracecompass.pcap.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"/>
-
-   <plugin
-         id="org.eclipse.tracecompass.tmf.pcap.ui"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.tracecompass.tmf.pcap.core"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"
-         unpack="false"/>
-
-   <plugin
-         id="org.eclipse.tracecompass.tmf.pcap.doc.user"
-         download-size="0"
-         install-size="0"
-         version="0.0.0"/>
-
-</feature>
diff --git a/org.eclipse.tracecompass.tmf.pcap/p2.inf b/org.eclipse.tracecompass.tmf.pcap/p2.inf
deleted file mode 100644 (file)
index c94906f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.tmf.pcap.feature.group' || pc.name == 'org.eclipse.tracecompass.tmf.pcap.feature.group'))
\ No newline at end of file
diff --git a/org.eclipse.tracecompass.tmf.pcap/pom.xml b/org.eclipse.tracecompass.tmf.pcap/pom.xml
deleted file mode 100644 (file)
index 56d6ce6..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Copyright (C) 2011, 2014 Red Hat, Inc, Ericsson.
-
-   All rights reserved. This program and the accompanying materials
-   are made available under the terms of the Eclipse Public License v1.0
-   which accompanies this distribution, and is available at
-   http://www.eclipse.org/legal/epl-v10.html
--->
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <artifactId>org.eclipse.tracecompass</artifactId>
-    <groupId>org.eclipse.tracecompass</groupId>
-    <version>1.0.0-SNAPSHOT</version>
-  </parent>
-
-  <name>Trace Compass Pcap Analysis Feature</name>
-  <artifactId>org.eclipse.tracecompass.tmf.pcap</artifactId>
-  <groupId>org.eclipse.tracecompass</groupId>
-  <version>1.0.0-SNAPSHOT</version>
-
-  <packaging>eclipse-feature</packaging>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.eclipse.tycho.extras</groupId>
-        <artifactId>tycho-source-feature-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>source-feature</id>
-            <phase>package</phase>
-            <goals>
-              <goal>source-feature</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.eclipse.tycho</groupId>
-        <artifactId>tycho-p2-plugin</artifactId>
-        <version>${tycho-version}</version>
-        <executions>
-          <execution>
-            <id>attached-p2-metadata</id>
-            <phase>package</phase>
-            <goals>
-              <goal>p2-metadata</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-</project>
diff --git a/org.eclipse.tracecompass.tmf.pcap/sourceTemplateFeature/p2.inf b/org.eclipse.tracecompass.tmf.pcap/sourceTemplateFeature/p2.inf
deleted file mode 100644 (file)
index e5f2fbd..0000000
+++ /dev/null
@@ -1 +0,0 @@
-update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.tmf.pcap.source.feature.group' || pc.name == 'org.eclipse.tracecompass.tmf.pcap.source.feature.group'))
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/.classpath b/pcap/org.eclipse.tracecompass.pcap.core.tests/.classpath
new file mode 100644 (file)
index 0000000..8fbc9a2
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="perf"/>
+       <classpathentry kind="src" path="shared"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/.project b/pcap/org.eclipse.tracecompass.pcap.core.tests/.project
new file mode 100644 (file)
index 0000000..76c8be9
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.pcap.core.tests</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.pcap.core.tests/.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/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.pcap.core.tests/.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/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs b/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0409c61
--- /dev/null
@@ -0,0 +1,403 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+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=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs b/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/pcap/org.eclipse.tracecompass.pcap.core.tests/.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/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.prefs b/pcap/org.eclipse.tracecompass.pcap.core.tests/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..62cfa90
--- /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=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/META-INF/MANIFEST.MF b/pcap/org.eclipse.tracecompass.pcap.core.tests/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..d0cf8eb
--- /dev/null
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.pcap.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.pcap.core
+Export-Package: org.eclipse.tracecompass.pcap.core.tests,
+ org.eclipse.tracecompass.pcap.core.tests.file;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.packet;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.perf,
+ org.eclipse.tracecompass.pcap.core.tests.perf.trace;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol.ethernet2;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol.ipv4;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol.pcap;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol.tcp;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol.udp;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.protocol.unknown;x-internal:=true,
+ org.eclipse.tracecompass.pcap.core.tests.shared;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests",
+ org.eclipse.tracecompass.pcap.core.tests.stream;x-internal:=true
+Import-Package: com.google.common.collect,
+ org.eclipse.test.performance
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/about.html b/pcap/org.eclipse.tracecompass.pcap.core.tests/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/pcap/org.eclipse.tracecompass.pcap.core.tests/build.properties b/pcap/org.eclipse.tracecompass.pcap.core.tests/build.properties
new file mode 100644 (file)
index 0000000..15b000d
--- /dev/null
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/,\
+           perf/,\
+           shared/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties,\
+               about.html
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/AllPerfTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/AllPerfTests.java
new file mode 100644 (file)
index 0000000..2b1da2b
--- /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 implementation and API
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.pcap.core.tests.perf;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Run all performance test suites.
+ *
+ * @author Vincent Perot
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        org.eclipse.tracecompass.pcap.core.tests.perf.trace.AllTests.class
+})
+public class AllPerfTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/AllTests.java
new file mode 100644 (file)
index 0000000..a4b4c92
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.perf.trace;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        PcapReadBenchmark.class,
+        PcapSeekBenchmark.class
+})
+public class AllTests {
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapReadBenchmark.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapReadBenchmark.java
new file mode 100644 (file)
index 0000000..da5530f
--- /dev/null
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.perf.trace;
+
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * Benchmark of the Pcap parser for reading a trace. Note: We should get a
+ * bigger trace. One that has WAYYYY more events since this current trace is
+ * just parsed too fast.
+ *
+ * @author Vincent Perot
+ */
+public class PcapReadBenchmark {
+
+    private static final String TEST_SUITE_NAME = "Pcap Read Benchmark";
+    private static final String TEST_ID = "org.eclipse.linuxtools#" + TEST_SUITE_NAME;
+    private static final int LOOP_COUNT = 25;
+    private static final int RUN_BETWEEN_COMMIT_COUNT = 15;
+
+    /**
+     * Benchmark reading the pcap trace
+     */
+    @Test
+    public void testPcapTrace() {
+        readTrace(PcapTestTrace.BENCHMARK_TRACE, "trace-pcap", true);
+    }
+
+    private static void readTrace(PcapTestTrace testTrace, String testName, boolean inGlobalSummary) {
+        assumeTrue(testTrace.exists());
+
+        Performance perf = Performance.getDefault();
+        PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + '#' + testName);
+        perf.tagAsSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
+
+        if (inGlobalSummary) {
+            perf.tagAsGlobalSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
+        }
+
+        for (int loop = 0; loop < LOOP_COUNT; loop++) {
+            pm.start();
+            try (PcapFile trace = testTrace.getTrace();) {
+                for (int i = 0; i < RUN_BETWEEN_COMMIT_COUNT; i++) {
+                    trace.seekPacket(0);
+                    while (trace.hasNextPacket()) {
+                        Packet packet = trace.parseNextPacket();
+                        if (packet == null) {
+                            fail("Test failed at iteration " + loop + '.' + i + ", at packet " + trace.getCurrentRank());
+                            return;
+                        }
+                        /* Do something with the packet because we are awesome */
+                        packet.getPayload();
+                    }
+                }
+            } catch (IOException | BadPcapFileException | BadPacketException e) {
+                fail("Test failed at iteration " + loop + ':' + e.getMessage());
+            }
+            pm.stop();
+        }
+        pm.commit();
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapSeekBenchmark.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/perf/org/eclipse/tracecompass/pcap/core/tests/perf/trace/PcapSeekBenchmark.java
new file mode 100644 (file)
index 0000000..d4a5fdc
--- /dev/null
@@ -0,0 +1,110 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.perf.trace;
+
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Random;
+
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.Performance;
+import org.eclipse.test.performance.PerformanceMeter;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * Tests for performance regressions of the pcap reader. It only tests the pcap
+ * reader, not tmf. <br>
+ * This test runs in 3 passes.
+ * <ul>
+ * <li>first it opens a trace</li>
+ * <li>then it reads the trace completely</li>
+ * <li>then it randomly (seeded) seeks NB_SEEKS locations in the trace and reads
+ * one event at each position.</li>
+ * </ul>
+ * <li>Note: We should make more seeks, since the current number is just too
+ * fast.</li>
+ *
+ * @author Vincent Perot
+ */
+public class PcapSeekBenchmark {
+
+    private static final Random RND = new Random(1000);
+
+    private static final int LOOP_COUNT = 25;
+    private static final int NB_SEEKS = 1000000;
+    private static final String TEST_SUITE_NAME = "Pcap Read & Seek Benchmark (" + NB_SEEKS + " seeks)";
+    private static final String TEST_ID = "org.eclipse.linuxtools#" + TEST_SUITE_NAME;
+
+    /**
+     * Run the benchmark scenario for the pcap trace.
+     */
+    @Test
+    public void testPcapTrace() {
+        readAndSeekTrace(PcapTestTrace.BENCHMARK_TRACE, "trace-pcap", true);
+    }
+
+    private static void readAndSeekTrace(PcapTestTrace testTrace, String testName, boolean inGlobalSummary) {
+        assumeTrue(testTrace.exists());
+
+        Performance perf = Performance.getDefault();
+        PerformanceMeter pm = perf.createPerformanceMeter(TEST_ID + '#' + testName);
+        perf.tagAsSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
+
+        if (inGlobalSummary) {
+            perf.tagAsGlobalSummary(pm, TEST_SUITE_NAME + ':' + testName, Dimension.CPU_TIME);
+        }
+
+        for (int loop = 0; loop < LOOP_COUNT; loop++) {
+            try (PcapFile trace = testTrace.getTrace()) {
+                trace.seekPacket(0);
+
+                /* Read the whole trace to find out the number of packets */
+                long nbPackets = trace.getTotalNbPackets();
+
+                /* Generate the timestamps we will seek to */
+                List<Long> seekTimestamps = new LinkedList<>();
+                final long range = nbPackets;
+                for (int i = 0; i < NB_SEEKS; i++) {
+                    long rank = (RND.nextLong() % range);
+                    if (rank < 0) {
+                        // This is needed since modulus can return a negative
+                        // number.
+                        rank += range;
+                    }
+                    seekTimestamps.add(rank);
+                }
+
+                /* Benchmark seeking to the generated timestamps */
+                pm.start();
+                for (Long rank : seekTimestamps) {
+                    trace.seekPacket(rank);
+                    trace.parseNextPacket();
+                }
+                pm.stop();
+
+            } catch (IOException | BadPcapFileException | BadPacketException e) {
+                /* Should not happen if assumeTrue() passed above */
+                fail("Test failed at iteration " + loop + ':' + e.getMessage());
+            }
+        }
+        pm.commit();
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/plugin.properties b/pcap/org.eclipse.tracecompass.pcap.core.tests/plugin.properties
new file mode 100644 (file)
index 0000000..8f0d91d
--- /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
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass Pcap Parser Core Tests Plug-in
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/pom.xml b/pcap/org.eclipse.tracecompass.pcap.core.tests/pom.xml
new file mode 100644 (file)
index 0000000..b7d5e2b
--- /dev/null
@@ -0,0 +1,116 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.pcap.core.tests</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-test-plugin</packaging>
+
+  <name>Trace Compass Pcap Parser Core Tests Plug-in</name>
+
+  <!-- Do not download the test traces if "maven.test.skip" is set -->
+  <profiles>
+    <profile>
+      <id>download-traces</id>
+      <activation>
+        <property>
+          <name>!maven.test.skip</name>
+        </property>
+      </activation>
+
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.8</version>
+            <executions>
+              <execution>
+                <id>prepare</id>
+                <phase>pre-integration-test</phase>
+                <configuration>
+                  <target>
+                    <ant antfile="get-traces.xml" dir="rsc" />
+                  </target>
+                </configuration>
+                <goals>
+                  <goal>run</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+  </profiles>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-surefire-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <configuration>
+          <testSuite>org.eclipse.tracecompass.pcap.core.tests</testSuite>
+          <testClass>org.eclipse.tracecompass.pcap.core.tests.AllPcapCoreTests</testClass>
+          <useUIHarness>false</useUIHarness>
+          <useUIThread>false</useUIThread>
+          <product>org.eclipse.platform.ide</product>
+        </configuration>
+      </plugin>
+
+      <!-- We don't use the ant file to clean because of http://jira.codehaus.org/browse/MANTRUN-78 -->
+      <plugin>
+        <artifactId>maven-clean-plugin</artifactId>
+        <version>2.6.1</version>
+        <executions>
+          <execution>
+            <id>clean-traces</id>
+            <phase>clean</phase>
+            <configuration>
+              <filesets>
+                <fileset>
+                  <directory>rsc</directory>
+                  <includes>
+                    <include>*.zip</include>
+                    <include>*.pcap</include>
+                    <include>*.cap</include>
+                    <include>*.tar*</include>
+                  </includes>
+                  <excludes>
+                    <exclude>*.xml</exclude>
+                    <exclude>*.sh</exclude>
+                  </excludes>
+                </fileset>
+                <fileset><directory>rsc/kernel</directory></fileset>
+              </filesets>
+            </configuration>
+            <goals>
+              <goal>clean</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
+    </plugins>
+  </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/rsc/.gitignore b/pcap/org.eclipse.tracecompass.pcap.core.tests/rsc/.gitignore
new file mode 100644 (file)
index 0000000..a8ddf0a
--- /dev/null
@@ -0,0 +1,5 @@
+*.zip
+*.pcap
+*.cap
+*.tar*
+/kernel
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/rsc/get-traces.xml b/pcap/org.eclipse.tracecompass.pcap.core.tests/rsc/get-traces.xml
new file mode 100644 (file)
index 0000000..73d7df9
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+   Copyright (C) 2013, Red Hat, Inc. and others
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<!--
+Most traces are taken from the Wireshark website and are available under the GNU General Public License.
+http://wiki.wireshark.org/SampleCaptures
+-->
+
+<project name="Extract Traces" default="main" >
+
+<target name="main">
+  <echo message="Attempting to download test traces"/>
+  <get ignoreerrors="true" maxtime="20" dest="Short_LittleEndian.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/1/18/Short_LittleEndian.pcap.zip" />
+  <get ignoreerrors="true" maxtime="20" dest="Short_BigEndian.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/2/25/Short_BigEndian.pcap.zip" />
+  <get ignoreerrors="true" maxtime="20" dest="MostlyUDP.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/6/64/MostlyUDP.pcap.zip" />
+  <get ignoreerrors="true" maxtime="20" dest="MostlyTCP.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/8/8d/MostlyTCP.pcap.zip" />
+  <get ignoreerrors="true" maxtime="20" dest="EmptyPcap.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/c/c1/EmptyPcap.pcap.zip" />
+  <get ignoreerrors="true" maxtime="20" dest="BadPcapFile.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/5/5e/BadPcapFile.pcap.zip" />
+  <get ignoreerrors="true" maxtime="60" dest="BenchmarkTrace.pcap.zip" skipexisting="true" src="http://wiki.eclipse.org/images/1/12/BenchmarkTrace.pcap.zip" />
+  <get ignoreerrors="true" maxtime="20" dest="sample-ctf-trace-20120412.tar.bz2" skipexisting="true" src="http://lttng.org/files/samples/sample-ctf-trace-20120412.tar.bz2"/>
+  <condition property="testSuiteExists">
+    <and>
+      <available file="pcap-testsuite" type="dir"/>
+    </and>
+  </condition>
+  <condition property="tracesExist">
+    <and>
+        <available file="Short_LittleEndian.pcap.zip"/>
+        <available file="Short_BigEndian.pcap.zip"/>
+        <available file="MostlyUDP.pcap.zip"/>
+        <available file="MostlyTCP.pcap.zip"/>
+        <available file="EmptyPcap.pcap.zip"/>
+        <available file="BadPcapFile.pcap.zip"/>
+        <available file="BenchmarkTrace.pcap.zip"/>
+        <available file="sample-ctf-trace-20120412.tar.bz2"/>
+    </and>
+  </condition>
+  <antcall target="extractTraces"/>
+</target>
+
+<target name="extractTraces" if="tracesExist">
+    <unzip src="Short_LittleEndian.pcap.zip" dest="." />
+    <unzip src="Short_BigEndian.pcap.zip" dest="." />
+    <unzip src="MostlyUDP.pcap.zip" dest="." />
+    <unzip src="MostlyTCP.pcap.zip" dest="." />
+    <unzip src="EmptyPcap.pcap.zip" dest="." />
+    <unzip src="BadPcapFile.pcap.zip" dest="." />
+    <unzip src="BenchmarkTrace.pcap.zip" dest="." />
+    <bunzip2 src="sample-ctf-trace-20120412.tar.bz2"/>
+    <untar src="sample-ctf-trace-20120412.tar" dest="." />
+    <echo message="Traces extracted successfully"/>
+</target>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/shared/org/eclipse/tracecompass/pcap/core/tests/shared/PcapTestTrace.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/shared/org/eclipse/tracecompass/pcap/core/tests/shared/PcapTestTrace.java
new file mode 100644 (file)
index 0000000..61b0425
--- /dev/null
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.shared;
+
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+
+/**
+ * Here is the list of the available test traces for the Pcap parser.
+ *
+ * @author Vincent Perot
+ */
+public enum PcapTestTrace {
+
+    /** A bad pcap file. */
+    BAD_PCAPFILE("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "BadPcapFile.pcap"),
+
+    /** A Valid Pcap that is empty. */
+    EMPTY_PCAP("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "EmptyPcap.pcap"),
+
+    /** A Pcap that mostly contains TCP packets. */
+    MOSTLY_TCP("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "mostlyTCP.pcap"),
+
+    /** A Pcap that mostly contains UDP packets. */
+    MOSTLY_UDP("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "mostlyUDP.pcap"),
+
+    /** A big-endian trace that contains two packets. */
+    SHORT_BIG_ENDIAN("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "Short_BigEndian.pcap"),
+
+    /** A little-endian trace that contains two packets. */
+    SHORT_LITTLE_ENDIAN("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "Short_LittleEndian.pcap"),
+
+    /** A large trace for benchmarking. */
+    BENCHMARK_TRACE("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "benchmarkTrace.pcap"),
+
+    /** A Kernel trace directory. */
+    KERNEL_DIRECTORY("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "kernel"),
+
+    /** A Kernel trace file. */
+    KERNEL_TRACE("..", "org.eclipse.tracecompass.pcap.core.tests", "rsc", "kernel", "channel0_0");
+
+    private final @NonNull Path fPath;
+
+    private PcapTestTrace(@NonNull String first, String... more) {
+        @SuppressWarnings("null")
+        @NonNull Path path = FileSystems.getDefault().getPath(first, more);
+        fPath = path;
+    }
+
+    /** @return The path to the test trace */
+    public @NonNull Path getPath() {
+        return fPath;
+    }
+
+    /**
+     * Get a Pcap Trace instance of a test trace. Make sure to call
+     * {@link #exists()} before calling this!
+     *
+     * @return The PcapFile object
+     * @throws IOException
+     *             Thrown when some IO error occurs.
+     * @throws BadPcapFileException
+     *             Thrown when the file is not a valid Pcap File.
+     */
+    public PcapFile getTrace() throws BadPcapFileException, IOException {
+        return new PcapFile(fPath);
+    }
+
+    /**
+     * Check if this test trace actually exists on disk.
+     *
+     * @return If the trace exists
+     */
+    public boolean exists() {
+        if (Files.notExists(fPath)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/AllPcapCoreTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/AllPcapCoreTests.java
new file mode 100644 (file)
index 0000000..8aae4ab
--- /dev/null
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Master test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        org.eclipse.tracecompass.pcap.core.tests.file.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.packet.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.ethernet2.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.ipv4.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.pcap.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.tcp.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.udp.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.protocol.unknown.AllTests.class,
+        org.eclipse.tracecompass.pcap.core.tests.stream.AllTests.class
+})
+public class AllPcapCoreTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/AllTests.java
new file mode 100644 (file)
index 0000000..c04a036
--- /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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.pcap.core.tests.file;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * File test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        PcapFileOpenTest.class,
+        PcapFileOpenFailTest.class,
+        PcapFileReadTest.class,
+        PcapFileEndiannessTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileEndiannessTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileEndiannessTest.java
new file mode 100644 (file)
index 0000000..2ea3000
--- /dev/null
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.file;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteOrder;
+import java.nio.file.Path;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests whether the Pcap parser can read both big endian and
+ * little endian files.
+ *
+ * @author Vincent Perot
+ */
+public class PcapFileEndiannessTest {
+
+    /**
+     * Test that verify that two files with different endianness contain the
+     * same packets.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void EndiannessTest() throws IOException, BadPcapFileException, BadPacketException {
+        PcapTestTrace trace = PcapTestTrace.SHORT_LITTLE_ENDIAN;
+        assumeTrue(trace.exists());
+        Path path1 = trace.getPath();
+
+        trace = PcapTestTrace.SHORT_LITTLE_ENDIAN;
+        assumeTrue(trace.exists());
+        Path path2 = PcapTestTrace.SHORT_BIG_ENDIAN.getPath();
+
+        try (PcapFile littleEndian = new PcapFile(path1);
+                PcapFile bigEndian = new PcapFile(path2);) {
+            assertEquals(ByteOrder.BIG_ENDIAN, bigEndian.getByteOrder());
+            assertEquals(ByteOrder.LITTLE_ENDIAN, littleEndian.getByteOrder());
+            while (littleEndian.hasNextPacket() && bigEndian.hasNextPacket()) {
+                assertEquals(littleEndian.parseNextPacket(), bigEndian.parseNextPacket());
+            }
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenFailTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenFailTest.java
new file mode 100644 (file)
index 0000000..22f85c4
--- /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.tracecompass.pcap.core.tests.file;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests the opening of non-valid pcap files.
+ *
+ * @author Vincent Perot
+ */
+public class PcapFileOpenFailTest {
+
+    /**
+     * Test that tries to open a pcap with a bad magic number
+     *
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     */
+    @Test
+    public void FileOpenBadPcapTest() throws IOException {
+        PcapTestTrace trace = PcapTestTrace.BAD_PCAPFILE;
+        assumeTrue(trace.exists());
+
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+            fail("The pcap was accepted even though the magic number is invalid!");
+        } catch (BadPcapFileException e) {
+            assertEquals("c3d4a1b2 is not a known magic number.", e.getMessage());
+        }
+    }
+
+    /**
+     * Test that tries to open a non-pcap binary file
+     *
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     */
+    @Test
+    public void FileOpenBinaryFile() throws IOException {
+        PcapTestTrace trace = PcapTestTrace.KERNEL_TRACE;
+        assumeTrue(trace.exists());
+
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+            fail("The file was accepted even though it is not a pcap file!");
+        } catch (BadPcapFileException e) {
+            assertEquals("c11ffcc1 is not a known magic number.", e.getMessage());
+        }
+    }
+
+    /**
+     * Test that tries to open a directory
+     *
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     */
+    @Test
+    public void FileOpenDirectory() throws IOException {
+        PcapTestTrace trace = PcapTestTrace.KERNEL_DIRECTORY;
+        assumeTrue(trace.exists());
+
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+            fail("The file was accepted even though it is not a pcap file!");
+        } catch (BadPcapFileException e) {
+            assertEquals("Bad Pcap File.", e.getMessage());
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileOpenTest.java
new file mode 100644 (file)
index 0000000..342b5e1
--- /dev/null
@@ -0,0 +1,94 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.file;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteOrder;
+
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests the opening of valid pcap files.
+ *
+ * @author Vincent Perot
+ */
+public class PcapFileOpenTest {
+
+    /**
+     * Test that verify that an empty pcap file is properly opened and that the
+     * file properties are correct.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     */
+    @Test
+    public void FileOpenEmptyTest() throws IOException, BadPcapFileException {
+
+        PcapTestTrace trace = PcapTestTrace.EMPTY_PCAP;
+        assumeTrue(trace.exists());
+
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+            assertEquals(PcapTestTrace.EMPTY_PCAP.getPath(), file.getPath());
+            assertEquals(2, file.getMajorVersion());
+            assertEquals(4, file.getMinorVersion());
+            assertEquals(1, file.getDataLinkType());
+            assertEquals(65535, file.getSnapLength());
+            assertEquals(0, file.getTimeAccuracy());
+            assertEquals(0, file.getTimeZoneCorrection());
+            assertEquals(ByteOrder.LITTLE_ENDIAN, file.getByteOrder());
+
+            assertEquals(0, file.getTotalNbPackets());
+
+        }
+    }
+
+    /**
+     * Test that verify that an non-empty pcap file is properly opened and that
+     * the file properties are correct.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     */
+
+    @Test
+    public void FileOpenTest() throws IOException, BadPcapFileException {
+
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+            assertEquals(PcapTestTrace.MOSTLY_TCP.getPath(), file.getPath());
+            assertEquals(2, file.getMajorVersion());
+            assertEquals(4, file.getMinorVersion());
+            assertEquals(1, file.getDataLinkType());
+            assertEquals(65535, file.getSnapLength());
+            assertEquals(0, file.getTimeAccuracy());
+            assertEquals(0, file.getTimeZoneCorrection());
+            assertEquals(ByteOrder.LITTLE_ENDIAN, file.getByteOrder());
+
+            assertEquals(43, file.getTotalNbPackets());
+
+        }
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileReadTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/file/PcapFileReadTest.java
new file mode 100644 (file)
index 0000000..565f276
--- /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.tracecompass.pcap.core.tests.file;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests if packets are read without error.
+ *
+ * @author Vincent Perot
+ */
+public class PcapFileReadTest {
+
+    /**
+     * Test that verify that packets are well read and that no error happens in
+     * file index.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void FileReadTest() throws IOException, BadPcapFileException, BadPacketException {
+
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_UDP;
+        assumeTrue(trace.exists());
+
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+
+            PcapPacket packet = file.parseNextPacket();
+            if (packet == null) {
+                fail("FileReadTest() failed!");
+                return;
+            }
+
+            assertEquals(1, file.getCurrentRank());
+            // Verify Pcap packet.
+            assertEquals(file, packet.getPcapFile());
+            assertEquals(PcapProtocol.PCAP, packet.getProtocol());
+            assertEquals(0, packet.getIndex());
+            assertEquals(1120469540839312L, packet.getTimestamp());
+            assertEquals(92, packet.getOriginalLength());
+            assertEquals(92, packet.getIncludedLength());
+            assertEquals(false, packet.isTruncated());
+            assertEquals(true, packet.validate());
+            // Verify Ethernet Packet
+            if (!packet.hasProtocol(PcapProtocol.ETHERNET_II)) {
+                fail("Packet doesn't have ethernet!");
+            }
+            // Verify IPv4 Packet
+            if (!packet.hasProtocol(PcapProtocol.IPV4)) {
+                fail("Packet doesn't have IPv4!");
+            }
+            // Verify UDP Packet
+            if (!packet.hasProtocol(PcapProtocol.UDP)) {
+                fail("Packet doesn't have UDP!");
+            }
+            // Verify Unknown Packet
+            if (!packet.hasProtocol(PcapProtocol.UNKNOWN)) {
+                fail("Packet doesn't have payload!");
+            }
+
+            // Parse a "random" packet
+            file.seekPacket(58);
+            packet = file.parseNextPacket();
+            if (packet == null) {
+                fail("FileReadTest() failed!");
+                return;
+            }
+
+            // Verify Pcap packet.
+            assertEquals(file, packet.getPcapFile());
+            assertEquals(PcapProtocol.PCAP, packet.getProtocol());
+            assertEquals(58, packet.getIndex());
+            assertEquals(1120469635045415L, packet.getTimestamp());
+            assertEquals(113, packet.getOriginalLength());
+            assertEquals(113, packet.getIncludedLength());
+            assertEquals(false, packet.isTruncated());
+            assertEquals(true, packet.validate());
+            // Verify Ethernet Packet
+            if (!packet.hasProtocol(PcapProtocol.ETHERNET_II)) {
+                fail("Packet doesn't have ethernet!");
+            }
+            // Verify IPv4 Packet
+            if (!packet.hasProtocol(PcapProtocol.IPV4)) {
+                fail("Packet doesn't have IPv4!");
+            }
+            // Verify TCP Packet
+            if (!packet.hasProtocol(PcapProtocol.TCP)) {
+                fail("Packet doesn't have TCP!");
+            }
+            // Verify Unknown Packet
+            if (!packet.hasProtocol(PcapProtocol.UNKNOWN)) {
+                fail("Packet doesn't have payload!");
+            }
+
+            // Skip packet
+            file.skipNextPacket();
+            assertEquals(60, file.getCurrentRank());
+
+            // Parse outside of file.
+            file.seekPacket(99999999);
+            assertEquals(file.getTotalNbPackets(), file.getCurrentRank());
+            file.skipNextPacket(); // Should be a no-op
+            assertEquals(file.getTotalNbPackets(), file.getCurrentRank());
+            packet = file.parseNextPacket();
+            assertNull(packet);
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/AllTests.java
new file mode 100644 (file)
index 0000000..d40c2ae
--- /dev/null
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.packet;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Generic Packet test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        PacketTest.class,
+        BadPacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/BadPacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/BadPacketTest.java
new file mode 100644 (file)
index 0000000..2de750c
--- /dev/null
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.packet;
+
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests if BadPacketExceptions are thrown correctly.
+ *
+ * @author Vincent Perot
+ */
+public class BadPacketTest {
+
+    private ByteBuffer fEthernetPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fEthernetPacket = ByteBuffer.allocate(8);
+        fEthernetPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // This packet is erroneous. It contains 8 bytes while the minimum is 14
+        // bytes for an Ethernet II packet.
+
+        // Destination MAC - 6 bytes
+        fEthernetPacket.put((byte) 0x34);
+        fEthernetPacket.put((byte) 0x67);
+        fEthernetPacket.put((byte) 0x0C);
+        fEthernetPacket.put((byte) 0xD2);
+        fEthernetPacket.put((byte) 0x91);
+        fEthernetPacket.put((byte) 0x51);
+
+        // Source MAC - 2 bytes
+        fEthernetPacket.put((byte) 0x10);
+        fEthernetPacket.put((byte) 0xF8);
+
+        fEthernetPacket.flip();
+
+    }
+
+    /**
+     * Test that verify if a BadPacketException is correctly thrown (when a
+     * packet is erroneous).
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Expected from the test.
+     */
+    @Test(expected = BadPacketException.class)
+    public void PacketExceptionTest() throws BadPacketException, IOException, BadPcapFileException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer packet = fEthernetPacket;
+            if (packet != null) {
+                new EthernetIIPacket(dummy, null, packet);
+            }
+            fail("PacketExceptionTest has failed!");
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/PacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/packet/PacketTest.java
new file mode 100644 (file)
index 0000000..aa7e4e3
--- /dev/null
@@ -0,0 +1,124 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.packet;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests the generic Packet class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class PacketTest {
+
+    private ByteBuffer fEthernetPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fEthernetPacket = ByteBuffer.allocate(15);
+        fEthernetPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // Destination MAC - 6 bytes
+        fEthernetPacket.put((byte) 0x34);
+        fEthernetPacket.put((byte) 0x67);
+        fEthernetPacket.put((byte) 0x0C);
+        fEthernetPacket.put((byte) 0xD2);
+        fEthernetPacket.put((byte) 0x91);
+        fEthernetPacket.put((byte) 0x51);
+
+        // Source MAC - 6 bytes
+        fEthernetPacket.put((byte) 0x10);
+        fEthernetPacket.put((byte) 0xF8);
+        fEthernetPacket.put((byte) 0x82);
+        fEthernetPacket.put((byte) 0xB3);
+        fEthernetPacket.put((byte) 0x44);
+        fEthernetPacket.put((byte) 0x78);
+
+        // Ethertype - 2 bytes
+        fEthernetPacket.put((byte) 0xA2);
+        fEthernetPacket.put((byte) 0x56);
+
+        // Payload - 1 byte
+        fEthernetPacket.put((byte) 0xA6);
+
+        fEthernetPacket.flip();
+
+    }
+
+    /**
+     * Test that verify the correctness of the Packet's methods.
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void GenericPacketTest() throws BadPacketException, IOException, BadPcapFileException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer byteBuffer = fEthernetPacket;
+            if (byteBuffer == null) {
+                fail("GenericPacketTest has failed!");
+                return;
+            }
+
+            Packet packet = new EthernetIIPacket(dummy, null, byteBuffer);
+            assertTrue(packet.hasProtocol(PcapProtocol.ETHERNET_II));
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
+            assertEquals(PcapProtocol.ETHERNET_II, packet.getProtocol());
+
+            assertEquals(packet, packet.getPacket(PcapProtocol.ETHERNET_II));
+            assertNull(packet.getPacket(PcapProtocol.TCP));
+            assertEquals(packet.getChildPacket(), packet.getPacket(PcapProtocol.UNKNOWN));
+            assertEquals(packet.getPacket(PcapProtocol.ETHERNET_II), packet.getMostEcapsulatedPacket());
+
+            assertNull(packet.getParentPacket());
+            assertFalse(packet.getPcapFile().equals(null));
+
+            Packet child = packet.getChildPacket();
+            if (child == null) {
+                fail("GenericPacketTest has failed!");
+                return;
+            }
+            assertEquals(packet.getPayload(), child.getPayload());
+            assertEquals(packet.getGlobalSummaryString(), "Source MAC: 10:f8:82:b3:44:78 , Destination MAC: 34:67:0c:d2:91:51");
+
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/AllTests.java
new file mode 100644 (file)
index 0000000..22ca134
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Protocol test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        ProtocolTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ProtocolTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ProtocolTest.java
new file mode 100644 (file)
index 0000000..c8c3cb0
--- /dev/null
@@ -0,0 +1,85 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests whether protocol operation are happening without
+ * error.
+ *
+ * @author Vincent Perot
+ */
+public class ProtocolTest {
+
+    /**
+     * Test that verify if the protocol attributes are as expected.
+     */
+    @Test
+    public void TestProtocolAttributes() {
+        assertEquals(PcapProtocol.PCAP.getName(), "Packet Capture");
+        assertEquals(PcapProtocol.PCAP.getShortName(), "pcap");
+        assertEquals(PcapProtocol.PCAP.getLayer(), PcapProtocol.Layer.LAYER_0);
+    }
+
+    /**
+     * Test that verify if the protocol getter methods are working properly.
+     */
+    @Test
+    public void TestgetProtocols() {
+        List<PcapProtocol> manualListLayer = new ArrayList<>();
+        for (PcapProtocol.Layer layer : PcapProtocol.Layer.values()) {
+            assertNotNull(layer);
+            Collection<PcapProtocol> listLayer = PcapProtocol.getProtocolsOnLayer(layer);
+
+            manualListLayer.clear();
+            switch (layer) {
+            case LAYER_0:
+                manualListLayer.add(PcapProtocol.PCAP);
+                break;
+            case LAYER_1:
+                break;
+            case LAYER_2:
+                manualListLayer.add(PcapProtocol.ETHERNET_II);
+                break;
+            case LAYER_3:
+                manualListLayer.add(PcapProtocol.IPV4);
+                break;
+            case LAYER_4:
+                manualListLayer.add(PcapProtocol.TCP);
+                manualListLayer.add(PcapProtocol.UDP);
+                break;
+            case LAYER_5:
+                break;
+            case LAYER_6:
+                break;
+            case LAYER_7:
+                manualListLayer.add(PcapProtocol.UNKNOWN);
+                break;
+            default:
+                fail("Illegal layer value!");
+            }
+            assertEquals(manualListLayer, listLayer);
+        }
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/AllTests.java
new file mode 100644 (file)
index 0000000..a36a423
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.ethernet2;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Ethernet II test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        EthernetIIPacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/EthernetIIPacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ethernet2/EthernetIIPacketTest.java
new file mode 100644 (file)
index 0000000..1238876
--- /dev/null
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.ethernet2;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIValues;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * JUnit Class that tests the EthernetIIPacket class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class EthernetIIPacketTest {
+
+    private static final Map<String, String> EXPECTED_FIELDS = ImmutableMap.of(
+            "Source MAC Address", "10:f8:82:b3:44:78",
+            "Destination MAC Address", "34:67:0c:d2:91:51",
+            "Ethertype", "Unknown (0xa256)"
+            );
+
+    private static final String EXPECTED_TOSTRING =
+            "Ethernet II, Source: 10:f8:82:b3:44:78, Destination: 34:67:0c:d2:91:51, Type: Unknown (0xa256)\nPayload: a6";
+
+    private ByteBuffer fPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fPacket = ByteBuffer.allocate(15);
+        fPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // Destination MAC - 6 bytes
+        fPacket.put((byte) 0x34);
+        fPacket.put((byte) 0x67);
+        fPacket.put((byte) 0x0C);
+        fPacket.put((byte) 0xD2);
+        fPacket.put((byte) 0x91);
+        fPacket.put((byte) 0x51);
+
+        // Source MAC - 6 bytes
+        fPacket.put((byte) 0x10);
+        fPacket.put((byte) 0xF8);
+        fPacket.put((byte) 0x82);
+        fPacket.put((byte) 0xB3);
+        fPacket.put((byte) 0x44);
+        fPacket.put((byte) 0x78);
+
+        // Ethertype - 2 bytes
+        fPacket.put((byte) 0xA2);
+        fPacket.put((byte) 0x56);
+
+        // Payload - 1 byte
+        fPacket.put((byte) 0xA6);
+
+        fPacket.flip();
+    }
+
+    /**
+     * Test that verify the correctness of the EthernetIIPacket's methods.
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void CompleteEthernetIIPacketTest() throws IOException, BadPcapFileException, BadPacketException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer byteBuffer = fPacket;
+            if (byteBuffer == null) {
+                fail("CompleteEthernetIIPacketTest has failed!");
+                return;
+            }
+            EthernetIIPacket packet = new EthernetIIPacket(dummy, null, byteBuffer);
+
+            // Protocol Testing
+            assertEquals(PcapProtocol.ETHERNET_II, packet.getProtocol());
+            assertTrue(packet.hasProtocol(PcapProtocol.ETHERNET_II));
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
+
+            // Abstract methods Testing
+            assertTrue(packet.validate());
+            assertEquals(-653947816, packet.hashCode());
+            assertFalse(packet.equals(null));
+            assertEquals(new EthernetIIPacket(dummy, null, byteBuffer), packet);
+
+            assertEquals(EXPECTED_FIELDS, packet.getFields());
+            assertEquals(EXPECTED_TOSTRING, packet.toString());
+            assertEquals("Src: 10:f8:82:b3:44:78 , Dst: 34:67:0c:d2:91:51", packet.getLocalSummaryString());
+            assertEquals("Source MAC: 10:f8:82:b3:44:78 , Destination MAC: 34:67:0c:d2:91:51", packet.getGlobalSummaryString());
+
+            assertEquals(new EthernetIIEndpoint(packet, true), packet.getSourceEndpoint());
+            assertEquals(new EthernetIIEndpoint(packet, false), packet.getDestinationEndpoint());
+
+            fPacket.position(14);
+            byte[] payload = new byte[1];
+            fPacket.get(payload);
+            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
+
+            // Packet-specific methods Testing
+            assertTrue(Arrays.equals(packet.getSourceMacAddress(), Arrays.copyOfRange(fPacket.array(), EthernetIIValues.MAC_ADDRESS_SIZE, EthernetIIValues.MAC_ADDRESS_SIZE + EthernetIIValues.MAC_ADDRESS_SIZE)));
+            assertTrue(Arrays.equals(packet.getDestinationMacAddress(), Arrays.copyOfRange(fPacket.array(), 0, 0 + EthernetIIValues.MAC_ADDRESS_SIZE)));
+            assertEquals(0xA256, packet.getEthertype());
+
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/AllTests.java
new file mode 100644 (file)
index 0000000..5222ea5
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.ipv4;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * IPv4 test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        IPv4PacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/IPv4PacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/ipv4/IPv4PacketTest.java
new file mode 100644 (file)
index 0000000..2be192c
--- /dev/null
@@ -0,0 +1,211 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.ipv4;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Endpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests the IPv4Packet class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class IPv4PacketTest {
+
+    private static final Map<String, String> EXPECTED_FIELDS;
+    static {
+        EXPECTED_FIELDS = new LinkedHashMap<>();
+        EXPECTED_FIELDS.put("Version", "4");
+        EXPECTED_FIELDS.put("Header Length", "24 bytes");
+        EXPECTED_FIELDS.put("Differentiated Services Field", "0x26");
+        EXPECTED_FIELDS.put("Explicit Congestion Notification", "0x02");
+        EXPECTED_FIELDS.put("Total Length", "255 bytes");
+        EXPECTED_FIELDS.put("Identification", "0x0ff0");
+        EXPECTED_FIELDS.put("Don't Fragment Flag", "false");
+        EXPECTED_FIELDS.put("More Fragment Flag", "false");
+        EXPECTED_FIELDS.put("Fragment Offset", "7905");
+        EXPECTED_FIELDS.put("Time to live", "160");
+        EXPECTED_FIELDS.put("Protocol", "Unknown (254)");
+        EXPECTED_FIELDS.put("Checksum", "0x3344");
+        EXPECTED_FIELDS.put("Source IP Address", "192.168.1.0");
+        EXPECTED_FIELDS.put("Destination IP Address", "193.169.2.1");
+        EXPECTED_FIELDS.put("Options", "a2 56 a2 56");
+    }
+
+    private static final String EXPECTED_TOSTRING;
+    static {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Internet Protocol Version 4, Source: 192.168.1.0, Destination: 193.169.2.1\n");
+        sb.append("Version: 4, Identification: 0x0ff0, Header Length: 24 bytes, Total Length: 255 bytes\n");
+        sb.append("Differentiated Services Code Point: 0x26; Explicit Congestion Notification: 0x02\n");
+        sb.append("Flags: 0x00 (Don't have more fragments), Fragment Offset: 7905\n");
+        sb.append("Time to live: 160\n");
+        sb.append("Protocol: 254\n");
+        sb.append("Header Checksum: 0x3344\n");
+        sb.append("Payload: a6");
+
+        EXPECTED_TOSTRING = sb.toString();
+    }
+
+    private ByteBuffer fPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fPacket = ByteBuffer.allocate(25);
+        fPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // Version + IHL
+        fPacket.put((byte) 0x46);
+
+        // DSCP + ECN
+        fPacket.put((byte) 0x9A);
+
+        // Total length - this is randomly chosen so that we verify that the
+        // packet handles wrong total length.
+        fPacket.put((byte) 0x00);
+        fPacket.put((byte) 0xFF);
+
+        // Identification
+        fPacket.put((byte) 0x0F);
+        fPacket.put((byte) 0xF0);
+
+        // Flags + Fragment Offset
+        fPacket.put((byte) 0x1E);
+        fPacket.put((byte) 0xE1);
+
+        // Time to live
+        fPacket.put((byte) 0xA0);
+
+        // Protocol - Unknown
+        fPacket.put((byte) 0xFE);
+
+        // Header checksum - chosen randomly
+        fPacket.put((byte) 0x33);
+        fPacket.put((byte) 0x44);
+
+        // Source IP - 4 bytes
+        fPacket.put((byte) 192);
+        fPacket.put((byte) 168);
+        fPacket.put((byte) 1);
+        fPacket.put((byte) 0);
+
+        // Destination IP - 4 bytes
+        fPacket.put((byte) 193);
+        fPacket.put((byte) 169);
+        fPacket.put((byte) 2);
+        fPacket.put((byte) 1);
+
+        // Options - 4 bytes
+        fPacket.put((byte) 0xA2);
+        fPacket.put((byte) 0x56);
+        fPacket.put((byte) 0xA2);
+        fPacket.put((byte) 0x56);
+
+        // Payload - 1 byte
+        fPacket.put((byte) 0xA6);
+
+        fPacket.flip();
+    }
+
+    /**
+     * Test that verify the correctness of the IPv4Packet's methods.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void CompleteIPv4PacketTest() throws IOException, BadPcapFileException, BadPacketException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer byteBuffer = fPacket;
+            if (byteBuffer == null) {
+                fail("CompleteIPv4PacketTest has failed!");
+                return;
+            }
+            IPv4Packet packet = new IPv4Packet(dummy, null, byteBuffer);
+
+            // Protocol Testing
+            assertEquals(PcapProtocol.IPV4, packet.getProtocol());
+            assertTrue(packet.hasProtocol(PcapProtocol.IPV4));
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
+
+            // Abstract methods Testing
+            assertTrue(packet.validate());
+            assertEquals(-222021887, packet.hashCode());
+            assertFalse(packet.equals(null));
+            assertEquals(new IPv4Packet(dummy, null, byteBuffer), packet);
+
+            assertEquals(EXPECTED_FIELDS, packet.getFields());
+            assertEquals(EXPECTED_TOSTRING, packet.toString());
+            assertEquals("Src: 192.168.1.0 , Dst: 193.169.2.1", packet.getLocalSummaryString());
+            assertEquals("192.168.1.0 > 193.169.2.1 Id=4080 Len=1", packet.getGlobalSummaryString());
+
+            assertEquals(new IPv4Endpoint(packet, true), packet.getSourceEndpoint());
+            assertEquals(new IPv4Endpoint(packet, false), packet.getDestinationEndpoint());
+
+            fPacket.position(24);
+            byte[] payload = new byte[1];
+            fPacket.get(payload);
+            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
+
+            // Packet-specific methods Testing
+            assertEquals(InetAddress.getByAddress(Arrays.copyOfRange(fPacket.array(), 12, 16)), packet.getSourceIpAddress());
+            assertEquals(InetAddress.getByAddress(Arrays.copyOfRange(fPacket.array(), 16, 20)), packet.getDestinationIpAddress());
+            assertTrue(Arrays.equals(packet.getOptions(), Arrays.copyOfRange(fPacket.array(), 20, 24)));
+            assertEquals(4, packet.getVersion());
+            assertEquals(24, packet.getHeaderLength());
+            assertEquals(0x26, packet.getDSCP());
+            assertEquals(0x02, packet.getExplicitCongestionNotification());
+            assertEquals(255, packet.getTotalLength());
+            assertEquals(0x0FF0, packet.getIdentification());
+            assertFalse(packet.getReservedFlag());
+            assertFalse(packet.getDontFragmentFlag());
+            assertFalse(packet.getHasMoreFragment());
+            assertEquals(7905, packet.getFragmentOffset());
+            assertEquals(160, packet.getTimeToLive());
+            assertEquals(0xFE, packet.getIpDatagramProtocol());
+            assertEquals(0x3344, packet.getHeaderChecksum());
+
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/AllTests.java
new file mode 100644 (file)
index 0000000..e3d325b
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.pcap;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Pcap test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        PcapPacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/PcapPacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/pcap/PcapPacketTest.java
new file mode 100644 (file)
index 0000000..9e85ced
--- /dev/null
@@ -0,0 +1,249 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.pcap;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+import java.util.TimeZone;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * JUnit Class that tests the PcapPacket class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class PcapPacketTest {
+
+    private static final String EXPECTED_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss.SSS";
+    private static final String EXPECTED_GMT_TIME = "2005-07-04 09:33:52.829";
+
+    private static final Map<String, String> EXPECTED_FIELDS;
+    private static final String EXPECTED_TOSTRING;
+    static {
+
+        // Convert known GMT time to default (local) time zone. The local time
+        // is the expected value.
+        String captureTime = "";
+        try {
+            SimpleDateFormat gmtFormat = new SimpleDateFormat(EXPECTED_DATE_FORMAT);
+            gmtFormat.setTimeZone(TimeZone.getTimeZone("GMT"));
+            Date gmtDate = gmtFormat.parse(EXPECTED_GMT_TIME);
+
+            SimpleDateFormat defaultFormat = new SimpleDateFormat(EXPECTED_DATE_FORMAT);
+            captureTime = defaultFormat.format(gmtDate);
+        } catch (ParseException e) {
+            fail("failed to parse date");
+        }
+
+        StringBuilder sb = new StringBuilder();
+        sb.append("Packet Capture 36: 75 bytes on wire, 75 bytes captured.\n");
+        sb.append("Arrival time: " + captureTime + ".277.000\n");
+        sb.append("Ethernet II, Source: 00:e0:ed:01:6e:bd, Destination: 00:30:54:00:34:56, Type: Internet Protocol Version 4 (0x0800)\n");
+        sb.append("Internet Protocol Version 4, Source: 192.168.1.2, Destination: 192.168.1.1\n");
+        sb.append("Version: 4, Identification: 0x69aa, Header Length: 20 bytes, Total Length: 61 bytes\n");
+        sb.append("Differentiated Services Code Point: 0x00; Explicit Congestion Notification: 0x00\n");
+        sb.append("Flags: 0x00 (Don't have more fragments), Fragment Offset: 0\n");
+        sb.append("Time to live: 128\n");
+        sb.append("Protocol: 17\n");
+        sb.append("Header Checksum: 0x4db2\n");
+        sb.append("User Datagram Protocol, Source Port: 2719, Destination Port: 53, Length: 41, Checksum: 19038\n");
+        sb.append("Payload: ed d4 01 00 00 01 00 00 00 00 00 00 03 66 74 70 07 65 63 69 74 65 6c 65 03 63 6f 6d 00 00 01 00 01");
+
+        EXPECTED_TOSTRING = sb.toString();
+        EXPECTED_FIELDS = ImmutableMap.of(
+                "Frame", "36",
+                "Frame Length", "75 bytes",
+                "Capture Length", "75 bytes",
+                "Capture Time", captureTime + ".277.000"
+                );
+    }
+
+    private ByteBuffer fPayload;
+
+    /**
+     * Initialize the payload.
+     */
+    @Before
+    public void initialize() {
+        fPayload = ByteBuffer.allocate(75);
+        fPayload.order(ByteOrder.BIG_ENDIAN);
+
+        // Values copied from wireshark
+
+        // Bytes 0x01-0x10
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x30);
+        fPayload.put((byte) 0x54);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x34);
+        fPayload.put((byte) 0x56);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0xE0);
+        fPayload.put((byte) 0xED);
+        fPayload.put((byte) 0x01);
+        fPayload.put((byte) 0x6E);
+        fPayload.put((byte) 0xBD);
+        fPayload.put((byte) 0x08);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x45);
+        fPayload.put((byte) 0x00);
+
+        // Bytes 0x11-0x20
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x3D);
+        fPayload.put((byte) 0x69);
+        fPayload.put((byte) 0xAA);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x80);
+        fPayload.put((byte) 0x11);
+        fPayload.put((byte) 0x4D);
+        fPayload.put((byte) 0xB2);
+        fPayload.put((byte) 0xC0);
+        fPayload.put((byte) 0xA8);
+        fPayload.put((byte) 0x01);
+        fPayload.put((byte) 0x02);
+        fPayload.put((byte) 0xC0);
+        fPayload.put((byte) 0xA8);
+
+        // Bytes 0x21-0x30
+        fPayload.put((byte) 0x01);
+        fPayload.put((byte) 0x01);
+        fPayload.put((byte) 0x0A);
+        fPayload.put((byte) 0x9F);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x35);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x29);
+        fPayload.put((byte) 0x4A);
+        fPayload.put((byte) 0x5E);
+        fPayload.put((byte) 0xED);
+        fPayload.put((byte) 0xd4);
+        fPayload.put((byte) 0x01);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x01);
+
+        // Bytes 0x31-0x40
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x03);
+        fPayload.put((byte) 0x66);
+        fPayload.put((byte) 0x74);
+        fPayload.put((byte) 0x70);
+        fPayload.put((byte) 0x07);
+        fPayload.put((byte) 0x65);
+        fPayload.put((byte) 0x63);
+        fPayload.put((byte) 0x69);
+        fPayload.put((byte) 0x74);
+        fPayload.put((byte) 0x65);
+
+        // Bytes 0x41-0x4B
+        fPayload.put((byte) 0x6C);
+        fPayload.put((byte) 0x65);
+        fPayload.put((byte) 0x03);
+        fPayload.put((byte) 0x63);
+        fPayload.put((byte) 0x6F);
+        fPayload.put((byte) 0x6D);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x01);
+        fPayload.put((byte) 0x00);
+        fPayload.put((byte) 0x01);
+
+        fPayload.flip();
+    }
+
+    /**
+     * Test that verify the correctness of the PcapPacket's methods.
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void CompletePcapPacketTest() throws IOException, BadPcapFileException, BadPacketException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_UDP;
+        assumeTrue(trace.exists());
+        try (PcapFile file = new PcapFile(trace.getPath());) {
+
+            file.seekPacket(36);
+            PcapPacket packet = file.parseNextPacket();
+            if (packet == null) {
+                fail("CompletePcapPacketTest has failed!");
+                return;
+            }
+            // Protocol Testing
+            assertEquals(PcapProtocol.PCAP, packet.getProtocol());
+            assertTrue(packet.hasProtocol(PcapProtocol.PCAP));
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.TCP));
+
+            // Abstract methods Testing
+            assertTrue(packet.validate());
+            assertEquals(86567859, packet.hashCode());
+            assertFalse(packet.equals(null));
+            assertFalse(packet.equals(file.parseNextPacket()));
+
+            assertEquals(EXPECTED_FIELDS, packet.getFields());
+            assertEquals(EXPECTED_TOSTRING, packet.toString());
+            assertEquals("Frame 36: 75 bytes on wire, 75 bytes captured", packet.getLocalSummaryString());
+            assertEquals("Source Port: 2719, Destination Port: 53", packet.getGlobalSummaryString());
+
+            assertEquals(new PcapEndpoint(packet, true), packet.getSourceEndpoint());
+            assertEquals(new PcapEndpoint(packet, false), packet.getDestinationEndpoint());
+
+            ByteBuffer payload = packet.getPayload();
+            if (payload == null) {
+                fail("CompletePcapPacketTest has failed!");
+                return;
+            }
+            assertEquals(fPayload, payload.flip());
+
+            // Packet-specific methods Testing
+            assertEquals(36, packet.getIndex());
+            assertEquals(75, packet.getOriginalLength());
+            assertEquals(75, packet.getIncludedLength());
+            assertEquals(1120469632829277L, packet.getTimestamp());
+            assertFalse(packet.isTruncated());
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/AllTests.java
new file mode 100644 (file)
index 0000000..17b014a
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.tcp;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * TCP test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        TCPPacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/TCPPacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/tcp/TCPPacketTest.java
new file mode 100644 (file)
index 0000000..2483d6e
--- /dev/null
@@ -0,0 +1,213 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.tcp;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.tcp.TCPEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.tcp.TCPPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests the TCPPacket class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class TCPPacketTest {
+
+    private static final Map<String, String> EXPECTED_FIELDS;
+    static {
+        EXPECTED_FIELDS = new LinkedHashMap<>();
+        EXPECTED_FIELDS.put("Source Port", "18057");
+        EXPECTED_FIELDS.put("Destination Port", "39611");
+        EXPECTED_FIELDS.put("Sequence Number", "2575857510");
+        EXPECTED_FIELDS.put("Acknowledgement Number", "1430532898");
+        EXPECTED_FIELDS.put("Length", "24 bytes");
+        EXPECTED_FIELDS.put("ECN-Nonce Flag", "true");
+        EXPECTED_FIELDS.put("Congestion Window Reduced Flag", "false");
+        EXPECTED_FIELDS.put("ECN-Echo Flag", "true");
+        EXPECTED_FIELDS.put("Urgent Flag", "false");
+        EXPECTED_FIELDS.put("ACK Flag", "true");
+        EXPECTED_FIELDS.put("PSH Flag", "false");
+        EXPECTED_FIELDS.put("RST Flag", "true");
+        EXPECTED_FIELDS.put("SYN Flag", "false");
+        EXPECTED_FIELDS.put("FIN Flag", "true");
+        EXPECTED_FIELDS.put("Window Size Value", "4352");
+        EXPECTED_FIELDS.put("Checksum", "0xffee");
+        EXPECTED_FIELDS.put("Urgent Pointer", "0xddcc");
+        EXPECTED_FIELDS.put("Options", "ad da bc cb");
+    }
+
+    private static final String EXPECTED_TOSTRING;
+    static {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Transmission Control Protocol, Source Port: 18057, Destination Port: 39611\n");
+        sb.append("Sequence Number: 2575857510, Acknowledgment Number: 1430532898\n");
+        sb.append("Header length: 24 bytes, Data length: 4\n");
+        sb.append("Window size value: 4352, Urgent Pointer: 0xddcc\n");
+        sb.append("Checksum: 0xffee\n");
+        sb.append("Payload: 99 88 77 66");
+
+        EXPECTED_TOSTRING = sb.toString();
+    }
+
+    private ByteBuffer fPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fPacket = ByteBuffer.allocate(28);
+        fPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // Source Port
+        fPacket.put((byte) 0x46);
+        fPacket.put((byte) 0x89);
+
+        // Destination Port
+        fPacket.put((byte) 0x9A);
+        fPacket.put((byte) 0xBB);
+
+        // Sequence Number
+        fPacket.put((byte) 0x99);
+        fPacket.put((byte) 0x88);
+        fPacket.put((byte) 0x77);
+        fPacket.put((byte) 0x66);
+
+        // Acknowledgment Number
+        fPacket.put((byte) 0x55);
+        fPacket.put((byte) 0x44);
+        fPacket.put((byte) 0x33);
+        fPacket.put((byte) 0x22);
+
+        // Data Offset + Reserved + NS
+        fPacket.put((byte) 0x61);
+
+        // Other flags
+        fPacket.put((byte) 0b01010101);
+
+        // Window Size
+        fPacket.put((byte) 0x11);
+        fPacket.put((byte) 0x00);
+
+        // Checksum
+        fPacket.put((byte) 0xFF);
+        fPacket.put((byte) 0xEE);
+
+        // Urgent Pointer
+        fPacket.put((byte) 0xDD);
+        fPacket.put((byte) 0xCC);
+
+        // Options - 4 bytes
+        fPacket.put((byte) 0xAD);
+        fPacket.put((byte) 0xDA);
+        fPacket.put((byte) 0xBC);
+        fPacket.put((byte) 0xCB);
+
+        // Payload - 4 bytes
+        fPacket.put((byte) 0x99);
+        fPacket.put((byte) 0x88);
+        fPacket.put((byte) 0x77);
+        fPacket.put((byte) 0x66);
+
+        fPacket.flip();
+    }
+
+    /**
+     * Test that verify the correctness of the TCPPacket's methods.
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void CompleteTCPPacketTest() throws BadPacketException, IOException, BadPcapFileException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer byteBuffer = fPacket;
+            if (byteBuffer == null) {
+                fail("CompleteTCPPacketTest has failed!");
+                return;
+            }
+            TCPPacket packet = new TCPPacket(dummy, null, byteBuffer);
+
+            // Protocol Testing
+            assertEquals(PcapProtocol.TCP, packet.getProtocol());
+            assertTrue(packet.hasProtocol(PcapProtocol.TCP));
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.IPV4));
+
+            // Abstract methods Testing
+            assertTrue(packet.validate());
+            assertEquals(-677046102, packet.hashCode());
+            assertFalse(packet.equals(null));
+            assertEquals(new TCPPacket(dummy, null, byteBuffer), packet);
+
+            assertEquals(EXPECTED_FIELDS, packet.getFields());
+            assertEquals(EXPECTED_TOSTRING, packet.toString());
+            assertEquals("Src Port: 18057, Dst Port: 39611, Seq: 2575857510, Ack: 1430532898, Len: 24", packet.getLocalSummaryString());
+            assertEquals("18057 > 39611 [ACK, FIN, RST, NS, ECE] Seq=2575857510 Ack=1430532898 Len=24", packet.getGlobalSummaryString());
+
+            assertEquals(new TCPEndpoint(packet, true), packet.getSourceEndpoint());
+            assertEquals(new TCPEndpoint(packet, false), packet.getDestinationEndpoint());
+
+            fPacket.position(24);
+            byte[] payload = new byte[4];
+            fPacket.get(payload);
+            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
+
+            // Packet-specific methods Testing
+            assertEquals(0x4689, packet.getSourcePort());
+            assertEquals(0x9ABB, packet.getDestinationPort());
+            assertEquals(2575857510L, packet.getSequenceNumber());
+            assertEquals(1430532898L, packet.getAcknowledgmentNumber());
+            assertEquals(6, packet.getDataOffset());
+            assertEquals(0, packet.getReservedField());
+            assertEquals(true, packet.isNSFlagSet());
+            assertEquals(false, packet.isCongestionWindowReducedFlagSet());
+            assertEquals(true, packet.isECNEchoFlagSet());
+            assertEquals(false, packet.isUrgentFlagSet());
+            assertEquals(true, packet.isAcknowledgeFlagSet());
+            assertEquals(false, packet.isPushFlagSet());
+            assertEquals(true, packet.isResetFlagSet());
+            assertEquals(false, packet.isSynchronizationFlagSet());
+            assertEquals(true, packet.isFinalFlagSet());
+            assertEquals(4352, packet.getWindowSize());
+            assertEquals(65518, packet.getChecksum());
+            assertEquals(56780, packet.getUrgentPointer());
+            assertTrue(Arrays.equals(packet.getOptions(), Arrays.copyOfRange(fPacket.array(), 20, 24)));
+
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/AllTests.java
new file mode 100644 (file)
index 0000000..e896476
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.udp;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * UDP test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        UDPPacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/UDPPacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/udp/UDPPacketTest.java
new file mode 100644 (file)
index 0000000..d156e28
--- /dev/null
@@ -0,0 +1,151 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.udp;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Map;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.udp.UDPEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.udp.UDPPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * JUnit Class that tests the UDPPacket class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class UDPPacketTest {
+
+    private static final Map<String, String> EXPECTED_FIELDS = ImmutableMap.of(
+            "Source Port", "18057",
+            "Destination Port", "39611",
+            "Length", "41452 bytes",
+            "Checksum", "0xfaaf"
+            );
+
+    private static final String EXPTECTED_TOSTRING;
+    static {
+        StringBuilder sb = new StringBuilder();
+        sb.append("User Datagram Protocol, Source Port: 18057, Destination Port: 39611, Length: 41452, Checksum: 64175\n");
+        sb.append("Payload: 99 88 77 66");
+
+        EXPTECTED_TOSTRING = sb.toString();
+    }
+
+    private ByteBuffer fPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fPacket = ByteBuffer.allocate(12);
+        fPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // Source Port
+        fPacket.put((byte) 0x46);
+        fPacket.put((byte) 0x89);
+
+        // Destination Port
+        fPacket.put((byte) 0x9A);
+        fPacket.put((byte) 0xBB);
+
+        // Total length - this is randomly chosen so that we verify that the
+        // packet handles wrong total length.
+        fPacket.put((byte) 0xA1);
+        fPacket.put((byte) 0xEC);
+
+        // Checksum
+        fPacket.put((byte) 0xFA);
+        fPacket.put((byte) 0xAF);
+
+        // Payload - 4 bytes
+        fPacket.put((byte) 0x99);
+        fPacket.put((byte) 0x88);
+        fPacket.put((byte) 0x77);
+        fPacket.put((byte) 0x66);
+
+        fPacket.flip();
+    }
+
+    /**
+     * Test that verify the correctness of the UDPPacket's methods.
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     * @throws BadPacketException
+     *             Thrown when a packet is erroneous. Fails the test.
+     */
+    @Test
+    public void CompleteUDPPacketTest() throws IOException, BadPcapFileException, BadPacketException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer byteBuffer = fPacket;
+            if (byteBuffer == null) {
+                fail("CompleteUDPPacketTest has failed!");
+                return;
+            }
+            UDPPacket packet = new UDPPacket(dummy, null, byteBuffer);
+
+            // Protocol Testing
+            assertEquals(PcapProtocol.UDP, packet.getProtocol());
+            assertTrue(packet.hasProtocol(PcapProtocol.UDP));
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.ETHERNET_II));
+
+            // Abstract methods Testing
+            assertTrue(packet.validate());
+            assertEquals(473000225, packet.hashCode());
+            assertFalse(packet.equals(null));
+            assertEquals(new UDPPacket(dummy, null, byteBuffer), packet);
+
+            assertEquals(EXPECTED_FIELDS, packet.getFields());
+            assertEquals(EXPTECTED_TOSTRING, packet.toString());
+            assertEquals("Src Port: 18057, Dst Port: 39611", packet.getLocalSummaryString());
+            assertEquals("Source Port: 18057, Destination Port: 39611", packet.getGlobalSummaryString());
+
+            assertEquals(new UDPEndpoint(packet, true), packet.getSourceEndpoint());
+            assertEquals(new UDPEndpoint(packet, false), packet.getDestinationEndpoint());
+
+            fPacket.position(8);
+            byte[] payload = new byte[4];
+            fPacket.get(payload);
+            assertEquals(ByteBuffer.wrap(payload), packet.getPayload());
+
+            // Packet-specific methods Testing
+            assertEquals(0x4689, packet.getSourcePort());
+            assertEquals(0x9ABB, packet.getDestinationPort());
+            assertEquals(0xA1EC, packet.getTotalLength());
+            assertEquals(0xFAAF, packet.getChecksum());
+
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/AllTests.java
new file mode 100644 (file)
index 0000000..99136d5
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.unknown;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Unknown test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        UnknownPacketTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/UnknownPacketTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/protocol/unknown/UnknownPacketTest.java
new file mode 100644 (file)
index 0000000..f1849a8
--- /dev/null
@@ -0,0 +1,120 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.protocol.unknown;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Map;
+
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Before;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * JUnit Class that tests the UnknownPacket class and its method.
+ *
+ * @author Vincent Perot
+ */
+public class UnknownPacketTest {
+
+    private static final Map<String, String> EXPECTED_FIELDS = ImmutableMap.of(
+            "Binary", "61",
+            "Character", "a"
+            );
+
+    private static final String fToString = "Payload: 61";
+
+    private ByteBuffer fPacket;
+
+    /**
+     * Initialize the packet.
+     */
+    @Before
+    public void initialize() {
+        fPacket = ByteBuffer.allocate(1);
+        fPacket.order(ByteOrder.BIG_ENDIAN);
+
+        // Payload - 1 byte
+        fPacket.put((byte) 97);
+
+        fPacket.flip();
+    }
+
+    /**
+     * Test that verify the correctness of the UnknownPacket's methods.
+     * @throws BadPcapFileException
+     *             Thrown when the file is erroneous. Fails the test.
+     * @throws IOException
+     *             Thrown when an IO error occurs. Fails the test.
+     */
+    @Test
+    public void CompleteUnknownPacketTest() throws IOException, BadPcapFileException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            ByteBuffer byteBuffer = fPacket;
+            if (byteBuffer == null) {
+                fail("CompleteUnknownPacketTest has failed!");
+                return;
+            }
+            UnknownPacket packet = new UnknownPacket(dummy, null, byteBuffer);
+
+            // Protocol Testing
+            assertEquals(PcapProtocol.UNKNOWN, packet.getProtocol());
+            assertTrue(packet.hasProtocol(PcapProtocol.UNKNOWN));
+            assertFalse(packet.hasProtocol(PcapProtocol.UDP));
+
+            // Abstract methods Testing
+            assertTrue(packet.validate());
+            assertEquals(1089, packet.hashCode());
+            assertFalse(packet.equals(null));
+            assertEquals(new UnknownPacket(dummy, null, byteBuffer), packet);
+
+            assertEquals(EXPECTED_FIELDS, packet.getFields());
+            assertEquals(fToString, packet.toString());
+            assertEquals("Len: 1 bytes", packet.getLocalSummaryString());
+            assertEquals("Data: 1 bytes", packet.getGlobalSummaryString());
+            // TODO take care of plural form.
+
+            // Unknown Endpoints are never equal!
+            assertFalse(packet.getSourceEndpoint().equals(new UnknownEndpoint(packet, true)));
+            assertFalse(packet.getDestinationEndpoint().equals(new UnknownEndpoint(packet, false)));
+
+            fPacket.position(0);
+            byte[] payload = new byte[1];
+            fPacket.get(payload);
+            ByteBuffer payloadBB = ByteBuffer.wrap(payload);
+            payloadBB.flip();
+
+            assertEquals(payloadBB, packet.getPayload());
+
+            // Packet-specific methods Testing
+            // None
+
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/AllTests.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/AllTests.java
new file mode 100644 (file)
index 0000000..9c2edb8
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.stream;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Stream test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        StreamBuildTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/StreamBuildTest.java b/pcap/org.eclipse.tracecompass.pcap.core.tests/src/org/eclipse/tracecompass/pcap/core/tests/stream/StreamBuildTest.java
new file mode 100644 (file)
index 0000000..5ef0fc9
--- /dev/null
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * 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.tracecompass.pcap.core.tests.stream;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStream;
+import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStreamBuilder;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.junit.Test;
+
+/**
+ * JUnit Class that tests whether packet streams are built correctly.
+ *
+ * @author Vincent Perot
+ */
+public class StreamBuildTest {
+
+    private static final double DELTA = 0.001;
+
+    /**
+     * Test that verify that stream building is done correctly.
+     */
+    @Test
+    public void StreamBuildingTest() {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+
+        try {
+            // Test Ethernet II stream
+            PacketStreamBuilder builder = new PacketStreamBuilder(PcapProtocol.ETHERNET_II);
+            builder.parsePcapFile(trace.getPath());
+            assertEquals(PcapProtocol.ETHERNET_II, builder.getProtocol());
+            // Should do one loop only, so hardcoded values are okay.
+            for (PacketStream stream : builder.getStreams()) {
+                assertEquals("Stream eth.0, Number of Packets: 43\n", stream.toString());
+                assertEquals(43, stream.getNbPackets());
+                assertEquals(25091, stream.getNbBytes());
+                assertEquals(20, stream.getNbPacketsAtoB());
+                assertEquals(2323, stream.getNbBytesAtoB());
+                assertEquals(23, stream.getNbPacketsBtoA());
+                assertEquals(22768, stream.getNbBytesBtoA());
+                assertEquals(1084443427311224000L, stream.getStartTime());
+                assertEquals(1084443457704928000L, stream.getStopTime());
+                assertEquals(30.393704, stream.getDuration(), DELTA);
+                assertEquals(76.43030280218561, stream.getBPSAtoB(), DELTA);
+                assertEquals(749.1025114938278, stream.getBPSBtoA(), DELTA);
+            }
+
+            // Test TCP streams and other constructor
+            builder = new PacketStreamBuilder(PcapProtocol.TCP);
+            builder.parsePcapFile(trace.getPath());
+            assertEquals(PcapProtocol.TCP, builder.getProtocol());
+
+            PacketStream stream = builder.getStream(0);
+            if (stream == null) {
+                fail("StreamBuildingTest has failed!");
+                return;
+            }
+            assertEquals(PcapProtocol.TCP, stream.getProtocol());
+            assertEquals(0, stream.getID());
+            assertEquals("tcp.0", stream.getUniqueID());
+            assertEquals(34, stream.getNbPackets());
+            assertEquals(20695, stream.getNbBytes());
+            assertEquals(16, stream.getNbPacketsAtoB());
+            assertEquals(1351, stream.getNbBytesAtoB());
+            assertEquals(18, stream.getNbPacketsBtoA());
+            assertEquals(19344, stream.getNbBytesBtoA());
+            assertEquals(1084443427311224000L, stream.getStartTime());
+            assertEquals(1084443457704928000L, stream.getStopTime());
+            assertEquals(30.393704, stream.getDuration(), DELTA);
+            assertEquals(44.449995301658525, stream.getBPSAtoB(), DELTA);
+            assertEquals(636.4476011216008, stream.getBPSBtoA(), DELTA);
+
+            stream = builder.getStream(1);
+            if (stream == null) {
+                fail("StreamBuildingTest has failed!");
+                return;
+            }
+            assertEquals(PcapProtocol.TCP, stream.getProtocol());
+            assertEquals(1, stream.getID());
+            assertEquals("tcp.1", stream.getUniqueID());
+            assertEquals(7, stream.getNbPackets());
+            assertEquals(4119, stream.getNbBytes());
+            assertEquals(3, stream.getNbPacketsAtoB());
+            assertEquals(883, stream.getNbBytesAtoB());
+            assertEquals(4, stream.getNbPacketsBtoA());
+            assertEquals(3236, stream.getNbBytesBtoA());
+            assertEquals(1084443430295515000L, stream.getStartTime());
+            assertEquals(1084443432088092000L, stream.getStopTime());
+            assertEquals(1.792577, stream.getDuration(), DELTA);
+            assertEquals(492.58692932019096, stream.getBPSAtoB(), DELTA);
+            assertEquals(1805.2223140205413, stream.getBPSBtoA(), DELTA);
+
+            builder.clear();
+            assertEquals(0, builder.getNbStreams());
+        } catch (IOException | BadPcapFileException e) {
+            fail("StreamBuildingTest has failed!");
+        }
+
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/.classpath b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/.project b/pcap/org.eclipse.tracecompass.pcap.core/.project
new file mode 100644 (file)
index 0000000..1574fd6
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.core.prefs b/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..a2b5e6b
--- /dev/null
@@ -0,0 +1,405 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+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=error
+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/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.ui.prefs b/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.api.tools.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/.settings/org.eclipse.pde.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/META-INF/MANIFEST.MF b/pcap/org.eclipse.tracecompass.pcap.core/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..43e6a6c
--- /dev/null
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.pcap.core;singleton:=true
+Bundle-Activator: org.eclipse.tracecompass.internal.pcap.core.Activator
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.common.core
+Export-Package: org.eclipse.tracecompass.internal.pcap.core;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
+ org.eclipse.tracecompass.internal.pcap.core.endpoint;x-friends:="org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.filter;x-internal:=true,
+ org.eclipse.tracecompass.internal.pcap.core.packet;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.protocol;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
+ org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.protocol.pcap;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
+ org.eclipse.tracecompass.internal.pcap.core.protocol.udp;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
+ org.eclipse.tracecompass.internal.pcap.core.protocol.unknown;x-friends:="org.eclipse.tracecompass.pcap.core.tests",
+ org.eclipse.tracecompass.internal.pcap.core.stream;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.trace;x-friends:="org.eclipse.tracecompass.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.core",
+ org.eclipse.tracecompass.internal.pcap.core.util;x-friends:="org.eclipse.tracecompass.tmf.pcap.core"
+Import-Package: com.google.common.collect,
+ com.google.common.math
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/about.html b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.pcap.core/build.properties b/pcap/org.eclipse.tracecompass.pcap.core/build.properties
new file mode 100644 (file)
index 0000000..857bf1e
--- /dev/null
@@ -0,0 +1,21 @@
+###############################################################################
+# Copyright (c) 2014 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               plugin.properties,\
+               about.html,\
+               .
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/plugin.properties b/pcap/org.eclipse.tracecompass.pcap.core/plugin.properties
new file mode 100644 (file)
index 0000000..49400fc
--- /dev/null
@@ -0,0 +1,15 @@
+###############################################################################
+# 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
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Trace Compass Pcap Parser Core Plug-in
+
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/pom.xml b/pcap/org.eclipse.tracecompass.pcap.core/pom.xml
new file mode 100644 (file)
index 0000000..442e190
--- /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>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.pcap.core</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-plugin</packaging>
+
+  <name>Trace Compass Pcap Parser Core Plug-in</name>
+
+ <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-source-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/Activator.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/Activator.java
new file mode 100644 (file)
index 0000000..052d191
--- /dev/null
@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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.tracecompass.internal.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 final class Activator extends Plugin {
+
+    // ------------------------------------------------------------------------
+    // Attributes
+    // ------------------------------------------------------------------------
+
+    /**
+     * The plug-in ID
+     */
+    public static final String PLUGIN_ID = "org.eclipse.tracecompass.pcap.core"; //$NON-NLS-1$
+
+    /**
+     * The shared instance
+     */
+    private static @Nullable Activator plugin;
+
+    // ------------------------------------------------------------------------
+    // Constructors
+    // ------------------------------------------------------------------------
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+    }
+
+    // ------------------------------------------------------------------------
+    // Accessors
+    // ------------------------------------------------------------------------
+
+    /**
+     * Returns the shared instance
+     *
+     * @return the shared instance
+     */
+    public static @Nullable Activator getDefault() {
+        return plugin;
+    }
+
+    // ------------------------------------------------------------------------
+    // Operators
+    // ------------------------------------------------------------------------
+
+    @Override
+    public void start(@Nullable BundleContext context) throws Exception {
+        super.start(context);
+        plugin = this;
+    }
+
+    @Override
+    public void stop(@Nullable BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Logs a message with severity INFO in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logInfo(String message) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity INFO in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logInfo(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.INFO, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logWarning(String message) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity WARNING in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logWarning(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.WARNING, PLUGIN_ID, message, exception));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     */
+    public void logError(String message) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message));
+    }
+
+    /**
+     * Logs a message and exception with severity ERROR in the runtime log of the plug-in.
+     *
+     * @param message A message to log
+     * @param exception A exception to log
+     */
+    public void logError(String message, Throwable exception) {
+        getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, message, exception));
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpoint.java
new file mode 100644 (file)
index 0000000..d05218f
--- /dev/null
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.endpoint;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+
+/**
+ * Abstract class that represents an endpoint. An endpoint is an address where a
+ * packet is received or sent. Therefore, it is protocol dependent. For
+ * instance, an Ethernet II endpoint is the MAC address. An Ipv4 endpoint is the
+ * combination of the MAC address and the IP address. This is useful for
+ * building packet streams.
+ *
+ * @author Vincent Perot
+ */
+public abstract class ProtocolEndpoint {
+
+    /**
+     * Empty string for child classes.
+     */
+    protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+    /**
+     * The encapsulating endpoint. Much like packets, endpoints are
+     * encapsulated. The higher the layer of the packet protocol is, the more
+     * parents an endpoint will have.
+     */
+    private final @Nullable ProtocolEndpoint fParentEndpoint;
+
+    /**
+     * Constructor of the {@link ProtocolEndpoint} class. It takes a packet to
+     * get its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public ProtocolEndpoint(Packet packet, boolean isSourceEndpoint) {
+        Packet parentPacket = packet.getParentPacket();
+        if (parentPacket == null) {
+            fParentEndpoint = null;
+        } else {
+            fParentEndpoint = isSourceEndpoint ?
+                    parentPacket.getSourceEndpoint() :
+                    parentPacket.getDestinationEndpoint();
+        }
+    }
+
+    /**
+     * Getter method that returns the parent endpoint.
+     *
+     * @return The parent endpoint.
+     */
+    public @Nullable ProtocolEndpoint getParentEndpoint() {
+        return fParentEndpoint;
+    }
+
+    @Override
+    public abstract int hashCode();
+
+    @Override
+    public abstract boolean equals(@Nullable Object obj);
+
+    @Override
+    public abstract String toString();
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpointPair.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/ProtocolEndpointPair.java
new file mode 100644 (file)
index 0000000..3dcb76b
--- /dev/null
@@ -0,0 +1,96 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.endpoint;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+
+/**
+ * Class that represents a pair of endpoints. This is used to find a packet
+ * stream between to endpoints.
+ *
+ * @author Vincent Perot
+ */
+public class ProtocolEndpointPair {
+
+    private final ProtocolEndpoint fEndpointA;
+    private final ProtocolEndpoint fEndpointB;
+
+    /**
+     * Constructor of the class {@link ProtocolEndpointPair}. It constructs a
+     * {@link ProtocolEndpointPair} object from a packet.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     */
+    public ProtocolEndpointPair(Packet packet) {
+        fEndpointA = packet.getSourceEndpoint();
+        fEndpointB = packet.getDestinationEndpoint();
+    }
+
+    /**
+     * Getter method that returns the first endpoint of the pair.
+     *
+     * @return The first endpoint.
+     */
+    public ProtocolEndpoint getFirstEndpoint() {
+        return fEndpointA;
+    }
+
+    /**
+     * Getter method that returns the second endpoint of the pair.
+     *
+     * @return The second endpoint.
+     */
+    public ProtocolEndpoint getSecondEndpoint() {
+        return fEndpointB;
+    }
+
+    /**
+     * Constructor of the class {@link ProtocolEndpointPair}. It constructs a
+     * {@link ProtocolEndpointPair} object from two endpoints.
+     *
+     * @param endpointA
+     *            The first endpoint.
+     * @param endpointB
+     *            The second endpoint.
+     */
+    public ProtocolEndpointPair(ProtocolEndpoint endpointA, ProtocolEndpoint endpointB) {
+        fEndpointA = endpointA;
+        fEndpointB = endpointB;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + fEndpointA.hashCode() * fEndpointB.hashCode();
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof ProtocolEndpointPair)) {
+            return false;
+        }
+        ProtocolEndpointPair other = (ProtocolEndpointPair) obj;
+
+        return (this.fEndpointA.equals(other.fEndpointA) && this.fEndpointB.equals(other.fEndpointB)) ||
+                (this.fEndpointA.equals(other.fEndpointB) && this.fEndpointB.equals(other.fEndpointA));
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/endpoint/package-info.java
new file mode 100644 (file)
index 0000000..d352000
--- /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.tracecompass.internal.pcap.core.endpoint;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/IPacketFilter.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/IPacketFilter.java
new file mode 100644 (file)
index 0000000..0fe206d
--- /dev/null
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.filter;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+
+/**
+ * Interface used to filter the packets.
+ *
+ * @author Vincent Perot
+ */
+public interface IPacketFilter {
+
+    /**
+     * Accept a packet or not.
+     *
+     * @param packet
+     *            the packet to accept or not
+     *
+     * @return The decision regarding the packet.
+     */
+    boolean accepts(Packet packet);
+}
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/PacketFilterByProtocol.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/PacketFilterByProtocol.java
new file mode 100644 (file)
index 0000000..967ed65
--- /dev/null
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.filter;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+
+/**
+ * Class used to filter the packets by protocol. This is used, for instance, to
+ * build the packet streams.
+ *
+ * @author Vincent Perot
+ */
+public class PacketFilterByProtocol implements IPacketFilter {
+
+    private final PcapProtocol fProtocol;
+
+    /**
+     * Constructor of the PacketFilterByProtocol class.
+     *
+     * @param protocol
+     *            The protocol that the incoming packets must contain.
+     */
+    public PacketFilterByProtocol(PcapProtocol protocol) {
+        fProtocol = protocol;
+    }
+
+    @Override
+    public boolean accepts(Packet packet) {
+        return packet.hasProtocol(fProtocol);
+    }
+
+    /**
+     * Getter method for the protocol of this filter.
+     *
+     * @return The protocol of this filter.
+     */
+    public PcapProtocol getProtocol() {
+        return fProtocol;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/filter/package-info.java
new file mode 100644 (file)
index 0000000..9c1005e
--- /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.tracecompass.internal.pcap.core.filter;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/package-info.java
new file mode 100644 (file)
index 0000000..c3246d8
--- /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.tracecompass.internal.pcap.core;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/BadPacketException.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/BadPacketException.java
new file mode 100644 (file)
index 0000000..0d40946
--- /dev/null
@@ -0,0 +1,68 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.packet;
+
+/**
+ * Exception that is thrown when Packet is erroneous. This is different than an
+ * invalid packet. An invalid packet contains bad fields (such as bad checksum)
+ * and does not throw exceptions while an erroneous packet is a packet that is
+ * impossible to obtain. For instance, an erroneous packet can be smaller than
+ * the minimum required size. Erroneous packets throw BadPacketExceptions.
+ *
+ * @author Vincent Perot
+ */
+public class BadPacketException extends Exception {
+
+    private static final long serialVersionUID = 7071588720009577619L;
+
+    /**
+     * Default constructor with no message.
+     */
+    public BadPacketException() {
+        super();
+    }
+
+    /**
+     * Constructor with an attached message.
+     *
+     * @param message
+     *            The message attached to this exception
+     */
+    public BadPacketException(String message) {
+        super(message);
+    }
+
+    /**
+     * Re-throw an exception into this type.
+     *
+     * @param e
+     *            The previous Exception we caught
+     */
+    public BadPacketException(Exception e) {
+        super(e);
+    }
+
+    /**
+     * Constructor with an attached message and re-throw an exception into this
+     * type.
+     *
+     * @param message
+     *            The message attached to this exception
+     * @param exception
+     *            The previous Exception caught
+     */
+    public BadPacketException(String message, Throwable exception) {
+        super(message, exception);
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/Packet.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/Packet.java
new file mode 100644 (file)
index 0000000..fc7b712
--- /dev/null
@@ -0,0 +1,297 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.packet;
+
+import java.nio.ByteBuffer;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+
+// TODO For all packets, make checks on dimension.
+// TODO maybe add a invalid packet type?
+
+/**
+ * Abstract class that implements the methods that are common to every packets.
+ *
+ * @author Vincent Perot
+ */
+public abstract class Packet {
+
+    /** Empty string */
+    protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+    /** The Pcap File to which this packet belong */
+    private final PcapFile fPcapFile;
+
+    /** The parent packet of this packet */
+    private final @Nullable Packet fParentPacket;
+
+    /** The protocol that this packet uses */
+    private final PcapProtocol fProtocol;
+
+    /**
+     * Constructor of the Packet Class.
+     *
+     * @param file
+     *            The file to which this packet belongs.
+     * @param parent
+     *            The parent packet of this packet.
+     * @param protocol
+     *            The protocol of the packet.
+     */
+    public Packet(PcapFile file, @Nullable Packet parent, PcapProtocol protocol) {
+        fPcapFile = file;
+        fParentPacket = parent;
+        fProtocol = protocol;
+    }
+
+    /**
+     * Getter method for the Pcap File that contains this packet.
+     *
+     * @return The Pcap File.
+     */
+    public PcapFile getPcapFile() {
+        return fPcapFile;
+    }
+
+    /**
+     * Method that returns the parent (encapsulating) packet of this packet.
+     * This method returns null if the packet is a Pcap Packet (highest level of
+     * encapsulation).
+     *
+     * @return The parent packet.
+     */
+    public @Nullable Packet getParentPacket() {
+        return fParentPacket;
+    }
+
+    /**
+     * Method that returns the child (encapsulated) packet of this packet. This
+     * method returns null if the packet is at the lowest level of
+     * encapsulation.
+     *
+     * @return The child packet.
+     */
+    public abstract @Nullable Packet getChildPacket();
+
+    /**
+     * Getter method for the protocol of the packet.
+     *
+     * @return The protocol of the packet.
+     */
+    public PcapProtocol getProtocol() {
+        return fProtocol;
+    }
+
+    /**
+     * Getter method for the payload of the packet. Returns null if there is no
+     * payload.
+     *
+     * @return the payload of the packet.
+     */
+    public abstract @Nullable ByteBuffer getPayload();
+
+    /**
+     * Method that looks for the packet that respects the specified protocol. It
+     * will go through all the layers of encapsulation and return the wanted
+     * packet, or null if the protocol is not present.
+     *
+     * @param protocol
+     *            The specified protocol.
+     * @return The packet that respects the protocol.
+     */
+    public final @Nullable Packet getPacket(PcapProtocol protocol) {
+
+        Packet wantedPacket = this;
+
+        while (wantedPacket != null) {
+            if (wantedPacket.getProtocol() == protocol) {
+                return wantedPacket;
+            }
+            wantedPacket = wantedPacket.getParentPacket();
+        }
+        wantedPacket = this.getChildPacket();
+
+        while (wantedPacket != null) {
+            if (wantedPacket.getProtocol() == protocol) {
+                return wantedPacket;
+            }
+            wantedPacket = wantedPacket.getChildPacket();
+        }
+
+        return null;
+    }
+
+    /**
+     * Method that looks if the protocol is contained in the packet, or in one
+     * of the encapsulating/encapsulated packet. It will go through all the
+     * layers of encapsulation and return true if it finds the specified
+     * protocol, and false otherwise. *
+     *
+     * @param protocol
+     *            The specified protocol.
+     * @return The presence of the protocol.
+     */
+    public final boolean hasProtocol(PcapProtocol protocol) {
+
+        // TODO Verify inputs
+        Packet wantedPacket = this;
+
+        while (wantedPacket != null) {
+            if (wantedPacket.getProtocol() == protocol) {
+                return true;
+            }
+            wantedPacket = wantedPacket.getParentPacket();
+        }
+        wantedPacket = this.getChildPacket();
+
+        while (wantedPacket != null) {
+            if (wantedPacket.getProtocol() == protocol) {
+                return true;
+            }
+            wantedPacket = wantedPacket.getChildPacket();
+        }
+
+        return false;
+    }
+
+    /**
+     * Method that returns the most encapsulated packet possible. If the global
+     * packet contains the protocol Unknown, it will stop at the packet just
+     * before this protocol. This is because the {@link UnknownPacket} can be
+     * considered as plain payload.
+     *
+     * @return The most encapsulated packet.
+     */
+    public Packet getMostEcapsulatedPacket() {
+        @NonNull Packet packet = this;
+        while (packet.getProtocol() != PcapProtocol.UNKNOWN) {
+            Packet childPacket = packet.getChildPacket();
+            if (childPacket == null || childPacket.getProtocol() == PcapProtocol.UNKNOWN) {
+                break;
+            }
+            packet = childPacket;
+        }
+        return packet;
+    }
+
+    /**
+     * Method that look at the validity of the different fields (such as
+     * checksum). This is protocol dependent and is used to identify bad
+     * packets.
+     *
+     * @return The validity of the packet.
+     */
+    public abstract boolean validate();
+
+    /**
+     * Internal method that is used to find the child packet. This is protocol
+     * dependent and must be implemented by each packet class.
+     *
+     * @return The child packet.
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    protected abstract @Nullable Packet findChildPacket() throws BadPacketException;
+
+    /**
+     * This method returns the source endpoint of this packet. The endpoint is
+     * equivalent to the address of this packet, and is protocol dependent. For
+     * instance, a UDP endpoint is the combination of the MAC address, the IP
+     * address and the port number.
+     *
+     * @return The source endpoint of this packet.
+     */
+    public abstract ProtocolEndpoint getSourceEndpoint();
+
+    /**
+     * This method returns the destination endpoint of this packet. The endpoint
+     * is equivalent to the address of this packet, and is protocol dependent.
+     * For instance, a UDP endpoint is the combination of the MAC address, the
+     * IP address and the port number.
+     *
+     * @return The destination endpoint of this packet.
+     */
+    public abstract ProtocolEndpoint getDestinationEndpoint();
+
+    /**
+     * Method that returns all the fields of the packet as a Map<Field ID, Field
+     * Value>. All child classes of {@link Packet} must implement this method.
+     *
+     * @return All the packet fields as a map.
+     */
+    public abstract Map<String, String> getFields();
+
+    /**
+     * Method that returns a short summary of the local packet, such as the most
+     * useful information.
+     *
+     * For instance, a possible summary string of an {@link IPv4Packet} can be:
+     * "Src: 192.168.0.1, Dst: 192.168.1.12".
+     *
+     * @return A short summary of the local packet, as a string.
+     */
+    public abstract String getLocalSummaryString();
+
+    /**
+     * Method that returns the local meaning of a packet, based on its fields.
+     *
+     * For instance, a possible signification of an ARP packet can be:
+     * "Who has 192.168.1.12? Tell 192.168.0.1".
+     *
+     * @return The local meaning of the packet, as a string.
+     */
+    protected abstract String getSignificationString();
+
+    /**
+     * Method that returns the global meaning of the packet. As such, it will
+     * look for the most relevant packet and display its signification.
+     *
+     * For instance, a possible signification of an ARP packet can be:
+     * "Who has 192.168.1.12? Tell 192.168.0.1".
+     *
+     * @return The meaning of the global packet, as a string.
+     */
+    public final String getGlobalSummaryString() {
+        Packet packet = this.getMostEcapsulatedPacket();
+        return packet.getSignificationString();
+    }
+
+    @Override
+    public abstract boolean equals(@Nullable Object obj);
+
+    @Override
+    public abstract int hashCode();
+
+    /**
+     * Method that is used by child packet classes to verify if a bit is set.
+     *
+     * @param value
+     *            the byte containing the flags.
+     * @param bit
+     *            the bit index.
+     * @return Whether the bit is set or not.
+     */
+    protected static final boolean isBitSet(byte value, int bit) {
+        if (bit < 0 || bit > 7) {
+            throw new IllegalArgumentException("The byte index is not valid!"); //$NON-NLS-1$
+        }
+        return ((value >>> bit & 0b1) == 0b1);
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/packet/package-info.java
new file mode 100644 (file)
index 0000000..74fc4a4
--- /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.tracecompass.internal.pcap.core.packet;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/PcapProtocol.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/PcapProtocol.java
new file mode 100644 (file)
index 0000000..63f534a
--- /dev/null
@@ -0,0 +1,179 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Enumeration used for describing the different known protocols.
+ *
+ * @author Vincent Perot
+ */
+public enum PcapProtocol {
+
+    // Layer 0
+    /**
+     * The Pcap Protocol is not a real protocol but is used as an helper to
+     * generate Pcap packets.
+     */
+    PCAP("Packet Capture", "pcap", Layer.LAYER_0, false), //$NON-NLS-1$ //$NON-NLS-2$
+
+    // Layer 1
+    // Should always be empty.
+
+    // Layer 2
+    /**
+     * The description of the Ethernet II Protocol.
+     */
+    ETHERNET_II("Ethernet II", "eth", Layer.LAYER_2, true), //$NON-NLS-1$ //$NON-NLS-2$
+
+    // Layer 3
+    /**
+     * The description of the Internet Protocol Version 4.
+     */
+    IPV4("Internet Protocol Version 4", "ipv4", Layer.LAYER_3, true), //$NON-NLS-1$ //$NON-NLS-2$
+
+    // Layer 4
+    /**
+     * The description of the Transmission Control Protocol.
+     */
+    TCP("Transmission Control Protocol", "tcp", Layer.LAYER_4, true), //$NON-NLS-1$ //$NON-NLS-2$
+    /**
+     * The description of the User Datagram Protocol.
+     */
+    UDP("User Datagram Protocol", "udp", Layer.LAYER_4, true), //$NON-NLS-1$ //$NON-NLS-2$
+
+    // 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("Payload", "???", Layer.LAYER_7, false); //$NON-NLS-1$ //$NON-NLS-2$
+
+
+    /**
+     * Enum that lists constants related to protocols/layers.
+     *
+     * See http://en.wikipedia.org/wiki/OSI_model#Description_of_OSI_layers.
+     *
+     * @author Vincent Perot
+     */
+    public static enum Layer {
+
+        /**
+         * Layer 0. This layer is not an OSI layer but is used as an helper to store
+         * the pseudo-protocol PCAP.
+         */
+        LAYER_0,
+
+        /** Layer 1 of the OSI model */
+        LAYER_1,
+
+        /** Layer 2 of the OSI model */
+        LAYER_2,
+
+        /** Layer 3 of the OSI model */
+        LAYER_3,
+
+        /** Layer 4 of the OSI model */
+        LAYER_4,
+
+        /** Layer 5 of the OSI model */
+        LAYER_5,
+
+        /** Layer 6 of the OSI model */
+        LAYER_6,
+
+        /** Layer 7 of the OSI model */
+        LAYER_7;
+    }
+
+
+    // Fields
+    private final String fName;
+    private final String fShortName;
+    private final Layer fLayer;
+    private final boolean fSupportsStream;
+
+    private PcapProtocol(String name, String shortName, Layer layer, boolean supportsStream) {
+        fName = name;
+        fShortName = shortName;
+        fLayer = layer;
+        fSupportsStream = 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 Layer 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;
+    }
+
+    // TODO make an immutable list that holds this data instead of computing it
+    // everytime.
+
+    /**
+     * Method that returns a list of all the protocols included in a certain OSI
+     * layer.
+     *
+     * @param layer
+     *            The layer of the protocols.
+     * @return The protocols on that layer.
+     */
+    public static Collection<PcapProtocol> getProtocolsOnLayer(Layer layer) {
+        List<PcapProtocol> protocolsOnLayer = new ArrayList<>();
+        for (PcapProtocol p : PcapProtocol.values()) {
+            if (p.getLayer() == layer) {
+                protocolsOnLayer.add(p);
+            }
+        }
+        return protocolsOnLayer;
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIEndpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIEndpoint.java
new file mode 100644 (file)
index 0000000..347daf1
--- /dev/null
@@ -0,0 +1,98 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.ethernet2;
+
+import java.util.Arrays;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+
+/**
+ * Class that extends the {@link ProtocolEndpoint} class. It represents the
+ * endpoint at an Ethernet II level.
+ *
+ * @author Vincent Perot
+ */
+public class EthernetIIEndpoint extends ProtocolEndpoint {
+
+    private final byte[] fMacAddress;
+
+    /**
+     * Constructor of the {@link EthernetIIEndpoint} class. It takes a packet to
+     * get its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public EthernetIIEndpoint(EthernetIIPacket packet, boolean isSourceEndpoint) {
+        super(packet, isSourceEndpoint);
+        fMacAddress = isSourceEndpoint ? packet.getSourceMacAddress() : packet.getDestinationMacAddress();
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            result = 0;
+        } else {
+            result = endpoint.hashCode();
+        }
+        result = prime * result + Arrays.hashCode(fMacAddress);
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof EthernetIIEndpoint)) {
+            return false;
+        }
+
+        EthernetIIEndpoint other = (EthernetIIEndpoint) obj;
+
+        // Check on layer
+        boolean localEquals = Arrays.equals(fMacAddress, other.fMacAddress);
+        if (!localEquals) {
+            return false;
+        }
+
+        // Check above layers.
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint != null) {
+            return endpoint.equals(other.getParentEndpoint());
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            return ConversionHelper.toMacAddress(fMacAddress);
+        }
+        return (endpoint.toString().equals(EMPTY_STRING) ?
+                ConversionHelper.toMacAddress(fMacAddress) :
+                endpoint.toString() + '/' + ConversionHelper.toMacAddress(fMacAddress));
+
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIPacket.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIPacket.java
new file mode 100644 (file)
index 0000000..24e35d1
--- /dev/null
@@ -0,0 +1,285 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.ethernet2;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+import org.eclipse.tracecompass.internal.pcap.core.util.EthertypeHelper;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Class that represents an Ethernet II packet. This should be called an
+ * Ethernet frame, but in order to keep the nomenclature consistent, this is
+ * called a packet.
+ *
+ * @author Vincent Perot
+ */
+public class EthernetIIPacket extends Packet {
+
+    private final @Nullable Packet fChildPacket;
+    private final @Nullable ByteBuffer fPayload;
+
+    /* We store MAC addresses as byte arrays since
+     * there is no standard java class to store them. */
+    private final byte[] fSourceMacAddress;
+    private final byte[] fDestinationMacAddress;
+
+    private final int fType;
+
+    private @Nullable EthernetIIEndpoint fSourceEndpoint;
+    private @Nullable EthernetIIEndpoint fDestinationEndpoint;
+
+    private @Nullable Map<String, String> fFields;
+
+    /**
+     * Constructor of the Ethernet Packet class.
+     *
+     * @param file
+     *            The file that contains this packet.
+     * @param parent
+     *            The parent packet of this packet (the encapsulating packet).
+     * @param packet
+     *            The entire packet (header and payload).
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    public EthernetIIPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
+        super(file, parent, PcapProtocol.ETHERNET_II);
+
+        if (packet.array().length <= EthernetIIValues.ETHERNET_II_MIN_SIZE) {
+            throw new BadPacketException("An Ethernet II packet can't be smaller than 14 bytes."); //$NON-NLS-1$
+        }
+
+        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
+        // methods.
+        fSourceEndpoint = null;
+        fDestinationEndpoint = null;
+
+        fFields = null;
+
+        fDestinationMacAddress = new byte[EthernetIIValues.MAC_ADDRESS_SIZE];
+        fSourceMacAddress = new byte[EthernetIIValues.MAC_ADDRESS_SIZE];
+        packet.order(ByteOrder.BIG_ENDIAN);
+        packet.position(0);
+        packet.get(fDestinationMacAddress);
+        packet.get(fSourceMacAddress);
+        fType = ConversionHelper.unsignedShortToInt(packet.getShort());
+
+        // Get payload if it exists.
+        if (packet.array().length - packet.position() > 0) {
+            byte[] array = new byte[packet.array().length - packet.position()];
+            packet.get(array);
+            ByteBuffer payload = ByteBuffer.wrap(array);
+            if (payload != null) {
+                payload.order(ByteOrder.BIG_ENDIAN);
+                payload.position(0);
+            }
+            fPayload = payload;
+
+        } else {
+            fPayload = null;
+        }
+
+        // Find child
+        fChildPacket = findChildPacket();
+
+    }
+
+    @Override
+    public @Nullable Packet getChildPacket() {
+        return fChildPacket;
+    }
+
+    @Override
+    public @Nullable ByteBuffer getPayload() {
+        return fPayload;
+    }
+
+    /**
+     * Getter method for the source MAC Address.
+     *
+     * @return The source MAC address.
+     */
+    public byte[] getSourceMacAddress() {
+        return checkNotNull(Arrays.copyOf(fSourceMacAddress, fSourceMacAddress.length));
+    }
+
+    /**
+     * Getter method for the destination MAC Address.
+     *
+     * @return The destination MAC address.
+     */
+    public byte[] getDestinationMacAddress() {
+        return checkNotNull(Arrays.copyOf(fDestinationMacAddress, fDestinationMacAddress.length));
+    }
+
+    /**
+     * Getter method for Ethertype. See
+     * http://standards.ieee.org/develop/regauth/ethertype/eth.txt
+     *
+     * @return The Ethertype. This is used to determine the child packet..
+     */
+    public int getEthertype() {
+        return fType;
+    }
+
+    @Override
+    protected @Nullable Packet findChildPacket() throws BadPacketException {
+        // TODO Add more protocols.
+        ByteBuffer payload = fPayload;
+        if (payload == null) {
+            return null;
+        }
+        switch (fType) {
+        case EthertypeHelper.ETHERTYPE_IPV4:
+            return new IPv4Packet(getPcapFile(), this, payload);
+        default:
+            return new UnknownPacket(getPcapFile(), this, payload);
+        }
+    }
+
+    @Override
+    public String toString() {
+        String string = getProtocol().getName() + ", Source: " + ConversionHelper.toMacAddress(fSourceMacAddress) + //$NON-NLS-1$
+                ", Destination: " + ConversionHelper.toMacAddress(fDestinationMacAddress) + ", Type: " + //$NON-NLS-1$ //$NON-NLS-2$
+                EthertypeHelper.toEtherType(fType) + "\n"; //$NON-NLS-1$
+        final Packet child = fChildPacket;
+        if (child != null) {
+            return string + child.toString();
+        }
+        return string;
+    }
+
+    @Override
+    public boolean validate() {
+        // Not yet implemented. ATM, we consider that all packets are valid.
+        // This is the case for all packets.
+        // TODO Implement it.
+        return true;
+    }
+
+    @Override
+    public EthernetIIEndpoint getSourceEndpoint() {
+        @Nullable EthernetIIEndpoint endpoint = fSourceEndpoint;
+        if (endpoint == null) {
+            endpoint = new EthernetIIEndpoint(this, true);
+        }
+        fSourceEndpoint = endpoint;
+        return fSourceEndpoint;
+    }
+
+    @Override
+    public EthernetIIEndpoint getDestinationEndpoint() {
+        @Nullable EthernetIIEndpoint endpoint = fDestinationEndpoint;
+
+        if (endpoint == null) {
+            endpoint = new EthernetIIEndpoint(this, false);
+        }
+        fDestinationEndpoint = endpoint;
+        return fDestinationEndpoint;
+    }
+
+    @Override
+    public Map<String, String> getFields() {
+        Map<String, String> map = fFields;
+        if (map == null) {
+            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder();
+            builder.put("Source MAC Address", ConversionHelper.toMacAddress(fSourceMacAddress)); //$NON-NLS-1$
+            builder.put("Destination MAC Address", ConversionHelper.toMacAddress(fDestinationMacAddress)); //$NON-NLS-1$
+            builder.put("Ethertype", String.valueOf(EthertypeHelper.toEtherType(fType))); //$NON-NLS-1$
+
+            fFields = checkNotNull(builder.build());
+            return fFields;
+        }
+        return map;
+    }
+
+    @Override
+    public String getLocalSummaryString() {
+        return "Src: " + ConversionHelper.toMacAddress(fSourceMacAddress) + " , Dst: " + ConversionHelper.toMacAddress(fDestinationMacAddress); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    protected String getSignificationString() {
+        return "Source MAC: " + ConversionHelper.toMacAddress(fSourceMacAddress) + " , Destination MAC: " + ConversionHelper.toMacAddress(fDestinationMacAddress); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        final Packet child = fChildPacket;
+        if (child != null) {
+            result = prime * result + child.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + Arrays.hashCode(fDestinationMacAddress);
+        final ByteBuffer payload = fPayload;
+        if (payload != null) {
+            result = prime * result + payload.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + Arrays.hashCode(fSourceMacAddress);
+        result = prime * result + fType;
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        EthernetIIPacket other = (EthernetIIPacket) obj;
+        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)) {
+            return false;
+        }
+        if (!Arrays.equals(fDestinationMacAddress, other.fDestinationMacAddress)) {
+            return false;
+        }
+        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)) {
+            return false;
+        }
+
+        if (!Arrays.equals(fSourceMacAddress, other.fSourceMacAddress)) {
+            return false;
+        }
+        if (fType != other.fType) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIValues.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/EthernetIIValues.java
new file mode 100644 (file)
index 0000000..f244f11
--- /dev/null
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.ethernet2;
+
+/**
+ * Interface that lists constants related to Ethernet II.
+ *
+ * See http://en.wikipedia.org/wiki/Ethernet_frame#Ethernet_II.
+ *
+ * @author Vincent Perot
+ */
+public interface EthernetIIValues {
+
+    /** Size in bytes of a MAC address */
+    int MAC_ADDRESS_SIZE = 6;
+
+    /** Size in bytes of the ethertype field */
+    int ETHERTYPE_SIZE = 4;
+
+    /** Size in bytes of the CRC checksum */
+    int CRC_CHECKSUM_SIZE = 4;
+
+    /** Maximum size in bytes of a entire Ethernet II Frame */
+    int ETHERNET_II_MAX_SIZE = 1518;
+
+    /** Minimum size in bytes of a entire Ethernet II Frame */
+    int ETHERNET_II_MIN_SIZE = 14;
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ethernet2/package-info.java
new file mode 100644 (file)
index 0000000..43cfa8b
--- /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.tracecompass.internal.pcap.core.protocol.ethernet2;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Endpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Endpoint.java
new file mode 100644 (file)
index 0000000..0acc7b7
--- /dev/null
@@ -0,0 +1,99 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.ipv4;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.net.Inet4Address;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+
+/**
+ * Class that extends the {@link ProtocolEndpoint} class. It represents the
+ * endpoint at an IPv4 level.
+ *
+ * @author Vincent Perot
+ */
+public class IPv4Endpoint extends ProtocolEndpoint {
+
+    private final Inet4Address fIPAddress;
+
+    /**
+     * Constructor of the {@link IPv4Endpoint} class. It takes a packet to get
+     * its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public IPv4Endpoint(IPv4Packet packet, boolean isSourceEndpoint) {
+        super(packet, isSourceEndpoint);
+        fIPAddress = isSourceEndpoint ? packet.getSourceIpAddress() : packet.getDestinationIpAddress();
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            result = 0;
+        } else {
+            result = endpoint.hashCode();
+        }
+
+        result = prime * result + fIPAddress.hashCode();
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof IPv4Endpoint)) {
+            return false;
+        }
+
+        IPv4Endpoint other = (IPv4Endpoint) obj;
+
+        // Check on layer
+        boolean localEquals = fIPAddress.equals(other.fIPAddress);
+        if (!localEquals) {
+            return false;
+        }
+
+        // Check above layers.
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint != null) {
+            return endpoint.equals(other.getParentEndpoint());
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            return checkNotNull(fIPAddress.getHostAddress());
+        }
+        return endpoint.toString() + '/' + fIPAddress.getHostAddress();
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Packet.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Packet.java
new file mode 100644 (file)
index 0000000..cff6996
--- /dev/null
@@ -0,0 +1,622 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.ipv4;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.tcp.TCPPacket;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.udp.UDPPacket;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+import org.eclipse.tracecompass.internal.pcap.core.util.IPProtocolNumberHelper;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
+
+/**
+ * Class that represents an Ethernet II packet.
+ *
+ * @author Vincent Perot
+ */
+public class IPv4Packet extends Packet {
+
+    private final @Nullable Packet fChildPacket;
+    private final @Nullable ByteBuffer fPayload;
+
+    private final int fVersion;
+    private final int fInternetHeaderLength; // in 4 bytes blocks
+    private final int fDSCP;
+    private final int fExplicitCongestionNotification;
+    private final int fTotalLength; // in bytes
+    private final int fIdentification;
+    private final boolean fReservedFlag;
+    private final boolean fDontFragmentFlag;
+    private final boolean fMoreFragmentFlag;
+    private final int fFragmentOffset;
+    private final int fTimeToLive;
+    private final int fIpDatagramProtocol;
+    private final int fHeaderChecksum;
+    private final Inet4Address fSourceIpAddress;
+    private final Inet4Address fDestinationIpAddress;
+    private final @Nullable byte[] fOptions;
+
+    private @Nullable IPv4Endpoint fSourceEndpoint;
+    private @Nullable IPv4Endpoint fDestinationEndpoint;
+
+    private @Nullable Map<String, String> fFields;
+
+    // TODO Interpret options. See
+    // http://www.iana.org/assignments/ip-parameters/ip-parameters.xhtml
+
+    /**
+     * Constructor of the IPv4 Packet class.
+     *
+     * @param file
+     *            The file that contains this packet.
+     * @param parent
+     *            The parent packet of this packet (the encapsulating packet).
+     * @param packet
+     *            The entire packet (header and payload).
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    public IPv4Packet(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
+        super(file, parent, PcapProtocol.IPV4);
+
+        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
+        // methods.
+        fSourceEndpoint = null;
+        fDestinationEndpoint = null;
+
+        fFields = null;
+
+        packet.order(ByteOrder.BIG_ENDIAN);
+        packet.position(0);
+
+        byte storage = packet.get();
+        fVersion = ((storage & 0xF0) >> 4) & 0x000000FF;
+        fInternetHeaderLength = storage & 0x0F;
+
+        storage = packet.get();
+        fDSCP = ((storage & 0b11111100) >> 2) & 0x000000FF;
+        fExplicitCongestionNotification = storage & 0b00000011;
+
+        fTotalLength = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fIdentification = ConversionHelper.unsignedShortToInt(packet.getShort());
+
+        storage = packet.get();
+        fReservedFlag = isBitSet(storage, 7);
+        fDontFragmentFlag = isBitSet(storage, 6);
+        fMoreFragmentFlag = isBitSet(storage, 5);
+        int msb = ((storage & 0b00011111) << 8);
+        int lsb = ConversionHelper.unsignedByteToInt(packet.get());
+        fFragmentOffset = msb + lsb;
+
+        fTimeToLive = ConversionHelper.unsignedByteToInt(packet.get());
+        fIpDatagramProtocol = ConversionHelper.unsignedByteToInt(packet.get());
+        fHeaderChecksum = ConversionHelper.unsignedShortToInt(packet.getShort());
+
+        byte[] source = new byte[IPv4Values.IP_ADDRESS_SIZE];
+        byte[] destination = new byte[IPv4Values.IP_ADDRESS_SIZE];
+        packet.get(source);
+        packet.get(destination);
+
+        try {
+            fSourceIpAddress = (Inet4Address) checkNotNull(InetAddress.getByAddress(source));
+            fDestinationIpAddress = (Inet4Address) checkNotNull(InetAddress.getByAddress(destination));
+        } catch (UnknownHostException e) {
+            throw new BadPacketException("The IP Address size is not valid!"); //$NON-NLS-1$
+        }
+
+        // Get options if there are any
+        if (fInternetHeaderLength > IPv4Values.DEFAULT_HEADER_LENGTH) {
+            fOptions = new byte[(fInternetHeaderLength - IPv4Values.DEFAULT_HEADER_LENGTH) * IPv4Values.BLOCK_SIZE];
+            packet.get(fOptions);
+        } else {
+            fOptions = null;
+        }
+
+        // Get payload if any.
+        if (packet.array().length - packet.position() > 0) {
+            byte[] array = new byte[packet.array().length - packet.position()];
+            packet.get(array);
+            ByteBuffer payload = ByteBuffer.wrap(array);
+            payload.order(ByteOrder.BIG_ENDIAN);
+            payload.position(0);
+            fPayload = payload;
+        } else {
+            fPayload = null;
+        }
+
+        // Find child
+        fChildPacket = findChildPacket();
+
+    }
+
+    @Override
+    public @Nullable Packet getChildPacket() {
+        return fChildPacket;
+    }
+
+    @Override
+    public @Nullable ByteBuffer getPayload() {
+        return fPayload;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * See http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
+     */
+    @Override
+    protected @Nullable Packet findChildPacket() throws BadPacketException {
+        // TODO Implement more protocols
+        ByteBuffer payload = fPayload;
+        if (payload == null) {
+            return null;
+        }
+
+        switch (fIpDatagramProtocol) {
+        case IPProtocolNumberHelper.PROTOCOL_NUMBER_TCP:
+            return new TCPPacket(getPcapFile(), this, payload);
+        case IPProtocolNumberHelper.PROTOCOL_NUMBER_UDP:
+            return new UDPPacket(getPcapFile(), this, payload);
+        default:
+            return new UnknownPacket(getPcapFile(), this, payload);
+        }
+
+    }
+
+    @Override
+    public String toString() {
+        // Generate flagString
+        // This is very ugly.
+        String flagString = null;
+
+        if (fReservedFlag && fDontFragmentFlag && fMoreFragmentFlag) { // 111
+            flagString = "Flags: 0x07 (Invalid)"; //$NON-NLS-1$
+        } else if (fReservedFlag && fDontFragmentFlag && !fMoreFragmentFlag) { // 110
+            flagString = "Flags: 0x06 (Invalid)"; //$NON-NLS-1$
+        } else if (fReservedFlag && !fDontFragmentFlag && fMoreFragmentFlag) { // 101
+            flagString = "Flags: 0x05 (Invalid)"; //$NON-NLS-1$
+        } else if (fReservedFlag && !fDontFragmentFlag && !fMoreFragmentFlag) { // 100
+            flagString = "Flags: 0x04 (Invalid)"; //$NON-NLS-1$
+        } else if (!fReservedFlag && fDontFragmentFlag && fMoreFragmentFlag) { // 011
+            flagString = "Flags: 0x03 (Invalid)"; //$NON-NLS-1$
+        } else if (!fReservedFlag && fDontFragmentFlag && !fMoreFragmentFlag) { // 010
+            flagString = "Flags: 0x02 (Don't fragment)"; //$NON-NLS-1$
+        } else if (!fReservedFlag && !fDontFragmentFlag && fMoreFragmentFlag) { // 001
+            flagString = "Flags: 0x01 (More fragments)"; //$NON-NLS-1$
+        } else if (!fReservedFlag && !fDontFragmentFlag && !fMoreFragmentFlag) { // 000
+            flagString = "Flags: 0x00 (Don't have more fragments)"; //$NON-NLS-1$
+        }
+
+        flagString += ", Fragment Offset: " + fFragmentOffset; //$NON-NLS-1$
+
+        // Generate checksum string
+        // TODO calculate the expected checksum from packet
+        String checksumString = "Header Checksum: " + String.format("%s%04x", "0x", fHeaderChecksum); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+        String string = getProtocol().getName() + ", Source: " + fSourceIpAddress.getHostAddress() + ", Destination: " + fDestinationIpAddress.getHostAddress() + //$NON-NLS-1$ //$NON-NLS-2$
+                "\nVersion: " + fVersion + ", Identification: " + String.format("%s%04x", "0x", fIdentification) + ", Header Length: " + getHeaderLength() + " bytes, Total Length: " + getTotalLength() + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+                " bytes\nDifferentiated Services Code Point: " + String.format("%s%02x", "0x", fDSCP) + "; Explicit Congestion Notification: " + String.format("%s%02x", "0x", fExplicitCongestionNotification) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
+                + "\n" + flagString + "\nTime to live: " + fTimeToLive + //$NON-NLS-1$ //$NON-NLS-2$
+                "\nProtocol: " + fIpDatagramProtocol + "\n" //$NON-NLS-1$ //$NON-NLS-2$
+                + checksumString + "\n"; //$NON-NLS-1$
+        final Packet child = fChildPacket;
+        if (child != null) {
+            return string + child.toString();
+        }
+        return string;
+    }
+
+    /**
+     * Getter method that returns the version of the IP protocol used. This
+     * should always be set to 4 as IPv6 has its own class.
+     *
+     * @return The version of the IP used.
+     */
+    public int getVersion() {
+        return fVersion;
+    }
+
+    /**
+     * Getter method that returns the header length in bytes. In the IPv4
+     * packet, this is specified in 4-bytes data block. By default, this method
+     * returns 20 if there are no options present. Otherwise, it will return a
+     * higher number.
+     *
+     * @return The header length in bytes.
+     */
+    public int getHeaderLength() {
+        return fInternetHeaderLength * IPv4Values.BLOCK_SIZE;
+    }
+
+    /**
+     * Getter method that returns the Differentiated Services Code Point (a.k.a.
+     * the Type of Service). This is useful for some technologies that require
+     * real-time data exchange.
+     *
+     * @return The DSCP
+     */
+    public int getDSCP() {
+        return fDSCP;
+    }
+
+    /**
+     * Getter method that returns the Explicit Congestion Notification (ECN).
+     * This allows end-to-end communication without dropping packets.
+     *
+     * @return The ECN.
+     */
+    public int getExplicitCongestionNotification() {
+        return fExplicitCongestionNotification;
+    }
+
+    /**
+     * Getter method to retrieve the length of the entire packet, in bytes. This
+     * number is according to the packet, and might not be true if the packet is
+     * erroneous.
+     *
+     * @return The total length (packet and payload) in bytes.
+     */
+    public int getTotalLength() {
+        return fTotalLength;
+    }
+
+    /**
+     * Getter method to retrieve the Identification. This is a field that is
+     * used to uniquely identify the packets, thus allowing the reconstruction
+     * of fragmented IP packets.
+     *
+     * @return The packet identification.
+     */
+    public int getIdentification() {
+        return fIdentification;
+    }
+
+    /**
+     * Getter method that returns the state of the Reserved flag. This must
+     * always be zero.
+     *
+     * @return The state of the Reserved flag.
+     */
+    public boolean getReservedFlag() {
+        return fReservedFlag;
+    }
+
+    /**
+     * Getter method that indicates if the packet can be fragmented or not.
+     *
+     * @return Whether the packet can be fragmented or not.
+     */
+    public boolean getDontFragmentFlag() {
+        return fDontFragmentFlag;
+    }
+
+    /**
+     * Getter method that indicates if the packet has more fragments or not.
+     *
+     * @return Whether the packet has more fragments or not.
+     */
+    public boolean getHasMoreFragment() {
+        return fMoreFragmentFlag;
+    }
+
+    /**
+     * Getter method that specify the offset of a particular fragment relative
+     * to the original unfragmented packet, in 8-bytes blocks. *
+     *
+     * @return The fragment offset.
+     */
+    public int getFragmentOffset() {
+        return fFragmentOffset;
+    }
+
+    /**
+     * Getter method that returns the time to live in seconds. In practice, this
+     * is a hop count. This is used to prevent packets from persisting.
+     *
+     * @return The time left to live for the packet.
+     */
+    public int getTimeToLive() {
+        return fTimeToLive;
+    }
+
+    /**
+     * Getter method that returns the encapsulated protocol.
+     *
+     * See http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
+     *
+     * @return The encapsulated protocol.
+     */
+    public int getIpDatagramProtocol() {
+        return fIpDatagramProtocol;
+    }
+
+    /**
+     * Getter method that returns the checksum, according to the packet. This
+     * checksum might be wrong if the packet is erroneous.
+     *
+     * @return The header checksum.
+     */
+    public int getHeaderChecksum() {
+        return fHeaderChecksum;
+    }
+
+    /**
+     * Getter method that returns the source IP address.
+     *
+     * @return The source IP address, as a byte array in big-endian.
+     */
+    public Inet4Address getSourceIpAddress() {
+        return fSourceIpAddress;
+    }
+
+    /**
+     * Getter method that returns the destination IP address.
+     *
+     * @return The destination IP address, as a byte array in big-endian.
+     */
+    public Inet4Address getDestinationIpAddress() {
+        return fDestinationIpAddress;
+    }
+
+    /**
+     * Getter method that returns the options. This method returns null if no
+     * options are present.
+     *
+     * @return The options of the packet.
+     */
+    public @Nullable byte[] getOptions() {
+        final byte[] options = fOptions;
+        if (options == null) {
+            return null;
+        }
+        return Arrays.copyOf(options, options.length);
+    }
+
+    @Override
+    public boolean validate() {
+        // Not yet implemented. ATM, we consider that all packets are valid.
+        // This is the case for all packets.
+        // TODO Implement it.
+        return true;
+    }
+
+    @Override
+    public IPv4Endpoint getSourceEndpoint() {
+        @Nullable
+        IPv4Endpoint endpoint = fSourceEndpoint;
+        if (endpoint == null) {
+            endpoint = new IPv4Endpoint(this, true);
+        }
+        fSourceEndpoint = endpoint;
+        return fSourceEndpoint;
+    }
+
+    @Override
+    public IPv4Endpoint getDestinationEndpoint() {
+        @Nullable
+        IPv4Endpoint endpoint = fDestinationEndpoint;
+
+        if (endpoint == null) {
+            endpoint = new IPv4Endpoint(this, false);
+        }
+        fDestinationEndpoint = endpoint;
+        return fDestinationEndpoint;
+    }
+
+    @Override
+    public Map<String, String> getFields() {
+        Map<String, String> map = fFields;
+        if (map == null) {
+            Builder<String, String> builder = ImmutableMap.<String, String> builder()
+                    .put("Version", String.valueOf(fVersion)) //$NON-NLS-1$
+                    .put("Header Length", String.valueOf(getHeaderLength()) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
+                    .put("Differentiated Services Field", String.format("%s%02x", "0x", fDSCP)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    .put("Explicit Congestion Notification", String.format("%s%02x", "0x", fExplicitCongestionNotification)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    .put("Total Length", String.valueOf(fTotalLength) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
+                    .put("Identification", String.format("%s%04x", "0x", fIdentification)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    .put("Don't Fragment Flag", String.valueOf(fDontFragmentFlag)) //$NON-NLS-1$
+                    .put("More Fragment Flag", String.valueOf(fMoreFragmentFlag)) //$NON-NLS-1$
+                    .put("Fragment Offset", String.valueOf(fFragmentOffset)) //$NON-NLS-1$
+                    .put("Time to live", String.valueOf(fTimeToLive)) //$NON-NLS-1$
+                    .put("Protocol", IPProtocolNumberHelper.toString(fIpDatagramProtocol) + " (" + String.valueOf(fIpDatagramProtocol) + ")") //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    .put("Checksum", String.format("%s%04x", "0x", fHeaderChecksum)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    .put("Source IP Address", fSourceIpAddress.getHostAddress()) //$NON-NLS-1$
+                    .put("Destination IP Address", fDestinationIpAddress.getHostAddress()); //$NON-NLS-1$
+            byte[] options = fOptions;
+            if (options == null) {
+                builder.put("Options", EMPTY_STRING); //$NON-NLS-1$
+            } else {
+                builder.put("Options", ConversionHelper.bytesToHex(options, true)); //$NON-NLS-1$
+
+            }
+            fFields = checkNotNull(builder.build());
+            return fFields;
+        }
+        return map;
+    }
+
+    @Override
+    public String getLocalSummaryString() {
+        return "Src: " + fSourceIpAddress.getHostAddress() + " , Dst: " + fDestinationIpAddress.getHostAddress(); //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    protected String getSignificationString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(fSourceIpAddress.getHostAddress())
+                .append(" > ") //$NON-NLS-1$
+                .append(fDestinationIpAddress.getHostAddress());
+
+        String flags = generateFlagString();
+        if (!(flags.equals(""))) { //$NON-NLS-1$
+            sb.append(' ')
+                    .append('[')
+                    .append(flags)
+                    .append(']');
+        }
+        sb.append(" Id=") //$NON-NLS-1$
+        .append(fIdentification);
+
+        final ByteBuffer payload = fPayload;
+        if (payload != null) {
+            sb.append(" Len=") //$NON-NLS-1$
+            .append(payload.array().length);
+        } else {
+            sb.append(" Len=0"); //$NON-NLS-1$
+        }
+        return NonNullUtils.nullToEmptyString(sb);
+    }
+
+    private String generateFlagString() {
+        StringBuilder sb = new StringBuilder();
+        boolean start = true;
+
+        if (fDontFragmentFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("DF"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fMoreFragmentFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("MF"); //$NON-NLS-1$
+            start = false;
+        }
+        return NonNullUtils.nullToEmptyString(sb);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        final Packet child = fChildPacket;
+        if (child != null) {
+            result = prime * result + child.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + fDSCP;
+        result = prime * result + fDestinationIpAddress.hashCode();
+        result = prime * result + (fDontFragmentFlag ? 1231 : 1237);
+        result = prime * result + fExplicitCongestionNotification;
+        result = prime * result + fFragmentOffset;
+        result = prime * result + fHeaderChecksum;
+        result = prime * result + fIdentification;
+        result = prime * result + fInternetHeaderLength;
+        result = prime * result + fIpDatagramProtocol;
+        result = prime * result + (fMoreFragmentFlag ? 1231 : 1237);
+        result = prime * result + Arrays.hashCode(fOptions);
+        final ByteBuffer payload = fPayload;
+        if (payload != null) {
+            result = prime * result + payload.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + (fReservedFlag ? 1231 : 1237);
+        result = prime * result + fSourceIpAddress.hashCode();
+        result = prime * result + fTimeToLive;
+        result = prime * result + fTotalLength;
+        result = prime * result + fVersion;
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        IPv4Packet other = (IPv4Packet) obj;
+        if (!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)) {
+            return false;
+        }
+        if (fDSCP != other.fDSCP) {
+            return false;
+        }
+        if (!(fDestinationIpAddress.equals(other.fDestinationIpAddress))) {
+            return false;
+        }
+        if (fDontFragmentFlag != other.fDontFragmentFlag) {
+            return false;
+        }
+        if (fExplicitCongestionNotification != other.fExplicitCongestionNotification) {
+            return false;
+        }
+        if (fFragmentOffset != other.fFragmentOffset) {
+            return false;
+        }
+        if (fHeaderChecksum != other.fHeaderChecksum) {
+            return false;
+        }
+        if (fIdentification != other.fIdentification) {
+            return false;
+        }
+        if (fInternetHeaderLength != other.fInternetHeaderLength) {
+            return false;
+        }
+        if (fIpDatagramProtocol != other.fIpDatagramProtocol) {
+            return false;
+        }
+        if (fMoreFragmentFlag != other.fMoreFragmentFlag) {
+            return false;
+        }
+        if (!Arrays.equals(fOptions, other.fOptions)) {
+            return false;
+        }
+        if (!NonNullUtils.equalsNullable(fPayload, other.fPayload)) {
+            return false;
+        }
+        if (fReservedFlag != other.fReservedFlag) {
+            return false;
+        }
+        if (!(fSourceIpAddress.equals(other.fSourceIpAddress))) {
+            return false;
+        }
+        if (fTimeToLive != other.fTimeToLive) {
+            return false;
+        }
+        if (fTotalLength != other.fTotalLength) {
+            return false;
+        }
+        if (fVersion != other.fVersion) {
+            return false;
+        }
+        return true;
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Values.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/IPv4Values.java
new file mode 100644 (file)
index 0000000..92f0cfe
--- /dev/null
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.ipv4;
+
+/**
+ * Interface that lists constants related to Internet Protocol v4.
+ *
+ * See http://en.wikipedia.org/wiki/IPv4#Packet_structure.
+ *
+ * @author Vincent Perot
+ */
+public interface IPv4Values {
+
+    /** Size in bytes of an IP address */
+    int IP_ADDRESS_SIZE = 4;
+
+    /** Size in bytes of a default IPv4 packet header */
+    int DEFAULT_HEADER_LENGTH = 5;
+
+    /** Size in bytes of a block of data. Used to convert data block to bytes */
+    int BLOCK_SIZE = 4;
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/ipv4/package-info.java
new file mode 100644 (file)
index 0000000..efae947
--- /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.tracecompass.internal.pcap.core.protocol.ipv4;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/package-info.java
new file mode 100644 (file)
index 0000000..0f13140
--- /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.tracecompass.internal.pcap.core.protocol;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapEndpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapEndpoint.java
new file mode 100644 (file)
index 0000000..8e9d320
--- /dev/null
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.pcap;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+
+/**
+ * Class that extends the {@link ProtocolEndpoint} class. It represents the endpoint at
+ * a Pcap level.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEndpoint extends ProtocolEndpoint {
+
+    /**
+     * Constructor of the {@link PcapEndpoint} class. It takes a packet to get
+     * its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public PcapEndpoint(PcapPacket packet, boolean isSourceEndpoint) {
+        super(packet, isSourceEndpoint);
+    }
+
+    @Override
+    public int hashCode() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return EMPTY_STRING;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof PcapEndpoint)) {
+            return false;
+        }
+
+        PcapEndpoint other = (PcapEndpoint) obj;
+
+        // Check above layers.
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint != null) {
+            return endpoint.equals(other.getParentEndpoint());
+        }
+        return true;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapPacket.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/PcapPacket.java
new file mode 100644 (file)
index 0000000..be6ae08
--- /dev/null
@@ -0,0 +1,355 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.pcap;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIPacket;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFileValues;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+import org.eclipse.tracecompass.internal.pcap.core.util.LinkTypeHelper;
+import org.eclipse.tracecompass.internal.pcap.core.util.PcapTimestampScale;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Class that represents a Pcap packet. This is the highest level of
+ * encapsulation.
+ *
+ * @author Vincent Perot
+ */
+public class PcapPacket extends Packet {
+
+    private static final int TIMESTAMP_MICROSECOND_MAX = 1000000;
+    private static final int TIMESTAMP_NANOSECOND_MAX = 1000000000;
+
+    private final @Nullable Packet fChildPacket;
+    private final @Nullable ByteBuffer fPayload;
+
+    private final long fTimestamp; // In microseconds
+    private final long fIncludedLength;
+    private final long fOriginalLength;
+    private final long fPacketIndex;
+
+    private @Nullable PcapEndpoint fSourceEndpoint;
+    private @Nullable PcapEndpoint fDestinationEndpoint;
+
+    private @Nullable Map<String, String> fFields;
+
+    /**
+     * Constructor of the Pcap Packet class.
+     *
+     * @param file
+     *            The file that contains this packet.
+     * @param parent
+     *            The parent packet of this packet (the encapsulating packet).
+     * @param header
+     *            The header of the packet.
+     * @param payload
+     *            The payload of this packet.
+     * @param index
+     *            The index of the packet in the file.
+     * @throws BadPacketException
+     *             Thrown when the Packet is erroneous.
+     */
+    public PcapPacket(PcapFile file, @Nullable Packet parent, ByteBuffer header, @Nullable ByteBuffer payload, long index) throws BadPacketException {
+        super(file, parent, PcapProtocol.PCAP);
+
+        if (header.array().length < PcapFileValues.PACKET_HEADER_SIZE) {
+            fChildPacket = null;
+            throw new BadPacketException("The Pcap packet header is too small."); //$NON-NLS-1$
+        }
+
+        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
+        // methods.
+        fSourceEndpoint = null;
+        fDestinationEndpoint = null;
+
+        fFields = null;
+
+        fPacketIndex = index;
+
+        // PcapPacket header in File endian
+        header.order(getPcapFile().getByteOrder());
+        header.position(0);
+        long timestampMostSignificant = ConversionHelper.unsignedIntToLong(header.getInt());
+        long timestampLeastSignificant = ConversionHelper.unsignedIntToLong(header.getInt());
+
+        switch (getTimestampScale()) {
+        case MICROSECOND:
+            if (timestampLeastSignificant > TIMESTAMP_MICROSECOND_MAX) {
+                fChildPacket = null;
+                throw new BadPacketException("The timestamp is erroneous."); //$NON-NLS-1$
+            }
+            fTimestamp = TIMESTAMP_MICROSECOND_MAX * timestampMostSignificant + timestampLeastSignificant;
+            break;
+        case NANOSECOND:
+            if (timestampLeastSignificant > TIMESTAMP_NANOSECOND_MAX) {
+                fChildPacket = null;
+                throw new BadPacketException("The timestamp is erroneous."); //$NON-NLS-1$
+            }
+            fTimestamp = TIMESTAMP_NANOSECOND_MAX * timestampMostSignificant + timestampLeastSignificant;
+            break;
+        default:
+            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
+        }
+
+        fIncludedLength = ConversionHelper.unsignedIntToLong(header.getInt());
+        fOriginalLength = ConversionHelper.unsignedIntToLong(header.getInt());
+
+        // Set up payload
+        final ByteBuffer pcapPacket = payload;
+        if (pcapPacket == null) {
+            fChildPacket = null;
+            fPayload = null;
+            return;
+        }
+
+        pcapPacket.order(ByteOrder.BIG_ENDIAN);
+        pcapPacket.position(0);
+        fPayload = pcapPacket;
+
+        // Find Child Packet
+        fChildPacket = findChildPacket();
+
+    }
+
+    @Override
+    public @Nullable Packet getChildPacket() {
+        return fChildPacket;
+    }
+
+    @Override
+    public @Nullable ByteBuffer getPayload() {
+        return fPayload;
+    }
+
+    /**
+     * Getter method that returns the timestamp of this packet, in microseconds/nanoseconds
+     * relative to epoch.
+     *
+     * @return The timestamp of the packet.
+     */
+    public long getTimestamp() {
+        return fTimestamp;
+    }
+
+    /**
+     * Getter method that returns the length in bytes of the packet that was
+     * included in the {@link PcapFile}.
+     *
+     * @return The included length of the packet.
+     */
+    public long getIncludedLength() {
+        return fIncludedLength;
+    }
+
+    /**
+     * Getter method that returns the original length in bytes of the packet.
+     *
+     * @return The included length of the packet.
+     */
+    public long getOriginalLength() {
+        return fOriginalLength;
+    }
+
+    /**
+     * Method that indicates if this packet was truncated at capture time.
+     *
+     * @return Whether the packet is truncated or not.
+     */
+    public boolean isTruncated() {
+        return fIncludedLength != fOriginalLength;
+    }
+
+    /**
+     * Getter method that returns the index of the packet.
+     *
+     * @return The index of the packet.
+     */
+    public long getIndex() {
+        return fPacketIndex;
+    }
+
+    @Override
+    public String toString() {
+        // TODO Decide if first capture is 0 or 1. Right now, it is 0.
+        String string = getProtocol().getName() + " " + fPacketIndex +  //$NON-NLS-1$
+                ": " + fOriginalLength + " bytes on wire, " + //$NON-NLS-1$ //$NON-NLS-2$
+                fIncludedLength + " bytes captured.\nArrival time: " +  //$NON-NLS-1$
+                ConversionHelper.toGMTTime(fTimestamp, getTimestampScale()) + "\n"; //$NON-NLS-1$
+
+        final Packet child = fChildPacket;
+        if (child != null) {
+            return string + child.toString();
+        }
+        return string;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * See http://www.tcpdump.org/linktypes.html
+     */
+    @Override
+    protected @Nullable Packet findChildPacket() throws BadPacketException {
+        @Nullable
+        ByteBuffer payload = fPayload;
+        if (payload == null) {
+            return null;
+        }
+
+        switch ((int) getPcapFile().getDataLinkType()) {
+        case LinkTypeHelper.LINKTYPE_ETHERNET:
+            return new EthernetIIPacket(getPcapFile(), this, payload);
+        default: // TODO add more protocols
+            return new UnknownPacket(getPcapFile(), this, payload);
+        }
+    }
+
+    @Override
+    public boolean validate() {
+        // Not yet implemented. ATM, we consider that all packets are valid.
+        // This is the case for all packets.
+        // TODO Implement it.
+        return true;
+    }
+
+    @Override
+    public PcapEndpoint getSourceEndpoint() {
+        @Nullable PcapEndpoint endpoint = fSourceEndpoint;
+        if (endpoint == null) {
+            endpoint = new PcapEndpoint(this, true);
+        }
+        fSourceEndpoint = endpoint;
+        return fSourceEndpoint;
+    }
+
+    @Override
+    public PcapEndpoint getDestinationEndpoint() {
+        @Nullable
+        PcapEndpoint endpoint = fDestinationEndpoint;
+
+        if (endpoint == null) {
+            endpoint = new PcapEndpoint(this, false);
+        }
+        fDestinationEndpoint = endpoint;
+        return fDestinationEndpoint;
+    }
+
+    // TODO handle plural form correctly
+    // TODO microsec
+    @Override
+    public Map<String, String> getFields() {
+        Map<String, String> map = fFields;
+        if (map == null) {
+            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder();
+            builder.put("Frame", String.valueOf(fPacketIndex)); //$NON-NLS-1$
+            builder.put("Frame Length", String.valueOf(fOriginalLength) + " bytes"); //$NON-NLS-1$ //$NON-NLS-2$
+            builder.put("Capture Length", String.valueOf(fIncludedLength) + " bytes"); //$NON-NLS-1$ //$NON-NLS-2$
+            builder.put("Capture Time", ConversionHelper.toGMTTime(fTimestamp, getTimestampScale())); //$NON-NLS-1$
+
+            fFields = NonNullUtils.checkNotNull(builder.build());
+            return fFields;
+        }
+        return map;
+    }
+
+    @Override
+    public String getLocalSummaryString() {
+        return "Frame " + fPacketIndex + ": " + fOriginalLength + " bytes on wire, " + fIncludedLength + " bytes captured"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+    }
+
+    @Override
+    protected String getSignificationString() {
+        return "New Frame: " + fOriginalLength + " bytes on wire"; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+
+        Packet child = fChildPacket;
+        if (child == null) {
+            result = prime * result;
+        } else {
+            result = prime * result + child.hashCode();
+        }
+
+        result = prime * result + (int) (fIncludedLength ^ (fIncludedLength >>> 32));
+        result = prime * result + (int) (fOriginalLength ^ (fOriginalLength >>> 32));
+        result = prime * result + (int) (fPacketIndex ^ (fPacketIndex >>> 32));
+
+        ByteBuffer payload = fPayload;
+        if (payload == null) {
+            result = prime * result;
+        } else {
+            result = prime * result + payload.hashCode();
+        }
+
+        result = prime * result + (int) (fTimestamp ^ (fTimestamp >>> 32));
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        PcapPacket other = (PcapPacket) obj;
+        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)){
+            return false;
+        }
+        if (fIncludedLength != other.fIncludedLength) {
+            return false;
+        }
+        if (fOriginalLength != other.fOriginalLength) {
+            return false;
+        }
+        if (fPacketIndex != other.fPacketIndex) {
+            return false;
+        }
+        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)) {
+            return false;
+        }
+        if (fTimestamp != other.fTimestamp) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Getter method that returns the Timestamp precision of the packet.
+     *
+     * @return the Timestamp precision.
+     */
+    public PcapTimestampScale getTimestampScale() {
+        return getPcapFile().getTimestampPrecision();
+    }
+}
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/pcap/package-info.java
new file mode 100644 (file)
index 0000000..3876002
--- /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.tracecompass.internal.pcap.core.protocol.pcap;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPEndpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPEndpoint.java
new file mode 100644 (file)
index 0000000..a5d4004
--- /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.tracecompass.internal.pcap.core.protocol.tcp;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+
+/**
+ * Class that extends the {@link ProtocolEndpoint} class. It represents the
+ * endpoint at a TCP level.
+ *
+ * @author Vincent Perot
+ */
+public class TCPEndpoint extends ProtocolEndpoint {
+
+    private final int fPort;
+
+    /**
+     * Constructor of the {@link TCPEndpoint} class. It takes a packet to get
+     * its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public TCPEndpoint(TCPPacket packet, boolean isSourceEndpoint) {
+        super(packet, isSourceEndpoint);
+        fPort = isSourceEndpoint ? packet.getSourcePort() : packet.getDestinationPort();
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            result = 0;
+        } else {
+            result = endpoint.hashCode();
+        }
+        result = prime * result + fPort;
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof TCPEndpoint)) {
+            return false;
+        }
+
+        TCPEndpoint other = (TCPEndpoint) obj;
+
+        // Check on layer
+        boolean localEquals = (fPort == other.fPort);
+        if (!localEquals) {
+            return false;
+        }
+
+        // Check above layers.
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint != null) {
+            return endpoint.equals(other.getParentEndpoint());
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            return checkNotNull(String.valueOf(fPort));
+        }
+        return endpoint.toString() + '/' + fPort;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPPacket.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPPacket.java
new file mode 100644 (file)
index 0000000..6e6109d
--- /dev/null
@@ -0,0 +1,678 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.tcp;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Arrays;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
+
+/**
+ * Class that represents a TCP packet.
+ *
+ * @author Vincent Perot
+ */
+public class TCPPacket extends Packet {
+
+    private final @Nullable Packet fChildPacket;
+    private final @Nullable ByteBuffer fPayload;
+
+    private final int fSourcePort;
+    private final int fDestinationPort;
+    private final long fSequenceNumber;
+    private final long fAcknowledgmentNumber;
+    private final int fDataOffset; // in 4 bytes block
+    private final byte fReservedField;
+    private final boolean fNSFlag;
+    private final boolean fCWRFlag;
+    private final boolean fECEFlag;
+    private final boolean fURGFlag;
+    private final boolean fACKFlag;
+    private final boolean fPSHFlag;
+    private final boolean fRSTFlag;
+    private final boolean fSYNFlag;
+    private final boolean fFINFlag;
+    private final int fWindowSize;
+    private final int fChecksum;
+    private final int fUrgentPointer;
+    private final @Nullable byte[] fOptions; // TODO Interpret options.
+
+    private @Nullable TCPEndpoint fSourceEndpoint;
+    private @Nullable TCPEndpoint fDestinationEndpoint;
+
+    private @Nullable Map<String, String> fFields;
+
+    /**
+     * Constructor of the TCP Packet class.
+     *
+     * @param file
+     *            The file that contains this packet.
+     * @param parent
+     *            The parent packet of this packet (the encapsulating packet).
+     * @param packet
+     *            The entire packet (header and payload).
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    public TCPPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
+        super(file, parent, PcapProtocol.TCP);
+
+        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
+        // methods.
+        fSourceEndpoint = null;
+        fDestinationEndpoint = null;
+
+        fFields = null;
+
+        packet.order(ByteOrder.BIG_ENDIAN);
+        packet.position(0);
+
+        fSourcePort = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fDestinationPort = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fSequenceNumber = ConversionHelper.unsignedIntToLong(packet.getInt());
+        fAcknowledgmentNumber = ConversionHelper.unsignedIntToLong(packet.getInt());
+
+        byte storage = packet.get();
+        fDataOffset = ((storage & 0b11110000) >>> 4) & 0x000000FF;
+        fReservedField = (byte) ((storage & 0b00001110) >>> 1);
+        fNSFlag = isBitSet(storage, 0);
+
+        storage = packet.get();
+        fCWRFlag = isBitSet(storage, 7);
+        fECEFlag = isBitSet(storage, 6);
+        fURGFlag = isBitSet(storage, 5);
+        fACKFlag = isBitSet(storage, 4);
+        fPSHFlag = isBitSet(storage, 3);
+        fRSTFlag = isBitSet(storage, 2);
+        fSYNFlag = isBitSet(storage, 1);
+        fFINFlag = isBitSet(storage, 0);
+
+        fWindowSize = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fChecksum = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fUrgentPointer = ConversionHelper.unsignedShortToInt(packet.getShort());
+
+        // Get options if any
+        if (fDataOffset > TCPValues.DEFAULT_HEADER_LENGTH) {
+            fOptions = new byte[(fDataOffset - TCPValues.DEFAULT_HEADER_LENGTH) * TCPValues.BLOCK_SIZE];
+            packet.get(fOptions);
+        } else {
+            fOptions = null;
+        }
+
+        // Get payload if any.
+        if (packet.array().length - packet.position() > 0) {
+            byte[] array = new byte[packet.array().length - packet.position()];
+            packet.get(array);
+            ByteBuffer payload = ByteBuffer.wrap(array);
+            payload.order(ByteOrder.BIG_ENDIAN);
+            payload.position(0);
+            fPayload = payload;
+        } else {
+            fPayload = null;
+        }
+
+        // find child packet
+        fChildPacket = findChildPacket();
+
+    }
+
+    @Override
+    public @Nullable Packet getChildPacket() {
+        return fChildPacket;
+    }
+
+    @Override
+    public @Nullable ByteBuffer getPayload() {
+        return fPayload;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * See http://www.iana.org/assignments/service-names-port-numbers/service-
+     * names-port-numbers.xhtml or
+     * http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
+     */
+    @Override
+    protected @Nullable Packet findChildPacket() throws BadPacketException {
+        // TODO implement further protocols and update this
+        ByteBuffer payload = fPayload;
+        if (payload == null) {
+            return null;
+        }
+
+        return new UnknownPacket(getPcapFile(), this, payload);
+    }
+
+    @Override
+    public String toString() {
+        final ByteBuffer payload = fPayload;
+        int length = 0;
+        if (payload != null) {
+            length = payload.array().length;
+        }
+
+        String flagString = ""; // TODO Finish it. Im just too lazy. //$NON-NLS-1$
+        String string = getProtocol().getName() + ", Source Port: " + fSourcePort + ", Destination Port: " + fDestinationPort + //$NON-NLS-1$ //$NON-NLS-2$
+                "\nSequence Number: " + fSequenceNumber + ", Acknowledgment Number: " + fAcknowledgmentNumber + //$NON-NLS-1$ //$NON-NLS-2$
+                "\nHeader length: " + fDataOffset * TCPValues.BLOCK_SIZE + " bytes, Data length: " + length + //$NON-NLS-1$ //$NON-NLS-2$
+                "\n" + flagString + "Window size value: " + fWindowSize + ", Urgent Pointer: " + String.format("%s%04x", "0x", fUrgentPointer) + //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+                "\nChecksum: " + String.format("%s%04x", "0x", fChecksum) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+        final Packet child = fChildPacket;
+        if (child != null) {
+            return string + child.toString();
+        }
+        return string;
+    }
+
+    /**
+     * Getter method that returns the TCP Source Port.
+     *
+     * @return The source Port.
+     */
+    public int getSourcePort() {
+        return fSourcePort;
+    }
+
+    /**
+     * Getter method that returns the TCP Destination Port.
+     *
+     * @return The destination Port.
+     */
+    public int getDestinationPort() {
+        return fDestinationPort;
+    }
+
+    /**
+     * Getter method that returns the Sequence Number. The sequence number has a
+     * dual role:
+     * <ul>
+     * <li>If the SYN flag is set (1), then this is the initial sequence number.
+     * The sequence number of the actual first data byte and the acknowledged
+     * number in the corresponding ACK are then this sequence number plus 1.</li>
+     * <li>If the SYN flag is clear (0), then this is the accumulated sequence
+     * number of the first data byte of this segment for the current session.</li>
+     * </ul>
+     *
+     * Source: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
+     *
+     * @return The Sequence Number.
+     */
+    public long getSequenceNumber() {
+        return fSequenceNumber;
+    }
+
+    /**
+     * Getter method that returns the Acknowledgment Number.
+     *
+     * If the ACK flag is set then the value of this field is the next sequence
+     * number that the receiver is expecting. This acknowledges receipt of all
+     * prior bytes (if any). The first ACK sent by each end acknowledges the
+     * other end's initial sequence number itself, but no data.
+     *
+     * Source: http://en.wikipedia.org/wiki/Transmission_Control_Protocol
+     *
+     * @return The Acknowledgment Number.
+     */
+    public long getAcknowledgmentNumber() {
+        return fAcknowledgmentNumber;
+    }
+
+    /**
+     * Getter method that returns the size of the TCP header in 4 bytes data
+     * block. The minimum size is 5 words and the maximum is 15 words.
+     *
+     * @return The Data Offset.
+     */
+    public int getDataOffset() {
+        return fDataOffset;
+    }
+
+    /**
+     * Getter method that returns the Reserved field. This field is for future
+     * use and should always be zero. In this library, it is used as a mean to
+     * verify the validity of a TCP packet.
+     *
+     * @return The Reserved Field.
+     */
+    public byte getReservedField() {
+        return fReservedField;
+    }
+
+    /**
+     * Getter method that returns the state of the NS flag.
+     *
+     * @return The state of the NS flag.
+     */
+    public boolean isNSFlagSet() {
+        return fNSFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the CWR flag.
+     *
+     * @return The state of the CWR flag.
+     */
+    public boolean isCongestionWindowReducedFlagSet() {
+        return fCWRFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the ECE flag.
+     *
+     * @return The state of the ECE flag.
+     */
+    public boolean isECNEchoFlagSet() {
+        return fECEFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the URG flag.
+     *
+     * @return The state of the URG flag.
+     */
+    public boolean isUrgentFlagSet() {
+        return fURGFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the ACK flag.
+     *
+     * @return The state of the ACK flag.
+     */
+    public boolean isAcknowledgeFlagSet() {
+        return fACKFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the PSH flag.
+     *
+     * @return The state of the PSH flag.
+     */
+    public boolean isPushFlagSet() {
+        return fPSHFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the RST flag.
+     *
+     * @return The state of the RST flag.
+     */
+    public boolean isResetFlagSet() {
+        return fRSTFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the SYN flag.
+     *
+     * @return The state of the SYN flag.
+     */
+    public boolean isSynchronizationFlagSet() {
+        return fSYNFlag;
+    }
+
+    /**
+     * Getter method that returns the state of the FIN flag.
+     *
+     * @return The state of the FIN flag.
+     */
+    public boolean isFinalFlagSet() {
+        return fFINFlag;
+    }
+
+    /**
+     * Getter method that returns the size of the windows, in windows size unit
+     * (by default, bytes), that the sender of this packet is willing to
+     * receive.
+     *
+     * @return The Window Size.
+     */
+    public int getWindowSize() {
+        return fWindowSize;
+    }
+
+    /**
+     * Getter method that returns the checksum of this packet. This checksum may
+     * be wrong if the packet is erroneous.
+     *
+     * @return The data and header checksum.
+     */
+    public int getChecksum() {
+        return fChecksum;
+    }
+
+    /**
+     * Getter method that returns the Urgent Pointer. If the URG flag is set,
+     * this field is an offset from the sequence number indicating the last
+     * urgent data byte.
+     *
+     * @return The Urgent Pointer.
+     */
+    public int getUrgentPointer() {
+        return fUrgentPointer;
+    }
+
+    /**
+     * Getter method that returns the options. This method returns null if no
+     * options are present.
+     *
+     * @return The options of the packet.
+     */
+    public @Nullable byte[] getOptions() {
+        byte[] options = fOptions;
+        if (options == null) {
+            return null;
+        }
+        return Arrays.copyOf(options, options.length);
+    }
+
+    @Override
+    public boolean validate() {
+        // Not yet implemented. ATM, we consider that all packets are valid.
+        // This is the case for all packets.
+        // TODO Implement it.
+        return true;
+    }
+
+    @Override
+    public TCPEndpoint getSourceEndpoint() {
+        @Nullable
+        TCPEndpoint endpoint = fSourceEndpoint;
+        if (endpoint == null) {
+            endpoint = new TCPEndpoint(this, true);
+        }
+        fSourceEndpoint = endpoint;
+        return fSourceEndpoint;
+    }
+
+    @Override
+    public TCPEndpoint getDestinationEndpoint() {
+        @Nullable
+        TCPEndpoint endpoint = fDestinationEndpoint;
+
+        if (endpoint == null) {
+            endpoint = new TCPEndpoint(this, false);
+        }
+        fDestinationEndpoint = endpoint;
+        return fDestinationEndpoint;
+    }
+
+    @Override
+    public Map<String, String> getFields() {
+        Map<String, String> map = fFields;
+        if (map == null) {
+            Builder<String, String> builder = ImmutableMap.<String, String> builder()
+                    .put("Source Port", String.valueOf(fSourcePort)) //$NON-NLS-1$
+                    .put("Destination Port", String.valueOf(fDestinationPort)) //$NON-NLS-1$
+                    .put("Sequence Number", String.valueOf(fSequenceNumber)) //$NON-NLS-1$
+                    .put("Acknowledgement Number", String.valueOf(fAcknowledgmentNumber)) //$NON-NLS-1$
+                    .put("Length", String.valueOf(fDataOffset * TCPValues.BLOCK_SIZE) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
+                    .put("ECN-Nonce Flag", String.valueOf(fNSFlag)) //$NON-NLS-1$
+                    .put("Congestion Window Reduced Flag", String.valueOf(fCWRFlag)) //$NON-NLS-1$
+                    .put("ECN-Echo Flag", String.valueOf(fECEFlag)) //$NON-NLS-1$
+                    .put("Urgent Flag", String.valueOf(fURGFlag)) //$NON-NLS-1$
+                    .put("ACK Flag", String.valueOf(fACKFlag)) //$NON-NLS-1$
+                    .put("PSH Flag", String.valueOf(fPSHFlag)) //$NON-NLS-1$
+                    .put("RST Flag", String.valueOf(fRSTFlag)) //$NON-NLS-1$
+                    .put("SYN Flag", String.valueOf(fSYNFlag)) //$NON-NLS-1$
+                    .put("FIN Flag", String.valueOf(fFINFlag)) //$NON-NLS-1$
+                    .put("Window Size Value", String.valueOf(fWindowSize)) //$NON-NLS-1$
+                    .put("Checksum", String.format("%s%04x", "0x", fChecksum)) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                    .put("Urgent Pointer", String.format("%s%04x", "0x", fUrgentPointer)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+            byte[] options = fOptions;
+            if (options == null) {
+                builder.put("Options", EMPTY_STRING); //$NON-NLS-1$
+            } else {
+                builder.put("Options", ConversionHelper.bytesToHex(options, true)); //$NON-NLS-1$
+
+            }
+            fFields = checkNotNull(builder.build());
+            return fFields;
+        }
+        return map;
+    }
+
+    @Override
+    public String getLocalSummaryString() {
+        return "Src Port: " + fSourcePort + ", Dst Port: " + fDestinationPort + //$NON-NLS-1$ //$NON-NLS-2$
+                ", Seq: " + fSequenceNumber + ", Ack: " + fAcknowledgmentNumber + //$NON-NLS-1$ //$NON-NLS-2$
+                ", Len: " + (fDataOffset * TCPValues.BLOCK_SIZE); //$NON-NLS-1$    }
+    }
+
+    @Override
+    protected String getSignificationString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(fSourcePort)
+                .append(" > ") //$NON-NLS-1$
+                .append(fDestinationPort);
+
+        if (!(generateFlagString().equals(EMPTY_STRING))) {
+            sb.append(' ')
+                    .append('[')
+                    .append(generateFlagString())
+                    .append(']');
+        }
+        sb.append(" Seq=") //$NON-NLS-1$
+        .append(fSequenceNumber);
+
+        if (fACKFlag) {
+            sb.append(" Ack=") //$NON-NLS-1$
+            .append(fAcknowledgmentNumber);
+        }
+
+        sb.append(" Len=") //$NON-NLS-1$
+        .append((fDataOffset * TCPValues.BLOCK_SIZE));
+
+        return NonNullUtils.nullToEmptyString(sb);    }
+
+    private String generateFlagString() {
+        StringBuilder sb = new StringBuilder();
+        boolean start = true;
+
+        if (fSYNFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("SYN"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fACKFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("ACK"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fFINFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("FIN"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fRSTFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("RST"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fPSHFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("PSH"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fURGFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("URG"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fNSFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("NS"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fCWRFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("CWR"); //$NON-NLS-1$
+            start = false;
+        }
+        if (fECEFlag) {
+            if (!start) {
+                sb.append(", "); //$NON-NLS-1$
+            }
+            sb.append("ECE"); //$NON-NLS-1$
+            start = false;
+        }
+        return NonNullUtils.nullToEmptyString(sb);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + (fACKFlag ? 1231 : 1237);
+        result = prime * result + (int) (fAcknowledgmentNumber ^ (fAcknowledgmentNumber >>> 32));
+        result = prime * result + (fCWRFlag ? 1231 : 1237);
+        result = prime * result + fChecksum;
+        final Packet child = fChildPacket;
+        if (child != null) {
+            result = prime * result + child.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + fDataOffset;
+        result = prime * result + fDestinationPort;
+        result = prime * result + (fECEFlag ? 1231 : 1237);
+        result = prime * result + (fFINFlag ? 1231 : 1237);
+        result = prime * result + (fNSFlag ? 1231 : 1237);
+        result = prime * result + Arrays.hashCode(fOptions);
+        result = prime * result + (fPSHFlag ? 1231 : 1237);
+        final ByteBuffer payload = fPayload;
+        if (payload != null) {
+            result = prime * result + payload.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + (fRSTFlag ? 1231 : 1237);
+        result = prime * result + fReservedField;
+        result = prime * result + (fSYNFlag ? 1231 : 1237);
+        result = prime * result + (int) (fSequenceNumber ^ (fSequenceNumber >>> 32));
+        result = prime * result + fSourcePort;
+        result = prime * result + (fURGFlag ? 1231 : 1237);
+        result = prime * result + fUrgentPointer;
+        result = prime * result + fWindowSize;
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        TCPPacket other = (TCPPacket) obj;
+        if (fACKFlag != other.fACKFlag) {
+            return false;
+        }
+        if (fAcknowledgmentNumber != other.fAcknowledgmentNumber) {
+            return false;
+        }
+        if (fCWRFlag != other.fCWRFlag) {
+            return false;
+        }
+        if (fChecksum != other.fChecksum) {
+            return false;
+        }
+        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)){
+            return false;
+        }
+        if (fDataOffset != other.fDataOffset) {
+            return false;
+        }
+        if (fDestinationPort != other.fDestinationPort) {
+            return false;
+        }
+        if (fECEFlag != other.fECEFlag) {
+            return false;
+        }
+        if (fFINFlag != other.fFINFlag) {
+            return false;
+        }
+        if (fNSFlag != other.fNSFlag) {
+            return false;
+        }
+        if (!Arrays.equals(fOptions, other.fOptions)) {
+            return false;
+        }
+        if (fPSHFlag != other.fPSHFlag) {
+            return false;
+        }
+        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)){
+            return false;
+        }
+        if (fRSTFlag != other.fRSTFlag) {
+            return false;
+        }
+        if (fReservedField != other.fReservedField) {
+            return false;
+        }
+        if (fSYNFlag != other.fSYNFlag) {
+            return false;
+        }
+        if (fSequenceNumber != other.fSequenceNumber) {
+            return false;
+        }
+        if (fSourcePort != other.fSourcePort) {
+            return false;
+        }
+        if (fURGFlag != other.fURGFlag) {
+            return false;
+        }
+        if (fUrgentPointer != other.fUrgentPointer) {
+            return false;
+        }
+        if (fWindowSize != other.fWindowSize) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPValues.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/TCPValues.java
new file mode 100644 (file)
index 0000000..b838c2d
--- /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:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.pcap.core.protocol.tcp;
+
+/**
+ * Interface that lists constants related to TCP.
+ *
+ * See http://en.wikipedia.org/wiki/Transmission_Control_Protocol#TCP_segment_structure.
+ *
+ * @author Vincent Perot
+ */
+public interface TCPValues {
+
+    /** Size in bytes of a default TCP packet header */
+    int DEFAULT_HEADER_LENGTH = 5;
+
+    /** Size in bytes of a block of data. Used to convert data block to bytes. */
+    int BLOCK_SIZE = 4;
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/tcp/package-info.java
new file mode 100644 (file)
index 0000000..4d0363f
--- /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.tracecompass.internal.pcap.core.protocol.tcp;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPEndpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPEndpoint.java
new file mode 100644 (file)
index 0000000..7367e8a
--- /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.tracecompass.internal.pcap.core.protocol.udp;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+
+/**
+ * Class that extends the ProtocolEndpoint class. It represents the endpoint at
+ * an UDP level.
+ *
+ * @author Vincent Perot
+ */
+public class UDPEndpoint extends ProtocolEndpoint {
+
+    private final int fPort;
+
+    /**
+     * Constructor of the {@link UDPEndpoint} class. It takes a packet to get
+     * its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public UDPEndpoint(UDPPacket packet, boolean isSourceEndpoint) {
+        super(packet, isSourceEndpoint);
+        fPort = isSourceEndpoint ? packet.getSourcePort() : packet.getDestinationPort();
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            result = 0;
+        } else {
+            result = endpoint.hashCode();
+        }
+        result = prime * result + fPort;
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (!(obj instanceof UDPEndpoint)) {
+            return false;
+        }
+
+        UDPEndpoint other = (UDPEndpoint) obj;
+
+        // Check on layer
+        boolean localEquals = (fPort == other.fPort);
+        if (!localEquals) {
+            return false;
+        }
+
+        // Check above layers.
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint != null) {
+            return endpoint.equals(other.getParentEndpoint());
+        }
+        return true;
+    }
+
+    @Override
+    public String toString() {
+        ProtocolEndpoint endpoint = getParentEndpoint();
+        if (endpoint == null) {
+            return checkNotNull(String.valueOf(fPort));
+        }
+        return endpoint.toString() + '/' + fPort;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPPacket.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/UDPPacket.java
new file mode 100644 (file)
index 0000000..1abbf0a
--- /dev/null
@@ -0,0 +1,286 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.udp;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.unknown.UnknownPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+
+import com.google.common.collect.ImmutableMap;
+
+/**
+ * Class that represents a UDP packet.
+ *
+ * @author Vincent Perot
+ */
+public class UDPPacket extends Packet {
+
+    private final @Nullable Packet fChildPacket;
+    private final @Nullable ByteBuffer fPayload;
+
+    private final int fSourcePort;
+    private final int fDestinationPort;
+    private final int fTotalLength;
+    private final int fChecksum;
+
+    private @Nullable UDPEndpoint fSourceEndpoint;
+    private @Nullable UDPEndpoint fDestinationEndpoint;
+
+    private @Nullable Map<String, String> fFields;
+
+    /**
+     * Constructor of the UDP Packet class.
+     *
+     * @param file
+     *            The file that contains this packet.
+     * @param parent
+     *            The parent packet of this packet (the encapsulating packet).
+     * @param packet
+     *            The entire packet (header and payload).
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    public UDPPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) throws BadPacketException {
+        super(file, parent, PcapProtocol.UDP);
+
+        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
+        // methods.
+        fSourceEndpoint = null;
+        fDestinationEndpoint = null;
+
+        fFields = null;
+
+        packet.order(ByteOrder.BIG_ENDIAN);
+        packet.position(0);
+
+        fSourcePort = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fDestinationPort = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fTotalLength = ConversionHelper.unsignedShortToInt(packet.getShort());
+        fChecksum = ConversionHelper.unsignedShortToInt(packet.getShort());
+
+        if (packet.array().length - packet.position() > 0) {
+            byte[] array = new byte[packet.array().length - packet.position()];
+            packet.get(array);
+
+            ByteBuffer payload = ByteBuffer.wrap(array);
+            payload.order(ByteOrder.BIG_ENDIAN);
+            payload.position(0);
+            fPayload = payload;
+        } else {
+            fPayload = null;
+        }
+
+        // Find child
+        fChildPacket = findChildPacket();
+
+    }
+
+    @Override
+    public @Nullable Packet getChildPacket() {
+        return fChildPacket;
+    }
+
+    @Override
+    public @Nullable ByteBuffer getPayload() {
+        return fPayload;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * See http://www.iana.org/assignments/service-names-port-numbers/service-
+     * names-port-numbers.xhtml or
+     * http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
+     */
+    @Override
+    protected @Nullable Packet findChildPacket() throws BadPacketException {
+        // TODO implement further protocols and update this
+        ByteBuffer payload = fPayload;
+        if (payload == null) {
+            return null;
+        }
+
+        return new UnknownPacket(getPcapFile(), this, payload);
+    }
+
+    @Override
+    public String toString() {
+        String string = getProtocol().getName() + ", Source Port: " + fSourcePort + ", Destination Port: " + fDestinationPort + //$NON-NLS-1$ //$NON-NLS-2$
+                ", Length: " + fTotalLength + ", Checksum: " + fChecksum + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+        final Packet child = fChildPacket;
+        if (child != null) {
+            return string + child.toString();
+        }
+        return string;
+    }
+
+    /**
+     * Getter method that returns the UDP Source Port.
+     *
+     * @return The source Port.
+     */
+    public int getSourcePort() {
+        return fSourcePort;
+    }
+
+    /**
+     * Getter method that returns the UDP Destination Port.
+     *
+     * @return The destination Port.
+     */
+    public int getDestinationPort() {
+        return fDestinationPort;
+    }
+
+    /**
+     * Getter method that returns the total length of the packet in bytes. The
+     * values it can take go from 8 to 65,515.
+     *
+     * @return The total length of the packet in bytes.
+     */
+    public int getTotalLength() {
+        return fTotalLength;
+    }
+
+    /**
+     * Getter method that returns the checksum (on header and payload). If the
+     * transmitter does not use this field, it is set to zero. This checksum
+     * might be wrong if the packet is erroneous.
+     *
+     * @return The checksum received from the packet.
+     */
+    public int getChecksum() {
+        return fChecksum;
+    }
+
+    @Override
+    public boolean validate() {
+        // Not yet implemented. ATM, we consider that all packets are valid.
+        // This is the case for all packets.
+        // TODO Implement it.
+        return true;
+    }
+
+    @Override
+    public UDPEndpoint getSourceEndpoint() {
+        @Nullable
+        UDPEndpoint endpoint = fSourceEndpoint;
+        if (endpoint == null) {
+            endpoint = new UDPEndpoint(this, true);
+        }
+        fSourceEndpoint = endpoint;
+        return fSourceEndpoint;
+    }
+
+    @Override
+    public UDPEndpoint getDestinationEndpoint() {
+        @Nullable UDPEndpoint endpoint = fDestinationEndpoint;
+        if (endpoint == null) {
+            endpoint = new UDPEndpoint(this, false);
+        }
+        fDestinationEndpoint = endpoint;
+        return fDestinationEndpoint;
+    }
+
+    @Override
+    public Map<String, String> getFields() {
+        Map<String, String> map = fFields;
+        if (map == null) {
+            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder()
+                    .put("Source Port", String.valueOf(fSourcePort)) //$NON-NLS-1$
+                    .put("Destination Port", String.valueOf(fDestinationPort)) //$NON-NLS-1$
+                    .put("Length", String.valueOf(fTotalLength) + " bytes") //$NON-NLS-1$ //$NON-NLS-2$
+                    .put("Checksum", String.format("%s%04x", "0x", fChecksum)); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+            fFields = NonNullUtils.checkNotNull(builder.build());
+            return fFields;
+        }
+        return map;
+    }
+
+    @Override
+    public String getLocalSummaryString() {
+        return "Src Port: " + fSourcePort + ", Dst Port: " + fDestinationPort; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    protected String getSignificationString() {
+        return "Source Port: " + fSourcePort + ", Destination Port: " + fDestinationPort; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + fChecksum;
+        final Packet child = fChildPacket;
+        if (child != null) {
+            result = prime * result + child.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + fDestinationPort;
+        final ByteBuffer payload = fPayload;
+        if (payload != null) {
+            result = prime * result + payload.hashCode();
+        } else {
+            result = prime * result;
+        }
+        result = prime * result + fSourcePort;
+        result = prime * result + fTotalLength;
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        UDPPacket other = (UDPPacket) obj;
+        if (fChecksum != other.fChecksum) {
+            return false;
+        }
+        if(!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)){
+            return false;
+        }
+        if (fDestinationPort != other.fDestinationPort) {
+            return false;
+        }
+        if(!NonNullUtils.equalsNullable(fPayload, other.fPayload)){
+            return false;
+        }
+        if (fSourcePort != other.fSourcePort) {
+            return false;
+        }
+        if (fTotalLength != other.fTotalLength) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/udp/package-info.java
new file mode 100644 (file)
index 0000000..f292a2a
--- /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.tracecompass.internal.pcap.core.protocol.udp;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownEndpoint.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownEndpoint.java
new file mode 100644 (file)
index 0000000..b1a8de1
--- /dev/null
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.unknown;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+
+/**
+ * Class that extends the {@link ProtocolEndpoint} class. It represents the
+ * endpoint for a protocol that is unknown.
+ *
+ * @author Vincent Perot
+ */
+public class UnknownEndpoint extends ProtocolEndpoint {
+
+    /**
+     * Constructor of the {@link UnknownEndpoint} class. It takes a packet to
+     * get its endpoint. Since every packet has two endpoints (source and
+     * destination), the isSourceEndpoint parameter is used to specify which
+     * endpoint to take.
+     *
+     * @param packet
+     *            The packet that contains the endpoints.
+     * @param isSourceEndpoint
+     *            Whether to take the source or the destination endpoint of the
+     *            packet.
+     */
+    public UnknownEndpoint(UnknownPacket packet, boolean isSourceEndpoint) {
+        super(packet, isSourceEndpoint);
+    }
+
+    @Override
+    public int hashCode() {
+        return 0;
+    }
+
+    @Override
+    public String toString() {
+        return EMPTY_STRING;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        return false;
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownPacket.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/UnknownPacket.java
new file mode 100644 (file)
index 0000000..54a7c1c
--- /dev/null
@@ -0,0 +1,203 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.protocol.unknown;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.io.UnsupportedEncodingException;
+import java.nio.ByteBuffer;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableMap.Builder;
+
+/**
+ * Class that represents an Unknown packet. It is possible to get such a packet
+ * if the protocol has not been implemented in this library or if the parent
+ * packet was invalid (in certain cases only). The header of such a packet is
+ * inexistent.
+ *
+ * @author Vincent Perot
+ */
+public class UnknownPacket extends Packet {
+
+    private final @Nullable Packet fChildPacket;
+    private final ByteBuffer fPayload;
+
+    private @Nullable UnknownEndpoint fSourceEndpoint;
+    private @Nullable UnknownEndpoint fDestinationEndpoint;
+
+    private @Nullable Map<String, String> fFields;
+
+    /**
+     * Constructor of an Unknown Packet object.
+     *
+     * @param file
+     *            The file to which this packet belongs.
+     * @param parent
+     *            The parent packet of this packet.
+     * @param packet
+     *            The entire packet (header and payload).
+     */
+    public UnknownPacket(PcapFile file, @Nullable Packet parent, ByteBuffer packet) {
+        super(file, parent, PcapProtocol.UNKNOWN);
+
+        // The endpoints are lazy loaded. They are defined in the get*Endpoint()
+        // methods.
+        fSourceEndpoint = null;
+        fDestinationEndpoint = null;
+
+        fFields = null;
+
+        // Header is not used. All data go into payload.
+        fPayload = packet;
+
+        fChildPacket = findChildPacket();
+    }
+
+    @Override
+    public @Nullable Packet getChildPacket() {
+        return fChildPacket;
+    }
+
+    @Override
+    public @Nullable ByteBuffer getPayload() {
+        return fPayload;
+    }
+
+    @Override
+    protected @Nullable Packet findChildPacket() {
+        return null;
+    }
+
+    @Override
+    public String toString() {
+        byte[] array = checkNotNull(fPayload.array());
+        String string = "Payload: " + ConversionHelper.bytesToHex(array, true); //$NON-NLS-1$
+        final Packet child = fChildPacket;
+        if (child != null) {
+            return string + child.toString();
+        }
+        return string;
+    }
+
+    @Override
+    public boolean validate() {
+        // Not yet implemented. ATM, we consider that all packets are valid.
+        // This is the case for all packets.
+        // TODO Implement it.
+        return true;
+    }
+
+    @Override
+    public UnknownEndpoint getSourceEndpoint() {
+        @Nullable
+        UnknownEndpoint endpoint = fSourceEndpoint;
+        if (endpoint == null) {
+            endpoint = new UnknownEndpoint(this, true);
+        }
+        fSourceEndpoint = endpoint;
+        return fSourceEndpoint;
+    }
+
+    @Override
+    public UnknownEndpoint getDestinationEndpoint() {
+        @Nullable
+        UnknownEndpoint endpoint = fDestinationEndpoint;
+        if (endpoint == null) {
+            endpoint = new UnknownEndpoint(this, false);
+        }
+        fDestinationEndpoint = endpoint;
+        return fDestinationEndpoint;
+    }
+
+    @Override
+    public Map<String, String> getFields() {
+        Map<String, String> map = fFields;
+        if (map == null) {
+            byte[] array = checkNotNull(fPayload.array());
+
+            Builder<String, String> builder = ImmutableMap.<String, String> builder()
+                    .put("Binary", ConversionHelper.bytesToHex(array, true)); //$NON-NLS-1$
+            try {
+                String s = new String(array, "UTF-8"); //$NON-NLS-1$
+                builder.put("Character", s); //$NON-NLS-1$
+            } catch (UnsupportedEncodingException e) {
+                // Do nothing. The string won't be added to the map anyway.
+            }
+            fFields = checkNotNull(builder.build());
+            return fFields;
+        }
+        return map;
+    }
+
+    @Override
+    public String getLocalSummaryString() {
+        return "Len: " + fPayload.array().length + " bytes"; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    protected String getSignificationString() {
+        return "Data: " + fPayload.array().length + " bytes"; //$NON-NLS-1$ //$NON-NLS-2$
+    }
+
+    @Override
+    public Packet getMostEcapsulatedPacket() {
+        Packet packet = this.getParentPacket();
+        if (packet == null) {
+            return this;
+        }
+        return packet;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = prime;
+        final Packet child = fChildPacket;
+        if (child != null) {
+            result += child.hashCode();
+        }
+        result = prime * result + fPayload.hashCode();
+        return result;
+    }
+
+    @Override
+    public boolean equals(@Nullable Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        UnknownPacket other = (UnknownPacket) obj;
+        if (!NonNullUtils.equalsNullable(fChildPacket, other.fChildPacket)) {
+            return false;
+        }
+        if (!fPayload.equals(other.fPayload)) {
+            return false;
+        }
+        return true;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/protocol/unknown/package-info.java
new file mode 100644 (file)
index 0000000..124c3a2
--- /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.tracecompass.internal.pcap.core.protocol.unknown;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStream.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStream.java
new file mode 100644 (file)
index 0000000..ddb835a
--- /dev/null
@@ -0,0 +1,268 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.stream;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpointPair;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+
+import com.google.common.math.DoubleMath;
+
+// TODO decide if default modifier a good idea. This allows only the
+// stream builder to call that method (and any class that is added to this
+// package). This effectively makes the stream read-only.
+
+/**
+ * Class that represents a packet stream, which is a collection of packets that
+ * share the same endpoints. The endpoints of a packet are protocol-dependent.
+ * For example, a TCP stream is a collection of packets that share the same MAC
+ * address, IP address, and Port couple.
+ *
+ * @author Vincent Perot
+ */
+public class PacketStream {
+
+    private static final double SECOND_TO_NANOSECOND = 1000000000.0;
+    private static final double DELTA = 0.000000001;
+    private final PcapProtocol fProtocol;
+    private final int fId;
+    private final ProtocolEndpointPair fEndpointPair;
+
+    private long fNbPacketsAtoB;
+    private long fNbPacketsBtoA;
+    private long fNbBytesAtoB;
+    private long fNbBytesBtoA;
+    private long fStartTime;
+    private long fEndTime;
+
+    /**
+     * Constructor of a packet stream.
+     *
+     * @param protocol
+     *            The protocol of the packets of the stream. This is needed
+     *            because the definition of a stream is protocol-dependent.
+     * @param id
+     *            The id of this stream.
+     * @param endpointPair
+     *            The common endpoints of the packets in this stream.
+     */
+    PacketStream(PcapProtocol protocol, int id, ProtocolEndpointPair endpointPair) {
+        fProtocol = protocol;
+        fId = id;
+        fEndpointPair = endpointPair;
+        fNbPacketsAtoB = 0;
+        fNbPacketsBtoA = 0;
+        fNbBytesAtoB = 0;
+        fNbBytesBtoA = 0;
+        fStartTime = Long.MAX_VALUE;
+        fEndTime = Long.MIN_VALUE;
+    }
+
+    /**
+     * Add a packet to the stream.
+     *
+     * @param packet
+     *            The packet that must be added.
+     */
+    synchronized void add(PcapPacket packet) {
+
+        Packet newPacket = packet.getPacket(fProtocol);
+        if (newPacket == null) {
+            return;
+        }
+
+        // Update packet and byte number
+        if (fEndpointPair.getFirstEndpoint().equals(newPacket.getSourceEndpoint()) &&
+                fEndpointPair.getSecondEndpoint().equals(newPacket.getDestinationEndpoint())) {
+            fNbPacketsAtoB++;
+            fNbBytesAtoB += packet.getOriginalLength();
+        } else if (fEndpointPair.getFirstEndpoint().equals(newPacket.getDestinationEndpoint()) &&
+                fEndpointPair.getSecondEndpoint().equals(newPacket.getSourceEndpoint())) {
+            fNbPacketsBtoA++;
+            fNbBytesBtoA += packet.getOriginalLength();
+        } else {
+            throw new IllegalStateException();
+        }
+
+        // Update start and stop time
+        // Stream timestamp is ALWAYS in nanoseconds.
+        long timestamp;
+        switch (packet.getTimestampScale()) {
+        case MICROSECOND:
+            timestamp = packet.getTimestamp() * 1000;
+            break;
+        case NANOSECOND:
+            timestamp = packet.getTimestamp();
+            break;
+        default:
+            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
+        }
+        fStartTime = Math.min(fStartTime, timestamp);
+        fEndTime = Math.max(fEndTime, timestamp);
+    }
+
+    /**
+     * Get the Protocol of this stream.
+     *
+     * @return The protocol of this stream.
+     */
+    public PcapProtocol getProtocol() {
+        return fProtocol;
+    }
+
+    /**
+     * Method that returns the non-unique ID of this stream.
+     *
+     * @return the non-unique ID of this stream.
+     */
+    public int getID() {
+        return fId;
+    }
+
+    /**
+     * Method that returns the unique ID of this stream.
+     *
+     * @return the unique ID of this stream.
+     */
+    public String getUniqueID() {
+        return fProtocol.getShortName() + '.' + fId;
+    }
+
+    /**
+     * Method that returns the endpoint pair of the stream.
+     *
+     * @return The endpoint pair of the stream.
+     */
+    public ProtocolEndpointPair getEndpointPair() {
+        return fEndpointPair;
+    }
+
+    // TODO return also the endpoint set.
+    @Override
+    public synchronized String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("Stream " + getUniqueID() + ", Number of Packets: " + getNbPackets() + "\n"); //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
+
+        return checkNotNull(sb.toString());
+
+    }
+
+    /**
+     * 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 fNbPacketsAtoB;
+    }
+
+    /**
+     * 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 fNbPacketsBtoA;
+    }
+
+    /**
+     * Get the total number of packets in this stream.
+     *
+     * @return The total number of packets.
+     */
+    public synchronized long getNbPackets() {
+        return fNbPacketsAtoB + fNbPacketsBtoA;
+    }
+
+    /**
+     * 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 fNbBytesAtoB;
+    }
+
+    /**
+     * 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 fNbBytesBtoA;
+    }
+
+    /**
+     * Get the total number of bytes in this stream.
+     *
+     * @return The total number of bytes.
+     */
+    public synchronized long getNbBytes() {
+        return fNbBytesAtoB + fNbBytesBtoA;
+    }
+
+    /**
+     * Get the start time of this stream, in nanoseconds relative to epoch.
+     *
+     * @return The start time.
+     */
+    public synchronized long getStartTime() {
+        return fStartTime;
+    }
+
+    /**
+     * Get the stop time of this stream, in nanoseconds relative to epoch.
+     *
+     * @return The stop time.
+     */
+    public synchronized long getStopTime() {
+        return fEndTime;
+    }
+
+    /**
+     * Get the duration of this stream, in seconds
+     *
+     * @return The duration of this stream.
+     */
+    public synchronized double getDuration() {
+        return (fEndTime - fStartTime) / SECOND_TO_NANOSECOND;
+    }
+
+    /**
+     * 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() {
+        if (DoubleMath.fuzzyEquals(getDuration(), 0, DELTA)) {
+            return 0;
+        }
+        return fNbBytesAtoB / getDuration();
+    }
+
+    /**
+     * 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() {
+        if (DoubleMath.fuzzyEquals(getDuration(), 0, DELTA)) {
+            return 0;
+        }
+        return fNbBytesBtoA / getDuration();
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStreamBuilder.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/PacketStreamBuilder.java
new file mode 100644 (file)
index 0000000..60f2a79
--- /dev/null
@@ -0,0 +1,182 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.stream;
+
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpoint;
+import org.eclipse.tracecompass.internal.pcap.core.endpoint.ProtocolEndpointPair;
+import org.eclipse.tracecompass.internal.pcap.core.filter.IPacketFilter;
+import org.eclipse.tracecompass.internal.pcap.core.filter.PacketFilterByProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+
+/**
+ * Class that parse an entire pcap file to build the different streams.
+ *
+ * @author Vincent Perot
+ */
+public class PacketStreamBuilder {
+
+    private final IPacketFilter fPacketFilter;
+    private final PcapProtocol fProtocol;
+
+    private final Map<Integer, PacketStream> fStreams;
+    private final Map<ProtocolEndpointPair, Integer> fIDs;
+    private int fCurrentId;
+
+    /**
+     * Main constructor.
+     *
+     * @param protocol
+     *            The protocol of the builder.
+     */
+    public PacketStreamBuilder(PcapProtocol protocol) {
+        fCurrentId = 0;
+        fProtocol = protocol;
+        fPacketFilter = new PacketFilterByProtocol(protocol);
+        fStreams = new HashMap<>();
+        fIDs = new HashMap<>();
+    }
+
+    /**
+     * Method that returns a particular stream based on its ID.
+     *
+     * @param id
+     *            The ID of the stream.
+     * @return The stream that has the specified ID.
+     */
+    public synchronized @Nullable PacketStream getStream(int id) {
+        return fStreams.get(id);
+    }
+
+    /**
+     * Method that returns a particular stream based on its endpoints. It
+     * returns null if no corresponding stream is found.
+     *
+     * @param endpointA
+     *            The first endpoint of the stream.
+     * @param endpointB
+     *            The second endpoint of the stream.
+     *
+     * @return The stream that has the specified endpoints. Return Null if no
+     *         stream is found between the two endpoints.
+     */
+    public synchronized @Nullable PacketStream getStream(ProtocolEndpoint endpointA, ProtocolEndpoint endpointB) {
+        ProtocolEndpointPair set = new ProtocolEndpointPair(endpointA, endpointB);
+        int id = fIDs.get(set);
+        return fStreams.get(id);
+    }
+
+    /**
+     * Method that returns all the streams at the specified protocol level.
+     *
+     * @return The streams as a list.
+     */
+    public synchronized Iterable<PacketStream> getStreams() {
+        Iterable<PacketStream> iterable = new LinkedList<>(fStreams.values());
+        return iterable;
+    }
+
+    /**
+     * Method that is called when the filter accepts a packet. This methods add
+     * the packet to a stream based on its characteristics.
+     *
+     * @param packet
+     *            The packet to be added.
+     */
+    public synchronized void addPacketToStream(PcapPacket packet) {
+        if (fPacketFilter.accepts(packet)) {
+            @Nullable Packet newPacket = packet.getPacket(fProtocol);
+            if (newPacket == null) {
+                return;
+            }
+            ProtocolEndpointPair endpointSet = new ProtocolEndpointPair(newPacket);
+            if (!fIDs.containsKey(endpointSet)) {
+                fIDs.put(endpointSet, fCurrentId);
+                fStreams.put(fCurrentId, new PacketStream(fProtocol, fCurrentId, endpointSet));
+                fStreams.get(fCurrentId).add(packet);
+                fCurrentId++;
+            } else {
+                Integer id = fIDs.get(endpointSet);
+                fStreams.get(id).add(packet);
+            }
+        }
+        return;
+    }
+
+    /**
+     * Getter method for the protocol of the stream builder.
+     *
+     * @return The protocol.
+     */
+    public PcapProtocol getProtocol() {
+        return fProtocol;
+    }
+
+    /**
+     * Method that clears the builder.
+     */
+    public void clear() {
+        fStreams.clear();
+        fIDs.clear();
+        fCurrentId = 0;
+    }
+
+    /**
+     * Method that returns the number of streams built.
+     *
+     * @return The number of streams built.
+     */
+    public synchronized int getNbStreams() {
+        return fStreams.size();
+    }
+
+    /**
+     * Method that parse an entire file and build the streams contained in the
+     * file.
+     *
+     * @param filePath
+     *            The file path.
+     * @throws IOException
+     *             When an IO error occurs.
+     * @throws BadPcapFileException
+     *             When the PcapFile is not valid.
+     */
+    public synchronized void parsePcapFile(Path filePath) throws IOException, BadPcapFileException {
+        try (PcapFile pcapFile = new PcapFile(filePath);) {
+            while (pcapFile.hasNextPacket()) { // not eof
+                PcapPacket packet;
+                try {
+                    packet = pcapFile.parseNextPacket();
+                    if (packet == null) {
+                        return;
+                    }
+                    addPacketToStream(packet);
+                } catch (BadPacketException e) {
+                    // Ignore packet. Do nothing.
+                }
+            }
+        }
+
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/stream/package-info.java
new file mode 100644 (file)
index 0000000..3135d26
--- /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.tracecompass.internal.pcap.core.stream;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/BadPcapFileException.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/BadPcapFileException.java
new file mode 100644 (file)
index 0000000..898f9a9
--- /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.tracecompass.internal.pcap.core.trace;
+
+/**
+ * Exception that is thrown when the Pcap file is not valid.
+ *
+ * @author Vincent Perot
+ */
+public class BadPcapFileException extends Exception {
+
+    private static final long serialVersionUID = 8228512814116052260L;
+
+    /**
+     * Default constructor with no message.
+     */
+    public BadPcapFileException() {
+        super();
+    }
+
+    /**
+     * Constructor with an attached message.
+     *
+     * @param message
+     *            The message attached to this exception
+     */
+    public BadPcapFileException(String message) {
+        super(message);
+    }
+
+    /**
+     * Re-throw an exception into this type.
+     *
+     * @param e
+     *            The previous Exception we caught
+     */
+    public BadPcapFileException(Exception e) {
+        super(e);
+    }
+
+    /**
+     * Constructor with an attached message and re-throw an exception into this
+     * type.
+     *
+     * @param message
+     *            The message attached to this exception
+     * @param exception
+     *            The previous Exception caught
+     */
+    public BadPcapFileException(String message, Throwable exception) {
+        super(message, exception);
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFile.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFile.java
new file mode 100644 (file)
index 0000000..08bc61f
--- /dev/null
@@ -0,0 +1,395 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.trace;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.nio.channels.SeekableByteChannel;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.TreeMap;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.util.ConversionHelper;
+import org.eclipse.tracecompass.internal.pcap.core.util.PcapTimestampScale;
+
+/**
+ * Class that allows the interaction with a pcap file.
+ *
+ * @author Vincent Perot
+ */
+public class PcapFile implements Closeable {
+
+    // TODO add pcapng support.
+    // TODO Make parsing faster by buffering the data.
+
+    private final Path fPcapFilePath;
+    private final ByteOrder fByteOrder;
+    private final SeekableByteChannel fFileChannel;
+    private final PcapTimestampScale fTimestampPrecision;
+
+    private final int fMajorVersion;
+    private final int fMinorVersion;
+    private final long fTimeAccuracy;
+    private final long fTimeZoneCorrection;
+    private final long fSnapshotLength;
+    private final long fDataLinkType;
+
+    private final TreeMap<Long, Long> fFileIndex;
+
+    private long fCurrentRank;
+    private long fTotalNumberPackets;
+
+    /**
+     * Constructor of the PcapFile Class.
+     *
+     * @param filePath
+     *            The path to the pcap file.
+     *
+     * @throws BadPcapFileException
+     *             Thrown if the Pcap File is not valid.
+     * @throws IOException
+     *             Thrown if there is an IO error while reading the file.
+     */
+    public PcapFile(Path filePath) throws BadPcapFileException, IOException {
+
+        fFileIndex = new TreeMap<>();
+        fCurrentRank = 0;
+        fTotalNumberPackets = -1;
+        fPcapFilePath = filePath;
+
+        // Check file validity
+        if (Files.notExists(fPcapFilePath) || !Files.isRegularFile(fPcapFilePath) ||
+                Files.size(fPcapFilePath) < PcapFileValues.GLOBAL_HEADER_SIZE) {
+            throw new BadPcapFileException("Bad Pcap File."); //$NON-NLS-1$
+        }
+
+        if (!Files.isReadable(fPcapFilePath)) {
+            throw new BadPcapFileException("File is not readable."); //$NON-NLS-1$
+        }
+
+        // File is not empty. Try to open.
+        fFileChannel = checkNotNull(Files.newByteChannel(fPcapFilePath));
+
+        // Parse the global header.
+        // Read the magic number (4 bytes) from the input stream
+        // and determine the mode (big endian or little endian)
+        ByteBuffer globalHeader = ByteBuffer.allocate(PcapFileValues.GLOBAL_HEADER_SIZE);
+        globalHeader.clear();
+        fFileChannel.read(globalHeader);
+        globalHeader.flip();
+        int magicNumber = globalHeader.getInt();
+
+        switch (magicNumber) {
+        case PcapFileValues.MAGIC_BIG_ENDIAN_MICRO: // file is big endian
+            fByteOrder = checkNotNull(ByteOrder.BIG_ENDIAN);
+            fTimestampPrecision = PcapTimestampScale.MICROSECOND;
+            break;
+        case PcapFileValues.MAGIC_LITTLE_ENDIAN_MICRO: // file is little endian
+            fByteOrder = checkNotNull(ByteOrder.LITTLE_ENDIAN);
+            fTimestampPrecision = PcapTimestampScale.MICROSECOND;
+            break;
+        case PcapFileValues.MAGIC_BIG_ENDIAN_NANO: // file is big endian
+            fByteOrder = checkNotNull(ByteOrder.BIG_ENDIAN);
+            fTimestampPrecision = PcapTimestampScale.NANOSECOND;
+            break;
+        case PcapFileValues.MAGIC_LITTLE_ENDIAN_NANO: // file is little endian
+            fByteOrder = checkNotNull(ByteOrder.LITTLE_ENDIAN);
+            fTimestampPrecision = PcapTimestampScale.NANOSECOND;
+            break;
+        default:
+            this.close();
+            throw new BadPcapFileException(String.format("%08x", magicNumber) + " is not a known magic number."); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+
+        // Put the rest of the buffer in file endian.
+        globalHeader.order(fByteOrder);
+
+        // Initialization of global header fields.
+        fMajorVersion = ConversionHelper.unsignedShortToInt(globalHeader.getShort());
+        fMinorVersion = ConversionHelper.unsignedShortToInt(globalHeader.getShort());
+        fTimeAccuracy = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
+        fTimeZoneCorrection = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
+        fSnapshotLength = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
+        fDataLinkType = ConversionHelper.unsignedIntToLong(globalHeader.getInt());
+
+        fFileIndex.put(fCurrentRank, fFileChannel.position());
+
+    }
+
+    /**
+     * Method that allows the parsing of a packet at the current position.
+     *
+     * @return The parsed Pcap Packet.
+     * @throws IOException
+     *             Thrown when there is an error while reading the file.
+     * @throws BadPcapFileException
+     *             Thrown when a packet header is invalid.
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    public synchronized @Nullable PcapPacket parseNextPacket() throws IOException, BadPcapFileException, BadPacketException {
+
+        // Parse the packet header
+        if (fFileChannel.size() - fFileChannel.position() == 0) {
+            return null;
+        }
+        if (fFileChannel.size() - fFileChannel.position() < PcapFileValues.PACKET_HEADER_SIZE) {
+            throw new BadPcapFileException("A pcap header is invalid."); //$NON-NLS-1$
+        }
+
+        ByteBuffer pcapPacketHeader = ByteBuffer.allocate(PcapFileValues.PACKET_HEADER_SIZE);
+        pcapPacketHeader.clear();
+        pcapPacketHeader.order(fByteOrder);
+
+        fFileChannel.read(pcapPacketHeader);
+
+        pcapPacketHeader.flip();
+        pcapPacketHeader.position(PcapFileValues.INCLUDED_LENGTH_POSITION);
+        long includedPacketLength = ConversionHelper.unsignedIntToLong(pcapPacketHeader.getInt());
+
+        if (fFileChannel.size() - fFileChannel.position() < includedPacketLength) {
+            throw new BadPcapFileException("A packet header is invalid."); //$NON-NLS-1$
+        }
+
+        if (includedPacketLength > Integer.MAX_VALUE) {
+            throw new BadPacketException("Packets that are bigger than 2^31-1 bytes are not supported."); //$NON-NLS-1$
+        }
+
+        ByteBuffer pcapPacketData = ByteBuffer.allocate((int) includedPacketLength);
+        pcapPacketData.clear();
+        pcapPacketHeader.order(ByteOrder.BIG_ENDIAN); // Not really needed.
+        fFileChannel.read(pcapPacketData);
+
+        pcapPacketData.flip();
+
+        fFileIndex.put(++fCurrentRank, fFileChannel.position());
+
+        return new PcapPacket(this, null, pcapPacketHeader, pcapPacketData, fCurrentRank - 1);
+
+    }
+
+    /**
+     * Method that allows to skip a packet at the current position.
+     *
+     * @throws IOException
+     *             Thrown when there is an error while reading the file.
+     * @throws BadPcapFileException
+     *             Thrown when a packet header is invalid.
+     */
+    public synchronized void skipNextPacket() throws IOException, BadPcapFileException {
+
+        // Parse the packet header
+        if (fFileChannel.size() - fFileChannel.position() == 0) {
+            return;
+        }
+        if (fFileChannel.size() - fFileChannel.position() < PcapFileValues.PACKET_HEADER_SIZE) {
+            throw new BadPcapFileException("A pcap header is invalid."); //$NON-NLS-1$
+        }
+
+        ByteBuffer pcapPacketHeader = ByteBuffer.allocate(PcapFileValues.PACKET_HEADER_SIZE);
+        pcapPacketHeader.clear();
+        pcapPacketHeader.order(fByteOrder);
+
+        fFileChannel.read(pcapPacketHeader);
+
+        pcapPacketHeader.flip();
+        pcapPacketHeader.position(PcapFileValues.INCLUDED_LENGTH_POSITION);
+        long includedPacketLength = ConversionHelper.unsignedIntToLong(pcapPacketHeader.getInt());
+
+        if (fFileChannel.size() - fFileChannel.position() < includedPacketLength) {
+            throw new BadPcapFileException("A packet header is invalid."); //$NON-NLS-1$
+        }
+
+        fFileChannel.position(fFileChannel.position() + includedPacketLength);
+
+        fFileIndex.put(++fCurrentRank, fFileChannel.position());
+
+    }
+
+    /**
+     * Method that moves the position to the specified rank.
+     *
+     * @param rank
+     *            The rank of the packet.
+     *
+     * @throws IOException
+     *             Thrown when there is an error while reading the file.
+     * @throws BadPcapFileException
+     *             Thrown when a packet header is invalid.
+     */
+    public synchronized void seekPacket(long rank) throws IOException, BadPcapFileException {
+
+        // Verify argument
+        if (rank < 0) {
+            throw new IllegalArgumentException();
+        }
+
+        Long positionInBytes = fFileIndex.get(rank);
+
+        if (positionInBytes != null) {
+            // Index is known. Move to position.
+            fFileChannel.position(positionInBytes.longValue());
+            fCurrentRank = rank;
+        } else {
+            // Index is unknown. Find the corresponding position.
+            // Find closest index
+            fCurrentRank = fFileIndex.floorKey(rank);
+            // skip until wanted packet is found
+            do {
+                skipNextPacket();
+            } while (fCurrentRank != rank && hasNextPacket());
+        }
+    }
+
+    /**
+     * Method that indicates if there are packets remaining to read. It is an
+     * end of file indicator.
+     *
+     * @return Whether the pcap still has packets or not.
+     * @throws IOException
+     *             If some IO error occurs.
+     */
+    public synchronized boolean hasNextPacket() throws IOException {
+        return ((fFileChannel.size() - fFileChannel.position()) > 0);
+    }
+
+    /**
+     * Getter method for the Byte Order of the file.
+     *
+     * @return The byte Order of the file.
+     */
+    public ByteOrder getByteOrder() {
+        return fByteOrder;
+    }
+
+    /**
+     * Getter method for the Major Version of the file.
+     *
+     * @return The Major Version of the file.
+     */
+    public int getMajorVersion() {
+        return fMajorVersion;
+    }
+
+    /**
+     * Getter method for the Minor Version of the file.
+     *
+     * @return The Minor Version of the file.
+     */
+    public int getMinorVersion() {
+        return fMinorVersion;
+    }
+
+    /**
+     * Getter method for the time accuracy of the file.
+     *
+     * @return The time accuracy of the file.
+     */
+    public long getTimeAccuracy() {
+        return fTimeAccuracy;
+    }
+
+    /**
+     * Getter method for the time zone correction of the file.
+     *
+     * @return The time zone correction of the file.
+     */
+    public long getTimeZoneCorrection() {
+        return fTimeZoneCorrection;
+    }
+
+    /**
+     * Getter method for the snapshot length of the file.
+     *
+     * @return The snapshot length of the file.
+     */
+    public long getSnapLength() {
+        return fSnapshotLength;
+    }
+
+    /**
+     * Getter method for the datalink type of the file. This parameter is used
+     * to determine higher-level protocols (Ethernet, WLAN, SLL).
+     *
+     * @return The datalink type of the file.
+     */
+    public long getDataLinkType() {
+        return fDataLinkType;
+    }
+
+    /**
+     * Getter method for the path of the file.
+     *
+     * @return The path of the file.
+     */
+    public Path getPath() {
+        return fPcapFilePath;
+    }
+
+    /**
+     * Method that returns the total number of packets in the file.
+     *
+     * @return The total number of packets.
+     * @throws IOException
+     *             Thrown when some IO error occurs.
+     * @throws BadPcapFileException
+     *             Thrown when a packet header is invalid.
+     */
+    public synchronized long getTotalNbPackets() throws IOException, BadPcapFileException {
+        if (fTotalNumberPackets == -1) {
+            long rank = fCurrentRank;
+            fCurrentRank = fFileIndex.floorKey(rank);
+
+            // skip until end of file.
+            while (hasNextPacket()) {
+                skipNextPacket();
+            }
+            fTotalNumberPackets = fCurrentRank;
+            fCurrentRank = rank;
+            seekPacket(rank);
+        }
+        return fTotalNumberPackets;
+    }
+
+    /**
+     * Getter method that returns the current rank in the file (the packet
+     * number).
+     *
+     * @return The current rank.
+     */
+    public synchronized long getCurrentRank() {
+        return fCurrentRank;
+    }
+
+    /**
+     * Getter method that returns the timestamp precision of the file.
+     *
+     * @return The the timestamp precision of the file.
+     */
+    public PcapTimestampScale getTimestampPrecision() {
+        return fTimestampPrecision;
+    }
+
+    @Override
+    public void close() throws IOException {
+        fFileChannel.close();
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFileValues.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/PcapFileValues.java
new file mode 100644 (file)
index 0000000..485f7c3
--- /dev/null
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.trace;
+
+/**
+ * Interface that lists constants related to a Pcap File.
+ *
+ * See http://wiki.wireshark.org/Development/LibpcapFileFormat.
+ *
+ * @author Vincent Perot
+ */
+public interface PcapFileValues {
+
+    /** Number used to determine the endianness and precision of the file */
+    int MAGIC_BIG_ENDIAN_MICRO = 0xa1b2c3d4;
+
+    /** Number used to determine the endianness and precision of the file */
+    int MAGIC_LITTLE_ENDIAN_MICRO = 0xd4c3b2a1;
+
+    /** Number used to determine the endianness and precision of the file */
+    int MAGIC_BIG_ENDIAN_NANO = 0xa1b23c4d;
+
+    /** Number used to determine the endianness and precision of the file */
+    int MAGIC_LITTLE_ENDIAN_NANO = 0x4d3cb2a1;
+
+    /** Size in bytes of a Pcap file global header */
+    int GLOBAL_HEADER_SIZE = 24;
+
+    /** Size in bytes of a Pcap packet header */
+    int PACKET_HEADER_SIZE = 16;
+
+    /** Position in bytes in the packet header of the packet's length */
+    int INCLUDED_LENGTH_POSITION = 8;
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/trace/package-info.java
new file mode 100644 (file)
index 0000000..4ae5aa2
--- /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.tracecompass.internal.pcap.core.trace;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/ConversionHelper.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/ConversionHelper.java
new file mode 100644 (file)
index 0000000..500f2b2
--- /dev/null
@@ -0,0 +1,181 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.util;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ethernet2.EthernetIIValues;
+
+/**
+ * Class for helping with the conversion of data.
+ *
+ * @author Vincent Perot
+ */
+public final class ConversionHelper {
+
+    private static final char[] HEX_ARRAY = checkNotNull("0123456789abcdef".toCharArray()); //$NON-NLS-1$
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+    private static final String DEFAULT_TIME_PATTERN = "yyyy-MM-dd HH:mm:ss.SSS"; //$NON-NLS-1$
+    private static final DateFormat DATE_FORMATTER = new SimpleDateFormat(DEFAULT_TIME_PATTERN);
+
+    private ConversionHelper() {
+    }
+
+    /**
+     * Generate an integer from an unsigned byte.
+     *
+     * @param n
+     *            the unsigned byte.
+     * @return the integer representing the unsigned value.
+     */
+    public static int unsignedByteToInt(byte n) {
+        return n & 0x000000FF;
+    }
+
+    /**
+     * Generate an integer from an unsigned short.
+     *
+     * @param n
+     *            the unsigned short.
+     * @return the integer representing the unsigned value.
+     */
+    public static int unsignedShortToInt(short n) {
+        return n & 0x0000FFFF;
+    }
+
+    /**
+     * Generate a long from an unsigned integer.
+     *
+     * @param n
+     *            the unsigned integer.
+     * @return the long representing the unsigned value.
+     */
+    public static long unsignedIntToLong(int n) {
+        return n & 0x00000000FFFFFFFFL;
+    }
+
+    /**
+     * Generate an hex number from a byte array.
+     *
+     * @param bytes
+     *            The array of bytes.
+     * @param spaced
+     *            Whether there must be a space between each byte or not.
+     * @return the hex as a string.
+     */
+    public static String bytesToHex(byte[] bytes, boolean spaced) {
+        // No need to check for character encoding since bytes represents a
+        // number.
+
+        if (bytes.length == 0) {
+            return EMPTY_STRING;
+        }
+
+        char[] hexChars = spaced ? new char[bytes.length * 3 - 1] : new char[bytes.length * 2];
+        int delta = spaced ? 3 : 2;
+        char separator = ' ';
+
+        for (int j = 0; j < bytes.length; j++) {
+
+            int v = bytes[j] & 0xFF;
+            hexChars[j * delta] = HEX_ARRAY[v >>> 4];
+            hexChars[j * delta + 1] = HEX_ARRAY[v & 0x0F];
+
+            if (spaced && (j != bytes.length - 1)) {
+                hexChars[j * delta + 2] = separator;
+            }
+        }
+        return new String(hexChars);
+    }
+
+    // TODO Add little endian support
+    /**
+     * Generate a string representing the MAC address.
+     *
+     * @param mac
+     *            The MAC address as a byte array.
+     * @return The string representing the MAC address.
+     */
+    public static String toMacAddress(byte[] mac) {
+
+        if (mac.length != EthernetIIValues.MAC_ADDRESS_SIZE) {
+            throw new IllegalArgumentException();
+        }
+        char separator = ':';
+        return String.format("%02x", mac[0]) + separator + //$NON-NLS-1$
+                String.format("%02x", mac[1]) + separator + //$NON-NLS-1$
+                String.format("%02x", mac[2]) + separator + //$NON-NLS-1$
+                String.format("%02x", mac[3]) + separator + //$NON-NLS-1$
+                String.format("%02x", mac[4]) + separator + //$NON-NLS-1$
+                String.format("%02x", mac[5]); //$NON-NLS-1$
+
+    }
+
+    // TODO support non GMT time.
+
+    /**
+     * Convert a timestamp into a date.
+     *
+     * @param ts
+     *            The timestamp. It represents the time since Epoch in
+     *            microseconds.
+     * @param scale
+     *            The scale of the timestamp.
+     * @return The date as a string.
+     */
+    public static String toGMTTime(long ts, PcapTimestampScale scale) {
+        long timestamp;
+        switch (scale) {
+        case MICROSECOND:
+            timestamp = ts * 1000;
+            break;
+        case NANOSECOND:
+            timestamp = ts;
+            break;
+        default:
+            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
+        }
+        return format(timestamp);
+    }
+
+    /**
+     * Format the timestamp to a string.
+     *
+     * @param value
+     *            the timestamp value to format (in ns)
+     * @return the formatted timestamp
+     */
+    private static String format(long value) {
+        // Split the timestamp value into its sub-components
+        long date = value / 1000000; // milliseconds since epoch
+        long cs = Math.abs((value % 1000000) / 1000); // microseconds
+        long ns = Math.abs(value % 1000); // nanoseconds
+
+        Date dateObject = new Date(date);
+
+        StringBuilder sb = new StringBuilder(DATE_FORMATTER.format(dateObject));
+        sb.append('.')
+                .append(String.format("%03d", cs)) //$NON-NLS-1$
+                .append('.')
+                .append(String.format("%03d", ns)); //$NON-NLS-1$
+
+        return NonNullUtils.nullToEmptyString(sb);
+
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/EthertypeHelper.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/EthertypeHelper.java
new file mode 100644 (file)
index 0000000..84b0aa1
--- /dev/null
@@ -0,0 +1,82 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.util;
+
+// TODO finish this
+// TODO maybe match it to protocol instead of string.
+
+/**
+ * Helper that is used to help mapping a certain ethertype to a particular
+ * protocol (i.e. IPv4). This is used when finding the child packet of an
+ * Ethernet packet, for instance.
+ *
+ * See http://en.wikipedia.org/wiki/EtherType
+ *
+ * @author Vincent Perot
+ */
+public final class EthertypeHelper {
+
+    /** EtherType IPv4 */
+    public static final int ETHERTYPE_IPV4 = 0x0800;
+
+    /** EtherType ARP */
+    public static final int ETHERTYPE_ARP = 0x0806;
+
+    /** EtherType Wake-On-LAN */
+    public static final int ETHERTYPE_WAKE_ON_LAN = 0x0842;
+
+    /** EtherType TRILL */
+    public static final int ETHERTYPE_TRILL = 0x22F3;
+
+    /** EtherType DECnet Phase IV */
+    public static final int ETHERTYPE_DECNET_PHASE_IV = 0x6003;
+
+    private EthertypeHelper() {}
+
+    /**
+     * Method that matches the ethertype as a number, to a protocol as a string.
+     *
+     * @param ethertype
+     *            The Ethertype as an int.
+     * @return The protocol as a string.
+     */
+    public static String toString(int ethertype) {
+        switch (ethertype) {
+        case ETHERTYPE_IPV4:
+            return "Internet Protocol Version 4"; //$NON-NLS-1$
+        case ETHERTYPE_ARP:
+            return "Address Resolution Protocol"; //$NON-NLS-1$
+        case ETHERTYPE_WAKE_ON_LAN:
+            return "Wake-on-LAN"; //$NON-NLS-1$
+        case ETHERTYPE_TRILL:
+            return "IETF TRILL Protocol"; //$NON-NLS-1$
+        case ETHERTYPE_DECNET_PHASE_IV:
+            return "DECnet Phase IV"; //$NON-NLS-1$
+        default:
+            return "Unknown"; //$NON-NLS-1$
+        }
+    }
+
+    /**
+     * Convert an ethertype (int) into its string representation. This allows
+     * the mapping of ethertype to the real protocol name.
+     *
+     * @param type
+     *            The Ethertype to convert.
+     * @return The Ethertype as a string.
+     */
+    public static String toEtherType(int type) {
+        return toString(type) + " (0x" + String.format("%04x", type) + ")"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/IPProtocolNumberHelper.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/IPProtocolNumberHelper.java
new file mode 100644 (file)
index 0000000..41b2c5c
--- /dev/null
@@ -0,0 +1,81 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.util;
+
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+
+// TODO finish this
+// TODO maybe match it to protocol instead of string.
+
+/**
+ * Helper that is used to help mapping a certain protocol number to a particular
+ * protocol (i.e. TCP). This is used when finding the child packet of an IPv4
+ * packet, for instance.
+ *
+ * See http://en.wikipedia.org/wiki/List_of_IP_protocol_numbers
+ *
+ * @author Vincent Perot
+ */
+public final class IPProtocolNumberHelper {
+
+    /** Protocol Number ICMP */
+    public static final int PROTOCOL_NUMBER_ICMP = 1;
+
+    /** Protocol Number IGMP */
+    public static final int PROTOCOL_NUMBER_IGMP = 2;
+
+    /** Protocol Number TCP */
+    public static final int PROTOCOL_NUMBER_TCP = 6;
+
+    /** Protocol Number UDP */
+    public static final int PROTOCOL_NUMBER_UDP = 17;
+
+    /** Protocol Number Encapsulated IPv6 */
+    public static final int PROTOCOL_NUMBER_ENCAP_IPV6 = 41;
+
+    /** Protocol Number OSPF */
+    public static final int PROTOCOL_NUMBER_OSPF = 89;
+
+    /** Protocol Number SCTP */
+    public static final int PROTOCOL_NUMBER_SCTP = 132;
+
+    private IPProtocolNumberHelper() {}
+
+    /**
+     * Method that match the protocol number to a protocol as a string.
+     *
+     * @param protocolNumber
+     *            The protocol number as an int.
+     * @return The protocol as a string.
+     */
+    public static String toString(int protocolNumber) {
+        switch (protocolNumber) {
+        case PROTOCOL_NUMBER_ICMP:
+            return "ICMP"; //$NON-NLS-1$
+        case PROTOCOL_NUMBER_IGMP:
+            return "IGMP"; //$NON-NLS-1$
+        case PROTOCOL_NUMBER_TCP:
+            return PcapProtocol.TCP.getName();
+        case PROTOCOL_NUMBER_UDP:
+            return PcapProtocol.UDP.getName();
+        case PROTOCOL_NUMBER_ENCAP_IPV6:
+            return "IPv6"; //$NON-NLS-1$
+        case PROTOCOL_NUMBER_OSPF:
+            return "OSPF"; //$NON-NLS-1$
+        case PROTOCOL_NUMBER_SCTP:
+            return "SCTP"; //$NON-NLS-1$
+        default:
+            return "Unknown"; //$NON-NLS-1$
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/LinkTypeHelper.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/LinkTypeHelper.java
new file mode 100644 (file)
index 0000000..24cffc9
--- /dev/null
@@ -0,0 +1,79 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.util;
+
+// TODO finish this
+// TODO map to protocol instead of string? that would make more sense imo.
+
+/**
+ * Helper that is used to help mapping a certain linktype to a particular
+ * protocol (i.e. ethernet).
+ *
+ * See http://www.tcpdump.org/linktypes.html
+ *
+ * @author Vincent Perot
+ */
+public final class LinkTypeHelper {
+
+    /** Linktype Null */
+    public static final int LINKTYPE_NULL = 0;
+
+    /** Linktype Ethernet II */
+    public static final int LINKTYPE_ETHERNET = 1;
+
+    /** Linktype AX25 */
+    public static final int LINKTYPE_AX25 = 3;
+
+    /** Linktype IEEE802.5 */
+    public static final int LINKTYPE_IEEE802_5 = 6;
+
+    /** Linktype Raw */
+    public static final int LINKTYPE_RAW = 101;
+
+    /** Linktype IEEE802.11 */
+    public static final int LINKTYPE_IEEE802_11 = 105;
+
+    /** Linktype Linux SLL */
+    public static final int LINKTYPE_LINUX_SLL = 113;
+
+    private LinkTypeHelper() {}
+
+    /**
+     * Method that match the linktype as an int to a protocol as a string.
+     *
+     * @param linkType
+     *            The linkType as an int.
+     * @return The protocol as a string.
+     */
+    public static String toString(int linkType) {
+        switch (linkType) {
+        case LINKTYPE_NULL:
+            return "null"; //$NON-NLS-1$
+        case LINKTYPE_ETHERNET:
+            return "ethernet"; //$NON-NLS-1$
+        case LINKTYPE_AX25:
+            return "ax25"; //$NON-NLS-1$
+        case LINKTYPE_IEEE802_5:
+            return "ieee802.5"; //$NON-NLS-1$
+        case LINKTYPE_RAW:
+            return "raw"; //$NON-NLS-1$
+        case LINKTYPE_IEEE802_11:
+            return "ieee802.11"; //$NON-NLS-1$
+        case LINKTYPE_LINUX_SLL:
+            return "linux_sll"; //$NON-NLS-1$
+        default:
+            return "unknown"; //$NON-NLS-1$
+        }
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/PcapTimestampScale.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/PcapTimestampScale.java
new file mode 100644 (file)
index 0000000..876140a
--- /dev/null
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.pcap.core.util;
+
+/**
+ * Enum for the different time precision for pcap files.
+ *
+ * @author Vincent Perot
+ */
+public enum PcapTimestampScale {
+
+    /** Microsecond Pcap */
+    MICROSECOND,
+    /** Nanosecond Pcap */
+    NANOSECOND
+}
diff --git a/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/package-info.java b/pcap/org.eclipse.tracecompass.pcap.core/src/org/eclipse/tracecompass/internal/pcap/core/util/package-info.java
new file mode 100644 (file)
index 0000000..d03b212
--- /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.tracecompass.internal.pcap.core.util;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.classpath b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.classpath
new file mode 100644 (file)
index 0000000..68143fe
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="src" path="shared"/>
+       <classpathentry kind="src" path="stubs"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.project b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.project
new file mode 100644 (file)
index 0000000..05ad442
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.tmf.pcap.core.tests</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.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/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.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/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0409c61
--- /dev/null
@@ -0,0 +1,403 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+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=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.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/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..62cfa90
--- /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=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/META-INF/MANIFEST.MF b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..8030628
--- /dev/null
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.core.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Require-Bundle: org.junit;bundle-version="4.0.0",
+ org.eclipse.core.runtime,
+ org.eclipse.core.resources,
+ org.eclipse.tracecompass.pcap.core,
+ org.eclipse.tracecompass.pcap.core.tests,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.tmf.core.tests,
+ org.eclipse.tracecompass.tmf.pcap.core
+Import-Package: com.google.common.collect
+Export-Package: org.eclipse.tracecompass.tmf.pcap.core.tests,
+ org.eclipse.tracecompass.tmf.pcap.core.tests.analysis;x-internal:=true,
+ org.eclipse.tracecompass.tmf.pcap.core.tests.event;x-internal:=true,
+ org.eclipse.tracecompass.tmf.pcap.core.tests.shared;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests",
+ org.eclipse.tracecompass.tmf.pcap.core.tests.stubs;x-internal:=true,
+ org.eclipse.tracecompass.tmf.pcap.core.tests.trace;x-internal:=true
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/about.html b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/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/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/build.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/build.properties
new file mode 100644 (file)
index 0000000..48bac50
--- /dev/null
@@ -0,0 +1,23 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms 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/,\
+           shared/,\
+           stubs
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties,\
+               about.html
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/plugin.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/plugin.properties
new file mode 100644 (file)
index 0000000..2912f68
--- /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
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Pcap support for TMF Core Tests Plug-in
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/pom.xml b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/pom.xml
new file mode 100644 (file)
index 0000000..e454adb
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2011, Red Hat, Inc.
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.tmf.pcap.core.tests</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-test-plugin</packaging>
+
+  <name>Pcap Support for TMF Core Tests Plug-in</name>
+
+ <build>
+    <plugins>
+        <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-antrun-plugin</artifactId>
+            <version>1.8</version>
+            <executions>
+                <execution>
+                    <id>prepare</id>
+                    <phase>validate</phase>
+                    <configuration>
+                    <target>
+                        <echo message="prepare phase" />
+                    </target>
+                    </configuration>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                </execution>
+            </executions>
+        </plugin>
+        <plugin>
+            <groupId>org.eclipse.tycho</groupId>
+            <artifactId>tycho-surefire-plugin</artifactId>
+            <version>${tycho-version}</version>
+            <configuration>
+                <includes>
+                    <include>**/AllTests.*</include>
+                </includes>
+                <useUIHarness>false</useUIHarness>
+                <useUIThread>false</useUIThread>
+                <product>org.eclipse.platform.ide</product>
+            </configuration>
+        </plugin>
+    </plugins>
+  </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/shared/org/eclipse/tracecompass/tmf/pcap/core/tests/shared/PcapTmfTestTrace.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/shared/org/eclipse/tracecompass/tmf/pcap/core/tests/shared/PcapTmfTestTrace.java
new file mode 100644 (file)
index 0000000..4270092
--- /dev/null
@@ -0,0 +1,122 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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.tracecompass.tmf.pcap.core.tests.shared;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.pcap.core.tests.stubs.PcapTmfTraceStub;
+
+/**
+ * Available Pcap TMF test traces. Kind-of-extends {@link PcapTestTrace}.
+ *
+ * To run tests using these, you first need to run the "get-traces.[xml|sh]"
+ * script located under org.eclipse.tracecompass.pcap.core.tests/rsc/ .
+ *
+ * @author Vincent Perot
+ */
+@NonNullByDefault
+public enum PcapTmfTestTrace {
+    /** A bad pcap file. */
+    BAD_PCAPFILE,
+
+    /** A Valid Pcap that is empty. */
+    EMPTY_PCAP,
+
+    /** A Pcap that mostly contains TCP packets. */
+    MOSTLY_TCP,
+
+    /** A Pcap that mostly contains UDP packets. */
+    MOSTLY_UDP,
+
+    /** A big-endian trace that contains two packets. */
+    SHORT_BIG_ENDIAN,
+
+    /** A little-endian trace that contains two packets. */
+    SHORT_LITTLE_ENDIAN,
+
+    /** A trace used for benchmarking. */
+    BENCHMARK_TRACE,
+
+    /** A Kernel trace directory. */
+    KERNEL_DIRECTORY,
+
+    /** A Kernel trace file. */
+    KERNEL_TRACE;
+
+    private final String fPath;
+    private @Nullable PcapTmfTraceStub fTrace = null;
+
+    private PcapTmfTestTrace() {
+        @SuppressWarnings("null")
+        @NonNull String path = PcapTestTrace.valueOf(this.name()).getPath().toString();
+        fPath = path;
+    }
+
+    /**
+     * @return The path of this trace
+     */
+    public String getPath() {
+        return fPath;
+    }
+
+    /**
+     * Return a PcapTmfTraceStub object of this test trace. It will be already
+     * initTrace()'ed.
+     *
+     * Make sure you call {@link #exists()} before calling this!
+     *
+     * After being used by unit tests, traces must be properly disposed of by
+     * calling the {@link PcapTmfTestTrace#dispose()} method.
+     *
+     * @return A PcapTmfTrace reference to this trace
+     */
+    public synchronized PcapTrace getTrace() {
+        PcapTmfTraceStub trace = fTrace;
+        if (trace != null) {
+            trace.dispose();
+        }
+        trace = new PcapTmfTraceStub();
+        try {
+            trace.initTrace(null, fPath, PcapEvent.class);
+        } catch (TmfTraceException e) {
+            /* Should not happen if tracesExist() passed */
+            throw new RuntimeException(e);
+        }
+        fTrace = trace;
+        return trace;
+    }
+
+    /**
+     * Check if the trace actually exists on disk or not.
+     *
+     * @return If the trace is present
+     */
+    public boolean exists() {
+        return PcapTestTrace.valueOf(this.name()).exists();
+    }
+
+    /**
+     * Dispose of the trace
+     */
+    public void dispose() {
+        if (fTrace != null) {
+            fTrace.dispose();
+            fTrace = null;
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/AllTmfPcapCoreTests.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/AllTmfPcapCoreTests.java
new file mode 100644 (file)
index 0000000..9ba2ad4
--- /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 generation with CodePro tools
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.pcap.core.tests;
+
+import org.eclipse.tracecompass.tmf.core.tests.shared.DebugSuite;
+import org.junit.runner.RunWith;
+
+/**
+ * The class <code>AllTmfPcapCoreTests</code> builds a suite to run all the
+ * tests.
+ *
+ * @author Vincent Perot
+ */
+@RunWith(DebugSuite.class)
+@DebugSuite.SuiteClasses({
+        org.eclipse.tracecompass.tmf.pcap.core.tests.analysis.AllTests.class,
+        org.eclipse.tracecompass.tmf.pcap.core.tests.event.AllTests.class,
+        org.eclipse.tracecompass.tmf.pcap.core.tests.trace.AllTests.class
+})
+public class AllTmfPcapCoreTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/AllTests.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/AllTests.java
new file mode 100644 (file)
index 0000000..1e53578
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.analysis;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Analysis test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        StreamListAnalysisTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/StreamListAnalysisTest.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/analysis/StreamListAnalysisTest.java
new file mode 100644 (file)
index 0000000..0bc479a
--- /dev/null
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.analysis;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.tracecompass.internal.tmf.pcap.core.analysis.StreamListAnalysis;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStreamBuilder;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.junit.Test;
+
+/**
+ * JUnit that test the StreamListAnalysis class.
+ *
+ * @author Vincent Perot
+ */
+public class StreamListAnalysisTest {
+
+    /**
+     * Method that tests the constructor.
+     */
+    @Test
+    public void constructorTest() {
+        StreamListAnalysis analysis = new StreamListAnalysis();
+        analysis.setId(StreamListAnalysis.ID);
+        for (TmfPcapProtocol protocol : TmfPcapProtocol.values()) {
+            if (protocol.supportsStream()) {
+                assertNotNull(analysis.getBuilder(protocol));
+            }
+        }
+        assertFalse(analysis.isFinished());
+
+        analysis.dispose();
+    }
+
+    /**
+     * Method that tests canExecute().
+     *
+     * @throws TmfTraceException
+     *             Thrown when the trace cannot be initialized. Fails the test.
+     */
+    @Test
+    public void canExecuteTest() throws TmfTraceException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        String path = trace.getPath().toString();
+        try (PcapTrace pcapTrace = new PcapTrace();) {
+            StreamListAnalysis analysis = new StreamListAnalysis();
+            analysis.setId(StreamListAnalysis.ID);
+            pcapTrace.initTrace(null, path, null);
+            assertTrue(analysis.canExecute(pcapTrace));
+
+            analysis.dispose();
+        }
+    }
+
+    /**
+     * Method that execute the analysis and verify the results.
+     *
+     * @throws TmfAnalysisException
+     *             Thrown when an analysis error occurs during the setup or
+     *             execution. Fails the test.
+     * @throws TmfTraceException
+     *             Thrown when the trace cannot be initialized. Fails the test.
+     */
+    @Test
+    public void executeAnalysisTest() throws TmfAnalysisException, TmfTraceException {
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        String path = trace.getPath().toString();
+        try (PcapTrace pcapTrace = new PcapTrace();) {
+            StreamListAnalysis analysis = new StreamListAnalysis();
+
+            pcapTrace.initTrace(null, path, null);
+            analysis.setId(StreamListAnalysis.ID);
+            analysis.setTrace(pcapTrace);
+            analysis.schedule();
+            analysis.waitForCompletion();
+
+            // Verify that builders are not empty.
+            TmfPacketStreamBuilder builder = analysis.getBuilder(TmfPcapProtocol.ETHERNET_II);
+            if (builder == null) {
+                fail("The PacketStreamBuilder is null!");
+                return;
+            }
+            assertEquals(1, builder.getNbStreams());
+
+            builder = analysis.getBuilder(TmfPcapProtocol.IPV4);
+            if (builder == null) {
+                fail("The PacketStreamBuilder is null!");
+                return;
+            }
+            assertEquals(3, builder.getNbStreams());
+
+            builder = analysis.getBuilder(TmfPcapProtocol.TCP);
+            if (builder == null) {
+                fail("The PacketStreamBuilder is null!");
+                return;
+            }
+            assertEquals(2, builder.getNbStreams());
+
+            builder = analysis.getBuilder(TmfPcapProtocol.UDP);
+            if (builder == null) {
+                fail("The PacketStreamBuilder is null!");
+                return;
+            }
+            assertEquals(1, builder.getNbStreams());
+
+            analysis.dispose();
+        }
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/AllTests.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/AllTests.java
new file mode 100644 (file)
index 0000000..ffc4de3
--- /dev/null
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.event;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Event and Event Field test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    PcapEventTest.class,
+    PcapEventFieldTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventFieldTest.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventFieldTest.java
new file mode 100644 (file)
index 0000000..9f8757b
--- /dev/null
@@ -0,0 +1,243 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.event;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.ipv4.IPv4Packet;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEventField;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapRootEventField;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * JUnit that test the PcapEventField class.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventFieldTest {
+
+    private static final @NonNull String EMPTY_STRING = "";
+    private static PcapEventField fRegularField;
+    private static PcapRootEventField fRootField;
+
+    /**
+     * Initialize the Packet and the Event.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the pcap file is erroneous.
+     * @throws IOException
+     *             Thrown when an IO error occurs.
+     * @throws BadPacketException
+     *             Thrown when the packet is erroneous.
+     */
+    @BeforeClass
+    public static void setUp() throws IOException, BadPcapFileException, BadPacketException {
+        ByteBuffer bb = ByteBuffer.allocate(25);
+        bb.order(ByteOrder.BIG_ENDIAN);
+
+        // Version + IHL
+        bb.put((byte) 0x46);
+
+        // DSCP + ECN
+        bb.put((byte) 0x9A);
+
+        // Total length - this is randomly chosen so that we verify that the
+        // packet handles wrong total length.
+        bb.put((byte) 0x00);
+        bb.put((byte) 0xFF);
+
+        // Identification
+        bb.put((byte) 0x0F);
+        bb.put((byte) 0xF0);
+
+        // Flags + Fragment Offset
+        bb.put((byte) 0x1E);
+        bb.put((byte) 0xE1);
+
+        // Time to live
+        bb.put((byte) 0xA0);
+
+        // Protocol - Unknown
+        bb.put((byte) 0xFE);
+
+        // Header checksum - chosen randomly
+        bb.put((byte) 0x33);
+        bb.put((byte) 0x44);
+
+        // Source IP - 4 bytes
+        bb.put((byte) 192);
+        bb.put((byte) 168);
+        bb.put((byte) 1);
+        bb.put((byte) 0);
+
+        // Destination IP - 4 bytes
+        bb.put((byte) 193);
+        bb.put((byte) 169);
+        bb.put((byte) 2);
+        bb.put((byte) 1);
+
+        // Options - 4 bytes
+        bb.put((byte) 0xA2);
+        bb.put((byte) 0x56);
+        bb.put((byte) 0xA2);
+        bb.put((byte) 0x56);
+
+        // Payload - 1 byte
+        bb.put((byte) 0xA6);
+
+        bb.flip();
+
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile dummy = new PcapFile(trace.getPath())) {
+            IPv4Packet packet = new IPv4Packet(dummy, null, bb);
+            ITmfEventField[] fieldArray = generatePacketFields(packet);
+            fRegularField = new PcapEventField("Regular Field", EMPTY_STRING, fieldArray, packet);
+            fRootField = new PcapRootEventField(fieldArray, packet);
+        }
+
+    }
+
+    /**
+     * Method that tests the copy constructor.
+     */
+    @Test
+    public void copyConstructorTest() {
+        PcapEventField oldField = fRegularField;
+        if (oldField == null) {
+            fail("The field has not been initialized!");
+            return;
+        }
+        PcapEventField newField = new PcapEventField(oldField);
+        assertEquals(fRegularField.hashCode(), newField.hashCode());
+        assertEquals(fRegularField, newField);
+    }
+
+    /**
+     * Method that tests a standard field value request.
+     */
+    @Test
+    public void regularFieldValueRequestTest() {
+        ITmfEventField field = fRootField.getField("Internet Protocol Version 4");
+        if (field == null) {
+            fail("The field is null!");
+            return;
+        }
+
+        ITmfEventField subfield = field.getField("Source IP Address");
+        if (subfield == null) {
+            fail("The subfield is null!");
+            return;
+        }
+
+        String string = subfield.getValue().toString();
+        assertEquals("192.168.1.0", string);
+    }
+
+    /**
+     * Method that tests a custom field value request.
+     */
+    @Test
+    public void customFieldValueRequestTest() {
+        ITmfEventField field = fRootField.getField(":protocol:");
+        if (field == null) {
+            fail("The field is null!");
+            return;
+        }
+        String string = field.getValue().toString();
+        assertEquals("IPV4", string);
+
+        field = fRootField.getField(":packetsource:");
+        if (field == null) {
+            fail("The field is null!");
+            return;
+        }
+        string = field.getValue().toString();
+        assertEquals("192.168.1.0", string);
+
+        field = fRootField.getField(":packetdestination:");
+        if (field == null) {
+            fail("The field is null!");
+            return;
+        }
+        string = field.getValue().toString();
+        assertEquals("193.169.2.1", string);
+
+    }
+
+    /**
+     * Method that teststhe toString() method for a non-root field.
+     */
+    @Test
+    public void regularToStringTest() {
+        assertEquals("Src: 192.168.1.0 , Dst: 193.169.2.1", fRegularField.toString());
+    }
+
+    /**
+     * Method that teststhe toString() method for a root field.
+     */
+    @Test
+    public void rootToStringTest() {
+        assertEquals("192.168.1.0 > 193.169.2.1 Id=4080 Len=1", fRootField.toString());
+    }
+
+    // Convenience method
+    private static ITmfEventField[] generatePacketFields(Packet packet) {
+        List<ITmfEventField> fieldList = new ArrayList<>();
+        List<ITmfEventField> subfieldList = new ArrayList<>();
+        Packet localPacket = packet;
+
+        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 new ITmfEventField[0];
+        }
+        return fieldArray;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventTest.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/event/PcapEventTest.java
new file mode 100644 (file)
index 0000000..c9e80a4
--- /dev/null
@@ -0,0 +1,153 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.event;
+
+import static org.junit.Assert.*;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.pcap.core.tests.shared.PcapTestTrace;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.core.trace.TmfContext;
+import org.eclipse.tracecompass.tmf.core.trace.location.TmfLongLocation;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * JUnit that test the PcapEvent class.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventTest {
+
+    private static PcapEvent fEvent;
+    private static List<TmfPcapProtocol> fProtocolList;
+
+    /**
+     * Initialize the Packet and the EventField.
+     *
+     * @throws BadPcapFileException
+     *             Thrown when the pcap file is erroneous.
+     * @throws IOException
+     *             Thrown when an IO error occurs.
+     * @throws TmfTraceException
+     *             Thrown when the trace is not valid.
+     */
+    @BeforeClass
+    public static void setUp() throws IOException, BadPcapFileException, TmfTraceException {
+
+        PcapTestTrace trace = PcapTestTrace.MOSTLY_TCP;
+        assumeTrue(trace.exists());
+        try (PcapFile pcap = new PcapFile(trace.getPath());
+                PcapTrace pcapTrace = new PcapTrace();) {
+            pcapTrace.initTrace(null, trace.getPath().toString(), PcapEvent.class);
+            fEvent = pcapTrace.parseEvent(new TmfContext(new TmfLongLocation(3), 3));
+        }
+
+        // Initialize protocol list.
+        List<TmfPcapProtocol> list = new ArrayList<>();
+        list.add(TmfPcapProtocol.PCAP);
+        list.add(TmfPcapProtocol.ETHERNET_II);
+        list.add(TmfPcapProtocol.IPV4);
+        list.add(TmfPcapProtocol.TCP);
+        list.add(TmfPcapProtocol.UNKNOWN);
+        fProtocolList = ImmutableList.copyOf(list);
+    }
+
+    /**
+     * Method that tests getProtocols of PcapEvent.
+     */
+    @Test
+    public void getProtocolsTest() {
+        assertEquals(fProtocolList, fEvent.getProtocols());
+    }
+
+    /**
+     * Method that tests getMostEncapsulatedProtocol of PcapEvent.
+     */
+    @Test
+    public void getMostEncapsulatedProtocolTest() {
+        assertEquals(TmfPcapProtocol.TCP, fEvent.getMostEncapsulatedProtocol());
+    }
+
+    /**
+     * Method that tests getFields of PcapEvent.
+     */
+    @Test
+    public void getFieldsTest() {
+        Map<String, String> map = fEvent.getFields(TmfPcapProtocol.IPV4);
+        if (map == null) {
+            fail("getFieldsTest() failed because map is null!");
+            return;
+        }
+        assertEquals("145.254.160.237", map.get("Source IP Address"));
+    }
+
+    /**
+     * Method that tests getPayload of PcapEvent.
+     */
+    @Test
+    public void getPayloadTest() {
+        ByteBuffer bb = fEvent.getPayload(TmfPcapProtocol.TCP);
+        if (bb == null) {
+            fail("getPayloadTest() failed because bb is null!");
+            return;
+        }
+        assertEquals((byte) 0x47, bb.get());
+    }
+
+    /**
+     * Method that tests getSourceEndpoint of PcapEvent.
+     */
+    @Test
+    public void getSourceEndpointTest() {
+        assertEquals("00:00:01:00:00:00/145.254.160.237/3372", fEvent.getSourceEndpoint(TmfPcapProtocol.TCP));
+    }
+
+    /**
+     * Method that tests getDestinationEndpointTest of PcapEvent.
+     */
+    @Test
+    public void getDestinationEndpointTest() {
+        assertEquals("fe:ff:20:00:01:00", fEvent.getDestinationEndpoint(TmfPcapProtocol.ETHERNET_II));
+    }
+
+    /**
+     * Method that tests toString() of PcapEvent.
+     */
+    @Test
+    public void toStringTest() {
+        assertEquals("3372 > 80 [ACK, PSH] Seq=951057940 Ack=290218380 Len=20", fEvent.toString());
+    }
+
+    /**
+     * Method that tests toString(protocol) of PcapEvent.
+     */
+    @Test
+    public void toStringAtSpecificProtocolTest() {
+        assertEquals("Src: 145.254.160.237 , Dst: 65.208.228.223", fEvent.toString(TmfPcapProtocol.IPV4));
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/AllTests.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/AllTests.java
new file mode 100644 (file)
index 0000000..f359830
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.trace;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Pcap trace test suite
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+        PcapTraceTest.class
+})
+public class AllTests {
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/PcapTraceTest.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/src/org/eclipse/tracecompass/tmf/pcap/core/tests/trace/PcapTraceTest.java
new file mode 100644 (file)
index 0000000..cce04a1
--- /dev/null
@@ -0,0 +1,307 @@
+/*******************************************************************************
+ * 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.tracecompass.tmf.pcap.core.tests.trace;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.core.signal.TmfEndSynchSignal;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
+import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
+import org.eclipse.tracecompass.tmf.core.trace.location.TmfLongLocation;
+import org.eclipse.tracecompass.tmf.pcap.core.tests.shared.PcapTmfTestTrace;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * JUnit that test the PcapTrace class.
+ *
+ * @author Vincent Perot
+ */
+public class PcapTraceTest {
+
+    private static final PcapTmfTestTrace TEST_TRACE = PcapTmfTestTrace.MOSTLY_TCP;
+
+    private PcapTrace fFixture;
+
+    /**
+     * Perform pre-test initialization.
+     *
+     * @throws TmfTraceException
+     *             If the test trace is not found
+     */
+    @Before
+    public void setUp() throws TmfTraceException {
+        assumeTrue(TEST_TRACE.exists());
+        fFixture = new PcapTrace();
+        fFixture.initTrace((IResource) null, TEST_TRACE.getPath(), PcapEvent.class);
+    }
+
+    /**
+     * Perform post-test clean-up.
+     */
+    @After
+    public void tearDown() {
+        if (fFixture != null) {
+            fFixture.dispose();
+        }
+    }
+
+    /**
+     * Run the PcapTrace() constructor test.
+     */
+    @Test
+    public void testPcapTrace() {
+        try (PcapTrace result = new PcapTrace();) {
+            assertNotNull(result);
+            assertEquals(1000, result.getCacheSize());
+            assertEquals(0L, result.getNbEvents());
+            assertEquals(0L, result.getStreamingInterval());
+            assertNull(result.getResource());
+            assertNull(result.getType());
+        }
+    }
+
+    /**
+     * Test the parseEvent() method
+     */
+    @Test
+    public void testParseEvent() {
+        ITmfContext ctx = fFixture.seekEvent(0);
+        fFixture.getNext(ctx);
+        PcapEvent event = fFixture.parseEvent(ctx);
+        assertNotNull(event);
+    }
+
+    /**
+     * Run the void broadcast(TmfSignal) method test.
+     */
+    @Test
+    public void testBroadcast() {
+        TmfSignal signal = new TmfEndSynchSignal(1);
+        fFixture.broadcast(signal);
+    }
+
+    /**
+     * Run the void dispose() method test.
+     */
+    @Test
+    public void testClose() {
+        try (PcapTrace emptyFixture = new PcapTrace();) {
+        }
+    }
+
+    /**
+     * Run the int getCacheSize() method test.
+     */
+    @Test
+    public void testGetCacheSize() {
+        try (PcapTrace emptyFixture = new PcapTrace();) {
+            int result = emptyFixture.getCacheSize();
+            assertEquals(1000, result);
+        }
+    }
+
+    /**
+     * Run the ITmfLocation<Comparable> getCurrentLocation() method test.
+     */
+    @Test
+    public void testGetCurrentLocation() {
+        TmfLongLocation result = (TmfLongLocation) fFixture.getCurrentLocation();
+        assertEquals(new TmfLongLocation(0), result);
+    }
+
+    /**
+     * Test the seekEvent() method with a null location.
+     */
+    @Test
+    public void testSeekEventLoc_null() {
+        TmfLongLocation loc = null;
+        fFixture.seekEvent(loc);
+        assertNotNull(fFixture);
+    }
+
+    /**
+     * Test the seekEvent() method with a normal location.
+     */
+    @Test
+    public void testSeekEventLoc_normal() {
+        TmfLongLocation loc = new TmfLongLocation(3L);
+        fFixture.seekEvent(loc);
+        assertNotNull(fFixture);
+    }
+
+    /**
+     * Run the ITmfTimestamp getEndTime() method test.
+     */
+    @Test
+    public void testGetEndTime() {
+        ITmfTimestamp result = fFixture.getEndTime();
+        assertNotNull(result);
+    }
+
+    /**
+     * Test the {@link PcapTrace#getEventType()} method.
+     */
+    @Test
+    public void testGetEventType() {
+        Class<?> result = fFixture.getEventType();
+        assertNotNull(result);
+        assertEquals(PcapEvent.class, result);
+    }
+
+    /**
+     * Run the double getLocationRatio(ITmfLocation<?>) method test.
+     */
+    @Test
+    public void testGetLocationRatio() {
+        TmfLongLocation location = new TmfLongLocation(20L);
+        double result = fFixture.getLocationRatio(location);
+
+        assertEquals(20.0 / 43.0, result, 0.01);
+    }
+
+    /**
+     * Run the String getName() method test.
+     */
+    @Test
+    public void testGetName() {
+        String result = fFixture.getName();
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the getTraceProperties() method test.
+     */
+    @Test
+    public void testGetTraceProperties() {
+        int result = fFixture.getTraceProperties().size();
+        assertEquals(6, result);
+    }
+
+    /**
+     * Run the long getNbEvents() method test.
+     */
+    @Test
+    public void testGetNbEvents() {
+        long result = fFixture.getNbEvents();
+        assertEquals(0, result);
+    }
+
+    /**
+     * Run the String getPath() method test.
+     */
+    @Test
+    public void testGetPath() {
+        String result = fFixture.getPath();
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the IResource getResource() method test.
+     */
+    @Test
+    public void testGetResource() {
+        IResource result = fFixture.getResource();
+        assertNull(result);
+    }
+
+    /**
+     * Run the ITmfTimestamp getStartTime() method test.
+     */
+    @Test
+    public void testGetStartTime() {
+        ITmfTimestamp result = fFixture.getStartTime();
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the long getStreamingInterval() method test.
+     */
+    @Test
+    public void testGetStreamingInterval() {
+        long result = fFixture.getStreamingInterval();
+        assertEquals(0L, result);
+    }
+
+    /**
+     * Run the TmfTimeRange getTimeRange() method test.
+     */
+    @Test
+    public void testGetTimeRange() {
+        TmfTimeRange result = fFixture.getTimeRange();
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the ITmfContext seekEvent(double) method test.
+     */
+    @Test
+    public void testSeekEvent_ratio() {
+        double ratio = 21.0 / 43.0;
+        ITmfContext result = fFixture.seekEvent(ratio);
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the ITmfContext seekEvent(long) method test.
+     */
+    @Test
+    public void testSeekEvent_rank() {
+        long rank = 1L;
+        ITmfContext result = fFixture.seekEvent(rank);
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the ITmfContext seekEvent(ITmfLocation<?>) method test.
+     */
+    @Test
+    public void testSeekEvent_location() {
+        TmfLongLocation pcapLocation = new TmfLongLocation(10L);
+        ITmfContext result = fFixture.seekEvent(pcapLocation);
+        assertNotNull(result);
+    }
+
+    /**
+     * Run the boolean validate(IProject,String) method test.
+     */
+    @Test
+    public void testValidate() {
+        IProject project = null;
+        IStatus result = fFixture.validate(project, TEST_TRACE.getPath());
+        assertTrue(result.isOK());
+    }
+
+    /**
+     * Run the String getHostId() method test
+     */
+    @Test
+    public void getSource() {
+        String a = fFixture.getHostId();
+        assertEquals("mostlyTCP.pcap", a);
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/stubs/org/eclipse/tracecompass/tmf/pcap/core/tests/stubs/PcapTmfTraceStub.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core.tests/stubs/org/eclipse/tracecompass/tmf/pcap/core/tests/stubs/PcapTmfTraceStub.java
new file mode 100644 (file)
index 0000000..808d148
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Ã‰cole Polytechnique de Montréal
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Vincent Perot - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.pcap.core.tests.stubs;
+
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
+
+/**
+ * Dummy test pcap trace
+ */
+public class PcapTmfTraceStub extends PcapTrace {
+
+    /**
+     * Simulate trace opening, to be called by tests who need an actively opened
+     * trace
+     */
+    public void openTrace() {
+        TmfSignalManager.dispatchSignal(new TmfTraceOpenedSignal(this, this, null));
+        selectTrace();
+    }
+
+    /**
+     * Simulate selecting the trace
+     */
+    public void selectTrace() {
+        TmfSignalManager.dispatchSignal(new TmfTraceSelectedSignal(this, this));
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/.classpath b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.project b/pcap/org.eclipse.tracecompass.tmf.pcap.core/.project
new file mode 100644 (file)
index 0000000..a2de098
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..a2b5e6b
--- /dev/null
@@ -0,0 +1,405 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+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=error
+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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.api.tools.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/.settings/org.eclipse.pde.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/META-INF/MANIFEST.MF b/pcap/org.eclipse.tracecompass.tmf.pcap.core/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..e58e062
--- /dev/null
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.core;singleton:=true
+Bundle-Activator: org.eclipse.tracecompass.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.tracecompass.common.core,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.pcap.core
+Export-Package: org.eclipse.tracecompass.internal.tmf.pcap.core;x-internal:=true,
+ org.eclipse.tracecompass.internal.tmf.pcap.core.analysis;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
+ org.eclipse.tracecompass.internal.tmf.pcap.core.event;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
+ org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
+ org.eclipse.tracecompass.internal.tmf.pcap.core.protocol;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui",
+ org.eclipse.tracecompass.internal.tmf.pcap.core.signal;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui",
+ org.eclipse.tracecompass.internal.tmf.pcap.core.trace;x-friends:="org.eclipse.tracecompass.tmf.pcap.core.tests,org.eclipse.tracecompass.tmf.pcap.ui,org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests",
+ org.eclipse.tracecompass.internal.tmf.pcap.core.util;x-internal:=true
+Import-Package: com.google.common.collect
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/about.html b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/build.properties b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/plugin.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core/plugin.properties
new file mode 100644 (file)
index 0000000..6df8477
--- /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
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+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/pcap/org.eclipse.tracecompass.tmf.pcap.core/plugin.xml b/pcap/org.eclipse.tracecompass.tmf.pcap.core/plugin.xml
new file mode 100644 (file)
index 0000000..227adf5
--- /dev/null
@@ -0,0 +1,33 @@
+<?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.tracecompass.tmf.core.event.TmfEvent"
+            id="org.eclipse.linuxtools.tmf.pcap.core.pcaptrace"
+            isDirectory="false"
+            name="Pcap Trace"
+            trace_type="org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace">
+      </type>
+   </extension>
+   <extension
+         point="org.eclipse.linuxtools.tmf.core.analysis">
+      <module
+            analysis_module="org.eclipse.tracecompass.internal.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.tracecompass.internal.tmf.pcap.core.trace.PcapTrace">
+         </tracetype>
+      </module>
+   </extension>
+
+</plugin>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/pom.xml b/pcap/org.eclipse.tracecompass.tmf.pcap.core/pom.xml
new file mode 100644 (file)
index 0000000..26d3516
--- /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>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.tmf.pcap.core</artifactId>
+  <version>1.0.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.tracecompass</groupId>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/Activator.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/Activator.java
new file mode 100644 (file)
index 0000000..54568bc
--- /dev/null
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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.tracecompass.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.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/StreamListAnalysis.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/StreamListAnalysis.java
new file mode 100644 (file)
index 0000000..7978bda
--- /dev/null
@@ -0,0 +1,167 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.tmf.pcap.core.analysis;
+
+import java.util.HashMap;
+import java.util.List;
+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.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStreamBuilder;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException;
+import org.eclipse.tracecompass.tmf.core.request.ITmfEventRequest;
+import org.eclipse.tracecompass.tmf.core.request.TmfEventRequest;
+import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment;
+
+/**
+ * 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<TmfPcapProtocol, TmfPacketStreamBuilder> fBuilders;
+
+    /**
+     * The default constructor. It initializes all variables.
+     */
+    public StreamListAnalysis() {
+        super();
+        fBuilders = new HashMap<>();
+        for (TmfPcapProtocol protocol : TmfPcapProtocol.values()) {
+            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;
+        List<ITmfTrace> traces = experiment.getTraces();
+        for (ITmfTrace expTrace : traces) {
+            if (expTrace instanceof PcapTrace) {
+                return true;
+            }
+        }
+
+        // No Pcap :(
+        return false;
+    }
+
+    @Override
+    protected boolean executeAnalysis(@Nullable IProgressMonitor monitor) throws TmfAnalysisException {
+        IProgressMonitor mon = (monitor == null ? new NullProgressMonitor() : monitor);
+        ITmfTrace trace = getTrace();
+        if (trace == null) {
+            /* This analysis was cancelled in the meantime */
+            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 (TmfPcapProtocol protocol : fBuilders.keySet()) {
+                    fBuilders.get(protocol).addEventToStream(event);
+                }
+
+            }
+        };
+        trace.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(TmfPcapProtocol 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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/analysis/package-info.java
new file mode 100644 (file)
index 0000000..d6732b3
--- /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.tracecompass.internal.tmf.pcap.core.analysis;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/Messages.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/Messages.java
new file mode 100644 (file)
index 0000000..f9ce624
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.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.tracecompass.internal.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEvent.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEvent.java
new file mode 100644 (file)
index 0000000..8e9c1fc
--- /dev/null
@@ -0,0 +1,260 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.tmf.pcap.core.event;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.nio.ByteBuffer;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.util.ProtocolConversion;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
+import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+
+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 final String fSource;
+    private final String fReference;
+
+    /**
+     * Lazy-loaded field representing all the protocols in this event
+     */
+    private transient @Nullable Collection<TmfPcapProtocol> fProtocols;
+
+    /**
+     * 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, type, content);
+        fPacket = packet;
+        fSource = source;
+        fReference = reference;
+    }
+
+    /**
+     * Return this event's source.
+     *
+     * @return The event's source
+     */
+    public String getSource() {
+        return fSource;
+    }
+
+    /**
+     * Return this event's reference
+     *
+     * @return The event's reference
+     */
+    public String getReference() {
+        return fReference;
+    }
+
+    /**
+     * 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(TmfPcapProtocol protocol) {
+        PcapProtocol 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(TmfPcapProtocol protocol) {
+        PcapProtocol 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(TmfPcapProtocol protocol) {
+        PcapProtocol 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(TmfPcapProtocol protocol) {
+        PcapProtocol 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 TmfPcapProtocol getMostEncapsulatedProtocol() {
+        return ProtocolConversion.wrap(fPacket.getMostEcapsulatedPacket().getProtocol());
+    }
+
+    /**
+     * Method that returns all the protocols in this PcapEvent.
+     *
+     * @return A list containing all the TmfProtocol.
+     */
+    public Collection<TmfPcapProtocol> getProtocols() {
+        if (fProtocols != null) {
+            return fProtocols;
+        }
+        ImmutableList.Builder<TmfPcapProtocol> builder = new ImmutableList.Builder<>();
+        Packet packet = fPacket;
+
+        // Go to start.
+        while (packet != null && packet.getParentPacket() != null) {
+            packet = packet.getParentPacket();
+        }
+
+        if (packet == null) {
+            fProtocols = checkNotNull(Collections.EMPTY_LIST);
+            return fProtocols;
+        }
+        // Go through all the packets and add them to list.
+        builder.add(ProtocolConversion.wrap(packet.getProtocol()));
+        while (packet != null && packet.getChildPacket() != null) {
+            packet = packet.getChildPacket();
+            if (packet != null) {
+                builder.add(ProtocolConversion.wrap(packet.getProtocol()));
+            }
+        }
+
+        fProtocols = checkNotNull(builder.build());
+        return fProtocols;
+    }
+
+    /**
+     * 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(TmfPcapProtocol protocol) {
+        PcapProtocol p = ProtocolConversion.unwrap(protocol);
+        Packet packet = fPacket.getPacket(p);
+        if (packet == null) {
+            return EMPTY_STRING;
+        }
+        return packet.getLocalSummaryString();
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventField.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventField.java
new file mode 100644 (file)
index 0000000..daa3fad
--- /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.tracecompass.internal.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventType.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapEventType.java
new file mode 100644 (file)
index 0000000..8c040d7
--- /dev/null
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.common.core.NonNullUtils;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
+
+/**
+ * Class that represents the type of a PcapEvent.
+ *
+ * @author Vincent Perot
+ */
+public class PcapEventType extends TmfEventType {
+
+    /**
+     * The default Pcap Type ID for a PcapEvent
+     */
+    public static final String DEFAULT_PCAP_TYPE_ID = NonNullUtils.nullToEmptyString(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(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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapRootEventField.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/PcapRootEventField.java
new file mode 100644 (file)
index 0000000..795a70d
--- /dev/null
@@ -0,0 +1,89 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Patrick Tasse - Remove getSubField
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.core.event;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.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 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(@Nullable ITmfEventField[] fields, Packet packet) {
+        super(ITmfEventField.ROOT_FIELD_ID, null, 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(String... path) {
+        if (path.length != 1) {
+            return super.getField(path);
+        }
+        switch (path[0]) {
+        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(path);
+        }
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStream.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStream.java
new file mode 100644 (file)
index 0000000..b4809ea
--- /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.tracecompass.internal.tmf.pcap.core.event;
+
+import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStream;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.util.ProtocolConversion;
+import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
+
+/**
+ * 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 TmfPcapProtocol 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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStreamBuilder.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/TmfPacketStreamBuilder.java
new file mode 100644 (file)
index 0000000..07eb86f
--- /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.tracecompass.internal.tmf.pcap.core.event;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStream;
+import org.eclipse.tracecompass.internal.pcap.core.stream.PacketStreamBuilder;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.util.ProtocolConversion;
+
+/**
+ * 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(TmfPcapProtocol 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(PcapProtocol.PCAP);
+        if (!(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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/Messages.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/Messages.java
new file mode 100644 (file)
index 0000000..583e1ad
--- /dev/null
@@ -0,0 +1,45 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.tmf.pcap.core.event.aspect;
+
+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.tracecompass.internal.tmf.pcap.core.event.aspect.messages"; //$NON-NLS-1$
+
+    public static @Nullable String PcapAspectName_Destination;
+    public static @Nullable String PcapAspectName_Protocol;
+    public static @Nullable String PcapAspectName_Reference;
+    public static @Nullable String PcapAspectName_Source;
+
+    static {
+        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+    }
+
+    private Messages() {
+    }
+
+    /**
+     * Helper method to expose externalized strings as non-null objects.
+     */
+    static String getMessage(@Nullable String msg) {
+        if (msg == null) {
+            return ""; //$NON-NLS-1$
+        }
+        return msg;
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapDestinationAspect.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapDestinationAspect.java
new file mode 100644 (file)
index 0000000..ee73270
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Alexandre Montplaisir - Update to new ITmfEventAspect API
+ *   Patrick Tasse - Make pcap aspects singletons
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+
+/**
+ * The "packet destination" aspect for pcap events.
+ *
+ * @author Alexandre Montplaisir
+ */
+public class PcapDestinationAspect implements ITmfEventAspect {
+
+    /** Singleton instance */
+    public static final PcapDestinationAspect INSTANCE = new PcapDestinationAspect();
+
+    private PcapDestinationAspect() {
+    }
+
+    @Override
+    public String getName() {
+        return Messages.getMessage(Messages.PcapAspectName_Destination);
+    }
+
+    @Override
+    public String getHelpText() {
+        return EMPTY_STRING;
+    }
+
+    @Override
+    public @Nullable String resolve(ITmfEvent event) {
+        if (!(event instanceof PcapEvent)) {
+            return null;
+        }
+        PcapEvent pcapEvent = (PcapEvent) event;
+        TmfPcapProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
+
+        return pcapEvent.getDestinationEndpoint(protocol);
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapProtocolAspect.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapProtocolAspect.java
new file mode 100644 (file)
index 0000000..31bf56a
--- /dev/null
@@ -0,0 +1,55 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Alexandre Montplaisir - Update to new ITmfEventAspect API
+ *   Patrick Tasse - Make pcap aspects singletons
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+
+/**
+ * The "packet protocol" aspect for pcap events
+ *
+ * @author Alexandre Montplaisir
+ */
+public class PcapProtocolAspect implements ITmfEventAspect {
+
+    /** Singleton instance */
+    public static final PcapProtocolAspect INSTANCE = new PcapProtocolAspect();
+
+    private PcapProtocolAspect() {
+    }
+
+    @Override
+    public String getName() {
+        return Messages.getMessage(Messages.PcapAspectName_Protocol);
+    }
+
+    @Override
+    public String getHelpText() {
+        return EMPTY_STRING;
+    }
+
+    @Override
+    public @Nullable String resolve(ITmfEvent event) {
+        if (!(event instanceof PcapEvent)) {
+            return null;
+        }
+        PcapEvent pcapEvent = (PcapEvent) event;
+        TmfPcapProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
+        return protocol.getShortName().toUpperCase();
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapReferenceAspect.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapReferenceAspect.java
new file mode 100644 (file)
index 0000000..0432358
--- /dev/null
@@ -0,0 +1,52 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Alexandre Montplaisir - Update to new ITmfEventAspect API
+ *   Patrick Tasse - Make pcap aspects singletons
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+
+/**
+ * The "packet reference" aspect for pcap events
+ *
+ * @author Alexandre Montplaisir
+ */
+public class PcapReferenceAspect implements ITmfEventAspect {
+
+    /** Singleton instance */
+    public static final PcapReferenceAspect INSTANCE = new PcapReferenceAspect();
+
+    private PcapReferenceAspect() {
+    }
+
+    @Override
+    public String getName() {
+        return Messages.getMessage(Messages.PcapAspectName_Reference);
+    }
+
+    @Override
+    public String getHelpText() {
+        return EMPTY_STRING;
+    }
+
+    @Override
+    public @Nullable String resolve(ITmfEvent event) {
+        if (!(event instanceof PcapEvent)) {
+            return null;
+        }
+        return ((PcapEvent) event).getReference();
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapSourceAspect.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/PcapSourceAspect.java
new file mode 100644 (file)
index 0000000..7732d5f
--- /dev/null
@@ -0,0 +1,59 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Alexandre Montplaisir - Update to new ITmfEventAspect API
+ *   Patrick Tasse - Make pcap aspects singletons
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+
+/**
+ * The packet source aspect for pcap events.
+ *
+ * This normally represents the source address of the packet, and the format
+ * depends on the protocol (e.g. source IP address, source port, etc.)
+ *
+ * @author Alexandre Montplaisir
+ */
+public class PcapSourceAspect implements ITmfEventAspect {
+
+    /** Singleton instance */
+    public static final PcapSourceAspect INSTANCE = new PcapSourceAspect();
+
+    private PcapSourceAspect() {
+    }
+
+    @Override
+    public String getName() {
+        return Messages.getMessage(Messages.PcapAspectName_Source);
+    }
+
+    @Override
+    public String getHelpText() {
+        return EMPTY_STRING;
+    }
+
+    @Override
+    public @Nullable String resolve(ITmfEvent event) {
+        if (!(event instanceof PcapEvent)) {
+            return null;
+        }
+        PcapEvent pcapEvent = (PcapEvent) event;
+        TmfPcapProtocol protocol = pcapEvent.getMostEncapsulatedProtocol();
+
+        return pcapEvent.getSourceEndpoint(protocol);
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/messages.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/messages.properties
new file mode 100644 (file)
index 0000000..21ab85b
--- /dev/null
@@ -0,0 +1,16 @@
+###############################################################################
+# 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
+###############################################################################
+
+PcapAspectName_Destination=Destination
+PcapAspectName_Protocol=Protocol
+PcapAspectName_Reference=Reference
+PcapAspectName_Source=Source
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/aspect/package-info.java
new file mode 100644 (file)
index 0000000..e17f94d
--- /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.tracecompass.internal.tmf.pcap.core.event.aspect;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/messages.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/event/package-info.java
new file mode 100644 (file)
index 0000000..e50a3db
--- /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.tracecompass.internal.tmf.pcap.core.event;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/package-info.java
new file mode 100644 (file)
index 0000000..3216bff
--- /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.tracecompass.internal.tmf.pcap.core;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/TmfPcapProtocol.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/TmfPcapProtocol.java
new file mode 100644 (file)
index 0000000..1301020
--- /dev/null
@@ -0,0 +1,108 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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.tracecompass.internal.tmf.pcap.core.protocol;
+
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+
+/**
+ * Enumeration as a TMF wrapper of the different Protocols. To register a
+ * protocol in TMF, it must be present in {@link PcapProtocol} and must have the
+ * same name.
+ *
+ * @author Vincent Perot
+ */
+public enum TmfPcapProtocol {
+
+    // Layer 0
+    /**
+     * The Pcap Protocol is not a real protocol but is used as an helper to
+     * generate Pcap packets.
+     */
+    PCAP(PcapProtocol.PCAP),
+
+    // Layer 1
+    // Should always be empty.
+
+    // Layer 2
+    /**
+     * The description of the Ethernet II Protocol.
+     */
+    ETHERNET_II(PcapProtocol.ETHERNET_II),
+
+    // Layer 3
+    /**
+     * The description of the Internet Protocol Version 4.
+     */
+    IPV4(PcapProtocol.IPV4),
+
+    // Layer 4
+    /**
+     * The description of the Transmission Control Protocol.
+     */
+    TCP(PcapProtocol.TCP),
+    /**
+     * The description of the User Datagram Protocol.
+     */
+    UDP(PcapProtocol.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(PcapProtocol.UNKNOWN);
+
+    private final String fName;
+    private final String fShortName;
+    private final boolean fSupportsStream;
+
+    private TmfPcapProtocol(PcapProtocol pcapProto) {
+        fName = pcapProto.getName();
+        fShortName = pcapProto.getShortName();
+        fSupportsStream = pcapProto.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 that indicates if the protocol supports streams.
+     *
+     * @return Whether the protocol supports streams or not.
+     */
+    public boolean supportsStream() {
+        return fSupportsStream;
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/protocol/package-info.java
new file mode 100644 (file)
index 0000000..1e64e74
--- /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.tracecompass.internal.tmf.pcap.core.protocol;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/TmfPacketStreamSelectedSignal.java
new file mode 100644 (file)
index 0000000..a1c142f
--- /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.tracecompass.internal.tmf.pcap.core.signal;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStream;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
+
+/**
+ * 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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/signal/package-info.java
new file mode 100644 (file)
index 0000000..3433b23
--- /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.tracecompass.internal.tmf.pcap.core.signal;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/Messages.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/Messages.java
new file mode 100644 (file)
index 0000000..2b1b844
--- /dev/null
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.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.tracecompass.internal.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/PcapTrace.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/PcapTrace.java
new file mode 100644 (file)
index 0000000..42e30d9
--- /dev/null
@@ -0,0 +1,273 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Alexandre Montplaisir - Update to new ITmfEventAspect API
+ *   Patrick Tasse - Make pcap aspects singletons
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.core.trace;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.io.IOException;
+import java.nio.channels.ClosedChannelException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Collection;
+import java.util.Collections;
+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.Nullable;
+import org.eclipse.tracecompass.internal.pcap.core.packet.BadPacketException;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.BadPcapFileException;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.LinkTypeHelper;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.Activator;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapDestinationAspect;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapProtocolAspect;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapReferenceAspect;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapSourceAspect;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.util.PcapEventFactory;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+import org.eclipse.tracecompass.tmf.core.exceptions.TmfTraceException;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTraceProperties;
+import org.eclipse.tracecompass.tmf.core.trace.TmfContext;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TraceValidationStatus;
+import org.eclipse.tracecompass.tmf.core.trace.location.ITmfLocation;
+import org.eclipse.tracecompass.tmf.core.trace.location.TmfLongLocation;
+
+import com.google.common.collect.ImmutableList;
+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 ITmfTraceProperties, AutoCloseable {
+
+    /** pcap trace type id as defined in plugin.xml */
+    public static final String TRACE_TYPE_ID = "org.eclipse.linuxtools.tmf.pcap.core.pcaptrace"; //$NON-NLS-1$
+
+    private static final Collection<ITmfEventAspect> PCAP_ASPECTS =
+            checkNotNull(ImmutableList.of(
+                    ITmfEventAspect.BaseAspects.TIMESTAMP,
+                    PcapSourceAspect.INSTANCE,
+                    PcapDestinationAspect.INSTANCE,
+                    PcapReferenceAspect.INSTANCE,
+                    PcapProtocolAspect.INSTANCE,
+                    ITmfEventAspect.BaseAspects.CONTENTS
+                    ));
+
+    private static final String EMPTY_STRING = ""; //$NON-NLS-1$
+    private static final int CONFIDENCE = 50;
+    private @Nullable PcapFile fPcapFile;
+    private @Nullable Map<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$
+        }
+        Path filePath = checkNotNull(Paths.get(path));
+        try {
+            fPcapFile = new PcapFile(filePath);
+        } catch (IOException | BadPcapFileException e) {
+            throw new TmfTraceException(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public Iterable<ITmfEventAspect> getEventAspects() {
+        return PCAP_ASPECTS;
+    }
+
+    @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);
+        }
+        Path filePath = checkNotNull(Paths.get(path));
+        try (PcapFile file = new PcapFile(filePath)) {
+        } 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 checkNotNull(Collections.<String, String> emptyMap());
+        }
+
+        Map<String, String> properties = fTraceProperties;
+        if (properties == null) {
+            ImmutableMap.Builder<String, String> builder = ImmutableMap.<String, String> builder();
+            builder.put(Messages.PcapTrace_Version, String.format("%d%c%d", pcap.getMajorVersion(), '.', pcap.getMinorVersion())); //$NON-NLS-1$
+            builder.put(Messages.PcapTrace_TimeZoneCorrection, pcap.getTimeZoneCorrection() + " s"); //$NON-NLS-1$
+            builder.put(Messages.PcapTrace_TimestampAccuracy, String.valueOf(pcap.getTimeAccuracy()));
+            builder.put(Messages.PcapTrace_MaxSnapLength, pcap.getSnapLength() + " bytes"); //$NON-NLS-1$
+            builder.put(Messages.PcapTrace_LinkLayerHeaderType, LinkTypeHelper.toString((int) pcap.getDataLinkType()) + " (" + pcap.getDataLinkType() + ")"); //$NON-NLS-1$ //$NON-NLS-2$
+            builder.put(Messages.PcapTrace_FileEndianness, pcap.getByteOrder().toString());
+
+            return checkNotNull(builder.build());
+
+        }
+
+        return properties;
+    }
+
+    @Override
+    public void close() {
+        dispose();
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/messages.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/trace/package-info.java
new file mode 100644 (file)
index 0000000..5c651a0
--- /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.tracecompass.internal.tmf.pcap.core.trace;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/Messages.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/Messages.java
new file mode 100644 (file)
index 0000000..50bc090
--- /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.tracecompass.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.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/PcapEventFactory.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/PcapEventFactory.java
new file mode 100644 (file)
index 0000000..b50522c
--- /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.tracecompass.internal.tmf.pcap.core.util;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import java.nio.file.Path;
+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.tracecompass.internal.pcap.core.packet.Packet;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.pcap.core.protocol.pcap.PcapPacket;
+import org.eclipse.tracecompass.internal.pcap.core.trace.PcapFile;
+import org.eclipse.tracecompass.internal.pcap.core.util.LinkTypeHelper;
+import org.eclipse.tracecompass.internal.pcap.core.util.PcapTimestampScale;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEvent;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEventField;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapEventType;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.PcapRootEventField;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.TmfEventField;
+import org.eclipse.tracecompass.tmf.core.event.TmfEventType;
+import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
+
+/**
+ * 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<PcapProtocol, 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:
+            long us = trace.getTimestampTransform().transform(timestamp * 1000) / 1000;
+            tmfTimestamp = new TmfTimestamp(us, ITmfTimestamp.MICROSECOND_SCALE);
+            break;
+        case NANOSECOND:
+            long ns = trace.getTimestampTransform().transform(timestamp);
+            tmfTimestamp = new TmfTimestamp(ns, ITmfTimestamp.NANOSECOND_SCALE);
+            break;
+        default:
+            throw new IllegalArgumentException("The timestamp precision is not valid!"); //$NON-NLS-1$
+        }
+        Path filePath = pcap.getPath().getFileName();
+        @NonNull String fileName = (filePath == null ? EMPTY_STRING : checkNotNull(filePath.toString()));
+
+        String dataLink = Messages.PcapEventFactory_LinkType + ':' + LinkTypeHelper.toString((int) pcapPacket.getPcapFile().getDataLinkType());
+
+        ITmfEventField[] fields = generatePacketFields(pcapPacket);
+        ITmfEventField field = new PcapRootEventField(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(PcapProtocol.PCAP);
+
+        while (localPacket != null) {
+            subfieldList.clear();
+            for (Map.Entry<String, String> entry : localPacket.getFields().entrySet()) {
+                String key = entry.getKey();
+                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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/ProtocolConversion.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/ProtocolConversion.java
new file mode 100644 (file)
index 0000000..4a2e01a
--- /dev/null
@@ -0,0 +1,80 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.tmf.pcap.core.util;
+
+import org.eclipse.tracecompass.internal.pcap.core.protocol.PcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+
+/**
+ * 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 final class ProtocolConversion {
+
+    private ProtocolConversion() {}
+
+    /**
+     * Wrap a {@link PcapProtocol} into a {@link TmfPcapProtocol}.
+     *
+     * @param protocol
+     *            The {@link PcapProtocol} to match
+     * @return The TmfProtocol
+     */
+    public static TmfPcapProtocol wrap(PcapProtocol protocol) {
+        switch (protocol) {
+        case ETHERNET_II:
+            return TmfPcapProtocol.ETHERNET_II;
+        case IPV4:
+            return TmfPcapProtocol.IPV4;
+        case PCAP:
+            return TmfPcapProtocol.PCAP;
+        case TCP:
+            return TmfPcapProtocol.TCP;
+        case UDP:
+            return TmfPcapProtocol.UDP;
+        case UNKNOWN:
+            return TmfPcapProtocol.UNKNOWN;
+        default:
+            throw new IllegalArgumentException();
+        }
+    }
+
+    /**
+     * Unwrap a {@link TmfPcapProtocol} from a {@link PcapProtocol}.
+     *
+     * @param protocol
+     *            The TmfProtocol
+     * @return The Protocol
+     */
+    public static PcapProtocol unwrap(TmfPcapProtocol protocol) {
+        switch (protocol) {
+        case ETHERNET_II:
+            return PcapProtocol.ETHERNET_II;
+        case IPV4:
+            return PcapProtocol.IPV4;
+        case PCAP:
+            return PcapProtocol.PCAP;
+        case TCP:
+            return PcapProtocol.TCP;
+        case UDP:
+            return PcapProtocol.UDP;
+        case UNKNOWN:
+            return PcapProtocol.UNKNOWN;
+        default:
+            throw new IllegalArgumentException();
+        }
+    }
+
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/messages.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/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/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.core/src/org/eclipse/tracecompass/internal/tmf/pcap/core/util/package-info.java
new file mode 100644 (file)
index 0000000..44a29fe
--- /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.tracecompass.internal.tmf.pcap.core.util;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.classpath b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.classpath
new file mode 100644 (file)
index 0000000..3bc2475
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+       <classpathentry kind="src" path="src"/>
+       <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+       <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+       <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.gitignore b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.gitignore
new file mode 100644 (file)
index 0000000..750e145
--- /dev/null
@@ -0,0 +1 @@
+screenshots/
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.project b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.project
new file mode 100644 (file)
index 0000000..b43ed70
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.jdt.core.javabuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.ManifestBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.SchemaBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.jdt.core.javanature</nature>
+               <nature>org.eclipse.pde.PluginNature</nature>
+               <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+       </natures>
+</projectDescription>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..0409c61
--- /dev/null
@@ -0,0 +1,403 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+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=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=error
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.7
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=250
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=space
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.api.tools.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/.settings/org.eclipse.pde.prefs
new file mode 100644 (file)
index 0000000..62cfa90
--- /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=2
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+eclipse.preferences.version=1
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/META-INF/MANIFEST.MF b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..eb39bfa
--- /dev/null
@@ -0,0 +1,25 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;singleton:=true
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.7
+Export-Package: org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests
+Require-Bundle: org.apache.log4j,
+ org.eclipse.core.resources,
+ org.eclipse.core.runtime,
+ org.eclipse.swtbot.eclipse.finder,
+ org.eclipse.swtbot.junit4_x,
+ org.eclipse.ui,
+ org.eclipse.ui.ide,
+ org.eclipse.ui.views,
+ org.junit,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.tmf.pcap.core,
+ org.eclipse.tracecompass.tmf.pcap.core.tests,
+ org.eclipse.tracecompass.tmf.ui,
+ org.eclipse.tracecompass.tmf.pcap.ui,
+ org.eclipse.tracecompass.tmf.ui.swtbot.tests
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/about.html b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/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/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/build.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/build.properties
new file mode 100644 (file)
index 0000000..cee367f
--- /dev/null
@@ -0,0 +1,19 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#    Ericsson - Initial API and implementation
+###############################################################################
+
+source.. = src/
+bin.includes = META-INF/,\
+               .,\
+               plugin.properties,\
+               about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/plugin.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/plugin.properties
new file mode 100644 (file)
index 0000000..c94ac4f
--- /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
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+Bundle-Name = Pcap Support for TMF SWTBot Tests Plug-in
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/pom.xml b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/pom.xml
new file mode 100644 (file)
index 0000000..b858b17
--- /dev/null
@@ -0,0 +1,50 @@
+<?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 xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>eclipse-test-plugin</packaging>
+
+  <name>Pcap Support for TMF SWTBot Tests Plug-in</name>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-surefire-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <configuration>
+          <testSuite>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</testSuite>
+          <testClass>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests.AllTests</testClass>
+          <useUIHarness>true</useUIHarness>
+          <useUIThread>false</useUIThread>
+          <argLine>${tycho.testArgLine} ${base.ui.test.vmargs}</argLine>
+          <product>org.eclipse.platform.ide</product>
+          <environmentVariables>
+            <SWT_GTK3>${SWT_GTK3}</SWT_GTK3>
+          </environmentVariables>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+ <groupId>org.eclipse.tracecompass</groupId>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/AllTests.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/AllTests.java
new file mode 100644 (file)
index 0000000..2766171
--- /dev/null
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * Copyright (c) 2014 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+/**
+ * Test suite for UI on the PCAP parser and networking perspective
+ */
+@RunWith(Suite.class)
+@Suite.SuiteClasses({
+    ImportAndReadPcapTest.class,
+    NetworkPerspectiveChecker.class
+})
+public class AllTests {
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/ImportAndReadPcapTest.java
new file mode 100644 (file)
index 0000000..1486e32
--- /dev/null
@@ -0,0 +1,279 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.log4j.ConsoleAppender;
+import org.apache.log4j.Logger;
+import org.apache.log4j.SimpleLayout;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.results.BoolResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
+import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.internal.tmf.pcap.ui.NetworkingPerspectiveFactory;
+import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView;
+import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
+import org.eclipse.tracecompass.tmf.pcap.core.tests.shared.PcapTmfTestTrace;
+import org.eclipse.tracecompass.tmf.ui.editors.TmfEventsEditor;
+import org.eclipse.tracecompass.tmf.ui.project.model.TmfOpenTraceHelper;
+import org.eclipse.tracecompass.tmf.ui.project.model.TmfProjectRegistry;
+import org.eclipse.tracecompass.tmf.ui.project.model.TmfTraceFolder;
+import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.ConditionHelpers;
+import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.SWTBotUtils;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IViewPart;
+import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.WorkbenchException;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * SWTBot Smoke test for Pcap UI.
+ *
+ * @author Matthew Khouzam
+ */
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class ImportAndReadPcapTest {
+
+    private static final String NETWORK_PERSPECTIVE_ID = NetworkingPerspectiveFactory.ID;
+    private static final String TRACE_PROJECT_NAME = "test";
+
+    private static SWTWorkbenchBot fBot;
+    private ITmfEvent fDesired1;
+    private static PcapTmfTestTrace pttt = PcapTmfTestTrace.BENCHMARK_TRACE;
+
+    /** The Log4j logger instance. */
+    private static final Logger fLogger = Logger.getRootLogger();
+
+    /**
+     * Test Class setup
+     */
+    @BeforeClass
+    public static void init() {
+
+        SWTBotUtils.failIfUIThread();
+
+        /* set up for swtbot */
+        SWTBotPreferences.TIMEOUT = 300000; /* 300 second timeout */
+        fLogger.removeAllAppenders();
+        fLogger.addAppender(new ConsoleAppender(new SimpleLayout(), ConsoleAppender.SYSTEM_OUT));
+        fBot = new SWTWorkbenchBot();
+
+        final List<SWTBotView> openViews = fBot.views();
+        for (SWTBotView view : openViews) {
+            if (view.getTitle().equals("Welcome")) {
+                view.close();
+                fBot.waitUntil(ConditionHelpers.ViewIsClosed(view));
+            }
+        }
+        /* Switch perspectives */
+        switchNetworkPerspective();
+        /* Finish waiting for eclipse to load */
+        SWTBotUtils.waitForJobs();
+    }
+
+    /**
+     * Test Class teardown
+     */
+    @AfterClass
+    public static void terminate() {
+        fLogger.removeAllAppenders();
+    }
+
+    private static void switchNetworkPerspective() {
+        final Exception retE[] = new Exception[1];
+        if (!UIThreadRunnable.syncExec(new BoolResult() {
+            @Override
+            public Boolean run() {
+                try {
+                    PlatformUI.getWorkbench().showPerspective(NETWORK_PERSPECTIVE_ID,
+                            PlatformUI.getWorkbench().getActiveWorkbenchWindow());
+                } catch (WorkbenchException e) {
+                    retE[0] = e;
+                    return false;
+                }
+                return true;
+            }
+        })) {
+            fail(retE[0].getMessage());
+        }
+
+    }
+
+    /**
+     * Main test case
+     */
+    @Test
+    public void test() {
+        assumeTrue(pttt.exists());
+        SWTBotUtils.createProject(TRACE_PROJECT_NAME);
+        openTrace();
+        openEditor();
+        testHV(getViewPart("Histogram"));
+        testStreamView(getViewPartRef("Stream List"));
+        fBot.closeAllEditors();
+        SWTBotUtils.deleteProject(TRACE_PROJECT_NAME, fBot);
+    }
+
+    private void testStreamView(IViewReference viewPart) {
+        SWTBotView botView = new SWTBotView(viewPart, fBot);
+        StreamListView slv = (StreamListView) getViewPart("Stream List");
+        botView.setFocus();
+        SWTBotTree botTree = fBot.tree();
+        assertNotNull(botTree);
+        final TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(slv, fDesired1.getTimestamp());
+        slv.broadcast(signal);
+        SWTBotUtils.waitForJobs();
+        // FIXME This is a race condition:
+        // TmfEventsTable launches an async exec that may be run after the wait
+        // for jobs. This last delay catches it.
+        SWTBotUtils.delay(1000);
+
+    }
+
+    private static void openTrace() {
+        final Exception exception[] = new Exception[1];
+        exception[0] = null;
+        UIThreadRunnable.syncExec(new VoidResult() {
+            @Override
+            public void run() {
+                try {
+                    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(TRACE_PROJECT_NAME);
+                    TmfTraceFolder destinationFolder = TmfProjectRegistry.getProject(project, true).getTracesFolder();
+                    String absolutePath = (new File(pttt.getTrace().getPath())).getAbsolutePath();
+                    TmfOpenTraceHelper.openTraceFromPath(destinationFolder, absolutePath, PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "org.eclipse.linuxtools.tmf.pcap.core.pcaptrace");
+                } catch (CoreException e) {
+                    exception[0] = e;
+                }
+            }
+        });
+        if (exception[0] != null) {
+            fail(exception[0].getMessage());
+        }
+
+        SWTBotUtils.delay(1000);
+        SWTBotUtils.waitForJobs();
+    }
+
+    private void openEditor() {
+        final List<IEditorReference> editorRefs = new ArrayList<>();
+        UIThreadRunnable.syncExec(new VoidResult() {
+            @Override
+            public void run() {
+                IEditorReference[] ieds = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getEditorReferences();
+                editorRefs.addAll(Arrays.asList(ieds));
+            }
+
+        });
+        assertFalse(editorRefs.isEmpty());
+        IEditorPart iep = null;
+        for (IEditorReference ied : editorRefs) {
+            if (ied.getTitle().equals(pttt.getTrace().getName())) {
+                iep = ied.getEditor(true);
+                break;
+            }
+        }
+        assertNotNull(iep);
+        fDesired1 = getEvent(100);
+        final TmfEventsEditor tmfEd = (TmfEventsEditor) iep;
+        UIThreadRunnable.syncExec(new VoidResult() {
+            @Override
+            public void run() {
+                tmfEd.setFocus();
+                tmfEd.selectionChanged(new SelectionChangedEvent(tmfEd, new StructuredSelection(fDesired1)));
+            }
+        });
+
+        SWTBotUtils.waitForJobs();
+        SWTBotUtils.delay(1000);
+        assertNotNull(tmfEd);
+    }
+
+    private static void testHV(IViewPart vp) {
+        assertNotNull(vp);
+    }
+
+    private static ITmfEvent getEvent(int rank) {
+        try (PcapTrace trace = pttt.getTrace()) {
+            ITmfContext ctx = trace.seekEvent(0);
+            for (int i = 0; i < rank; i++) {
+                trace.getNext(ctx);
+            }
+            return trace.getNext(ctx);
+        }
+
+    }
+
+    private static IViewPart getViewPart(final String viewTile) {
+        final IViewPart[] vps = new IViewPart[1];
+        UIThreadRunnable.syncExec(new VoidResult() {
+            @Override
+            public void run() {
+                IViewReference[] viewRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
+                for (IViewReference viewRef : viewRefs) {
+                    IViewPart vp = viewRef.getView(true);
+                    if (vp.getTitle().equals(viewTile)) {
+                        vps[0] = vp;
+                        return;
+                    }
+                }
+            }
+        });
+
+        return vps[0];
+    }
+
+    private static IViewReference getViewPartRef(final String viewTile) {
+        final IViewReference[] vrs = new IViewReference[1];
+        UIThreadRunnable.syncExec(new VoidResult() {
+            @Override
+            public void run() {
+                IViewReference[] viewRefs = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getViewReferences();
+                for (IViewReference viewRef : viewRefs) {
+                    IViewPart vp = viewRef.getView(true);
+                    if (vp.getTitle().equals(viewTile)) {
+                        vrs[0] = viewRef;
+                        return;
+                    }
+                }
+            }
+        });
+
+        return vrs[0];
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests/src/org/eclipse/tracecompass/tmf/pcap/ui/swtbot/tests/NetworkPerspectiveChecker.java
new file mode 100644 (file)
index 0000000..32e2ffc
--- /dev/null
@@ -0,0 +1,56 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Matthew Khouzam - Initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+import org.eclipse.tracecompass.internal.tmf.pcap.ui.NetworkingPerspectiveFactory;
+import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView;
+import org.eclipse.tracecompass.tmf.ui.swtbot.tests.shared.AbstractPerspectiveChecker;
+import org.eclipse.tracecompass.tmf.ui.views.colors.ColorsView;
+import org.eclipse.tracecompass.tmf.ui.views.filter.FilterView;
+import org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.tracecompass.tmf.ui.views.statistics.TmfStatisticsView;
+import org.eclipse.ui.IPageLayout;
+import org.junit.Before;
+
+/**
+ * Tracing perspective view checker
+ *
+ * @author Matthew Khouzam
+ */
+public class NetworkPerspectiveChecker extends AbstractPerspectiveChecker {
+
+    /**
+     * Set up arrays for test
+     */
+    @Before
+    public void init() {
+        fPerspectiveId = NetworkingPerspectiveFactory.ID;
+        fViewIds = new ArrayList<>();
+        fViewIds.addAll(Arrays.asList(new String[] {
+                // TMF views
+                HistogramView.ID,
+                TmfStatisticsView.ID,
+                FilterView.ID,
+                ColorsView.ID,
+                // PCAP
+                StreamListView.ID,
+                // Standard Eclipse views
+                IPageLayout.ID_PROJECT_EXPLORER,
+                IPageLayout.ID_PROP_SHEET,
+                IPageLayout.ID_BOOKMARKS
+        }));
+    }
+}
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.classpath b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.project b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.project
new file mode 100644 (file)
index 0000000..3a29736
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644 (file)
index 0000000..a2b5e6b
--- /dev/null
@@ -0,0 +1,405 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=f
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=error
+org.eclipse.jdt.core.compiler.problem.deadCode=error
+org.eclipse.jdt.core.compiler.problem.deprecation=error
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=error
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=error
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=error
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=error
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=error
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
+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=error
+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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644 (file)
index 0000000..232a3fd
--- /dev/null
@@ -0,0 +1,60 @@
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_tmf-style
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.api.tools.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/.settings/org.eclipse.pde.prefs b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/META-INF/MANIFEST.MF b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/META-INF/MANIFEST.MF
new file mode 100644 (file)
index 0000000..70287a2
--- /dev/null
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Version: 1.0.0.qualifier
+Bundle-Localization: plugin
+Bundle-SymbolicName: org.eclipse.tracecompass.tmf.pcap.ui;singleton:=true
+Bundle-Activator: org.eclipse.tracecompass.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.tracecompass.common.core,
+ org.eclipse.tracecompass.tmf.core,
+ org.eclipse.tracecompass.tmf.ui,
+ org.eclipse.tracecompass.tmf.pcap.core
+Export-Package: org.eclipse.tracecompass.internal.tmf.pcap.ui;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests",
+ org.eclipse.tracecompass.internal.tmf.pcap.ui.stream;x-friends:="org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests"
+Import-Package: com.google.common.collect
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/about.html b/pcap/org.eclipse.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/build.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/build.properties
new file mode 100644 (file)
index 0000000..9d5346e
--- /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
+###############################################################################
+
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               about.html,\
+               plugin.properties,\
+               plugin.xml,\
+               icons/
+src.includes = about.html
+additional.bundles = org.eclipse.jdt.annotation
+jars.extra.classpath = platform:/plugin/org.eclipse.jdt.annotation
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png
new file mode 100644 (file)
index 0000000..56f18da
Binary files /dev/null and b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/network.png differ
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png
new file mode 100644 (file)
index 0000000..208cc69
Binary files /dev/null and b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcap.png differ
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png
new file mode 100644 (file)
index 0000000..affe9d1
Binary files /dev/null and b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/pcapng.png differ
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif
new file mode 100644 (file)
index 0000000..1ef74cf
Binary files /dev/null and b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/icons/stream_list_view.gif differ
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/plugin.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/plugin.properties
new file mode 100644 (file)
index 0000000..1ceaf25
--- /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
+###############################################################################
+
+Bundle-Vendor = Eclipse Trace Compass
+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
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/plugin.xml b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/plugin.xml
new file mode 100644 (file)
index 0000000..84ccf31
--- /dev/null
@@ -0,0 +1,48 @@
+<?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">
+      </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.tracecompass.internal.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.tracecompass.internal.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.tracecompass.tmf.ui.analysis.TmfAnalysisViewOutput"
+            id="org.eclipse.linuxtools.tmf.pcap.ui.view.stream.list">
+         <analysisModuleClass
+               class="org.eclipse.tracecompass.internal.tmf.pcap.core.analysis.StreamListAnalysis">
+         </analysisModuleClass>
+      </output>
+   </extension>
+
+</plugin>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/pom.xml b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/pom.xml
new file mode 100644 (file)
index 0000000..c61964b
--- /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>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.tmf.pcap.ui</artifactId>
+  <version>1.0.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.tracecompass</groupId>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/Activator.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/Activator.java
new file mode 100644 (file)
index 0000000..b05627a
--- /dev/null
@@ -0,0 +1,212 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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.tracecompass.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.tracecompass.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/NetworkingPerspectiveFactory.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/NetworkingPerspectiveFactory.java
new file mode 100644 (file)
index 0000000..d67631a
--- /dev/null
@@ -0,0 +1,88 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.tmf.pcap.ui;
+
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import org.eclipse.jdt.annotation.Nullable;
+import org.eclipse.tracecompass.internal.tmf.pcap.ui.stream.StreamListView;
+import org.eclipse.tracecompass.tmf.ui.project.wizards.NewTmfProjectWizard;
+import org.eclipse.tracecompass.tmf.ui.views.colors.ColorsView;
+import org.eclipse.tracecompass.tmf.ui.views.filter.FilterView;
+import org.eclipse.tracecompass.tmf.ui.views.histogram.HistogramView;
+import org.eclipse.tracecompass.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
+    private static final String PROJECT_VIEW_ID = checkNotNull(IPageLayout.ID_PROJECT_EXPLORER);
+    private static final String PROPERTIES_VIEW_ID = checkNotNull(IPageLayout.ID_PROP_SHEET);
+    private static final String BOOKMARKS_VIEW_ID = checkNotNull(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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/package-info.java
new file mode 100644 (file)
index 0000000..0106fac
--- /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.tracecompass.internal.tmf.pcap.ui;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/Messages.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/Messages.java
new file mode 100644 (file)
index 0000000..f0880db
--- /dev/null
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * 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.tracecompass.internal.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.tracecompass.internal.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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/StreamListView.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/StreamListView.java
new file mode 100644 (file)
index 0000000..54c312b
--- /dev/null
@@ -0,0 +1,517 @@
+/*******************************************************************************
+ * Copyright (c) 2014, 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials are
+ * made available under the terms 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
+ *   Patrick Tasse - Support aspect filters
+ *******************************************************************************/
+
+package org.eclipse.tracecompass.internal.tmf.pcap.ui.stream;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.jdt.annotation.Nullable;
+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.tracecompass.internal.tmf.pcap.core.analysis.StreamListAnalysis;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStream;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.TmfPacketStreamBuilder;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapDestinationAspect;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.event.aspect.PcapSourceAspect;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.protocol.TmfPcapProtocol;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.signal.TmfPacketStreamSelectedSignal;
+import org.eclipse.tracecompass.internal.tmf.pcap.core.trace.PcapTrace;
+import org.eclipse.tracecompass.internal.tmf.pcap.ui.Activator;
+import org.eclipse.tracecompass.tmf.core.event.aspect.ITmfEventAspect;
+import org.eclipse.tracecompass.tmf.core.filter.model.ITmfFilterTreeNode;
+import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterAndNode;
+import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterAspectNode;
+import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterContainsNode;
+import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterNode;
+import org.eclipse.tracecompass.tmf.core.filter.model.TmfFilterOrNode;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler;
+import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal;
+import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal;
+import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager;
+import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils;
+import org.eclipse.tracecompass.tmf.ui.project.model.TraceUtils;
+import org.eclipse.tracecompass.tmf.ui.views.TmfView;
+import org.eclipse.tracecompass.tmf.ui.views.filter.FilterManager;
+import org.eclipse.tracecompass.tmf.ui.views.filter.FilterView;
+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;
+
+import com.google.common.collect.Lists;
+
+/**
+ * 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<TmfPcapProtocol, 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 = TmfTraceUtils.getAnalysisModuleOfClass(trace, 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<TmfPcapProtocol, Table> tableMap = fTableMap;
+                if (tableMap == null) {
+                    return;
+                }
+                for (Table table : tableMap.values()) {
+                    if (!table.isDisposed()) {
+                        table.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 = TmfTraceUtils.getAnalysisModuleOfClass(trace, StreamListAnalysis.class, StreamListAnalysis.ID);
+                if (analysis == null) {
+                    return;
+                }
+
+                Map<TmfPcapProtocol, Table> tables = fTableMap;
+                if (tables == null) {
+                    return;
+                }
+                for (Entry<TmfPcapProtocol, Table> protocolEntry : tables.entrySet()) {
+                    TmfPcapProtocol protocol = protocolEntry.getKey();
+                    if (protocol == null) {
+                        throw new IllegalStateException();
+                    }
+                    TmfPacketStreamBuilder builder = analysis.getBuilder(protocol);
+                    Table table = protocolEntry.getValue();
+                    if (builder != null && !(table.isDisposed())) {
+                        for (TmfPacketStream stream : builder.getStreams()) {
+
+                            TableItem item;
+                            if (stream.getID() < table.getItemCount()) {
+                                item = table.getItem(stream.getID());
+                            } else {
+                                item = new TableItem(table, 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 = TmfTraceManager.getInstance().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<TmfPcapProtocol, Table> tables = fTableMap;
+                if (tables == null || e == null) {
+                    return;
+                }
+                TmfPcapProtocol protocol = (TmfPcapProtocol) e.item.getData(KEY_PROTOCOL);
+                tables.get(protocol).deselectAll();
+                fCurrentStream = null;
+            }
+
+        });
+
+        // Add items and tables for each protocol
+        for (TmfPcapProtocol protocol : TmfPcapProtocol.values()) {
+            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<TmfPcapProtocol, 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> filters = Lists.newArrayList(FilterManager.getSavedFilters());
+                        boolean newFilter = true;
+                        for (ITmfFilterTreeNode savedFilter : filters) {
+                            // Use toString(explicit) equality because equals() is not implemented
+                            if (savedFilter.toString(true).equals(filter.toString(true))) {
+                                newFilter = false;
+                                break;
+                            }
+                        }
+                        if (newFilter) {
+                            filters.add(filter);
+                            FilterManager.setSavedFilters(filters.toArray(new ITmfFilterTreeNode[filters.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.setEventAspect(ITmfEventAspect.BaseAspects.CONTENTS.forField(stream.getProtocol().getName()));
+                        protocolFilter.setTraceTypeId(TmfFilterAspectNode.BASE_ASPECT_ID);
+                        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.setEventAspect(PcapSourceAspect.INSTANCE);
+                        endpointAAndA.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
+                        endpointAAndA.setValue(stream.getFirstEndpoint());
+                        TmfFilterContainsNode endpointBAndA = new TmfFilterContainsNode(andA);
+                        endpointBAndA.setEventAspect(PcapDestinationAspect.INSTANCE);
+                        endpointBAndA.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
+                        endpointBAndA.setValue(stream.getSecondEndpoint());
+                        TmfFilterContainsNode endpointAAndB = new TmfFilterContainsNode(andB);
+                        endpointAAndB.setEventAspect(PcapSourceAspect.INSTANCE);
+                        endpointAAndB.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
+                        endpointAAndB.setValue(stream.getSecondEndpoint());
+                        TmfFilterContainsNode endpointBAndB = new TmfFilterContainsNode(andB);
+                        endpointBAndB.setEventAspect(PcapDestinationAspect.INSTANCE);
+                        endpointBAndB.setTraceTypeId(PcapTrace.TRACE_TYPE_ID);
+                        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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/messages.properties b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/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/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/package-info.java b/pcap/org.eclipse.tracecompass.tmf.pcap.ui/src/org/eclipse/tracecompass/internal/tmf/pcap/ui/stream/package-info.java
new file mode 100644 (file)
index 0000000..026591b
--- /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.tracecompass.internal.tmf.pcap.ui.stream;
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/.project b/pcap/org.eclipse.tracecompass.tmf.pcap/.project
new file mode 100644 (file)
index 0000000..4da7509
--- /dev/null
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>org.eclipse.tracecompass.tmf.pcap</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.pde.FeatureBuilder</name>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>org.eclipse.pde.FeatureNature</nature>
+       </natures>
+</projectDescription>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.resources.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap/.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/pcap/org.eclipse.tracecompass.tmf.pcap/.settings/org.eclipse.core.runtime.prefs b/pcap/org.eclipse.tracecompass.tmf.pcap/.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/pcap/org.eclipse.tracecompass.tmf.pcap/build.properties b/pcap/org.eclipse.tracecompass.tmf.pcap/build.properties
new file mode 100644 (file)
index 0000000..43f158a
--- /dev/null
@@ -0,0 +1,16 @@
+###############################################################################
+# Copyright (c) 2014, 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+bin.includes = feature.xml,\
+               feature.properties,\
+               p2.inf
+src.includes = sourceTemplateFeature/p2.inf
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/feature.properties b/pcap/org.eclipse.tracecompass.tmf.pcap/feature.properties
new file mode 100644 (file)
index 0000000..7097cf6
--- /dev/null
@@ -0,0 +1,20 @@
+###############################################################################
+# Copyright (c) 2015 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     Ericsson - Initial API and implementation
+###############################################################################
+
+featureName=Pcap (Packet Capture Format) Analysis
+
+description=Plug-ins to integrate PCAP into the workbench.
+
+featureProvider=Eclipse Trace Compass
+
+copyright=Copyright 2015 Ericsson
+
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/feature.xml b/pcap/org.eclipse.tracecompass.tmf.pcap/feature.xml
new file mode 100644 (file)
index 0000000..8f93afa
--- /dev/null
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.eclipse.tracecompass.tmf.pcap"
+      label="%featureName"
+      version="1.0.0.qualifier"
+      provider-name="%featureProvider"
+      license-feature="org.eclipse.license"
+      license-feature-version="0.0.0">
+
+   <description url="http://www.example.com/description">
+      %description
+   </description>
+
+   <copyright url="http://www.example.com/copyright">
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <includes
+         id="org.eclipse.tracecompass.tmf"
+         version="0.0.0"/>
+
+   <requires>
+      <import plugin="org.eclipse.core.runtime"/>
+      <import plugin="org.eclipse.core.resources"/>
+      <import plugin="com.google.guava"/>
+      <import plugin="org.eclipse.ui"/>
+      <import plugin="org.eclipse.ui.ide"/>
+      <import plugin="org.eclipse.tracecompass.tmf.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.tracecompass.tmf.ui" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.tracecompass.tmf.pcap.core" version="1.0.0" match="greaterOrEqual"/>
+      <import plugin="org.eclipse.tracecompass.pcap.core" version="1.0.0" match="greaterOrEqual"/>
+   </requires>
+
+   <plugin
+         id="org.eclipse.tracecompass.pcap.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+   <plugin
+         id="org.eclipse.tracecompass.tmf.pcap.ui"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.tracecompass.tmf.pcap.core"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+   <plugin
+         id="org.eclipse.tracecompass.tmf.pcap.doc.user"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"/>
+
+</feature>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/p2.inf b/pcap/org.eclipse.tracecompass.tmf.pcap/p2.inf
new file mode 100644 (file)
index 0000000..c94906f
--- /dev/null
@@ -0,0 +1 @@
+update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.tmf.pcap.feature.group' || pc.name == 'org.eclipse.tracecompass.tmf.pcap.feature.group'))
\ No newline at end of file
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/pom.xml b/pcap/org.eclipse.tracecompass.tmf.pcap/pom.xml
new file mode 100644 (file)
index 0000000..bcaa106
--- /dev/null
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2011, 2014 Red Hat, Inc, Ericsson.
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass.pcap-parent</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <name>Trace Compass Pcap Analysis Feature</name>
+  <artifactId>org.eclipse.tracecompass.tmf.pcap</artifactId>
+  <groupId>org.eclipse.tracecompass</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+
+  <packaging>eclipse-feature</packaging>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.eclipse.tycho.extras</groupId>
+        <artifactId>tycho-source-feature-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>source-feature</id>
+            <phase>package</phase>
+            <goals>
+              <goal>source-feature</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.eclipse.tycho</groupId>
+        <artifactId>tycho-p2-plugin</artifactId>
+        <version>${tycho-version}</version>
+        <executions>
+          <execution>
+            <id>attached-p2-metadata</id>
+            <phase>package</phase>
+            <goals>
+              <goal>p2-metadata</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/pcap/org.eclipse.tracecompass.tmf.pcap/sourceTemplateFeature/p2.inf b/pcap/org.eclipse.tracecompass.tmf.pcap/sourceTemplateFeature/p2.inf
new file mode 100644 (file)
index 0000000..e5f2fbd
--- /dev/null
@@ -0,0 +1 @@
+update.matchExp=providedCapabilities.exists(pc | pc.namespace == 'org.eclipse.equinox.p2.iu' && (pc.name == 'org.eclipse.linuxtools.tmf.pcap.source.feature.group' || pc.name == 'org.eclipse.tracecompass.tmf.pcap.source.feature.group'))
\ No newline at end of file
diff --git a/pcap/pom.xml b/pcap/pom.xml
new file mode 100644 (file)
index 0000000..e174d26
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright (C) 2015, Ericsson, EfficiOS Inc. and others
+
+   All rights reserved. This program and the accompanying materials
+   are made available under the terms of the Eclipse Public License v1.0
+   which accompanies this distribution, and is available at
+   http://www.eclipse.org/legal/epl-v10.html
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <prerequisites>
+    <maven>3.0</maven>
+  </prerequisites>
+
+  <parent>
+    <artifactId>org.eclipse.tracecompass</artifactId>
+    <groupId>org.eclipse.tracecompass</groupId>
+    <version>1.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>org.eclipse.tracecompass.pcap-parent</artifactId>
+  <groupId>org.eclipse.tracecompass</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <name>Trace Compass Pcap Format Support Parent</name>
+
+  <modules>
+    <module>org.eclipse.tracecompass.pcap.core</module>
+    <module>org.eclipse.tracecompass.pcap.core.tests</module>
+    <module>org.eclipse.tracecompass.tmf.pcap</module>
+    <module>org.eclipse.tracecompass.tmf.pcap.core</module>
+    <module>org.eclipse.tracecompass.tmf.pcap.core.tests</module>
+    <module>org.eclipse.tracecompass.tmf.pcap.ui</module>
+    <module>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</module>
+  </modules>
+
+</project>
diff --git a/pom.xml b/pom.xml
index 43b9d10c82c3dcb7cd6441e5f0cf7a779edcf02b..170b9c7a4a12e34442f686c57ade19f4267cad35 100644 (file)
--- a/pom.xml
+++ b/pom.xml
   <modules>
     <module>btf</module>
     <module>doc</module>
+    <module>pcap</module>
 
     <module>org.eclipse.tracecompass.common.core</module>
     <module>org.eclipse.tracecompass.common.core.tests</module>
     <module>org.eclipse.tracecompass.ctf.parser</module>
     <module>org.eclipse.tracecompass.ctf.parser.tests</module>
 
-    <module>org.eclipse.tracecompass.pcap.core</module>
-    <module>org.eclipse.tracecompass.pcap.core.tests</module>
-
     <module>org.eclipse.tracecompass.statesystem.core</module>
     <module>org.eclipse.tracecompass.statesystem.core.tests</module>
 
     <module>org.eclipse.tracecompass.tmf.ctf.core.tests</module>
     <module>org.eclipse.tracecompass.tmf.ctf.ui.swtbot.tests</module>
 
-    <module>org.eclipse.tracecompass.tmf.pcap</module>
-    <module>org.eclipse.tracecompass.tmf.pcap.core</module>
-    <module>org.eclipse.tracecompass.tmf.pcap.core.tests</module>
-    <module>org.eclipse.tracecompass.tmf.pcap.ui</module>
-    <module>org.eclipse.tracecompass.tmf.pcap.ui.swtbot.tests</module>
-
     <module>org.eclipse.tracecompass.tmf.analysis.xml.core</module>
     <module>org.eclipse.tracecompass.tmf.analysis.xml.core.tests</module>
     <module>org.eclipse.tracecompass.tmf.analysis.xml.ui</module>
This page took 0.461295 seconds and 5 git commands to generate.