Compare commits
10 Commits
2.1.4
...
#29_cannot
Author | SHA1 | Date | |
---|---|---|---|
b398a07fd7 | |||
732bd82034 | |||
9f4f71046d | |||
d73b01f77d | |||
f89471e14b | |||
4f097e7f59 | |||
f1abc645c3 | |||
2c8b7129e9 | |||
8f76d816f1 | |||
594a71a9ba |
@@ -193,7 +193,7 @@ public class TxStream extends HierNode implements ITxStream<ITxEvent> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean equals(IWaveform other) {
|
public Boolean equals(IWaveform other) {
|
||||||
return(other instanceof TxStream && this.getId()==other.getId());
|
return(other instanceof TxStream && this.getId().equals(other.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: SCViewer database tests
|
Bundle-Name: SCViewer database tests
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.test
|
Bundle-SymbolicName: com.minres.scviewer.database.test
|
||||||
Bundle-Version: 1.0.0.qualifier
|
Bundle-Version: 1.0.1.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GnbH
|
Bundle-Vendor: MINRES Technologies GnbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Require-Bundle: org.junit,
|
Require-Bundle: org.junit,
|
||||||
|
238
com.minres.scviewer.database.test/inputs/my_db_truncated.txlog
Normal file
238
com.minres.scviewer.database.test/inputs/my_db_truncated.txlog
Normal file
@@ -0,0 +1,238 @@
|
|||||||
|
scv_tr_stream (ID 1, name "tr.pipelined_stream", kind "transactor")
|
||||||
|
scv_tr_stream (ID 2, name "tr.addr_stream", kind "transactor")
|
||||||
|
scv_tr_stream (ID 3, name "tr.data_stream", kind "transactor")
|
||||||
|
scv_tr_generator (ID 4, name "read", scv_tr_stream 1,
|
||||||
|
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||||
|
end_attribute (ID 1, name "data", type "UNSIGNED")
|
||||||
|
)
|
||||||
|
scv_tr_generator (ID 5, name "write", scv_tr_stream 1,
|
||||||
|
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||||
|
end_attribute (ID 1, name "data", type "UNSIGNED")
|
||||||
|
)
|
||||||
|
scv_tr_generator (ID 6, name "addr", scv_tr_stream 2,
|
||||||
|
begin_attribute (ID 0, name "addr", type "UNSIGNED")
|
||||||
|
)
|
||||||
|
scv_tr_generator (ID 7, name "rdata", scv_tr_stream 3,
|
||||||
|
end_attribute (ID 0, name "data", type "UNSIGNED")
|
||||||
|
)
|
||||||
|
scv_tr_generator (ID 8, name "wdata", scv_tr_stream 3,
|
||||||
|
begin_attribute (ID 0, name "data", type "UNSIGNED")
|
||||||
|
)
|
||||||
|
tx_begin 1 4 0 s
|
||||||
|
a 0
|
||||||
|
tx_record_attribute 1 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 2 6 0 s
|
||||||
|
a 0
|
||||||
|
tx_relation "addr_phase" 2 1
|
||||||
|
tx_end 2 6 180 ns
|
||||||
|
tx_begin 3 7 180 ns
|
||||||
|
tx_relation "data_phase" 3 1
|
||||||
|
tx_begin 4 4 180 ns
|
||||||
|
a 0
|
||||||
|
tx_record_attribute 4 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 5 6 180 ns
|
||||||
|
a 0
|
||||||
|
tx_relation "addr_phase" 5 4
|
||||||
|
tx_end 5 6 300 ns
|
||||||
|
tx_end 3 7 420 ns
|
||||||
|
a 0
|
||||||
|
tx_end 1 4 420 ns
|
||||||
|
a 0
|
||||||
|
tx_begin 6 4 420 ns
|
||||||
|
a 1
|
||||||
|
tx_record_attribute 6 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 7 6 420 ns
|
||||||
|
a 1
|
||||||
|
tx_relation "addr_phase" 7 6
|
||||||
|
tx_begin 8 7 420 ns
|
||||||
|
tx_relation "data_phase" 8 4
|
||||||
|
tx_end 7 6 480 ns
|
||||||
|
tx_end 8 7 620 ns
|
||||||
|
a 0
|
||||||
|
tx_end 4 4 620 ns
|
||||||
|
a 0
|
||||||
|
tx_begin 9 4 620 ns
|
||||||
|
a 1
|
||||||
|
tx_record_attribute 9 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 10 6 620 ns
|
||||||
|
a 1
|
||||||
|
tx_relation "addr_phase" 10 9
|
||||||
|
tx_begin 11 7 620 ns
|
||||||
|
tx_relation "data_phase" 11 6
|
||||||
|
tx_end 11 7 700 ns
|
||||||
|
a 1
|
||||||
|
tx_end 6 4 700 ns
|
||||||
|
a 1
|
||||||
|
tx_end 10 6 760 ns
|
||||||
|
tx_begin 12 7 760 ns
|
||||||
|
tx_relation "data_phase" 12 9
|
||||||
|
tx_begin 13 4 760 ns
|
||||||
|
a 2
|
||||||
|
tx_record_attribute 13 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 14 6 760 ns
|
||||||
|
a 2
|
||||||
|
tx_relation "addr_phase" 14 13
|
||||||
|
tx_end 14 6 880 ns
|
||||||
|
tx_end 12 7 980 ns
|
||||||
|
a 1
|
||||||
|
tx_end 9 4 980 ns
|
||||||
|
a 1
|
||||||
|
tx_begin 15 4 980 ns
|
||||||
|
a 2
|
||||||
|
tx_record_attribute 15 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 16 6 980 ns
|
||||||
|
a 2
|
||||||
|
tx_relation "addr_phase" 16 15
|
||||||
|
tx_begin 17 7 980 ns
|
||||||
|
tx_relation "data_phase" 17 13
|
||||||
|
tx_end 16 6 1040 ns
|
||||||
|
tx_end 17 7 1200 ns
|
||||||
|
a 2
|
||||||
|
tx_end 13 4 1200 ns
|
||||||
|
a 2
|
||||||
|
tx_begin 18 4 1200 ns
|
||||||
|
a 120
|
||||||
|
tx_record_attribute 18 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 19 6 1200 ns
|
||||||
|
a 120
|
||||||
|
tx_relation "addr_phase" 19 18
|
||||||
|
tx_begin 20 7 1200 ns
|
||||||
|
tx_relation "data_phase" 20 15
|
||||||
|
tx_end 19 6 1300 ns
|
||||||
|
tx_end 20 7 1340 ns
|
||||||
|
a 2
|
||||||
|
tx_end 15 4 1340 ns
|
||||||
|
a 2
|
||||||
|
tx_begin 21 4 1340 ns
|
||||||
|
a 11
|
||||||
|
tx_record_attribute 21 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 22 6 1340 ns
|
||||||
|
a 11
|
||||||
|
tx_relation "addr_phase" 22 21
|
||||||
|
tx_begin 23 7 1340 ns
|
||||||
|
tx_relation "data_phase" 23 18
|
||||||
|
tx_end 23 7 1420 ns
|
||||||
|
a 120
|
||||||
|
tx_end 18 4 1420 ns
|
||||||
|
a 120
|
||||||
|
tx_end 22 6 1540 ns
|
||||||
|
tx_begin 24 7 1540 ns
|
||||||
|
tx_relation "data_phase" 24 21
|
||||||
|
tx_begin 25 4 1540 ns
|
||||||
|
a 147
|
||||||
|
tx_record_attribute 25 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 26 6 1540 ns
|
||||||
|
a 147
|
||||||
|
tx_relation "addr_phase" 26 25
|
||||||
|
tx_end 24 7 1660 ns
|
||||||
|
a 11
|
||||||
|
tx_end 21 4 1660 ns
|
||||||
|
a 11
|
||||||
|
tx_end 26 6 1740 ns
|
||||||
|
tx_begin 27 7 1740 ns
|
||||||
|
tx_relation "data_phase" 27 25
|
||||||
|
tx_begin 28 4 1740 ns
|
||||||
|
a 99
|
||||||
|
tx_record_attribute 28 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 29 6 1740 ns
|
||||||
|
a 99
|
||||||
|
tx_relation "addr_phase" 29 28
|
||||||
|
tx_end 29 6 1800 ns
|
||||||
|
tx_end 27 7 1980 ns
|
||||||
|
a 147
|
||||||
|
tx_end 25 4 1980 ns
|
||||||
|
a 147
|
||||||
|
tx_begin 30 4 1980 ns
|
||||||
|
a 55
|
||||||
|
tx_record_attribute 30 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 31 6 1980 ns
|
||||||
|
a 55
|
||||||
|
tx_relation "addr_phase" 31 30
|
||||||
|
tx_begin 32 7 1980 ns
|
||||||
|
tx_relation "data_phase" 32 28
|
||||||
|
tx_end 32 7 2060 ns
|
||||||
|
a 99
|
||||||
|
tx_end 28 4 2060 ns
|
||||||
|
a 99
|
||||||
|
tx_end 31 6 2100 ns
|
||||||
|
tx_begin 33 7 2100 ns
|
||||||
|
tx_relation "data_phase" 33 30
|
||||||
|
tx_begin 34 4 2100 ns
|
||||||
|
a 126
|
||||||
|
tx_record_attribute 34 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 35 6 2100 ns
|
||||||
|
a 126
|
||||||
|
tx_relation "addr_phase" 35 34
|
||||||
|
tx_end 33 7 2340 ns
|
||||||
|
a 55
|
||||||
|
tx_end 30 4 2340 ns
|
||||||
|
a 55
|
||||||
|
tx_end 35 6 2340 ns
|
||||||
|
tx_begin 36 7 2340 ns
|
||||||
|
tx_relation "data_phase" 36 34
|
||||||
|
tx_begin 37 5 2340 ns
|
||||||
|
a 204
|
||||||
|
tx_record_attribute 37 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 38 6 2340 ns
|
||||||
|
a 204
|
||||||
|
tx_relation "addr_phase" 38 37
|
||||||
|
tx_end 38 6 2400 ns
|
||||||
|
tx_end 36 7 2540 ns
|
||||||
|
a 126
|
||||||
|
tx_end 34 4 2540 ns
|
||||||
|
a 126
|
||||||
|
tx_begin 39 5 2540 ns
|
||||||
|
a 242
|
||||||
|
tx_record_attribute 39 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 40 6 2540 ns
|
||||||
|
a 242
|
||||||
|
tx_relation "addr_phase" 40 39
|
||||||
|
tx_begin 41 8 2540 ns
|
||||||
|
a 211
|
||||||
|
tx_relation "data_phase" 41 37
|
||||||
|
tx_end 41 8 2640 ns
|
||||||
|
tx_end 37 5 2640 ns
|
||||||
|
a 211
|
||||||
|
tx_end 40 6 2780 ns
|
||||||
|
tx_begin 42 8 2780 ns
|
||||||
|
a 58
|
||||||
|
tx_relation "data_phase" 42 39
|
||||||
|
tx_begin 43 5 2780 ns
|
||||||
|
a 135
|
||||||
|
tx_record_attribute 43 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 44 6 2780 ns
|
||||||
|
a 135
|
||||||
|
tx_relation "addr_phase" 44 43
|
||||||
|
tx_end 44 6 2960 ns
|
||||||
|
tx_end 42 8 3 us
|
||||||
|
tx_end 39 5 3 us
|
||||||
|
a 58
|
||||||
|
tx_begin 45 5 3 us
|
||||||
|
a 26
|
||||||
|
tx_record_attribute 45 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 46 6 3 us
|
||||||
|
a 26
|
||||||
|
tx_relation "addr_phase" 46 45
|
||||||
|
tx_begin 47 8 3 us
|
||||||
|
a 31
|
||||||
|
tx_relation "data_phase" 47 43
|
||||||
|
tx_end 47 8 3140 ns
|
||||||
|
tx_end 43 5 3140 ns
|
||||||
|
a 31
|
||||||
|
tx_end 46 6 3200 ns
|
||||||
|
tx_begin 48 8 3200 ns
|
||||||
|
a 37
|
||||||
|
tx_relation "data_phase" 48 45
|
||||||
|
tx_begin 49 5 3200 ns
|
||||||
|
a 176
|
||||||
|
tx_record_attribute 49 "data_size" UNSIGNED = 24
|
||||||
|
tx_begin 50 6 3200 ns
|
||||||
|
a 176
|
||||||
|
tx_relation "addr_phase" 50 49
|
||||||
|
tx_end 50 6 3300 ns
|
||||||
|
tx_end 48 8 3380 ns
|
||||||
|
tx_end 45 5 3380 ns
|
||||||
|
a 37
|
||||||
|
tx_begin 51 5 3380 ns
|
||||||
|
a 58
|
||||||
|
tx_record_attribute 51 "data_
|
@@ -2,6 +2,7 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>com.minres.scviewer.database.test</artifactId>
|
<artifactId>com.minres.scviewer.database.test</artifactId>
|
||||||
|
<version>1.0.1-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
@@ -27,5 +28,4 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
|
||||||
</project>
|
</project>
|
@@ -100,6 +100,16 @@ public class DatabaseServicesTest {
|
|||||||
assertEquals(1, waveformDb.getChildNodes().size());
|
assertEquals(1, waveformDb.getChildNodes().size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testTxTextTruncated() throws Exception {
|
||||||
|
File f = new File("inputs/my_db_truncated.txlog").getAbsoluteFile();
|
||||||
|
assertTrue(f.exists());
|
||||||
|
waveformDb.load(f);
|
||||||
|
assertNotNull(waveformDb);
|
||||||
|
assertEquals(3, waveformDb.getAllWaves().size());
|
||||||
|
assertEquals(1, waveformDb.getChildNodes().size());
|
||||||
|
}
|
||||||
|
|
||||||
//@Test
|
//@Test
|
||||||
public void testTxLDb() throws Exception {
|
public void testTxLDb() throws Exception {
|
||||||
File f = new File("inputs/my_ldb.txldb").getAbsoluteFile();
|
File f = new File("inputs/my_ldb.txldb").getAbsoluteFile();
|
||||||
|
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: Textual transaction database
|
Bundle-Name: Textual transaction database
|
||||||
Bundle-SymbolicName: com.minres.scviewer.database.text
|
Bundle-SymbolicName: com.minres.scviewer.database.text
|
||||||
Bundle-Version: 2.0.1.qualifier
|
Bundle-Version: 2.0.2.qualifier
|
||||||
Bundle-Vendor: MINRES Technologies GmbH
|
Bundle-Vendor: MINRES Technologies GmbH
|
||||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||||
Import-Package: org.osgi.framework;version="1.3.0"
|
Import-Package: org.osgi.framework;version="1.3.0"
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>com.minres.scviewer.database.text</artifactId>
|
<artifactId>com.minres.scviewer.database.text</artifactId>
|
||||||
<version>2.0.1-SNAPSHOT</version>
|
<version>2.0.2-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
@@ -86,11 +86,16 @@ public class TextDbLoader implements IWaveformDbLoader{
|
|||||||
calculateConcurrencyIndicees()
|
calculateConcurrencyIndicees()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
} catch (IndexOutOfBoundsException e) {
|
||||||
|
return false
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return false
|
||||||
} catch(EOFException e) {
|
} catch(EOFException e) {
|
||||||
return true;
|
return true;
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
System.out.println("---->>> Exception caught while loading database. StackTrace following... ");
|
System.out.println("---->>> Exception "+e.toString()+" caught while loading database");
|
||||||
e.printStackTrace()
|
//System.out.println("---->>> Exception "+e.toString()+" caught while loading database. StackTrace following... ");
|
||||||
|
//e.printStackTrace()
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -129,7 +134,9 @@ public class TextDbLoader implements IWaveformDbLoader{
|
|||||||
case "ms":return 1000000000000L
|
case "ms":return 1000000000000L
|
||||||
case "s": return 1000000000000000L
|
case "s": return 1000000000000000L
|
||||||
}
|
}
|
||||||
|
return "fs"
|
||||||
}
|
}
|
||||||
|
|
||||||
private def parseInput(InputStream inputStream){
|
private def parseInput(InputStream inputStream){
|
||||||
def streamsById = [:]
|
def streamsById = [:]
|
||||||
def generatorsById = [:]
|
def generatorsById = [:]
|
||||||
|
@@ -117,7 +117,7 @@ public class VCDSignal<T> extends HierNode implements ISignal<T> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean equals(IWaveform other) {
|
public Boolean equals(IWaveform other) {
|
||||||
return(other instanceof VCDSignal<?> && this.getId()==other.getId());
|
return( other instanceof VCDSignal<?> && this.getId().equals(other.getId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@@ -140,7 +140,7 @@ public class WaveformDb extends HierNode implements IWaveformDb {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(name == hier[hier.length-1]){ //leaf
|
if(name.equals(hier[hier.length-1])){ //leaf
|
||||||
if(n1!=null) {
|
if(n1!=null) {
|
||||||
if(n1 instanceof HierNode){
|
if(n1 instanceof HierNode){
|
||||||
node.getChildNodes().remove(n1);
|
node.getChildNodes().remove(n1);
|
||||||
|
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||||||
Bundle-ManifestVersion: 2
|
Bundle-ManifestVersion: 2
|
||||||
Bundle-Name: %Bundle-Name
|
Bundle-Name: %Bundle-Name
|
||||||
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
Bundle-SymbolicName: com.minres.scviewer.e4.application;singleton:=true
|
||||||
Bundle-Version: 2.1.4.qualifier
|
Bundle-Version: 2.1.6.qualifier
|
||||||
Bundle-Vendor: %Bundle-Vendor
|
Bundle-Vendor: %Bundle-Vendor
|
||||||
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
Require-Bundle: javax.inject;bundle-version="1.0.0",
|
||||||
org.eclipse.core.runtime;bundle-version="3.11.1",
|
org.eclipse.core.runtime;bundle-version="3.11.1",
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<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">
|
<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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>com.minres.scviewer.e4.application</artifactId>
|
<artifactId>com.minres.scviewer.e4.application</artifactId>
|
||||||
<version>2.1.4-SNAPSHOT</version>
|
<version>2.1.6-SNAPSHOT</version>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<artifactId>com.minres.scviewer.parent</artifactId>
|
<artifactId>com.minres.scviewer.parent</artifactId>
|
||||||
|
@@ -9,6 +9,7 @@ public class Messages extends NLS {
|
|||||||
public static String DesignBrowser_12;
|
public static String DesignBrowser_12;
|
||||||
public static String DesignBrowser_16;
|
public static String DesignBrowser_16;
|
||||||
public static String DesignBrowser_2;
|
public static String DesignBrowser_2;
|
||||||
|
public static String DesignBrowser_3;
|
||||||
public static String DesignBrowser_4;
|
public static String DesignBrowser_4;
|
||||||
public static String DesignBrowser_8;
|
public static String DesignBrowser_8;
|
||||||
public static String LoadingWaveformDb_0;
|
public static String LoadingWaveformDb_0;
|
||||||
|
@@ -3,6 +3,7 @@ AboutDialog_1=\nCopyright (c) 2015, 2019 MINRES Technologies GmbH and others.\n\
|
|||||||
DesignBrowser_12=Append all after
|
DesignBrowser_12=Append all after
|
||||||
DesignBrowser_16=Insert all before
|
DesignBrowser_16=Insert all before
|
||||||
DesignBrowser_2=Enter text to filter waveforms
|
DesignBrowser_2=Enter text to filter waveforms
|
||||||
|
DesignBrowser_3=Enter text to filter hierarchy
|
||||||
DesignBrowser_4=Append after
|
DesignBrowser_4=Append after
|
||||||
DesignBrowser_8=Insert before
|
DesignBrowser_8=Insert before
|
||||||
LoadingWaveformDb_0=Database loading...
|
LoadingWaveformDb_0=Database loading...
|
||||||
|
@@ -15,6 +15,7 @@ import java.beans.PropertyChangeListener;
|
|||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.regex.PatternSyntaxException;
|
||||||
|
|
||||||
import javax.annotation.PostConstruct;
|
import javax.annotation.PostConstruct;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
@@ -67,6 +68,7 @@ import org.eclipse.swt.widgets.ToolItem;
|
|||||||
import org.eclipse.wb.swt.ResourceManager;
|
import org.eclipse.wb.swt.ResourceManager;
|
||||||
import org.eclipse.wb.swt.SWTResourceManager;
|
import org.eclipse.wb.swt.SWTResourceManager;
|
||||||
|
|
||||||
|
import com.minres.scviewer.database.HierNode;
|
||||||
import com.minres.scviewer.database.IHierNode;
|
import com.minres.scviewer.database.IHierNode;
|
||||||
import com.minres.scviewer.database.ITx;
|
import com.minres.scviewer.database.ITx;
|
||||||
import com.minres.scviewer.database.IWaveform;
|
import com.minres.scviewer.database.IWaveform;
|
||||||
@@ -109,8 +111,17 @@ public class DesignBrowser {
|
|||||||
/** The tree viewer. */
|
/** The tree viewer. */
|
||||||
private TreeViewer treeViewer;
|
private TreeViewer treeViewer;
|
||||||
|
|
||||||
|
/** The name filter of the design browser tree. */
|
||||||
|
private Text treeNameFilter;
|
||||||
|
|
||||||
|
/** The attribute filter. */
|
||||||
|
WaveformAttributeFilter treeAttributeFilter;
|
||||||
|
|
||||||
/** The name filter. */
|
/** The name filter. */
|
||||||
private Text nameFilter;
|
private Text tableNameFilter;
|
||||||
|
|
||||||
|
/** The attribute filter. */
|
||||||
|
WaveformAttributeFilter tableAttributeFilter;
|
||||||
|
|
||||||
/** The tx table viewer. */
|
/** The tx table viewer. */
|
||||||
private TableViewer txTableViewer;
|
private TableViewer txTableViewer;
|
||||||
@@ -118,9 +129,6 @@ public class DesignBrowser {
|
|||||||
/** The append all item. */
|
/** The append all item. */
|
||||||
ToolItem appendItem, insertItem, insertAllItem, appendAllItem;
|
ToolItem appendItem, insertItem, insertAllItem, appendAllItem;
|
||||||
|
|
||||||
/** The attribute filter. */
|
|
||||||
WaveformAttributeFilter attributeFilter;
|
|
||||||
|
|
||||||
/** The other selection count. */
|
/** The other selection count. */
|
||||||
int thisSelectionCount=0, otherSelectionCount=0;
|
int thisSelectionCount=0, otherSelectionCount=0;
|
||||||
|
|
||||||
@@ -188,10 +196,25 @@ public class DesignBrowser {
|
|||||||
*/
|
*/
|
||||||
public void createTreeViewerComposite(Composite parent) {
|
public void createTreeViewerComposite(Composite parent) {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
|
|
||||||
|
treeNameFilter = new Text(parent, SWT.BORDER);
|
||||||
|
treeNameFilter.setMessage(Messages.DesignBrowser_3);
|
||||||
|
treeNameFilter.addModifyListener(new ModifyListener() {
|
||||||
|
@Override
|
||||||
|
public void modifyText(ModifyEvent e) {
|
||||||
|
treeAttributeFilter.setSearchText(((Text) e.widget).getText());
|
||||||
|
treeViewer.refresh();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
treeNameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
|
treeAttributeFilter = new WaveformAttributeFilter();
|
||||||
|
|
||||||
treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
treeViewer = new TreeViewer(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
|
||||||
treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
|
treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
treeViewer.setContentProvider(new TxDbContentProvider());
|
treeViewer.setContentProvider(new TxDbContentProvider());
|
||||||
treeViewer.setLabelProvider(new TxDbLabelProvider());
|
treeViewer.setLabelProvider(new TxDbLabelProvider());
|
||||||
|
treeViewer.addFilter(treeAttributeFilter);
|
||||||
treeViewer.setUseHashlookup(true);
|
treeViewer.setUseHashlookup(true);
|
||||||
treeViewer.setAutoExpandLevel(2);
|
treeViewer.setAutoExpandLevel(2);
|
||||||
treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
|
treeViewer.addSelectionChangedListener(new ISelectionChangedListener() {
|
||||||
@@ -222,25 +245,25 @@ public class DesignBrowser {
|
|||||||
public void createTableComposite(Composite parent) {
|
public void createTableComposite(Composite parent) {
|
||||||
parent.setLayout(new GridLayout(1, false));
|
parent.setLayout(new GridLayout(1, false));
|
||||||
|
|
||||||
nameFilter = new Text(parent, SWT.BORDER);
|
tableNameFilter = new Text(parent, SWT.BORDER);
|
||||||
nameFilter.setMessage(Messages.DesignBrowser_2);
|
tableNameFilter.setMessage(Messages.DesignBrowser_2);
|
||||||
nameFilter.addModifyListener(new ModifyListener() {
|
tableNameFilter.addModifyListener(new ModifyListener() {
|
||||||
@Override
|
@Override
|
||||||
public void modifyText(ModifyEvent e) {
|
public void modifyText(ModifyEvent e) {
|
||||||
attributeFilter.setSearchText(((Text) e.widget).getText());
|
tableAttributeFilter.setSearchText(((Text) e.widget).getText());
|
||||||
updateButtons();
|
updateButtons();
|
||||||
txTableViewer.refresh();
|
txTableViewer.refresh();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
nameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
tableNameFilter.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||||
|
|
||||||
attributeFilter = new WaveformAttributeFilter();
|
tableAttributeFilter = new WaveformAttributeFilter();
|
||||||
|
|
||||||
txTableViewer = new TableViewer(parent);
|
txTableViewer = new TableViewer(parent);
|
||||||
txTableViewer.setContentProvider(new TxDbContentProvider(true));
|
txTableViewer.setContentProvider(new TxDbContentProvider(true));
|
||||||
txTableViewer.setLabelProvider(new TxDbLabelProvider());
|
txTableViewer.setLabelProvider(new TxDbLabelProvider());
|
||||||
txTableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
|
txTableViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
|
||||||
txTableViewer.addFilter(attributeFilter);
|
txTableViewer.addFilter(tableAttributeFilter);
|
||||||
txTableViewer.addDoubleClickListener(new IDoubleClickListener() {
|
txTableViewer.addDoubleClickListener(new IDoubleClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void doubleClick(DoubleClickEvent event) {
|
public void doubleClick(DoubleClickEvent event) {
|
||||||
@@ -468,9 +491,24 @@ public class DesignBrowser {
|
|||||||
if (searchString == null || searchString.length() == 0) {
|
if (searchString == null || searchString.length() == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
IWaveform p = (IWaveform) element;
|
if(element instanceof IWaveform) {
|
||||||
if (p.getName().matches(searchString)) {
|
IWaveform p = (IWaveform) element;
|
||||||
|
try {
|
||||||
|
if (p.getName().matches(searchString))
|
||||||
|
return true;
|
||||||
|
} catch (PatternSyntaxException e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else if(element instanceof IWaveformDb) {
|
||||||
return true;
|
return true;
|
||||||
|
} else if(element instanceof HierNode) {
|
||||||
|
HierNode n = (HierNode) element;
|
||||||
|
try {
|
||||||
|
if (n.getFullName().matches(searchString))
|
||||||
|
return true;
|
||||||
|
} catch (PatternSyntaxException e) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -669,12 +669,9 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
* @param persistedState the persisted state
|
* @param persistedState the persisted state
|
||||||
*/
|
*/
|
||||||
protected void saveWaveformViewerState(Map<String, String> persistedState) {
|
protected void saveWaveformViewerState(Map<String, String> persistedState) {
|
||||||
Integer index;
|
|
||||||
boolean isStream = false;
|
|
||||||
persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$
|
persistedState.put(SHOWN_WAVEFORM + "S", Integer.toString(waveformPane.getStreamList().size())); //$NON-NLS-1$
|
||||||
index = 0;
|
Integer index = 0;
|
||||||
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
|
for (TrackEntry trackEntry : waveformPane.getStreamList()) {
|
||||||
if(trackEntry.isStream()) { isStream=true; }
|
|
||||||
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
|
persistedState.put(SHOWN_WAVEFORM + index, trackEntry.waveform.getFullName());
|
||||||
persistedState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString());
|
persistedState.put(SHOWN_WAVEFORM + index + VALUE_DISPLAY, trackEntry.valueDisplay.toString());
|
||||||
persistedState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString());
|
persistedState.put(SHOWN_WAVEFORM + index + WAVE_DISPLAY, trackEntry.waveDisplay.toString());
|
||||||
@@ -693,23 +690,24 @@ public class WaveformViewer implements IFileChangeListener, IPreferenceChangeLis
|
|||||||
|
|
||||||
// get selected transaction of a stream
|
// get selected transaction of a stream
|
||||||
ISelection selection = waveformPane.getSelection();
|
ISelection selection = waveformPane.getSelection();
|
||||||
if (!selection.isEmpty() && isStream) {
|
if (!selection.isEmpty()) {
|
||||||
List<Object> t = getISelection(selection);
|
List<Object> t = getISelection(selection);
|
||||||
ITx tx = (ITx) t.get(0);
|
if(t.get(0) instanceof ITx) {
|
||||||
TrackEntry te = (TrackEntry) t.get(1);
|
ITx tx = (ITx) t.get(0);
|
||||||
// get transaction id
|
TrackEntry te = (TrackEntry) t.get(1);
|
||||||
persistedState.put(SELECTED_TX_ID, Long.toString(tx.getId()));
|
// get transaction id
|
||||||
//get TrackEntry name
|
persistedState.put(SELECTED_TX_ID, Long.toString(tx.getId()));
|
||||||
String name = te.getStream().getFullName();
|
//get TrackEntry name
|
||||||
persistedState.put(SELECTED_TRACKENTRY_NAME, name);
|
String name = te.getStream().getFullName();
|
||||||
|
persistedState.put(SELECTED_TRACKENTRY_NAME, name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected List<Object> getISelection(ISelection selection){
|
protected List<Object> getISelection(ISelection selection){
|
||||||
List<Object> result = new LinkedList<Object> ();
|
List<Object> result = new LinkedList<Object> ();
|
||||||
|
|
||||||
if ( selection instanceof IStructuredSelection )
|
if ( selection instanceof IStructuredSelection ) {
|
||||||
{
|
|
||||||
Iterator<?> i = ((IStructuredSelection)selection).iterator();
|
Iterator<?> i = ((IStructuredSelection)selection).iterator();
|
||||||
while (i.hasNext()){
|
while (i.hasNext()){
|
||||||
Object o = i.next ();
|
Object o = i.next ();
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
<relativePath>../com.minres.scviewer.parent</relativePath>
|
<relativePath>../com.minres.scviewer.parent</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
<artifactId>com.minres.scviewer.e4.product</artifactId>
|
||||||
<version>2.1.4-SNAPSHOT</version>
|
<version>2.1.6-SNAPSHOT</version>
|
||||||
<packaging>eclipse-repository</packaging>
|
<packaging>eclipse-repository</packaging>
|
||||||
<groupId>com.minres.scviewer</groupId>
|
<groupId>com.minres.scviewer</groupId>
|
||||||
<build>
|
<build>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?pde version="3.5"?>
|
<?pde version="3.5"?>
|
||||||
|
|
||||||
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.1.4.qualifier" useFeatures="false" includeLaunchers="true">
|
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.1.6.qualifier" useFeatures="false" includeLaunchers="true">
|
||||||
|
|
||||||
<configIni use="default">
|
<configIni use="default">
|
||||||
</configIni>
|
</configIni>
|
||||||
|
Reference in New Issue
Block a user