Compare commits
420 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25170d0d83 | |||
| ba6446378a | |||
| ec9eb17ee3 | |||
| 7775f5978b | |||
| 8c031e7649 | |||
| 6b2eae7f26 | |||
| 69805a423f | |||
| f1178157c8 | |||
| 1ebc6eb03a | |||
| 916215c0c2 | |||
| 6c8e149be2 | |||
| bd08b69747 | |||
| 33e0061147 | |||
| 45e1031e5e | |||
| 73b21cb80b | |||
| 15fb825548 | |||
| 0d448368cc | |||
| abacae42d7 | |||
| 9d2e2e7f64 | |||
| eb64cc60c5 | |||
| 5ea0d6446a | |||
| d970d07048 | |||
| 90f45c698f | |||
| af388b2462 | |||
| 8700e2fdde | |||
| 23ad84ef30 | |||
| 0d074ea6ae | |||
| 351a246238 | |||
| 841b5fe2b2 | |||
| 85ce07f11f | |||
| b44f3418f4 | |||
| bfbc40c282 | |||
| 2c66bf3edd | |||
| a51f922ea4 | |||
| 4d8e7a3cd1 | |||
| 70ccf35fe4 | |||
| 6c5032da10 | |||
| b2e269b67c | |||
| cd01c6a808 | |||
| 179d40ac8d | |||
| 754a61e989 | |||
| bedf4c5c4d | |||
| 7c27bcec47 | |||
| 90f09cc222 | |||
| 21d83f93dc | |||
| db838efc65 | |||
| 929af41dd3 | |||
| 979a7672e6 | |||
| 67818ff4dd | |||
| 0c7631e912 | |||
| a06b888365 | |||
| ded10e1c22 | |||
| 2f3bc0d892 | |||
| 184f1b2d2c | |||
| 90249dadb9 | |||
| c88eb32db8 | |||
| d47db29b93 | |||
| e8148af10f | |||
| b298a4ca6c | |||
| f474e38687 | |||
| 2e806f7b86 | |||
| b7a8d99e2d | |||
| 2a09fc7e6f | |||
| e36abb8d55 | |||
| 5746b9f758 | |||
| 6be1f018b1 | |||
| 38a046aaef | |||
| fdbd6f8402 | |||
| 1dad204494 | |||
| 54661c51ce | |||
| b34fe0d0ba | |||
| 868eceddc5 | |||
| b642c396c7 | |||
| f3d8e34ed0 | |||
| 401c760e01 | |||
| 5add0e385d | |||
| 2ba6822f2b | |||
| 54124d13bf | |||
| 5b949a9d37 | |||
| 9a9b25622c | |||
| dd6a8669b1 | |||
| b483897769 | |||
| bd24c4dd05 | |||
| 664e99d09e | |||
| 675b2ed972 | |||
| e6f19311b1 | |||
| 4a8034191c | |||
| 9d4e5bf636 | |||
| cc9be70708 | |||
| 2dcc72f679 | |||
| 563b6e2b01 | |||
| 6161c0e0ec | |||
| 61c2102ab7 | |||
| 796a04b981 | |||
| 2a71ab94f5 | |||
| 923b89c038 | |||
| 3de6c9900c | |||
| ef1f2a758a | |||
| 3e6d5bd33e | |||
| 26968b8521 | |||
| 611cfc7b46 | |||
| 8cb77a555b | |||
| b4a7f032f5 | |||
| 62e0ec2008 | |||
| f6cc12e8c3 | |||
| b38b268fcb | |||
| 55a14edc9d | |||
| 45c23564b5 | |||
| b170fb3c2a | |||
| ab975eadd1 | |||
| 7ad70411f3 | |||
| 24720340be | |||
| ad51066f1c | |||
| 95e2db60b6 | |||
| db1d377da6 | |||
| 230e8dcc7a | |||
| ab2146102f | |||
| b1148922d8 | |||
| e4de765da9 | |||
| 47120c66b7 | |||
| 35ccc71f10 | |||
| 688a6abd99 | |||
| 97693cd0c4 | |||
| 3e5ab7b0ac | |||
| ad80671dd2 | |||
| 4ab3000b69 | |||
| 572e999a5b | |||
| e5bcb25d24 | |||
| 19ea1f0b6d | |||
| e88014ebba | |||
| 10a0608fd3 | |||
| 60abfb7afd | |||
| 6b9e3c0e70 | |||
| 19065cdbb7 | |||
| a7afeb1f7c | |||
| 150c404cdb | |||
| 5fe8b261ec | |||
| f8a177c9e0 | |||
| 077a6f8011 | |||
| 8b84f1341b | |||
| 20824e75c1 | |||
| fb283ab668 | |||
| dc3df60716 | |||
| 47b58ed770 | |||
| 1cebc2da0a | |||
| 414030cbd2 | |||
| 8011585113 | |||
| 270a004037 | |||
| 2aa4160400 | |||
| c8e416966b | |||
| 20cb208719 | |||
| e30aff82ee | |||
| ad2937c332 | |||
| 0e8a757d6e | |||
| 220eaea73c | |||
| 24d6085ded | |||
| 8a66734279 | |||
| f6e2224651 | |||
| 5d85c12bb8 | |||
| 2b1cb7856f | |||
| f1d080983a | |||
| 767b083a22 | |||
| 348ffe20d6 | |||
| f3494e7562 | |||
| 9b6908f193 | |||
| 0cfcc8c118 | |||
| ec5cd209c6 | |||
| 5933bcd512 | |||
| 14ac6654b9 | |||
| cea11743eb | |||
| 210d925987 | |||
| ffbffd88f1 | |||
| ec8d54dca3 | |||
| e8682e446b | |||
| e87e1791c3 | |||
| f5a4e3c39e | |||
| 306e20d14f | |||
| c76805d133 | |||
| 8ebb2dc3a6 | |||
| 669fd6a881 | |||
| 8e66e5fe0b | |||
| 674aa7d3ce | |||
| 2b7c9a240f | |||
| 18f2a110f0 | |||
| 27f1e8ca6a | |||
| 3565a6a05b | |||
| aef4901b2b | |||
| d77aaa3865 | |||
| b398a07fd7 | |||
| 732bd82034 | |||
| 2ccc5274aa | |||
| 9f4f71046d | |||
| d73b01f77d | |||
| 77302521b2 | |||
| f89471e14b | |||
| 0634556256 | |||
| 4f097e7f59 | |||
| f1abc645c3 | |||
| 2c8b7129e9 | |||
| 2f81529f93 | |||
| 8f76d816f1 | |||
| 594a71a9ba | |||
| 0fa0d4a5b8 | |||
| 97443c6cd8 | |||
| c3486eb6c8 | |||
| 8a286a8eac | |||
| e4329213fa | |||
| 857bbe17d7 | |||
| 091cb1cf7f | |||
| 0623b8de4a | |||
| 8b55548cca | |||
| a0a4ea1f53 | |||
| e034d1faad | |||
| 68660d0892 | |||
| a0f0b55045 | |||
| 3d20b6961e | |||
| ca02c92a18 | |||
| 347dbf134b | |||
| 44ac32359f | |||
| 48c7d81b8a | |||
| e945a3acbe | |||
| 145dfbd74d | |||
| b7646dc29e | |||
| 475181c8df | |||
| 3d043ce1b7 | |||
| 7e2869b7ee | |||
| 51d9d7e25c | |||
| ed665ac032 | |||
| 689d7874f4 | |||
| c7c1f97b0c | |||
| 7b2db09585 | |||
| 52f3f7b348 | |||
| 429ea37080 | |||
| 04f011e82f | |||
| 3a6ed3ce7e | |||
| 79eb8073d8 | |||
| 4ea841cc7b | |||
| 6bf642d2af | |||
| 15c24f0925 | |||
| 4d4a6579c6 | |||
| b648dccfd8 | |||
| f9425834a3 | |||
| e0d00e6402 | |||
| b1b7517759 | |||
| a5b9c28007 | |||
| b5e408595b | |||
| f15930682e | |||
| f8765518bc | |||
| 73e952faea | |||
| 111383bcba | |||
| 244f005ae6 | |||
| 701733e69d | |||
| 6b4a9c1e14 | |||
| 3abbc3e0e2 | |||
| 2a7b713ef2 | |||
| 593571ce10 | |||
| 979261432a | |||
| e25f56a8a9 | |||
| e8788e6ce0 | |||
| 8a8691a889 | |||
| de15b84bef | |||
| b78d8bea45 | |||
| a49842a119 | |||
| dbe5d603ed | |||
| cde1835c74 | |||
| b332eca891 | |||
| 75efd69b77 | |||
| 960610bab2 | |||
| 98029f8c7a | |||
| 9c09cf5f40 | |||
| 113d65cfc4 | |||
| 22e7bb04f0 | |||
| d8c5b7d9c3 | |||
| 2e7ae5309f | |||
| f81e830e93 | |||
| 47a285bf6d | |||
| c080773878 | |||
| bcf4e1a274 | |||
| 93fd192782 | |||
| e687eef42c | |||
| 2a709113fe | |||
| 8d7acdb9cb | |||
| 77684d828c | |||
| 9f902057ba | |||
| 42660c7a2e | |||
| 97a806f9d9 | |||
| 60185fbaee | |||
| 5411a405d4 | |||
| 694dad1cf5 | |||
| 5fb9a7dcdf | |||
| 3faa7205ae | |||
| 3cbe5d56d9 | |||
| 5745ab4f2c | |||
| 4a17108ccc | |||
| 408138c27c | |||
| 3211db8743 | |||
| 0c81988d8c | |||
| 0107c423a3 | |||
| 5d41816eb6 | |||
| e41b7e25ed | |||
| dba8b2731d | |||
| 048fa93b53 | |||
| 6cc5597c25 | |||
| 694423be3b | |||
| 0634b9cfd5 | |||
| c4b16338a8 | |||
| bda2a84532 | |||
| 9d4c951e7f | |||
| 8a89b21d34 | |||
| e02df858fa | |||
| 0fbe22e2e0 | |||
| 021c2bceff | |||
| 9862c14040 | |||
| 23131e7527 | |||
| 0833bca1bd | |||
| 1cf00ec882 | |||
| 6c0bbd5f1f | |||
| f13b091664 | |||
| dff41eceb2 | |||
| d267e64907 | |||
| 792dcd55f3 | |||
| 2b33ea0c85 | |||
| f69a6f2e89 | |||
| 0f133a3df6 | |||
| 549c522bf7 | |||
| 2f11d8ed7b | |||
| 7dd0a24df6 | |||
| a052fe2324 | |||
| 4fc24453ae | |||
| b468fba441 | |||
| f80021059e | |||
| 7c0822b4d2 | |||
| cdde384ed3 | |||
| fce1bdb1e7 | |||
| b68a7d3259 | |||
| 44b13c105d | |||
| ed0558afdf | |||
| d0be3b0ca2 | |||
| a052c6aa3b | |||
| 8a30ba8dea | |||
| 0a7972c54d | |||
| b1890eb5e1 | |||
| 1aaf5c837e | |||
| c8a213e985 | |||
| 5f82700290 | |||
| 40a0137dfd | |||
| 4ec9a928b9 | |||
| c82c41bbf0 | |||
| 79c49e6f1d | |||
| 96d628d322 | |||
| b4d81d96b8 | |||
| 08fdc18290 | |||
| 5c784af74f | |||
| ff4cb91aed | |||
| 31ed3e4858 | |||
| 0007ab9322 | |||
| f723a770c7 | |||
| af1b3d00dc | |||
| 316647031a | |||
| 929cf21ff8 | |||
| 6ff48cac7a | |||
| b083094cc8 | |||
| 8180a0e5d7 | |||
| 5a39bab52e | |||
| 02ba74ae16 | |||
| c02f8a6520 | |||
| 5aeccb2681 | |||
| 89fb6629d0 | |||
| c4fc4e20a6 | |||
| ffc70664bd | |||
| 41de99dd4b | |||
| 5680af1b45 | |||
| c1d84ceb01 | |||
| 7d3c37e989 | |||
| 83fd7877f2 | |||
| 070c947ae6 | |||
| 31af3b4c94 | |||
| c8e98b3d60 | |||
| 780d4894ad | |||
| 032ffea7c8 | |||
| a0e29e8ae2 | |||
| ef3ce7273a | |||
| 1f338cbf3f | |||
| 93f147555b | |||
| cd8c9195c1 | |||
| eb726a366f | |||
| af1f21cac9 | |||
| 54fb59db04 | |||
| ac942481e3 | |||
| 310c9bbb8f | |||
| 8c60a53ebe | |||
| efced9bb87 | |||
| b5848fe885 | |||
| 5d8d81a237 | |||
| e1f520911f | |||
| e2561ca672 | |||
| 8aab5490fe | |||
| a2df70d485 | |||
| 4c7532ab84 | |||
| 6853484417 | |||
| 5f5bfbd792 | |||
| c9da1c3e75 | |||
| 71b44a8b4e | |||
| dc861722c4 | |||
| 9553fbff8c | |||
| b34b836b5f | |||
| b8126f36dc | |||
| cb77a5da33 | |||
| 4062d24897 | |||
| 5d3da392e2 | |||
| de28761ce0 | |||
| a76c99dfb9 | |||
| 37ee5bd5e6 | |||
| 2054426bcf | |||
| 8dcfdf9b8d | |||
| f707d412fa | |||
| 664baf507f | |||
| bc412598fe | |||
| 2302801e69 | |||
| d62e0f63a7 |
+11
-1
@@ -1 +1,11 @@
|
|||||||
/.project
|
/.metadata/
|
||||||
|
/.graph-browser/
|
||||||
|
/.recommenders/
|
||||||
|
/RemoteSystemsTempFiles/
|
||||||
|
/*.zip
|
||||||
|
SCViewer initiator_target.launch
|
||||||
|
SCViewer.xcf
|
||||||
|
SCViewer_1.png
|
||||||
|
copyrightLog.txt
|
||||||
|
/workspace
|
||||||
|
?*.launch
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
|
||||||
|
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
|
||||||
|
<stringAttribute key="M2_GOALS" value="package"/>
|
||||||
|
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
|
||||||
|
<booleanAttribute key="M2_OFFLINE" value="false"/>
|
||||||
|
<stringAttribute key="M2_PROFILES" value=""/>
|
||||||
|
<listAttribute key="M2_PROPERTIES"/>
|
||||||
|
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
|
||||||
|
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
|
||||||
|
<intAttribute key="M2_THREADS" value="1"/>
|
||||||
|
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
|
||||||
|
<stringAttribute key="M2_USER_SETTINGS" value=""/>
|
||||||
|
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
|
||||||
|
</launchConfiguration>
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
|
||||||
|
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
|
||||||
|
<stringAttribute key="M2_GOALS" value="package"/>
|
||||||
|
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
|
||||||
|
<booleanAttribute key="M2_OFFLINE" value="false"/>
|
||||||
|
<stringAttribute key="M2_PROFILES" value="release-composite"/>
|
||||||
|
<listAttribute key="M2_PROPERTIES"/>
|
||||||
|
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
|
||||||
|
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
|
||||||
|
<intAttribute key="M2_THREADS" value="1"/>
|
||||||
|
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
|
||||||
|
<stringAttribute key="M2_USER_SETTINGS" value=""/>
|
||||||
|
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="true"/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.launching.macosx.MacOSXType/AdoptOpenJDK 8 [1.8.0_232]"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
|
||||||
|
</launchConfiguration>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
|
||||||
|
<booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/>
|
||||||
|
<stringAttribute key="M2_GOALS" value="tycho-versions:set-version tycho-versions:update-pom"/>
|
||||||
|
<booleanAttribute key="M2_NON_RECURSIVE" value="false"/>
|
||||||
|
<booleanAttribute key="M2_OFFLINE" value="false"/>
|
||||||
|
<stringAttribute key="M2_PROFILES" value=""/>
|
||||||
|
<listAttribute key="M2_PROPERTIES">
|
||||||
|
<listEntry value="newVersion=${string_prompt:new version number}"/>
|
||||||
|
</listAttribute>
|
||||||
|
<stringAttribute key="M2_RUNTIME" value="EMBEDDED"/>
|
||||||
|
<booleanAttribute key="M2_SKIP_TESTS" value="false"/>
|
||||||
|
<intAttribute key="M2_THREADS" value="1"/>
|
||||||
|
<booleanAttribute key="M2_UPDATE_SNAPSHOTS" value="false"/>
|
||||||
|
<stringAttribute key="M2_USER_SETTINGS" value=""/>
|
||||||
|
<booleanAttribute key="M2_WORKSPACE_RESOLUTION" value="false"/>
|
||||||
|
<stringAttribute key="bad_container_name" value="/com.minres.scviewer.parent/.launch"/>
|
||||||
|
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
|
||||||
|
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${project_loc:com.minres.scviewer.parent}"/>
|
||||||
|
</launchConfiguration>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.parent</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,203 @@
|
|||||||
|
Eclipse Public License - v 1.0
|
||||||
|
|
||||||
|
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
|
||||||
|
LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM
|
||||||
|
CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
|
||||||
|
|
||||||
|
1. DEFINITIONS
|
||||||
|
|
||||||
|
"Contribution" means:
|
||||||
|
|
||||||
|
a) in the case of the initial Contributor, the initial code and documentation
|
||||||
|
distributed under this Agreement, and
|
||||||
|
b) in the case of each subsequent Contributor:
|
||||||
|
i) changes to the Program, and
|
||||||
|
ii) additions to the Program;
|
||||||
|
|
||||||
|
where such changes and/or additions to the Program originate from and are
|
||||||
|
distributed by that particular Contributor. A Contribution 'originates'
|
||||||
|
from a Contributor if it was added to the Program by such Contributor
|
||||||
|
itself or anyone acting on such Contributor's behalf. Contributions do not
|
||||||
|
include additions to the Program which: (i) are separate modules of
|
||||||
|
software distributed in conjunction with the Program under their own
|
||||||
|
license agreement, and (ii) are not derivative works of the Program.
|
||||||
|
|
||||||
|
"Contributor" means any person or entity that distributes the Program.
|
||||||
|
|
||||||
|
"Licensed Patents" mean patent claims licensable by a Contributor which are
|
||||||
|
necessarily infringed by the use or sale of its Contribution alone or when
|
||||||
|
combined with the Program.
|
||||||
|
|
||||||
|
"Program" means the Contributions distributed in accordance with this
|
||||||
|
Agreement.
|
||||||
|
|
||||||
|
"Recipient" means anyone who receives the Program under this Agreement,
|
||||||
|
including all Contributors.
|
||||||
|
|
||||||
|
2. GRANT OF RIGHTS
|
||||||
|
a) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||||
|
Recipient a non-exclusive, worldwide, royalty-free copyright license to
|
||||||
|
reproduce, prepare derivative works of, publicly display, publicly
|
||||||
|
perform, distribute and sublicense the Contribution of such Contributor,
|
||||||
|
if any, and such derivative works, in source code and object code form.
|
||||||
|
b) Subject to the terms of this Agreement, each Contributor hereby grants
|
||||||
|
Recipient a non-exclusive, worldwide, royalty-free patent license under
|
||||||
|
Licensed Patents to make, use, sell, offer to sell, import and otherwise
|
||||||
|
transfer the Contribution of such Contributor, if any, in source code and
|
||||||
|
object code form. This patent license shall apply to the combination of
|
||||||
|
the Contribution and the Program if, at the time the Contribution is
|
||||||
|
added by the Contributor, such addition of the Contribution causes such
|
||||||
|
combination to be covered by the Licensed Patents. The patent license
|
||||||
|
shall not apply to any other combinations which include the Contribution.
|
||||||
|
No hardware per se is licensed hereunder.
|
||||||
|
c) Recipient understands that although each Contributor grants the licenses
|
||||||
|
to its Contributions set forth herein, no assurances are provided by any
|
||||||
|
Contributor that the Program does not infringe the patent or other
|
||||||
|
intellectual property rights of any other entity. Each Contributor
|
||||||
|
disclaims any liability to Recipient for claims brought by any other
|
||||||
|
entity based on infringement of intellectual property rights or
|
||||||
|
otherwise. As a condition to exercising the rights and licenses granted
|
||||||
|
hereunder, each Recipient hereby assumes sole responsibility to secure
|
||||||
|
any other intellectual property rights needed, if any. For example, if a
|
||||||
|
third party patent license is required to allow Recipient to distribute
|
||||||
|
the Program, it is Recipient's responsibility to acquire that license
|
||||||
|
before distributing the Program.
|
||||||
|
d) Each Contributor represents that to its knowledge it has sufficient
|
||||||
|
copyright rights in its Contribution, if any, to grant the copyright
|
||||||
|
license set forth in this Agreement.
|
||||||
|
|
||||||
|
3. REQUIREMENTS
|
||||||
|
|
||||||
|
A Contributor may choose to distribute the Program in object code form under
|
||||||
|
its own license agreement, provided that:
|
||||||
|
|
||||||
|
a) it complies with the terms and conditions of this Agreement; and
|
||||||
|
b) its license agreement:
|
||||||
|
i) effectively disclaims on behalf of all Contributors all warranties
|
||||||
|
and conditions, express and implied, including warranties or
|
||||||
|
conditions of title and non-infringement, and implied warranties or
|
||||||
|
conditions of merchantability and fitness for a particular purpose;
|
||||||
|
ii) effectively excludes on behalf of all Contributors all liability for
|
||||||
|
damages, including direct, indirect, special, incidental and
|
||||||
|
consequential damages, such as lost profits;
|
||||||
|
iii) states that any provisions which differ from this Agreement are
|
||||||
|
offered by that Contributor alone and not by any other party; and
|
||||||
|
iv) states that source code for the Program is available from such
|
||||||
|
Contributor, and informs licensees how to obtain it in a reasonable
|
||||||
|
manner on or through a medium customarily used for software exchange.
|
||||||
|
|
||||||
|
When the Program is made available in source code form:
|
||||||
|
|
||||||
|
a) it must be made available under this Agreement; and
|
||||||
|
b) a copy of this Agreement must be included with each copy of the Program.
|
||||||
|
Contributors may not remove or alter any copyright notices contained
|
||||||
|
within the Program.
|
||||||
|
|
||||||
|
Each Contributor must identify itself as the originator of its Contribution,
|
||||||
|
if
|
||||||
|
any, in a manner that reasonably allows subsequent Recipients to identify the
|
||||||
|
originator of the Contribution.
|
||||||
|
|
||||||
|
4. COMMERCIAL DISTRIBUTION
|
||||||
|
|
||||||
|
Commercial distributors of software may accept certain responsibilities with
|
||||||
|
respect to end users, business partners and the like. While this license is
|
||||||
|
intended to facilitate the commercial use of the Program, the Contributor who
|
||||||
|
includes the Program in a commercial product offering should do so in a manner
|
||||||
|
which does not create potential liability for other Contributors. Therefore,
|
||||||
|
if a Contributor includes the Program in a commercial product offering, such
|
||||||
|
Contributor ("Commercial Contributor") hereby agrees to defend and indemnify
|
||||||
|
every other Contributor ("Indemnified Contributor") against any losses,
|
||||||
|
damages and costs (collectively "Losses") arising from claims, lawsuits and
|
||||||
|
other legal actions brought by a third party against the Indemnified
|
||||||
|
Contributor to the extent caused by the acts or omissions of such Commercial
|
||||||
|
Contributor in connection with its distribution of the Program in a commercial
|
||||||
|
product offering. The obligations in this section do not apply to any claims
|
||||||
|
or Losses relating to any actual or alleged intellectual property
|
||||||
|
infringement. In order to qualify, an Indemnified Contributor must:
|
||||||
|
a) promptly notify the Commercial Contributor in writing of such claim, and
|
||||||
|
b) allow the Commercial Contributor to control, and cooperate with the
|
||||||
|
Commercial Contributor in, the defense and any related settlement
|
||||||
|
negotiations. The Indemnified Contributor may participate in any such claim at
|
||||||
|
its own expense.
|
||||||
|
|
||||||
|
For example, a Contributor might include the Program in a commercial product
|
||||||
|
offering, Product X. That Contributor is then a Commercial Contributor. If
|
||||||
|
that Commercial Contributor then makes performance claims, or offers
|
||||||
|
warranties related to Product X, those performance claims and warranties are
|
||||||
|
such Commercial Contributor's responsibility alone. Under this section, the
|
||||||
|
Commercial Contributor would have to defend claims against the other
|
||||||
|
Contributors related to those performance claims and warranties, and if a
|
||||||
|
court requires any other Contributor to pay any damages as a result, the
|
||||||
|
Commercial Contributor must pay those damages.
|
||||||
|
|
||||||
|
5. NO WARRANTY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR
|
||||||
|
IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,
|
||||||
|
NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each
|
||||||
|
Recipient is solely responsible for determining the appropriateness of using
|
||||||
|
and distributing the Program and assumes all risks associated with its
|
||||||
|
exercise of rights under this Agreement , including but not limited to the
|
||||||
|
risks and costs of program errors, compliance with applicable laws, damage to
|
||||||
|
or loss of data, programs or equipment, and unavailability or interruption of
|
||||||
|
operations.
|
||||||
|
|
||||||
|
6. DISCLAIMER OF LIABILITY
|
||||||
|
|
||||||
|
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY
|
||||||
|
CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION
|
||||||
|
LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||||
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE
|
||||||
|
EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
|
||||||
|
OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
7. GENERAL
|
||||||
|
|
||||||
|
If any provision of this Agreement is invalid or unenforceable under
|
||||||
|
applicable law, it shall not affect the validity or enforceability of the
|
||||||
|
remainder of the terms of this Agreement, and without further action by the
|
||||||
|
parties hereto, such provision shall be reformed to the minimum extent
|
||||||
|
necessary to make such provision valid and enforceable.
|
||||||
|
|
||||||
|
If Recipient institutes patent litigation against any entity (including a
|
||||||
|
cross-claim or counterclaim in a lawsuit) alleging that the Program itself
|
||||||
|
(excluding combinations of the Program with other software or hardware)
|
||||||
|
infringes such Recipient's patent(s), then such Recipient's rights granted
|
||||||
|
under Section 2(b) shall terminate as of the date such litigation is filed.
|
||||||
|
|
||||||
|
All Recipient's rights under this Agreement shall terminate if it fails to
|
||||||
|
comply with any of the material terms or conditions of this Agreement and does
|
||||||
|
not cure such failure in a reasonable period of time after becoming aware of
|
||||||
|
such noncompliance. If all Recipient's rights under this Agreement terminate,
|
||||||
|
Recipient agrees to cease use and distribution of the Program as soon as
|
||||||
|
reasonably practicable. However, Recipient's obligations under this Agreement
|
||||||
|
and any licenses granted by Recipient relating to the Program shall continue
|
||||||
|
and survive.
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute copies of this Agreement, but in
|
||||||
|
order to avoid inconsistency the Agreement is copyrighted and may only be
|
||||||
|
modified in the following manner. The Agreement Steward reserves the right to
|
||||||
|
publish new versions (including revisions) of this Agreement from time to
|
||||||
|
time. No one other than the Agreement Steward has the right to modify this
|
||||||
|
Agreement. The Eclipse Foundation is the initial Agreement Steward. The
|
||||||
|
Eclipse Foundation may assign the responsibility to serve as the Agreement
|
||||||
|
Steward to a suitable separate entity. Each new version of the Agreement will
|
||||||
|
be given a distinguishing version number. The Program (including
|
||||||
|
Contributions) may always be distributed subject to the version of the
|
||||||
|
Agreement under which it was received. In addition, after a new version of the
|
||||||
|
Agreement is published, Contributor may elect to distribute the Program
|
||||||
|
(including its Contributions) under the new version. Except as expressly
|
||||||
|
stated in Sections 2(a) and 2(b) above, Recipient receives no rights or
|
||||||
|
licenses to the intellectual property of any Contributor under this Agreement,
|
||||||
|
whether expressly, by implication, estoppel or otherwise. All rights in the
|
||||||
|
Program not expressly granted under this Agreement are reserved.
|
||||||
|
|
||||||
|
This Agreement is governed by the laws of the State of New York and the
|
||||||
|
intellectual property laws of the United States of America. No party to this
|
||||||
|
Agreement will bring a legal action under this Agreement more than one year
|
||||||
|
after the cause of action arose. Each party waives its rights to a jury trial in
|
||||||
|
any resulting litigation.
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
SCViewer
|
||||||
|
========
|
||||||
|
|
||||||
|
SCViewer is composed of a set of eclipse plugins to display VCD and transaction streams
|
||||||
|
created by the SystemC VCD trace implementation and the SystemC Verification Library (SCV).
|
||||||
|
For further description of the SCV please refer to
|
||||||
|
http://www.accellera.org/activities/committees/systemc-verification.
|
||||||
|
|
||||||
|
> If you encounter issue when running on Linux please try running as `SWT_GTK3=0 scviewer` as there exist issues wiht GTK3.
|
||||||
|
|
||||||
|
The viewer has the following features
|
||||||
|
- support of VCD files (compressed and uncompressed)
|
||||||
|
- real numbers
|
||||||
|
- showing vectors and real numbers as analog (step-wise & continuous)
|
||||||
|
- various value representations of bit vectors
|
||||||
|
- support of SCV transaction recordings in various formats
|
||||||
|
- text log files (compressed and uncompressed)
|
||||||
|
- sqlite based
|
||||||
|
- visualization of transaction relations
|
||||||
|
|
||||||
|
To build the plugins the Eclipse SDK or PDE can be used. In both cases the Groovy
|
||||||
|
eclipse plugin (http://groovy.codehaus.org/Eclipse+Plugin or Market) has to be
|
||||||
|
installed.
|
||||||
|
|
||||||
|
TODO
|
||||||
|
====
|
||||||
|
- add more tests
|
||||||
|
- move to feature based product to allow automatic updates
|
||||||
|
- improve graphics
|
||||||
|
- catch-up e3 plugin to functionality of e4 product
|
||||||
|
- add calculated traces
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
theme: jekyll-theme-minimal
|
|
||||||
logo: /assets/img/SCViewer_logo.png
|
|
||||||
title: SCViewer
|
|
||||||
description: A a simple tool to display waveforms
|
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.target</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
encoding/<project>=UTF-8
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?pde version="3.8"?>
|
||||||
|
<target name="com.minres.scviewer.target" sequenceNumber="138">
|
||||||
|
<locations>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="http://download.eclipse.org/releases/2020-03/"/>
|
||||||
|
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
|
||||||
|
<unit id="org.eclipse.equinox.p2.sdk.feature.jar" version="0.0.0"/> <!-- needed by Linux exectable-->
|
||||||
|
<unit id="org.eclipse.equinox.sdk.feature.group" version="0.0.0"/>
|
||||||
|
<unit id="org.eclipse.platform.sdk" version="0.0.0"/>
|
||||||
|
<unit id="org.eclipse.sdk.feature.group" version="0.0.0"/> <!-- org.eclipse.equinox.p2.iu -->
|
||||||
|
<unit id="org.eclipse.rcptt.core.feature.group" version="0.0.0"/><!-- com.google.guave-->
|
||||||
|
<unit id="org.eclipse.pde.feature.group" version="0.0.0"/> <!-- org.junit for testing -->
|
||||||
|
</location>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="https://www.opcoach.com/repository/2020-03/"/>
|
||||||
|
<unit id="com.opcoach.e4.preferences.feature.feature.group" version="0.0.0"/>
|
||||||
|
</location>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="http://dist.springsource.org/snapshot/GRECLIPSE/e4.15/"/>
|
||||||
|
<unit id="org.codehaus.groovy25.feature.feature.group" version="0.0.0"/>
|
||||||
|
</location>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="http://download.eclipse.org/nattable/releases/1.6.0/repository/"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.nattable.core.feature.feature.group" version="1.6.0.201909181823"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.nattable.extension.e4.feature.feature.group" version="1.2.0.201909181823"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.nattable.extension.glazedlists.feature.feature.group" version="1.6.0.201909181823"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.nattable.extension.poi.feature.feature.group" version="1.5.1.201909181823"/>
|
||||||
|
</location>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="http://download.eclipse.org/nebula/releases/latest"/>
|
||||||
|
<unit id="org.eclipse.nebula.widgets.xviewer.feature.feature.group" version="1.1.0.202011020719"/>
|
||||||
|
</location>
|
||||||
|
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
|
||||||
|
<repository location="http://download.eclipse.org/collections/10.4.0/repository"/>
|
||||||
|
<unit id="org.eclipse.collections.feature.feature.group" version="0.0.0"/>
|
||||||
|
<unit id="org.eclipse.collections.feature.source.feature.group" version="0.0.0"/>
|
||||||
|
</location>
|
||||||
|
</locations>
|
||||||
|
<targetJRE path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
|
<launcherArgs>
|
||||||
|
<vmArgs>-Xms40m -Xmx2G</vmArgs>
|
||||||
|
</launcherArgs>
|
||||||
|
</target>
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
<artifactId>com.minres.scviewer.target</artifactId>
|
||||||
|
|
||||||
|
<packaging>eclipse-target-definition</packaging>
|
||||||
|
<name>SCViewer Target Definition</name>
|
||||||
|
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>..</relativePath>
|
||||||
|
</parent>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.database.feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
bin.includes = feature.xml,\
|
||||||
|
feature.properties
|
||||||
|
src.includes = feature.properties,\
|
||||||
|
feature.xml
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
featureName=SystemC simulation results viewer database loaders
|
||||||
|
providerName=MINRES Technologies GmbH
|
||||||
|
updateSiteName=SC Viewer Database Loader Updates
|
||||||
|
description=A viewer for SystemC Verification Library transactions and VCD signals.
|
||||||
|
licenseURL=license.html
|
||||||
|
license=\
|
||||||
|
ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
|
||||||
|
March 17, 2005\n\
|
||||||
|
\n\
|
||||||
|
Usage Of Content\n\
|
||||||
|
\n\
|
||||||
|
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
|
||||||
|
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
|
||||||
|
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
|
||||||
|
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
|
||||||
|
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
|
||||||
|
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
|
||||||
|
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
|
||||||
|
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
|
||||||
|
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
|
||||||
|
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
|
||||||
|
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
|
||||||
|
\n\
|
||||||
|
Applicable Licenses\n\
|
||||||
|
\n\
|
||||||
|
Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
|
||||||
|
is provided to you under the terms and conditions of the Eclipse Public\n\
|
||||||
|
License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
|
||||||
|
Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
|
||||||
|
For purposes of the EPL, "Program" will mean the Content.\n\
|
||||||
|
\n\
|
||||||
|
Content includes, but is not limited to, source code, object code,\n\
|
||||||
|
documentation and other files maintained in the Eclipse.org CVS\n\
|
||||||
|
repository ("Repository") in CVS modules ("Modules") and made available\n\
|
||||||
|
as downloadable archives ("Downloads").\n\
|
||||||
|
\n\
|
||||||
|
- Content may be structured and packaged into modules to facilitate delivering,\n\
|
||||||
|
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
|
||||||
|
plug-in fragments ("Fragments"), and features ("Features").\n\
|
||||||
|
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
|
||||||
|
in a directory named "plugins".\n\
|
||||||
|
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
|
||||||
|
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
|
||||||
|
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
|
||||||
|
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
|
||||||
|
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
|
||||||
|
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
|
||||||
|
\n\
|
||||||
|
Features may also include other Features ("Included Features"). Files named\n\
|
||||||
|
"feature.xml" may contain a list of the names and version numbers of\n\
|
||||||
|
Included Features.\n\
|
||||||
|
\n\
|
||||||
|
The terms and conditions governing Plug-ins and Fragments should be\n\
|
||||||
|
contained in files named "about.html" ("Abouts"). The terms and\n\
|
||||||
|
conditions governing Features and Included Features should be contained\n\
|
||||||
|
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
|
||||||
|
Licenses may be located in any directory of a Download or Module\n\
|
||||||
|
including, but not limited to the following locations:\n\
|
||||||
|
\n\
|
||||||
|
- The top-level (root) directory\n\
|
||||||
|
- Plug-in and Fragment directories\n\
|
||||||
|
- Inside Plug-ins and Fragments packaged as JARs\n\
|
||||||
|
- Sub-directories of the directory named "src" of certain Plug-ins\n\
|
||||||
|
- Feature directories\n\
|
||||||
|
\n\
|
||||||
|
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
|
||||||
|
Eclipse Update Manager, you must agree to a license ("Feature Update\n\
|
||||||
|
License") during the installation process. If the Feature contains\n\
|
||||||
|
Included Features, the Feature Update License should either provide you\n\
|
||||||
|
with the terms and conditions governing the Included Features or inform\n\
|
||||||
|
you where you can locate them. Feature Update Licenses may be found in\n\
|
||||||
|
the "license" property of files named "feature.properties". Such Abouts,\n\
|
||||||
|
Feature Licenses and Feature Update Licenses contain the terms and\n\
|
||||||
|
conditions (or references to such terms and conditions) that govern your\n\
|
||||||
|
use of the associated Content in that directory.\n\
|
||||||
|
\n\
|
||||||
|
THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
|
||||||
|
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
|
||||||
|
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
|
||||||
|
\n\
|
||||||
|
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
|
||||||
|
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
|
||||||
|
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
|
||||||
|
- IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
|
||||||
|
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
|
||||||
|
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
|
||||||
|
\n\
|
||||||
|
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
|
||||||
|
TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
|
||||||
|
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
|
||||||
|
govern that particular Content.\n\
|
||||||
|
\n\
|
||||||
|
Cryptography\n\
|
||||||
|
\n\
|
||||||
|
Content may contain encryption software. The country in which you are\n\
|
||||||
|
currently may have restrictions on the import, possession, and use,\n\
|
||||||
|
and/or re-export to another country, of encryption software. BEFORE\n\
|
||||||
|
using any encryption software, please check the country's laws,\n\
|
||||||
|
regulations and policies concerning the import, possession, or use,\n\
|
||||||
|
and re-export of encryption software, to see if this is permitted.\n\
|
||||||
|
\n\
|
||||||
|
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<feature
|
||||||
|
id="com.minres.scviewer.database.feature"
|
||||||
|
label="%featureName"
|
||||||
|
version="3.0.0.qualifier"
|
||||||
|
provider-name="%providerName">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
The database loaders for SystemC Verification Library transactions and VCD signals. They support SQLite based recording as well as the built-in text base recording.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
Copyright (c) 2015-2021 MINRES Technologies GmbH.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Eclipse Public License
|
||||||
|
v1.0 which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="%licenseURL">
|
||||||
|
%license
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<update label="%updateSiteName" url="http://www.minres.com/scviewer/update"/>
|
||||||
|
<discovery label="MINRES Website" url="http://www.minres.com"/>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="org.codehaus.groovy" version="2.5.8" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.osgi.services" version="3.4.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="com.google.guava" version="15.0.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.osgi"/>
|
||||||
|
<import plugin="com.minres.scviewer.database" version="1.0.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.database"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.database.text"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.database.sqlite"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.database.vcd"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.google.guava"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.database.feature</artifactId>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<version>3.0.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.e4.feature</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>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
bin.includes = feature.xml
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<feature
|
||||||
|
id="com.minres.scviewer.e4.feature"
|
||||||
|
label="SCViewer Feature"
|
||||||
|
version="1.1.0.qualifier"
|
||||||
|
provider-name="MINRES Technologies GmbH">
|
||||||
|
|
||||||
|
<description url="http://www.example.com/description">
|
||||||
|
[Enter Feature Description here.]
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright url="http://www.example.com/copyright">
|
||||||
|
[Enter Copyright Description here.]
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="http://www.example.com/license">
|
||||||
|
[Enter License Description here.]
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<update label="SC Viewer Updates" url="http://www.minres.com/scviewer/update"/>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="javax.inject" version="1.0.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime" version="3.11.1" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.swt" version="3.104.1" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.ui.model.workbench" version="1.1.100" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.jface" version="3.11.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.ui.services" version="1.2.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.ui.workbench" version="1.3.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.core.di" version="1.5.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.ui.di" version="1.1.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.core.contexts" version="1.4.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.osgi.services" version="3.5.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.core.services" version="2.0.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.core.jobs"/>
|
||||||
|
<import plugin="org.eclipse.osgi"/>
|
||||||
|
<import plugin="org.eclipse.equinox.preferences"/>
|
||||||
|
<import plugin="org.eclipse.core.expressions"/>
|
||||||
|
<import plugin="org.eclipse.e4.core.commands" version="0.11.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.e4.core.di.extensions"/>
|
||||||
|
<import plugin="org.eclipse.e4.ui.css.swt.theme" version="0.10.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.core.resources" version="3.13.0" match="greaterOrEqual"/>
|
||||||
|
<import feature="com.opcoach.e4.preferences.feature" version="1.3.0.202004072127"/>
|
||||||
|
<import feature="org.eclipse.equinox.executable" version="3.8.700.v20200207-2156"/>
|
||||||
|
<import feature="org.eclipse.rcptt.core" version="2.5.1.M3"/>
|
||||||
|
<import plugin="org.eclipse.core.commands"/>
|
||||||
|
<import feature="com.minres.scviewer.database.feature" version="3.0.0.qualifier"/>
|
||||||
|
<import feature="com.minres.scviewer.ui.feature" version="1.1.0.qualifier"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.e4.application"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.opcoach.e4.preferences"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.e4.feature</artifactId>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.e4.platform.feature</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>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
bin.includes = feature.xml
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<feature
|
||||||
|
id="com.minres.scviewer.e4.platform.feature"
|
||||||
|
label="SCViewer Platform Feature"
|
||||||
|
version="1.0.0.qualifier"
|
||||||
|
provider-name="MINRES Technologies GmbH">
|
||||||
|
|
||||||
|
<description url="http://www.example.com/description">
|
||||||
|
[Enter Feature Description here.]
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright url="http://www.example.com/copyright">
|
||||||
|
[Enter Copyright Description here.]
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="http://www.example.com/license">
|
||||||
|
[Enter License Description here.]
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<includes
|
||||||
|
id="org.eclipse.e4.rcp"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<includes
|
||||||
|
id="org.eclipse.emf.ecore"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<includes
|
||||||
|
id="org.eclipse.emf.common"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="org.eclipse.core.expressions" version="3.2.0" match="compatible"/>
|
||||||
|
<import plugin="org.eclipse.core.filesystem" version="1.3.0" match="compatible"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime" version="3.12.0" match="compatible"/>
|
||||||
|
<import plugin="org.eclipse.equinox.common" version="3.2.0" match="compatible"/>
|
||||||
|
<import plugin="org.eclipse.equinox.registry" version="3.2.0" match="compatible"/>
|
||||||
|
<import plugin="org.eclipse.osgi" version="3.2.0" match="compatible"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.core.resources"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.core.filesystem"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.core.filesystem.linux.x86_64"
|
||||||
|
os="linux"
|
||||||
|
arch="x86_64"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
fragment="true"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.eclipse.core.filesystem.win32.x86_64"
|
||||||
|
os="win32"
|
||||||
|
arch="x86_64"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
fragment="true"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.e4.platform.feature</artifactId>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.feature</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
bin.includes = feature.xml,\
|
||||||
|
feature.properties
|
||||||
|
src.includes = feature.properties,\
|
||||||
|
feature.xml
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
featureName=SystemC simulation results viewer
|
||||||
|
providerName=MINRES Technologies GmbH
|
||||||
|
updateSiteName=SC Viewer Updates
|
||||||
|
description=A viewer for SystemC Verification Library transactions and VCD signals.
|
||||||
|
licenseURL=license.html
|
||||||
|
license=\
|
||||||
|
ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
|
||||||
|
March 17, 2005\n\
|
||||||
|
\n\
|
||||||
|
Usage Of Content\n\
|
||||||
|
\n\
|
||||||
|
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
|
||||||
|
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
|
||||||
|
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
|
||||||
|
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
|
||||||
|
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
|
||||||
|
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
|
||||||
|
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
|
||||||
|
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
|
||||||
|
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
|
||||||
|
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
|
||||||
|
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
|
||||||
|
\n\
|
||||||
|
Applicable Licenses\n\
|
||||||
|
\n\
|
||||||
|
Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
|
||||||
|
is provided to you under the terms and conditions of the Eclipse Public\n\
|
||||||
|
License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
|
||||||
|
Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
|
||||||
|
For purposes of the EPL, "Program" will mean the Content.\n\
|
||||||
|
\n\
|
||||||
|
Content includes, but is not limited to, source code, object code,\n\
|
||||||
|
documentation and other files maintained in the Eclipse.org CVS\n\
|
||||||
|
repository ("Repository") in CVS modules ("Modules") and made available\n\
|
||||||
|
as downloadable archives ("Downloads").\n\
|
||||||
|
\n\
|
||||||
|
- Content may be structured and packaged into modules to facilitate delivering,\n\
|
||||||
|
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
|
||||||
|
plug-in fragments ("Fragments"), and features ("Features").\n\
|
||||||
|
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
|
||||||
|
in a directory named "plugins".\n\
|
||||||
|
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
|
||||||
|
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
|
||||||
|
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
|
||||||
|
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
|
||||||
|
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
|
||||||
|
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
|
||||||
|
\n\
|
||||||
|
Features may also include other Features ("Included Features"). Files named\n\
|
||||||
|
"feature.xml" may contain a list of the names and version numbers of\n\
|
||||||
|
Included Features.\n\
|
||||||
|
\n\
|
||||||
|
The terms and conditions governing Plug-ins and Fragments should be\n\
|
||||||
|
contained in files named "about.html" ("Abouts"). The terms and\n\
|
||||||
|
conditions governing Features and Included Features should be contained\n\
|
||||||
|
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
|
||||||
|
Licenses may be located in any directory of a Download or Module\n\
|
||||||
|
including, but not limited to the following locations:\n\
|
||||||
|
\n\
|
||||||
|
- The top-level (root) directory\n\
|
||||||
|
- Plug-in and Fragment directories\n\
|
||||||
|
- Inside Plug-ins and Fragments packaged as JARs\n\
|
||||||
|
- Sub-directories of the directory named "src" of certain Plug-ins\n\
|
||||||
|
- Feature directories\n\
|
||||||
|
\n\
|
||||||
|
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
|
||||||
|
Eclipse Update Manager, you must agree to a license ("Feature Update\n\
|
||||||
|
License") during the installation process. If the Feature contains\n\
|
||||||
|
Included Features, the Feature Update License should either provide you\n\
|
||||||
|
with the terms and conditions governing the Included Features or inform\n\
|
||||||
|
you where you can locate them. Feature Update Licenses may be found in\n\
|
||||||
|
the "license" property of files named "feature.properties". Such Abouts,\n\
|
||||||
|
Feature Licenses and Feature Update Licenses contain the terms and\n\
|
||||||
|
conditions (or references to such terms and conditions) that govern your\n\
|
||||||
|
use of the associated Content in that directory.\n\
|
||||||
|
\n\
|
||||||
|
THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
|
||||||
|
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
|
||||||
|
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
|
||||||
|
\n\
|
||||||
|
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
|
||||||
|
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
|
||||||
|
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
|
||||||
|
- IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
|
||||||
|
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
|
||||||
|
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
|
||||||
|
\n\
|
||||||
|
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
|
||||||
|
TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
|
||||||
|
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
|
||||||
|
govern that particular Content.\n\
|
||||||
|
\n\
|
||||||
|
Cryptography\n\
|
||||||
|
\n\
|
||||||
|
Content may contain encryption software. The country in which you are\n\
|
||||||
|
currently may have restrictions on the import, possession, and use,\n\
|
||||||
|
and/or re-export to another country, of encryption software. BEFORE\n\
|
||||||
|
using any encryption software, please check the country's laws,\n\
|
||||||
|
regulations and policies concerning the import, possession, or use,\n\
|
||||||
|
and re-export of encryption software, to see if this is permitted.\n\
|
||||||
|
\n\
|
||||||
|
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<feature
|
||||||
|
id="com.minres.scviewer.feature"
|
||||||
|
label="%featureName"
|
||||||
|
version="1.1.0.qualifier"
|
||||||
|
provider-name="%providerName">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
A viewer for SystemC Verification Library transactions and VCD
|
||||||
|
signals. It supports a SQLite based recording as well as the
|
||||||
|
built-in text base recording.
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
Copyright (c) 2015-2021 MINRES Technologies GmbH.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Eclipse Public License
|
||||||
|
v1.0 which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="%licenseURL">
|
||||||
|
%license
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<discovery label="MINRES Website" url="http://www.minres.com"/>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="org.hamcrest.core" version="1.3.0" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
|
<import plugin="org.eclipse.core.resources"/>
|
||||||
|
<import plugin="org.eclipse.jface.text"/>
|
||||||
|
<import plugin="org.eclipse.ui"/>
|
||||||
|
<import plugin="org.eclipse.ui.editors"/>
|
||||||
|
<import plugin="org.eclipse.ui.ide"/>
|
||||||
|
<import plugin="org.eclipse.ui.views.properties.tabbed"/>
|
||||||
|
<import plugin="org.eclipse.swt"/>
|
||||||
|
<import plugin="org.eclipse.osgi"/>
|
||||||
|
<import plugin="org.eclipse.core.expressions" version="3.4.600" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.jface"/>
|
||||||
|
<import feature="com.minres.scviewer.database.feature" version="3.0.0.qualifier"/>
|
||||||
|
<import feature="com.minres.scviewer.ui.feature" version="1.1.0.qualifier"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.junit"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="org.hamcrest.core"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.ui"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.feature</artifactId>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
/target/
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.ui.feature</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>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
bin.includes = feature.xml,\
|
||||||
|
feature.properties
|
||||||
|
src.includes = feature.properties,\
|
||||||
|
feature.xml
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
featureName=SCViewer UI elements
|
||||||
|
providerName=MINRES Technologies GmbH
|
||||||
|
updateSiteName=SC Viewer UI Updates
|
||||||
|
description=A viewer for SystemC Verification Library transactions and VCD signals.
|
||||||
|
licenseURL=license.html
|
||||||
|
license=\
|
||||||
|
ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\
|
||||||
|
March 17, 2005\n\
|
||||||
|
\n\
|
||||||
|
Usage Of Content\n\
|
||||||
|
\n\
|
||||||
|
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
|
||||||
|
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
|
||||||
|
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
|
||||||
|
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
|
||||||
|
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
|
||||||
|
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
|
||||||
|
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
|
||||||
|
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
|
||||||
|
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
|
||||||
|
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
|
||||||
|
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
|
||||||
|
\n\
|
||||||
|
Applicable Licenses\n\
|
||||||
|
\n\
|
||||||
|
Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\
|
||||||
|
is provided to you under the terms and conditions of the Eclipse Public\n\
|
||||||
|
License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\
|
||||||
|
Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
|
||||||
|
For purposes of the EPL, "Program" will mean the Content.\n\
|
||||||
|
\n\
|
||||||
|
Content includes, but is not limited to, source code, object code,\n\
|
||||||
|
documentation and other files maintained in the Eclipse.org CVS\n\
|
||||||
|
repository ("Repository") in CVS modules ("Modules") and made available\n\
|
||||||
|
as downloadable archives ("Downloads").\n\
|
||||||
|
\n\
|
||||||
|
- Content may be structured and packaged into modules to facilitate delivering,\n\
|
||||||
|
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
|
||||||
|
plug-in fragments ("Fragments"), and features ("Features").\n\
|
||||||
|
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\
|
||||||
|
in a directory named "plugins".\n\
|
||||||
|
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
|
||||||
|
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
|
||||||
|
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
|
||||||
|
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
|
||||||
|
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
|
||||||
|
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
|
||||||
|
\n\
|
||||||
|
Features may also include other Features ("Included Features"). Files named\n\
|
||||||
|
"feature.xml" may contain a list of the names and version numbers of\n\
|
||||||
|
Included Features.\n\
|
||||||
|
\n\
|
||||||
|
The terms and conditions governing Plug-ins and Fragments should be\n\
|
||||||
|
contained in files named "about.html" ("Abouts"). The terms and\n\
|
||||||
|
conditions governing Features and Included Features should be contained\n\
|
||||||
|
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
|
||||||
|
Licenses may be located in any directory of a Download or Module\n\
|
||||||
|
including, but not limited to the following locations:\n\
|
||||||
|
\n\
|
||||||
|
- The top-level (root) directory\n\
|
||||||
|
- Plug-in and Fragment directories\n\
|
||||||
|
- Inside Plug-ins and Fragments packaged as JARs\n\
|
||||||
|
- Sub-directories of the directory named "src" of certain Plug-ins\n\
|
||||||
|
- Feature directories\n\
|
||||||
|
\n\
|
||||||
|
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
|
||||||
|
Eclipse Update Manager, you must agree to a license ("Feature Update\n\
|
||||||
|
License") during the installation process. If the Feature contains\n\
|
||||||
|
Included Features, the Feature Update License should either provide you\n\
|
||||||
|
with the terms and conditions governing the Included Features or inform\n\
|
||||||
|
you where you can locate them. Feature Update Licenses may be found in\n\
|
||||||
|
the "license" property of files named "feature.properties". Such Abouts,\n\
|
||||||
|
Feature Licenses and Feature Update Licenses contain the terms and\n\
|
||||||
|
conditions (or references to such terms and conditions) that govern your\n\
|
||||||
|
use of the associated Content in that directory.\n\
|
||||||
|
\n\
|
||||||
|
THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\
|
||||||
|
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
|
||||||
|
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
|
||||||
|
\n\
|
||||||
|
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
|
||||||
|
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
|
||||||
|
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
|
||||||
|
- IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
|
||||||
|
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
|
||||||
|
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
|
||||||
|
\n\
|
||||||
|
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
|
||||||
|
TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\
|
||||||
|
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
|
||||||
|
govern that particular Content.\n\
|
||||||
|
\n\
|
||||||
|
Cryptography\n\
|
||||||
|
\n\
|
||||||
|
Content may contain encryption software. The country in which you are\n\
|
||||||
|
currently may have restrictions on the import, possession, and use,\n\
|
||||||
|
and/or re-export to another country, of encryption software. BEFORE\n\
|
||||||
|
using any encryption software, please check the country's laws,\n\
|
||||||
|
regulations and policies concerning the import, possession, or use,\n\
|
||||||
|
and re-export of encryption software, to see if this is permitted.\n\
|
||||||
|
\n\
|
||||||
|
Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<feature
|
||||||
|
id="com.minres.scviewer.ui.feature"
|
||||||
|
label="%featureName"
|
||||||
|
version="1.1.0.qualifier"
|
||||||
|
provider-name="%providerName">
|
||||||
|
|
||||||
|
<description>
|
||||||
|
The UI for the SCViewer databases
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<copyright>
|
||||||
|
Copyright (c) 2015-2021 MINRES Technologies GmbH.
|
||||||
|
All rights reserved. This program and the accompanying materials
|
||||||
|
are made available under the terms of the Eclipse Public License
|
||||||
|
v1.0 which accompanies this distribution, and is available at
|
||||||
|
http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
</copyright>
|
||||||
|
|
||||||
|
<license url="%licenseURL">
|
||||||
|
%license
|
||||||
|
</license>
|
||||||
|
|
||||||
|
<url>
|
||||||
|
<discovery label="MINRES Website" url="http://www.minres.com"/>
|
||||||
|
</url>
|
||||||
|
|
||||||
|
<requires>
|
||||||
|
<import plugin="org.eclipse.swt" version="3.103.1" match="greaterOrEqual"/>
|
||||||
|
<import plugin="org.eclipse.jface"/>
|
||||||
|
<import plugin="org.eclipse.equinox.registry"/>
|
||||||
|
<import plugin="org.eclipse.core.runtime"/>
|
||||||
|
<import plugin="org.eclipse.osgi"/>
|
||||||
|
<import feature="com.minres.scviewer.database.feature" version="3.0.0.qualifier"/>
|
||||||
|
</requires>
|
||||||
|
|
||||||
|
<plugin
|
||||||
|
id="com.minres.scviewer.database.ui.swt"
|
||||||
|
download-size="0"
|
||||||
|
install-size="0"
|
||||||
|
version="0.0.0"
|
||||||
|
unpack="false"/>
|
||||||
|
|
||||||
|
</feature>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.ui.feature</artifactId>
|
||||||
|
<packaging>eclipse-feature</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
# Welcome to SCViewer
|
|
||||||
|
|
||||||
SCViewer is a simple tool to display VCD and transaction streams created by the SystemC VCD trace implementation and the SystemC Verification Library (SCV).
|
|
||||||
The viewer has the following features
|
|
||||||
* support of VCD files (compressed and uncompressed)
|
|
||||||
* real numbers
|
|
||||||
* showing vectors and real numbers as analog (step-wise & continuous)
|
|
||||||
* various value representations of bit vectors
|
|
||||||
* support of SCV transaction recordings in various formats
|
|
||||||
* text log files (compressed and uncompressed)
|
|
||||||
* visualization of transaction relations
|
|
||||||
|
|
||||||
SCViewer is available as standalone version and can be downloaded at [Github](https://github.com/Minres/SCViewer/releases).
|
|
||||||
|
|
||||||
It can also be installed into an Eclipse application by using the update site at https://minres.github.io/SCViewer/repository.
|
|
||||||
|
|
||||||
> Please note that this is work in progress
|
|
||||||
|
|
||||||
------------------------
|
|
||||||
|
|
||||||
# Help
|
|
||||||
|
|
||||||
## Key Shortcuts
|
|
||||||
|
|
||||||
Legend:
|
|
||||||
|
|
||||||
* Left Mouse Button: LMB
|
|
||||||
* Middle Mouse Button: MMB
|
|
||||||
* Mouse Scroll wheel: MScrl
|
|
||||||
* Context any means Name List, Value List or Waveform
|
|
||||||
|
|
||||||
| Input | Modifier | Context | Action |
|
|
||||||
|-----------|----------|----------|-----------------------------------|
|
|
||||||
| LMB klick | | any | select |
|
|
||||||
| LMB klick | Shift | Waveform | move selected marker to position |
|
|
||||||
| LMB klick | Control | Waveform | move cursor to position |
|
|
||||||
| LMB drag | | Waveform | zoom to range |
|
|
||||||
| MMB klick | | Waveform | move selected marker to position |
|
|
||||||
| MScrl | | any | scroll window up/down |
|
|
||||||
| MScrl | Shift | any | scroll window left/right |
|
|
||||||
| MScrl | Control | Waveform | increase/decrease zoom level |
|
|
||||||
| Key left | | Waveform | scroll window to the left (slow) |
|
|
||||||
| Key right | | Waveform | scroll window to the right (slow) |
|
|
||||||
| Key left | Shift | Waveform | scroll window to the left (fast) |
|
|
||||||
| Key right | Shift | Waveform | scroll window to the right (fast) |
|
|
||||||
| Key up | | Waveform | move selection up |
|
|
||||||
| Key down | | Waveform | move selection down |
|
|
||||||
| Key up | Control | Waveform | move selected track up |
|
|
||||||
| Key down | Control | Waveform | move selected track down |
|
|
||||||
| Key + | Control | Waveform | zoom in |
|
|
||||||
| Key - | Control | Waveform | zoom out |
|
|
||||||
| Key Pos1 | | Waveform | jump to selected marker |
|
|
||||||
| Key End | | Waveform | jump to cursor |
|
|
||||||
| Key Del | | any | delete selected entries |
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
/features/
|
||||||
|
/plugins/
|
||||||
|
/artifacts.jar
|
||||||
|
/content.jar
|
||||||
|
/target/
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.updateSite</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.UpdateSiteBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.pde.UpdateSiteNature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<site>
|
||||||
|
<feature id="com.minres.scviewer.feature" version="0.0.0">
|
||||||
|
<category name="ide_components"/>
|
||||||
|
</feature>
|
||||||
|
<feature id="com.minres.scviewer.feature.source" version="0.0.0">
|
||||||
|
<category name="ide_components"/>
|
||||||
|
</feature>
|
||||||
|
<feature id="com.minres.scviewer.ui.feature" version="0.0.0">
|
||||||
|
<category name="devel_components"/>
|
||||||
|
</feature>
|
||||||
|
<feature id="com.minres.scviewer.ui.feature.source" version="0.0.0">
|
||||||
|
<category name="devel_components.source"/>
|
||||||
|
</feature>
|
||||||
|
<feature id="com.minres.scviewer.database.feature" version="0.0.0">
|
||||||
|
<category name="devel_components"/>
|
||||||
|
</feature>
|
||||||
|
<feature id="com.minres.scviewer.database.feature.source" version="0.0.0">
|
||||||
|
<category name="devel_components.source"/>
|
||||||
|
</feature>
|
||||||
|
<category-def name="ide_components" label="SCViewer">
|
||||||
|
<description>
|
||||||
|
Viewer for transaction recording outputs of the SystemC Verification (SCV) library
|
||||||
|
</description>
|
||||||
|
</category-def>
|
||||||
|
<category-def name="devel_components" label="Developer Resources">
|
||||||
|
<description>
|
||||||
|
Components to deal with the transaction recording outputs of the SystemC Verification (SCV) library
|
||||||
|
</description>
|
||||||
|
</category-def>
|
||||||
|
<category-def name="devel_components.source" label="Developer Resources (Source)"/>
|
||||||
|
</site>
|
||||||
@@ -0,0 +1,86 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.updateSite</artifactId>
|
||||||
|
<version>2.11.0-SNAPSHOT</version>
|
||||||
|
<packaging>eclipse-repository</packaging>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<!-- make sure that zipped p2 repositories have the fully qualified version -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.eclipse.tycho</groupId>
|
||||||
|
<artifactId>tycho-p2-repository-plugin</artifactId>
|
||||||
|
<version>${tycho-version}</version>
|
||||||
|
<configuration>
|
||||||
|
<finalName>${project.artifactId}-${qualifiedVersion}</finalName>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>parse-version</id>
|
||||||
|
<goals>
|
||||||
|
<goal>parse-version</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<!-- Activate this profile to perform the release to Bintray -->
|
||||||
|
<id>release-composite</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>false</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>com.carrotgarden.maven</groupId>
|
||||||
|
<artifactId>bintray-maven-plugin</artifactId>
|
||||||
|
<version>1.5.20191113165555</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>false</skip>
|
||||||
|
<!-- Bintray organization name. -->
|
||||||
|
<subject>minres</subject>
|
||||||
|
<!-- Bintray target repository. -->
|
||||||
|
<repository>eclipse</repository>
|
||||||
|
<!-- Bintray package name. -->
|
||||||
|
<bintrayPackage>SCViewer</bintrayPackage>
|
||||||
|
<bintrayVersion>${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</bintrayVersion>
|
||||||
|
<packageVcsUrl>https://git.minres.com/VP-Tools/SCViewer.git</packageVcsUrl>
|
||||||
|
<!-- Local folder content to sync to the remote repo. -->
|
||||||
|
<sourceFolder>${project.build.directory}/repository</sourceFolder>
|
||||||
|
<!-- Remote folder for local content upload, relative path. -->
|
||||||
|
<targetFolder>scviewer-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}</targetFolder>
|
||||||
|
|
||||||
|
<!-- Bintray credentials in settings.xml. -->
|
||||||
|
<serverId>bintray-minres-deploy</serverId>
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<!-- Activate "bintray:upload" during "package" -->
|
||||||
|
<execution>
|
||||||
|
<phase>package</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>upload</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry exported="true" kind="lib" path="json-20180813.jar" sourcepath="json-20180813-sources.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="leveldb-0.11-SNAPSHOT-uber.jar" sourcepath="leveldb-0.11-SNAPSHOT-sources.jar"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="output" path="bin"/>
|
||||||
|
</classpath>
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
/json-20180813-sources.jar
|
||||||
|
/leveldb-0.11-SNAPSHOT-sources.jar
|
||||||
|
/bin/
|
||||||
|
/target/
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.database.leveldb</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.ds.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
pluginProject.equinox=false
|
||||||
|
pluginProject.extensions=false
|
||||||
|
resolve.requirebundle=false
|
||||||
+5
@@ -0,0 +1,5 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
enabled=true
|
||||||
|
path=OSGI-INF
|
||||||
|
validationErrorLevel=error
|
||||||
|
validationErrorLevel.missingImplicitUnbindMethod=error
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Leveldb
|
||||||
|
Bundle-SymbolicName: com.minres.scviewer.database.leveldb
|
||||||
|
Bundle-Version: 1.0.0.qualifier
|
||||||
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
|
Import-Package: org.osgi.framework;version="1.3.0"
|
||||||
|
Automatic-Module-Name: com.minres.scviewer.database.leveldb
|
||||||
|
Service-Component: OSGI-INF/*.xml
|
||||||
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0",
|
||||||
|
org.eclipse.osgi.services;bundle-version="3.4.0"
|
||||||
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Bundle-ClassPath: leveldb-0.11-SNAPSHOT-uber.jar,
|
||||||
|
.,
|
||||||
|
json-20180813.jar
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="LevelDbLoader">
|
||||||
|
<implementation class="com.minres.scviewer.database.leveldb.LevelDBLoader"/>
|
||||||
|
<service>
|
||||||
|
<provide interface="com.minres.scviewer.database.IWaveformDbLoader"/>
|
||||||
|
</service>
|
||||||
|
</scr:component>
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
source.. = src/
|
||||||
|
output.. = bin/
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
.,\
|
||||||
|
OSGI-INF/,\
|
||||||
|
leveldb-0.11-SNAPSHOT-uber.jar,\
|
||||||
|
json-20180813.jar
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,13 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.database.leveldb</artifactId>
|
||||||
|
<version>1.0.0-SNAPSHOT</version>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.0.0-SNAPSHOT</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
</project>
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.iq80.leveldb.Options;
|
||||||
|
import org.iq80.leveldb.impl.SeekingIterator;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
import com.minres.scviewer.database.IWaveformDbLoader;
|
||||||
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
|
||||||
|
public class LevelDBLoader implements IWaveformDbLoader {
|
||||||
|
|
||||||
|
static byte[] toByteArray(String value) {
|
||||||
|
return value.getBytes(UTF_8);
|
||||||
|
}
|
||||||
|
|
||||||
|
private TxDBWrapper levelDb;
|
||||||
|
private IWaveformDb db;
|
||||||
|
private Long maxTime=null;
|
||||||
|
private List<RelationType> usedRelationsList = new ArrayList<>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean load(IWaveformDb db, File inp) throws Exception {
|
||||||
|
try {
|
||||||
|
this.db=db;
|
||||||
|
levelDb = new TxDBWrapper(new Options(), inp);
|
||||||
|
JSONObject configVal = new JSONObject(levelDb.get("__config"));
|
||||||
|
if(!configVal.isEmpty())
|
||||||
|
levelDb.setTimeResolution(configVal.getLong("resolution"));
|
||||||
|
} catch(Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getMaxTime() {
|
||||||
|
if(maxTime==null) {
|
||||||
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
|
it.seek("st~");
|
||||||
|
Entry<String, String> val = null;
|
||||||
|
while(it.hasNext()) {
|
||||||
|
Entry<String, String> v = it.next();
|
||||||
|
if(!v.getKey().startsWith("st~")) continue;
|
||||||
|
val=v;
|
||||||
|
}
|
||||||
|
if(val==null)
|
||||||
|
maxTime = 0L;
|
||||||
|
else {
|
||||||
|
String[] token = val.getKey().split("~");
|
||||||
|
maxTime = Long.parseLong(token[2], 16)*levelDb.getTimeResolution();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return maxTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<IWaveform> getAllWaves() {
|
||||||
|
List<IWaveform> streams=new ArrayList<IWaveform>();
|
||||||
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
|
it.seek("s~");
|
||||||
|
while(it.hasNext()) {
|
||||||
|
Entry<String, String> val = it.next();
|
||||||
|
if(!val.getKey().startsWith("s~")) break;
|
||||||
|
TxStream stream = new TxStream(levelDb, db, new JSONObject(val.getValue()));
|
||||||
|
stream.setRelationTypeList(usedRelationsList);
|
||||||
|
streams.add(stream);
|
||||||
|
}
|
||||||
|
return streams;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<RelationType> getAllRelationTypes() {
|
||||||
|
// return Collections.emptyList();
|
||||||
|
return usedRelationsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
import static org.iq80.leveldb.shaded.guava.collect.Maps.immutableEntry;
|
||||||
|
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.iq80.leveldb.DBIterator;
|
||||||
|
import org.iq80.leveldb.impl.SeekingIterator;
|
||||||
|
|
||||||
|
class StringDbIterator implements SeekingIterator<String, String> {
|
||||||
|
private final DBIterator iterator;
|
||||||
|
|
||||||
|
StringDbIterator(DBIterator iterator) {
|
||||||
|
this.iterator = iterator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasNext() {
|
||||||
|
return iterator.hasNext();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void seekToFirst() {
|
||||||
|
iterator.seekToFirst();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void seek(String targetKey) {
|
||||||
|
iterator.seek(targetKey.getBytes(UTF_8));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Entry<String, String> peek() {
|
||||||
|
return adapt(iterator.peekNext());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Entry<String, String> next() {
|
||||||
|
return adapt(iterator.next());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void remove() {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
private Entry<String, String> adapt(Entry<byte[], byte[]> next) {
|
||||||
|
return immutableEntry(new String(next.getKey(), UTF_8), new String(next.getValue(), UTF_8));
|
||||||
|
}
|
||||||
|
}
|
||||||
+172
@@ -0,0 +1,172 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import org.iq80.leveldb.impl.SeekingIterator;
|
||||||
|
import org.json.JSONArray;
|
||||||
|
import org.json.JSONException;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.ITx;
|
||||||
|
import com.minres.scviewer.database.ITxAttribute;
|
||||||
|
import com.minres.scviewer.database.ITxEvent;
|
||||||
|
import com.minres.scviewer.database.ITxGenerator;
|
||||||
|
import com.minres.scviewer.database.ITxRelation;
|
||||||
|
import com.minres.scviewer.database.ITxStream;
|
||||||
|
|
||||||
|
public class Tx implements ITx {
|
||||||
|
|
||||||
|
private TxDBWrapper levelDb;
|
||||||
|
private TxStream trStream;
|
||||||
|
private TxGenerator trGenerator;
|
||||||
|
private long id;
|
||||||
|
private long start_time=0;
|
||||||
|
private long end_time=0;
|
||||||
|
private int concurency_index;
|
||||||
|
private boolean initialized=false;
|
||||||
|
private List<ITxAttribute> attributes;
|
||||||
|
private List<ITxRelation> incoming, outgoing;
|
||||||
|
|
||||||
|
public Tx(TxDBWrapper levelDb, TxStream trStream, TxGenerator trGenerator, long id) {
|
||||||
|
this.levelDb=levelDb;
|
||||||
|
this.trStream=trStream;
|
||||||
|
this.trGenerator=trGenerator;
|
||||||
|
this.id=id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITxStream<ITxEvent> getStream() {
|
||||||
|
return trStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITxGenerator getGenerator() {
|
||||||
|
return trGenerator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getConcurrencyIndex() {
|
||||||
|
if(!initialized) loadFromDb();
|
||||||
|
return concurency_index;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getBeginTime() {
|
||||||
|
if(!initialized) loadFromDb();
|
||||||
|
return start_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getEndTime() {
|
||||||
|
loadFromDb();
|
||||||
|
return end_time;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ITxAttribute> getAttributes() {
|
||||||
|
if(attributes==null) {
|
||||||
|
loadFromDb();
|
||||||
|
}
|
||||||
|
return attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ITxRelation> getIncomingRelations() {
|
||||||
|
if(incoming==null) {
|
||||||
|
incoming = new ArrayList<ITxRelation>();
|
||||||
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
|
String key = "ri~"+String.format("%016x", id);
|
||||||
|
it.seek(key);
|
||||||
|
while(it.hasNext()) {
|
||||||
|
String val = it.next().getKey();
|
||||||
|
if(!val.startsWith(key)) break;;
|
||||||
|
String[] token = val.split("~");
|
||||||
|
long otherId = Long.parseLong(token[2], 16);
|
||||||
|
incoming.add(createRelation(otherId, token[3], false));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return incoming;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ITxRelation> getOutgoingRelations() {
|
||||||
|
if(outgoing==null) {
|
||||||
|
outgoing = new ArrayList<ITxRelation>();
|
||||||
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
|
String key="ro~"+String.format("%016x", id);
|
||||||
|
it.seek(key);
|
||||||
|
while(it.hasNext()) {
|
||||||
|
String val = it.next().getKey();
|
||||||
|
if(!val.startsWith(key)) break;
|
||||||
|
String[] token = val.split("~");
|
||||||
|
long otherId = Long.parseLong(token[2], 16);
|
||||||
|
outgoing.add(createRelation(otherId, token[3], true));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return outgoing;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(ITx o) {
|
||||||
|
int res = this.getBeginTime().compareTo(o.getBeginTime());
|
||||||
|
if(res!=0)
|
||||||
|
return res;
|
||||||
|
else
|
||||||
|
return this.getId().compareTo(o.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "tx#"+getId()+"["+getBeginTime()/1000000+"ns - "+getEndTime()/1000000+"ns]";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void loadFromDb() throws JSONException {
|
||||||
|
JSONObject dbVal = new JSONObject(levelDb.get("x~"+ String.format("%016x", id)));
|
||||||
|
start_time=dbVal.getLong("START_TIME") * levelDb.getTimeResolution();
|
||||||
|
end_time=dbVal.getLong("END_TIME") * levelDb.getTimeResolution();
|
||||||
|
concurency_index=dbVal.getInt("conc");
|
||||||
|
attributes=new ArrayList<>();
|
||||||
|
JSONArray arr = dbVal.getJSONArray("attr");
|
||||||
|
arr.forEach(entry -> {
|
||||||
|
TxAttribute attr = new TxAttribute(this, (JSONObject) entry);
|
||||||
|
attributes.add(attr);
|
||||||
|
});
|
||||||
|
initialized=true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ITxRelation createRelation(long otherId, String name, boolean outgoing) {
|
||||||
|
try {
|
||||||
|
JSONObject otherTxVal = new JSONObject(levelDb.get("x~"+ String.format("%016x", otherId)));
|
||||||
|
if(otherTxVal.isEmpty()) return null;
|
||||||
|
JSONObject otherStreamVal = new JSONObject(levelDb.get("s~"+ String.format("%016x", otherTxVal.getLong("s"))));
|
||||||
|
if(otherStreamVal.isEmpty()) return null;
|
||||||
|
TxStream tgtStream = (TxStream) trStream.getDb().getStreamByName(otherStreamVal.getString("name"));
|
||||||
|
Tx that = (Tx) tgtStream.getTransactions().get(otherId);
|
||||||
|
return outgoing?
|
||||||
|
new TxRelation(trStream.getRelationType(name), this, that):
|
||||||
|
new TxRelation(trStream.getRelationType(name), that, this);
|
||||||
|
} catch (SecurityException | IllegalArgumentException | JSONException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.AssociationType;
|
||||||
|
import com.minres.scviewer.database.DataType;
|
||||||
|
import com.minres.scviewer.database.ITxAttribute;
|
||||||
|
|
||||||
|
public class TxAttribute implements ITxAttribute{
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private DataType dataType;
|
||||||
|
|
||||||
|
private AssociationType associationType;
|
||||||
|
|
||||||
|
private Object value;
|
||||||
|
|
||||||
|
public TxAttribute(Tx trTransaction, JSONObject attribute) {
|
||||||
|
this.name=attribute.getString("name");
|
||||||
|
this.dataType=DataType.values()[attribute.getInt("type")];
|
||||||
|
this.associationType=AssociationType.values()[attribute.getInt("assoc")];
|
||||||
|
this.value=attribute.get("value");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataType getDataType() {
|
||||||
|
return dataType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AssociationType getType() {
|
||||||
|
return associationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+90
@@ -0,0 +1,90 @@
|
|||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import org.iq80.leveldb.Options;
|
||||||
|
import org.iq80.leveldb.Range;
|
||||||
|
import org.iq80.leveldb.ReadOptions;
|
||||||
|
import org.iq80.leveldb.Snapshot;
|
||||||
|
import org.iq80.leveldb.impl.DbImpl;
|
||||||
|
import org.iq80.leveldb.impl.SeekingIterator;
|
||||||
|
|
||||||
|
class TxDBWrapper {
|
||||||
|
private final Options options;
|
||||||
|
private final ReadOptions ro = new ReadOptions();
|
||||||
|
private final File databaseDir;
|
||||||
|
private DbImpl db;
|
||||||
|
private long timeResolution=1L;;
|
||||||
|
|
||||||
|
TxDBWrapper(Options options, File databaseDir) throws IOException {
|
||||||
|
this.options = options.verifyChecksums(true).createIfMissing(false).errorIfExists(false).cacheSize(64*1024*1024);
|
||||||
|
this.databaseDir = databaseDir;
|
||||||
|
this.db = new DbImpl(options, databaseDir);
|
||||||
|
ro.snapshot(db.getSnapshot());
|
||||||
|
}
|
||||||
|
|
||||||
|
public String get(String key) {
|
||||||
|
byte[] slice = db.get(LevelDBLoader.toByteArray(key));
|
||||||
|
if (slice == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return new String(slice, UTF_8);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String get(String key, Snapshot snapshot) {
|
||||||
|
byte[] slice = db.get(LevelDBLoader.toByteArray(key), ro);
|
||||||
|
return slice == null? null : new String(slice, UTF_8);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void put(String key, String value) {
|
||||||
|
db.put(LevelDBLoader.toByteArray(key), LevelDBLoader.toByteArray(value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void delete(String key) {
|
||||||
|
db.delete(LevelDBLoader.toByteArray(key));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SeekingIterator<String, String> iterator() {
|
||||||
|
return new StringDbIterator(db.iterator());
|
||||||
|
}
|
||||||
|
|
||||||
|
public Snapshot getSnapshot() {
|
||||||
|
return db.getSnapshot();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void close() {
|
||||||
|
try {
|
||||||
|
ro.snapshot().close();
|
||||||
|
db.close();
|
||||||
|
} catch (IOException e) {} // ignore any error
|
||||||
|
}
|
||||||
|
|
||||||
|
public long size(String start, String limit) {
|
||||||
|
return db.getApproximateSizes(new Range(LevelDBLoader.toByteArray(start), LevelDBLoader.toByteArray(limit)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getMaxNextLevelOverlappingBytes() {
|
||||||
|
return db.getMaxNextLevelOverlappingBytes();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reopen() throws IOException {
|
||||||
|
reopen(options);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reopen(Options options) throws IOException {
|
||||||
|
this.close();
|
||||||
|
db = new DbImpl(options.verifyChecksums(true).createIfMissing(false).errorIfExists(false), databaseDir);
|
||||||
|
ro.snapshot(db.getSnapshot());
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getTimeResolution() {
|
||||||
|
return timeResolution;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimeResolution(long resolution) {
|
||||||
|
this.timeResolution = resolution;
|
||||||
|
}
|
||||||
|
}
|
||||||
+57
@@ -0,0 +1,57 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.ITx;
|
||||||
|
import com.minres.scviewer.database.ITxEvent;
|
||||||
|
import com.minres.scviewer.database.IWaveformEvent;
|
||||||
|
|
||||||
|
public class TxEvent implements ITxEvent {
|
||||||
|
|
||||||
|
private final Type type;
|
||||||
|
private ITx tx;
|
||||||
|
|
||||||
|
public TxEvent(Type type, ITx tx) {
|
||||||
|
super();
|
||||||
|
this.type = type;
|
||||||
|
this.tx = tx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getTime() {
|
||||||
|
return type==Type.BEGIN?tx.getBeginTime():tx.getEndTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IWaveformEvent duplicate() throws CloneNotSupportedException {
|
||||||
|
return new TxEvent(type, tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(IWaveformEvent o) {
|
||||||
|
return getTime().compareTo(o.getTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITx getTransaction() {
|
||||||
|
return tx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return type.toString()+"@"+getTime()+" of tx #"+tx.getId();
|
||||||
|
}
|
||||||
|
}
|
||||||
+56
@@ -0,0 +1,56 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.ITx;
|
||||||
|
import com.minres.scviewer.database.ITxEvent;
|
||||||
|
import com.minres.scviewer.database.ITxGenerator;
|
||||||
|
import com.minres.scviewer.database.ITxStream;
|
||||||
|
|
||||||
|
public class TxGenerator implements ITxGenerator {
|
||||||
|
|
||||||
|
private ITxStream<ITxEvent> stream;
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public TxGenerator(ITxStream<ITxEvent> stream, JSONObject object) {
|
||||||
|
this.stream=stream;
|
||||||
|
this.id=object.getLong("id");
|
||||||
|
this.name=object.getString("name");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITxStream<ITxEvent> getStream() {
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ITx> getTransactions() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.ITxRelation;
|
||||||
|
import com.minres.scviewer.database.ITx;
|
||||||
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
|
||||||
|
public class TxRelation implements ITxRelation {
|
||||||
|
|
||||||
|
RelationType relationType;
|
||||||
|
Tx source, target;
|
||||||
|
|
||||||
|
public TxRelation(RelationType relationType, Tx source, Tx target) {
|
||||||
|
this.source = source;
|
||||||
|
this.target = target;
|
||||||
|
this.relationType = relationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RelationType getRelationType() {
|
||||||
|
return relationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITx getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITx getTarget() {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+178
@@ -0,0 +1,178 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.leveldb;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.iq80.leveldb.impl.SeekingIterator;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
|
import java.util.NavigableMap;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
import java.util.Vector;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.HierNode;
|
||||||
|
import com.minres.scviewer.database.ITx;
|
||||||
|
import com.minres.scviewer.database.ITxEvent;
|
||||||
|
import com.minres.scviewer.database.ITxGenerator;
|
||||||
|
import com.minres.scviewer.database.ITxStream;
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
|
||||||
|
public class TxStream extends HierNode implements ITxStream<ITxEvent> {
|
||||||
|
|
||||||
|
private TxDBWrapper levelDb;
|
||||||
|
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
private String kind;
|
||||||
|
|
||||||
|
private IWaveformDb db;
|
||||||
|
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
private TreeMap<Long, TxGenerator> generators;
|
||||||
|
|
||||||
|
private TreeMap<Long, ITx> transactions;
|
||||||
|
|
||||||
|
private Integer maxConcurrency;
|
||||||
|
|
||||||
|
private TreeMap<Long, List<ITxEvent>> events;
|
||||||
|
|
||||||
|
private List<RelationType> usedRelationsList;
|
||||||
|
|
||||||
|
public TxStream(TxDBWrapper database, IWaveformDb waveformDb, JSONObject object) {
|
||||||
|
super(object.get("name").toString());
|
||||||
|
this.levelDb=database;
|
||||||
|
this.db=waveformDb;
|
||||||
|
this.fullName=object.getString("name");
|
||||||
|
this.kind=object.getString("kind");
|
||||||
|
this.id = object.getLong("id");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IWaveformDb getDb() {
|
||||||
|
return db;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFullName() {
|
||||||
|
return fullName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKind() {
|
||||||
|
return kind;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ITxGenerator> getGenerators() {
|
||||||
|
if(generators==null){
|
||||||
|
generators=new TreeMap<Long, TxGenerator>();
|
||||||
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
|
String key="sg~"+String.format("%016x", id);
|
||||||
|
it.seek(key);
|
||||||
|
while(it.hasNext()) {
|
||||||
|
Entry<String, String> val = it.next();
|
||||||
|
if(!val.getKey().startsWith(key)) break;
|
||||||
|
JSONObject jVal = new JSONObject(val.getValue());
|
||||||
|
generators.put(jVal.getLong("id"), new TxGenerator(this, jVal));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<ITxGenerator>(generators.values());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxConcurrency() {
|
||||||
|
if(maxConcurrency==null){
|
||||||
|
getTransactions();
|
||||||
|
}
|
||||||
|
return maxConcurrency;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NavigableMap<Long, List<ITxEvent>> getEvents(){
|
||||||
|
if(events==null){
|
||||||
|
events=new TreeMap<Long, List<ITxEvent>>();
|
||||||
|
for(Entry<Long, ITx> entry:getTransactions().entrySet()){
|
||||||
|
ITx tx = entry.getValue();
|
||||||
|
putEvent(new TxEvent(TxEvent.Type.BEGIN, tx));
|
||||||
|
putEvent(new TxEvent(TxEvent.Type.END, tx));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return events;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void putEvent(TxEvent ev){
|
||||||
|
Long time = ev.getTime();
|
||||||
|
if(!events.containsKey(time)){
|
||||||
|
Vector<ITxEvent> vector=new Vector<ITxEvent>();
|
||||||
|
vector.add(ev);
|
||||||
|
events.put(time, vector);
|
||||||
|
} else {
|
||||||
|
events.get(time).add(ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Map<Long, ITx> getTransactions() {
|
||||||
|
if(transactions==null){
|
||||||
|
if(generators==null) getGenerators();
|
||||||
|
transactions = new TreeMap<Long, ITx>();
|
||||||
|
maxConcurrency=0;
|
||||||
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
|
String key = "sgx~"+String.format("%016x", id);
|
||||||
|
it.seek(key);
|
||||||
|
while(it.hasNext()) {
|
||||||
|
Entry<String, String> val = it.next();
|
||||||
|
if(!val.getKey().startsWith(key)) break;
|
||||||
|
String[] token = val.getKey().split("~");
|
||||||
|
long gid = Long.parseLong(token[2], 16); // gen id
|
||||||
|
long id = Long.parseLong(token[3], 16); // tx id
|
||||||
|
ITx tx = new Tx(levelDb, this, generators.get(gid), id);
|
||||||
|
transactions.put(id, tx);
|
||||||
|
maxConcurrency= Math.max(maxConcurrency, tx.getConcurrencyIndex());
|
||||||
|
}
|
||||||
|
maxConcurrency++;
|
||||||
|
}
|
||||||
|
return transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ITxEvent> getWaveformEventsAtTime(Long time) {
|
||||||
|
return getEvents().get(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelationTypeList(List<RelationType> usedRelationsList){
|
||||||
|
this.usedRelationsList=usedRelationsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RelationType getRelationType(String name) {
|
||||||
|
RelationType relType=RelationType.create(name);
|
||||||
|
if(!usedRelationsList.contains(relType)) usedRelationsList.add(relType);
|
||||||
|
return relType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean equals(IWaveform other) {
|
||||||
|
return(other instanceof TxStream && this.getId()==other.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
<?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.8"/>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="sqlite-jdbc-3.8.7.jar"/>
|
||||||
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
|
</classpath>
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/bin/
|
||||||
|
/target/
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>com.minres.scviewer.database.sqlite</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.ds.core.builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.release=disabled
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
activeProfiles=
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
resolveWorkspaceProjects=true
|
||||||
|
version=1
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
eclipse.preferences.version=1
|
||||||
|
pluginProject.extensions=false
|
||||||
|
resolve.requirebundle=false
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: SQLite transaction database
|
||||||
|
Bundle-SymbolicName: com.minres.scviewer.database.sqlite
|
||||||
|
Bundle-Version: 1.1.0.qualifier
|
||||||
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
|
Require-Bundle: com.minres.scviewer.database;bundle-version="1.0.0"
|
||||||
|
Bundle-ClassPath: .,sqlite-jdbc-3.8.7.jar
|
||||||
|
Service-Component: OSGI-INF/component.xml
|
||||||
|
Bundle-ActivationPolicy: lazy
|
||||||
|
Embed-Dependency: sqlite-jdbc
|
||||||
|
Embedded-Artifacts: sqlite-jdbc-3.8.7.jar;g="org.xerial";
|
||||||
|
a="sqlite-jdbc";v="3.8.7"
|
||||||
|
Automatic-Module-Name: com.minres.scviewer.database.sqlite
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="SQLiteDbLoader">
|
||||||
|
<implementation class="com.minres.scviewer.database.sqlite.SQLiteDbLoader"/>
|
||||||
|
<service>
|
||||||
|
<provide interface="com.minres.scviewer.database.IWaveformDbLoader"/>
|
||||||
|
</service>
|
||||||
|
</scr:component>
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Copyright (c) 2014, 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
# All rights reserved. This program and the accompanying materials
|
||||||
|
# are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
# which accompanies this distribution, and is available at
|
||||||
|
# http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
#
|
||||||
|
# Contributors:
|
||||||
|
# MINRES Technologies GmbH - initial API and implementation
|
||||||
|
###############################################################################
|
||||||
|
source.. = src/
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
.,\
|
||||||
|
sqlite-jdbc-3.8.7.jar,\
|
||||||
|
OSGI-INF/
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<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/xsd/maven-4.0.0.xsd">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<artifactId>com.minres.scviewer.database.sqlite</artifactId>
|
||||||
|
<parent>
|
||||||
|
<groupId>com.minres.scviewer</groupId>
|
||||||
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
<version>2.11.0</version>
|
||||||
|
<relativePath>../..</relativePath>
|
||||||
|
</parent>
|
||||||
|
<packaging>eclipse-plugin</packaging>
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.xerial</groupId>
|
||||||
|
<artifactId>sqlite-jdbc</artifactId>
|
||||||
|
<version>3.8.7</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
<version>1.1.0-SNAPSHOT</version>
|
||||||
|
</project>
|
||||||
BIN
Binary file not shown.
+129
@@ -0,0 +1,129 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.NavigableMap;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.EventKind;
|
||||||
|
import com.minres.scviewer.database.HierNode;
|
||||||
|
import com.minres.scviewer.database.IEvent;
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
import com.minres.scviewer.database.RelationTypeFactory;
|
||||||
|
import com.minres.scviewer.database.WaveformType;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.IDatabase;
|
||||||
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
|
|
||||||
|
abstract class AbstractTxStream extends HierNode implements IWaveform {
|
||||||
|
|
||||||
|
protected IDatabase database;
|
||||||
|
|
||||||
|
private long streamId;
|
||||||
|
|
||||||
|
private Integer maxConcurrency;
|
||||||
|
|
||||||
|
private TreeMap<Long, IEvent[]> events;
|
||||||
|
|
||||||
|
private List<RelationType> usedRelationsList;
|
||||||
|
|
||||||
|
public AbstractTxStream(IDatabase database, String name, long streamId) {
|
||||||
|
super(name);
|
||||||
|
this.database=database;
|
||||||
|
this.streamId=streamId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
if(maxConcurrency==null){
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append("SELECT MAX(concurrencyLevel) as concurrencyLevel FROM ScvTx where stream=");
|
||||||
|
sb.append(streamId);
|
||||||
|
try(
|
||||||
|
java.sql.Connection connection = database.createConnection();
|
||||||
|
java.sql.Statement statement = connection.createStatement();
|
||||||
|
java.sql.ResultSet resultSet = statement.executeQuery(sb.toString());
|
||||||
|
) {
|
||||||
|
while (resultSet.next()) {
|
||||||
|
if(maxConcurrency==null) maxConcurrency=0;
|
||||||
|
Object value = resultSet.getObject("concurrencyLevel");
|
||||||
|
if(value!=null)
|
||||||
|
maxConcurrency=(Integer) value;
|
||||||
|
}
|
||||||
|
} catch (SQLException e) {
|
||||||
|
if(maxConcurrency==null) maxConcurrency=0;
|
||||||
|
}
|
||||||
|
maxConcurrency+=1;
|
||||||
|
}
|
||||||
|
return maxConcurrency;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public NavigableMap<Long, IEvent[]> getEvents(){
|
||||||
|
if(events==null){
|
||||||
|
events=new TreeMap<>();
|
||||||
|
for(Entry<Integer, ITx> entry:getTransactions().entrySet()){
|
||||||
|
putEvent(new TxEvent(EventKind.BEGIN, entry.getValue()));
|
||||||
|
putEvent(new TxEvent(EventKind.END, entry.getValue()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return events;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void putEvent(TxEvent ev){
|
||||||
|
Long time = ev.getTime();
|
||||||
|
if(events.containsKey(time)) {
|
||||||
|
IEvent[] oldV = events.get(time);
|
||||||
|
IEvent[] newV = new IEvent[oldV.length+1];
|
||||||
|
System.arraycopy(oldV, 0, newV, 0, oldV.length);
|
||||||
|
newV[oldV.length]=ev;
|
||||||
|
events.put(time, newV);
|
||||||
|
} else {
|
||||||
|
events.put(time, new IEvent[] {ev});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract Map<Integer, ITx> getTransactions();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent[] getEventsAtTime(Long time) {
|
||||||
|
return getEvents().get(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRelationTypeList(List<RelationType> usedRelationsList){
|
||||||
|
this.usedRelationsList=usedRelationsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RelationType getRelationType(String name) {
|
||||||
|
RelationType relType=RelationTypeFactory.create(name);
|
||||||
|
if(!usedRelationsList.contains(relType)) usedRelationsList.add(relType);
|
||||||
|
return relType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent[] getEventsBeforeTime(Long time) {
|
||||||
|
Entry<Long, IEvent[]> e = events.floorEntry(time);
|
||||||
|
if(e==null)
|
||||||
|
return new IEvent[]{};
|
||||||
|
else
|
||||||
|
return events.floorEntry(time).getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WaveformType getType() {
|
||||||
|
return WaveformType.TRANSACTION;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+148
@@ -0,0 +1,148 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.beans.PropertyChangeSupport;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
import com.minres.scviewer.database.IWaveformDbLoader;
|
||||||
|
import com.minres.scviewer.database.InputFormatException;
|
||||||
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.IDatabase;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.SQLiteDatabase;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvSimProps;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvStream;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTxEvent;
|
||||||
|
|
||||||
|
public class SQLiteDbLoader implements IWaveformDbLoader {
|
||||||
|
|
||||||
|
protected IDatabase database;
|
||||||
|
|
||||||
|
private List<RelationType> usedRelationsList = new ArrayList<>();
|
||||||
|
|
||||||
|
private ScvSimProps scvSimProps;
|
||||||
|
|
||||||
|
private static final byte[] x = "SQLite format 3".getBytes();
|
||||||
|
|
||||||
|
/** The pcs. */
|
||||||
|
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getMaxTime() {
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTxEvent> handler = new SQLiteDatabaseSelectHandler<>(ScvTxEvent.class,
|
||||||
|
database, "time = (SELECT MAX(time) FROM ScvTxEvent)");
|
||||||
|
try {
|
||||||
|
List<ScvTxEvent> event = handler.selectObjects();
|
||||||
|
if(!event.isEmpty())
|
||||||
|
return event.get(0).getTime()*scvSimProps.getTime_resolution();
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return 0L;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<IWaveform> getAllWaves() {
|
||||||
|
SQLiteDatabaseSelectHandler<ScvStream> handler = new SQLiteDatabaseSelectHandler<>(ScvStream.class, database);
|
||||||
|
List<IWaveform> streams=new ArrayList<>();
|
||||||
|
try {
|
||||||
|
for(ScvStream scvStream:handler.selectObjects()){
|
||||||
|
TxStream stream = new TxStream(database, scvStream);
|
||||||
|
stream.setRelationTypeList(usedRelationsList);
|
||||||
|
streams.add(stream);
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
}
|
||||||
|
return streams;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canLoad(File inputFile) {
|
||||||
|
if (!inputFile.isDirectory() && inputFile.exists()) {
|
||||||
|
try(InputStream stream = new FileInputStream(inputFile)){
|
||||||
|
byte[] buffer = new byte[x.length];
|
||||||
|
int readCnt = stream.read(buffer, 0, x.length);
|
||||||
|
if (readCnt == x.length) {
|
||||||
|
for (int i = 0; i < x.length; i++)
|
||||||
|
if (buffer[i] != x[i])
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load(IWaveformDb db, File file) throws InputFormatException {
|
||||||
|
dispose();
|
||||||
|
database=new SQLiteDatabase(file.getAbsolutePath(), db);
|
||||||
|
database.setData("TIMERESOLUTION", 1L);
|
||||||
|
SQLiteDatabaseSelectHandler<ScvSimProps> handler = new SQLiteDatabaseSelectHandler<>(ScvSimProps.class, database);
|
||||||
|
try {
|
||||||
|
for(ScvSimProps simProps:handler.selectObjects()){
|
||||||
|
scvSimProps=simProps;
|
||||||
|
database.setData("TIMERESOLUTION", scvSimProps.getTime_resolution());
|
||||||
|
}
|
||||||
|
pcs.firePropertyChange(IWaveformDbLoader.LOADING_FINISHED, null, null);
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
throw new InputFormatException(e.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dispose() {
|
||||||
|
database=null;
|
||||||
|
usedRelationsList=null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<RelationType> getAllRelationTypes(){
|
||||||
|
return usedRelationsList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds the property change listener.
|
||||||
|
*
|
||||||
|
* @param l the l
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void addPropertyChangeListener(PropertyChangeListener l) {
|
||||||
|
pcs.addPropertyChangeListener(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes the property change listener.
|
||||||
|
*
|
||||||
|
* @param l the l
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void removePropertyChangeListener(PropertyChangeListener l) {
|
||||||
|
pcs.removePropertyChangeListener(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+194
@@ -0,0 +1,194 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.AssociationType;
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.IDatabase;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvStream;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTx;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTxAttribute;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTxEvent;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTxRelation;
|
||||||
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
|
import com.minres.scviewer.database.tx.ITxAttribute;
|
||||||
|
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||||
|
import com.minres.scviewer.database.tx.ITxRelation;
|
||||||
|
|
||||||
|
public class Tx implements ITx {
|
||||||
|
|
||||||
|
private IDatabase database;
|
||||||
|
private TxStream trStream;
|
||||||
|
private TxGenerator trGenerator;
|
||||||
|
private ScvTx scvTx;
|
||||||
|
private List<ITxAttribute> attributes;
|
||||||
|
private Long begin;
|
||||||
|
private Long end;
|
||||||
|
private List<ITxRelation> incoming;
|
||||||
|
private List<ITxRelation> outgoing;
|
||||||
|
|
||||||
|
public Tx(IDatabase database, TxStream trStream, TxGenerator trGenerator, ScvTx scvTx) {
|
||||||
|
this.database=database;
|
||||||
|
this.trStream=trStream;
|
||||||
|
this.trGenerator=trGenerator;
|
||||||
|
this.scvTx=scvTx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getId() {
|
||||||
|
return (long) scvTx.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IWaveform getStream() {
|
||||||
|
return trStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITxGenerator getGenerator() {
|
||||||
|
return trGenerator;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getConcurrencyIndex() {
|
||||||
|
return scvTx.getConcurrencyLevel();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getBeginTime() {
|
||||||
|
if(begin==null){
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTxEvent> handler = new SQLiteDatabaseSelectHandler<>(ScvTxEvent.class,
|
||||||
|
database, "tx="+scvTx.getId()+" AND type="+ AssociationType.BEGIN.ordinal());
|
||||||
|
try {
|
||||||
|
for(ScvTxEvent scvEvent:handler.selectObjects()){
|
||||||
|
begin= scvEvent.getTime()*(Long)database.getData("TIMERESOLUTION");
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return begin;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getEndTime() {
|
||||||
|
if(end==null){
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTxEvent> handler = new SQLiteDatabaseSelectHandler<>(ScvTxEvent.class,
|
||||||
|
database, "tx="+scvTx.getId()+" AND type="+ AssociationType.END.ordinal());
|
||||||
|
try {
|
||||||
|
for(ScvTxEvent scvEvent:handler.selectObjects()){
|
||||||
|
end = scvEvent.getTime()*(Long)database.getData("TIMERESOLUTION");
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ITxAttribute> getAttributes() {
|
||||||
|
if(attributes==null){
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTxAttribute> handler = new SQLiteDatabaseSelectHandler<>(
|
||||||
|
ScvTxAttribute.class, database, "tx="+scvTx.getId());
|
||||||
|
try {
|
||||||
|
attributes = new ArrayList<>();
|
||||||
|
for(ScvTxAttribute scvAttribute:handler.selectObjects()){
|
||||||
|
attributes.add(new TxAttribute(this, scvAttribute));
|
||||||
|
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return attributes;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ITxRelation> getIncomingRelations() {
|
||||||
|
if(incoming==null){
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTxRelation> handler = new SQLiteDatabaseSelectHandler<>(
|
||||||
|
ScvTxRelation.class, database, "sink="+scvTx.getId());
|
||||||
|
try {
|
||||||
|
incoming = new ArrayList<>();
|
||||||
|
for(ScvTxRelation scvRelation:handler.selectObjects()){
|
||||||
|
incoming.add(createRelation(scvRelation, false));
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return incoming;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ITxRelation> getOutgoingRelations() {
|
||||||
|
if(outgoing==null){
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTxRelation> handler = new SQLiteDatabaseSelectHandler<>(
|
||||||
|
ScvTxRelation.class, database, "src="+scvTx.getId());
|
||||||
|
try {
|
||||||
|
outgoing = new ArrayList<>();
|
||||||
|
for(ScvTxRelation scvRelation:handler.selectObjects()){
|
||||||
|
outgoing.add(createRelation(scvRelation, true));
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return outgoing;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ITxRelation createRelation(ScvTxRelation rel, boolean outgoing) {
|
||||||
|
int otherId = outgoing?rel.getSink():rel.getSrc();
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTx> handler = new SQLiteDatabaseSelectHandler<>(ScvTx.class, database,
|
||||||
|
"id="+otherId);
|
||||||
|
try {
|
||||||
|
List<ScvTx> res = handler.selectObjects();
|
||||||
|
if(res.size()!=1) return null;
|
||||||
|
List<ScvStream> streams = new SQLiteDatabaseSelectHandler<ScvStream>(ScvStream.class, database,
|
||||||
|
"id="+res.get(0).getStream()).selectObjects();
|
||||||
|
if(streams.size()!=1) return null;
|
||||||
|
TxStream tgtStream = (TxStream) database.getWaveformDb().getStreamByName(streams.get(0).getName());
|
||||||
|
Tx that = (Tx) tgtStream.getTransactions().get(otherId);
|
||||||
|
if(outgoing)
|
||||||
|
return new TxRelation(trStream.getRelationType(rel.getName()), this, that);
|
||||||
|
else
|
||||||
|
return new TxRelation(trStream.getRelationType(rel.getName()), that, this);
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int compareTo(ITx o) {
|
||||||
|
int res = this.getBeginTime().compareTo(o.getBeginTime());
|
||||||
|
if(res!=0)
|
||||||
|
return res;
|
||||||
|
else
|
||||||
|
return this.getId().compareTo(o.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "tx#"+getId()+"["+getBeginTime()/1000000+"ns - "+getEndTime()/1000000+"ns]";
|
||||||
|
}
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.AssociationType;
|
||||||
|
import com.minres.scviewer.database.DataType;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTxAttribute;
|
||||||
|
import com.minres.scviewer.database.tx.ITxAttribute;
|
||||||
|
|
||||||
|
public class TxAttribute implements ITxAttribute{
|
||||||
|
|
||||||
|
Tx trTransaction;
|
||||||
|
ScvTxAttribute scvAttribute;
|
||||||
|
|
||||||
|
public TxAttribute(Tx trTransaction, ScvTxAttribute scvAttribute) {
|
||||||
|
this.trTransaction=trTransaction;
|
||||||
|
this.scvAttribute=scvAttribute;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return scvAttribute.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DataType getDataType() {
|
||||||
|
return DataType.values()[scvAttribute.getData_type()];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AssociationType getType() {
|
||||||
|
return AssociationType.values()[scvAttribute.getType()];
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getValue() {
|
||||||
|
return scvAttribute.getData_value();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.EventKind;
|
||||||
|
import com.minres.scviewer.database.IEvent;
|
||||||
|
import com.minres.scviewer.database.WaveformType;
|
||||||
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
|
import com.minres.scviewer.database.tx.ITxEvent;
|
||||||
|
|
||||||
|
public class TxEvent implements ITxEvent {
|
||||||
|
|
||||||
|
private final EventKind type;
|
||||||
|
private ITx tx;
|
||||||
|
|
||||||
|
public TxEvent(EventKind type, ITx tx) {
|
||||||
|
super();
|
||||||
|
this.type = type;
|
||||||
|
this.tx = tx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getTime() {
|
||||||
|
return type==EventKind.BEGIN?tx.getBeginTime():tx.getEndTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent duplicate() throws CloneNotSupportedException {
|
||||||
|
return new TxEvent(type, tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITx getTransaction() {
|
||||||
|
return tx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EventKind getKind() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return type.toString()+"@"+getTime()+" of tx #"+tx.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WaveformType getType() {
|
||||||
|
return WaveformType.TRANSACTION;
|
||||||
|
}
|
||||||
|
}
|
||||||
+85
@@ -0,0 +1,85 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.IDatabase;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvGenerator;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTx;
|
||||||
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
|
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||||
|
|
||||||
|
public class TxGenerator extends AbstractTxStream implements ITxGenerator {
|
||||||
|
|
||||||
|
private TxStream stream;
|
||||||
|
|
||||||
|
private ScvGenerator scvGenerator;
|
||||||
|
|
||||||
|
private TreeMap<Integer, ITx> transactions;
|
||||||
|
|
||||||
|
public TxGenerator(IDatabase database, TxStream stream, ScvGenerator scvGenerator) {
|
||||||
|
super(database, scvGenerator.getName(), stream.getId());
|
||||||
|
this.stream=stream;
|
||||||
|
this.scvGenerator=scvGenerator;
|
||||||
|
stream.addChild(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getId() {
|
||||||
|
return (long) scvGenerator.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IWaveform getStream() {
|
||||||
|
return stream;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return scvGenerator.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSame(IWaveform other) {
|
||||||
|
return(other instanceof TxGenerator && this.getId().equals(other.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKind() {
|
||||||
|
return stream.getKind();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Map<Integer, ITx> getTransactions() {
|
||||||
|
if(transactions==null){
|
||||||
|
transactions = new TreeMap<>();
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTx> handler = new SQLiteDatabaseSelectHandler<>(ScvTx.class, database,
|
||||||
|
"stream="+stream.getId()+" and generator="+scvGenerator.getId());
|
||||||
|
try {
|
||||||
|
for(ScvTx scvTx:handler.selectObjects()){
|
||||||
|
transactions.put(scvTx.getId(), new Tx(database, (TxStream) stream, this, scvTx));
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+44
@@ -0,0 +1,44 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.RelationType;
|
||||||
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
|
import com.minres.scviewer.database.tx.ITxRelation;
|
||||||
|
|
||||||
|
public class TxRelation implements ITxRelation {
|
||||||
|
|
||||||
|
RelationType relationType;
|
||||||
|
Tx source;
|
||||||
|
Tx target;
|
||||||
|
|
||||||
|
public TxRelation(RelationType relationType, Tx source, Tx target) {
|
||||||
|
this.source = source;
|
||||||
|
this.target = target;
|
||||||
|
this.relationType = relationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RelationType getRelationType() {
|
||||||
|
return relationType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITx getSource() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ITx getTarget() {
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+106
@@ -0,0 +1,106 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite;
|
||||||
|
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IEvent;
|
||||||
|
import com.minres.scviewer.database.IWaveform;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.IDatabase;
|
||||||
|
import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvGenerator;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvStream;
|
||||||
|
import com.minres.scviewer.database.sqlite.tables.ScvTx;
|
||||||
|
import com.minres.scviewer.database.tx.ITx;
|
||||||
|
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||||
|
|
||||||
|
public class TxStream extends AbstractTxStream {
|
||||||
|
|
||||||
|
private String fullName;
|
||||||
|
|
||||||
|
private ScvStream scvStream;
|
||||||
|
|
||||||
|
private TreeMap<Integer, TxGenerator> generators;
|
||||||
|
|
||||||
|
private TreeMap<Integer, ITx> transactions;
|
||||||
|
|
||||||
|
public TxStream(IDatabase database, ScvStream scvStream) {
|
||||||
|
super(database, scvStream.getName(), scvStream.getId());
|
||||||
|
fullName=scvStream.getName();
|
||||||
|
this.scvStream=scvStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFullName() {
|
||||||
|
return fullName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Long getId() {
|
||||||
|
return (long) scvStream.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ITxGenerator> getGenerators() {
|
||||||
|
if(generators==null){
|
||||||
|
SQLiteDatabaseSelectHandler<ScvGenerator> handler = new SQLiteDatabaseSelectHandler<>(
|
||||||
|
ScvGenerator.class, database, "stream="+scvStream.getId());
|
||||||
|
generators=new TreeMap<>();
|
||||||
|
try {
|
||||||
|
for(ScvGenerator scvGenerator:handler.selectObjects()){
|
||||||
|
generators.put(scvGenerator.getId(), new TxGenerator(database, this, scvGenerator));
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new ArrayList<>(generators.values());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Map<Integer, ITx> getTransactions() {
|
||||||
|
if(transactions==null){
|
||||||
|
if(generators==null) getGenerators();
|
||||||
|
transactions = new TreeMap<>();
|
||||||
|
SQLiteDatabaseSelectHandler<ScvTx> handler = new SQLiteDatabaseSelectHandler<>(ScvTx.class, database,
|
||||||
|
"stream="+scvStream.getId());
|
||||||
|
try {
|
||||||
|
for(ScvTx scvTx:handler.selectObjects()){
|
||||||
|
transactions.put(scvTx.getId(), new Tx(database, this, generators.get(scvTx.getGenerator()), scvTx));
|
||||||
|
}
|
||||||
|
} catch (SecurityException | IllegalArgumentException | InstantiationException | IllegalAccessException
|
||||||
|
| InvocationTargetException | SQLException | IntrospectionException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return transactions;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEvent[] getEventsAtTime(Long time) {
|
||||||
|
return getEvents().get(time);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSame(IWaveform other) {
|
||||||
|
return(other instanceof TxStream && this.getId().equals(other.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKind() {
|
||||||
|
return scvStream.getKind();
|
||||||
|
}
|
||||||
|
}
|
||||||
+94
@@ -0,0 +1,94 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite.db;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An abstract class that handles insert/select-operations into/from a database
|
||||||
|
*
|
||||||
|
* @author Tino for http://www.java-blog.com
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
public abstract class AbstractDatabaseHandler<T> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The type of the objects that should be created and filled with values
|
||||||
|
* from the database or inserted into the database
|
||||||
|
*/
|
||||||
|
protected Class<T> type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Contains the settings to create a connection to the database like
|
||||||
|
* host/port/database/user/password
|
||||||
|
*/
|
||||||
|
protected IDatabase databaseConnectionFactory;
|
||||||
|
|
||||||
|
/** The SQL-select-query */
|
||||||
|
protected final String query;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param type
|
||||||
|
* The type of the objects that should be created and filled with
|
||||||
|
* values from the database or inserted into the database
|
||||||
|
* @param databaseConnecter
|
||||||
|
* Contains the settings to create a connection to the database
|
||||||
|
* like host/port/database/user/password
|
||||||
|
*/
|
||||||
|
protected AbstractDatabaseHandler(Class<T> type,
|
||||||
|
IDatabase databaseConnectionFactory, String criterion) {
|
||||||
|
|
||||||
|
this.databaseConnectionFactory = databaseConnectionFactory;
|
||||||
|
this.type = type;
|
||||||
|
this.query = createQuery(criterion);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create the SQL-String to insert into / select from the database
|
||||||
|
*
|
||||||
|
* @return the SQL-String
|
||||||
|
*/
|
||||||
|
protected abstract String createQuery(String criterion);
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Creates a comma-separated-String with the names of the variables in this
|
||||||
|
* class
|
||||||
|
*
|
||||||
|
* @param usePlaceHolders
|
||||||
|
* true, if PreparedStatement-placeholders ('?') should be used
|
||||||
|
* instead of the names of the variables
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String getColumns(boolean usePlaceHolders) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
boolean first = true;
|
||||||
|
/* Iterate the column-names */
|
||||||
|
for (Field f : type.getDeclaredFields()) {
|
||||||
|
if (first)
|
||||||
|
first = false;
|
||||||
|
else
|
||||||
|
sb.append(", ");
|
||||||
|
|
||||||
|
if (usePlaceHolders)
|
||||||
|
sb.append("?");
|
||||||
|
else
|
||||||
|
sb.append(f.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
+65
@@ -0,0 +1,65 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite.db;
|
||||||
|
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Creates a connection to a database.
|
||||||
|
*
|
||||||
|
* @author Tino
|
||||||
|
* @created 03.12.2008
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface IDatabase {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Establishes a new connection to the database
|
||||||
|
*
|
||||||
|
* @return A new connection to the database
|
||||||
|
* @throws SQLException
|
||||||
|
*/
|
||||||
|
public Connection createConnection() throws SQLException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the connection url
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String getConnectionUrl();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* releases the result set
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void close(ResultSet resultSet, Statement statement, Connection connection);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* releases the preparedStatement
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void close(PreparedStatement preparedStatement, Connection connection);
|
||||||
|
|
||||||
|
public void setData(String name, Object value);
|
||||||
|
|
||||||
|
public Object getData(String name);
|
||||||
|
|
||||||
|
public IWaveformDb getWaveformDb();
|
||||||
|
}
|
||||||
+102
@@ -0,0 +1,102 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite.db;
|
||||||
|
|
||||||
|
import java.net.URL;
|
||||||
|
import java.net.URLClassLoader;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.DriverManager;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Statement;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.IWaveformDb;
|
||||||
|
|
||||||
|
public class SQLiteDatabase implements IDatabase {
|
||||||
|
|
||||||
|
protected String dbFileName;
|
||||||
|
|
||||||
|
protected IWaveformDb waveformDb;
|
||||||
|
|
||||||
|
protected HashMap<String, Object> props;
|
||||||
|
|
||||||
|
static {
|
||||||
|
try {
|
||||||
|
URL dbUrl = SQLiteDatabase.class.getResource("/sqlite-jdbc-3.8.7.jar");
|
||||||
|
ClassLoader loader = URLClassLoader.newInstance(
|
||||||
|
new URL[] { dbUrl },
|
||||||
|
SQLiteDatabase.class.getClassLoader()
|
||||||
|
);
|
||||||
|
Class.forName("org.sqlite.JDBC", true, loader);
|
||||||
|
} catch (ClassNotFoundException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SQLiteDatabase(String dbFileName, IWaveformDb waveformDb) {
|
||||||
|
super();
|
||||||
|
this.dbFileName = dbFileName;
|
||||||
|
this.waveformDb = waveformDb;
|
||||||
|
props = new HashMap<String, Object>();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Connection createConnection() throws SQLException {
|
||||||
|
// create a database connection and return it
|
||||||
|
return DriverManager.getConnection(getConnectionUrl() );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getConnectionUrl() {
|
||||||
|
// now we set up a set of fairly basic string variables to use in the body of the code proper
|
||||||
|
String sJdbc = "jdbc:sqlite";
|
||||||
|
String sDbUrl = sJdbc + ":" + dbFileName;
|
||||||
|
// which will produce a legitimate Url for SqlLite JDBC :
|
||||||
|
// jdbc:sqlite:hello.db
|
||||||
|
return sDbUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close(ResultSet resultSet, Statement statement, Connection connection) {
|
||||||
|
try {
|
||||||
|
if(resultSet!=null) resultSet.close();
|
||||||
|
if(statement!=null) statement.close();
|
||||||
|
if(connection!=null) connection.close();
|
||||||
|
} catch (SQLException e) {}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void close(PreparedStatement preparedStatement, Connection connection) {
|
||||||
|
try {
|
||||||
|
preparedStatement.close();
|
||||||
|
connection.close();
|
||||||
|
} catch (SQLException e) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setData(String name, Object value){
|
||||||
|
props.put(name, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object getData(String name){
|
||||||
|
return props.get(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IWaveformDb getWaveformDb() {
|
||||||
|
return waveformDb;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+104
@@ -0,0 +1,104 @@
|
|||||||
|
/*******************************************************************************
|
||||||
|
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||||
|
* All rights reserved. This program and the accompanying materials
|
||||||
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
|
* which accompanies this distribution, and is available at
|
||||||
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
|
*
|
||||||
|
* Contributors:
|
||||||
|
* MINRES Technologies GmbH - initial API and implementation
|
||||||
|
*******************************************************************************/
|
||||||
|
package com.minres.scviewer.database.sqlite.db;
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.beans.PropertyDescriptor;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Class that inserts a list of <T>s into the corresponding database-table.
|
||||||
|
*
|
||||||
|
* @author Tino for http://www.java-blog.com
|
||||||
|
*
|
||||||
|
* @param <T>
|
||||||
|
*/
|
||||||
|
public class SQLiteDatabaseInsertHandler<T> extends AbstractDatabaseHandler<T> {
|
||||||
|
|
||||||
|
public SQLiteDatabaseInsertHandler(Class<T> type,
|
||||||
|
IDatabase databaseConnecter) {
|
||||||
|
super(type, databaseConnecter, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String createQuery(String criterion) {
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append("INSERT INTO ");
|
||||||
|
sb.append(type.getSimpleName());
|
||||||
|
sb.append("(");
|
||||||
|
sb.append(super.getColumns(false));
|
||||||
|
sb.append(")");
|
||||||
|
sb.append(" VALUES (");
|
||||||
|
sb.append(super.getColumns(true));
|
||||||
|
sb.append(")");
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inserts a list of <T>s into the corresponding database-table
|
||||||
|
*
|
||||||
|
* @param list
|
||||||
|
* List of <T>s that should be inserted into the corresponding
|
||||||
|
* database-table
|
||||||
|
*
|
||||||
|
* @throws SQLException
|
||||||
|
* @throws SecurityException
|
||||||
|
* @throws IllegalArgumentException
|
||||||
|
* @throws InstantiationException
|
||||||
|
* @throws IllegalAccessException
|
||||||
|
* @throws IntrospectionException
|
||||||
|
* @throws InvocationTargetException
|
||||||
|
*/
|
||||||
|
public void insertObjects(List<T> list) throws SQLException,
|
||||||
|
SecurityException, IllegalArgumentException,
|
||||||
|
InstantiationException, IllegalAccessException,
|
||||||
|
IntrospectionException, InvocationTargetException {
|
||||||
|
|
||||||
|
Connection connection = null;
|
||||||
|
PreparedStatement preparedStatement = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
connection = databaseConnectionFactory.createConnection();
|
||||||
|
preparedStatement = connection.prepareStatement(query);
|
||||||
|
|
||||||
|
for (T instance : list) {
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
|
for (Field field : type.getDeclaredFields()) {
|
||||||
|
PropertyDescriptor propertyDescriptor = new PropertyDescriptor(
|
||||||
|
field.getName(), type);
|
||||||
|
|
||||||
|
Method method = propertyDescriptor
|
||||||
|
.getReadMethod();
|
||||||
|
|
||||||
|
Object value = method.invoke(instance);
|
||||||
|
|
||||||
|
preparedStatement.setObject(++i, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
preparedStatement.addBatch();
|
||||||
|
}
|
||||||
|
preparedStatement.executeBatch();
|
||||||
|
|
||||||
|
} finally {
|
||||||
|
databaseConnectionFactory.close(preparedStatement, connection);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user